Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: avoid undefined property on Global type #21631

Conversation

justinpark
Copy link
Member

SUMMARY

This commit avoids the following potential typescript error due to directly access global properties.

TS2339: Property 'MessageChannel' does not exist on type 'Global'.

108     global.MessageChannel = FakeMessageChannel; // yolo

TS2339: Property 'ResizeObserver' does not exist on type 'Global'.

307     if (typeof global.ResizeObserver !== 'undefined' && headerRef.current) {

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A

TESTING INSTRUCTIONS

npm run type

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

cc: @ktmud

@codecov
Copy link

codecov bot commented Sep 28, 2022

Codecov Report

Merging #21631 (0f8917b) into master (5ea9249) will increase coverage by 0.00%.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##           master   #21631   +/-   ##
=======================================
  Coverage   65.55%   65.55%           
=======================================
  Files        1798     1798           
  Lines       68793    68816   +23     
  Branches     7326     7333    +7     
=======================================
+ Hits        45095    45112   +17     
- Misses      21823    21826    +3     
- Partials     1875     1878    +3     
Flag Coverage Δ
javascript 53.16% <0.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...d/components/DashboardBuilder/DashboardBuilder.tsx 75.24% <0.00%> (ø)
...et-frontend/src/explore/reducers/exploreReducer.js 37.50% <0.00%> (-1.21%) ⬇️
...set-frontend/src/explore/actions/hydrateExplore.ts 42.10% <0.00%> (ø)
...d/src/explore/components/PropertiesModal/index.tsx 62.90% <0.00%> (ø)
.../explore/components/ExploreViewContainer/index.jsx 52.74% <0.00%> (ø)
...rc/explore/components/ExploreChartHeader/index.jsx 56.86% <0.00%> (+1.30%) ⬆️
...rontend/src/components/MetadataBar/MetadataBar.tsx 98.21% <0.00%> (+2.21%) ⬆️
...ntend/src/components/MetadataBar/ContentConfig.tsx 90.00% <0.00%> (+5.00%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@justinpark justinpark force-pushed the chore--avoid-type-error-on-global-property branch from e0c5c39 to 0f8917b Compare September 29, 2022 20:40
@zhaoyongjie zhaoyongjie merged commit 1574829 into apache:master Oct 3, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants