Skip to content

Commit

Permalink
fix: use never but not unknown for generic function arguments type in…
Browse files Browse the repository at this point in the history
… withReady()
  • Loading branch information
rocwind committed Nov 2, 2021
1 parent a1740e7 commit a060ddd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/withReady.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type Promisify<T> = T extends Promise<unknown> ? T : Promise<T>;
* @param ready promise to wait for
* @returns wrapped function returns, promisified
*/
export function withReady<T extends (...args: unknown[]) => unknown>(
export function withReady<T extends (...args: never[]) => unknown>(
func: T,
ready: Promise<unknown>,
): (...args: Parameters<T>) => Promisify<ReturnType<T>> {
Expand Down

0 comments on commit a060ddd

Please # to comment.