Skip to content

Commit bac9b4a

Browse files
committed
introduces Response.json() static method
fixes #1444
1 parent 0337998 commit bac9b4a

5 files changed

+4
-13
lines changed

baselines/dom.generated.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11942,6 +11942,7 @@ declare var Response: {
1194211942
prototype: Response;
1194311943
new(body?: BodyInit | null, init?: ResponseInit): Response;
1194411944
error(): Response;
11945+
json(data: any, init?: ResponseInit): Response;
1194511946
redirect(url: string | URL, status?: number): Response;
1194611947
};
1194711948

baselines/serviceworker.generated.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2931,6 +2931,7 @@ declare var Response: {
29312931
prototype: Response;
29322932
new(body?: BodyInit | null, init?: ResponseInit): Response;
29332933
error(): Response;
2934+
json(data: any, init?: ResponseInit): Response;
29342935
redirect(url: string | URL, status?: number): Response;
29352936
};
29362937

baselines/sharedworker.generated.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2810,6 +2810,7 @@ declare var Response: {
28102810
prototype: Response;
28112811
new(body?: BodyInit | null, init?: ResponseInit): Response;
28122812
error(): Response;
2813+
json(data: any, init?: ResponseInit): Response;
28132814
redirect(url: string | URL, status?: number): Response;
28142815
};
28152816

baselines/webworker.generated.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3049,6 +3049,7 @@ declare var Response: {
30493049
prototype: Response;
30503050
new(body?: BodyInit | null, init?: ResponseInit): Response;
30513051
error(): Response;
3052+
json(data: any, init?: ResponseInit): Response;
30523053
redirect(url: string | URL, status?: number): Response;
30533054
};
30543055

inputfiles/removedTypes.jsonc

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,6 @@
8383
}
8484
}
8585
},
86-
"Response": {
87-
"methods": {
88-
"method": {
89-
// BCD's api.Response.json is not about the static method but about Body#json.
90-
// See:
91-
// Firefox https://bugzil.la/1758943
92-
// Chrome https://crbug.com/1305358
93-
// Safari https://webkit.org/b/240375
94-
// MDN https://github.com/mdn/content/discussions/5121#discussioncomment-2735488
95-
"json": null
96-
}
97-
}
98-
},
9986
"PaymentResponse": {
10087
"methods": {
10188
"method": {

0 commit comments

Comments
 (0)