fix(language-service): tolerate errors in decorators (#14634)

Fixes #14631
This commit is contained in:
Chuck Jazdzewski
2017-03-01 13:23:34 -08:00
committed by Igor Minar
parent 7a66a4115b
commit 6bae7378b1
8 changed files with 88 additions and 38 deletions

View File

@ -7,7 +7,7 @@
*/
import {AotCompilerHost, StaticSymbol} from '@angular/compiler';
import {AngularCompilerOptions, MetadataCollector, ModuleMetadata} from '@angular/tsc-wrapped';
import {AngularCompilerOptions, CollectorOptions, MetadataCollector, ModuleMetadata} from '@angular/tsc-wrapped';
import * as fs from 'fs';
import * as path from 'path';
import * as ts from 'typescript';
@ -37,7 +37,7 @@ export class CompilerHost implements AotCompilerHost {
constructor(
protected program: ts.Program, protected options: AngularCompilerOptions,
protected context: CompilerHostContext) {
protected context: CompilerHostContext, collectorOptions?: CollectorOptions) {
// normalize the path so that it never ends with '/'.
this.basePath = path.normalize(path.join(this.options.basePath, '.')).replace(/\\/g, '/');
this.genDir = path.normalize(path.join(this.options.genDir, '.')).replace(/\\/g, '/');