-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Improve type of RollupOutput.output #2679
Improve type of RollupOutput.output #2679
Conversation
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.
Nice one!
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.
Seems you broke the type check, though
Woops! 😅 Right, so Should we just put in a type cast? Something like: Object.keys(outputBundle)
.map(...)
.sort(...) as [OutputChunk, ...(OutputChunk | OutputAsset)[]] |
Sounds good |
c0f26cd
to
f948ddd
Compare
f948ddd
to
b859164
Compare
Very weird. Some unit tests are failing on Node 6 according to CircleCI:
But I only changed some types! 😭 |
Sorry for the wait, finally managed to address those test issues. Basically, it was caused by version drift on Node 6 (which should no longer happen) and a breaking change in a patch version of acorn. |
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Description
Now that microsoft/TypeScript#24897 has landed in TypeScript 3.2, we can more precisely define the type of
RollupOutput.output
to assert that the first element will be anOutputChunk
.