Skip to content

Commit 7c57293

Browse files
wKozaAndrewKushnir
authored andcommitted
refactor(language-service): clean up imports language-service and misspellings in public API (angular#29097)
PR Close angular#29097
1 parent 3063547 commit 7c57293

6 files changed

Lines changed: 19 additions & 23 deletions

File tree

packages/language-service/src/completions.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
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';
10-
import {DiagnosticTemplateInfo, getExpressionScope} from '@angular/compiler-cli/src/language_services';
9+
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';
10+
import {getExpressionScope} from '@angular/compiler-cli/src/language_services';
1111

12-
import {AstResult, AttrInfo, SelectorInfo, TemplateInfo} from './common';
12+
import {AttrInfo, TemplateInfo} from './common';
1313
import {getExpressionCompletions} from './expressions';
1414
import {attributeNames, elementNames, eventNames, propertyNames} from './html_info';
15-
import {BuiltinType, Completion, Completions, Span, Symbol, SymbolDeclaration, SymbolTable, TemplateSource} from './types';
15+
import {Completion, Completions, Span, Symbol, SymbolTable, TemplateSource} from './types';
1616
import {diagnosticInfoFromTemplateInfo, findTemplateAstAt, flatten, getSelectors, hasTemplateReference, inSpan, removeSuffix, spanOf, uniqueByName} from './utils';
1717

1818
const TEMPLATE_ATTR_PREFIX = '*';

packages/language-service/src/locate_symbol.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import {AST, Attribute, BoundDirectivePropertyAst, BoundEventAst, ElementAst, TemplateAst, TemplateAstPath, findNode, tokenReference} from '@angular/compiler';
9+
import {AST, Attribute, BoundDirectivePropertyAst, BoundEventAst, ElementAst, TemplateAstPath, findNode, tokenReference} from '@angular/compiler';
1010
import {getExpressionScope} from '@angular/compiler-cli/src/language_services';
1111

1212
import {TemplateInfo} from './common';
1313
import {getExpressionSymbol} from './expressions';
14-
import {Definition, Location, Span, Symbol, SymbolTable} from './types';
14+
import {Definition, Span, Symbol} from './types';
1515
import {diagnosticInfoFromTemplateInfo, findTemplateAstAt, inSpan, offsetSpan, spanOf} from './utils';
1616

1717
export interface SymbolInfo {

packages/language-service/src/reflector_host.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
import {StaticSymbolResolverHost} from '@angular/compiler';
10-
import {CompilerOptions, MetadataCollector, MetadataReaderCache, MetadataReaderHost, createMetadataReaderCache, readMetadata} from '@angular/compiler-cli/src/language_services';
10+
import {CompilerOptions, MetadataCollector, MetadataReaderHost, createMetadataReaderCache, readMetadata} from '@angular/compiler-cli/src/language_services';
1111
import * as path from 'path';
1212
import * as ts from 'typescript';
1313

packages/language-service/src/types.ts

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export {
2727
* The information `LanguageService` needs from the `LanguageServiceHost` to describe the content of
2828
* a template and the language context the template is in.
2929
*
30-
* A host interface; see `LanguageSeriviceHost`.
30+
* A host interface; see `LanguageServiceHost`.
3131
*
3232
* @publicApi
3333
*/
@@ -71,7 +71,7 @@ export interface TemplateSource {
7171
/**
7272
* A sequence of template sources.
7373
*
74-
* A host type; see `LanguageSeriviceHost`.
74+
* A host type; see `LanguageServiceHost`.
7575
*
7676
* @publicApi
7777
*/
@@ -102,12 +102,12 @@ export interface DeclarationError {
102102
* Information about the component declarations.
103103
*
104104
* A file might contain a declaration without a template because the file contains only
105-
* templateUrl references. However, the compoennt declaration might contain errors that
105+
* templateUrl references. However, the component declaration might contain errors that
106106
* need to be reported such as the template string is missing or the component is not
107107
* declared in a module. These error should be reported on the declaration, not the
108108
* template.
109109
*
110-
* A host type; see `LanguageSeriviceHost`.
110+
* A host type; see `LanguageServiceHost`.
111111
*
112112
* @publicApi
113113
*/
@@ -137,16 +137,15 @@ export interface Declaration {
137137
/**
138138
* A sequence of declarations.
139139
*
140-
* A host type; see `LanguageSeriviceHost`.
140+
* A host type; see `LanguageServiceHost`.
141141
*
142142
* @publicApi
143143
*/
144144
export type Declarations = Declaration[];
145145

146146
/**
147147
* The host for a `LanguageService`. This provides all the `LanguageService` requires to respond
148-
* to
149-
* the `LanguageService` requests.
148+
* to the `LanguageService` requests.
150149
*
151150
* This interface describes the requirements of the `LanguageService` on its host.
152151
*
@@ -186,8 +185,7 @@ export interface LanguageServiceHost {
186185

187186
/**
188187
* Return the template source information for all templates in `fileName` or for `fileName` if
189-
* it
190-
* is a template file.
188+
* it is a template file.
191189
*/
192190
getTemplates(fileName: string): TemplateSources;
193191

@@ -216,7 +214,7 @@ export interface LanguageServiceHost {
216214
*/
217215
export interface Completion {
218216
/**
219-
* The kind of comletion.
217+
* The kind of completion.
220218
*/
221219
kind: DeclarationKind;
222220

@@ -353,7 +351,7 @@ export interface Hover {
353351
* beginning of the file reference by `fileName`.
354352
*
355353
* This interface and all interfaces and types marked as `LanguageService` types, describe a
356-
* particlar implementation of the Angular language service and is not intented to be
354+
* particular implementation of the Angular language service and is not intended to be
357355
* implemented. Adding members to the interface will not be considered a breaking change as
358356
* defined by SemVer.
359357
*

packages/language-service/src/typescript_host.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
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';
9+
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';
1010
import {CompilerOptions, getClassMembersFromDeclaration, getPipesTable, getSymbolQuery} from '@angular/compiler-cli/src/language_services';
1111
import {ViewEncapsulation, ɵConsole as Console} from '@angular/core';
1212
import * as fs from 'fs';
@@ -15,9 +15,7 @@ import * as ts from 'typescript';
1515

1616
import {createLanguageService} from './language_service';
1717
import {ReflectorHost} from './reflector_host';
18-
import {BuiltinType, Declaration, DeclarationError, DeclarationKind, Declarations, Definition, DiagnosticMessageChain, LanguageService, LanguageServiceHost, PipeInfo, Pipes, Signature, Span, Symbol, SymbolDeclaration, SymbolQuery, SymbolTable, TemplateSource, TemplateSources} from './types';
19-
import {isTypescriptVersion} from './utils';
20-
18+
import {Declaration, DeclarationError, Declarations, DiagnosticMessageChain, LanguageService, LanguageServiceHost, Span, Symbol, SymbolQuery, TemplateSource, TemplateSources} from './types';
2119

2220

2321
/**

packages/language-service/src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import {AstPath, CompileDirectiveSummary, CompileTypeMetadata, CssSelector, DirectiveAst, ElementAst, EmbeddedTemplateAst, HtmlAstPath, Node as HtmlNode, ParseSourceSpan, RecursiveTemplateAstVisitor, RecursiveVisitor, TemplateAst, TemplateAstPath, identifierName, templateVisitAll, visitAll} from '@angular/compiler';
9+
import {AstPath, CompileDirectiveSummary, CompileTypeMetadata, CssSelector, DirectiveAst, ElementAst, EmbeddedTemplateAst, ParseSourceSpan, RecursiveTemplateAstVisitor, TemplateAst, TemplateAstPath, identifierName, templateVisitAll} from '@angular/compiler';
1010
import {DiagnosticTemplateInfo} from '@angular/compiler-cli/src/language_services';
1111
import * as ts from 'typescript';
1212

0 commit comments

Comments
 (0)