Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions packages/taro/types/api/storage/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }] */
Expand Down Expand Up @@ -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 对应的内容。
* 除非用户主动删除或因存储空间原因被系统清理,否则数据都一直可用。
Expand Down