Skip to content

GlobalForDetect ​

Minimal globalThis shape used for runtime detection.

Each field is optional — only the present one identifies the runtime. Typed as unknown where we only need truthiness; version fields are typed just enough to distinguish runtimes safely.

  • Import: @kjanat/dreamcli/runtime
  • Export kind: interface
  • Declared in: src/runtime/detect.ts
  • Source link: src/runtime/detect.ts:59

Signatures ​

ts
interface GlobalForDetect {}

Members ​

Properties ​

Bun ​

Present when running on Bun.

ts
Bun?: { version?: string; };

Deno ​

Present when running on Deno.

ts
Deno?: { version?: { deno?: string; }; };

process ​

Present on Node.js (and Bun, which mimics it).

ts
process?: { versions?: { bun?: string; node?: string; }; };

See Also ​

Released under the MIT License.