declare module "node:vm" { import { NonSharedBuffer } from "node:buffer"; import { ImportAttributes, ImportPhase } from "node:module"; interface Context extends NodeJS.Dict {} interface BaseOptions { /** * Specifies the filename used in stack traces produced by this script. * @default '' */ filename?: string | undefined; /** * Specifies the line number offset that is displayed in stack traces produced by this script. * @default 0 */ lineOffset?: number | undefined; /** * Specifies the column number offset that is displayed in stack traces produced by this script. * @default 0 */ columnOffset?: number | undefined; } type DynamicModuleLoader = ( specifier: string, referrer: T, importAttributes: ImportAttributes, phase: ImportPhase, ) => Module | Promise; interface ScriptOptions extends BaseOptions { /** * Provides an optional data with V8's code cache data for the supplied source. */ cachedData?: NodeJS.ArrayBufferView | undefined; /** @deprecated in favor of `script.createCachedData()` */ produceCachedData?: boolean | undefined; /** * Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is * part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v25.x/api/vm.html#support-of-dynamic-import-in-compilation-apis). * @experimental */ importModuleDynamically?: | DynamicModuleLoader