Skip to content

Commit

Permalink
fix(spy) Fix: vi.spyOn() Compatibility with Google APIs (#3141) (#3670)
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxim-Mazurok committed Nov 24, 2023
1 parent 16033e0 commit edb0d28
Show file tree
Hide file tree
Showing 4 changed files with 556 additions and 871 deletions.
6 changes: 3 additions & 3 deletions packages/spy/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ export interface MockContext<TArgs, TReturns> {

type Procedure = (...args: any[]) => any

type Methods<T> = {
[K in keyof T]: T[K] extends Procedure ? K : never
}[keyof T] & (string | symbol)
type Methods<T> = keyof {
[K in keyof T as T[K] extends Procedure ? K : never]: T[K];
}
type Properties<T> = {
[K in keyof T]: T[K] extends Procedure ? never : K
}[keyof T] & (string | symbol)
Expand Down

0 comments on commit edb0d28

Please sign in to comment.