sanitizeCloseCode
sanitizeCloseCode(
code):number|null
Defined in: src/preview.ts:850
A WebSocket close code the client/upstream WS API will accept without throwing: 1000 (normal) or the application range 3000–4999. Reserved/abnormal codes (1005/1006/1011/…) are mapped to a safe no-arg close.
Parameters
Section titled “Parameters”number | undefined
Returns
Section titled “Returns”number | null