From b808384719435df58d8383a699aaac46df44978f Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sun, 4 Aug 2024 17:44:02 +0800 Subject: [PATCH] feat(server): Close code and reason are optional for `close` Follow-up to https://github.com/enisdenjo/graphql-ws/commit/6ae6e6f4e392975ad786cf61e4947fd57f5cf56c, which missed the `close` method --- 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`.