refactor(language-service): clean up imports language-service and misspellings in public API (#29097)
PR Close #29097
This commit is contained in:
parent
3063547975
commit
7c57293bee
|
@ -6,13 +6,13 @@
|
||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {AST, AstPath, AttrAst, Attribute, BoundDirectivePropertyAst, BoundElementPropertyAst, BoundEventAst, BoundTextAst, CssSelector, DirectiveAst, Element, ElementAst, EmbeddedTemplateAst, ImplicitReceiver, NAMED_ENTITIES, NgContentAst, Node as HtmlAst, NullTemplateVisitor, ParseSpan, PropertyRead, ReferenceAst, SelectorMatcher, TagContentType, TemplateAst, TemplateAstVisitor, Text, TextAst, VariableAst, findNode, getHtmlTagDefinition, splitNsName, templateVisitAll} from '@angular/compiler';
|
import {AST, AstPath, Attribute, BoundDirectivePropertyAst, BoundElementPropertyAst, BoundEventAst, BoundTextAst, CssSelector, Element, ElementAst, ImplicitReceiver, NAMED_ENTITIES, Node as HtmlAst, NullTemplateVisitor, ParseSpan, PropertyRead, SelectorMatcher, TagContentType, Text, findNode, getHtmlTagDefinition, splitNsName} from '@angular/compiler';
|
||||||
import {DiagnosticTemplateInfo, getExpressionScope} from '@angular/compiler-cli/src/language_services';
|
import {getExpressionScope} from '@angular/compiler-cli/src/language_services';
|
||||||
|
|
||||||
import {AstResult, AttrInfo, SelectorInfo, TemplateInfo} from './common';
|
import {AttrInfo, TemplateInfo} from './common';
|
||||||
import {getExpressionCompletions} from './expressions';
|
import {getExpressionCompletions} from './expressions';
|
||||||
import {attributeNames, elementNames, eventNames, propertyNames} from './html_info';
|
import {attributeNames, elementNames, eventNames, propertyNames} from './html_info';
|
||||||
import {BuiltinType, Completion, Completions, Span, Symbol, SymbolDeclaration, SymbolTable, TemplateSource} from './types';
|
import {Completion, Completions, Span, Symbol, SymbolTable, TemplateSource} from './types';
|
||||||
import {diagnosticInfoFromTemplateInfo, findTemplateAstAt, flatten, getSelectors, hasTemplateReference, inSpan, removeSuffix, spanOf, uniqueByName} from './utils';
|
import {diagnosticInfoFromTemplateInfo, findTemplateAstAt, flatten, getSelectors, hasTemplateReference, inSpan, removeSuffix, spanOf, uniqueByName} from './utils';
|
||||||
|
|
||||||
const TEMPLATE_ATTR_PREFIX = '*';
|
const TEMPLATE_ATTR_PREFIX = '*';
|
||||||
|
|
|
@ -6,12 +6,12 @@
|
||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {AST, Attribute, BoundDirectivePropertyAst, BoundEventAst, ElementAst, TemplateAst, TemplateAstPath, findNode, tokenReference} from '@angular/compiler';
|
import {AST, Attribute, BoundDirectivePropertyAst, BoundEventAst, ElementAst, TemplateAstPath, findNode, tokenReference} from '@angular/compiler';
|
||||||
import {getExpressionScope} from '@angular/compiler-cli/src/language_services';
|
import {getExpressionScope} from '@angular/compiler-cli/src/language_services';
|
||||||
|
|
||||||
import {TemplateInfo} from './common';
|
import {TemplateInfo} from './common';
|
||||||
import {getExpressionSymbol} from './expressions';
|
import {getExpressionSymbol} from './expressions';
|
||||||
import {Definition, Location, Span, Symbol, SymbolTable} from './types';
|
import {Definition, Span, Symbol} from './types';
|
||||||
import {diagnosticInfoFromTemplateInfo, findTemplateAstAt, inSpan, offsetSpan, spanOf} from './utils';
|
import {diagnosticInfoFromTemplateInfo, findTemplateAstAt, inSpan, offsetSpan, spanOf} from './utils';
|
||||||
|
|
||||||
export interface SymbolInfo {
|
export interface SymbolInfo {
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {StaticSymbolResolverHost} from '@angular/compiler';
|
import {StaticSymbolResolverHost} from '@angular/compiler';
|
||||||
import {CompilerOptions, MetadataCollector, MetadataReaderCache, MetadataReaderHost, createMetadataReaderCache, readMetadata} from '@angular/compiler-cli/src/language_services';
|
import {CompilerOptions, MetadataCollector, MetadataReaderHost, createMetadataReaderCache, readMetadata} from '@angular/compiler-cli/src/language_services';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as ts from 'typescript';
|
import * as ts from 'typescript';
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ export {
|
||||||
* The information `LanguageService` needs from the `LanguageServiceHost` to describe the content of
|
* The information `LanguageService` needs from the `LanguageServiceHost` to describe the content of
|
||||||
* a template and the language context the template is in.
|
* a template and the language context the template is in.
|
||||||
*
|
*
|
||||||
* A host interface; see `LanguageSeriviceHost`.
|
* A host interface; see `LanguageServiceHost`.
|
||||||
*
|
*
|
||||||
* @publicApi
|
* @publicApi
|
||||||
*/
|
*/
|
||||||
|
@ -71,7 +71,7 @@ export interface TemplateSource {
|
||||||
/**
|
/**
|
||||||
* A sequence of template sources.
|
* A sequence of template sources.
|
||||||
*
|
*
|
||||||
* A host type; see `LanguageSeriviceHost`.
|
* A host type; see `LanguageServiceHost`.
|
||||||
*
|
*
|
||||||
* @publicApi
|
* @publicApi
|
||||||
*/
|
*/
|
||||||
|
@ -102,12 +102,12 @@ export interface DeclarationError {
|
||||||
* Information about the component declarations.
|
* Information about the component declarations.
|
||||||
*
|
*
|
||||||
* A file might contain a declaration without a template because the file contains only
|
* A file might contain a declaration without a template because the file contains only
|
||||||
* templateUrl references. However, the compoennt declaration might contain errors that
|
* templateUrl references. However, the component declaration might contain errors that
|
||||||
* need to be reported such as the template string is missing or the component is not
|
* need to be reported such as the template string is missing or the component is not
|
||||||
* declared in a module. These error should be reported on the declaration, not the
|
* declared in a module. These error should be reported on the declaration, not the
|
||||||
* template.
|
* template.
|
||||||
*
|
*
|
||||||
* A host type; see `LanguageSeriviceHost`.
|
* A host type; see `LanguageServiceHost`.
|
||||||
*
|
*
|
||||||
* @publicApi
|
* @publicApi
|
||||||
*/
|
*/
|
||||||
|
@ -137,7 +137,7 @@ export interface Declaration {
|
||||||
/**
|
/**
|
||||||
* A sequence of declarations.
|
* A sequence of declarations.
|
||||||
*
|
*
|
||||||
* A host type; see `LanguageSeriviceHost`.
|
* A host type; see `LanguageServiceHost`.
|
||||||
*
|
*
|
||||||
* @publicApi
|
* @publicApi
|
||||||
*/
|
*/
|
||||||
|
@ -145,8 +145,7 @@ export type Declarations = Declaration[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The host for a `LanguageService`. This provides all the `LanguageService` requires to respond
|
* The host for a `LanguageService`. This provides all the `LanguageService` requires to respond
|
||||||
* to
|
* to the `LanguageService` requests.
|
||||||
* the `LanguageService` requests.
|
|
||||||
*
|
*
|
||||||
* This interface describes the requirements of the `LanguageService` on its host.
|
* This interface describes the requirements of the `LanguageService` on its host.
|
||||||
*
|
*
|
||||||
|
@ -186,8 +185,7 @@ export interface LanguageServiceHost {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the template source information for all templates in `fileName` or for `fileName` if
|
* Return the template source information for all templates in `fileName` or for `fileName` if
|
||||||
* it
|
* it is a template file.
|
||||||
* is a template file.
|
|
||||||
*/
|
*/
|
||||||
getTemplates(fileName: string): TemplateSources;
|
getTemplates(fileName: string): TemplateSources;
|
||||||
|
|
||||||
|
@ -216,7 +214,7 @@ export interface LanguageServiceHost {
|
||||||
*/
|
*/
|
||||||
export interface Completion {
|
export interface Completion {
|
||||||
/**
|
/**
|
||||||
* The kind of comletion.
|
* The kind of completion.
|
||||||
*/
|
*/
|
||||||
kind: DeclarationKind;
|
kind: DeclarationKind;
|
||||||
|
|
||||||
|
@ -353,7 +351,7 @@ export interface Hover {
|
||||||
* beginning of the file reference by `fileName`.
|
* beginning of the file reference by `fileName`.
|
||||||
*
|
*
|
||||||
* This interface and all interfaces and types marked as `LanguageService` types, describe a
|
* This interface and all interfaces and types marked as `LanguageService` types, describe a
|
||||||
* particlar implementation of the Angular language service and is not intented to be
|
* particular implementation of the Angular language service and is not intended to be
|
||||||
* implemented. Adding members to the interface will not be considered a breaking change as
|
* implemented. Adding members to the interface will not be considered a breaking change as
|
||||||
* defined by SemVer.
|
* defined by SemVer.
|
||||||
*
|
*
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {AotSummaryResolver, CompileMetadataResolver, CompilerConfig, DEFAULT_INTERPOLATION_CONFIG, DirectiveNormalizer, DirectiveResolver, DomElementSchemaRegistry, FormattedError, FormattedMessageChain, HtmlParser, InterpolationConfig, JitSummaryResolver, NgAnalyzedModules, NgModuleResolver, ParseTreeResult, PipeResolver, ResourceLoader, StaticReflector, StaticSymbol, StaticSymbolCache, StaticSymbolResolver, SummaryResolver, analyzeNgModules, createOfflineCompileUrlResolver, isFormattedError} from '@angular/compiler';
|
import {AotSummaryResolver, CompileMetadataResolver, CompilerConfig, DEFAULT_INTERPOLATION_CONFIG, DirectiveNormalizer, DirectiveResolver, DomElementSchemaRegistry, FormattedError, FormattedMessageChain, HtmlParser, InterpolationConfig, JitSummaryResolver, NgAnalyzedModules, NgModuleResolver, ParseTreeResult, PipeResolver, ResourceLoader, StaticReflector, StaticSymbol, StaticSymbolCache, StaticSymbolResolver, analyzeNgModules, createOfflineCompileUrlResolver, isFormattedError} from '@angular/compiler';
|
||||||
import {CompilerOptions, getClassMembersFromDeclaration, getPipesTable, getSymbolQuery} from '@angular/compiler-cli/src/language_services';
|
import {CompilerOptions, getClassMembersFromDeclaration, getPipesTable, getSymbolQuery} from '@angular/compiler-cli/src/language_services';
|
||||||
import {ViewEncapsulation, ɵConsole as Console} from '@angular/core';
|
import {ViewEncapsulation, ɵConsole as Console} from '@angular/core';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
|
@ -15,9 +15,7 @@ import * as ts from 'typescript';
|
||||||
|
|
||||||
import {createLanguageService} from './language_service';
|
import {createLanguageService} from './language_service';
|
||||||
import {ReflectorHost} from './reflector_host';
|
import {ReflectorHost} from './reflector_host';
|
||||||
import {BuiltinType, Declaration, DeclarationError, DeclarationKind, Declarations, Definition, DiagnosticMessageChain, LanguageService, LanguageServiceHost, PipeInfo, Pipes, Signature, Span, Symbol, SymbolDeclaration, SymbolQuery, SymbolTable, TemplateSource, TemplateSources} from './types';
|
import {Declaration, DeclarationError, Declarations, DiagnosticMessageChain, LanguageService, LanguageServiceHost, Span, Symbol, SymbolQuery, TemplateSource, TemplateSources} from './types';
|
||||||
import {isTypescriptVersion} from './utils';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {AstPath, CompileDirectiveSummary, CompileTypeMetadata, CssSelector, DirectiveAst, ElementAst, EmbeddedTemplateAst, HtmlAstPath, Node as HtmlNode, ParseSourceSpan, RecursiveTemplateAstVisitor, RecursiveVisitor, TemplateAst, TemplateAstPath, identifierName, templateVisitAll, visitAll} from '@angular/compiler';
|
import {AstPath, CompileDirectiveSummary, CompileTypeMetadata, CssSelector, DirectiveAst, ElementAst, EmbeddedTemplateAst, ParseSourceSpan, RecursiveTemplateAstVisitor, TemplateAst, TemplateAstPath, identifierName, templateVisitAll} from '@angular/compiler';
|
||||||
import {DiagnosticTemplateInfo} from '@angular/compiler-cli/src/language_services';
|
import {DiagnosticTemplateInfo} from '@angular/compiler-cli/src/language_services';
|
||||||
import * as ts from 'typescript';
|
import * as ts from 'typescript';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue