API Reference
@univerjs
@univerjs/ui
classes
Desktoplocalstorageservice

@univerjs/ui v0.4.2Docs


Class: DesktopLocalStorageService

Implements

Constructors

new DesktopLocalStorageService()

new DesktopLocalStorageService(): DesktopLocalStorageService

Returns

DesktopLocalStorageService

Methods

clear()

clear(): Promise<void>

Returns

Promise<void>

Implementation of

ILocalStorageService.clear

Defined in

packages/ui/src/services/local-storage/local-storage.service.ts:33 (opens in a new tab)


getItem()

getItem<T>(key): Promise<null | T>

Type Parameters

Type Parameter
T

Parameters

ParameterType
keystring

Returns

Promise<null | T>

Implementation of

ILocalStorageService.getItem

Defined in

packages/ui/src/services/local-storage/local-storage.service.ts:21 (opens in a new tab)


iterate()

iterate<T, U>(iteratee): Promise<U>

Type Parameters

Type Parameter
T
U

Parameters

ParameterType
iteratee(value, key, iterationNumber) => U

Returns

Promise<U>

Implementation of

ILocalStorageService.iterate

Defined in

packages/ui/src/services/local-storage/local-storage.service.ts:45 (opens in a new tab)


key()

key(index): Promise<null | string>

Parameters

ParameterType
indexnumber

Returns

Promise<null | string>

Implementation of

ILocalStorageService.key

Defined in

packages/ui/src/services/local-storage/local-storage.service.ts:37 (opens in a new tab)


keys()

keys(): Promise<string[]>

Returns

Promise<string[]>

Implementation of

ILocalStorageService.keys

Defined in

packages/ui/src/services/local-storage/local-storage.service.ts:41 (opens in a new tab)


removeItem()

removeItem(key): Promise<void>

Parameters

ParameterType
keystring

Returns

Promise<void>

Implementation of

ILocalStorageService.removeItem

Defined in

packages/ui/src/services/local-storage/local-storage.service.ts:29 (opens in a new tab)


setItem()

setItem<T>(key, value): Promise<T>

Type Parameters

Type Parameter
T

Parameters

ParameterType
keystring
valueT

Returns

Promise<T>

Implementation of

ILocalStorageService.setItem

Defined in

packages/ui/src/services/local-storage/local-storage.service.ts:25 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.