feat(compiler): generate shallow imports compiler generated references (#14388)
This commit is contained in:

committed by
Igor Minar

parent
e4e9dbe33d
commit
8b81bb1eb6
@ -20,6 +20,6 @@ export interface PlatformReflectionCapabilities {
|
||||
setter(name: string): SetterFn;
|
||||
method(name: string): MethodFn;
|
||||
importUri(type: Type<any>): string;
|
||||
resolveIdentifier(name: string, moduleUrl: string, runtime: any): any;
|
||||
resolveIdentifier(name: string, moduleUrl: string, members: string[], runtime: any): any;
|
||||
resolveEnum(enumIdentifier: any, name: string): any;
|
||||
}
|
||||
|
@ -227,7 +227,9 @@ export class ReflectionCapabilities implements PlatformReflectionCapabilities {
|
||||
return `./${stringify(type)}`;
|
||||
}
|
||||
|
||||
resolveIdentifier(name: string, moduleUrl: string, runtime: any): any { return runtime; }
|
||||
resolveIdentifier(name: string, moduleUrl: string, members: string[], runtime: any): any {
|
||||
return runtime;
|
||||
}
|
||||
resolveEnum(enumIdentifier: any, name: string): any { return enumIdentifier[name]; }
|
||||
}
|
||||
|
||||
|
@ -49,8 +49,8 @@ export class Reflector extends ReflectorReader {
|
||||
|
||||
importUri(type: any): string { return this.reflectionCapabilities.importUri(type); }
|
||||
|
||||
resolveIdentifier(name: string, moduleUrl: string, runtime: any): any {
|
||||
return this.reflectionCapabilities.resolveIdentifier(name, moduleUrl, runtime);
|
||||
resolveIdentifier(name: string, moduleUrl: string, members: string[], runtime: any): any {
|
||||
return this.reflectionCapabilities.resolveIdentifier(name, moduleUrl, members, runtime);
|
||||
}
|
||||
|
||||
resolveEnum(identifier: any, name: string): any {
|
||||
|
@ -15,6 +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 resolveIdentifier(name: string, moduleUrl: string, runtime: any): any;
|
||||
abstract resolveIdentifier(name: string, moduleUrl: string, members: string[], runtime: any): any;
|
||||
abstract resolveEnum(identifier: any, name: string): any;
|
||||
}
|
||||
|
Reference in New Issue
Block a user