Skip to content

Commit

Permalink
fix: use expression instead of interface to avoid typescript widening…
Browse files Browse the repository at this point in the history
… type
  • Loading branch information
emyann committed Nov 11, 2019
1 parent 883c2b8 commit 6310583
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export type StrictSchema<Target = any, Source = any> = {
/** `destinationProperty` is the name of the property of the target object you want to produce */
[destinationProperty in keyof Target]:
| ActionString<Source>
| ActionFunction<Target, Source, Target[destinationProperty]>
| { (iteratee: Source, source: Source[], target: Target[destinationProperty]): Target[destinationProperty] }
| ActionAggregator<Source>
| ActionSelector<Source, Target>
| StrictSchema<Target[destinationProperty], Source>;
Expand All @@ -44,7 +44,7 @@ export type Schema<Target = any, Source = any> = {
/** `destinationProperty` is the name of the property of the target object you want to produce */
[destinationProperty in keyof Target]?:
| ActionString<Source>
| ActionFunction<Target, Source, Target[destinationProperty]>
| { (iteratee: Source, source: Source[], target: Target[destinationProperty]): Target[destinationProperty] }
| ActionAggregator<Source>
| ActionSelector<Source, Target>
| Schema<Target[destinationProperty], Source>;
Expand Down

0 comments on commit 6310583

Please sign in to comment.