mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Catch hover on as const (#43588)
* Catch hover on as const * Update test based on feedback
This commit is contained in:
@@ -1670,7 +1670,7 @@ namespace ts {
|
||||
function shouldGetType(sourceFile: SourceFile, node: Node, position: number): boolean {
|
||||
switch (node.kind) {
|
||||
case SyntaxKind.Identifier:
|
||||
return !isLabelName(node) && !isTagName(node);
|
||||
return !isLabelName(node) && !isTagName(node) && !isConstTypeReference(node.parent);
|
||||
case SyntaxKind.PropertyAccessExpression:
|
||||
case SyntaxKind.QualifiedName:
|
||||
// Don't return quickInfo if inside the comment in `a/**/.b`
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////"" as /**/const;
|
||||
|
||||
verify.not.quickInfoExists();
|
||||
Reference in New Issue
Block a user