Otherwise TypeScript fails with skipLibCheck: false, exactOptionalPropertyTypes: true and no DOM:
Error: node_modules/ky/distribution/types/options.d.ts(226,18): error TS2430: Interface 'NormalizedOptions' incorrectly extends interface 'RequestInit'.
Types of property 'credentials' are incompatible.
Type 'RequestCredentials | undefined' is not assignable to type 'RequestCredentials'.
Type 'undefined' is not assignable to type 'RequestCredentials'.
Error: node_modules/ky/distribution/types/options.d.ts(16,29): error TS2552: Cannot find name 'HeadersInit'. Did you mean 'KyHeadersInit'?
Error: node_modules/ky/distribution/types/options.d.ts(160,21): error TS2552: Cannot find name 'RequestInfo'. Did you mean 'RequestInit'?
Error: node_modules/ky/distribution/types/options.d.ts(226,18): error TS2430: Interface 'NormalizedOptions' incorrectly extends interface 'RequestInit'.
Types of property 'method' are incompatible.
Type 'string | undefined' is not assignable to type 'string'.
Type 'undefined' is not assignable to type 'string'.
Would add a test, but it doesn't seem like there are any type tests. How do you want to go about this?
Otherwise TypeScript fails with
skipLibCheck: false
,exactOptionalPropertyTypes: true
and noDOM
:Would add a test, but it doesn't seem like there are any type tests. How do you want to go about this?