( type: Type<unknown>, )
| 30 | * dependencies. Otherwise - this function returns `null`. |
| 31 | */ |
| 32 | export function getAsyncClassMetadataFn( |
| 33 | type: Type<unknown>, |
| 34 | ): (() => Promise<Array<Type<unknown>>>) | null { |
| 35 | const componentClass = type as any; // cast to `any`, so that we can read a monkey-patched field |
| 36 | if (componentClass[ASYNC_COMPONENT_METADATA_FN] === ASYNC_METADATA_LOADED) { |
| 37 | return null; |
| 38 | } |
| 39 | |
| 40 | return componentClass[ASYNC_COMPONENT_METADATA_FN] ?? null; |
| 41 | } |
| 42 | |
| 43 | /** |
| 44 | * Checks if a given component has async metadata. |
no outgoing calls
no test coverage detected
searching dependent graphs…