mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-02 14:21:05 +01:00
Refactor: Move data-access code to Typescript w/ shared interface
This commit is contained in:
11
ts/types/I18N.ts
Normal file
11
ts/types/I18N.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export type LocaleMessagesType = {
|
||||
[key: string]: {
|
||||
message: string;
|
||||
description?: string;
|
||||
};
|
||||
};
|
||||
|
||||
export type LocaleType = {
|
||||
i18n: (key: string, placeholders: Array<string>) => string;
|
||||
messages: LocaleMessagesType;
|
||||
};
|
||||
10
ts/types/Logging.ts
Normal file
10
ts/types/Logging.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
type LogFunction = (...args: Array<any>) => void;
|
||||
|
||||
export type LoggerType = {
|
||||
fatal: LogFunction;
|
||||
error: LogFunction;
|
||||
warn: LogFunction;
|
||||
info: LogFunction;
|
||||
debug: LogFunction;
|
||||
trace: LogFunction;
|
||||
};
|
||||
Reference in New Issue
Block a user