MCPcopy
hub / github.com/angular/angular / ɵɵngDeclareClassMetadataAsync

Function ɵɵngDeclareClassMetadataAsync

packages/core/src/render3/jit/partial.ts:69–86  ·  view source on GitHub ↗
(decl: {
  type: Type<any>;
  resolveDeferredDeps: () => Promise<Type<unknown>>[];
  resolveMetadata: (...types: Type<unknown>[]) => {
    decorators: any[];
    ctorParameters: (() => any[]) | null;
    propDecorators: {[field: string]: any} | null;
  };
})

Source from the content-addressed store, hash-verified

67 * @codeGenApi
68 */
69export function ɵɵngDeclareClassMetadataAsync(decl: {
70 type: Type<any>;
71 resolveDeferredDeps: () => Promise<Type<unknown>>[];
72 resolveMetadata: (...types: Type<unknown>[]) => {
73 decorators: any[];
74 ctorParameters: (() => any[]) | null;
75 propDecorators: {[field: string]: any} | null;
76 };
77}): void {
78 setClassMetadataAsync(
79 decl.type,
80 decl.resolveDeferredDeps,
81 (...types: (Type<unknown> | AbstractType<unknown>)[]) => {
82 const meta = decl.resolveMetadata(...(types as Type<unknown>[]));
83 setClassMetadata(decl.type, meta.decorators, meta.ctorParameters, meta.propDecorators);
84 },
85 );
86}
87
88/**
89 * Compiles a partial component declaration object into a full component definition object.

Callers

nothing calls this directly

Calls 2

setClassMetadataAsyncFunction · 0.90
setClassMetadataFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…