From 5bcff524fdb3106f05b58f248e51fda065195db7 Mon Sep 17 00:00:00 2001 From: markthree <1801982702@qq.com> Date: Sun, 22 Jan 2023 23:00:19 +0800 Subject: [PATCH] chore: more friendly type --- src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index 750325d..73975eb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -11,7 +11,7 @@ interface MemoOptions { file: string } -export async function getMemo (config: Partial): Promise { +export async function getMemo (config: Partial): Promise { const file = getFile(config) // Try to load latest memo @@ -31,10 +31,10 @@ export async function getMemo (config: Partial): Promise { // Ignore } - return _memo + return _memo as T } -export async function setMemo (memo: object, config: Partial): Promise { +export async function setMemo (memo: T, config: Partial): Promise { const file = getFile(config) // Set local memo