File tree Expand file tree Collapse file tree 4 files changed +9
-13
lines changed Expand file tree Collapse file tree 4 files changed +9
-13
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ const getAllSpies = () => {
3535 return spies ;
3636} ;
3737
38- export class MockProp < T > implements MockProp < T > {
38+ export class MockProp < T > {
3939 private initialPropDescriptor : PropertyDescriptor ;
4040 private initialPropValue : T ;
4141 private object : Obj < T > ;
Original file line number Diff line number Diff line change 11export type Obj < T > = Record < string , T > ;
2-
32// eslint-disable-next-line @typescript-eslint/no-explicit-any
43export type Spyable = Obj < any > ;
5-
64// eslint-disable-next-line @typescript-eslint/no-explicit-any
75export type ValueOf < O > = O extends Record < infer _ , infer T > ? T : any ;
86
@@ -19,3 +17,10 @@ export type SpyOnProp = (
1917 object : Spyable ,
2018 propName : string ,
2119) => MockProp < ValueOf < typeof object > > ;
20+
21+ declare global {
22+ namespace jest {
23+ const isMockProp : IsMockProp ;
24+ const spyOnProp : SpyOnProp ;
25+ }
26+ }
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ const configuration: Configuration = {
4343 stageMessages : null ,
4444 } ) ,
4545 new CopyWebpackPlugin ( {
46- patterns : [ "types" , "globals" ] . map ( ( t ) => ( {
46+ patterns : [ "types" ] . map ( ( t ) => ( {
4747 from : `./src/${ t } .d.ts` ,
4848 to : outputPath ,
4949 } ) ) ,
You can’t perform that action at this time.
0 commit comments