aboutsummaryrefslogtreecommitdiff
path: root/src/js/node/vm.ts
diff options
context:
space:
mode:
authorGravatar dave caruso <me@paperdave.net> 2023-07-12 15:21:55 -0700
committerGravatar GitHub <noreply@github.com> 2023-07-12 15:21:55 -0700
commitae0a724981dd70f457d83f5f134e10dfbc7f72c5 (patch)
treefc094d1176c60a3378dab270264be3352d11ea87 /src/js/node/vm.ts
parent0631f878667d9a5cab80d7c1167eac7cbc1c93c6 (diff)
downloadbun-ae0a724981dd70f457d83f5f134e10dfbc7f72c5.tar.gz
bun-ae0a724981dd70f457d83f5f134e10dfbc7f72c5.tar.zst
bun-ae0a724981dd70f457d83f5f134e10dfbc7f72c5.zip
Improve our internal typedefs (#3608)
* types * some more * yeah * i think that fixes it * oop
Diffstat (limited to 'src/js/node/vm.ts')
-rw-r--r--src/js/node/vm.ts6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/js/node/vm.ts b/src/js/node/vm.ts
index 678ab20b9..331f4fbc6 100644
--- a/src/js/node/vm.ts
+++ b/src/js/node/vm.ts
@@ -1,11 +1,7 @@
// Hardcoded module "node:vm"
import { throwNotImplemented } from "../shared";
-const lazy = globalThis[Symbol.for("Bun.lazy")];
-if (!lazy || typeof lazy !== "function") {
- throw new Error("Something went wrong while loading Bun. Expected 'Bun.lazy' to be defined.");
-}
-const vm = lazy("vm");
+const vm = $lazy("vm");
const { createContext, isContext, Script, runInNewContext, runInThisContext } = vm;