Skip to content

Commit 62cd753

Browse files
committed
accept null or undefined for logical type alias
1 parent 7bf4079 commit 62cd753

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api/src/DuckDBLogicalType.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ export class DuckDBLogicalType {
145145
public get alias(): string | undefined {
146146
return duckdb.logical_type_get_alias(this.logical_type) || undefined;
147147
}
148-
public set alias(newAlias: string) {
149-
duckdb.logical_type_set_alias(this.logical_type, newAlias);
148+
public set alias(newAlias: string | null | undefined) {
149+
duckdb.logical_type_set_alias(this.logical_type, newAlias || '');
150150
}
151151
public asType(): DuckDBType {
152152
const alias = this.alias;

0 commit comments

Comments
 (0)