I18nDict TS type
parent
7ef234c885
commit
d0a566fc03
|
@ -33,7 +33,7 @@ interface Lichess {
|
|||
studyTour(study: Study): void;
|
||||
studyTourChapter(study: Study): void;
|
||||
|
||||
trans(i18n: { [key: string]: string | undefined }): Trans;
|
||||
trans(i18n: I18nDict): Trans;
|
||||
quantity(n: number): 'zero' | 'one' | 'few' | 'many' | 'other';
|
||||
|
||||
socket: any;
|
||||
|
@ -81,6 +81,8 @@ interface Lichess {
|
|||
keyboardMove?: any;
|
||||
}
|
||||
|
||||
type I18nDict = { [key: string]: string };
|
||||
|
||||
type RedirectTo = string | { url: string; cookie: Cookie };
|
||||
|
||||
type UserComplete = (opts: UserCompleteOpts) => void;
|
||||
|
|
|
@ -115,7 +115,7 @@ export interface AnalyseOpts {
|
|||
relay?: RelayData;
|
||||
$side?: Cash;
|
||||
$underboard?: Cash;
|
||||
i18n: any;
|
||||
i18n: I18nDict;
|
||||
chat: {
|
||||
parseMoves: boolean;
|
||||
instance?: Promise<ChatCtrl>;
|
||||
|
|
|
@ -12,7 +12,7 @@ export interface ChatOpts {
|
|||
public: boolean;
|
||||
permissions: Permissions;
|
||||
timeoutReasons?: ModerationReason[];
|
||||
i18n: { [key: string]: string | undefined };
|
||||
i18n: I18nDict;
|
||||
preset?: string;
|
||||
noteId?: string;
|
||||
noteText?: string;
|
||||
|
|
|
@ -19,7 +19,7 @@ export interface DasherData {
|
|||
piece: PieceData;
|
||||
coach: boolean;
|
||||
streamer: boolean;
|
||||
i18n: any;
|
||||
i18n: I18nDict;
|
||||
}
|
||||
|
||||
export type Mode = 'links' | 'langs' | 'sound' | 'background' | 'board' | 'theme' | 'piece';
|
||||
|
|
|
@ -25,7 +25,7 @@ export interface EditorConfig {
|
|||
};
|
||||
embed: boolean;
|
||||
positions?: OpeningPosition[];
|
||||
i18n: any;
|
||||
i18n: I18nDict;
|
||||
}
|
||||
|
||||
export interface EditorOptions {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
export interface MsgOpts {
|
||||
data: MsgData;
|
||||
i18n: any;
|
||||
i18n: I18nDict;
|
||||
}
|
||||
export interface MsgData {
|
||||
me: Me;
|
||||
|
|
|
@ -13,7 +13,7 @@ export interface NotifyOpts {
|
|||
export interface NotifyData {
|
||||
pager: Paginator<Notification>;
|
||||
unread: number;
|
||||
i18n: any;
|
||||
i18n: I18nDict;
|
||||
}
|
||||
|
||||
interface NotificationUser {
|
||||
|
|
|
@ -94,7 +94,7 @@ export interface Vm {
|
|||
export interface PuzzleOpts {
|
||||
pref: PuzzlePrefs;
|
||||
data: PuzzleData;
|
||||
i18n: { [key: string]: string | undefined };
|
||||
i18n: I18nDict;
|
||||
difficulty?: PuzzleDifficulty;
|
||||
themes?: {
|
||||
dynamic: string;
|
||||
|
|
|
@ -8,7 +8,7 @@ export type WithGround = <A>(f: (g: CgApi) => A) => A | false;
|
|||
export interface RacerOpts {
|
||||
data: RacerData;
|
||||
pref: RacerPrefs;
|
||||
i18n: any;
|
||||
i18n: I18nDict;
|
||||
}
|
||||
|
||||
export interface RacerPrefs extends PuzPrefs {}
|
||||
|
|
|
@ -89,7 +89,7 @@ export interface RoundOpts {
|
|||
onChange(d: RoundData): void;
|
||||
element: HTMLElement;
|
||||
crosstableEl: HTMLElement;
|
||||
i18n: any;
|
||||
i18n: I18nDict;
|
||||
chat?: ChatOpts;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ export interface SimulOpts {
|
|||
$side: Cash;
|
||||
socketVersion: number;
|
||||
chat: any;
|
||||
i18n: any;
|
||||
i18n: I18nDict;
|
||||
socketSend: SocketSend;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import { Config, PuzPrefs, Puzzle } from 'puz/interfaces';
|
|||
export interface StormOpts {
|
||||
data: StormData;
|
||||
pref: StormPrefs;
|
||||
i18n: any;
|
||||
i18n: I18nDict;
|
||||
}
|
||||
|
||||
export interface StormPrefs extends PuzPrefs {}
|
||||
|
|
|
@ -12,7 +12,7 @@ export interface SwissOpts {
|
|||
$side: Cash;
|
||||
socketSend: SocketSend;
|
||||
chat: any;
|
||||
i18n: any;
|
||||
i18n: I18nDict;
|
||||
classes: string | null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue