@supabase/middleware - v0.6.0
    Preparing search index...

    Interface Entry<Contributes, In>

    A middleware with its config pre-applied, ready to be passed to pipeline.

    Carries its contributions as a record phantom — key-to-type for every key it puts on ctx — so pipeline can accumulate them onto the handler's ctx with no manual annotation. A middleware authored with defineMiddleware contributes a single key and so has a single-entry record; a composite built with defineComposite carries one entry per part.

    SingleKeyEntry spells the one-key case without the braces.

    __contributes is an optional phantom — it never exists as a value, so it cannot be required — which means any (handler) => handler structurally satisfies any Entry. Annotate a function with a record it does not produce and it compiles, with the keys typed as present and undefined at runtime.

    So the no-over-declaring guarantee belongs to defineComposite, which derives contributions from its parts, not to this type. Build multi-key contributions with that; reach for a bare Entry annotation only to describe a function you did not write, and treat it as an assertion you own.

    interface Entry<
        Contributes extends object,
        In extends object = Record<never, never>,
    > {
        __contributes?: Contributes;
        __in?: In;
        (handler: AnyFetchHandler): AnyFetchHandler;
    }

    Type Parameters

    • Contributes extends object
    • In extends object = Record<never, never>
    • Entry(handler: AnyFetchHandler): AnyFetchHandler

      Parameters

      • handler: AnyFetchHandler

      Returns AnyFetchHandler

    Index
    __contributes?: Contributes
    __in?: In