TypeScript is saying your onBoundsChanged
might be undefined because you have defined it as an optional (?)
property in the interface IMapProps:
onBoundsChanged?: {}
Your check for onBoundsChanged
for a truthy
value is correct, but the event listener will be invoked at a later time, which means onBoundsChanged
might be…
Top comments (0)