TypeScript Utils by Ian Macalinao
    Preparing search index...

    Type Alias PrefixedTablesWithID<DB, TMapping>

    PrefixedTablesWithID: {
        [TTable in PrefixedTableOfDB<DB, TMapping>]: DB[TTable] extends {
            id: string
            | Generated<string>;
            public_id: Generated<PrefixedId<TMapping, TTable>>;
        }
            ? TTable
            : never
    }[PrefixedTableOfDB<DB, TMapping>]

    Union type of all tables that have both a prefixed public_id column and a string id column.

    Type Parameters

    • DB
    • TMapping extends PrefixMapping