28
28
END_NODE_INCLUDE
29
29
*/
30
30
31
+ var stream = { } ;
32
+
31
33
/**
32
34
* @constructor
35
+ * @param {Object= } options
33
36
* @extends events.EventEmitter
34
37
*/
35
- var stream = function ( ) { } ;
38
+ stream . Stream = function ( options ) { } ;
36
39
37
40
/**
38
- * @type {stream }
41
+ * @param {stream.Writable } dest
42
+ * @param {{end: boolean}= } pipeOpts
43
+ * @return {stream.Writable }
39
44
*/
40
- stream . Stream = function ( ) { } ;
45
+ stream . Stream . prototype . pipe = function ( dest , pipeOpts ) { } ;
41
46
42
47
/**
43
48
* @constructor
@@ -99,23 +104,25 @@ stream.WritableStream.prototype.destroySoon = function() {};
99
104
/**
100
105
* @constructor
101
106
* @param {Object= } options
102
- * @extends stream
107
+ * @extends stream.Stream
103
108
*/
104
109
stream . Readable = function ( options ) { } ;
105
110
106
111
/**
107
112
* @type {boolean }
113
+ * @deprecated
108
114
*/
109
115
stream . Readable . prototype . readable ;
110
116
111
117
/**
112
- * @param {string|buffer.Buffer } chunk
118
+ * @protected
119
+ * @param {string|buffer.Buffer|null } chunk
113
120
* @return {boolean }
114
121
*/
115
122
stream . Readable . prototype . push = function ( chunk ) { } ;
116
123
117
124
/**
118
- * @param {string|buffer.Buffer } chunk
125
+ * @param {string|buffer.Buffer|null } chunk
119
126
* @return {boolean }
120
127
*/
121
128
stream . Readable . prototype . unshift = function ( chunk ) { } ;
@@ -126,26 +133,19 @@ stream.Readable.prototype.unshift = function(chunk) {};
126
133
stream . Readable . prototype . setEncoding = function ( enc ) { } ;
127
134
128
135
/**
129
- * @param {number } n
130
- * @return {buffer.Buffer }
136
+ * @param {number= } n
137
+ * @return {buffer.Buffer|string|null }
131
138
*/
132
139
stream . Readable . prototype . read = function ( n ) { } ;
133
140
134
141
/**
142
+ * @protected
135
143
* @param {number } n
136
- * @return {?buffer.Buffer }
137
144
*/
138
145
stream . Readable . prototype . _read = function ( n ) { } ;
139
146
140
147
/**
141
- * @param {stream.Writable } dest
142
- * @param {{end: boolean}= } pipeOpts
143
- * @return {stream.Writable }
144
- */
145
- stream . Readable . prototype . pipe = function ( dest , pipeOpts ) { } ;
146
-
147
- /**
148
- * @param {stream.Writable } dest
148
+ * @param {stream.Writable= } dest
149
149
* @return {stream.Readable }
150
150
*/
151
151
stream . Readable . prototype . unpipe = function ( dest ) { } ;
@@ -159,54 +159,52 @@ stream.Readable.prototype.resume = function() {};
159
159
stream . Readable . prototype . pause = function ( ) { } ;
160
160
161
161
/**
162
- * @param {stream } stream
162
+ * @param {stream.Stream } stream
163
+ * @return {stream.Readable }
163
164
*/
164
165
stream . Readable . prototype . wrap = function ( stream ) { } ;
165
166
166
167
/**
167
168
* @constructor
168
169
* @param {Object= } options
169
- * @extends stream
170
+ * @extends stream.Stream
170
171
*/
171
172
stream . Writable = function ( options ) { } ;
172
173
173
174
/**
175
+ * @deprecated
174
176
* @type {boolean }
175
177
*/
176
178
stream . Writable . prototype . writable ;
177
179
178
- /**
179
- */
180
- stream . Writable . prototype . pipe = function ( ) { } ;
181
-
182
180
/**
183
181
* @param {string|buffer.Buffer } chunk
184
- * @param {( string|function(...)) = } encoding
185
- * @param {function(... )= } cb
182
+ * @param {string= } encoding
183
+ * @param {function(*= )= } cb
186
184
* @return {boolean }
187
185
*/
188
186
stream . Writable . prototype . write = function ( chunk , encoding , cb ) { } ;
189
187
190
188
/**
189
+ * @protected
191
190
* @param {string|buffer.Buffer } chunk
192
- * @param {( string|function(...))= } encoding
193
- * @param {function(...)= } cb
191
+ * @param {string } encoding
192
+ * @param {function(*=) } cb
194
193
*/
195
194
stream . Writable . prototype . _write = function ( chunk , encoding , cb ) { } ;
196
195
197
196
/**
198
- * @param {string|buffer.Buffer } chunk
199
- * @param {(string|function(...))= } encoding
200
- * @param {function(...)= } cb
201
- * @return {boolean }
197
+ * @param {string|buffer.Buffer= } chunk
198
+ * @param {string= } encoding
199
+ * @param {function(*=)= } cb
202
200
*/
203
201
stream . Writable . prototype . end = function ( chunk , encoding , cb ) { } ;
204
202
205
203
/**
206
204
* @constructor
207
205
* @param {Object= } options
208
206
* @extends stream.Readable
209
- * @implements stream.Writable
207
+ * Xextends stream.Writable
210
208
*/
211
209
stream . Duplex = function ( options ) { } ;
212
210
@@ -224,11 +222,18 @@ stream.Duplex.prototype.allowHalfOpen;
224
222
stream . Transform = function ( options ) { } ;
225
223
226
224
/**
225
+ * @protected
227
226
* @param {string|buffer.Buffer } chunk
228
- * @param {* } output
227
+ * @param {string } encoding
228
+ * @param {function(*=) } cb
229
+ */
230
+ stream . Transform . _transform = function ( chunk , encoding , cb ) { } ;
231
+
232
+ /**
233
+ * @protected
229
234
* @param {function(*=) } cb
230
235
*/
231
- stream . Transform . _transform = function ( chunk , output , cb ) { } ;
236
+ stream . Transform . _flush = function ( cb ) { } ;
232
237
233
238
/**
234
239
* @param {Object= } options
0 commit comments