* Create type aliases for unresolved type symbols * Accept new baselines * Update fourslash tests * Unresolved import aliases create tagged unresolved symbols * Add comments * Accept new baselines * Add fourslash tests
41 lines
606 B
Plaintext
41 lines
606 B
Plaintext
=== tests/cases/conformance/jsdoc/github20832.js ===
|
|
// #20832
|
|
/** @typedef {U} T - should be "error, can't find type named 'U' */
|
|
/**
|
|
* @template U
|
|
* @param {U} x
|
|
* @return {T}
|
|
*/
|
|
function f(x) {
|
|
>f : <U>(x: U) => U
|
|
>x : U
|
|
|
|
return x;
|
|
>x : U
|
|
}
|
|
|
|
/** @type T - should be fine, since T will be any */
|
|
const x = 3;
|
|
>x : U
|
|
>3 : 3
|
|
|
|
/**
|
|
* @callback Cb
|
|
* @param {V} firstParam
|
|
*/
|
|
/**
|
|
* @template V
|
|
* @param {V} vvvvv
|
|
*/
|
|
function g(vvvvv) {
|
|
>g : <V>(vvvvv: V) => void
|
|
>vvvvv : V
|
|
}
|
|
|
|
/** @type {Cb} */
|
|
const cb = x => {}
|
|
>cb : Cb
|
|
>x => {} : (x: V) => any
|
|
>x : V
|
|
|