From 406ca06e8ea54b2ad7188b8db9223dd559c05c36 Mon Sep 17 00:00:00 2001 From: Andy Date: Thu, 3 May 2018 14:19:15 -0700 Subject: [PATCH] Fix bug: JSDocPropertyTag is a declaration (#23876) --- src/compiler/utilities.ts | 3 ++- tests/cases/fourslash/findAllRefsTypedef.ts | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 tests/cases/fourslash/findAllRefsTypedef.ts diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 43777f6c453..ae6bfb5ac13 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -6065,7 +6065,8 @@ namespace ts { || kind === SyntaxKind.TypeAliasDeclaration || kind === SyntaxKind.TypeParameter || kind === SyntaxKind.VariableDeclaration - || kind === SyntaxKind.JSDocTypedefTag; + || kind === SyntaxKind.JSDocTypedefTag + || kind === SyntaxKind.JSDocPropertyTag; } function isDeclarationStatementKind(kind: SyntaxKind) { diff --git a/tests/cases/fourslash/findAllRefsTypedef.ts b/tests/cases/fourslash/findAllRefsTypedef.ts new file mode 100644 index 00000000000..c7e2527405d --- /dev/null +++ b/tests/cases/fourslash/findAllRefsTypedef.ts @@ -0,0 +1,15 @@ +/// + +// @allowJs: true + +// @Filename: /a.js +/////** +//// * @typedef I {Object} +//// * @prop [|p|] {number} +//// */ +//// +/////** @type {I} */ +////let x; +////x.[|p|]; + +verify.rangesReferenceEachOther();