Skip to content

Commit

Permalink
fix(types): add callable type to vi.spyOn (#1432)
Browse files Browse the repository at this point in the history
  • Loading branch information
pikax committed Jun 5, 2022
1 parent ab8f004 commit 17dfd39
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/vitest/src/integrations/spy.ts
Expand Up @@ -37,6 +37,8 @@ type Classes<T> = {
}[keyof T] & (string | symbol)

export interface SpyInstance<TArgs extends any[] = any[], TReturns = any> {
(...args: TArgs): TReturns

getMockName(): string
mockName(n: string): this
mock: SpyContext<TArgs, TReturns>
Expand Down

0 comments on commit 17dfd39

Please sign in to comment.