@whatwg-node/node-fetch 0.8.5-alpha-20251204155711-ab148c7b6164e9784b840f1d73f484135e99ab26 → 0.8.5-alpha-20251204164415-00350d4cd2bf8d146d84e8365456cae5354e0d36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cjs/utils.js CHANGED
@@ -96,7 +96,7 @@ function pipeThrough({ src, dest, signal, onError, }) {
96
96
  src.pipe(dest, { end: true /* already default */ });
97
97
  }
98
98
  function endStream(stream) {
99
- // @ts-expect-error Avoid arguments adaptor trampoline https://v8.dev/blog/adaptor-frame
99
+ // Avoid arguments adaptor trampoline https://v8.dev/blog/adaptor-frame
100
100
  return stream.end(null, null, null);
101
101
  }
102
102
  function safeWrite(chunk, stream) {
package/esm/utils.js CHANGED
@@ -81,7 +81,7 @@ export function pipeThrough({ src, dest, signal, onError, }) {
81
81
  src.pipe(dest, { end: true /* already default */ });
82
82
  }
83
83
  export function endStream(stream) {
84
- // @ts-expect-error Avoid arguments adaptor trampoline https://v8.dev/blog/adaptor-frame
84
+ // Avoid arguments adaptor trampoline https://v8.dev/blog/adaptor-frame
85
85
  return stream.end(null, null, null);
86
86
  }
87
87
  export function safeWrite(chunk, stream) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whatwg-node/node-fetch",
3
- "version": "0.8.5-alpha-20251204155711-ab148c7b6164e9784b840f1d73f484135e99ab26",
3
+ "version": "0.8.5-alpha-20251204164415-00350d4cd2bf8d146d84e8365456cae5354e0d36",
4
4
  "description": "Fetch API implementation for Node",
5
5
  "sideEffects": false,
6
6
  "dependencies": {
@@ -14,8 +14,8 @@ export declare function pipeThrough({ src, dest, signal, onError, }: {
14
14
  onError?: ((e: Error) => void) | undefined;
15
15
  }): void;
16
16
  export declare function endStream(stream: {
17
- end: () => void;
17
+ end: (...args: any[]) => void;
18
18
  }): void;
19
- export declare function safeWrite(chunk: any, stream: Writable): Promise<any[]> | undefined;
19
+ export declare function safeWrite<TWritable extends Writable>(chunk: Parameters<TWritable['write']>[0], stream: TWritable): Promise<any[]> | undefined;
20
20
  export declare const DEFAULT_ACCEPT_ENCODING: string;
21
21
  export declare function getSupportedFormats(): PonyfillCompressionFormat[];
@@ -14,8 +14,8 @@ export declare function pipeThrough({ src, dest, signal, onError, }: {
14
14
  onError?: ((e: Error) => void) | undefined;
15
15
  }): void;
16
16
  export declare function endStream(stream: {
17
- end: () => void;
17
+ end: (...args: any[]) => void;
18
18
  }): void;
19
- export declare function safeWrite(chunk: any, stream: Writable): Promise<any[]> | undefined;
19
+ export declare function safeWrite<TWritable extends Writable>(chunk: Parameters<TWritable['write']>[0], stream: TWritable): Promise<any[]> | undefined;
20
20
  export declare const DEFAULT_ACCEPT_ENCODING: string;
21
21
  export declare function getSupportedFormats(): PonyfillCompressionFormat[];