diff --git a/packages/core/src/render3/interfaces/definition.ts b/packages/core/src/render3/interfaces/definition.ts index 0b1f44283b1..d2bc1e7729b 100644 --- a/packages/core/src/render3/interfaces/definition.ts +++ b/packages/core/src/render3/interfaces/definition.ts @@ -403,8 +403,7 @@ export interface ComponentDef extends DirectiveDef { * A function used by the framework to create standalone injectors. */ getStandaloneInjector: - | ((parentInjector: EnvironmentInjector) => EnvironmentInjector | null) - | null; + ((parentInjector: EnvironmentInjector) => EnvironmentInjector | null) | null; /** * A function used by the framework to create the list of external runtime style URLs. diff --git a/packages/core/src/render3/metadata.ts b/packages/core/src/render3/metadata.ts index f29fc0e6b3e..e4375d17cc7 100644 --- a/packages/core/src/render3/metadata.ts +++ b/packages/core/src/render3/metadata.ts @@ -86,7 +86,7 @@ export function setClassMetadataAsync( */ export function setClassMetadata( type: any, - decorators: any[] | null, + decorators: readonly any[] | null, ctorParameters: (() => any[]) | null, propDecorators: {[field: string]: any} | null, ): void { @@ -97,7 +97,7 @@ export function setClassMetadata( if (clazz.hasOwnProperty('decorators') && clazz.decorators !== undefined) { clazz.decorators.push(...decorators); } else { - clazz.decorators = decorators; + clazz.decorators = decorators as any[]; } } if (ctorParameters !== null) {