aboutsummaryrefslogtreecommitdiff
path: root/src/js/private.d.ts
diff options
context:
space:
mode:
authorGravatar dave caruso <me@paperdave.net> 2023-09-22 01:09:55 -0400
committerGravatar GitHub <noreply@github.com> 2023-09-21 22:09:55 -0700
commit25e69c71e70ac8a0a88f9cf15b4057bd7b2a633a (patch)
treeadf1d5e53f27a2f4ca7b2074fbd54e2c67764a74 /src/js/private.d.ts
parent9d5459221ff663b6c0058440167e098886d97cc2 (diff)
downloadbun-25e69c71e70ac8a0a88f9cf15b4057bd7b2a633a.tar.gz
bun-25e69c71e70ac8a0a88f9cf15b4057bd7b2a633a.tar.zst
bun-25e69c71e70ac8a0a88f9cf15b4057bd7b2a633a.zip
Implement module.parent (#5889)bun-v1.0.3
* Make module.parent work * yay * oops * yay
Diffstat (limited to 'src/js/private.d.ts')
-rw-r--r--src/js/private.d.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/js/private.d.ts b/src/js/private.d.ts
index c5b9ab03d..77f4d5536 100644
--- a/src/js/private.d.ts
+++ b/src/js/private.d.ts
@@ -213,3 +213,15 @@ interface BunLazyModules {
/** Assign to this variable in src/js/{bun,node,thirdparty} to act as module.exports */
declare var $exports: any;
+
+interface CommonJSModuleRecord {
+ $require(id: string, mod: any): any;
+ children: CommonJSModuleRecord[];
+ exports: any;
+ id: string;
+ loaded: boolean;
+ parent: undefined;
+ path: string;
+ paths: string[];
+ require: typeof require;
+}