Skip to content

Commit 99338f7

Browse files
authored
[doc] Fix data argument type (#1843)
1 parent 223194e commit 99338f7

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

doc/ws.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,8 @@ receives an `OpenEvent` named "open".
417417

418418
### websocket.ping([data[, mask]][, callback])
419419

420-
- `data` {Any} The data to send in the ping frame.
420+
- `data` {Array|Number|Object|String|ArrayBuffer|Buffer|DataView|TypedArray} The
421+
data to send in the ping frame.
421422
- `mask` {Boolean} Specifies whether `data` should be masked or not. Defaults to
422423
`true` when `websocket` is not a server client.
423424
- `callback` {Function} An optional callback which is invoked when the ping
@@ -427,7 +428,8 @@ Send a ping.
427428

428429
### websocket.pong([data[, mask]][, callback])
429430

430-
- `data` {Any} The data to send in the pong frame.
431+
- `data` {Array|Number|Object|String|ArrayBuffer|Buffer|DataView|TypedArray} The
432+
data to send in the pong frame.
431433
- `mask` {Boolean} Specifies whether `data` should be masked or not. Defaults to
432434
`true` when `websocket` is not a server client.
433435
- `callback` {Function} An optional callback which is invoked when the pong
@@ -456,7 +458,8 @@ Removes an event listener emulating the `EventTarget` interface.
456458

457459
### websocket.send(data[, options][, callback])
458460

459-
- `data` {Any} The data to send.
461+
- `data` {Array|Number|Object|String|ArrayBuffer|Buffer|DataView|TypedArray} The
462+
data to send.
460463
- `options` {Object}
461464
- `compress` {Boolean} Specifies whether `data` should be compressed or not.
462465
Defaults to `true` when permessage-deflate is enabled.

0 commit comments

Comments
 (0)