Search
Preparing search index...
The search index is not available
Typed - v3.4.4
Options
All
Public
Public/Protected
All
Inherited
Menu
Globals
node
MockWritable
Class MockWritable
Hierarchy
Writable
MockWritable
Implements
WritableStream
Index
Constructors
constructor
Properties
_data
destroyed
writable
writable
Corked
writable
Ended
writable
Finished
writable
High
Water
Mark
writable
Length
writable
Object
Mode
Methods
_destroy
_final
_write
_writev
add
Listener
cork
data
destroy
emit
end
event
Names
get
Max
Listeners
listener
Count
listeners
off
on
once
pipe
prepend
Listener
prepend
Once
Listener
raw
Listeners
remove
All
Listeners
remove
Listener
set
Default
Encoding
set
Max
Listeners
uncork
write
Constructors
constructor
new
Mock
Writable
(
options
?:
WritableOptions
)
:
MockWritable
Parameters
Optional
options:
WritableOptions
Returns
MockWritable
Properties
Private
_data
_data
:
any
[]
= []
destroyed
destroyed
:
boolean
Readonly
writable
writable
:
boolean
Readonly
writable
Corked
writable
Corked
:
number
Readonly
writable
Ended
writable
Ended
:
boolean
Readonly
writable
Finished
writable
Finished
:
boolean
Readonly
writable
High
Water
Mark
writable
High
Water
Mark
:
number
Readonly
writable
Length
writable
Length
:
number
Readonly
writable
Object
Mode
writable
Object
Mode
:
boolean
Methods
_destroy
_destroy
(
error
:
Error
|
null
, callback
:
(
error
?:
Error
|
null
)
=>
void
)
:
void
Parameters
error:
Error
|
null
callback:
(
error
?:
Error
|
null
)
=>
void
(
error
?:
Error
|
null
)
:
void
Parameters
Optional
error:
Error
|
null
Returns
void
Returns
void
_final
_final
(
callback
:
(
error
?:
Error
|
null
)
=>
void
)
:
void
Parameters
callback:
(
error
?:
Error
|
null
)
=>
void
(
error
?:
Error
|
null
)
:
void
Parameters
Optional
error:
Error
|
null
Returns
void
Returns
void
_write
_write
(
data
:
Buffer
|
string
, encoding
:
string
, callback
:
Function
)
:
void
Parameters
data:
Buffer
|
string
encoding:
string
callback:
Function
Returns
void
Optional
_writev
_writev
(
chunks
:
Array
<
{
chunk
:
any
;
encoding
:
string
}
>
, callback
:
(
error
?:
Error
|
null
)
=>
void
)
:
void
Parameters
chunks:
Array
<
{
chunk
:
any
;
encoding
:
string
}
>
callback:
(
error
?:
Error
|
null
)
=>
void
(
error
?:
Error
|
null
)
:
void
Parameters
Optional
error:
Error
|
null
Returns
void
Returns
void
add
Listener
add
Listener
(
event
:
"close"
, listener
:
(
)
=>
void
)
:
this
add
Listener
(
event
:
"drain"
, listener
:
(
)
=>
void
)
:
this
add
Listener
(
event
:
"error"
, listener
:
(
err
:
Error
)
=>
void
)
:
this
add
Listener
(
event
:
"finish"
, listener
:
(
)
=>
void
)
:
this
add
Listener
(
event
:
"pipe"
, listener
:
(
src
:
Readable
)
=>
void
)
:
this
add
Listener
(
event
:
"unpipe"
, listener
:
(
src
:
Readable
)
=>
void
)
:
this
add
Listener
(
event
:
string
|
symbol
, listener
:
(
...
args
:
any
[]
)
=>
void
)
:
this
Event emitter The defined events on documents including:
close
drain
error
finish
pipe
unpipe
Parameters
event:
"close"
listener:
(
)
=>
void
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"drain"
listener:
(
)
=>
void
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"error"
listener:
(
err
:
Error
)
=>
void
(
err
:
Error
)
:
void
Parameters
err:
Error
Returns
void
Returns
this
Parameters
event:
"finish"
listener:
(
)
=>
void
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"pipe"
listener:
(
src
:
Readable
)
=>
void
(
src
:
Readable
)
:
void
Parameters
src:
Readable
Returns
void
Returns
this
Parameters
event:
"unpipe"
listener:
(
src
:
Readable
)
=>
void
(
src
:
Readable
)
:
void
Parameters
src:
Readable
Returns
void
Returns
this
Parameters
event:
string
|
symbol
listener:
(
...
args
:
any
[]
)
=>
void
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
cork
cork
(
)
:
void
Returns
void
data
data
(
)
:
any
[]
Returns
any
[]
destroy
destroy
(
error
?:
Error
)
:
void
Parameters
Optional
error:
Error
Returns
void
emit
emit
(
event
:
"close"
)
:
boolean
emit
(
event
:
"drain"
)
:
boolean
emit
(
event
:
"error"
, err
:
Error
)
:
boolean
emit
(
event
:
"finish"
)
:
boolean
emit
(
event
:
"pipe"
, src
:
Readable
)
:
boolean
emit
(
event
:
"unpipe"
, src
:
Readable
)
:
boolean
emit
(
event
:
string
|
symbol
,
...
args
:
any
[]
)
:
boolean
Parameters
event:
"close"
Returns
boolean
Parameters
event:
"drain"
Returns
boolean
Parameters
event:
"error"
err:
Error
Returns
boolean
Parameters
event:
"finish"
Returns
boolean
Parameters
event:
"pipe"
src:
Readable
Returns
boolean
Parameters
event:
"unpipe"
src:
Readable
Returns
boolean
Parameters
event:
string
|
symbol
Rest
...
args:
any
[]
Returns
boolean
end
end
(
)
:
void
Returns
void
event
Names
event
Names
(
)
:
Array
<
string
|
symbol
>
Returns
Array
<
string
|
symbol
>
get
Max
Listeners
get
Max
Listeners
(
)
:
number
Returns
number
listener
Count
listener
Count
(
type
:
string
|
symbol
)
:
number
Parameters
type:
string
|
symbol
Returns
number
listeners
listeners
(
event
:
string
|
symbol
)
:
Function
[]
Parameters
event:
string
|
symbol
Returns
Function
[]
off
off
(
event
:
string
|
symbol
, listener
:
(
...
args
:
any
[]
)
=>
void
)
:
this
Parameters
event:
string
|
symbol
listener:
(
...
args
:
any
[]
)
=>
void
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
on
on
(
event
:
"close"
, listener
:
(
)
=>
void
)
:
this
on
(
event
:
"drain"
, listener
:
(
)
=>
void
)
:
this
on
(
event
:
"error"
, listener
:
(
err
:
Error
)
=>
void
)
:
this
on
(
event
:
"finish"
, listener
:
(
)
=>
void
)
:
this
on
(
event
:
"pipe"
, listener
:
(
src
:
Readable
)
=>
void
)
:
this
on
(
event
:
"unpipe"
, listener
:
(
src
:
Readable
)
=>
void
)
:
this
on
(
event
:
string
|
symbol
, listener
:
(
...
args
:
any
[]
)
=>
void
)
:
this
Parameters
event:
"close"
listener:
(
)
=>
void
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"drain"
listener:
(
)
=>
void
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"error"
listener:
(
err
:
Error
)
=>
void
(
err
:
Error
)
:
void
Parameters
err:
Error
Returns
void
Returns
this
Parameters
event:
"finish"
listener:
(
)
=>
void
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"pipe"
listener:
(
src
:
Readable
)
=>
void
(
src
:
Readable
)
:
void
Parameters
src:
Readable
Returns
void
Returns
this
Parameters
event:
"unpipe"
listener:
(
src
:
Readable
)
=>
void
(
src
:
Readable
)
:
void
Parameters
src:
Readable
Returns
void
Returns
this
Parameters
event:
string
|
symbol
listener:
(
...
args
:
any
[]
)
=>
void
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
once
once
(
event
:
"close"
, listener
:
(
)
=>
void
)
:
this
once
(
event
:
"drain"
, listener
:
(
)
=>
void
)
:
this
once
(
event
:
"error"
, listener
:
(
err
:
Error
)
=>
void
)
:
this
once
(
event
:
"finish"
, listener
:
(
)
=>
void
)
:
this
once
(
event
:
"pipe"
, listener
:
(
src
:
Readable
)
=>
void
)
:
this
once
(
event
:
"unpipe"
, listener
:
(
src
:
Readable
)
=>
void
)
:
this
once
(
event
:
string
|
symbol
, listener
:
(
...
args
:
any
[]
)
=>
void
)
:
this
Parameters
event:
"close"
listener:
(
)
=>
void
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"drain"
listener:
(
)
=>
void
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"error"
listener:
(
err
:
Error
)
=>
void
(
err
:
Error
)
:
void
Parameters
err:
Error
Returns
void
Returns
this
Parameters
event:
"finish"
listener:
(
)
=>
void
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"pipe"
listener:
(
src
:
Readable
)
=>
void
(
src
:
Readable
)
:
void
Parameters
src:
Readable
Returns
void
Returns
this
Parameters
event:
"unpipe"
listener:
(
src
:
Readable
)
=>
void
(
src
:
Readable
)
:
void
Parameters
src:
Readable
Returns
void
Returns
this
Parameters
event:
string
|
symbol
listener:
(
...
args
:
any
[]
)
=>
void
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
pipe
pipe<T>
(
destination
:
T
, options
?:
undefined
|
{
end
?:
undefined
|
false
|
true
}
)
:
T
Type parameters
T
:
WritableStream
Parameters
destination:
T
Optional
options:
undefined
|
{
end
?:
undefined
|
false
|
true
}
Returns
T
prepend
Listener
prepend
Listener
(
event
:
"close"
, listener
:
(
)
=>
void
)
:
this
prepend
Listener
(
event
:
"drain"
, listener
:
(
)
=>
void
)
:
this
prepend
Listener
(
event
:
"error"
, listener
:
(
err
:
Error
)
=>
void
)
:
this
prepend
Listener
(
event
:
"finish"
, listener
:
(
)
=>
void
)
:
this
prepend
Listener
(
event
:
"pipe"
, listener
:
(
src
:
Readable
)
=>
void
)
:
this
prepend
Listener
(
event
:
"unpipe"
, listener
:
(
src
:
Readable
)
=>
void
)
:
this
prepend
Listener
(
event
:
string
|
symbol
, listener
:
(
...
args
:
any
[]
)
=>
void
)
:
this
Parameters
event:
"close"
listener:
(
)
=>
void
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"drain"
listener:
(
)
=>
void
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"error"
listener:
(
err
:
Error
)
=>
void
(
err
:
Error
)
:
void
Parameters
err:
Error
Returns
void
Returns
this
Parameters
event:
"finish"
listener:
(
)
=>
void
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"pipe"
listener:
(
src
:
Readable
)
=>
void
(
src
:
Readable
)
:
void
Parameters
src:
Readable
Returns
void
Returns
this
Parameters
event:
"unpipe"
listener:
(
src
:
Readable
)
=>
void
(
src
:
Readable
)
:
void
Parameters
src:
Readable
Returns
void
Returns
this
Parameters
event:
string
|
symbol
listener:
(
...
args
:
any
[]
)
=>
void
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
prepend
Once
Listener
prepend
Once
Listener
(
event
:
"close"
, listener
:
(
)
=>
void
)
:
this
prepend
Once
Listener
(
event
:
"drain"
, listener
:
(
)
=>
void
)
:
this
prepend
Once
Listener
(
event
:
"error"
, listener
:
(
err
:
Error
)
=>
void
)
:
this
prepend
Once
Listener
(
event
:
"finish"
, listener
:
(
)
=>
void
)
:
this
prepend
Once
Listener
(
event
:
"pipe"
, listener
:
(
src
:
Readable
)
=>
void
)
:
this
prepend
Once
Listener
(
event
:
"unpipe"
, listener
:
(
src
:
Readable
)
=>
void
)
:
this
prepend
Once
Listener
(
event
:
string
|
symbol
, listener
:
(
...
args
:
any
[]
)
=>
void
)
:
this
Parameters
event:
"close"
listener:
(
)
=>
void
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"drain"
listener:
(
)
=>
void
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"error"
listener:
(
err
:
Error
)
=>
void
(
err
:
Error
)
:
void
Parameters
err:
Error
Returns
void
Returns
this
Parameters
event:
"finish"
listener:
(
)
=>
void
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"pipe"
listener:
(
src
:
Readable
)
=>
void
(
src
:
Readable
)
:
void
Parameters
src:
Readable
Returns
void
Returns
this
Parameters
event:
"unpipe"
listener:
(
src
:
Readable
)
=>
void
(
src
:
Readable
)
:
void
Parameters
src:
Readable
Returns
void
Returns
this
Parameters
event:
string
|
symbol
listener:
(
...
args
:
any
[]
)
=>
void
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
raw
Listeners
raw
Listeners
(
event
:
string
|
symbol
)
:
Function
[]
Parameters
event:
string
|
symbol
Returns
Function
[]
remove
All
Listeners
remove
All
Listeners
(
event
?:
string
|
symbol
)
:
this
Parameters
Optional
event:
string
|
symbol
Returns
this
remove
Listener
remove
Listener
(
event
:
"close"
, listener
:
(
)
=>
void
)
:
this
remove
Listener
(
event
:
"drain"
, listener
:
(
)
=>
void
)
:
this
remove
Listener
(
event
:
"error"
, listener
:
(
err
:
Error
)
=>
void
)
:
this
remove
Listener
(
event
:
"finish"
, listener
:
(
)
=>
void
)
:
this
remove
Listener
(
event
:
"pipe"
, listener
:
(
src
:
Readable
)
=>
void
)
:
this
remove
Listener
(
event
:
"unpipe"
, listener
:
(
src
:
Readable
)
=>
void
)
:
this
remove
Listener
(
event
:
string
|
symbol
, listener
:
(
...
args
:
any
[]
)
=>
void
)
:
this
Parameters
event:
"close"
listener:
(
)
=>
void
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"drain"
listener:
(
)
=>
void
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"error"
listener:
(
err
:
Error
)
=>
void
(
err
:
Error
)
:
void
Parameters
err:
Error
Returns
void
Returns
this
Parameters
event:
"finish"
listener:
(
)
=>
void
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"pipe"
listener:
(
src
:
Readable
)
=>
void
(
src
:
Readable
)
:
void
Parameters
src:
Readable
Returns
void
Returns
this
Parameters
event:
"unpipe"
listener:
(
src
:
Readable
)
=>
void
(
src
:
Readable
)
:
void
Parameters
src:
Readable
Returns
void
Returns
this
Parameters
event:
string
|
symbol
listener:
(
...
args
:
any
[]
)
=>
void
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
set
Default
Encoding
set
Default
Encoding
(
encoding
:
string
)
:
this
Parameters
encoding:
string
Returns
this
set
Max
Listeners
set
Max
Listeners
(
n
:
number
)
:
this
Parameters
n:
number
Returns
this
uncork
uncork
(
)
:
void
Returns
void
write
write
(
data
:
Buffer
|
string
)
:
boolean
Parameters
data:
Buffer
|
string
Returns
boolean
Typed
Introduction
Community
Code of
Conduct
Globals
node
Arg
Parser
Result
node
Mock
Writable
constructor
_data
destroyed
writable
writable
Corked
writable
Ended
writable
Finished
writable
High
Water
Mark
writable
Length
writable
Object
Mode
_destroy
_final
_write
_writev
add
Listener
cork
data
destroy
emit
end
event
Names
get
Max
Listeners
listener
Count
listeners
off
on
once
pipe
prepend
Listener
prepend
Once
Listener
raw
Listeners
remove
All
Listeners
remove
Listener
set
Default
Encoding
set
Max
Listeners
uncork
write
Generated using
TypeDoc
Event emitter The defined events on documents including: