Class: ExtensionStore<T>#
Type parameters#
| Name | Type |
|---|---|
T |
extends object |
Hierarchy#
BaseStore<T>
↳ ExtensionStore
Table of contents#
Constructors#
Properties#
Methods#
Constructors#
constructor#
• new ExtensionStore<T>(__namedParameters)
Type parameters#
| Name | Type |
|---|---|
T |
extends object |
Parameters#
| Name | Type |
|---|---|
__namedParameters |
ExtensionStoreParams<T> |
Overrides#
BaseStore<T\>.constructor
Properties#
dependencies#
• Protected Readonly dependencies: BaseStoreDependencies
Inherited from#
BaseStore.dependencies
displayName#
• Readonly displayName: string
Inherited from#
BaseStore.displayName
extension#
• Protected Optional extension: LensExtension<LensExtensionDependencies>
params#
• Protected Readonly params: BaseStoreParams<T>
Inherited from#
BaseStore.params
Methods#
cwd#
▸ Protected cwd(): string
Returns#
string
Overrides#
BaseStore.cwd
fromStore#
▸ Protected Abstract fromStore(data): void
fromStore is called internally when a child class syncs with the file system.
Note: This function must be synchronous.
Parameters#
| Name | Type | Description |
|---|---|---|
data |
T |
the parsed information read from the stored JSON file |
Returns#
void
Inherited from#
BaseStore.fromStore
load#
▸ load(): void
Returns#
void
Overrides#
BaseStore.load
loadExtension#
▸ loadExtension(extension): void
Parameters#
| Name | Type |
|---|---|
extension |
LensExtension<LensExtensionDependencies> |
Returns#
void
toJSON#
▸ Abstract toJSON(): T
toJSON is called when syncing the store to the filesystem. It should produce a JSON serializable object representation of the current state.
It is recommended that a round trip is valid. Namely, calling
this.fromStore(this.toJSON()) shouldn't change the state.
Returns#
T
Inherited from#
BaseStore.toJSON
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