Skip to content

Commit 2c8c261

Browse files
committed
Change 'BigInt' types to more appropriate 'bigint'
1 parent f9df083 commit 2c8c261

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

index.d.ts

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ declare type SqlValue =
33
| string
44
| number
55
| null
6-
| BigInt
6+
| bigint
77
| Uint8Array
88
| Int8Array
99
| ArrayBuffer;
@@ -1862,9 +1862,9 @@ declare class sqlite3_index_info extends SQLiteStruct {
18621862
needToFreeIdxStr: number;
18631863
orderByConsumed: number;
18641864
estimatedCost: number;
1865-
estimatedRows: BigInt;
1865+
estimatedRows: bigint;
18661866
idxFlags: number;
1867-
colUsed: BigInt;
1867+
colUsed: bigint;
18681868
sqlite3_index_constraint: sqlite3_index_constraint;
18691869
sqlite3_index_orderby: sqlite3_index_orderby;
18701870
sqlite3_index_constraint_usage: sqlite3_index_constraint_usage;
@@ -2705,7 +2705,7 @@ declare type WASM_API = {
27052705
* Equivalent to peek(X,'i64'). Will throw if the environment is not
27062706
* configured with BigInt support.
27072707
*/
2708-
peek64: (addr: WasmPointer) => BigInt;
2708+
peek64: (addr: WasmPointer) => bigint;
27092709

27102710
/** Equivalent to peek(X,'f32') */
27112711
peek32f: (addr: WasmPointer) => number;
@@ -3520,7 +3520,7 @@ declare type CAPI = {
35203520
arg1: number,
35213521
arg2: number,
35223522
): number;
3523-
sqlite3_config(op: CAPI['SQLITE_CONFIG_MEMDB_MAXSIZE'], arg: BigInt): number;
3523+
sqlite3_config(op: CAPI['SQLITE_CONFIG_MEMDB_MAXSIZE'], arg: bigint): number;
35243524

35253525
/**
35263526
* Used to make configuration changes to a database connection. The interface
@@ -3587,7 +3587,7 @@ declare type CAPI = {
35873587
*
35883588
* See https://www.sqlite.org/c3ref/last_insert_rowid.html
35893589
*/
3590-
sqlite3_last_insert_rowid: (db: Database | WasmPointer) => BigInt;
3590+
sqlite3_last_insert_rowid: (db: Database | WasmPointer) => bigint;
35913591

35923592
/**
35933593
* Allows the application to set the value returned by calling
@@ -3602,7 +3602,7 @@ declare type CAPI = {
36023602
*/
36033603
sqlite3_set_last_insert_rowid: (
36043604
db: Database | WasmPointer,
3605-
rowid: BigInt,
3605+
rowid: bigint,
36063606
) => void;
36073607

36083608
/**
@@ -3633,7 +3633,7 @@ declare type CAPI = {
36333633
*
36343634
* See https://www.sqlite.org/c3ref/changes.html
36353635
*/
3636-
sqlite3_changes64: (db: Database | WasmPointer) => BigInt;
3636+
sqlite3_changes64: (db: Database | WasmPointer) => bigint;
36373637

36383638
/**
36393639
* Return the total number of rows inserted, modified or deleted by all
@@ -3665,7 +3665,7 @@ declare type CAPI = {
36653665
*
36663666
* See https://www.sqlite.org/c3ref/total_changes.html
36673667
*/
3668-
sqlite3_total_changes64: (db: Database | WasmPointer) => BigInt;
3668+
sqlite3_total_changes64: (db: Database | WasmPointer) => bigint;
36693669

36703670
/**
36713671
* Useful during command-line input to determine if the currently entered text
@@ -3745,7 +3745,7 @@ declare type CAPI = {
37453745
*
37463746
* See https://www.sqlite.org/c3ref/free.html
37473747
*/
3748-
sqlite3_malloc64: (numBytes: BigInt) => WasmPointer;
3748+
sqlite3_malloc64: (numBytes: bigint) => WasmPointer;
37493749

37503750
/**
37513751
* Attempts to resize a prior memory allocation X to be at least N bytes.
@@ -3785,7 +3785,7 @@ declare type CAPI = {
37853785
*
37863786
* See https://www.sqlite.org/c3ref/free.html
37873787
*/
3788-
sqlite3_realloc64: (ptr: WasmPointer, numBytes: BigInt) => WasmPointer;
3788+
sqlite3_realloc64: (ptr: WasmPointer, numBytes: bigint) => WasmPointer;
37893789

37903790
/**
37913791
* Calling `sqlite3_free()` with a pointer previously returned by
@@ -3820,7 +3820,7 @@ declare type CAPI = {
38203820
*
38213821
* See https://www.sqlite.org/c3ref/free.html
38223822
*/
3823-
sqlite3_msize: (ptr: WasmPointer) => BigInt;
3823+
sqlite3_msize: (ptr: WasmPointer) => bigint;
38243824

38253825
/**
38263826
* Pseudo-Random Number Generator
@@ -4006,8 +4006,8 @@ declare type CAPI = {
40064006
sqlite3_uri_int64: (
40074007
uri: string | WasmPointer,
40084008
paramName: string | WasmPointer,
4009-
defaultVal: BigInt,
4010-
) => BigInt;
4009+
defaultVal: bigint,
4010+
) => bigint;
40114011

40124012
/**
40134013
* Returns a pointer to the name (not the value) of the `idx`-th query
@@ -4314,7 +4314,7 @@ declare type CAPI = {
43144314
*
43154315
* See https://www.sqlite.org/c3ref/bind_blob.html
43164316
*/
4317-
sqlite3_bind_int64: (stmt: WasmPointer, idx: number, value: BigInt) => number;
4317+
sqlite3_bind_int64: (stmt: WasmPointer, idx: number, value: bigint) => number;
43184318

43194319
/**
43204320
* Bind a `NULL` value to a parameter in a prepared statement.
@@ -4568,7 +4568,7 @@ declare type CAPI = {
45684568
*
45694569
* See https://www.sqlite.org/c3ref/column_blob.html
45704570
*/
4571-
sqlite3_column_int64: (db: Database | WasmPointer, colIdx: number) => BigInt;
4571+
sqlite3_column_int64: (db: Database | WasmPointer, colIdx: number) => bigint;
45724572

45734573
/**
45744574
* Get a TEXT result value from a column in the current result row.
@@ -4804,7 +4804,7 @@ declare type CAPI = {
48044804
*
48054805
* See https://www.sqlite.org/c3ref/value_blob.html
48064806
*/
4807-
sqlite3_value_int64: (sqliteValue: WasmPointer) => BigInt;
4807+
sqlite3_value_int64: (sqliteValue: WasmPointer) => bigint;
48084808

48094809
/**
48104810
* Extract a pointer value from a protected `sqlite3_value` object. If the
@@ -5162,7 +5162,7 @@ declare type CAPI = {
51625162
*
51635163
* See https://www.sqlite.org/c3ref/result_blob.html
51645164
*/
5165-
sqlite3_result_int64: (ctx: WasmPointer, value: BigInt) => void;
5165+
sqlite3_result_int64: (ctx: WasmPointer, value: bigint) => void;
51665166

51675167
/**
51685168
* Sets the return value of the application-defined function to be `NULL`.
@@ -5244,7 +5244,7 @@ declare type CAPI = {
52445244
*
52455245
* See https://www.sqlite.org/c3ref/result_blob.html
52465246
*/
5247-
sqlite3_result_zeroblob64: (ctx: WasmPointer, blobLen: BigInt) => void;
5247+
sqlite3_result_zeroblob64: (ctx: WasmPointer, blobLen: bigint) => void;
52485248

52495249
/**
52505250
* Causes the subtype of the result from the application-defined SQL function
@@ -5289,7 +5289,7 @@ declare type CAPI = {
52895289
| null
52905290
| boolean
52915291
| number
5292-
| BigInt
5292+
| bigint
52935293
| string
52945294
| Uint8Array
52955295
| Int8Array
@@ -5505,7 +5505,7 @@ declare type CAPI = {
55055505
op: CAPI['SQLITE_UPDATE'] | CAPI['SQLITE_DELETE'] | CAPI['SQLITE_INSERT'],
55065506
dbName: string,
55075507
tableName: string,
5508-
newRowId: BigInt,
5508+
newRowId: bigint,
55095509
) => void,
55105510
userCtx: WasmPointer,
55115511
) => WasmPointer;
@@ -6257,8 +6257,8 @@ declare type CAPI = {
62576257
op: CAPI['SQLITE_UPDATE'] | CAPI['SQLITE_DELETE'] | CAPI['SQLITE_INSERT'],
62586258
dbName: string,
62596259
tableName: string,
6260-
oldRowid: BigInt,
6261-
newRowid: BigInt,
6260+
oldRowid: bigint,
6261+
newRowid: bigint,
62626262
) => void,
62636263
) => void;
62646264

0 commit comments

Comments
 (0)