Type Alias ModuleLoaderObj<M, E>
type ModuleLoaderObj<M, E> = {
filepath: string;
instance: E;
isESM: boolean;
loadpath: string;
module: M;
modulepath: string | URL;
type:
| "import-module"
| "import-path"
| "import-url"
| "require-module"
| "require-path"
| "require-url";
}
filepath: string;
instance: E;
isESM: boolean;
loadpath: string;
module: M;
modulepath: string | URL;
type:
| "import-module"
| "import-path"
| "import-url"
| "require-module"
| "require-path"
| "require-url";
}
Type Parameters
- M
- E
Properties
filepath
filepath: string
If available the file path on Node otherwise this will match loadpath in the
browser.
instance
Either the module itself or any particular export the resolveModule function
selects.
isESM
isESM: boolean
Indicates if the import was an ES Module.
loadpath
loadpath: string
A string representation of the module path being loaded.
module
The direct module import.
modulepath
The initial string or URL sent to ModuleLoader.
type
type:
| "import-module"
| "import-path"
| "import-url"
| "require-module"
| "require-path"
| "require-url"
| "import-module"
| "import-path"
| "import-url"
| "require-module"
| "require-path"
| "require-url"
The type and how the module was loaded.
The object passed back from
ModuleLoader.load.