fix: TypeScript errors after upgrading SNJS

This commit is contained in:
Baptiste Grob
2021-01-11 17:42:35 +01:00
parent ff85c9c640
commit e1f590f2f0
3 changed files with 30 additions and 32 deletions

View File

@@ -9,8 +9,8 @@ import { Bridge } from './bridge';
type UpdateObserverCallback = (component: SNComponent) => void
type ComponentActivationCallback = (payload: PurePayload) => void
type ComponentActivationObserver = {
id: string,
callback: ComponentActivationCallback
id: string;
callback: ComponentActivationCallback;
}
export class DesktopManager extends ApplicationService {
@@ -19,8 +19,9 @@ export class DesktopManager extends ApplicationService {
$timeout: ng.ITimeoutService
componentActivationObservers: ComponentActivationObserver[] = []
updateObservers: {
callback: UpdateObserverCallback
}[] = []
callback: UpdateObserverCallback;
}[] = [];
isDesktop = isDesktopApplication();
dataLoaded = false
@@ -187,12 +188,11 @@ export class DesktopManager extends ApplicationService {
});
}
desktop_requestBackupFile() {
return this.application!.createBackupFile(
undefined,
undefined,
true
);
async desktop_requestBackupFile() {
const data = this.application!.createBackupFile(EncryptionIntent.FileEncrypted);
if (data) {
return JSON.stringify(data, null, 2);
}
}
desktop_didBeginBackup() {