types for bun:jsc

This commit is contained in:
Jarred Sumner
2022-06-22 06:56:16 -07:00
committed by Jarred Sumner
parent 8c81fd5fc0
commit d8dfddffe2
2 changed files with 37 additions and 1 deletions

35
types/bun/jsc.d.ts vendored Normal file
View File

@@ -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;
}

View File

@@ -5,4 +5,5 @@
./html-rewriter.d.ts
./globals.d.ts
./path.d.ts
./bun-test.d.ts
./bun-test.d.ts
./jsc.d.ts