fix(54266): Navtree doesn't return computed class members (#54271)

This commit is contained in:
Oleksandr T
2023-09-14 00:50:48 +03:00
committed by GitHub
parent 07bca994fa
commit 05fdb5f671
2 changed files with 79 additions and 14 deletions

View 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"
},
]
}
]
});