Skip to content

Commit 6310583

Browse files
committed
fix: use expression instead of interface to avoid typescript widening type
1 parent 883c2b8 commit 6310583

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/types.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export type StrictSchema<Target = any, Source = any> = {
3535
/** `destinationProperty` is the name of the property of the target object you want to produce */
3636
[destinationProperty in keyof Target]:
3737
| ActionString<Source>
38-
| ActionFunction<Target, Source, Target[destinationProperty]>
38+
| { (iteratee: Source, source: Source[], target: Target[destinationProperty]): Target[destinationProperty] }
3939
| ActionAggregator<Source>
4040
| ActionSelector<Source, Target>
4141
| StrictSchema<Target[destinationProperty], Source>;
@@ -44,7 +44,7 @@ export type Schema<Target = any, Source = any> = {
4444
/** `destinationProperty` is the name of the property of the target object you want to produce */
4545
[destinationProperty in keyof Target]?:
4646
| ActionString<Source>
47-
| ActionFunction<Target, Source, Target[destinationProperty]>
47+
| { (iteratee: Source, source: Source[], target: Target[destinationProperty]): Target[destinationProperty] }
4848
| ActionAggregator<Source>
4949
| ActionSelector<Source, Target>
5050
| Schema<Target[destinationProperty], Source>;

0 commit comments

Comments
 (0)