-
-
Notifications
You must be signed in to change notification settings - Fork 739
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
strict lints for two_fingers_touch.ts (#3535)
* tsc-strict for two_fingers_touch I tried to change only types without touching the code, but there were a few places that required small changes. These all seem like cases that "should never happen", but I tried to retain the existing behavior exactly, even when it might not make sense (e.g. returning NaN). * Check preconditions rather than propogate NaNs * more robust fallback With these defaults the zoom, rotate, and pitch gestures all function even if their state isn't initialized. I tested this by temporarily commenting out the call to `_start`, verifying the gestures work and that the failed asserts were printed to the console. * pr feedback: use existing return type * pr feedback: use consistent return * pr feedback: use `!` instead of assert + graceful fallback * fixup! pr feedback: use existing return type * remove unnecessary non-null assertion. _lastPoints is typed to have length 2, so if it's non-null, it has 2 elements.
- Loading branch information
1 parent
c9fa1c5
commit 8aaa935
Showing
1 changed file
with
50 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters