This repository was archived by the owner on Aug 14, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +28
-32
lines changed Expand file tree Collapse file tree 4 files changed +28
-32
lines changed Original file line number Diff line number Diff line change @@ -37,8 +37,6 @@ npm exec tsc-multi
3737# when building .mjs
3838node scripts/utils/fix-index-exports.cjs
3939cp tsconfig.dist-src.json dist/src/tsconfig.json
40- cp src/internal/shim-types.d.ts dist/internal/shim-types.d.ts
41- cp src/internal/shim-types.d.ts dist/internal/shim-types.d.mts
4240
4341node scripts/utils/postprocess-files.cjs
4442
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+ /**
4+ * Shims for types that we can't always rely on being available globally.
5+ *
6+ * Note: these only exist at the type-level, there is no corresponding runtime
7+ * version for any of these symbols.
8+ */
9+
10+ type NeverToAny < T > = T extends never ? any : T ;
11+
12+ /** @ts -ignore */
13+ type _DOMReadableStream < R = any > = globalThis . ReadableStream < R > ;
14+
15+ /** @ts -ignore */
16+ type _NodeReadableStream < R = any > = import ( 'stream/web' ) . ReadableStream < R > ;
17+
18+ type _ConditionalNodeReadableStream < R = any > =
19+ typeof globalThis extends { ReadableStream : any } ? never : _NodeReadableStream < R > ;
20+
21+ type _ReadableStream < R = any > = NeverToAny <
22+ | ( [ 0 ] extends [ 1 & _DOMReadableStream < R > ] ? never : _DOMReadableStream < R > )
23+ | ( [ 0 ] extends [ 1 & _ConditionalNodeReadableStream < R > ] ? never : _ConditionalNodeReadableStream < R > )
24+ > ;
25+
26+ export type { _ReadableStream as ReadableStream } ;
Original file line number Diff line number Diff line change 77 * messages in cases where an environment isn't fully supported.
88 */
99
10- import { type Fetch } from './builtin-types' ;
11- import { type ReadableStream } from './shim-types' ;
10+ import type { Fetch } from './builtin-types' ;
11+ import type { ReadableStream } from './shim-types' ;
1212
1313export function getDefaultFetch ( ) : Fetch {
1414 if ( typeof fetch !== 'undefined' ) {
You can’t perform that action at this time.
0 commit comments