Skip to content

Commit

Permalink
feat(keyset): allow to narrow the type of keyset keys
Browse files Browse the repository at this point in the history
  • Loading branch information
ValeraS committed May 2, 2023
1 parent 666dd33 commit 706a734
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ export class I18N {
return result;
}

keyset(keysetName: string) {
return (key: string, params?: Params): string => {
keyset<TKey extends string = string>(keysetName: string) {
return (key: TKey, params?: Params): string => {
return this.i18n(keysetName, key, params);
};
}
Expand Down

0 comments on commit 706a734

Please sign in to comment.