(options: {
readonly decode: (input: E) => T
readonly encode: (input: T) => E
})
| 333 | * @since 3.10.0 |
| 334 | */ |
| 335 | export function transform<T, E>(options: { |
| 336 | readonly decode: (input: E) => T |
| 337 | readonly encode: (input: T) => E |
| 338 | }): Transformation<T, E> { |
| 339 | return new Transformation( |
| 340 | SchemaGetter.transform(options.decode), |
| 341 | SchemaGetter.transform(options.encode) |
| 342 | ) |
| 343 | } |
| 344 | |
| 345 | /** |
| 346 | * Creates a `Transformation` where decode and encode operate on `Option` |
no test coverage detected