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

Code duplication #347

Closed
shvabuk opened this issue Jan 2, 2018 · 1 comment
Closed

Code duplication #347

shvabuk opened this issue Jan 2, 2018 · 1 comment

Comments

@shvabuk
Copy link

shvabuk commented Jan 2, 2018

TypeScript Version: 2.6.2
Code duplication in files:

Duplication in file: lib.d.ts on lines: 4862 & 18427
Duplication in file: lib.dom.d.ts on lines: 776 & 14341
Duplication in file: lib.es2016.full.d.ts on lines: 779 & 14344
Duplication in file: lib.es2017.full.d.ts on lines: 783 & 14348
Duplication in file: lib.es6.d.ts on lines: 6549 & 20114
Duplication in file: lib.esnext.full.d.ts on lines: 780 & 14345
Duplication in file: lib.webworker.d.ts on lines: 1882 & 1900

Actual:
https://github.com/Microsoft/TypeScript/blob/master/lib/lib.webworker.d.ts#L1882
https://github.com/Microsoft/TypeScript/blob/master/lib/lib.webworker.d.ts#L1900

According to microsoft/TypeScript#20473

searchDuplicates script: https://gist.github.com/shvabuk/ad6b9974794dc7595c5832722df443fa

@mhegazy
Copy link
Contributor

mhegazy commented Jan 4, 2018

These files are not meant to be used together. currently the compiler if no --lib is specified, it needs a single library file to include.

microsoft/TypeScript#15780 will allow us to split these files and add references to them instead of having to duplicate the code.

@mhegazy mhegazy closed this as completed Jan 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants