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
37
37
# when building .mjs
38
38
node scripts/utils/fix-index-exports.cjs
39
39
cp 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
42
40
43
41
node scripts/utils/postprocess-files.cjs
44
42
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 7
7
* messages in cases where an environment isn't fully supported.
8
8
*/
9
9
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' ;
12
12
13
13
export function getDefaultFetch ( ) : Fetch {
14
14
if ( typeof fetch !== 'undefined' ) {
You can’t perform that action at this time.
0 commit comments