fix(51112): omit parameter names that precede the type (#51142) · WebReflection/TypeScript@2da62a7 · GitHub
Skip to content

Commit 2da62a7

Browse files
authored
fix(51112): omit parameter names that precede the type (microsoft#51142)
1 parent cf1b6b7 commit 2da62a7

3 files changed

Lines changed: 6 additions & 10 deletions

File tree

src/compiler/checker.ts

Lines changed: 4 additions & 2 deletions

tests/baselines/reference/jsdocParamTag2.errors.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
tests/cases/conformance/jsdoc/0.js(56,20): error TS8024: JSDoc '@param' tag has name 'obj', but there is no parameter with that name.
21
tests/cases/conformance/jsdoc/0.js(61,19): error TS2339: Property 'a' does not exist on type 'String'.
32
tests/cases/conformance/jsdoc/0.js(61,22): error TS2339: Property 'b' does not exist on type 'String'.
43
tests/cases/conformance/jsdoc/0.js(63,20): error TS8024: JSDoc '@param' tag has name 'y', but there is no parameter with that name.
54

65

7-
==== tests/cases/conformance/jsdoc/0.js (4 errors) ====
6+
==== tests/cases/conformance/jsdoc/0.js (3 errors) ====
87
// Object literal syntax
98
/**
109
* @param {{a: string, b: string}} obj
@@ -61,8 +60,6 @@ tests/cases/conformance/jsdoc/0.js(63,20): error TS8024: JSDoc '@param' tag has
6160

6261
/**
6362
* @param {object} obj - this type gets ignored
64-
~~~
65-
!!! error TS8024: JSDoc '@param' tag has name 'obj', but there is no parameter with that name.
6663
* @param {string} obj.a
6764
* @param {string} obj.b - and x's type gets used for both parameters
6865
* @param {string} x

tests/baselines/reference/paramTagWrapping.errors.txt

Lines changed: 1 addition & 4 deletions

0 commit comments

Comments
 (0)