SystemManager
The SystemManager is a manager for saving systems in the global scope (node, browser).
import { SystemManager } from '@archibald/helpers';
Other managers use SystemManager to store values in the global scope. The framework itself registers the keys events (EventManager) and cache (CacheManager); the System interface is an open index signature (keyof System), so applications can store additional systems under their own keys (e.g. history, store, config).
set
This method sets a system in the global scope.
import { SystemManager } from '@archibald/helpers';
SystemManager.set(PARAMETERS);
Parameters
| Name | Type | Description |
|---|---|---|
| key | Generic, extends keyof System | A unique identifier. |
| value | System[K] (any) | A value to be stored in the global scope. |
get
This method gets a system from the global scope.
import { SystemManager } from '@archibald/helpers';
const value = SystemManager.get(PARAMETERS);
Parameters
| Name | Type | Description |
|---|---|---|
| key | Generic, extends keyof System | A unique identifier. |
clear
This method removes a system from the global scope.
import { SystemManager } from '@archibald/helpers';
SystemManager.clear(PARAMETERS);
Parameters
| Name | Type | Description |
|---|---|---|
| key | Generic, extends keyof System | A unique identifier. |