npm install --save @types/ws
This package contains type definitions for ws (https://github.com/websockets/ws).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ws.
These definitions were written by Paul Loyd, Margus Lamp, Philippe D'Alva, reduckted, teidesu, Bartosz Wojtkowiak, and Kyle Hensel.