( target: Schema.Constraint, layout: Layout, mode: Mode, trusted: Trusted | undefined, successOnly = false )
| 206 | } |
| 207 | |
| 208 | function assembleCodec<S extends Schema.Constraint>( |
| 209 | target: Schema.Constraint, |
| 210 | layout: Layout, |
| 211 | mode: Mode, |
| 212 | trusted: Trusted | undefined, |
| 213 | successOnly = false |
| 214 | ): toCodec<S> { |
| 215 | return (Schema.Uint8Array as Schema.instanceOf<Uint8Array<ArrayBuffer>>).pipe( |
| 216 | Schema.decodeTo(target, makeTransformation(layout, mode, trusted, successOnly)) |
| 217 | ) as unknown as toCodec<S> |
| 218 | } |
| 219 | |
| 220 | /** |
| 221 | * Encodes one frame without the schema pass {@link toCodec} wraps around it. |
no test coverage detected