Skip to content

Commit 8ea32ce

Browse files
committed
add explicit types to avoid literal bigint types in d.ts files
1 parent cb5be3d commit 8ea32ce

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

api/src/DuckDBType.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ export class DuckDBBigIntType extends BaseDuckDBType<DuckDBTypeId.BIGINT> {
6767
public static create(alias?: string): DuckDBBigIntType {
6868
return alias ? new DuckDBBigIntType(alias) : DuckDBBigIntType.instance;
6969
}
70-
public static readonly Max = 2n ** 63n - 1n;
71-
public static readonly Min = -(2n ** 63n);
70+
public static readonly Max: bigint = 2n ** 63n - 1n;
71+
public static readonly Min: bigint = -(2n ** 63n);
7272
}
7373

7474
export class DuckDBUTinyIntType extends BaseDuckDBType<DuckDBTypeId.UTINYINT> {
@@ -115,8 +115,8 @@ export class DuckDBUBigIntType extends BaseDuckDBType<DuckDBTypeId.UBIGINT> {
115115
public static create(alias?: string): DuckDBUBigIntType {
116116
return alias ? new DuckDBUBigIntType(alias) : DuckDBUBigIntType.instance;
117117
}
118-
public static readonly Max = 2n ** 64n - 1n;
119-
public static readonly Min = 0n;
118+
public static readonly Max: bigint = 2n ** 64n - 1n;
119+
public static readonly Min: bigint = 0n;
120120
}
121121

122122
export class DuckDBFloatType extends BaseDuckDBType<DuckDBTypeId.FLOAT> {
@@ -194,8 +194,8 @@ export class DuckDBHugeIntType extends BaseDuckDBType<DuckDBTypeId.HUGEINT> {
194194
public static create(alias?: string): DuckDBHugeIntType {
195195
return alias ? new DuckDBHugeIntType(alias) : DuckDBHugeIntType.instance;
196196
}
197-
public static readonly Max = 2n ** 127n - 1n;
198-
public static readonly Min = -(2n ** 127n);
197+
public static readonly Max: bigint = 2n ** 127n - 1n;
198+
public static readonly Min: bigint = -(2n ** 127n);
199199
}
200200

201201
export class DuckDBUHugeIntType extends BaseDuckDBType<DuckDBTypeId.UHUGEINT> {
@@ -206,8 +206,8 @@ export class DuckDBUHugeIntType extends BaseDuckDBType<DuckDBTypeId.UHUGEINT> {
206206
public static create(alias?: string): DuckDBUHugeIntType {
207207
return alias ? new DuckDBUHugeIntType(alias) : DuckDBUHugeIntType.instance;
208208
}
209-
public static readonly Max = 2n ** 128n - 1n;
210-
public static readonly Min = 0n;
209+
public static readonly Max: bigint = 2n ** 128n - 1n;
210+
public static readonly Min: bigint = 0n;
211211
}
212212

213213
export class DuckDBVarCharType extends BaseDuckDBType<DuckDBTypeId.VARCHAR> {

0 commit comments

Comments
 (0)