Show template literal in navtree function call args
This commit is contained in:
parent
b8def16e92
commit
c46090b8dc
2 changed files with 4 additions and 4 deletions
|
@ -660,7 +660,7 @@ namespace ts.NavigationBar {
|
||||||
else if (isCallExpression(parent)) {
|
else if (isCallExpression(parent)) {
|
||||||
const name = getCalledExpressionName(parent.expression);
|
const name = getCalledExpressionName(parent.expression);
|
||||||
if (name !== undefined) {
|
if (name !== undefined) {
|
||||||
const args = mapDefined(parent.arguments, a => isStringLiteral(a) ? a.getText(curSourceFile) : undefined).join(", ");
|
const args = mapDefined(parent.arguments, a => isStringLiteralLike(a) ? a.getText(curSourceFile) : undefined).join(", ");
|
||||||
return `${name}(${args}) callback`;
|
return `${name}(${args}) callback`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
//// // These will only show up as childItems.
|
//// // These will only show up as childItems.
|
||||||
//// function z() {}
|
//// function z() {}
|
||||||
//// console.log(function() {})
|
//// console.log(function() {})
|
||||||
//// describe("this", 'function', () => {});
|
//// describe("this", 'function', `is a function`, `but this ${"wont"} show`, () => {});
|
||||||
//// [].map(() => {});
|
//// [].map(() => {});
|
||||||
////})
|
////})
|
||||||
////(function classes() {
|
////(function classes() {
|
||||||
|
@ -77,7 +77,7 @@ verify.navigationTree({
|
||||||
"kind": "function"
|
"kind": "function"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": `describe("this", 'function') callback`,
|
"text": `describe("this", 'function', \`is a function\`) callback`,
|
||||||
"kind": "function"
|
"kind": "function"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -199,7 +199,7 @@ verify.navigationBar([
|
||||||
"kind": "function"
|
"kind": "function"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": `describe("this", 'function') callback`,
|
"text": `describe("this", 'function', \`is a function\`) callback`,
|
||||||
"kind": "function"
|
"kind": "function"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue