From aa07558b99d3f6471592925ab5225a1d0747f9c4 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 5 Aug 2024 12:07:01 +0200 Subject: [PATCH] fix(server): Close code and reason are optional for `close` (#573) --- src/server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.ts b/src/server.ts index 0b051e69..c56cdcee 100644 --- a/src/server.ts +++ b/src/server.ts @@ -447,7 +447,7 @@ export interface WebSocket { * The returned promise is used to control the graceful * closure. */ - close(code: number, reason: string): Promise | void; + close(code?: number, reason?: string): Promise | void; /** * Called when message is received. The library requires the data * to be a `string`.