getPatternMatch
Overview​
- This function is a typing helper and returns typed versions of the components
API—so that you don't have to manually type
With,When, etc. each time you use them. - It takes either:
- a regular parameter:
value. This alternative is ideal when you want theShapeto be inferred. - a type parameter:
Shape. This alternative is ideal when you have aninterface/typefor yourShapeand you just want to pass them.
- a regular parameter: