Fix i18n type checking
This commit is contained in:
8
src/i18n/i18next.d.ts
vendored
8
src/i18n/i18next.d.ts
vendored
@@ -7,11 +7,15 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import 'i18next';
|
import 'i18next';
|
||||||
import { resources } from '@/i18n/translations';
|
import en from 'public/locales/en.json';
|
||||||
|
|
||||||
|
const resources = {
|
||||||
|
translation: en,
|
||||||
|
};
|
||||||
|
|
||||||
declare module 'i18next' {
|
declare module 'i18next' {
|
||||||
interface CustomTypeOptions {
|
interface CustomTypeOptions {
|
||||||
returnNull: false;
|
returnNull: false;
|
||||||
resources: typeof resources.en;
|
resources: typeof resources;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
"jsx": "react-jsx",
|
"jsx": "react-jsx",
|
||||||
/* Linting */
|
/* Linting */
|
||||||
"strict": true,
|
"strict": true,
|
||||||
|
"strictNullChecks": true,
|
||||||
"noUnusedLocals": true,
|
"noUnusedLocals": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"noFallthroughCasesInSwitch": true
|
"noFallthroughCasesInSwitch": true
|
||||||
@@ -34,7 +35,7 @@
|
|||||||
"include": [
|
"include": [
|
||||||
"src"
|
"src"
|
||||||
],
|
],
|
||||||
"exclude": ["**/node_modules", "**/.*/"],
|
"exclude": ["**/node_modules"],
|
||||||
"references": [
|
"references": [
|
||||||
{
|
{
|
||||||
"path": "./tsconfig.node.json"
|
"path": "./tsconfig.node.json"
|
||||||
|
|||||||
Reference in New Issue
Block a user