fix(41534): fix children circular references

This commit is contained in:
Oleksandr T
2020-11-14 23:14:07 +02:00
parent 566faa7a01
commit 9bcbca4e6c
6 changed files with 238 additions and 6 deletions

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

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

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

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

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