-
Notifications
You must be signed in to change notification settings - Fork 19.7k
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
[Feature] Please (re-)export a lot more types and interfaces #19003
Labels
en
This issue is in English
new-feature
pending
We are not sure about whether this is a bug/new feature.
Comments
echarts-bot
bot
added
en
This issue is in English
pending
We are not sure about whether this is a bug/new feature.
labels
Aug 17, 2023
yay
changed the title
[Feature] Please export a lot more types and interfaces
[Feature] Please (re-)export a lot more types and interfaces
Aug 17, 2023
8 tasks
There are a few other issues with types:
But when using this type like so:
I would then get a TS error anyway:
Where the
|
yes yes yes!!!!!!!! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
en
This issue is in English
new-feature
pending
We are not sure about whether this is a bug/new feature.
What problem does this feature solve?
Many eChart's own types are not exported. For example
DecalObject
.A lot of the useful types are not exported by eCharts. So one is either faced with a choice to have untyped objects in one's code or to find a way to get to the un-exported types using TypeScript's powerful type system. For example:
or more generally:
Given that we mostly can gain access to un-exported types one way or another through exported ones, the whole point of not exporting types is a bit moot.
zrender types used by eCharts are not re-exported by eCharts
For example, we have to add a transient
zrender
dependency to ourpackage.json
and do something like the following to access to the type that is part of eChart's public interface but is not re-exported:What does the proposed API look like?
For eChart's own types:
For zrender types used by eCharts:
The text was updated successfully, but these errors were encountered: