type DictOf = { [key: string]: T }; type Conditions = DictOf; type ConditionsOf = AllConditions[K]; type LanguageData = DictOf; type Things = { [index: number | string]: number | string | boolean | null } | Array; interface Extension { (things: Things, conditions: Conditions): string; } interface ExtensionOf { (things: Things, conditions: ConditionsOf | string): string; } type Languages = keyof AllConditions; /** * All known possible condition keys, per language × These are what will be used in langauge files * Please add more as you do in extensions */ type AllConditions = { 'en-US': { 'single': string, 'multiple': string, 'nth': string, 'a': string, 'an': string }, 'de-DE': { 'single': string, 'multiple': string }, 'zh-CN': { 'measure': string } }; interface I18nCallable extends I18n { (text: string, things: Things, can_change_things: boolean): string; }