refactor(compiler): module collector is reusable (#12095)

This commit is contained in:
Chuck Jazdzewski
2016-10-06 15:10:44 -07:00
committed by Tobias Bosch
parent 8c975ed156
commit c9b765f5c0
3 changed files with 39 additions and 18 deletions

View File

@ -450,6 +450,9 @@ class MockReflectorHost implements StaticReflectorHost {
provider: 'angular2/src/core/di/provider'
};
}
getCanonicalFileName(fileName: string): string { return fileName; }
getStaticSymbol(declarationFile: string, name: string, members?: string[]): StaticSymbol {
var cacheKey = `${declarationFile}:${name}${members?'.'+members.join('.'):''}`;
var result = this.staticTypeCache.get(cacheKey);