Skip to content

Commit d37a7b4

Browse files
committed
Implement ResponseConstructor
1 parent cede2ca commit d37a7b4

File tree

2 files changed

+270
-0
lines changed

2 files changed

+270
-0
lines changed

inputfiles/addedTypes.jsonc

+269
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,262 @@
454454
},
455455
"interfaces": {
456456
"interface": {
457+
"Response": {
458+
"name": "Response",
459+
"noInterfaceObject": true,
460+
461+
"properties": {
462+
"property": {
463+
"type": {
464+
"name": "type",
465+
"type": "ResponseType",
466+
"nullable": false,
467+
"static": false,
468+
"stringifier": false,
469+
"readonly": true,
470+
"exposed": "Window Worker",
471+
"secureContext": false,
472+
"mdnUrl": "https://developer.mozilla.org/docs/Web/API/Response/type"
473+
},
474+
"url": {
475+
"name": "url",
476+
"type": "USVString",
477+
"nullable": false,
478+
"static": false,
479+
"stringifier": false,
480+
"readonly": true,
481+
"exposed": "Window Worker",
482+
"secureContext": false,
483+
"mdnUrl": "https://developer.mozilla.org/docs/Web/API/Response/url"
484+
},
485+
"redirected": {
486+
"name": "redirected",
487+
"type": "boolean",
488+
"nullable": false,
489+
"static": false,
490+
"stringifier": false,
491+
"readonly": true,
492+
"exposed": "Window Worker",
493+
"secureContext": false,
494+
"mdnUrl": "https://developer.mozilla.org/docs/Web/API/Response/redirected"
495+
},
496+
"status": {
497+
"name": "status",
498+
"type": "unsigned short",
499+
"nullable": false,
500+
"static": false,
501+
"stringifier": false,
502+
"readonly": true,
503+
"exposed": "Window Worker",
504+
"secureContext": false,
505+
"mdnUrl": "https://developer.mozilla.org/docs/Web/API/Response/status"
506+
},
507+
"ok": {
508+
"name": "ok",
509+
"type": "boolean",
510+
"nullable": false,
511+
"static": false,
512+
"stringifier": false,
513+
"readonly": true,
514+
"exposed": "Window Worker",
515+
"secureContext": false,
516+
"mdnUrl": "https://developer.mozilla.org/docs/Web/API/Response/ok"
517+
},
518+
"statusText": {
519+
"name": "statusText",
520+
"type": "ByteString",
521+
"nullable": false,
522+
"static": false,
523+
"stringifier": false,
524+
"readonly": true,
525+
"exposed": "Window Worker",
526+
"secureContext": false,
527+
"mdnUrl": "https://developer.mozilla.org/docs/Web/API/Response/statusText"
528+
},
529+
"headers": {
530+
"name": "headers",
531+
"type": "Headers",
532+
"nullable": false,
533+
"static": false,
534+
"stringifier": false,
535+
"readonly": true,
536+
"exposed": "Window Worker",
537+
"secureContext": false,
538+
"mdnUrl": "https://developer.mozilla.org/docs/Web/API/Response/headers"
539+
}
540+
},
541+
"namesakes": {}
542+
},
543+
"constructor": {
544+
"signature": [
545+
{
546+
"type": "Response",
547+
"param": [
548+
{
549+
"name": "body",
550+
"type": "BodyInit",
551+
"nullable": true,
552+
"optional": true,
553+
"variadic": false
554+
},
555+
{
556+
"name": "init",
557+
"type": "ResponseInit",
558+
"nullable": false,
559+
"optional": true,
560+
"variadic": false
561+
}
562+
]
563+
}
564+
]
565+
},
566+
"exposed": "Window Worker",
567+
"legacyWindowAlias": [],
568+
"secureContext": false,
569+
"transferable": false,
570+
"implements": ["Body"],
571+
"mdnUrl": "https://developer.mozilla.org/docs/Web/API/Response",
572+
"comment": "This Fetch API interface represents the response to a request."
573+
},
574+
"ResponseConstructor": {
575+
"name": "ResponseConstructor",
576+
"noInterfaceObject": true,
577+
578+
"properties": {
579+
"property": {
580+
"prototype": {
581+
"name": "prototype",
582+
"type": "Response",
583+
"nullable": false,
584+
"static": false,
585+
"stringifier": false,
586+
"exposed": "Window Worker"
587+
}
588+
}
589+
},
590+
591+
"methods": {
592+
"method": {
593+
"new": {
594+
"mdnUrl": "https://developer.mozilla.org/docs/Web/API/Response/Response",
595+
"name": "new",
596+
"exposed": "Window Worker",
597+
"signature": [
598+
{
599+
"type": "Response",
600+
"param": [
601+
{
602+
"name": "body",
603+
"type": "BodyInit",
604+
"nullable": true,
605+
"optional": true,
606+
"variadic": false
607+
},
608+
{
609+
"name": "init",
610+
"type": "ResponseInit",
611+
"nullable": false,
612+
"optional": true,
613+
"variadic": false
614+
}
615+
]
616+
}
617+
]
618+
},
619+
"error": {
620+
"name": "error",
621+
"signature": [
622+
{
623+
"type": "Response",
624+
"nullable": false,
625+
"param": []
626+
}
627+
],
628+
"getter": false,
629+
"stringifier": false,
630+
"exposed": "Window Worker",
631+
"secureContext": false,
632+
"mdnUrl": "https://developer.mozilla.org/docs/Web/API/Response/error_static"
633+
},
634+
"redirect": {
635+
"name": "redirect",
636+
"signature": [
637+
{
638+
"type": "Response",
639+
"nullable": false,
640+
"param": [
641+
{
642+
"name": "url",
643+
"type": "USVString",
644+
"nullable": false,
645+
"optional": false,
646+
"variadic": false
647+
},
648+
{
649+
"name": "status",
650+
"type": "unsigned short",
651+
"nullable": false,
652+
"optional": true,
653+
"variadic": false
654+
}
655+
]
656+
}
657+
],
658+
"getter": false,
659+
"stringifier": false,
660+
"exposed": "Window Worker",
661+
"secureContext": false,
662+
"mdnUrl": "https://developer.mozilla.org/docs/Web/API/Response/redirect_static"
663+
},
664+
"json": {
665+
"name": "json",
666+
"signature": [
667+
{
668+
"type": "Response",
669+
"nullable": false,
670+
"param": [
671+
{
672+
"name": "data",
673+
"type": "any",
674+
"nullable": false,
675+
"optional": false,
676+
"variadic": false
677+
},
678+
{
679+
"name": "init",
680+
"type": "ResponseInit",
681+
"nullable": false,
682+
"optional": true,
683+
"variadic": false
684+
}
685+
]
686+
}
687+
],
688+
"getter": false,
689+
"stringifier": false,
690+
"exposed": "Window Worker",
691+
"secureContext": false,
692+
"mdnUrl": "https://developer.mozilla.org/docs/Web/API/Response/json_static"
693+
},
694+
"clone": {
695+
"name": "clone",
696+
"signature": [
697+
{
698+
"type": "Response",
699+
"nullable": false,
700+
"param": []
701+
}
702+
],
703+
"getter": false,
704+
"static": false,
705+
"stringifier": false,
706+
"exposed": "Window Worker",
707+
"secureContext": false,
708+
"mdnUrl": "https://developer.mozilla.org/docs/Web/API/Response/clone"
709+
}
710+
}
711+
}
712+
},
457713
// ImportMeta is not a true DOM interface, but we are forced to declare it as one in order to emit method definitions.
458714
// We cannot define methods as dictionary properties with function types,
459715
// as this would cause conflicts with ImportMeta method overrides in places like @types/node.
@@ -604,6 +860,19 @@
604860
"overrideIndexSignatures": [
605861
"[index: number]: Window"
606862
],
863+
"properties": {
864+
"property": {
865+
"Response": {
866+
"name": "Response",
867+
"type": "ResponseConstructor",
868+
"nullable": false,
869+
"readonly": true,
870+
"exposed": "Window",
871+
"secureContext": false,
872+
"mdnUrl": "https://developer.mozilla.org/docs/Web/API/Response/Response"
873+
}
874+
}
875+
},
607876
"events": {
608877
"event": [
609878
{

inputfiles/removedTypes.jsonc

+1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109
},
110110
"interfaces": {
111111
"interface": {
112+
"Response": null,
112113
"Clipboard": {
113114
"methods": {
114115
"method": {

0 commit comments

Comments
 (0)