@@ -430,7 +430,7 @@ interface DurableObjectStorage {
430
430
) : Promise < T > ;
431
431
getAlarm ( options ?: DurableObjectGetAlarmOptions ) : Promise < number | null > ;
432
432
setAlarm (
433
- scheduledTime : Date ,
433
+ scheduledTime : number | Date ,
434
434
options ?: DurableObjectSetAlarmOptions
435
435
) : Promise < void > ;
436
436
deleteAlarm ( options ?: DurableObjectSetAlarmOptions ) : Promise < void > ;
@@ -483,7 +483,7 @@ interface DurableObjectTransaction {
483
483
rollback ( ) : void ;
484
484
getAlarm ( options ?: DurableObjectGetAlarmOptions ) : Promise < number | null > ;
485
485
setAlarm (
486
- scheduledTime : Date ,
486
+ scheduledTime : number | Date ,
487
487
options ?: DurableObjectSetAlarmOptions
488
488
) : Promise < void > ;
489
489
deleteAlarm ( options ?: DurableObjectSetAlarmOptions ) : Promise < void > ;
@@ -616,11 +616,15 @@ declare type ExportedHandlerScheduledHandler<Env = unknown> = (
616
616
ctx : ExecutionContext
617
617
) => void | Promise < void > ;
618
618
619
+ declare class ExtendableEvent extends Event {
620
+ constructor ( type : string , init ?: EventInit ) ;
621
+ waitUntil ( promise : Promise < any > ) : void ;
622
+ }
623
+
619
624
declare abstract class FetchEvent extends Event {
620
625
readonly request : Request ;
621
626
respondWith ( promise : Response | Promise < Response > ) : void ;
622
627
passThroughOnException ( ) : void ;
623
- waitUntil ( promise : Promise < any > ) : void ;
624
628
}
625
629
626
630
declare abstract class Fetcher {
@@ -1481,11 +1485,10 @@ interface ScheduledController {
1481
1485
noRetry ( ) : void ;
1482
1486
}
1483
1487
1484
- declare abstract class ScheduledEvent extends Event {
1488
+ declare abstract class ScheduledEvent extends ExtendableEvent {
1485
1489
readonly scheduledTime : number ;
1486
1490
readonly cron : string ;
1487
1491
noRetry ( ) : void ;
1488
- waitUntil ( promise : Promise < any > ) : void ;
1489
1492
}
1490
1493
1491
1494
interface Scheduler {
0 commit comments