Always executes a match, using either a constant value of type R or a delegate that returns a value of type R
1.0.0
enum Time { Morning = 'Morning', Noon = 'Noon', Afternoon = 'Afternoon', } const actual = strike( 'Night', match(Time.Morning, 'Good morning!'), otherwise('Goodnight!') ); assertEq(actual, 'Goodnight!');
Generated using TypeDoc
Always executes a match, using either a constant value of type R or a delegate that returns a value of type R
1.0.0
enum Time { Morning = 'Morning', Noon = 'Noon', Afternoon = 'Afternoon', } const actual = strike( 'Night', match(Time.Morning, 'Good morning!'), otherwise('Goodnight!') ); assertEq(actual, 'Goodnight!');