Skip to content

Commit 5dbf252

Browse files
committed
Fix duplicate errors in JSDoc function types with anon parameters
Fixes microsoft#6993
1 parent cc57ae0 commit 5dbf252

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

src/compiler/binder.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,7 @@ namespace ts {
753753
case SyntaxKind.GetAccessor:
754754
case SyntaxKind.SetAccessor:
755755
case SyntaxKind.FunctionType:
756+
case SyntaxKind.JSDocFunctionType:
756757
case SyntaxKind.ConstructorType:
757758
case SyntaxKind.FunctionExpression:
758759
case SyntaxKind.ArrowFunction:
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
///<reference path="fourslash.ts" />
2+
3+
// @allowNonTsExtensions: true
4+
// @Filename: Foo.js
5+
6+
//// /** @param {function ({OwnerID:string,AwayID:string}):void} x
7+
//// * @param {function (string):void} y */
8+
//// function fn(x, y) { }
9+
10+
verify.numberOfErrorsInCurrentFile(0);
11+

0 commit comments

Comments
 (0)