score:33

Instead of using the global type Function for type of onDetailsChanged, you can write out the type instead, so change FooSelectorProps to:

interface FooSelectorProps {
    onDetailsChanged: ((details: FooDetails) => void)
}

then you'll get type checking for the onDetailsChanged callback.


Related Query

More Query from same tag