( schema: S )
| 156 | * @since 4.0.0 |
| 157 | */ |
| 158 | export const encodeSchema = <S extends Schema.Constraint>( |
| 159 | schema: S |
| 160 | ) => |
| 161 | <IE = never, Done = unknown>(): Channel.Channel< |
| 162 | Arr.NonEmptyReadonlyArray<Uint8Array>, |
| 163 | NdjsonError | Schema.SchemaError | IE, |
| 164 | Done, |
| 165 | Arr.NonEmptyReadonlyArray<S["Type"]>, |
| 166 | IE, |
| 167 | Done, |
| 168 | S["EncodingServices"] |
| 169 | > => Channel.pipeTo(ChannelSchema.encode(schema)(), encode()) |
| 170 | |
| 171 | /** |
| 172 | * Creates an NDJSON string encoder channel for values of a schema. |