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

@ -289,7 +289,7 @@ export class Parser {
*
* This is set via {@link Parser#setTimeoutMicros}.
*/
getTimeoutMicros(): number {
getTimeoutMicros(): bigint {
return C._ts_parser_timeout_micros(this[0]);
}
@ -302,8 +302,8 @@ export class Parser {
* If parsing takes longer than this, it will halt early, returning `null`.
* See {@link Parser#parse} for more information.
*/
setTimeoutMicros(timeout: number): void {
C._ts_parser_set_timeout_micros(this[0], 0, timeout);
setTimeoutMicros(timeout: bigint): void {
C._ts_parser_set_timeout_micros(this[0], timeout);
}
/** Set the logging callback that a parser should use during parsing. */