TracingContext interface

An immutable context bag of tracing values for the current operation.

Methods

deleteValue(symbol)

Deletes an object from the context if it exists.

getValue(symbol)

Gets an object from the context if it exists.

setValue(symbol, unknown)

Sets a given object on a context.

Method Details

deleteValue(symbol)

Deletes an object from the context if it exists.

function deleteValue(key: symbol): TracingContext

Parameters

key

symbol

The key of the given context value to delete.

Returns

getValue(symbol)

Gets an object from the context if it exists.

function getValue(key: symbol): unknown

Parameters

key

symbol

The key of the given context value.

Returns

unknown

  • The value of the given context value if it exists, otherwise undefined.

setValue(symbol, unknown)

Sets a given object on a context.

function setValue(key: symbol, value: unknown): TracingContext

Parameters

key

symbol

The key of the given context value.

value

unknown

The value to set on the context.

Returns

  • A new context with the given value set.