chore: cleaned up window.d.ts

pull/2963/head
Audric Ackermann 2 years ago
parent dbe94f2293
commit e2801915ef

@ -20,14 +20,6 @@ window.getVersion = () => config.version;
window.getCommitHash = () => config.commitHash;
window.getAppInstance = () => config.appInstance;
const { AboutView } = require('./ts/components/AboutView');
window.Signal = {
Components: {
AboutView,
},
};
window.closeAbout = () => ipcRenderer.send('close-about');
require('./ts/util/logging');

@ -237,7 +237,7 @@ window.nodeSetImmediate = setImmediate;
const data = require('./ts/data/dataInit');
const { setupi18n } = require('./ts/util/i18n');
window.Signal = data.initData();
data.initData();
const { ConvoHub } = require('./ts/session/conversations/ConversationController');
window.getConversationController = ConvoHub.use;

17
ts/window.d.ts vendored

@ -3,7 +3,6 @@ import {} from 'styled-components/cssprop';
import { LocalizerType } from './types/Util';
import { ConversationCollection } from './models/conversation';
import { PrimaryColorStateType, ThemeStateType } from './themes/constants/colors';
export interface LibTextsecure {
@ -17,14 +16,11 @@ If you import anything in global.d.ts, the type system won't work correctly.
declare global {
interface Window {
CONSTANTS: any;
Events: any;
Lodash: any;
Session: any;
Whisper: any;
clearLocalData: any;
clipboard: any;
dcodeIO: any;
getSettingValue: (id: string, comparisonValue?: any) => any;
setSettingValue: (id: string, value: any) => Promise<void>;
@ -43,28 +39,25 @@ declare global {
debugOnionRequests: boolean;
};
};
SessionSnodeAPI: SessionSnodeAPI;
onLogin: (pw: string) => Promise<void>;
persistStore?: Persistor;
restart: any;
restart: () => void;
getSeedNodeList: () => Array<string> | undefined;
setPassword: any;
setPassword: (passPhrase: string | null, oldPhrase: string | null) => Promise<void>;
isOnline: boolean;
toggleMediaPermissions: () => Promise<void>;
toggleCallMediaPermissionsTo: (enabled: boolean) => Promise<void>;
getCallMediaPermissions: () => boolean;
toggleMenuBar: () => void;
toggleSpellCheck: any;
toggleSpellCheck: () => void;
primaryColor: PrimaryColorStateType;
theme: ThemeStateType;
setTheme: (newTheme: string) => Promise<void>;
isDev?: () => boolean;
userConfig: any;
versionInfo: any;
getConversations: () => ConversationCollection;
readyForUpdates: () => void;
drawAttention: () => void;
MediaRecorder: any;
platform: string;
openFromNotification: (convoId: string) => void;
@ -91,9 +84,7 @@ declare global {
conversationKey: string;
messageId: string | null;
}) => Promise<void>;
LokiPushNotificationServer: any;
getGlobalOnlineStatus: () => boolean;
confirmationDialog: any;
setStartInTray: (val: boolean) => Promise<void>;
getStartInTray: () => Promise<boolean>;
getOpengroupPruning: () => Promise<boolean>;
@ -104,7 +95,5 @@ declare global {
setAutoUpdateEnabled: (enabled: boolean) => void;
setZoomFactor: (newZoom: number) => void;
updateZoomFactor: () => void;
Signal: any;
}
}

Loading…
Cancel
Save