File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed
Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change 11// Copyright 2023-latest the httpland authors. All rights reserved. MIT license.
22// This module is browser compatible.
33
4- import { isResponse } from "./is.ts" ;
5-
64/** Create a new `Response`.
75 *
86 * If you create a new `Response` from an existing `Response`, any options you set
@@ -21,17 +19,15 @@ import { isResponse } from "./is.ts";
2119 * ```
2220 */
2321export function createResponse (
24- input : Response | Body ,
22+ input : Response ,
2523 init ?: ResponseInit ,
2624) : Response {
27- init = isResponse ( input )
28- ? {
29- headers : input . headers ,
30- status : input . status ,
31- statusText : input . statusText ,
32- ...init ,
33- }
34- : init ;
25+ init = {
26+ headers : input . headers ,
27+ status : input . status ,
28+ statusText : input . statusText ,
29+ ...init ,
30+ } ;
3531
3632 return new Response ( input . body , init ) ;
3733}
You can’t perform that action at this time.
0 commit comments