3d7ec8aab2
* Improve @template lookup and resilience 1. @template parsing may produce a template tag with a type parameter whose name is the missing identifier. These tags should be skipped in the checker because they receive an error in the parser. 2. The fix in #37819 was incorrect; there's no such thing as a type parameter declared on a variable declaration. Instead, there needs to be a type parameter declared on a jsdoc comment, because that's the scope for tags like `@return` and `@typedef`. There are 3 tests because either fix (1) and (2) fix the first test's failure, but both are required to fix the last two tests' failures. * remove containsParseError call
25 lines
1.5 KiB
Plaintext
25 lines
1.5 KiB
Plaintext
error TS5055: Cannot write file 'tests/cases/conformance/jsdoc/jsdocOuterTypeParameters3.js' because it would overwrite input file.
|
|
Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig.
|
|
tests/cases/conformance/jsdoc/jsdocOuterTypeParameters3.js(1,16): error TS2304: Cannot find name 'T'.
|
|
tests/cases/conformance/jsdoc/jsdocOuterTypeParameters3.js(1,18): error TS1069: Unexpected token. A type parameter name was expected without curly braces.
|
|
tests/cases/conformance/jsdoc/jsdocOuterTypeParameters3.js(5,43): error TS2339: Property 'foo' does not exist on type 'Bar'.
|
|
|
|
|
|
!!! error TS5055: Cannot write file 'tests/cases/conformance/jsdoc/jsdocOuterTypeParameters3.js' because it would overwrite input file.
|
|
!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig.
|
|
==== tests/cases/conformance/jsdoc/jsdocOuterTypeParameters3.js (3 errors) ====
|
|
/** @template {T} */
|
|
~
|
|
!!! error TS2304: Cannot find name 'T'.
|
|
~
|
|
!!! error TS1069: Unexpected token. A type parameter name was expected without curly braces.
|
|
class Baz {
|
|
m() {
|
|
class Bar {
|
|
static bar() { this.prototype.foo(); }
|
|
~~~
|
|
!!! error TS2339: Property 'foo' does not exist on type 'Bar'.
|
|
}
|
|
}
|
|
}
|
|
|