Skip to content

Commit

Permalink
moar
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Feb 10, 2019
1 parent 47f5522 commit c12feb3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/jest-mock/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ class ModuleMockerClass {
return metadata;
}

isMockFunction(fn: any): boolean {
isMockFunction<T, Y extends unknown[]>(fn: any): fn is Mock<T, Y> {
return !!fn && fn._isMockFunction === true;
}

Expand Down Expand Up @@ -943,7 +943,7 @@ class ModuleMockerClass {
? SpyInstance<ReturnType<T[M]>, ArgsType<T[M]>>
: never;

spyOn<T extends {}, M extends keyof T>(
spyOn<T extends {}, M extends NonFunctionPropertyNames<T>>(
object: T,
methodName: M,
accessType?: 'get' | 'set',
Expand Down Expand Up @@ -985,7 +985,7 @@ class ModuleMockerClass {
return object[methodName];
}

private _spyOnProperty<T extends {}, M extends keyof T>(
private _spyOnProperty<T extends {}, M extends NonFunctionPropertyNames<T>>(
obj: T,
propertyName: M,
accessType: 'get' | 'set' = 'get',
Expand Down

0 comments on commit c12feb3

Please sign in to comment.