diff --git a/packages/taro/types/api/storage/index.d.ts b/packages/taro/types/api/storage/index.d.ts index e1d8084f0b83..0d951e22a5f0 100644 --- a/packages/taro/types/api/storage/index.d.ts +++ b/packages/taro/types/api/storage/index.d.ts @@ -106,19 +106,6 @@ declare module '../../index' { } } - namespace batchSetStorageSync { - interface Option { - /** [{ key, value }] */ - kvList: kv[] - } - interface kv { - /** key 本地缓存中指定的 key */ - key: string - /** data 需要存储的内容。只支持原生类型、Date、及能够通过JSON.stringify序列化的对象。*/ - value: any - } - } - namespace batchSetStorage { interface Option { /** [{ key, value }] */ @@ -348,7 +335,12 @@ declare module '../../index' { * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/api/storage/wx.batchGetStorageSync.html */ - batchSetStorageSync(option: batchSetStorageSync.Option): void + batchSetStorageSync(option: { + /** key 本地缓存中指定的 key */ + key: string + /** data 需要存储的内容。只支持原生类型、Date、及能够通过JSON.stringify序列化的对象。*/ + value: any + }[]): void /** 将数据批量存储在本地缓存中指定的 key 中。会覆盖掉原来该 key 对应的内容。 * 除非用户主动删除或因存储空间原因被系统清理,否则数据都一直可用。