Refactor: Move data-access code to Typescript w/ shared interface
This commit is contained in:
parent
9ab54b9b83
commit
6b094e1514
35 changed files with 1695 additions and 598 deletions
10
ts/window.d.ts
vendored
10
ts/window.d.ts
vendored
|
@ -12,6 +12,7 @@ declare global {
|
|||
warn: LoggerType;
|
||||
error: LoggerType;
|
||||
};
|
||||
restart: () => void;
|
||||
storage: {
|
||||
put: (key: string, value: any) => void;
|
||||
remove: (key: string) => void;
|
||||
|
@ -25,6 +26,7 @@ declare global {
|
|||
}
|
||||
|
||||
export type ConversationControllerType = {
|
||||
getConversationId: (identifier: string) => string | null;
|
||||
prepareForSend: (
|
||||
id: string,
|
||||
options: Object
|
||||
|
@ -95,4 +97,12 @@ export type WhisperType = {
|
|||
events: {
|
||||
trigger: (name: string, param1: any, param2: any) => void;
|
||||
};
|
||||
Database: {
|
||||
open: () => Promise<IDBDatabase>;
|
||||
handleDOMException: (
|
||||
context: string,
|
||||
error: DOMException | null,
|
||||
reject: Function
|
||||
) => void;
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue