mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-10 15:25:54 -06:00
Merge pull request #38415 from Kingwl/navTree-fix
Fix trancked es5 classes after new scope
This commit is contained in:
commit
324d292e3d
@ -163,6 +163,7 @@ namespace ts.NavigationBar {
|
||||
// Save the old parent
|
||||
parentsStack.push(parent);
|
||||
trackedEs5ClassesStack.push(trackedEs5Classes);
|
||||
trackedEs5Classes = undefined;
|
||||
parent = navNode;
|
||||
}
|
||||
|
||||
|
||||
23
tests/cases/fourslash/navigationBarWithLocalVariables.ts
Normal file
23
tests/cases/fourslash/navigationBarWithLocalVariables.ts
Normal file
@ -0,0 +1,23 @@
|
||||
/// <reference path="fourslash.ts"/>
|
||||
|
||||
//// function x(){
|
||||
//// const x = Object()
|
||||
//// x.foo = ""
|
||||
//// }
|
||||
|
||||
verify.navigationTree({
|
||||
"text": "<global>",
|
||||
"kind": "script",
|
||||
"childItems": [
|
||||
{
|
||||
"text": "x",
|
||||
"kind": "function",
|
||||
"childItems": [
|
||||
{
|
||||
"text": "x",
|
||||
"kind": "const"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user