deephaven / web-client-ui

Deephaven Web Client UI
Apache License 2.0
28 stars 30 forks source link

fix: `isElementOfType` Improved type inference #2099

Closed bmingles closed 1 month ago

bmingles commented 1 month ago

I missed the 2nd generic argument when I first wrote this util which made the type property resolve to string | React.JSXElementConstructor<any> in certain cases instead of the actual type. This should fix that.

resolves #2094

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 46.59%. Comparing base (a30341a) to head (8886d49).

:exclamation: Current head 8886d49 differs from pull request most recent head f1ccbb2

Please upload reports for the commit f1ccbb2 to get more accurate results.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2099 +/- ## ======================================= Coverage 46.59% 46.59% ======================================= Files 679 679 Lines 38598 38598 Branches 9779 9779 ======================================= Hits 17986 17986 Misses 20560 20560 Partials 52 52 ``` | [Flag](https://app.codecov.io/gh/deephaven/web-client-ui/pull/2099/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deephaven) | Coverage Δ | | |---|---|---| | [unit](https://app.codecov.io/gh/deephaven/web-client-ui/pull/2099/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deephaven) | `46.59% <100.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deephaven#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.