mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-23 17:30:04 -05:00
fix(41534): fix children circular references
This commit is contained in:
46
tests/cases/fourslash/navigationBarItemsClass1.ts
Normal file
46
tests/cases/fourslash/navigationBarItemsClass1.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////function Foo() {}
|
||||
////class Foo {}
|
||||
|
||||
verify.navigationTree({
|
||||
text: "<global>",
|
||||
kind: "script",
|
||||
childItems: [
|
||||
{
|
||||
text: "Foo",
|
||||
kind: "function"
|
||||
},
|
||||
{
|
||||
text: "Foo",
|
||||
kind: "class"
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
verify.navigationBar([
|
||||
{
|
||||
text: "<global>",
|
||||
kind: "script",
|
||||
childItems: [
|
||||
{
|
||||
text: "Foo",
|
||||
kind: "function"
|
||||
},
|
||||
{
|
||||
text: "Foo",
|
||||
kind: "class"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
text: "Foo",
|
||||
kind: "function",
|
||||
indent: 1
|
||||
},
|
||||
{
|
||||
text: "Foo",
|
||||
kind: "class",
|
||||
indent: 1
|
||||
}
|
||||
]);
|
||||
46
tests/cases/fourslash/navigationBarItemsClass2.ts
Normal file
46
tests/cases/fourslash/navigationBarItemsClass2.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////class Foo {}
|
||||
////function Foo() {}
|
||||
|
||||
verify.navigationTree({
|
||||
text: "<global>",
|
||||
kind: "script",
|
||||
childItems: [
|
||||
{
|
||||
text: "Foo",
|
||||
kind: "function"
|
||||
},
|
||||
{
|
||||
text: "Foo",
|
||||
kind: "class"
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
verify.navigationBar([
|
||||
{
|
||||
text: "<global>",
|
||||
kind: "script",
|
||||
childItems: [
|
||||
{
|
||||
text: "Foo",
|
||||
kind: "function"
|
||||
},
|
||||
{
|
||||
text: "Foo",
|
||||
kind: "class"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
text: "Foo",
|
||||
kind: "function",
|
||||
indent: 1
|
||||
},
|
||||
{
|
||||
text: "Foo",
|
||||
kind: "class",
|
||||
indent: 1
|
||||
}
|
||||
]);
|
||||
48
tests/cases/fourslash/navigationBarItemsClass3.ts
Normal file
48
tests/cases/fourslash/navigationBarItemsClass3.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
// @allowJs: true
|
||||
// @filename: /foo.js
|
||||
////function Foo() {}
|
||||
////class Foo {}
|
||||
|
||||
verify.navigationTree({
|
||||
text: "<global>",
|
||||
kind: "script",
|
||||
childItems: [
|
||||
{
|
||||
text: "Foo",
|
||||
kind: "function"
|
||||
},
|
||||
{
|
||||
text: "Foo",
|
||||
kind: "class"
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
verify.navigationBar([
|
||||
{
|
||||
text: "<global>",
|
||||
kind: "script",
|
||||
childItems: [
|
||||
{
|
||||
text: "Foo",
|
||||
kind: "function"
|
||||
},
|
||||
{
|
||||
text: "Foo",
|
||||
kind: "class"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
text: "Foo",
|
||||
kind: "function",
|
||||
indent: 1
|
||||
},
|
||||
{
|
||||
text: "Foo",
|
||||
kind: "class",
|
||||
indent: 1
|
||||
}
|
||||
]);
|
||||
48
tests/cases/fourslash/navigationBarItemsClass4.ts
Normal file
48
tests/cases/fourslash/navigationBarItemsClass4.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
// @allowJs: true
|
||||
// @filename: /foo.js
|
||||
////class Foo {}
|
||||
////function Foo() {}
|
||||
|
||||
verify.navigationTree({
|
||||
text: "<global>",
|
||||
kind: "script",
|
||||
childItems: [
|
||||
{
|
||||
text: "Foo",
|
||||
kind: "function"
|
||||
},
|
||||
{
|
||||
text: "Foo",
|
||||
kind: "class"
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
verify.navigationBar([
|
||||
{
|
||||
text: "<global>",
|
||||
kind: "script",
|
||||
childItems: [
|
||||
{
|
||||
text: "Foo",
|
||||
kind: "function"
|
||||
},
|
||||
{
|
||||
text: "Foo",
|
||||
kind: "class"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
text: "Foo",
|
||||
kind: "function",
|
||||
indent: 1
|
||||
},
|
||||
{
|
||||
text: "Foo",
|
||||
kind: "class",
|
||||
indent: 1
|
||||
}
|
||||
]);
|
||||
41
tests/cases/fourslash/navigationBarItemsClass5.ts
Normal file
41
tests/cases/fourslash/navigationBarItemsClass5.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////class Foo {}
|
||||
////let Foo = 1;
|
||||
|
||||
verify.navigationTree({
|
||||
text: "<global>",
|
||||
kind: "script",
|
||||
childItems: [
|
||||
{
|
||||
text: "Foo",
|
||||
kind: "let"
|
||||
},
|
||||
{
|
||||
text: "Foo",
|
||||
kind: "class"
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
verify.navigationBar([
|
||||
{
|
||||
text: "<global>",
|
||||
kind: "script",
|
||||
childItems: [
|
||||
{
|
||||
text: "Foo",
|
||||
kind: "let"
|
||||
},
|
||||
{
|
||||
text: "Foo",
|
||||
kind: "class"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
text: "Foo",
|
||||
kind: "class",
|
||||
indent: 1
|
||||
}
|
||||
])
|
||||
Reference in New Issue
Block a user