diff options
author | 2022-06-22 06:56:16 -0700 | |
---|---|---|
committer | 2022-06-22 06:56:47 -0700 | |
commit | d8dfddffe2e3e08ec2766aa1f355af04ac8fbdc2 (patch) | |
tree | 20d236d1537706d2d9dab2472aad7ac4041f62e4 | |
parent | 8c81fd5fc03500a7217fc0259920c14106eb3776 (diff) | |
download | bun-d8dfddffe2e3e08ec2766aa1f355af04ac8fbdc2.tar.gz bun-d8dfddffe2e3e08ec2766aa1f355af04ac8fbdc2.tar.zst bun-d8dfddffe2e3e08ec2766aa1f355af04ac8fbdc2.zip |
types for `bun:jsc`
-rw-r--r-- | types/bun/jsc.d.ts | 35 | ||||
-rw-r--r-- | types/bun/paths.txt | 3 |
2 files changed, 37 insertions, 1 deletions
diff --git a/types/bun/jsc.d.ts b/types/bun/jsc.d.ts new file mode 100644 index 000000000..a43e87745 --- /dev/null +++ b/types/bun/jsc.d.ts @@ -0,0 +1,35 @@ +declare module "bun:jsc" { + export function describe(value: any): string; + export function describeArray(args: any[]): string; + export function gcAndSweep(): void; + export function fullGC(): void; + export function edenGC(): void; + export function heapSize(): number; + export function heapStats(); + export function memoryUsage(): { + current: number; + peak: number; + currentCommit: number; + peakCommit: number; + pageFaults: number; + }; + export function getRandomSeed(): number; + export function setRandomSeed(value: number): void; + export function isRope(input: string): bool; + export function callerSourceOrigin(): string; + export function noFTL(func: Function): Function; + export function noOSRExitFuzzing(func: Function): Function; + export function optimizeNextInvocation(func: Function): Function; + export function numberOfDFGCompiles(func: Function): number; + export function releaseWeakRefs(): void; + export function totalCompileTime(func: Function): number; + export function reoptimizationRetryCount(func: Function): number; + export function drainMicrotasks(): void; + + /** + * Start a remote debugging socket server on the given port. + * + * This exposes JavaScriptCore's built-in debugging server. + */ + export function startRemoteDebugger(host?: string, port?: number): void; +} diff --git a/types/bun/paths.txt b/types/bun/paths.txt index a0cf439dd..a259da5b5 100644 --- a/types/bun/paths.txt +++ b/types/bun/paths.txt @@ -5,4 +5,5 @@ ./html-rewriter.d.ts ./globals.d.ts ./path.d.ts -./bun-test.d.ts
\ No newline at end of file +./bun-test.d.ts +./jsc.d.ts
\ No newline at end of file |