Skip to content

Commit

Permalink
fix: return type of dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
schummar committed Jun 7, 2023
1 parent 73bd32b commit d9f3a6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export interface Translator<D extends FlatDict, Options = GetTranslatorOptions,
>(
id: TMatchingKey extends never ? never : TKey,
...values: TMatchingKey extends never ? never : Values<TString, Options>
): Output extends string ? string | readonly string[] : Output;
): TString extends readonly string[] ? (Output extends string ? readonly string[] : Output) : Output;

/** Format the given template directly. */
format<T extends string>(template: T, ...values: Values<T>): Output;
Expand Down

0 comments on commit d9f3a6b

Please sign in to comment.