Skip to content

add explicit types to avoid literal bigint types in d.ts files #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions api/src/DuckDBType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ export class DuckDBBigIntType extends BaseDuckDBType<DuckDBTypeId.BIGINT> {
public static create(alias?: string): DuckDBBigIntType {
return alias ? new DuckDBBigIntType(alias) : DuckDBBigIntType.instance;
}
public static readonly Max = 2n ** 63n - 1n;
public static readonly Min = -(2n ** 63n);
public static readonly Max: bigint = 2n ** 63n - 1n;
public static readonly Min: bigint = -(2n ** 63n);
}

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

export class DuckDBFloatType extends BaseDuckDBType<DuckDBTypeId.FLOAT> {
Expand Down Expand Up @@ -194,8 +194,8 @@ export class DuckDBHugeIntType extends BaseDuckDBType<DuckDBTypeId.HUGEINT> {
public static create(alias?: string): DuckDBHugeIntType {
return alias ? new DuckDBHugeIntType(alias) : DuckDBHugeIntType.instance;
}
public static readonly Max = 2n ** 127n - 1n;
public static readonly Min = -(2n ** 127n);
public static readonly Max: bigint = 2n ** 127n - 1n;
public static readonly Min: bigint = -(2n ** 127n);
}

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

export class DuckDBVarCharType extends BaseDuckDBType<DuckDBTypeId.VARCHAR> {
Expand Down
Loading