Type Aliases
MatchRule
MatchRule<T, R>: R extends ((input: T) => infer O) ? O : never
Type Parameters
Pattern
Pattern<I, O>: ((input: I) => O) | [I, O]
Type Parameters
Rule
Rule<Format>: Format extends [infer I, infer O] ? ((input: I) => O) : Format extends ((input: infer I) => infer O) ? ((input: I) => O) : never
Type Parameters
Format consists of multiple encoding defines what input type
I
maps to what output typeO
. It can be represented via function type or a [I, O] tuple.