Fix i18n type checking

This commit is contained in:
schroda
2024-05-23 01:21:03 +02:00
parent 43d05df78e
commit 64c1ad6de3
2 changed files with 8 additions and 3 deletions

View File

@@ -7,11 +7,15 @@
*/
import 'i18next';
import { resources } from '@/i18n/translations';
import en from 'public/locales/en.json';
const resources = {
translation: en,
};
declare module 'i18next' {
interface CustomTypeOptions {
returnNull: false;
resources: typeof resources.en;
resources: typeof resources;
}
}

View File

@@ -27,6 +27,7 @@
"jsx": "react-jsx",
/* Linting */
"strict": true,
"strictNullChecks": true,
"noUnusedLocals": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true
@@ -34,7 +35,7 @@
"include": [
"src"
],
"exclude": ["**/node_modules", "**/.*/"],
"exclude": ["**/node_modules"],
"references": [
{
"path": "./tsconfig.node.json"