Skip to content

core/globals

Documentation

Overview

Classes

Globals

get()

Retrieves the value of the global variable with the specified name.

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

Returns

  • Type: string
  • Description: The variable's value as a string, or `undefined` if the variable is not set or its value is null.

set()

Sets the value of a global variable. If the variable already exists, its value is overwritten.

ts
static set(name: string, value: string): void;
ParameterTypeDescription
namestringThe name of the global variable.
valuestringThe value to set (must be a string).

Returns

  • Type: void
  • Description:

list()

Retrieves a map of all global variables currently defined in the application.

ts
static list(): GlobalsValues;

Returns

  • Type: GlobalsValues
  • Description: A GlobalsValues object containing all global variables as key-value pairs.