()
| 6508 | * @since 4.0.0 |
| 6509 | */ |
| 6510 | export function link<T>() { |
| 6511 | return <To extends Constraint>( |
| 6512 | encodeTo: To, |
| 6513 | transformation: { |
| 6514 | readonly decode: SchemaGetter.Getter<T, NoInfer<To["Type"]>> |
| 6515 | readonly encode: SchemaGetter.Getter<NoInfer<To["Type"]>, T> |
| 6516 | } |
| 6517 | ): SchemaAST.Link => { |
| 6518 | return new SchemaAST.Link(encodeTo.ast, SchemaTransformation.make(transformation)) |
| 6519 | } |
| 6520 | } |
| 6521 | |
| 6522 | // ----------------------------------------------------------------------------- |
| 6523 | // Checks |
no test coverage detected