Skip to content

Commit

Permalink
fix: add Promise return type for proxy function (#332)
Browse files Browse the repository at this point in the history
Compiling this project in TypeScript gave the following error:
```
error TS2314: Generic type 'Promise<T>' requires 1 type argument(s).
declare function proxy(proxyParams: ProxyParams): Promise
```
This commit tries to fix this error without being explicit with the return type.
  • Loading branch information
lightningspirit authored Jan 11, 2021
1 parent b4e2135 commit 5b23f3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/proxy.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ interface ProxyParams {
binaryMimeTypes?: string[]
}

declare function proxy(proxyParams: ProxyParams): Promise
declare function proxy(proxyParams: ProxyParams): Promise<any>

export default ProxyParams

0 comments on commit 5b23f3c

Please sign in to comment.