Skip to content

Conversation

jakebailey
Copy link
Member

While working on the module branch, I enabled the "smallest" preset of Rollup to see what it'd do; it deleted a block of code, which appears to do nothing after the code that used reportError was removed in #8485. Rollup's static analysis appears to have understood that. Neat.

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Oct 17, 2022
@RyanCavanaugh
Copy link
Member

To be clear, this code isn't dead in the sense that it doesn't run, but rather that the code has no effect, right?

@jakebailey
Copy link
Member Author

Yes, dead is the wrong term; I should have called it "unnecessary" because it does execute, but with no side effects and no result.

@jakebailey jakebailey changed the title Remove some dead code discovered by rollup Remove some unnecessary code discovered by rollup Oct 17, 2022
@jakebailey jakebailey merged commit a1d82fc into microsoft:main Oct 17, 2022
@jakebailey jakebailey deleted the remove-dead-code branch October 17, 2022 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants