ChainGraph API Documentation / @badaitech/chaingraph-types / PortStream
Function: PortStream()
PortStream(
config):PropertyDecorator
Defined in: packages/chaingraph-types/src/decorator/stream.decorator.ts:28
PortStream decorator for defining a stream port.
This decorator automatically sets the port type to "stream". You can optionally pass additional configuration options (such as "itemConfig" for specifying the type and defaultValue for stream items).
Example usage:
// Define a stream port for strings @PortStream({ itemConfig: { type: 'string', defaultValue: '' } }) public inputStream: MultiChannel<string>;
Parameters
config
Omit<PortDecoratorOptions<"stream">, "type">
Optional configuration for the stream port (excluding the "type" property).
Returns
PropertyDecorator