Closed mykyta-rusyn closed 11 months ago
Hi @mykyta-rusyn The check are required for TypeScript
Hello. You can use the none-null assertion to hide this TypeScript error. And JavaScript will not need to check for the presence of functions every time, because this checks is already in the handlers options
@mykyta-rusyn Tbh, I don't like none-null assertion and I don't think it's a good approach. Callbacks are not running in JS, but in UI thread, so no need to do that.
Okay, thanks for your answer!
Both Tap and LongPress gestures have unnecessary checks. For example,
tapGesture
is disabled whenonTap
is not provided, so we can add a non-null assertion without checking its value. Similar for rest gestures.Changes in the
tapGesture
:In the
doubleTapGesture
:And in the
longPress
: