@@ -7,7 +7,7 @@ export type KeysEnum<T> = { [P in keyof Required<T>]: true };
77
88export type FinalizedRequestInit = RequestInit & { headers : Headers } ;
99
10- type NotAny < T > = [ unknown ] extends [ T ] ? never : T ;
10+ type NotAny < T > = [ 0 ] extends [ 1 & T ] ? never : T ;
1111
1212/**
1313 * Some environments overload the global fetch function, and Parameters<T> only gets the last signature.
@@ -64,13 +64,15 @@ type OverloadedParameters<T> =
6464 * [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition
6565 */
6666/** @ts -ignore For users with \@types/node */
67- type UndiciTypesRequestInit = NotAny < import ( '../node_modules/undici-types' ) . RequestInit > | NotAny < import ( '../../node_modules/undici-types' ) . RequestInit > | NotAny < import ( '../../../node_modules/undici-types' ) . RequestInit > | NotAny < import ( '../../../../node_modules/undici-types' ) . RequestInit > | NotAny < import ( '../../../../../node_modules/undici-types' ) . RequestInit > | NotAny < import ( '../../../../../../node_modules/undici-types' ) . RequestInit > | NotAny < import ( '../../../../../../../node_modules/undici-types' ) . RequestInit > | NotAny < import ( '../../../../../../../../node_modules/undici-types' ) . RequestInit > | NotAny < import ( '../../../../../../../../../node_modules/undici-types' ) . RequestInit > | NotAny < import ( '../../../../../../../../../../node_modules/undici-types' ) . RequestInit > ;
67+ type UndiciTypesRequestInit = NotAny < import ( '../node_modules/undici-types/index.d.ts ' ) . RequestInit > | NotAny < import ( '../../node_modules/undici-types/index.d.ts ' ) . RequestInit > | NotAny < import ( '../../../node_modules/undici-types/index.d.ts ' ) . RequestInit > | NotAny < import ( '../../../../node_modules/undici-types/index.d.ts ' ) . RequestInit > | NotAny < import ( '../../../../../node_modules/undici-types/index.d.ts ' ) . RequestInit > | NotAny < import ( '../../../../../../node_modules/undici-types/index.d.ts ' ) . RequestInit > | NotAny < import ( '../../../../../../../node_modules/undici-types/index.d.ts ' ) . RequestInit > | NotAny < import ( '../../../../../../../../node_modules/undici-types/index.d.ts ' ) . RequestInit > | NotAny < import ( '../../../../../../../../../node_modules/undici-types/index.d.ts ' ) . RequestInit > | NotAny < import ( '../../../../../../../../../../node_modules/undici-types/index.d.ts ' ) . RequestInit > ;
6868/** @ts -ignore For users with undici */
69- type UndiciRequestInit = NotAny < import ( '../node_modules/undici' ) . RequestInit > | NotAny < import ( '../../node_modules/undici' ) . RequestInit > | NotAny < import ( '../../../node_modules/undici' ) . RequestInit > | NotAny < import ( '../../../../node_modules/undici' ) . RequestInit > | NotAny < import ( '../../../../../node_modules/undici' ) . RequestInit > | NotAny < import ( '../../../../../../node_modules/undici' ) . RequestInit > | NotAny < import ( '../../../../../../../node_modules/undici' ) . RequestInit > | NotAny < import ( '../../../../../../../../node_modules/undici' ) . RequestInit > | NotAny < import ( '../../../../../../../../../node_modules/undici' ) . RequestInit > | NotAny < import ( '../../../../../../../../../../node_modules/undici' ) . RequestInit > ;
69+ type UndiciRequestInit = NotAny < import ( '../node_modules/undici/index.d.ts ' ) . RequestInit > | NotAny < import ( '../../node_modules/undici/index.d.ts ' ) . RequestInit > | NotAny < import ( '../../../node_modules/undici/index.d.ts ' ) . RequestInit > | NotAny < import ( '../../../../node_modules/undici/index.d.ts ' ) . RequestInit > | NotAny < import ( '../../../../../node_modules/undici/index.d.ts ' ) . RequestInit > | NotAny < import ( '../../../../../../node_modules/undici/index.d.ts ' ) . RequestInit > | NotAny < import ( '../../../../../../../node_modules/undici/index.d.ts ' ) . RequestInit > | NotAny < import ( '../../../../../../../../node_modules/undici/index.d.ts ' ) . RequestInit > | NotAny < import ( '../../../../../../../../../node_modules/undici/index.d.ts ' ) . RequestInit > | NotAny < import ( '../../../../../../../../../../node_modules/undici/index.d.ts ' ) . RequestInit > ;
7070/** @ts -ignore For users with \@types/bun */
7171type BunRequestInit = globalThis . FetchRequestInit ;
72- /** @ts -ignore For users with node-fetch */
73- type NodeFetchRequestInit = NotAny < import ( '../node_modules/node-fetch' ) . RequestInit > | NotAny < import ( '../../node_modules/node-fetch' ) . RequestInit > | NotAny < import ( '../../../node_modules/node-fetch' ) . RequestInit > | NotAny < import ( '../../../../node_modules/node-fetch' ) . RequestInit > | NotAny < import ( '../../../../../node_modules/node-fetch' ) . RequestInit > | NotAny < import ( '../../../../../../node_modules/node-fetch' ) . RequestInit > | NotAny < import ( '../../../../../../../node_modules/node-fetch' ) . RequestInit > | NotAny < import ( '../../../../../../../../node_modules/node-fetch' ) . RequestInit > | NotAny < import ( '../../../../../../../../../node_modules/node-fetch' ) . RequestInit > | NotAny < import ( '../../../../../../../../../../node_modules/node-fetch' ) . RequestInit > ;
72+ /** @ts -ignore For users with node-fetch@2 */
73+ type NodeFetch2RequestInit = NotAny < import ( '../node_modules/@types/node-fetch/index.d.ts' ) . RequestInit > | NotAny < import ( '../../node_modules/@types/node-fetch/index.d.ts' ) . RequestInit > | NotAny < import ( '../../../node_modules/@types/node-fetch/index.d.ts' ) . RequestInit > | NotAny < import ( '../../../../node_modules/@types/node-fetch/index.d.ts' ) . RequestInit > | NotAny < import ( '../../../../../node_modules/@types/node-fetch/index.d.ts' ) . RequestInit > | NotAny < import ( '../../../../../../node_modules/@types/node-fetch/index.d.ts' ) . RequestInit > | NotAny < import ( '../../../../../../../node_modules/@types/node-fetch/index.d.ts' ) . RequestInit > | NotAny < import ( '../../../../../../../../node_modules/@types/node-fetch/index.d.ts' ) . RequestInit > | NotAny < import ( '../../../../../../../../../node_modules/@types/node-fetch/index.d.ts' ) . RequestInit > | NotAny < import ( '../../../../../../../../../../node_modules/@types/node-fetch/index.d.ts' ) . RequestInit > ;
74+ /** @ts -ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */
75+ type NodeFetch3RequestInit = NotAny < import ( '../node_modules/node-fetch' ) . RequestInit > | NotAny < import ( '../../node_modules/node-fetch' ) . RequestInit > | NotAny < import ( '../../../node_modules/node-fetch' ) . RequestInit > | NotAny < import ( '../../../../node_modules/node-fetch' ) . RequestInit > | NotAny < import ( '../../../../../node_modules/node-fetch' ) . RequestInit > | NotAny < import ( '../../../../../../node_modules/node-fetch' ) . RequestInit > | NotAny < import ( '../../../../../../../node_modules/node-fetch' ) . RequestInit > | NotAny < import ( '../../../../../../../../node_modules/node-fetch' ) . RequestInit > | NotAny < import ( '../../../../../../../../../node_modules/node-fetch' ) . RequestInit > | NotAny < import ( '../../../../../../../../../../node_modules/node-fetch' ) . RequestInit > ;
7476/** @ts -ignore For users who use Deno */
7577type FetchRequestInit = NonNullable < OverloadedParameters < typeof fetch > [ 1 ] > ;
7678/* eslint-enable */
@@ -79,7 +81,8 @@ type RequestInits =
7981 | NotAny < UndiciTypesRequestInit >
8082 | NotAny < UndiciRequestInit >
8183 | NotAny < BunRequestInit >
82- | NotAny < NodeFetchRequestInit >
84+ | NotAny < NodeFetch2RequestInit >
85+ | NotAny < NodeFetch3RequestInit >
8386 | NotAny < RequestInit >
8487 | NotAny < FetchRequestInit > ;
8588
0 commit comments