add types for window.confirmationDialog

pull/1317/head
Audric Ackermann 5 years ago
parent 94bd47fb8c
commit f420559f3f
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

14
background.d.ts vendored

@ -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;
}

3
ts/window.d.ts vendored

@ -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;

Loading…
Cancel
Save