WritableStream interface
- 扩展
属性
writable |
方法
end(Buffer, Function) | |
end(Function) | |
end(string, Function) | |
end(string, string, Function) | |
write(Buffer | string, Function) | |
write(string, string, Function) |
继承的方法
属性详细信息
writable
writable: boolean
属性值
boolean
方法详细信息
end(Buffer, Function)
function end(buffer: Buffer, cb?: Function)
参数
- buffer
-
Buffer
- cb
-
Function
end(Function)
function end(cb?: Function)
参数
- cb
-
Function
end(string, Function)
function end(str: string, cb?: Function)
参数
- str
-
string
- cb
-
Function
end(string, string, Function)
function end(str: string, encoding?: string, cb?: Function)
参数
- str
-
string
- encoding
-
string
- cb
-
Function
write(Buffer | string, Function)
function write(buffer: Buffer | string, cb?: Function): boolean
参数
- buffer
-
Buffer | string
- cb
-
Function
返回
boolean
write(string, string, Function)
function write(str: string, encoding?: string, cb?: Function): boolean
参数
- str
-
string
- encoding
-
string
- cb
-
Function
返回
boolean
继承的方法详细信息
addListener(string | symbol, (args: any[]) => void)
function addListener(event: string | symbol, listener: (args: any[]) => void): this
参数
- event
-
string | symbol
- listener
-
(args: any[]) => void
返回
this
emit(string | symbol, any[])
function emit(event: string | symbol, args: any[]): boolean
参数
- event
-
string | symbol
- args
-
any[]
返回
boolean
继承自
eventNames()
getMaxListeners()
function getMaxListeners(): number
返回
number
继承自
listenerCount(string | symbol)
function listenerCount(type: string | symbol): number
参数
- type
-
string | symbol
返回
number
继承自
listeners(string | symbol)
function listeners(event: string | symbol): Function[]
参数
- event
-
string | symbol
返回
Function[]
off(string | symbol, (args: any[]) => void)
function off(event: string | symbol, listener: (args: any[]) => void): this
参数
- event
-
string | symbol
- listener
-
(args: any[]) => void
返回
this
on(string | symbol, (args: any[]) => void)
function on(event: string | symbol, listener: (args: any[]) => void): this
参数
- event
-
string | symbol
- listener
-
(args: any[]) => void
返回
this
once(string | symbol, (args: any[]) => void)
function once(event: string | symbol, listener: (args: any[]) => void): this
参数
- event
-
string | symbol
- listener
-
(args: any[]) => void
返回
this
prependListener(string | symbol, (args: any[]) => void)
function prependListener(event: string | symbol, listener: (args: any[]) => void): this
参数
- event
-
string | symbol
- listener
-
(args: any[]) => void
返回
this
prependOnceListener(string | symbol, (args: any[]) => void)
function prependOnceListener(event: string | symbol, listener: (args: any[]) => void): this
参数
- event
-
string | symbol
- listener
-
(args: any[]) => void
返回
this
rawListeners(string | symbol)
function rawListeners(event: string | symbol): Function[]
参数
- event
-
string | symbol
返回
Function[]
removeAllListeners(string | symbol)
function removeAllListeners(event?: string | symbol): this
参数
- event
-
string | symbol
返回
this
removeListener(string | symbol, (args: any[]) => void)
function removeListener(event: string | symbol, listener: (args: any[]) => void): this
参数
- event
-
string | symbol
- listener
-
(args: any[]) => void
返回
this