diff --git a/tools/broccoli/broccoli-typescript.ts b/tools/broccoli/broccoli-typescript.ts index f2528231c0..3c1e9b03e7 100644 --- a/tools/broccoli/broccoli-typescript.ts +++ b/tools/broccoli/broccoli-typescript.ts @@ -93,7 +93,7 @@ class DiffingTSCompiler implements DiffingBroccoliPlugin { this.tsServiceHost = new CustomLanguageServiceHost(this.tsOpts, this.rootFilePaths, this.fileRegistry, this.inputPath); this.tsService = ts.createLanguageService(this.tsServiceHost, ts.createDocumentRegistry()); - this.metadataCollector = new MetadataCollector(this.tsService); + this.metadataCollector = new MetadataCollector(); } diff --git a/tools/metadata/src/collector.ts b/tools/metadata/src/collector.ts index 2b7ccf4edb..6e26619cdb 100644 --- a/tools/metadata/src/collector.ts +++ b/tools/metadata/src/collector.ts @@ -48,7 +48,7 @@ function moduleNameFromBaseName(moduleFileName: string, baseFileName: string): s * Collect decorator metadata from a TypeScript module. */ export class MetadataCollector { - constructor(private service: ts.LanguageService) {} + constructor() {} /** * Returns a JSON.stringify friendly form describing the decorators of the exported classes from @@ -58,7 +58,7 @@ export class MetadataCollector { const locals = new Symbols(); const moduleNameOf = (fileName: string) => moduleNameFromBaseName(fileName, sourceFile.fileName); - const evaluator = new Evaluator(this.service, typeChecker, locals, moduleNameOf); + const evaluator = new Evaluator(typeChecker, locals, moduleNameOf); function objFromDecorator(decoratorNode: ts.Decorator): MetadataSymbolicExpression { return evaluator.evaluateNode(decoratorNode.expression); diff --git a/tools/metadata/src/evaluator.ts b/tools/metadata/src/evaluator.ts index f80c1ce142..d654b95140 100644 --- a/tools/metadata/src/evaluator.ts +++ b/tools/metadata/src/evaluator.ts @@ -63,8 +63,8 @@ function isDefined(obj: any): boolean { * possible. */ export class Evaluator { - constructor(private service: ts.LanguageService, private typeChecker: ts.TypeChecker, - private symbols: Symbols, private moduleNameOf: (fileName: string) => string) {} + constructor(private typeChecker: ts.TypeChecker, private symbols: Symbols, + private moduleNameOf: (fileName: string) => string) {} // TODO: Determine if the first declaration is deterministic. private symbolFileName(symbol: ts.Symbol): string { diff --git a/tools/metadata/test/collector.spec.ts b/tools/metadata/test/collector.spec.ts index 7f964f33d6..652a0ea024 100644 --- a/tools/metadata/test/collector.spec.ts +++ b/tools/metadata/test/collector.spec.ts @@ -18,7 +18,7 @@ describe('Collector', () => { service = ts.createLanguageService(host); program = service.getProgram(); typeChecker = program.getTypeChecker(); - collector = new MetadataCollector(service); + collector = new MetadataCollector(); }); it('should not have errors in test data', () => { expectValidSources(service, program); }); diff --git a/tools/metadata/test/evaluator.spec.ts b/tools/metadata/test/evaluator.spec.ts index accc44667e..f52a03982b 100644 --- a/tools/metadata/test/evaluator.spec.ts +++ b/tools/metadata/test/evaluator.spec.ts @@ -18,7 +18,7 @@ describe('Evaluator', () => { program = service.getProgram(); typeChecker = program.getTypeChecker(); symbols = new Symbols(); - evaluator = new Evaluator(service, typeChecker, symbols, f => f); + evaluator = new Evaluator(typeChecker, symbols, f => f); }); it('should not have typescript errors in test data', () => {