Include type declarations with @dataform/core #1647
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A suggested, trivial resolution for #1646.
I understand the typings were removed in #1552 to minimize the installed footprint of the
@dataform/core
package.While re-adding the declarations file increases the bundle size, the size reductions introduced by #1552 would remain very similar. Before the introduction of minification, the total
node_module
size was 9.4MB. After the minifaction PR, it was ~432KB, and with thed.ts
file re-added it would increase back to ~675KB. Instead of the original ~20x reduction, we just get a ~16x reduction. This increase can not impact compile performance, as the types file is not used during run time, so that performance gain remains.This is just a suggestion. As I mentioned in the issue, my goal is to get type declarations for the
@dataform/core
package.I'm very happy to assist with any solution that achieves this, including publishing type declarations in a separate package, possibly to the Definitely Typed repository.
I'd like to nominate @lewish as reviewer, since he introduced #1552 .