PgColumnBuilderBase and notNull()

holy mother of types ... could someone help me out here?
export function ref(id: AnyPgColumn): PgColumnBuilderBase {
return bigint({ mode: 'number' })
.references((): AnyPgColumn => id)
}
export function ref(id: AnyPgColumn): PgColumnBuilderBase {
return bigint({ mode: 'number' })
.references((): AnyPgColumn => id)
}
OK: id: ref(sometable.id) KO: id: ref(sometable.id).notNull() Is there a base type or interface I can use that does include notNull() and friends?
1 Reply
tcurdt
tcurdtOP3mo ago
holy mother of types ... could someone help me out here?
export function ref(id: AnyPgColumn): PgColumnBuilderBase {
return bigint({ mode: 'number' })
.references((): AnyPgColumn => id)
}
export function ref(id: AnyPgColumn): PgColumnBuilderBase {
return bigint({ mode: 'number' })
.references((): AnyPgColumn => id)
}
OK: id: ref(sometable.id) KO: id: ref(sometable.id).notNull() Is there a base type or interface I can use that does include notNull() and friends?
Want results from more Discord servers?
Add your server