refactor: minor type improvements (#7035)

This commit is contained in:
Joshua Chen 2022-03-28 11:15:37 +08:00 committed by GitHub
parent 755b03861c
commit c81d21a641
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 25 deletions

View file

@ -16,6 +16,7 @@
"test": "tsc -p ."
},
"dependencies": {
"@docusaurus/react-loadable": "5.5.2",
"react-loadable": "npm:@docusaurus/react-loadable@5.5.2",
"commander": "^5.1.0",
"history": "^4.9.0",

View file

@ -10,7 +10,7 @@ import type {CustomizeRuleString} from 'webpack-merge/dist/types';
import type {CommanderStatic} from 'commander';
import type {ParsedUrlQueryInput} from 'querystring';
import type Joi from 'joi';
import type {Overwrite, DeepPartial} from 'utility-types';
import type {Overwrite, DeepPartial, DeepRequired} from 'utility-types';
import type {Location} from 'history';
import type Loadable from 'react-loadable';
@ -130,12 +130,7 @@ export type I18nConfig = {
localeConfigs: {[locale: string]: Partial<I18nLocaleConfig>};
};
export type I18n = {
defaultLocale: string;
locales: [string, ...string[]];
currentLocale: string;
localeConfigs: {[locale: string]: I18nLocaleConfig};
};
export type I18n = DeepRequired<I18nConfig> & {currentLocale: string};
export type GlobalData = {[pluginName: string]: {[pluginId: string]: unknown}};