O3 Framework / importDynamic
importDynamic<
T>(jsPackage,share,options?):Promise<T>
Defined in: packages/framework/esm-dynamic-loading/src/dynamic-loading.ts:37
Loads the named export from a named package. This might be used like:
const { someComponent } = importDynamic("@openmrs/esm-template-app")
T = any
string
The package to load the export from.
string = './start'
Indicates the name of the shared module; this is an advanced feature if the package you are loading doesn’t use the default OpenMRS shared module name “./start”.
Additional options to control loading this script.
The import map to use to load the script. This is useful for situations where you’re
loading multiple scripts at a time, since it allows the calling code to supply an importMap, saving multiple
calls to getCurrentImportMap().
number
A positive integer representing the maximum number of milliseconds to wait for the script to load before the promise returned from this function will be rejected. Defaults to 600,000 milliseconds, i.e., 10 minutes.
Promise<T>