diff --git a/.eslintignore b/.eslintignore index 7e0189b..51340c9 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,4 @@ /test.js /node-* -/lib/events.js \ No newline at end of file +/lib/events.js +/test/additional-modules/my-es-module/index.js \ No newline at end of file diff --git a/index.d.ts b/index.d.ts index 4c5bf30..ceb1c0d 100644 --- a/index.d.ts +++ b/index.d.ts @@ -82,7 +82,7 @@ export interface VMRequire { /** Collection of mock modules (both external or built-in). */ mock?: any; /* An additional lookup function in case a module wasn't found in one of the traditional node lookup paths. */ - resolve?: (moduleName: string, parentDirname: string) => string | { path: string } | undefined; + resolve?: (moduleName: string, parentDirname: string) => string | { path: string, module?: string } | undefined; /** Custom require to require host and built-in modules. */ customRequire?: (id: string) => any; /** Load modules in strict mode. (default: true) */