BrowserLocalStorage class

使用浏览器本地存储的存储提供程序。

Extends

注解

在用户手动刷新其浏览器 Cookie 和其他站点数据之前,写入存储的任何内容都将保持保留状态。

const { BrowserLocalStorage, UserState } = require('botbuilder');

const userState = new UserState(new BrowserLocalStorage());

构造函数

BrowserLocalStorage()

创建新的 BrowserLocalStorage 实例。

继承的方法

delete(string[])

从存储中删除存储项。

read(string[])

从存储中读取存储项。

write(StoreItems)

将存储项写入存储。

构造函数详细信息

BrowserLocalStorage()

创建新的 BrowserLocalStorage 实例。

new BrowserLocalStorage()

继承的方法详细信息

delete(string[])

从存储中删除存储项。

function delete(keys: string[]): Promise<void>

参数

keys

string[]

要删除的 StoreItems 对象的键。

返回

Promise<void>

表示异步操作的承诺。

继承自MemoryStorage.delete

read(string[])

从存储中读取存储项。

function read(keys: string[]): Promise<StoreItems>

参数

keys

string[]

要读取的 StoreItems 对象的键。

返回

Promise<StoreItems>

读取项。

继承自MemoryStorage.read

write(StoreItems)

将存储项写入存储。

function write(changes: StoreItems): Promise<void>

参数

changes
StoreItems

要写入的 StoreItems ,按键编制索引。

返回

Promise<void>

表示异步操作的承诺。

继承自MemoryStorage.write