@@ -35,16 +35,16 @@ const SPACE = 0x20
3535/**
3636 * @typedef eventSourceSettings
3737 * @type {object }
38- * @property {string } lastEventId The last event ID received from the server.
39- * @property {string } origin The origin of the event source.
40- * @property {number } reconnectionTime The reconnection time, in milliseconds.
38+ * @property {string } [ lastEventId] The last event ID received from the server.
39+ * @property {string } [ origin] The origin of the event source.
40+ * @property {number } [ reconnectionTime] The reconnection time, in milliseconds.
4141 */
4242
4343class EventSourceStream extends Transform {
4444 /**
4545 * @type {eventSourceSettings }
4646 */
47- state = null
47+ state
4848
4949 /**
5050 * Leading byte-order-mark check.
@@ -63,7 +63,7 @@ class EventSourceStream extends Transform {
6363 eventEndCheck = false
6464
6565 /**
66- * @type {Buffer }
66+ * @type {Buffer|null }
6767 */
6868 buffer = null
6969
@@ -78,8 +78,9 @@ class EventSourceStream extends Transform {
7878
7979 /**
8080 * @param {object } options
81- * @param {eventSourceSettings } options.eventSourceSettings
82- * @param {Function } [options.push]
81+ * @param {boolean } [options.readableObjectMode]
82+ * @param {eventSourceSettings } [options.eventSourceSettings]
83+ * @param {(chunk: any, encoding?: BufferEncoding | undefined) => boolean } [options.push]
8384 */
8485 constructor ( options = { } ) {
8586 // Enable object mode as EventSourceStream emits objects of shape
@@ -280,7 +281,7 @@ class EventSourceStream extends Transform {
280281
281282 /**
282283 * @param {Buffer } line
283- * @param {EventStreamEvent } event
284+ * @param {EventSourceStreamEvent } event
284285 */
285286 parseLine ( line , event ) {
286287 // If the line is empty (a blank line)
0 commit comments