| 199 | * @since 4.0.0 |
| 200 | */ |
| 201 | export const decodeSchema = <S extends Schema.Constraint>( |
| 202 | schema: S |
| 203 | ) => |
| 204 | <IE = never, Done = unknown>(): Channel.Channel< |
| 205 | Arr.NonEmptyReadonlyArray<S["Type"]>, |
| 206 | Schema.SchemaError | MsgPackError | IE, |
| 207 | Done, |
| 208 | Arr.NonEmptyReadonlyArray<Uint8Array<ArrayBuffer>>, |
| 209 | IE, |
| 210 | Done, |
| 211 | S["DecodingServices"] |
| 212 | > => Channel.pipeTo(decode<IE, Done>(), ChannelSchema.decodeUnknown(schema)()) |
| 213 | |
| 214 | /** |
| 215 | * Wraps a bidirectional byte channel with MessagePack encoding and decoding. |