summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/dts/lib.deno.unstable.d.ts20
-rw-r--r--cli/tests/unit/tls_test.ts10
-rw-r--r--cli/tsc.rs3
3 files changed, 12 insertions, 21 deletions
diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts
index 08b3ca80c..221ecee60 100644
--- a/cli/dts/lib.deno.unstable.d.ts
+++ b/cli/dts/lib.deno.unstable.d.ts
@@ -1049,7 +1049,10 @@ declare namespace Deno {
*
* Requires `allow-net` permission for "tcp" and `allow-read` for "unix". */
export function connect(
- options: ConnectOptions | UnixConnectOptions,
+ options: ConnectOptions,
+ ): Promise<TcpConn>;
+ export function connect(
+ options: UnixConnectOptions,
): Promise<Conn>;
export interface ConnectTlsOptions {
@@ -1066,21 +1069,6 @@ declare namespace Deno {
alpnProtocols?: string[];
}
- export interface Conn {
- /**
- * **UNSTABLE**: new API, see https://github.com/denoland/deno/issues/13617.
- *
- * Enable/disable the use of Nagle's algorithm. Defaults to true.
- */
- setNoDelay(nodelay?: boolean): void;
- /**
- * **UNSTABLE**: new API, see https://github.com/denoland/deno/issues/13617.
- *
- * Enable/disable keep-alive functionality.
- */
- setKeepAlive(keepalive?: boolean): void;
- }
-
export interface TlsHandshakeInfo {
/** **UNSTABLE**: new API, yet to be vetted.
*
diff --git a/cli/tests/unit/tls_test.ts b/cli/tests/unit/tls_test.ts
index 26a166801..07ffcd487 100644
--- a/cli/tests/unit/tls_test.ts
+++ b/cli/tests/unit/tls_test.ts
@@ -1075,7 +1075,7 @@ Deno.test(
const port = 587;
const encoder = new TextEncoder();
- let conn = await Deno.connect({
+ const conn = await Deno.connect({
hostname,
port,
});
@@ -1102,9 +1102,9 @@ Deno.test(
// Received the message that the server is ready to establish TLS
assertEquals(line, "220 2.0.0 Ready to start TLS");
- conn = await Deno.startTls(conn, { hostname });
- writer = new BufWriter(conn);
- reader = new TextProtoReader(new BufReader(conn));
+ const tlsConn = await Deno.startTls(conn, { hostname });
+ writer = new BufWriter(tlsConn);
+ reader = new TextProtoReader(new BufReader(tlsConn));
// After that use TLS communication again
await writer.write(encoder.encode(`EHLO ${hostname}\r\n`));
@@ -1115,7 +1115,7 @@ Deno.test(
if (line.startsWith("250 ")) break;
}
- conn.close();
+ tlsConn.close();
},
);
diff --git a/cli/tsc.rs b/cli/tsc.rs
index 9500aae74..bff2f3404 100644
--- a/cli/tsc.rs
+++ b/cli/tsc.rs
@@ -1148,6 +1148,7 @@ mod tests {
let actual = test_exec(&specifier)
.await
.expect("exec should not have errored");
+ eprintln!("diagnostics {:#?}", actual.diagnostics);
assert!(actual.diagnostics.is_empty());
assert!(actual.emitted_files.is_empty());
assert!(actual.maybe_tsbuildinfo.is_some());
@@ -1160,6 +1161,7 @@ mod tests {
let actual = test_exec(&specifier)
.await
.expect("exec should not have errored");
+ eprintln!("diagnostics {:#?}", actual.diagnostics);
assert!(actual.diagnostics.is_empty());
assert!(actual.emitted_files.is_empty());
assert!(actual.maybe_tsbuildinfo.is_some());
@@ -1172,6 +1174,7 @@ mod tests {
let actual = test_exec(&specifier)
.await
.expect("exec should not have errored");
+ eprintln!("diagnostics {:#?}", actual.diagnostics);
assert!(actual.diagnostics.is_empty());
}
}