Skip to content

Commit

Permalink
types: remove const from ParseKeys Context type parameter and disable…
Browse files Browse the repository at this point in the history
… `skipLibCheck` (#2169)

* chore(deps-dev): update typescript to v5.4.4

* types: remove const from `ParseKeys` `Context` type parameter and disable `skipLibCheck`
  • Loading branch information
marcalexiei committed Apr 9, 2024
1 parent e8efbf0 commit 2c8d493
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 15 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"rimraf": "5.0.5",
"rollup": "^4.3.0",
"sinon": "17.0.1",
"typescript": "5.1.3",
"typescript": "5.4.4",
"vitest": "1.1.0"
},
"scripts": {
Expand Down
19 changes: 13 additions & 6 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"lib": ["es6", "dom"],
"module": "ES6",
"target": "ES5",
"lib": ["ES6", "DOM"],
"jsx": "react",
"moduleResolution": "node",
"moduleResolution": "Bundler",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noEmit": true,
"baseUrl": ".",
"paths": { "i18next": ["./index.d.mts"] },
"paths": {
"i18next": ["./index.d.mts"]
},
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"skipLibCheck": true

/**
* setting this to `false` to throw an error when d.ts file trow an error
* @see https://github.com/i18next/i18next/issues/2168
*/
"skipLibCheck": false
}
}
2 changes: 1 addition & 1 deletion typescript/t.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export type ParseKeys<
KPrefix = undefined,
Keys extends $Dictionary = KeysByTOptions<TOpt>,
ActualNS extends Namespace = NsByTOptions<Ns, TOpt>,
const Context extends TOpt['context'] = TOpt['context'],
Context extends TOpt['context'] = TOpt['context'],
> = $IsResourcesDefined extends true
? FilterKeysByContext<
| ParseKeysByKeyPrefix<Keys[$FirstNamespace<ActualNS>], KPrefix>
Expand Down

0 comments on commit 2c8d493

Please sign in to comment.