Typescriptify main.js
This commit is contained in:
parent
e033fd2cf3
commit
9a1430a460
22 changed files with 721 additions and 524 deletions
|
@ -32,17 +32,19 @@ function getLocaleMessages(locale: string): LocaleMessagesType {
|
|||
return JSON.parse(readFileSync(targetFile, 'utf-8'));
|
||||
}
|
||||
|
||||
export type LocaleType = {
|
||||
i18n: LocalizerType;
|
||||
name: string;
|
||||
messages: LocaleMessagesType;
|
||||
};
|
||||
|
||||
export function load({
|
||||
appLocale,
|
||||
logger,
|
||||
}: {
|
||||
appLocale: string;
|
||||
logger: LoggerType;
|
||||
}): {
|
||||
i18n: LocalizerType;
|
||||
name: string;
|
||||
messages: LocaleMessagesType;
|
||||
} {
|
||||
}): LocaleType {
|
||||
if (!appLocale) {
|
||||
throw new TypeError('`appLocale` is required');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue