fix: types

This commit is contained in:
Mo Bitar
2020-10-06 15:47:16 -05:00
parent fff0ae1313
commit 0d387349d7
5 changed files with 12 additions and 9 deletions

View File

@@ -4,8 +4,8 @@ import template from '%/directives/history-menu.pug';
import { SNItem, ItemHistoryEntry } from 'snjs/dist/@types';
import { PureViewCtrl } from '@/views';
import { ItemSessionHistory } from 'snjs/dist/@types/services/history/session/item_session_history';
import { RemoteHistoryList, RemoteHistoryListEntry } from 'snjs/dist/@types/services/history/history_manager';
import { confirmDialog } from '@/services/alertService';
import { RevisionListEntry, SingleRevision } from 'snjs/dist/@types/services/api/responses';
import { confirmDialog } from '@/services/alertService';
type HistoryState = {
fetchingRemoteHistory: boolean
@@ -23,7 +23,7 @@ class HistoryMenuCtrl extends PureViewCtrl<{}, HistoryState> implements HistoryS
application!: WebApplication
item!: SNItem
sessionHistory?: ItemSessionHistory
remoteHistory?: RemoteHistoryList
remoteHistory?: RevisionListEntry[]
/* @ngInject */
constructor(
@@ -72,7 +72,7 @@ class HistoryMenuCtrl extends PureViewCtrl<{}, HistoryState> implements HistoryS
);
}
async openRemoteRevision(revision: RemoteHistoryListEntry) {
async openRemoteRevision(revision: RevisionListEntry) {
this.fetchingRemoteHistory = true;
const remoteRevision = await this.application.historyManager!.fetchRemoteRevision(this.item.uuid, revision);
this.fetchingRemoteHistory = false;
@@ -169,7 +169,7 @@ class HistoryMenuCtrl extends PureViewCtrl<{}, HistoryState> implements HistoryS
});
}
previewRemoteHistoryTitle(revision: RemoteHistoryListEntry) {
previewRemoteHistoryTitle(revision: SingleRevision) {
const createdAt = revision.created_at!;
return new Date(createdAt).toLocaleString();
}

View File

@@ -10,6 +10,7 @@ export interface Bridge {
onMajorDataChange(): void;
onInitialDataLoad(): void;
onSearch(text?: string): void;
downloadBackup(): void;
}
export declare class BrowserBridge implements Bridge {
environment: Environment;
@@ -21,4 +22,5 @@ export declare class BrowserBridge implements Bridge {
onMajorDataChange(): void;
onInitialDataLoad(): void;
onSearch(): void;
downloadBackup(): void;
}

View File

@@ -21,7 +21,8 @@ declare type WebServices = {
keyboardService: KeyboardManager;
};
export declare class WebApplication extends SNApplication {
private $compile?;
private $compile;
private bridge;
private scope?;
private webServices;
private currentAuthenticationElement?;

4
package-lock.json generated
View File

@@ -10956,8 +10956,8 @@
"from": "github:standardnotes/sncrypto#8794c88daa967eaae493cd5fdec7506d52b257ad"
},
"snjs": {
"version": "github:standardnotes/snjs#3f2136d3c58c04ae2de24b3d0a85cffebcb816f5",
"from": "github:standardnotes/snjs#3f2136d3c58c04ae2de24b3d0a85cffebcb816f5"
"version": "github:standardnotes/snjs#da25bcf251eb0e47eb1ddd26f0488639f10d750a",
"from": "github:standardnotes/snjs#da25bcf251eb0e47eb1ddd26f0488639f10d750a"
},
"sockjs": {
"version": "0.3.20",

View File

@@ -70,6 +70,6 @@
},
"dependencies": {
"sncrypto": "github:standardnotes/sncrypto#8794c88daa967eaae493cd5fdec7506d52b257ad",
"snjs": "github:standardnotes/snjs#3f2136d3c58c04ae2de24b3d0a85cffebcb816f5"
"snjs": "github:standardnotes/snjs#da25bcf251eb0e47eb1ddd26f0488639f10d750a"
}
}