-
Notifications
You must be signed in to change notification settings - Fork 273
chore(chart): remove faux @superset-ui/core TS declaration #121
Conversation
Codecov Report
@@ Coverage Diff @@
## master #121 +/- ##
==========================================
- Coverage 100% 99.79% -0.21%
==========================================
Files 76 76
Lines 958 959 +1
Branches 229 230 +1
==========================================
- Hits 958 957 -1
- Misses 0 1 +1
- Partials 0 1 +1
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #121 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 76 76
Lines 958 965 +7
Branches 229 232 +3
=====================================
+ Hits 958 965 +7
Continue to review full report at Codecov.
|
packages/superset-ui-chart/src/registries/ChartMetadataRegistrySingleton.ts
Outdated
Show resolved
Hide resolved
all right, made this compatible with the |
2d990e5
to
fc77263
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
🏠 Internal
This PR removes the faux
@superset-ui/core
TS declaration in@superset-ui/chart
(introduced beforecore
was re-written in TS). All of the changes are to clean up resulting TS errors from that removal. Some notes on specifics that were done:type
s that were duplicated across files likeChartType
,(Pre/Post)TransformProps
, etc.. Turns out the duplication wasn't always entirely consistent though at surface level it might not be obvious.registry
sValue | { default: Value }
generally across loaders. This is now confined toChartPlugin
in order to simplify types elsewhere, while still supporting dynamic loading of ES modules:() => import('foo').default
(EDIT: The following was refactored so as not to be a breaking change)
💔 Breaking ChangesRemoved support for{ default: Type }
inRegistry
loader
s, which was previously allowed due to a Chart type usingmodule.exports
instead ofexport default
ing. This simplifies typing when using these components which I think is a win 🏆. I think worst case if this is problematic in incubatorSuperset
we could update() => import('./module.xxx')
calls to() => import('./module.xxx').default
TODO
.default
issue .. may not be a breaking change@kristw @conglei @xtinec