From 4659ce006e33d453fd25639ffb4656ace95f8a90 Mon Sep 17 00:00:00 2001 From: klaviyo-nick Date: Thu, 2 Feb 2023 16:00:51 -0500 Subject: [PATCH] add additional return type for resolve signature --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 25f90fe..4c5bf30 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 | undefined; + resolve?: (moduleName: string, parentDirname: string) => string | { path: string } | undefined; /** Custom require to require host and built-in modules. */ customRequire?: (id: string) => any; /** Load modules in strict mode. (default: true) */