Skip to content

Commit

Permalink
refactor(language-service): clean up imports language-service and mis…
Browse files Browse the repository at this point in the history
…spellings in public API
  • Loading branch information
wKoza committed Mar 4, 2019
1 parent 7a22019 commit 2d15566
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 23 deletions.
8 changes: 4 additions & 4 deletions packages/language-service/src/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
* 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 {DiagnosticTemplateInfo, getExpressionScope} from '@angular/compiler-cli/src/language_services';
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 {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 {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';

const TEMPLATE_ATTR_PREFIX = '*';
Expand Down
4 changes: 2 additions & 2 deletions packages/language-service/src/locate_symbol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
* 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 {TemplateInfo} from './common';
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';

export interface SymbolInfo {
Expand Down
2 changes: 1 addition & 1 deletion packages/language-service/src/reflector_host.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

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 ts from 'typescript';

Expand Down
20 changes: 9 additions & 11 deletions packages/language-service/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export {
* The information `LanguageService` needs from the `LanguageServiceHost` to describe the content of
* a template and the language context the template is in.
*
* A host interface; see `LanguageSeriviceHost`.
* A host interface; see `LanguageServiceHost`.
*
* @publicApi
*/
Expand Down Expand Up @@ -71,7 +71,7 @@ export interface TemplateSource {
/**
* A sequence of template sources.
*
* A host type; see `LanguageSeriviceHost`.
* A host type; see `LanguageServiceHost`.
*
* @publicApi
*/
Expand Down Expand Up @@ -102,12 +102,12 @@ export interface DeclarationError {
* Information about the component declarations.
*
* 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
* declared in a module. These error should be reported on the declaration, not the
* template.
*
* A host type; see `LanguageSeriviceHost`.
* A host type; see `LanguageServiceHost`.
*
* @publicApi
*/
Expand Down Expand Up @@ -137,16 +137,15 @@ export interface Declaration {
/**
* A sequence of declarations.
*
* A host type; see `LanguageSeriviceHost`.
* A host type; see `LanguageServiceHost`.
*
* @publicApi
*/
export type Declarations = Declaration[];

/**
* The host for a `LanguageService`. This provides all the `LanguageService` requires to respond
* to
* the `LanguageService` requests.
* to the `LanguageService` requests.
*
* This interface describes the requirements of the `LanguageService` on its host.
*
Expand Down Expand Up @@ -186,8 +185,7 @@ export interface LanguageServiceHost {

/**
* Return the template source information for all templates in `fileName` or for `fileName` if
* it
* is a template file.
* it is a template file.
*/
getTemplates(fileName: string): TemplateSources;

Expand Down Expand Up @@ -216,7 +214,7 @@ export interface LanguageServiceHost {
*/
export interface Completion {
/**
* The kind of comletion.
* The kind of completion.
*/
kind: DeclarationKind;

Expand Down Expand Up @@ -353,7 +351,7 @@ export interface Hover {
* beginning of the file reference by `fileName`.
*
* 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
* defined by SemVer.
*
Expand Down
6 changes: 2 additions & 4 deletions packages/language-service/src/typescript_host.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* 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 {ViewEncapsulation, ɵConsole as Console} from '@angular/core';
import * as fs from 'fs';
Expand All @@ -15,9 +15,7 @@ import * as ts from 'typescript';

import {createLanguageService} from './language_service';
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 {isTypescriptVersion} from './utils';

import {Declaration, DeclarationError, Declarations, DiagnosticMessageChain, LanguageService, LanguageServiceHost, Span, Symbol, SymbolQuery, TemplateSource, TemplateSources} from './types';


/**
Expand Down
2 changes: 1 addition & 1 deletion packages/language-service/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* 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 * as ts from 'typescript';

Expand Down

0 comments on commit 2d15566

Please sign in to comment.