aboutsummaryrefslogtreecommitdiff
path: root/src/js/private.d.ts
diff options
context:
space:
mode:
authorGravatar Dylan Conway <dylan.conway567@gmail.com> 2023-10-17 14:10:25 -0700
committerGravatar Dylan Conway <dylan.conway567@gmail.com> 2023-10-17 14:10:25 -0700
commit7458b969c5d9971e89d187b687e1924e78da427e (patch)
treeee3dbf95c728cf407bf49a27826b541e9264a8bd /src/js/private.d.ts
parentd4a2c29131ec154f5e4db897d4deedab2002cbc4 (diff)
parente91436e5248d947b50f90b4a7402690be8a41f39 (diff)
downloadbun-7458b969c5d9971e89d187b687e1924e78da427e.tar.gz
bun-7458b969c5d9971e89d187b687e1924e78da427e.tar.zst
bun-7458b969c5d9971e89d187b687e1924e78da427e.zip
Merge branch 'main' into postinstall_3
Diffstat (limited to 'src/js/private.d.ts')
-rw-r--r--src/js/private.d.ts30
1 files changed, 13 insertions, 17 deletions
diff --git a/src/js/private.d.ts b/src/js/private.d.ts
index 0e99e2a5b..762449333 100644
--- a/src/js/private.d.ts
+++ b/src/js/private.d.ts
@@ -160,17 +160,6 @@ declare interface Error {
function $lazy<T extends keyof BunLazyModules>(id: T): BunLazyModules[T];
interface BunLazyModules {
- /**
- * Primordials is a dynamic object that contains builtin functions and values.
- *
- * like primordials.isPromise -> $isPromise, etc
- * Also primordials.Bun -> $Bun, etc; untampered globals
- *
- * The implmentation of this is done using createBuiltin('(function (){ return @<name here>; })')
- * Meaning you can crash bun if you try returning something like `getInternalField`
- */
- primordials: any;
-
"bun:jsc": Omit<typeof import("bun:jsc"), "jscDescribe" | "jscDescribeArray"> & {
describe: typeof import("bun:jsc").jscDescribe;
describeArray: typeof import("bun:jsc").jscDescribe;
@@ -204,12 +193,7 @@ interface BunLazyModules {
cleanupLater: () => void;
setAsyncHooksEnabled: (enabled: boolean) => void;
};
- "worker_threads": [
- //
- workerData: any,
- threadId: number,
- _receiveMessageOnPort: (port: MessagePort) => any,
- ];
+ "worker_threads": [workerData: any, threadId: number, _receiveMessageOnPort: (port: MessagePort) => any];
"tty": {
ttySetMode: (fd: number, mode: number) => number;
isatty: (fd: number) => boolean;
@@ -224,3 +208,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;
+}