fix(ivy): proper resolution of Enums in Component decorator (#27971)
Prior to this change Component decorator was resolving `encapsulation` value a bit incorrectly, which resulted in `encapsulation: NaN` in compiled code. Now we resolve the value as Enum memeber and throw if it's not the case. As a part of this update, the `changeDetection` field handling is also added, the resolution logic is the same as the one used for `encapsulation` field. PR Close #27971
This commit is contained in:
@ -64,3 +64,15 @@ export interface SimpleChanges { [propName: string]: any; }
|
||||
|
||||
export type ɵNgModuleDefWithMeta<ModuleT, DeclarationsT, ImportsT, ExportsT> = any;
|
||||
export type ɵDirectiveDefWithMeta<DirT, SelectorT, ExportAsT, InputsT, OutputsT, QueriesT> = any;
|
||||
|
||||
export enum ViewEncapsulation {
|
||||
Emulated = 0,
|
||||
Native = 1,
|
||||
None = 2,
|
||||
ShadowDom = 3
|
||||
}
|
||||
|
||||
export enum ChangeDetectionStrategy {
|
||||
OnPush = 0,
|
||||
Default = 1
|
||||
}
|
Reference in New Issue
Block a user