Skip to content

Commit

Permalink
TODO: consider calling provided args into reference function
Browse files Browse the repository at this point in the history
  • Loading branch information
Logan Powell committed Oct 25, 2023
1 parent cd3b3fd commit e89b727
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ export const modulate = <T extends { [key: string]: (...args: any[]) => any }>(
const refs = flattenPreservingPaths(ref, provider, [], {}, true)

return (...args: [FnParams<T[keyof T]>[0], ...Partial<FnParams<T[keyof T]>>[]]) => {
// TODO: consider just passing the same arguments to the reference function
const obj = { [key]: fn(...args, refs) }
const out = flattenPreservingPaths(obj, provider, [], {}, false)
return [out, refs] as [FnReturn<T[keyof T]>, FnReturn<T[keyof T]>]
Expand Down

0 comments on commit e89b727

Please sign in to comment.