CloseEvent - graforlock/bs-websocket GitHub Wiki

CloseEvent | MDN

external code : t => int

external reason : t => string

external wasClean : t => bool

There's also a code type variant with a mapping that denote all closure codes.