Read data from the context using the given key or path. This method will first attempt to retrieve the value from the context's data. If the value is not found in the data, it will then attempt to retrieve it from the context's constants. Nested keys can be accessed using dot notation (e.g., "user.name").
the key to look up in the context.
the value associated with the key, or undefined if the key is not found.
Get all data from the context, excluding any shared data.
an object containing all data in the context.
Check if the context contains data for the given key or path. Nested keys can be accessed using dot notation (e.g., "user.name").
the key to check in the context.
true if the key exists in the context, false otherwise.
Get a constant value from the context using the given key. Nested keys are not allowed.
the key to look up in the constants.
the constant value associated with the key, or undefined if the key is not found.
Check if the context contains a constant for the given key. Nested keys are not allowed.
the key to check in the constants.
true if the constant exists, false otherwise.
Get the root-level keys of the context. This can be useful for determining what data is available in the context and for debugging purposes.
an array of root-level keys in the context.
Get the value kept under a given identifer.
the identifer to look for.
the value kept under that identifer, or undefined if the id was not found.
Keep a value under a given identifier.
the identifier to set,
the value to keep for the identifier.
Delete a single identifier and its value, or entirely delete all values.
Optionalid: stringthe identifier to delete. If not provided, the entire cache will be cleared.
Retrieve metrics for this cache instance. This is mainly a debugging/monitoring method.
a metrics object containing sets, hits, and misses.
Add a created exception to the context
the exception to add to the context.
Set an output value in the context with the given key.
the key to associate with the output value.
the value to set for the given key.
Get an output value from the context using the given key, excluding any shared data. Nested keys can be accessed using dot notation (e.g., "result.value"). If no key is provided, all output data will be returned.
Optionalkey: stringthe key to look up in the outputs.
the output value associated with the key, or undefined if the key is not found.
Get the logger implementation used in this object. This can be used to log messages related to this object, such as during type checking or execution.
the logger associated with this object.
A context implementation internally used by functions (including lambda functions). This isolates changes made while the function is being executed, keeping the parent context clean. It does not cache values or return logs. You should not need to use this class directly.