-
Notifications
You must be signed in to change notification settings - Fork 12.8k
JSDoc of base class/interface appears many times when using union of derived class/interface #32708
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
Comments
It seems like it has something to do with the Changing Using |
Shorter repro, interface InterfaceFoo<DataT extends { name : string }> {
/**
* Appear only once plz
*/
name : DataT["name"]
}
class ClassFoo<DataT extends { name : string }> implements InterfaceFoo<DataT> {
name! : DataT["name"]
}
///////////////////////
declare const unionType : (
| ClassFoo<{name:"X"}>
| ClassFoo<{name:"Y"}>
);
/*
Expected:
Appear only once plz
Actual:
Appear only once plz Appear only once plz
*/
unionType.name [Edit] I actually like this repro more, I feel like it should know that they all come from It might make sense if the types in the union were all unrelated. |
JSDoc on own properties was already deduped, but inherited jsdoc was incorrectly not deduped. Fixes #32708
Oops. We dedupe non-inherited jsdoc but forgot to do the same for inherited jsdoc. |
JSDoc on own properties was already deduped, but inherited jsdoc was incorrectly not deduped. Fixes #32708
TypeScript Version: 3.5.1
Search Terms:
JSDoc, duplicate, extends, implements
Code
Expected behavior:
Some comment
should only appear onceActual behavior:
Some comment
appearsn
times if the array containsClassFoo<>
n
timesPlayground Link:
Playground
Related Issues:
No idea
The text was updated successfully, but these errors were encountered: