DefinitelyTyped / DefinitelyTyped/DefinitelyTyped
RequestInit - Type '"timeout"' is not assignable to type 'keyof RequestInit'
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 51.4k
- Forks
- 30.4k
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 108
Description
@types/node-fetch version: v2.6.1
RequestInit is found in: node_modules/node-fetch/@types/index.d.ts
@types/make-fetch-happen: v9.0.2
node_modules/@types/make-fetch-happen/index.d.ts:25:9
Full Error:
node_modules/@types/make-fetch-happen/index.d.ts:25:9 - error TS2344: Type '"timeout" | "headers" | "agent" | "method" | "body" | "size" | "follow" | "redirect" | "compress"' does not satisfy the constraint 'keyof RequestInit'.
Type '"timeout"' is not assignable to type 'keyof RequestInit'.
25 'method' | 'body' | 'redirect' | 'follow' | 'timeout' | 'compress' | 'size' | 'headers' | 'agent'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect node_modules/@types/make-fetch-happen/index.d.ts and node_modules/node-fetch/@types/index.d.ts to compare the RequestInit keys involved. Reproduce the TypeScript error and verify that the incompatible keyof RequestInit constraint is resolved without the reported TS2344 error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100