diff --git a/.changeset/2022-05-04.md b/.changeset/2022-05-04.md new file mode 100644 index 00000000..336e59e8 --- /dev/null +++ b/.changeset/2022-05-04.md @@ -0,0 +1,5 @@ +--- +"@cloudflare/workers-types": minor +--- + +Updated auto-generated types @ 2022-05-04 diff --git a/src/workers.json b/src/workers.json index e11a78f9..49ac30a1 100644 --- a/src/workers.json +++ b/src/workers.json @@ -2650,7 +2650,7 @@ { "name": "scheduledTime", "type": { - "name": "Date" + "name": "number|Date" } }, { @@ -3068,7 +3068,7 @@ { "name": "scheduledTime", "type": { - "name": "Date" + "name": "number|Date" } }, { @@ -4251,6 +4251,58 @@ ], "kind": "typedef" }, + "ExtendableEvent": { + "name": "ExtendableEvent", + "members": [ + { + "name": "constructor", + "type": { + "params": [ + { + "name": "type", + "type": { + "name": "string" + } + }, + { + "name": "init", + "type": { + "name": "EventInit", + "optional": true + } + } + ] + } + }, + { + "name": "waitUntil", + "type": { + "params": [ + { + "name": "promise", + "type": { + "name": "Promise", + "args": [ + { + "name": "any" + } + ] + } + } + ], + "returns": { + "name": "void" + } + } + } + ], + "extends": [ + { + "name": "Event" + } + ], + "kind": "class" + }, "FetchEvent": { "name": "FetchEvent", "members": [ @@ -4298,27 +4350,6 @@ "name": "void" } } - }, - { - "name": "waitUntil", - "type": { - "params": [ - { - "name": "promise", - "type": { - "name": "Promise", - "args": [ - { - "name": "any" - } - ] - } - } - ], - "returns": { - "name": "void" - } - } } ], "extends": [ @@ -9602,32 +9633,11 @@ "name": "void" } } - }, - { - "name": "waitUntil", - "type": { - "params": [ - { - "name": "promise", - "type": { - "name": "Promise", - "args": [ - { - "name": "any" - } - ] - } - } - ], - "returns": { - "name": "void" - } - } } ], "extends": [ { - "name": "Event" + "name": "ExtendableEvent" } ], "kind": "class" @@ -10016,6 +10026,19 @@ "static": true, "readonly": true }, + { + "name": "ExtendableEvent", + "type": { + "name": "typeof", + "args": [ + { + "name": "ExtendableEvent" + } + ] + }, + "static": true, + "readonly": true + }, { "name": "PromiseRejectionEvent", "type": {