Skip to main content

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

NameTypeDescription
keyGeneric, extends keyof SystemA unique identifier.
valueSystem[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

NameTypeDescription
keyGeneric, extends keyof SystemA unique identifier.

clear

This method removes a system from the global scope.

import { SystemManager } from '@archibald/helpers';

SystemManager.clear(PARAMETERS);

Parameters

NameTypeDescription
keyGeneric, extends keyof SystemA unique identifier.