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`.