/**
* @template {T}
* @typedef {(x: T, y: T) => number} SetComparer
*/
Expected: x and y have type T
Actual: x any y have type any, and T is associated with whatever declaration follows the JSDoc comment...
For example the following
/**
* @template {T}
* @typedef {(x: T, y: T) => number} SetComparer
*/
class C {
}
makes C generic on T.
Expected:
xandyhave typeTActual:
xanyyhave typeany, andTis associated with whatever declaration follows the JSDoc comment...For example the following
makes
Cgeneric onT.