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

    Type Alias SingleKeyEntry<Key, In, Contribution>

    SingleKeyEntry: Entry<{ [K in Key]: Contribution }, In>

    An Entry contributing exactly one key — what defineMiddleware produces.

    SingleKeyEntry<'supabase', {}, SupabaseClient> is the one-key record Entry<{ supabase: SupabaseClient }>, spelled without the braces.

    Use it wherever you name an entry type — most often a wrapper's return type, threading a generic through a middleware, which is the usual reason to write the type out at all:

    function withThing<Database = unknown>(
    config?: WithThingConfig,
    ): SingleKeyEntry<'thing', Record<never, never>, Client<Database>>

    An entry declared this way composes normally, defineComposite included: the mapped type resolves as soon as Key is a literal, which it is at every call site.

    Type Parameters

    • Key extends string
    • In extends object = Record<never, never>
    • Contribution = unknown