Decorators
TypeSpec.Streams
Section titled “TypeSpec.Streams”@streamOf
Section titled “@streamOf”Specify that a model represents a stream protocol type whose data is described
by Type
.
@TypeSpec.Streams.streamOf(type: unknown)
Target
Section titled “Target”Model
Parameters
Section titled “Parameters”Name | Type | Description |
---|---|---|
type | unknown | The type that models the underlying data of the stream. |
Examples
Section titled “Examples”model Message { id: string; text: string;}
@streamOf(Message)model Response { @body body: string;}