Skip to content

Commit

Permalink
enhance: Loosen endpoint.update TS requirements for better 4.7 and be…
Browse files Browse the repository at this point in the history
…low support (#2505)
  • Loading branch information
ntucker committed Mar 21, 2023
1 parent 361d58b commit 3612a25
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/src/controller/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ export type EndpointUpdateFunction<
Updaters extends Record<string, any> = Record<string, any>,
> = (
source: ResultEntry<Source>,
...args: Parameters<Source>
// this is hopeless because typescript doesn't think it should be contravariant
...args: any
) => {
[K in keyof Updaters]: (result: Updaters[K]) => Updaters[K];
};

0 comments on commit 3612a25

Please sign in to comment.