( schema: S )
| 115 | * @since 4.0.0 |
| 116 | */ |
| 117 | export const encodeSchema = <S extends Schema.Constraint>( |
| 118 | schema: S |
| 119 | ) => |
| 120 | <IE = never, Done = unknown>(): Channel.Channel< |
| 121 | Arr.NonEmptyReadonlyArray<Uint8Array>, |
| 122 | NdjsonError | Schema.SchemaError | IE, |
| 123 | Done, |
| 124 | Arr.NonEmptyReadonlyArray<S["Type"]>, |
| 125 | IE, |
| 126 | Done, |
| 127 | S["EncodingServices"] |
| 128 | > => Channel.pipeTo(ChannelSchema.encode(schema)(), encode()) |
| 129 | |
| 130 | /** |
| 131 | * Creates an NDJSON string encoder channel for values of a schema. |