From acf59e4f09dabfe73a3f04f1dcb8eb8691b2a4f4 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Sat, 22 Jul 2023 18:40:53 +0300 Subject: [PATCH] Types: Fix error on import (#369) TS2306: File '.../node_modules/isolated-vm/isolated-vm.d.ts' is not a module. --- isolated-vm.d.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/isolated-vm.d.ts b/isolated-vm.d.ts index 5aaa5536..1615f8d9 100644 --- a/isolated-vm.d.ts +++ b/isolated-vm.d.ts @@ -1,4 +1,4 @@ -declare module "isolated-vm" { +declare namespace IsolatedVM { export type Transferable = | null | undefined @@ -15,7 +15,7 @@ declare module "isolated-vm" { | Dereference | Module | ((...args: any[]) => any) - | typeof import("isolated-vm"); + | typeof IsolatedVM; /** * This is the main reference to an isolate. Every handle to an isolate is transferable, which @@ -817,3 +817,4 @@ declare module "isolated-vm" { type ApplyArgumentThis = Value extends (this: infer This, ...args: any) => unknown ? This : undefined | null; type ApplyResult = Value extends (...args: any) => infer Result ? Result : unknown; } +export = IsolatedVM;