Skip to content

Code duplication #20473

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

Closed
shvabuk opened this issue Dec 5, 2017 · 5 comments
Closed

Code duplication #20473

shvabuk opened this issue Dec 5, 2017 · 5 comments
Labels
Bug A bug in TypeScript Good First Issue Well scoped, documented and has the green light Help Wanted You can do this

Comments

@shvabuk
Copy link

shvabuk commented Dec 5, 2017

TypeScript Version: 2.7.0

Code duplication in file https://github.com/Microsoft/TypeScript/blob/master/lib/lib.webworker.d.ts
Code

declare function dispatchEvent(evt: Event): boolean;

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

@RyanCavanaugh RyanCavanaugh added Bug A bug in TypeScript Good First Issue Well scoped, documented and has the green light Help Wanted You can do this labels Dec 5, 2017
@Xavier-J-Ortiz
Copy link

Hey @shvabuk ! I'd like to pick this up. If that's ok.

It looks pretty straight forward, but it would be my first PR to this project, or any open source project. Also will allow me to start to get familiar with the code base and grow from there.

@shvabuk
Copy link
Author

shvabuk commented Dec 8, 2017

@Xavier-J-Ortiz , ok. And I will write some tests.
Don`t forget to read #20481.

@Xavier-J-Ortiz
Copy link

Xavier-J-Ortiz commented Dec 9, 2017

@shvabuk - Thank you for pointing that other issue out.

I gave it a try and took a look, but I'm going to let this one go. I checked the generator library, I think that there's some F# stuff there that is over my head.

I'll let someone else work on this. Sorry about that. :(

@shvabuk
Copy link
Author

shvabuk commented Dec 9, 2017

According to searchDuplicates script results https://gist.github.com/shvabuk/ad6b9974794dc7595c5832722df443fa more duplicates was found

Duplication in file: lib/lib.dom.d.ts on lines: 776 & 14373 (ProgressEventInit)
Duplication in file: lib/lib.dom.d.ts on lines: 3735 & 14684 (EXT_frag_depth)
Duplication in file: lib/lib.d.ts on lines: 4874 & 18471 (ProgressEventInit)
Duplication in file: lib/lib.d.ts on lines: 7833 & 18782 (EXT_frag_depth)
Duplication in file: lib/lib.es2016.full.d.ts on lines: 779 & 14376 (ProgressEventInit)
Duplication in file: lib/lib.es2016.full.d.ts on lines: 3738 & 14687 (EXT_frag_depth)
Duplication in file: lib/lib.es2017.full.d.ts on lines: 784 & 14381 (ProgressEventInit)
Duplication in file: lib/lib.es2017.full.d.ts on lines: 3743 & 14692 (EXT_frag_depth)
Duplication in file: lib/lib.es2018.full.d.ts on lines: 778 & 14375 (ProgressEventInit)
Duplication in file: lib/lib.es2018.full.d.ts on lines: 3737 & 14686 (EXT_frag_depth)
Duplication in file: lib/lib.webworker.d.ts on lines: 1882 & 1900 (dispatchEvent)
Duplication in file: lib/lib.esnext.full.d.ts on lines: 780 & 14377 (ProgressEventInit)
Duplication in file: lib/lib.esnext.full.d.ts on lines: 3739 & 14688 (EXT_frag_depth)
Duplication in file: lib/lib.es6.d.ts on lines: 6585 & 20182 (ProgressEventInit)
Duplication in file: lib/lib.es6.d.ts on lines: 9544 & 20493 (EXT_frag_depth)

@RyanCavanaugh
Looks like this issue may be closed and appropriate issue should be opened in https://github.com/Microsoft/TSJS-lib-generator .
May you give advise? May I add,
rewritten in a cleaner style, searchDuplicates script to tests? If yes, than in wich directory? It looks like generator (not compiler) issue.

@shvabuk
Copy link
Author

shvabuk commented Jan 2, 2018

Appropriate issue in JS-lib-generator repository created
microsoft/TypeScript-DOM-lib-generator#347

@shvabuk shvabuk closed this as completed Jan 2, 2018
@mhegazy mhegazy reopened this Jan 11, 2018
@mhegazy mhegazy closed this as completed Jan 11, 2018
@microsoft microsoft locked and limited conversation to collaborators Jul 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Good First Issue Well scoped, documented and has the green light Help Wanted You can do this
Projects
None yet
Development

No branches or pull requests

4 participants