mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-29 12:27:07 +02:00
lint
This commit is contained in:
+1
-14
@@ -1,6 +1,3 @@
|
||||
import { Engine } from "./engine";
|
||||
import { createStatusText } from "./ui/createStatusText";
|
||||
|
||||
function getDB(): Promise<IDBObjectStore> {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!window.indexedDB) {
|
||||
@@ -24,7 +21,7 @@ function getDB(): Promise<IDBObjectStore> {
|
||||
reject(`Failed to get IDB ${ev}`);
|
||||
};
|
||||
|
||||
indexedDbRequest.onsuccess = function (this: IDBRequest<IDBDatabase>, ev: Event) {
|
||||
indexedDbRequest.onsuccess = function (this: IDBRequest<IDBDatabase>) {
|
||||
const db = this.result;
|
||||
if (!db) {
|
||||
reject("database loadign result was undefined");
|
||||
@@ -35,11 +32,6 @@ function getDB(): Promise<IDBObjectStore> {
|
||||
});
|
||||
}
|
||||
|
||||
interface ILoadCallback {
|
||||
success: (s: string) => void;
|
||||
error?: () => void;
|
||||
}
|
||||
|
||||
export function load(): Promise<string> {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
await getDB()
|
||||
@@ -59,11 +51,6 @@ export function load(): Promise<string> {
|
||||
});
|
||||
}
|
||||
|
||||
interface ISaveCallback {
|
||||
success: () => void;
|
||||
error?: () => void;
|
||||
}
|
||||
|
||||
export function save(saveString: string): Promise<void> {
|
||||
return getDB().then((db) => {
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
|
||||
Reference in New Issue
Block a user