( schema: S )
| 101 | * @since 4.0.0 |
| 102 | */ |
| 103 | export const encodeSchema = <S extends Schema.Constraint>( |
| 104 | schema: S |
| 105 | ) => |
| 106 | <IE = never, Done = unknown>(): Channel.Channel< |
| 107 | Arr.NonEmptyReadonlyArray<Uint8Array<ArrayBuffer>>, |
| 108 | MsgPackError | Schema.SchemaError | IE, |
| 109 | Done, |
| 110 | Arr.NonEmptyReadonlyArray<S["Type"]>, |
| 111 | IE, |
| 112 | Done, |
| 113 | S["EncodingServices"] |
| 114 | > => Channel.pipeTo(ChannelSchema.encode(schema)(), encode()) |
| 115 | |
| 116 | /** |
| 117 | * Creates a channel that decodes MessagePack byte chunks into values. |