feat(web)!: use bigint for timeouts

This commit is contained in:
ObserverOfTime 2025-08-30 15:54:17 +03:00 committed by Amaan Qureshi
parent 0c5cdcb161
commit dba8446d9e
5 changed files with 27 additions and 28 deletions

View file

@ -56,7 +56,7 @@ export interface QueryOptions {
*
* If query execution takes longer than this, it will halt early, returning an empty array.
*/
timeoutMicros?: number;
timeoutMicros?: bigint;
/**
* A function that will be called periodically during the execution of the query to check
@ -708,7 +708,7 @@ export class Query {
const endIndex = options.endIndex ?? 0;
const matchLimit = options.matchLimit ?? 0xFFFFFFFF;
const maxStartDepth = options.maxStartDepth ?? 0xFFFFFFFF;
const timeoutMicros = options.timeoutMicros ?? 0;
const timeoutMicros = options.timeoutMicros ?? 0n;
const progressCallback = options.progressCallback;
if (typeof matchLimit !== 'number') {
@ -803,7 +803,7 @@ export class Query {
const endIndex = options.endIndex ?? 0;
const matchLimit = options.matchLimit ?? 0xFFFFFFFF;
const maxStartDepth = options.maxStartDepth ?? 0xFFFFFFFF;
const timeoutMicros = options.timeoutMicros ?? 0;
const timeoutMicros = options.timeoutMicros ?? 0n;
const progressCallback = options.progressCallback;
if (typeof matchLimit !== 'number') {