From 6c5a981fd2afad21af73a1345c4e30fb6b30b09a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 21 Oct 2019 20:38:28 +0200 Subject: feat: Deno.listenTLS (#3152) --- cli/js/lib.deno_runtime.d.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'cli/js/lib.deno_runtime.d.ts') diff --git a/cli/js/lib.deno_runtime.d.ts b/cli/js/lib.deno_runtime.d.ts index 94b6b61cd..3036ea2d1 100644 --- a/cli/js/lib.deno_runtime.d.ts +++ b/cli/js/lib.deno_runtime.d.ts @@ -990,6 +990,29 @@ declare namespace Deno { */ export function listen(options: ListenOptions): Listener; + export interface ListenTLSOptions { + port: number; + hostname?: string; + transport?: Transport; + certFile: string; + keyFile: string; + } + + /** Listen announces on the local transport address over TLS (transport layer security). + * + * @param options + * @param options.port The port to connect to. (Required.) + * @param options.hostname A literal IP address or host name that can be + * resolved to an IP address. If not specified, defaults to 0.0.0.0 + * @param options.certFile Server certificate file + * @param options.keyFile Server public key file + * + * Examples: + * + * Deno.listenTLS({ port: 443, certFile: "./my_server.crt", keyFile: "./my_server.key" }) + */ + export function listenTLS(options: ListenTLSOptions): Listener; + export interface DialOptions { port: number; hostname?: string; @@ -1018,6 +1041,7 @@ declare namespace Deno { export interface DialTLSOptions { port: number; hostname?: string; + certFile?: string; } /** -- cgit v1.2.3