- make<TToken, TOptions, TValue>(f: ((data: Data<TToken, TOptions>, i: number) => TValue)): Matcher<TToken, TOptions, TValue>
-
Parameters
-
f: ((data: Data<TToken, TOptions>, i: number) => TValue)
-
- (data: Data<TToken, TOptions>, i: number): TValue
-
Parameters
-
data: Data<TToken, TOptions>
-
i: number
Returns TValue
Returns Matcher<TToken, TOptions, TValue>
Make a Matcher that always succeeds and makes a value with provided function without consuming input.
Use emit if you want to emit the same value every time.
Use action if you only need a side effect.
Use token if you want to make a value based on an input token.