diff --git a/src/lib/password.ts b/src/lib/password.ts index dd8c64c..4669506 100644 --- a/src/lib/password.ts +++ b/src/lib/password.ts @@ -31,7 +31,7 @@ export async function lock() { } export async function isLocked() { - return await storageManager.get('locked', false) + return await storageManager.get('locked', { defaultValue: false }) } export async function unlock(password: string) { diff --git a/src/lib/storage.ts b/src/lib/storage.ts index 17606f2..9452eec 100644 --- a/src/lib/storage.ts +++ b/src/lib/storage.ts @@ -42,7 +42,7 @@ export async function deleteStorage(key: string): Promise { } type Storage = { - get: (key: string, defaultValue?: any) => Promise + get: (key: string, option?: { defaultValue?: unknown; isParse?: boolean }) => Promise set: (key: string, value: any) => Promise delete: (key: string) => Promise }