IContext: IReadableContext & {
    add<TValue>(
        token: ContextToken<TValue>,
        value: NoInfer<TValue>,
    ): IContext;
    put<TValue>(token: ContextToken<TValue>, value: NoInfer<TValue>): IContext;
    putDecrement(
        token: ContextToken<number>,
        settings?: PutDecrementSettings,
    ): IContext;
    putIncrement(
        token: ContextToken<number>,
        settings?: PutIncrementSettings,
    ): IContext;
    putPush<TValue>(
        token: ContextToken<TValue[]>,
        ...values: NoInfer<TValue>[],
    ): IContext;
    remove<TValue>(token: ContextToken<TValue>): IContext;
    update<TValue>(
        token: ContextToken<TValue>,
        value: NoInfer<TValue>,
    ): IContext;
    updateDecrement(
        token: ContextToken<number>,
        settings?: DecrementSettings,
    ): IContext;
    updateIncrement(
        token: ContextToken<number>,
        settings?: IncrementSettings,
    ): IContext;
    updatePush<TValue>(
        token: ContextToken<TValue[]>,
        ...values: NoInfer<TValue>[],
    ): IContext;
    when(
        condition: Lazyable<boolean>,
        ...invokables: Invokable<[context: IContext], IContext>[],
    ): IContext;
}

IMPORT_PATH: "@daiso-tech/core/execution-context/contracts"

Read-write contract for managing execution context values.

This contract extends IReadableContext and adds methods for storing, updating, and removing values from the execution context. All methods return IContext to enable method chaining. It supports various operations: basic put/update/remove, numeric increment/decrement, array push, and conditional operations.

Type declaration