Summary
document.startViewTransition
is typed as always present, even though it is not available on Firefox
Expected vs. Actual Behavior
document.startViewTransition
should be typed function | undefined
. Currently just typed function
.
This means that using this safety check like if (!document.startViewTransition) return
results in triggering TSLints @typescript-eslint/no-unnecessary-condition
But startViewTransition isn't available on Firefox, so the check is needed.
To improve this, I highly recommend that typed use baseline status in determining what a type should be. if an API is not Baseline Wildly Available, it should probably be typed as possibly undefined
Playground Link
No response
Browser Support
Have Tried The Latest Releases
Additional Context
No response