BrowserLocalStorage class

Storage provider that uses browser local storage.

Extends

Remarks

Anything written to the store will remain persisted until the user manually flushes their browsers cookies and other site data.

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

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

Constructors

BrowserLocalStorage()

Creates a new BrowserLocalStorage instance.

Inherited Methods

delete(string[])

Deletes storage items from storage.

read(string[])

Reads storage items from storage.

write(StoreItems)

Writes storage items to storage.

Constructor Details

BrowserLocalStorage()

Creates a new BrowserLocalStorage instance.

new BrowserLocalStorage()

Inherited Method Details

delete(string[])

Deletes storage items from storage.

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

Parameters

keys

string[]

Keys of the StoreItems objects to delete.

Returns

Promise<void>

A promise representing the async operation.

Inherited From MemoryStorage.delete

read(string[])

Reads storage items from storage.

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

Parameters

keys

string[]

Keys of the StoreItems objects to read.

Returns

Promise<StoreItems>

The read items.

Inherited From MemoryStorage.read

write(StoreItems)

Writes storage items to storage.

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

Parameters

changes
StoreItems

The StoreItems to write, indexed by key.

Returns

Promise<void>

A promise representing the async operation.

Inherited From MemoryStorage.write