Skip to content

core/context

Documentation

Overview

Classes

Context

get()

Retrieves the value associated with the specified name from the global context.

ts
static get(name: string): any;
ParameterTypeDescription
namestringThe name of the context variable.

Returns

  • Type: any
  • Description: The context value, or `undefined` if the name is not found or the value is null.

set()

Stores a value in the global context under the specified name. If the name already exists, its value is overwritten.

ts
static set(name: string, value: any): void;
ParameterTypeDescription
namestringThe name of the context variable.
valueanyThe value to store.

Returns

  • Type: void
  • Description: