Skip to content

Commit 9c11561

Browse files
committed
Improve types
1 parent 63f713e commit 9c11561

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

index.d.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2032,7 +2032,15 @@ declare type Sqlite3Static = {
20322032
installVfs: (obj: {
20332033
io?: {
20342034
struct: sqlite3_io_methods;
2035-
methods: Omit<sqlite3_io_methods, 'iVersion'>;
2035+
methods: { [K in keyof sqlite3_io_methods as K extends `x${string}` ? K : never]?: sqlite3_io_methods[K] };
2036+
applyArgcCheck?: boolean;
2037+
};
2038+
vfs?: {
2039+
struct: sqlite3_vfs;
2040+
methods: { [K in keyof sqlite3_vfs as K extends `x${string}` ? K : never]?: sqlite3_vfs[K] };
2041+
applyArgcCheck?: boolean;
2042+
name?: string;
2043+
asDefault?: boolean;
20362044
};
20372045
}) => Sqlite3Static['vfs'];
20382046
};
@@ -2792,7 +2800,7 @@ declare type WASM_API = {
27922800
poke32: (addr: WasmPointer, value: number) => WASM_API;
27932801

27942802
/** Equivalent to poke(X,Y,'i64') */
2795-
poke64: (addr: WasmPointer, value: number) => WASM_API;
2803+
poke64: (addr: WasmPointer, value: number|bigint) => WASM_API;
27962804

27972805
/** Equivalent to poke(X,Y,'f32') */
27982806
poke32f: (addr: WasmPointer, value: number) => WASM_API;
@@ -5729,7 +5737,7 @@ declare type CAPI = {
57295737
*
57305738
* See https://www.sqlite.org/c3ref/vfs_find.html
57315739
*/
5732-
sqlite3_vfs_find: (vfsName: string) => sqlite3_vfs;
5740+
sqlite3_vfs_find: (vfsName: string|null) => number;
57335741

57345742
/**
57355743
* Register a new VFS. Becomes the default if the makeDflt parameter is set.

0 commit comments

Comments
 (0)