Skip to content

getDynamicModuleFromImportListItem

getDynamicModuleFromImportListItem<T>(item): Promise<ImportListItemModule<T>>

Defined in: utils/framework.ts:22

Retrieves the constructor of the module from the given import list item. If the module is a promise, it waits for it to resolve. If the module is a class, it returns it directly. If the module has a named export specified in the item, it returns that. Otherwise, it returns the default export of the module.

Type Parameters

T = any

Parameters

item

ImportListItem<T>

The import list item to get the module from.

Returns

Promise<ImportListItemModule<T>>

A promise that resolves to the constructor of the module.