- match<A, T, E>(params): A | T | E
Type Parameters
- A = Promise<Value>
- T = Promise<Value>
- E = false
Parameters
- params: {
condition: A | (() => A);
not?: E | (() => E);
run: T | (() => T);
}condition: A | (() => A)
Optional
not?: E | (() => E)
run: T | (() => T)
Returns A | T | E
- The result of executing the condition and returning the appropriate value.
Executes conditional branching based on the provided conditions and returns the appropriate value.