File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -911,7 +911,7 @@ class ModuleMockerClass {
911911 return metadata ;
912912 }
913913
914- isMockFunction ( fn : any ) : boolean {
914+ isMockFunction < T , Y extends unknown [ ] > ( fn : any ) : fn is Mock < T , Y > {
915915 return ! ! fn && fn . _isMockFunction === true ;
916916 }
917917
@@ -943,7 +943,7 @@ class ModuleMockerClass {
943943 ? SpyInstance < ReturnType < T [ M ] > , ArgsType < T [ M ] > >
944944 : never ;
945945
946- spyOn < T extends { } , M extends keyof T > (
946+ spyOn < T extends { } , M extends NonFunctionPropertyNames < T > > (
947947 object : T ,
948948 methodName : M ,
949949 accessType ?: 'get' | 'set' ,
@@ -985,7 +985,7 @@ class ModuleMockerClass {
985985 return object [ methodName ] ;
986986 }
987987
988- private _spyOnProperty < T extends { } , M extends keyof T > (
988+ private _spyOnProperty < T extends { } , M extends NonFunctionPropertyNames < T > > (
989989 obj : T ,
990990 propertyName : M ,
991991 accessType : 'get' | 'set' = 'get' ,
You can’t perform that action at this time.
0 commit comments