fix(compiler): no longer uses assetCacheKey for token identity.

Fixes #10545, Fixes #10538
This commit is contained in:
Chuck Jazdzewski
2016-08-24 17:39:49 -07:00
committed by Victor Berchet
parent c377e80670
commit 51877ef4ed
27 changed files with 588 additions and 373 deletions

View File

@ -21,4 +21,6 @@ export interface PlatformReflectionCapabilities {
setter(name: string): SetterFn;
method(name: string): MethodFn;
importUri(type: Type<any>): string;
resolveType(name: string, moduleUrl: string): any;
resolveEnum(enumType: any, name: string): any;
}

View File

@ -172,6 +172,9 @@ export class ReflectionCapabilities implements PlatformReflectionCapabilities {
// Runtime type
return `./${stringify(type)}`;
}
resolveType(name: string, moduleUrl: string): any { return null; }
resolveEnum(enumType: any, name: string): any { return null; }
}
function convertTsickleDecoratorIntoMetadata(decoratorInvocations: any[]): any[] {

View File

@ -176,6 +176,13 @@ export class Reflector extends ReflectorReader {
_containsReflectionInfo(typeOrFunc: any) { return this._injectableInfo.has(typeOrFunc); }
importUri(type: any): string { return this.reflectionCapabilities.importUri(type); }
resolveType(name: string, moduleUrl: string): any {
return this.reflectionCapabilities.resolveType(name, moduleUrl);
}
resolveEnum(type: any, name: string): any {
return this.reflectionCapabilities.resolveEnum(type, name);
}
}
function _mergeMaps(target: Map<string, Function>, config: {[key: string]: Function}): void {

View File

@ -15,4 +15,6 @@ export abstract class ReflectorReader {
abstract annotations(typeOrFunc: /*Type*/ any): any[];
abstract propMetadata(typeOrFunc: /*Type*/ any): {[key: string]: any[]};
abstract importUri(typeOrFunc: /*Type*/ any): string;
abstract resolveType(name: string, moduleUrl: string): any;
abstract resolveEnum(type: any, name: string): any;
}