TypeScript/tests/baselines/reference/jsdocTemplateTagNameResolution.errors.txt
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
446 B
Plaintext

tests/cases/conformance/jsdoc/file.js(10,7): error TS2322: Type 'string' is not assignable to type 'number'.
==== tests/cases/conformance/jsdoc/file.js (1 errors) ====
/**
* @template T
* @template {keyof T} K
* @typedef {T[K]} Foo
*/
const x = { a: 1 };
/** @type {Foo<typeof x, "a">} */
const y = "a";
~
!!! error TS2322: Type 'string' is not assignable to type 'number'.