Replies: 1 comment
-
Thanks for this! If |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
As raised by @bryophyta in #5849 (comment), there are several ways of checking whether an method exists as a member of an object. We also have an auto-fixing ESLint rule that prevents us from using optional chaining on non-nullish values.
For example, the
window.performance.getEntriesByType
method is defined inlib.dom.d.ts
, so we need to circumvent this rule to prevent errors in production.Which options do people prefer?
Beta Was this translation helpful? Give feedback.
All reactions