diff --git a/background.d.ts b/background.d.ts new file mode 100644 index 000000000..78d1c6119 --- /dev/null +++ b/background.d.ts @@ -0,0 +1,14 @@ +export interface ConfirmationDialogParams { + title?: string; + message: string; + messageSub?: string; + resolve?: any; + reject?: any; + okText?: string; + okTheme?: string; + closeTheme?: string; + cancelText?: string; + hideCancel?: boolean; + sessionIcon?: SessionIconType; + iconSize?: SessionIconSize; + } diff --git a/ts/window.d.ts b/ts/window.d.ts index e4c1b34a4..52a3f7e59 100644 --- a/ts/window.d.ts +++ b/ts/window.d.ts @@ -11,6 +11,7 @@ import { SwarmPolling } from './session/snode_api/swarmPolling'; import { LibTextsecure } from '../libtextsecure'; import { ConversationType } from '../js/modules/data'; import { RecoveryPhraseUtil } from '../libloki/modules/mnemonic'; +import { ConfirmationDialogParams } from '../background'; /* We declare window stuff here instead of global.d.ts because we are importing other declarations. @@ -38,7 +39,7 @@ declare global { attemptConnection: ConversationType; clearLocalData: any; clipboard: any; - confirmationDialog: any; + confirmationDialog: (params: ConfirmationDialogParams) => any; dcodeIO: any; deleteAccount: any; displayNameRegex: any;