mirror of
https://github.com/denoland/std.git
synced 2024-11-22 04:59:05 +00:00
chore: fix type errors caused by canary (#3477)
This commit is contained in:
parent
7cdd55a083
commit
2acd2bb2fc
1
.github/workflows/typos.toml
vendored
1
.github/workflows/typos.toml
vendored
@ -15,4 +15,5 @@ extend-exclude = [
|
||||
"*.generated.mjs",
|
||||
"media_types/vendor",
|
||||
"http/testdata",
|
||||
"http/user_agent.ts"
|
||||
]
|
||||
|
@ -130,7 +130,7 @@ async function fetchExactPath(
|
||||
const encoder = new TextEncoder();
|
||||
const decoder = new TextDecoder();
|
||||
const request = encoder.encode("GET " + path + " HTTP/1.1\r\n\r\n");
|
||||
let conn: void | Deno.Conn;
|
||||
let conn: undefined | Deno.Conn;
|
||||
try {
|
||||
conn = await Deno.connect(
|
||||
{ hostname: hostname, port: port, transport: "tcp" },
|
||||
|
@ -345,10 +345,11 @@ export class ServerSentEventStreamTarget extends EventTarget
|
||||
* {@linkcode ResponseInit} needed to create a response that will establish
|
||||
* a SSE connection with the client. */
|
||||
asResponseInit(responseInit: ResponseInit = {}): [BodyInit, ResponseInit] {
|
||||
responseInit.headers = new Headers(responseInit.headers);
|
||||
const headers = new Headers(responseInit.headers);
|
||||
for (const [key, value] of RESPONSE_HEADERS) {
|
||||
responseInit.headers.set(key, value);
|
||||
headers.set(key, value);
|
||||
}
|
||||
responseInit.headers = headers;
|
||||
return [this.#bodyInit, responseInit];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user