(options: {
readonly decode: (input: E) => T
readonly encode: (input: T) => E
})
| 438 | * @since 3.10.0 |
| 439 | */ |
| 440 | export function transform<T, E>(options: { |
| 441 | readonly decode: (input: E) => T |
| 442 | readonly encode: (input: T) => E |
| 443 | }): Transformation<T, E> { |
| 444 | return new Transformation( |
| 445 | SchemaGetter.transform(options.decode), |
| 446 | SchemaGetter.transform(options.encode) |
| 447 | ) |
| 448 | } |
| 449 | |
| 450 | /** |
| 451 | * Creates a `Transformation` where decode and encode operate on `Option` |
no test coverage detected