@@ -4598,7 +4598,6 @@ interface BigIntConstructor {
45984598 ctz ( a : bigint ) : bigint ;
45994599}
46004600
4601-
46024601/** npm: @suchipi/print@2.5.0. License: ISC */
46034602/* (with some QuickJS-specific modifications) */
46044603
@@ -4750,10 +4749,7 @@ declare module "quickjs:timers" {
47504749 export type Timer = { [ Symbol . toStringTag ] : "Timer" } ;
47514750
47524751 /** Call the function func after delay ms. Return a handle to the timer. */
4753- export function setTimeout (
4754- func : ( ...args : any ) => any ,
4755- delay : number
4756- ) : Timer ;
4752+ export function setTimeout ( func : ( ...args : any ) => any , delay : number ) : Timer ;
47574753
47584754 /** Cancel a timer. */
47594755 export function clearTimeout ( handle : Timer ) : void ;
@@ -5125,7 +5121,10 @@ declare module "quickjs:std" {
51255121 * - `responseHeaders`: headers separated by CRLF (string)
51265122 * - `status`: status code (number)
51275123 */
5128- ( url : string , options : { full : true } ) : {
5124+ (
5125+ url : string ,
5126+ options : { full : true }
5127+ ) : {
51295128 status : number ;
51305129 response : string ;
51315130 responseHeaders : string ;
@@ -5140,7 +5139,10 @@ declare module "quickjs:std" {
51405139 * - `responseHeaders`: headers separated by CRLF (string)
51415140 * - `status`: status code (number)
51425141 */
5143- ( url : string , options : { full : true ; binary : false } ) : {
5142+ (
5143+ url : string ,
5144+ options : { full : true ; binary : false }
5145+ ) : {
51445146 status : number ;
51455147 response : string ;
51465148 responseHeaders : string ;
@@ -5155,7 +5157,10 @@ declare module "quickjs:std" {
51555157 * - `responseHeaders`: headers separated by CRLF (string)
51565158 * - `status`: status code (number)
51575159 */
5158- ( url : string , options : { full : true ; binary : true } ) : {
5160+ (
5161+ url : string ,
5162+ options : { full : true ; binary : true }
5163+ ) : {
51595164 status : number ;
51605165 response : ArrayBuffer ;
51615166 responseHeaders : string ;
@@ -5420,7 +5425,17 @@ declare module "quickjs:os" {
54205425 | { [ key : string | number ] : StructuredClonable } ;
54215426
54225427 export class Worker {
5428+ /**
5429+ * Create a Worker which runs the module at `moduleFilename`.
5430+ */
54235431 constructor ( moduleFilename : string ) ;
5432+ /**
5433+ * Create a Worker which runs a synthetic module with filename
5434+ * `fakeModuleFilename` and source code `overrideCode` (JS source code
5435+ * string). `fakeModuleFilename` is not read from disk and is only used as
5436+ * the module's assigned filename for import.meta, module resolution, etc.
5437+ */
5438+ constructor ( fakeModuleFilename : string , overrideCode : string ) ;
54245439 static parent : Worker ;
54255440 postMessage ( msg : StructuredClonable ) : void ;
54265441 /**
@@ -5465,12 +5480,14 @@ declare module "quickjs:os" {
54655480 * fallback. When `onerror` is unset, errors print to stderr in the
54665481 * same format as an uncaught exception would.
54675482 */
5468- onerror : null | ( ( event : {
5469- message : string ;
5470- filename : string ;
5471- lineno : number ;
5472- error : Error | null ;
5473- } ) => void ) ;
5483+ onerror :
5484+ | null
5485+ | ( ( event : {
5486+ message : string ;
5487+ filename : string ;
5488+ lineno : number ;
5489+ error : Error | null ;
5490+ } ) => void ) ;
54745491 }
54755492
54765493 /**
@@ -5837,10 +5854,7 @@ interface ModuleDelegate {
58375854 * own implementation. Note that you must handle `ModuleDelegate.compilers`
58385855 * yourself in your replacement implementation.
58395856 */
5840- read (
5841- modulePath : string ,
5842- attributes ?: Record < string , string >
5843- ) : string ;
5857+ read ( modulePath : string , attributes ?: Record < string , string > ) : string ;
58445858}
58455859
58465860interface RequireFunction {
@@ -5984,7 +5998,11 @@ declare module "quickjs:engine" {
59845998 */
59855999 export function evalScript (
59866000 code : string ,
5987- options ?: { backtraceBarrier ?: boolean ; filename ?: string ; async ?: boolean }
6001+ options ?: {
6002+ backtraceBarrier ?: boolean ;
6003+ filename ?: string ;
6004+ async ?: boolean ;
6005+ }
59886006 ) : any ;
59896007
59906008 /**
0 commit comments