-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
Lines 20 to 35 in 03f9802
| sign(input: RequestInfo, init?: (RequestInit & { | |
| aws?: { | |
| accessKeyId?: string | undefined; | |
| secretAccessKey?: string | undefined; | |
| sessionToken?: string | undefined; | |
| service?: string | undefined; | |
| region?: string | undefined; | |
| cache?: Map<string, ArrayBuffer> | undefined; | |
| datetime?: string | undefined; | |
| signQuery?: boolean | undefined; | |
| appendSessionToken?: boolean | undefined; | |
| allHeaders?: boolean | undefined; | |
| singleEncode?: boolean | undefined; | |
| } | undefined; | |
| }) | null | undefined): Promise<Request>; | |
| fetch(input: RequestInfo, init?: (RequestInit & { |
See TypeScripts signature here: https://github.com/microsoft/TypeScript/blob/main/lib/lib.dom.d.ts#L16971
Note the inclusion of the | URL in the input parameter types.
This is causing errors when using code/types that include things like:
type FetchParameters = Parameters<typeof fetch>
...
const [url, init]: FetchParams = ...
const signed = aws.sign(url, { ...init, ...}) // Type error about incompatible types with `URL`Metadata
Metadata
Assignees
Labels
No labels