TypeScript/tests/baselines/reference/jsdocTemplateTagNameResolution.symbols
Ron Buckton cf787e9bcf
Fix name resolution in typedef and allow defaults for template tags (#45483)
* Fix name resolution in typedef and allow defaults for template tags

* Inline parseBracketNameInTemplateTag

* Update baselines

* Add js declaration emit tests
2021-09-08 17:05:07 -07:00

16 lines
313 B
Plaintext

=== tests/cases/conformance/jsdoc/file.js ===
/**
* @template T
* @template {keyof T} K
* @typedef {T[K]} Foo
*/
const x = { a: 1 };
>x : Symbol(x, Decl(file.js, 6, 5))
>a : Symbol(a, Decl(file.js, 6, 11))
/** @type {Foo<typeof x, "a">} */
const y = "a";
>y : Symbol(y, Decl(file.js, 9, 5))