vigiles API reference
    Preparing search index...

    Interface InjectHook<N>

    interface InjectHook<N extends readonly NeedSpec[] = readonly ProviderName[]> {
        needs?: N;
        on: string;
        produce: (e: SessionEvent<N>) => Injection;
        role: "inject";
    }

    Type Parameters

    Index

    Properties

    Properties

    needs?: N

    Declared context providers the trusted runtime gathers into e.ctx.

    Injects and reacts could not declare needs at all until state landed, for no reason anyone had recorded — and a fact a hook cannot read is not a feature. needs is now uniform across every role.

    on: string
    produce: (e: SessionEvent<N>) => Injection

    Produces context to add. Its return type (Injection) has no deny — by design.

    role: "inject"