Theo's Typesafe CultTTC
Theo's Typesafe Cult4y ago
4 replies
Xaohs

Typescript Determining type of generic.

Hi, I have the following generic function
const handleContinue = <T extends A | B>(data: T) => {}

How can I check inside this function when data = A, or when data = B?
Was this page helpful?