mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 11:24:49 -05:00
fix(54266): Navtree doesn't return computed class members (#54271)
This commit is contained in:
67
tests/cases/fourslash/navigationBarItemsComputedNames.ts
Normal file
67
tests/cases/fourslash/navigationBarItemsComputedNames.ts
Normal file
@@ -0,0 +1,67 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////const enum E {
|
||||
//// A = 'A',
|
||||
////}
|
||||
////const a = '';
|
||||
////
|
||||
////class C {
|
||||
//// [a]() {
|
||||
//// return 1;
|
||||
//// }
|
||||
////
|
||||
//// [E.A]() {
|
||||
//// return 1;
|
||||
//// }
|
||||
////
|
||||
//// [1]() {
|
||||
//// return 1;
|
||||
//// },
|
||||
////
|
||||
//// ["foo"]() {
|
||||
//// return 1;
|
||||
//// },
|
||||
////}
|
||||
|
||||
verify.navigationTree({
|
||||
text: "<global>",
|
||||
kind: "script",
|
||||
childItems: [
|
||||
{
|
||||
text: "a",
|
||||
kind: "const"
|
||||
},
|
||||
{
|
||||
text: "C",
|
||||
kind: "class",
|
||||
childItems: [
|
||||
{
|
||||
text: "[a]",
|
||||
kind: "method"
|
||||
},
|
||||
{
|
||||
text: "[E.A]",
|
||||
kind: "method"
|
||||
},
|
||||
{
|
||||
text: "[1]",
|
||||
kind: "method"
|
||||
},
|
||||
{
|
||||
text: "[\"foo\"]",
|
||||
kind: "method"
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "E",
|
||||
kind: "enum",
|
||||
childItems: [
|
||||
{
|
||||
text: "A",
|
||||
kind: "enum member"
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
Reference in New Issue
Block a user