Skip to content

Commit

Permalink
Types: Fix error on import (#369)
Browse files Browse the repository at this point in the history
TS2306: File '.../node_modules/isolated-vm/isolated-vm.d.ts' is not a module.
  • Loading branch information
orgads committed Jul 22, 2023
1 parent 5d9b9fe commit acf59e4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions isolated-vm.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
declare module "isolated-vm" {
declare namespace IsolatedVM {
export type Transferable =
| null
| undefined
Expand All @@ -15,7 +15,7 @@ declare module "isolated-vm" {
| Dereference<any>
| 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
Expand Down Expand Up @@ -817,3 +817,4 @@ declare module "isolated-vm" {
type ApplyArgumentThis<Value> = Value extends (this: infer This, ...args: any) => unknown ? This : undefined | null;
type ApplyResult<Value> = Value extends (...args: any) => infer Result ? Result : unknown;
}
export = IsolatedVM;

0 comments on commit acf59e4

Please sign in to comment.