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 { 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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user