openmrs-esm-core

O3 Framework / getContext

Function: getContext()

getContext<T>(namespace): Readonly<T> | null

Defined in: packages/framework/esm-context/src/context.ts:64

Returns an immutable version of the state of the namespace as it is currently

Type Parameters

T

T extends object = object

The type of the value stored in the namespace

Parameters

namespace

string

The namespace to load properties from

Returns

Readonly<T> | null

The immutable state of the namespace, or null if the namespace is not registered.