feat(ivy): accept multiple values for exportAs in the compiler (#28001)
exportAs in @Directive metadata supports multiple values, separated by commas. Previously it was treated as a single value string. This commit modifies the compiler to understand that exportAs is a string[]. It stops short of carrying the multiple values through to the runtime. Instead, it only emits the first one. A future commit will modify the runtime to accept all the values. PR Close #28001
This commit is contained in:

committed by
Andrew Kushnir

parent
6003145422
commit
142553abc6
@ -60,7 +60,7 @@ export const enum DirectiveDefFlags {ContentQuery = 0b10}
|
||||
export interface PipeType<T> extends Type<T> { ngPipeDef: never; }
|
||||
|
||||
export type DirectiveDefWithMeta<
|
||||
T, Selector extends string, ExportAs extends string, InputMap extends{[key: string]: string},
|
||||
T, Selector extends string, ExportAs extends string[], InputMap extends{[key: string]: string},
|
||||
OutputMap extends{[key: string]: string}, QueryFields extends string[]> = DirectiveDef<T>;
|
||||
|
||||
/**
|
||||
@ -163,7 +163,7 @@ export interface DirectiveDef<T> extends BaseDef<T> {
|
||||
}
|
||||
|
||||
export type ComponentDefWithMeta<
|
||||
T, Selector extends String, ExportAs extends string, InputMap extends{[key: string]: string},
|
||||
T, Selector extends String, ExportAs extends string[], InputMap extends{[key: string]: string},
|
||||
OutputMap extends{[key: string]: string}, QueryFields extends string[]> = ComponentDef<T>;
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user