File tree 1 file changed +18
-7
lines changed
1 file changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -65,13 +65,24 @@ function zipObject(props: string[], values: any[]) {
65
65
return { ...prev , [ prop ] : values [ i ] } ;
66
66
} , { } ) ;
67
67
}
68
- export type Many < T > = T | T [ ] ;
69
- export interface Schema {
70
- [ targetProperty : string ] :
71
- | string
72
- | ( ( iteratee : Many < object > , source : Many < object > , target : any ) => any )
73
- | string [ ]
74
- | { path : string | string [ ] ; fn : ( fieldValue : Many < object > , items : Many < object > ) => any } ;
68
+
69
+ type ActionString = string ;
70
+ interface ActionFunction {
71
+ /**
72
+ * A Function invoked per iteration
73
+ *
74
+ * @param {any } iteratee The current element to transform
75
+ * @param {any } source The source input to transform
76
+ * @param {any } target The current element transformed
77
+ *
78
+ */
79
+ ( iteratee : any , source : any | any [ ] , target : any ) : any ;
80
+ }
81
+ type ActionAggregator = string [ ] ;
82
+ type ActionSelector = { path : string | string [ ] ; fn : ( fieldValue : any , items : any [ ] ) => any } ;
83
+
84
+ interface Schema {
85
+ [ targetProperty : string ] : ActionString | ActionFunction | ActionAggregator | ActionSelector ;
75
86
}
76
87
77
88
/**
You can’t perform that action at this time.
0 commit comments