cloudflare/cloudflare-typescript

Public

mirrored fromhttps://github.com/cloudflare/cloudflare-typescriptAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
b9426aec57563b81815d82008272622d2754adf5

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/_shims/bun-runtime.ts

14lines · modecode

1/**
2 * Disclaimer: modules in _shims aren't intended to be imported by SDK users.
3 */
4import { type Shims } from './registry';
5import { getRuntime as getWebRuntime } from './web-runtime';
6import { ReadStream as FsReadStream } from 'node:fs';
7
8export function getRuntime(): Shims {
9 const runtime = getWebRuntime();
10 function isFsReadStream(value: any): value is FsReadStream {
11 return value instanceof FsReadStream;
12 }
13 return { ...runtime, isFsReadStream };
14}
15