Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Selectable

Given a table interface, extracts the select type from all ColumnType types.

Examples

interface PersonTable {
  id: Generated<number>
  first_name: string
  modified_at: ColumnType<Date, string, never>
}

type Person = Selectable<PersonTable>
// {
//   id: number,
//   first_name: string
//   modified_at: Date
// }
type Selectable<R> = DrainOuterGeneric<[K in NonNeverSelectKeys<R>]: SelectType<R[K]>>;

§Type Parameters

§Type

§
DrainOuterGeneric<[K in NonNeverSelectKeys<R>]: SelectType<R[K]>>
[src]