From f150a304e8509f731836da4d6d28db93ad39bb54 Mon Sep 17 00:00:00 2001 From: Ajit Singh Date: Sat, 6 Jun 2020 22:22:04 +0530 Subject: [PATCH] refactor(compiler): remove extra imports (#37246) There are some extra imports in the compiler package. These imports are not used anywhere in the file. So, removed those extra imports PR Close #37246 --- packages/compiler/src/aot/compiler_factory.ts | 4 ++-- packages/compiler/src/aot/lazy_routes.ts | 2 -- packages/compiler/src/config.ts | 3 --- packages/compiler/src/output/ts_emitter.ts | 6 ------ packages/compiler/src/render3/view/t2_binder.ts | 2 +- 5 files changed, 3 insertions(+), 14 deletions(-) diff --git a/packages/compiler/src/aot/compiler_factory.ts b/packages/compiler/src/aot/compiler_factory.ts index 795d2530cf..eeccffff68 100644 --- a/packages/compiler/src/aot/compiler_factory.ts +++ b/packages/compiler/src/aot/compiler_factory.ts @@ -7,7 +7,7 @@ */ import {CompilerConfig} from '../config'; -import {MissingTranslationStrategy, ViewEncapsulation} from '../core'; +import {ViewEncapsulation} from '../core'; import {DirectiveNormalizer} from '../directive_normalizer'; import {DirectiveResolver} from '../directive_resolver'; import {Lexer} from '../expression_parser/lexer'; @@ -32,7 +32,7 @@ import {AotCompiler} from './compiler'; import {AotCompilerHost} from './compiler_host'; import {AotCompilerOptions} from './compiler_options'; import {StaticReflector} from './static_reflector'; -import {StaticSymbol, StaticSymbolCache} from './static_symbol'; +import {StaticSymbolCache} from './static_symbol'; import {StaticSymbolResolver} from './static_symbol_resolver'; import {AotSummaryResolver} from './summary_resolver'; diff --git a/packages/compiler/src/aot/lazy_routes.ts b/packages/compiler/src/aot/lazy_routes.ts index 4b049e41c7..4dba3b4ba9 100644 --- a/packages/compiler/src/aot/lazy_routes.ts +++ b/packages/compiler/src/aot/lazy_routes.ts @@ -8,9 +8,7 @@ import {CompileNgModuleMetadata, tokenReference} from '../compile_metadata'; import {Route} from '../core'; -import {CompileMetadataResolver} from '../metadata_resolver'; -import {AotCompilerHost} from './compiler_host'; import {StaticReflector} from './static_reflector'; import {StaticSymbol} from './static_symbol'; diff --git a/packages/compiler/src/config.ts b/packages/compiler/src/config.ts index 599f95995e..bb651366cd 100644 --- a/packages/compiler/src/config.ts +++ b/packages/compiler/src/config.ts @@ -6,10 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {CompileIdentifierMetadata} from './compile_metadata'; import {MissingTranslationStrategy, ViewEncapsulation} from './core'; -import {Identifiers} from './identifiers'; -import * as o from './output/output_ast'; import {noUndefined} from './util'; export class CompilerConfig { diff --git a/packages/compiler/src/output/ts_emitter.ts b/packages/compiler/src/output/ts_emitter.ts index 180d39b7a9..968e0ea42f 100644 --- a/packages/compiler/src/output/ts_emitter.ts +++ b/packages/compiler/src/output/ts_emitter.ts @@ -6,15 +6,9 @@ * found in the LICENSE file at https://angular.io/license */ - -import {StaticSymbol} from '../aot/static_symbol'; -import {CompileIdentifierMetadata} from '../compile_metadata'; - import {AbstractEmitterVisitor, CATCH_ERROR_VAR, CATCH_STACK_VAR, EmitterVisitorContext, OutputEmitter} from './abstract_emitter'; import * as o from './output_ast'; -const _debugFilePath = '/debug/lib'; - export function debugOutputAstAsTypeScript(ast: o.Statement|o.Expression|o.Type|any[]): string { const converter = new _TsEmitterVisitor(); const ctx = EmitterVisitorContext.createRoot(); diff --git a/packages/compiler/src/render3/view/t2_binder.ts b/packages/compiler/src/render3/view/t2_binder.ts index c0be8cac52..3523072295 100644 --- a/packages/compiler/src/render3/view/t2_binder.ts +++ b/packages/compiler/src/render3/view/t2_binder.ts @@ -7,7 +7,7 @@ */ import {AST, BindingPipe, ImplicitReceiver, MethodCall, PropertyRead, PropertyWrite, RecursiveAstVisitor, SafeMethodCall, SafePropertyRead} from '../../expression_parser/ast'; -import {CssSelector, SelectorMatcher} from '../../selector'; +import {SelectorMatcher} from '../../selector'; import {BoundAttribute, BoundEvent, BoundText, Content, Element, Icu, Node, Reference, Template, Text, TextAttribute, Variable, Visitor} from '../r3_ast'; import {BoundTarget, DirectiveMeta, Target, TargetBinder} from './t2_api';