Skip to content

Commit

Permalink
fixed types for overload
Browse files Browse the repository at this point in the history
  • Loading branch information
m10rten committed Aug 18, 2024
1 parent acec207 commit 2eb9b8d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/i4n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,11 @@ export class I4n<T extends Record<string, unknown>, L extends keyof T & string>
*/
public t<
P extends Path<T[L], L>,
P2 extends Path<T[L], L>,
V extends Value<T[L], L, P>,
A extends V extends (...args: infer A) => any ? A : never,
R extends V extends (...args: any[]) => any ? ReturnType<V> : V,
>(path: (P | (string & {})) | [P | (string & {})] | [P | (string & {}), string], ...args: A): R;
>(path: (P | (string & {})) | [P | (string & {})] | [P | (string & {}), P2 | (string & {})], ...args: A): R;

/**
* `t` function on the `I4n` class.
Expand Down

0 comments on commit 2eb9b8d

Please sign in to comment.