Interface: ConfigStore<C>
Defined in: config/types.ts:139
Merges the configuration layers and saves the difference.
Type Parameters
| Type Parameter |
|---|
C |
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
ready | readonly | Promise<void> | Resolves after all providers settle. It never rejects. | config/types.ts:141 |
sections | readonly | readonly Section<string, Schema>[] | The sections, with the theme section first. | config/types.ts:143 |
Methods
destroy()
destroy(): void;Defined in: config/types.ts:159
Stops all requests and removes all listeners.
Returns
void
export()
export(): ConfigDocument;Defined in: config/types.ts:153
Gives the merged configuration of all sections as a document.
Returns
get()
get(): C;Defined in: config/types.ts:145
Gives the merged configuration of the known sections.
Returns
C
import()
import(document): void;Defined in: config/types.ts:155
Puts a document in the runtime layer.
Parameters
| Parameter | Type |
|---|---|
document | unknown |
Returns
void
reset()
reset(): void;Defined in: config/types.ts:149
Removes the runtime layer and the difference of the target provider.
Returns
void
save()
save(options?): Promise<void>;Defined in: config/types.ts:151
Saves the difference to the target provider.
Parameters
| Parameter | Type |
|---|---|
options? | SaveOptions |
Returns
Promise<void>
set()
set(patch): void;Defined in: config/types.ts:147
Changes the runtime layer.
Parameters
| Parameter | Type |
|---|---|
patch | ConfigPatch<C> |
Returns
void
subscribe()
subscribe(listener): () => void;Defined in: config/types.ts:157
Adds a listener for changes of the merged configuration.
Parameters
| Parameter | Type |
|---|---|
listener | (next, previous) => void |
Returns
() => void