Skip to content

Commit

Permalink
Fix baseColumn type on Column
Browse files Browse the repository at this point in the history
Fixes #983, #992
  • Loading branch information
dankochetov committed Aug 7, 2023
1 parent f1c6b48 commit c091982
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drizzle-orm/src/alias.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { SQL, sql } from './sql';
import { Table } from './table';
import { type View, ViewBaseConfig } from './view';

export class ColumnAliasProxyHandler<TColumn extends AnyColumn> implements ProxyHandler<TColumn> {
export class ColumnAliasProxyHandler<TColumn extends Column> implements ProxyHandler<TColumn> {
static readonly [entityKind]: string = 'ColumnAliasProxyHandler';

constructor(private table: Table | View) {}
Expand Down
2 changes: 1 addition & 1 deletion drizzle-orm/src/column.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export type ColumnTypeConfig<T extends ColumnBaseConfig<ColumnDataType, string>,
notNull: T['notNull'];
hasDefault: T['hasDefault'];
enumValues: T['enumValues'];
baseColumn: T extends { baseColumn: infer U } ? U : never;
baseColumn: T extends { baseColumn: infer U } ? U : unknown;
} & TTypeConfig;

export type ColumnRuntimeConfig<TData, TRuntimeConfig extends object> = ColumnBuilderRuntimeConfig<
Expand Down
2 changes: 1 addition & 1 deletion drizzle-orm/src/relations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export type DBQueryConfig<
export interface TableRelationalConfig {
tsName: string;
dbName: string;
columns: Record<string, AnyColumn>;
columns: Record<string, Column>;
relations: Record<string, Relation>;
primaryKey: AnyColumn[];
}
Expand Down

0 comments on commit c091982

Please sign in to comment.