Update find-all-refs and related test

1. Some special-case code in find-all-refs is no longer relevant.
2. Using the real symbol gives names to more class expressions, so I
made the expression more complex to keep the class truly anonymous in
goToImplementationInterface_07. The quick info display also changes,
from

```
(anonymous local class)
```

to

```
(local class) (Anonymous class)
```

This is more consistent internally and externally, so I think it's a
good change.
This commit is contained in:
Nathan Shively-Sanders
2022-10-03 15:46:34 -07:00
parent 06f73dde70
commit 5537050de1
2 changed files with 1 additions and 7 deletions

View File

@@ -508,12 +508,6 @@ namespace ts.FindAllReferences {
displayParts: [punctuationPart(SyntaxKind.OpenParenToken), textPart("object literal"), punctuationPart(SyntaxKind.CloseParenToken)]
};
}
else if (node.kind === SyntaxKind.ClassExpression) {
return {
kind: ScriptElementKind.localClassElement,
displayParts: [punctuationPart(SyntaxKind.OpenParenToken), textPart("anonymous local class"), punctuationPart(SyntaxKind.CloseParenToken)]
};
}
else {
return { kind: getNodeKind(node), displayParts: [] };
}

View File

@@ -19,7 +19,7 @@
//// let x7: (new() => Foo) = [|class { hello () { /**constructorType*/} }|];
//// let x8: Foo[] = [|[{ hello () { /**arrayType*/} }]|];
//// let x9: { y: Foo } = [|{ y: { hello () { /**typeLiteral*/} } }|];
//// let x10 = [|{|"parts": ["(","anonymous local class",")"], "kind": "local class"|}class implements Foo { hello() {} }|]
//// let x10 = [ [|{|"parts": ["(","local class",")"," ", "(Anonymous class)"], "kind": "local class"|}class implements Foo { hello() {} }|] ]
//// let x11 = class [|{|"parts": ["(","local class",")"," ","C"], "kind": "local class"|}C|] implements Foo { hello() {} }
////
//// // Should not do anything for type predicates