@bluelibs/runner - v6.3.1
    Preparing search index...

    Interface IAsyncContextDefinition<T>

    Definition contract for creating an async context.

    This is the object form consumed by defineAsyncContext(...).

    interface IAsyncContextDefinition<T> {
        configSchema?: ValidationSchemaInput<T>;
        id: string;
        meta?: IAsyncContextMeta;
        parse?(data: string): T;
        serialize?(data: T): string;
    }

    Type Parameters

    • T
    Index

    Properties

    configSchema?: ValidationSchemaInput<T>

    When provided, context values will be validated when provide() is called.

    id: string

    Stable context id used for registration, lookup, and serialization envelopes.

    Optional metadata used by docs and tooling.

    Methods

    • Custom serializer for transporting the context across process or network boundaries.

      Parameters

      • data: T

      Returns string