Skip to content

Commit 452947d

Browse files
authored
Merge pull request #89 from DallasHoff/import-db-types-fix
Update types for importDb
2 parents 0e934a7 + f75b612 commit 452947d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

index.d.ts

+8-3
Original file line numberDiff line numberDiff line change
@@ -1260,7 +1260,11 @@ declare class OpfsDatabase extends Database {
12601260
*/
12611261
static importDb(
12621262
filename: string,
1263-
data: Uint8Array | ArrayBuffer,
1263+
data:
1264+
| Uint8Array
1265+
| ArrayBuffer
1266+
| (() => Uint8Array | ArrayBuffer | undefined)
1267+
| (() => Promise<Uint8Array | ArrayBuffer | undefined>),
12641268
): Promise<number>;
12651269
}
12661270

@@ -1350,8 +1354,9 @@ type SAHPoolUtil = {
13501354
importDb: (
13511355
name: string,
13521356
data:
1353-
| Uint8Array
1354-
| ArrayBuffer
1357+
| Uint8Array
1358+
| ArrayBuffer
1359+
| (() => Uint8Array | ArrayBuffer | undefined)
13551360
| (() => Promise<Uint8Array | ArrayBuffer | undefined>),
13561361
) => Promise<number>;
13571362

0 commit comments

Comments
 (0)