Skip to content

Commit

Permalink
fix(48851): exclude in from document highlights (#48853)
Browse files Browse the repository at this point in the history
  • Loading branch information
a-tarasyuk committed Apr 28, 2022
1 parent 0885482 commit 9b3853d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/services/documentHighlights.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ namespace ts {
return highlightSpans(getAsyncAndAwaitOccurrences(node));
case SyntaxKind.YieldKeyword:
return highlightSpans(getYieldOccurrences(node));
case SyntaxKind.InKeyword:
return undefined;
default:
return isModifierKind(node.kind) && (isDeclaration(node.parent) || isVariableStatement(node.parent))
? highlightSpans(getModifierOccurrences(node.kind, node.parent))
Expand Down
13 changes: 13 additions & 0 deletions tests/cases/fourslash/documentHighlightInKeyword.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/// <reference path='fourslash.ts'/>

////export type Foo<T> = {
//// [K [|in|] keyof T]: any;
////}
////
////"a" [|in|] {};
////
////for (let a [|in|] {}) {}

for (let range of test.ranges()) {
verify.noDocumentHighlights(range);
}

0 comments on commit 9b3853d

Please sign in to comment.