UNPKG

@nomicfoundation/hardhat-verify

Version:
16 lines 807 B
/** * Dynamically imports a module from a filesystem path. * * Resolves `modulePath` against the current working directory and attempts * to load it via ESM `import()`. Errors are wrapped in `HardhatError` with * specific codes for not found, syntax errors, or other import failures. * * @param modulePath The user-provided path to the module (relative or absolute). * @returns A promise that resolves to the module namespace object. * @throws {HardhatError} * - ERR_MODULE_NOT_FOUND if the module file doesn’t exist * - ERR_MODULE_SYNTAX_ERROR if there’s a parse/syntax error in the module * - ERR_IMPORT_MODULE_FAILED for any other import/runtime error */ export declare function loadModule(modulePath: string): Promise<Record<string, unknown>>; //# sourceMappingURL=module.d.ts.map