Skip to content

Commit

Permalink
types: CustomInstanceExtenstions
Browse files Browse the repository at this point in the history
  • Loading branch information
adrai committed Nov 13, 2023
1 parent e8b1207 commit 360fcd4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 23.7.6

- types: CustomInstanceExtenstions

## 23.7.5

- fix types export for TypeScript v4 in combination with react-i18next
Expand Down
6 changes: 5 additions & 1 deletion index.d.mts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ export type * from './typescript/options.js';
export type * from './typescript/t.js';

// tslint:disable-next-line:no-empty-interface
export interface i18n extends i18nextMod.i18n {}
export interface CustomInstanceExtenstions {}

// tslint:disable-next-line:no-empty-interface
export interface i18n extends i18nextMod.i18n, CustomInstanceExtenstions {}

declare const i18next: i18n;
export default i18next;

Expand Down
4 changes: 3 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,9 @@ export interface CloneOptions extends InitOptions {
forkResourceStore?: boolean;
}

export interface i18n {
export interface CustomInstanceExtenstions {}

export interface i18n extends CustomInstanceExtenstions {
// Expose parameterized t in the i18next interface hierarchy
t: TFunction<[DefaultNamespace, ...Exclude<FlatNamespace, DefaultNamespace>[]]>;

Expand Down

0 comments on commit 360fcd4

Please sign in to comment.