Typescriptify main.js

This commit is contained in:
Scott Nonnenberg 2021-10-01 11:49:59 -07:00 committed by GitHub
parent e033fd2cf3
commit 9a1430a460
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 721 additions and 524 deletions

View file

@ -3,6 +3,7 @@
import { LocaleMessagesType } from '../types/I18N';
import { LocalizerType } from '../types/Util';
import * as log from '../logging/log';
export function setupI18n(
locale: string,
@ -16,9 +17,6 @@ export function setupI18n(
}
const getMessage: LocalizerType = (key, substitutions) => {
// eslint-disable-next-line no-console
const log = window?.SignalWindow?.log || console;
const entry = messages[key];
if (!entry) {
log.error(