Skip to content

Commit

Permalink
fix(expect): fix expect().resolves/rejects chain typings
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Jan 17, 2025
1 parent 56c5018 commit eba6941
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/expect/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -622,9 +622,7 @@ type VitestAssertion<A, T> = {

type Promisify<O> = {
[K in keyof O]: O[K] extends (...args: infer A) => infer R
? O extends R
? Promisify<O[K]>
: (...args: A) => Promise<R>
? Promisify<O[K]> & ((...args: A) => Promise<R>)
: O[K];
}

Expand Down

0 comments on commit eba6941

Please sign in to comment.