1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

fix: re-add Response.json static method (#17061)

Same as #16040
This commit is contained in:
Leo Kettmeir 2022-12-15 16:33:19 +01:00 committed by GitHub
parent 585ec1218f
commit 50c7526526
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 0 deletions

View file

@ -63,6 +63,11 @@ mod check {
exit_code: 0,
});
itest!(check_static_response_json {
args: "check --quiet check/response_json.ts",
exit_code: 0,
});
#[test]
fn cache_switching_config_then_no_config() {
let deno_dir = util::new_deno_dir();

View file

@ -0,0 +1,5 @@
/// <reference no-default-lib="true" />
/// <reference lib="dom" />
/// <reference lib="esnext" />
Response.json({});

View file

@ -11783,6 +11783,7 @@ interface Response extends Body {
declare var Response: {
prototype: Response;
new(body?: BodyInit | null, init?: ResponseInit): Response;
json(data: unknown, init?: ResponseInit): Response;
error(): Response;
redirect(url: string | URL, status?: number): Response;
};