IWindowStorage interface

Methods

containsKey(string)

Returns true or false if the given key is present in the cache.

getItem(string)

Get the item from the window storage object matching the given key.

getKeys()

Get all the keys from the window storage object as an iterable array of strings.

removeItem(string)

Removes the item in the window storage object matching the given key.

setItem(string, T)

Sets the item in the window storage object with the given key.

Method Details

containsKey(string)

Returns true or false if the given key is present in the cache.

function containsKey(key: string): boolean

Parameters

key

string

Returns

boolean

getItem(string)

Get the item from the window storage object matching the given key.

function getItem(key: string): T | null

Parameters

key

string

Returns

T | null

getKeys()

Get all the keys from the window storage object as an iterable array of strings.

function getKeys(): string[]

Returns

string[]

removeItem(string)

Removes the item in the window storage object matching the given key.

function removeItem(key: string)

Parameters

key

string

setItem(string, T)

Sets the item in the window storage object with the given key.

function setItem(key: string, value: T)

Parameters

key

string

value

T