chore: tsc

This commit is contained in:
Baptiste Grob
2020-11-06 11:15:40 +01:00
parent 142dbbb897
commit bf6be96d33
7 changed files with 30 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
import { ApplicationService } from 'snjs';
export declare class AutolockService extends ApplicationService {
private unsubState;
private unsubState?;
private pollFocusInterval;
private lastFocusState?;
private lockAfterDate?;

View File

@@ -0,0 +1 @@
export declare function startErrorReporting(): void;

View File

@@ -0,0 +1,8 @@
export declare enum StorageKey {
DisableErrorReporting = "DisableErrorReporting"
}
export declare const storage: {
get(key: StorageKey): any;
set(key: StorageKey, value: unknown): void;
remove(key: StorageKey): void;
};

View File

@@ -1,11 +1,13 @@
import { WebApplication } from '@/ui_models/application';
import { ApplicationService, WebPrefKey } from 'snjs';
import { ApplicationService, WebPrefKey, ApplicationEvent } from 'snjs';
export declare class PreferencesManager extends ApplicationService {
private userPreferences;
private loadingPrefs;
private unubscribeStreamItems?;
private needsSingletonReload;
/** @override */
onAppLaunch(): Promise<void>;
onAppEvent(event: ApplicationEvent): Promise<void>;
deinit(): void;
get webApplication(): WebApplication;
streamPreferences(): void;

View File

@@ -14,6 +14,8 @@ export declare const STRING_INVALID_NOTE = "The note you are attempting to save
export declare const STRING_ELLIPSES = "...";
export declare const STRING_GENERIC_SAVE_ERROR = "There was an error saving your note. Please try again.";
export declare const STRING_DELETE_PLACEHOLDER_ATTEMPT = "This note is a placeholder and cannot be deleted. To remove from your list, simply navigate to a different note.";
export declare const STRING_ARCHIVE_LOCKED_ATTEMPT = "This note is locked. If you'd like to archive it, unlock it, and try again.";
export declare const STRING_UNARCHIVE_LOCKED_ATTEMPT = "This note is locked. If you'd like to archive it, unlock it, and try again.";
export declare const STRING_DELETE_LOCKED_ATTEMPT = "This note is locked. If you'd like to delete it, unlock it, and try again.";
export declare function StringDeleteNote(title: string, permanently: boolean): string;
export declare function StringEmptyTrash(count: number): string;

View File

@@ -1,5 +1,5 @@
/// <reference types="angular" />
import { SNTag, SNNote, SNUserPrefs } from 'snjs';
import { SNTag, SNNote, SNUserPrefs, DeinitSource, UuidString } from 'snjs';
import { WebApplication } from '@/ui_models/application';
import { Editor } from '@/ui_models/editor';
export declare enum AppStateEvent {
@@ -18,6 +18,12 @@ export declare enum EventSource {
Script = 2
}
declare type ObserverCallback = (event: AppStateEvent, data?: any) => Promise<void>;
declare class ActionsMenuState {
hiddenExtensions: Record<UuidString, boolean>;
constructor();
toggleExtensionVisibility(uuid: UuidString): void;
deinit(): void;
}
export declare class AppState {
$rootScope: ng.IRootScopeService;
$timeout: ng.ITimeoutService;
@@ -31,8 +37,14 @@ export declare class AppState {
selectedTag?: SNTag;
userPreferences?: SNUserPrefs;
multiEditorEnabled: boolean;
showBetaWarning: boolean;
actionsMenu: ActionsMenuState;
constructor($rootScope: ng.IRootScopeService, $timeout: ng.ITimeoutService, application: WebApplication);
deinit(): void;
deinit(source: DeinitSource): void;
disableBetaWarning(): void;
enableBetaWarning(): void;
clearBetaWarning(): void;
private determineBetaWarningValue;
/**
* Creates a new editor if one doesn't exist. If one does, we'll replace the
* editor's note with an empty one.

View File

@@ -7,7 +7,7 @@ export declare class WebDeviceInterface extends DeviceInterface {
setApplication(application: SNApplication): void;
private databaseForIdentifier;
deinit(): void;
getRawStorageValue(key: string): Promise<string | null>;
getRawStorageValue(key: string): Promise<any>;
getAllRawStorageKeyValues(): Promise<{
key: string;
value: any;