Skip to content

Commit 406ca06

Browse files
author
Andy
authored
Fix bug: JSDocPropertyTag is a declaration (microsoft#23876)
1 parent 8c07c5b commit 406ca06

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

src/compiler/utilities.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6065,7 +6065,8 @@ namespace ts {
60656065
|| kind === SyntaxKind.TypeAliasDeclaration
60666066
|| kind === SyntaxKind.TypeParameter
60676067
|| kind === SyntaxKind.VariableDeclaration
6068-
|| kind === SyntaxKind.JSDocTypedefTag;
6068+
|| kind === SyntaxKind.JSDocTypedefTag
6069+
|| kind === SyntaxKind.JSDocPropertyTag;
60696070
}
60706071

60716072
function isDeclarationStatementKind(kind: SyntaxKind) {
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/// <reference path='fourslash.ts' />
2+
3+
// @allowJs: true
4+
5+
// @Filename: /a.js
6+
/////**
7+
//// * @typedef I {Object}
8+
//// * @prop [|p|] {number}
9+
//// */
10+
////
11+
/////** @type {I} */
12+
////let x;
13+
////x.[|p|];
14+
15+
verify.rangesReferenceEachOther();

0 commit comments

Comments
 (0)