Middleware: SingleKeyEntry

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.