File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 1
1
import { Provider , Type } from '@angular/core' ;
2
2
import { CompatibleSpy , SpyObject as BaseSpyObject , installProtoMethods } from '@netbasal/spectator' ;
3
3
4
- export type SpyObject < T > = BaseSpyObject < T > & { [ P in keyof T ] : T [ P ] & jest . Mock < T > } ;
4
+ export type SpyObject < T > = BaseSpyObject < T > & { [ P in keyof T ] : T [ P ] & ( T [ P ] extends ( ... args : any [ ] ) => infer R ? jest . Mock < R > : T [ P ] ) } ;
5
5
6
6
export function createSpyObject < T > ( type : Type < T > , template ?: Partial < Record < keyof T , any > > ) : SpyObject < T > {
7
7
const mock : any = template || { } ;
Original file line number Diff line number Diff line change 27
27
"jquery" : " 3.3.1" ,
28
28
"schematics-utilities" : " ^1.1.1"
29
29
},
30
+ "peerDependencies" : {
31
+ "typescript" : " >= 2.8.0"
32
+ },
30
33
"schematics" : " ./schematics/collection.json"
31
34
}
You can’t perform that action at this time.
0 commit comments