mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-15 02:41:30 -05:00
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:
@@ -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: [] };
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user