SubscribableStream class
生バイトを消耗品フォームに変換するために PayloadAssembler
と組み合わせて動作する Duplex
の拡張。
- Extends
-
Duplex
コンストラクター
Subscribable |
SubscribableStream クラスの新しいインスタンスを初期化します。 |
プロパティ
length |
継承されたプロパティ
default |
|
readable | |
readable |
|
readable |
|
readable |
|
writable | |
writable |
|
writable |
メソッド
subscribe((chunk: any) => void) | データを受信するときにストリームをサブスクライブします。 |
継承されたメソッド
コンストラクターの詳細
SubscribableStream(DuplexOptions)
SubscribableStream クラスの新しいインスタンスを初期化します。
new SubscribableStream(options?: DuplexOptions)
パラメーター
- options
-
DuplexOptions
このストリームを構築するときに使用する DuplexOptions
。
プロパティの詳細
length
length: number
プロパティ値
number
継承されたプロパティの詳細
defaultMaxListeners
static defaultMaxListeners: number
プロパティ値
number
EventEmitter.defaultMaxListeners から継承された
readable
readable: boolean
プロパティ値
boolean
readable.readable から継承された
readableFlowing
readableFlowing: boolean | null
プロパティ値
boolean | null
readable.readableFlowing から継承
readableHighWaterMark
readableHighWaterMark: number
プロパティ値
number
readable.readableHighWaterMark から継承
readableLength
readableLength: number
プロパティ値
number
から継承 Readable.readableLength
writable
writable: boolean
プロパティ値
boolean
Inherited From Duplex.writable
writableHighWaterMark
writableHighWaterMark: number
プロパティ値
number
Duplex.writableHighWaterMark から継承された
writableLength
writableLength: number
プロパティ値
number
Inherited From Duplex.writableLength
メソッドの詳細
subscribe((chunk: any) => void)
データを受信するときにストリームをサブスクライブします。
function subscribe(onData: (chunk: any) => void)
パラメーター
- onData
-
(chunk: any) => void
onData の実行時に呼び出されるコールバック。
継承済みメソッドの詳細
addListener("close", () => void)
イベント エミッタ: 以下を含むドキュメントで定義されたイベント。
- 閉める
- データ
- 終わり
- 読みやすい
- エラー
function addListener(event: "close", listener: () => void): this
パラメーター
- event
-
"close"
- listener
-
() => void
戻り値
this
readable.addListener から継承
addListener("data", (chunk: any) => void)
function addListener(event: "data", listener: (chunk: any) => void): this
パラメーター
- event
-
"data"
- listener
-
(chunk: any) => void
戻り値
this
readable.addListener から継承
addListener("end", () => void)
function addListener(event: "end", listener: () => void): this
パラメーター
- event
-
"end"
- listener
-
() => void
戻り値
this
readable.addListener から継承
addListener("error", (err: Error) => void)
function addListener(event: "error", listener: (err: Error) => void): this
パラメーター
- event
-
"error"
- listener
-
(err: Error) => void
戻り値
this
readable.addListener から継承
addListener("readable", () => void)
function addListener(event: "readable", listener: () => void): this
パラメーター
- event
-
"readable"
- listener
-
() => void
戻り値
this
readable.addListener から継承
addListener(string | symbol, (args: any[]) => void)
function addListener(event: string | symbol, listener: (args: any[]) => void): this
パラメーター
- event
-
string | symbol
- listener
-
(args: any[]) => void
戻り値
this
readable.addListener から継承
cork()
function cork()
duplex.cor から継承された
destroy(Error)
function destroy(error?: Error)
パラメーター
- error
-
Error
readable.destroy から継承された
emit("close")
function emit(event: "close"): boolean
パラメーター
- event
-
"close"
戻り値
boolean
から継承 Readable.emit
emit("data", any)
function emit(event: "data", chunk: any): boolean
パラメーター
- event
-
"data"
- chunk
-
any
戻り値
boolean
から継承 Readable.emit
emit("end")
function emit(event: "end"): boolean
パラメーター
- event
-
"end"
戻り値
boolean
から継承 Readable.emit
emit("error", Error)
function emit(event: "error", err: Error): boolean
パラメーター
- event
-
"error"
- err
-
Error
戻り値
boolean
から継承 Readable.emit
emit("readable")
function emit(event: "readable"): boolean
パラメーター
- event
-
"readable"
戻り値
boolean
から継承 Readable.emit
emit(string | symbol, any[])
function emit(event: string | symbol, args: any[]): boolean
パラメーター
- event
-
string | symbol
- args
-
any[]
戻り値
boolean
から継承 Readable.emit
end(() => void)
function end(cb?: () => void)
パラメーター
- cb
-
() => void
Duplex.end から継承された
end(any, () => void)
function end(chunk: any, cb?: () => void)
パラメーター
- chunk
-
any
- cb
-
() => void
Duplex.end から継承された
end(any, string, () => void)
function end(chunk: any, encoding?: string, cb?: () => void)
パラメーター
- chunk
-
any
- encoding
-
string
- cb
-
() => void
Duplex.end から継承された
eventNames()
function eventNames(): Array<string | symbol>
戻り値
Array<string | symbol>
EventEmitter.eventNames から継承された
getMaxListeners()
function getMaxListeners(): number
戻り値
number
EventEmitter.getMaxListeners から継承された
isPaused()
function isPaused(): boolean
戻り値
boolean
から継承 Readable.isPaused
listenerCount(EventEmitter, string | symbol)
警告
この API は非推奨になりました。
since v4.0.0
static function listenerCount(emitter: EventEmitter, event: string | symbol): number
パラメーター
- emitter
-
EventEmitter
- event
-
string | symbol
戻り値
number
eventEmitter.listenerCount から継承
listenerCount(string | symbol)
function listenerCount(type: string | symbol): number
パラメーター
- type
-
string | symbol
戻り値
number
eventEmitter.listenerCount から継承
listeners(string | symbol)
function listeners(event: string | symbol): Function[]
パラメーター
- event
-
string | symbol
戻り値
Function[]
EventEmitter.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
EventEmitter.off から継承された
on("close", () => void)
function on(event: "close", listener: () => void): this
パラメーター
- event
-
"close"
- listener
-
() => void
戻り値
this
から継承 読み取り可能.on
on("data", (chunk: any) => void)
function on(event: "data", listener: (chunk: any) => void): this
パラメーター
- event
-
"data"
- listener
-
(chunk: any) => void
戻り値
this
から継承 読み取り可能.on
on("end", () => void)
function on(event: "end", listener: () => void): this
パラメーター
- event
-
"end"
- listener
-
() => void
戻り値
this
から継承 読み取り可能.on
on("error", (err: Error) => void)
function on(event: "error", listener: (err: Error) => void): this
パラメーター
- event
-
"error"
- listener
-
(err: Error) => void
戻り値
this
から継承 読み取り可能.on
on("readable", () => void)
function on(event: "readable", listener: () => void): this
パラメーター
- event
-
"readable"
- listener
-
() => void
戻り値
this
から継承 読み取り可能.on
on(string | symbol, (args: any[]) => void)
function on(event: string | symbol, listener: (args: any[]) => void): this
パラメーター
- event
-
string | symbol
- listener
-
(args: any[]) => void
戻り値
this
から継承 読み取り可能.on
once("close", () => void)
function once(event: "close", listener: () => void): this
パラメーター
- event
-
"close"
- listener
-
() => void
戻り値
this
から継承 読み取り可能.once
once("data", (chunk: any) => void)
function once(event: "data", listener: (chunk: any) => void): this
パラメーター
- event
-
"data"
- listener
-
(chunk: any) => void
戻り値
this
から継承 読み取り可能.once
once("end", () => void)
function once(event: "end", listener: () => void): this
パラメーター
- event
-
"end"
- listener
-
() => void
戻り値
this
から継承 読み取り可能.once
once("error", (err: Error) => void)
function once(event: "error", listener: (err: Error) => void): this
パラメーター
- event
-
"error"
- listener
-
(err: Error) => void
戻り値
this
から継承 読み取り可能.once
once("readable", () => void)
function once(event: "readable", listener: () => void): this
パラメーター
- event
-
"readable"
- listener
-
() => void
戻り値
this
から継承 読み取り可能.once
once(NodeEventTarget, string | symbol)
static function once(emitter: NodeEventTarget, event: string | symbol): Promise<any[]>
パラメーター
- emitter
-
NodeEventTarget
- event
-
string | symbol
戻り値
Promise<any[]>
EventEmitter.once から継承された
once(string | symbol, (args: any[]) => void)
function once(event: string | symbol, listener: (args: any[]) => void): this
パラメーター
- event
-
string | symbol
- listener
-
(args: any[]) => void
戻り値
this
から継承 読み取り可能.once
pause()
function pause(): this
戻り値
this
readable.pause から継承された
pipe<T>(T, { end?: boolean })
function pipe<T>(destination: T, options?: { end?: boolean }): T
パラメーター
- destination
-
T
- options
-
{ end?: boolean }
戻り値
T
internal.pipe から継承
prependListener("close", () => void)
function prependListener(event: "close", listener: () => void): this
パラメーター
- event
-
"close"
- listener
-
() => void
戻り値
this
Inherited From Readable.prependListener
prependListener("data", (chunk: any) => void)
function prependListener(event: "data", listener: (chunk: any) => void): this
パラメーター
- event
-
"data"
- listener
-
(chunk: any) => void
戻り値
this
Inherited From Readable.prependListener
prependListener("end", () => void)
function prependListener(event: "end", listener: () => void): this
パラメーター
- event
-
"end"
- listener
-
() => void
戻り値
this
Inherited From Readable.prependListener
prependListener("error", (err: Error) => void)
function prependListener(event: "error", listener: (err: Error) => void): this
パラメーター
- event
-
"error"
- listener
-
(err: Error) => void
戻り値
this
Inherited From Readable.prependListener
prependListener("readable", () => void)
function prependListener(event: "readable", listener: () => void): this
パラメーター
- event
-
"readable"
- listener
-
() => void
戻り値
this
Inherited From Readable.prependListener
prependListener(string | symbol, (args: any[]) => void)
function prependListener(event: string | symbol, listener: (args: any[]) => void): this
パラメーター
- event
-
string | symbol
- listener
-
(args: any[]) => void
戻り値
this
Inherited From Readable.prependListener
prependOnceListener("close", () => void)
function prependOnceListener(event: "close", listener: () => void): this
パラメーター
- event
-
"close"
- listener
-
() => void
戻り値
this
Inherited From Readable.prependOnceListener
prependOnceListener("data", (chunk: any) => void)
function prependOnceListener(event: "data", listener: (chunk: any) => void): this
パラメーター
- event
-
"data"
- listener
-
(chunk: any) => void
戻り値
this
Inherited From Readable.prependOnceListener
prependOnceListener("end", () => void)
function prependOnceListener(event: "end", listener: () => void): this
パラメーター
- event
-
"end"
- listener
-
() => void
戻り値
this
Inherited From Readable.prependOnceListener
prependOnceListener("error", (err: Error) => void)
function prependOnceListener(event: "error", listener: (err: Error) => void): this
パラメーター
- event
-
"error"
- listener
-
(err: Error) => void
戻り値
this
Inherited From Readable.prependOnceListener
prependOnceListener("readable", () => void)
function prependOnceListener(event: "readable", listener: () => void): this
パラメーター
- event
-
"readable"
- listener
-
() => void
戻り値
this
Inherited From Readable.prependOnceListener
prependOnceListener(string | symbol, (args: any[]) => void)
function prependOnceListener(event: string | symbol, listener: (args: any[]) => void): this
パラメーター
- event
-
string | symbol
- listener
-
(args: any[]) => void
戻り値
this
Inherited From Readable.prependOnceListener
push(any, string)
function push(chunk: any, encoding?: string): boolean
パラメーター
- chunk
-
any
- encoding
-
string
戻り値
boolean
readable.push から継承された
rawListeners(string | symbol)
function rawListeners(event: string | symbol): Function[]
パラメーター
- event
-
string | symbol
戻り値
Function[]
EventEmitter.rawListeners から継承された
read(number)
function read(size?: number): any
パラメーター
- size
-
number
戻り値
any
readable.read から継承
removeAllListeners(string | symbol)
function removeAllListeners(event?: string | symbol): this
パラメーター
- event
-
string | symbol
戻り値
this
EventEmitter.removeAllListeners から継承された
removeListener("close", () => void)
function removeListener(event: "close", listener: () => void): this
パラメーター
- event
-
"close"
- listener
-
() => void
戻り値
this
readable.removeListener から継承
removeListener("data", (chunk: any) => void)
function removeListener(event: "data", listener: (chunk: any) => void): this
パラメーター
- event
-
"data"
- listener
-
(chunk: any) => void
戻り値
this
readable.removeListener から継承
removeListener("end", () => void)
function removeListener(event: "end", listener: () => void): this
パラメーター
- event
-
"end"
- listener
-
() => void
戻り値
this
readable.removeListener から継承
removeListener("error", (err: Error) => void)
function removeListener(event: "error", listener: (err: Error) => void): this
パラメーター
- event
-
"error"
- listener
-
(err: Error) => void
戻り値
this
readable.removeListener から継承
removeListener("readable", () => void)
function removeListener(event: "readable", listener: () => void): this
パラメーター
- event
-
"readable"
- listener
-
() => void
戻り値
this
readable.removeListener から継承
removeListener(string | symbol, (args: any[]) => void)
function removeListener(event: string | symbol, listener: (args: any[]) => void): this
パラメーター
- event
-
string | symbol
- listener
-
(args: any[]) => void
戻り値
this
readable.removeListener から継承
resume()
function resume(): this
戻り値
this
readable.resume から継承された
setDefaultEncoding(string)
function setDefaultEncoding(encoding: string): this
パラメーター
- encoding
-
string
戻り値
this
Duplex.setDefaultEncoding から継承された
setEncoding(string)
function setEncoding(encoding: string): this
パラメーター
- encoding
-
string
戻り値
this
から継承 Readable.setEncoding
setMaxListeners(number)
function setMaxListeners(n: number): this
パラメーター
- n
-
number
戻り値
this
EventEmitter.setMaxListeners から継承された
uncork()
function uncork()
Duplex.uncork から継承された
unpipe(WritableStream)
function unpipe(destination?: WritableStream): this
パラメーター
- destination
-
WritableStream
戻り値
this
readable.unpipe 継承された
unshift(any)
function unshift(chunk: any)
パラメーター
- chunk
-
any
から継承 Readable.unshift
wrap(ReadableStream)
function wrap(oldStream: ReadableStream): this
パラメーター
- oldStream
-
ReadableStream
戻り値
this
readable.wrap から継承
write(any, (error: Error | null | undefined) => void)
function write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean
パラメーター
- chunk
-
any
- cb
-
(error: Error | null | undefined) => void
戻り値
boolean
Duplex.write から継承された
write(any, string, (error: Error | null | undefined) => void)
function write(chunk: any, encoding?: string, cb?: (error: Error | null | undefined) => void): boolean
パラメーター
- chunk
-
any
- encoding
-
string
- cb
-
(error: Error | null | undefined) => void
戻り値
boolean
Duplex.write から継承された