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(dts): generate bundled dts distribution #13563

Merged
merged 9 commits into from Nov 8, 2020
Merged

chore(dts): generate bundled dts distribution #13563

merged 9 commits into from Nov 8, 2020

Conversation

pissang
Copy link
Contributor

@pissang pissang commented Nov 8, 2020

Brief Information

This pull request is about adding dts bundle in the npm distribution.

What does this PR do?

Generate a clean DTS bundle

It will generate a dts bundle types/dist/echarts.d.ts with rollup-plugin-dts plugin. And the default type entry will be changed to this file. This bundle can also be used in https://github.com/apache/incubator-echarts-examples for type checking

This change will simplify the types exposed to developers. To avoid inner module having errors when ts version is not compatible. Like issue #13541

To make sure no more inner module like ComponentModel, ComponentView, Grid will be exposed. This PR also made some changes to the type structure.

Test generated DTS bundle

This PR includes a test case for testing the compatibility of different ts versions. It will test ts versions from 3.4 to the latest( which is 4.0 at the moment this PR is created. Which means the lowest ts version our dts supported is 3.4.

Test command:

npm run test:dts

Fix some type issue in other ts versions

@echarts-bot
Copy link

echarts-bot bot commented Nov 8, 2020

Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

The pull request is marked to be PR: author is committer because you are a committer of this project.

100pah
100pah previously approved these changes Nov 8, 2020
@pissang pissang merged commit 904a53c into release Nov 8, 2020
@echarts-bot
Copy link

echarts-bot bot commented Nov 8, 2020

Congratulations! Your PR has been merged. Thanks for your contribution! 👍

@pissang pissang deleted the bundle-dts branch November 8, 2020 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants