WritableStream interface

Extends

属性

writable

方法

end(Buffer, Function)
end(Function)
end(string, Function)
end(string, string, Function)
write(Buffer | string, Function)
write(string, string, Function)

继承的方法

addListener(string | symbol, (args: any[]) => void)
emit(string | symbol, any[])
eventNames()
getMaxListeners()
listenerCount(string | symbol)
listeners(string | symbol)
off(string | symbol, (args: any[]) => void)
on(string | symbol, (args: any[]) => void)
once(string | symbol, (args: any[]) => void)
prependListener(string | symbol, (args: any[]) => void)
prependOnceListener(string | symbol, (args: any[]) => void)
rawListeners(string | symbol)
removeAllListeners(string | symbol)
removeListener(string | symbol, (args: any[]) => void)
setMaxListeners(number)

属性详细信息

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

继承自IEventEmitter.addListener

emit(string | symbol, any[])

function emit(event: string | symbol, args: any[]): boolean

参数

event

string | symbol

args

any[]

返回

boolean

继承自IEventEmitter.emit

eventNames()

function eventNames(): Array<string | symbol>

返回

Array<string | symbol>

继承自IEventEmitter.eventNames

getMaxListeners()

function getMaxListeners(): number

返回

number

继承自IEventEmitter.getMaxListeners

listenerCount(string | symbol)

function listenerCount(type: string | symbol): number

参数

type

string | symbol

返回

number

继承自IEventEmitter.listenerCount

listeners(string | symbol)

function listeners(event: string | symbol): Function[]

参数

event

string | symbol

返回

Function[]

继承自IEventEmitter.listeners

off(string | symbol, (args: any[]) => void)

function off(event: string | symbol, listener: (args: any[]) => void): this

参数

event

string | symbol

listener

(args: any[]) => void

返回

this

继承自IEventEmitter.off

on(string | symbol, (args: any[]) => void)

function on(event: string | symbol, listener: (args: any[]) => void): this

参数

event

string | symbol

listener

(args: any[]) => void

返回

this

继承自IEventEmitter.on

once(string | symbol, (args: any[]) => void)

function once(event: string | symbol, listener: (args: any[]) => void): this

参数

event

string | symbol

listener

(args: any[]) => void

返回

this

继承自IEventEmitter.once

prependListener(string | symbol, (args: any[]) => void)

function prependListener(event: string | symbol, listener: (args: any[]) => void): this

参数

event

string | symbol

listener

(args: any[]) => void

返回

this

继承自IEventEmitter.prependListener

prependOnceListener(string | symbol, (args: any[]) => void)

function prependOnceListener(event: string | symbol, listener: (args: any[]) => void): this

参数

event

string | symbol

listener

(args: any[]) => void

返回

this

继承自IEventEmitter.prependOnceListener

rawListeners(string | symbol)

function rawListeners(event: string | symbol): Function[]

参数

event

string | symbol

返回

Function[]

继承自IEventEmitter.rawListeners

removeAllListeners(string | symbol)

function removeAllListeners(event?: string | symbol): this

参数

event

string | symbol

返回

this

继承自IEventEmitter.removeAllListeners

removeListener(string | symbol, (args: any[]) => void)

function removeListener(event: string | symbol, listener: (args: any[]) => void): this

参数

event

string | symbol

listener

(args: any[]) => void

返回

this

继承自IEventEmitter.removeListener

setMaxListeners(number)

function setMaxListeners(n: number): this

参数

n

number

返回

this

继承自IEventEmitter.setMaxListeners