Skip to content

Class: ExtensionStore<T>#

Common.Store.ExtensionStore

Type parameters#

Name Type
T extends object

Table of contents#

Constructors#

Properties#

Methods#

Constructors#

constructor#

new ExtensionStore<T>(rawParams)

Type parameters#

Name Type
T extends object

Parameters#

Name Type
rawParams ExtensionStoreParams<T>

Properties#

extension#

Protected Optional extension: LensExtension<LensExtensionDependencies>


persistentStorage#

Protected Optional persistentStorage: PersistentStorage


rawParams#

Protected Readonly rawParams: ExtensionStoreParams<T>

Methods#

cwd#

Protected cwd(): string

Returns#

string


fromStore#

Abstract fromStore(data): void

Parameters#

Name Type
data Partial<T>

Returns#

void


load#

load(): void

Deprecated

Never use this method. Instead call BaseExtensionStore.loadExtension

Returns#

void


loadExtension#

loadExtension(extension): void

Parameters#

Name Type
extension LensExtension<LensExtensionDependencies>

Returns#

void


toJSON#

Abstract toJSON(): T

Returns#

T


createInstance#

Static createInstance<T, R>(this, ...args): T

Deprecated

This is a form of global shared state. Just call new Store(...)

Type parameters#

Name Type
T T
R extends any[]

Parameters#

Name Type
this StaticThis<T, R>
...args R

Returns#

T


getInstance#

Static getInstance<T, R>(this, strict?): T

Deprecated

This is a form of global shared state. Just call new Store(...)

Type parameters#

Name Type
T T
R extends any[]

Parameters#

Name Type
this StaticThis<T, R>
strict? true

Returns#

T

Static getInstance<T, R>(this, strict): undefined | T

Type parameters#

Name Type
T T
R extends any[]

Parameters#

Name Type
this StaticThis<T, R>
strict false

Returns#

undefined | T


resetInstance#

Static resetInstance(): void

Deprecated

This is a form of global shared state. Just call new Store(...)

Returns#

void