Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
chore: Improve DOM-less type exports
Usage of HeadersInit requires either a node-fetch dependency or to include DOM in tsconfig libs for consumer projects. It is not exported as a global type in @types/node v18 or v20. RequestInit is: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/aaf94a0a6431f52c46dab26182f1156d79720d29/types/node/v18/globals.d.ts#L341 Define headers in interface HTTPResolverOptions<> via RequestInit['headers'] which will make it possible to depend on this project without node-fetch.
  • Loading branch information
mdmower-csnw committed Jun 3, 2024
commit 96f90df6a57e17ffe6bcd6a312c2a6f93a6befe4
2 changes: 1 addition & 1 deletion lib/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export interface HTTPResolverOptions<S extends object = JSONSchema> extends Part
/**
* You can specify any HTTP headers that should be sent when downloading files. For example, some servers may require you to set the `Accept` or `Referrer` header.
*/
headers?: HeadersInit | null;
headers?: RequestInit['headers'] | null;

/**
* The amount of time (in milliseconds) to wait for a response from the server when downloading files. The default is 5 seconds.
Expand Down