Skip to content

Commit

Permalink
adding init function to 3rdParty module typings and enforcing type pr…
Browse files Browse the repository at this point in the history
…operty (#1223)
  • Loading branch information
saboya authored and rosskevin committed Mar 25, 2019
1 parent aa4a1e5 commit 5a12f7e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.d.ts
Expand Up @@ -613,7 +613,8 @@ declare namespace i18next {
}

interface ThirdPartyModule {
type?: '3rdParty';
type: '3rdParty';
init(i18n: i18n): void;
}

interface Modules {
Expand Down
1 change: 1 addition & 0 deletions test/typescript/modules.test.ts
Expand Up @@ -29,6 +29,7 @@ const i18nFormatModule = {

const thirdPartyModule = {
type: '3rdParty' as '3rdParty',
init: () => null,
};

const externalModules = [thirdPartyModule];
Expand Down

0 comments on commit 5a12f7e

Please sign in to comment.