TypeScript Version: 3.5.1
Search Terms:
JSDoc, duplicate, extends, implements
Code
interface InterfaceFoo<DataT extends { name : string }> {
/**
* Some comment
*
* -----
*/
name : DataT["name"]
}
class ClassFoo<DataT extends { name : string }> implements InterfaceFoo<DataT> {
name! : DataT["name"]
}
///////////////////////
declare const arr2 : readonly (
| ClassFoo<{name:"X"}>
| ClassFoo<{name:"Y"}>
)[];
/*
Expected:
Some comment
Actual:
Some comment
-----
Some comment
-----
*/
arr2[0].name
///////////////////////
declare const arr3 : readonly (
| ClassFoo<{name:"X"}>
| ClassFoo<{name:"Y"}>
| ClassFoo<{name:"Z"}>
)[];
/*
Expected:
Some comment
Actual:
Some comment
-----
Some comment
-----
Some comment
-----
*/
arr3[0].name
Expected behavior:
Some comment should only appear once
Actual behavior:
Some comment appears n times if the array contains ClassFoo<> n times
Playground Link:
Playground
Related Issues:
No idea
TypeScript Version: 3.5.1
Search Terms:
JSDoc, duplicate, extends, implements
Code
Expected behavior:
Some commentshould only appear onceActual behavior:
Some commentappearsntimes if the array containsClassFoo<>ntimesPlayground Link:
Playground
Related Issues:
No idea