fix(core): Attribute
decorator attributeName
is mandatory (#38131)
`Attribute` decorator has defined `attributeName` as optional but actually its mandatory and compiler throws an error if `attributeName` is undefined. Made `attributeName` mandatory in the `Attribute` decorator to reflect this functionality Fixes #32658 PR Close #38131
This commit is contained in:
@ -22,10 +22,10 @@ export const createInjectionToken = makeMetadataFactory<object>(
|
||||
'InjectionToken', (desc: string) => ({_desc: desc, ɵprov: undefined}));
|
||||
|
||||
export interface Attribute {
|
||||
attributeName?: string;
|
||||
attributeName: string;
|
||||
}
|
||||
export const createAttribute =
|
||||
makeMetadataFactory<Attribute>('Attribute', (attributeName?: string) => ({attributeName}));
|
||||
makeMetadataFactory<Attribute>('Attribute', (attributeName: string) => ({attributeName}));
|
||||
|
||||
export interface Query {
|
||||
descendants: boolean;
|
||||
|
Reference in New Issue
Block a user