mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 01:49:57 -05:00
Include "export" modifier on function assigned to an export (export const x = () => 0;).
This commit is contained in:
@@ -514,7 +514,7 @@ namespace ts.NavigationBar {
|
||||
return {
|
||||
text: getItemName(n.node),
|
||||
kind: getNodeKind(n.node),
|
||||
kindModifiers: getNodeModifiers(n.node),
|
||||
kindModifiers: getModifiers(n.node),
|
||||
spans: getSpans(n),
|
||||
childItems: map(n.children, convertToTree)
|
||||
};
|
||||
@@ -524,7 +524,7 @@ namespace ts.NavigationBar {
|
||||
return {
|
||||
text: getItemName(n.node),
|
||||
kind: getNodeKind(n.node),
|
||||
kindModifiers: getNodeModifiers(n.node),
|
||||
kindModifiers: getModifiers(n.node),
|
||||
spans: getSpans(n),
|
||||
childItems: map(n.children, convertToChildItem) || emptyChildItemArray,
|
||||
indent: n.indent,
|
||||
@@ -594,6 +594,13 @@ namespace ts.NavigationBar {
|
||||
: createTextSpanFromNode(node, curSourceFile);
|
||||
}
|
||||
|
||||
function getModifiers(node: ts.Node): string {
|
||||
if (node.parent && node.parent.kind === SyntaxKind.VariableDeclaration) {
|
||||
node = node.parent;
|
||||
}
|
||||
return getNodeModifiers(node);
|
||||
}
|
||||
|
||||
function getFunctionOrClassName(node: FunctionExpression | FunctionDeclaration | ArrowFunction | ClassLikeDeclaration): string {
|
||||
if (node.name && getFullWidth(node.name) > 0) {
|
||||
return declarationNameToString(node.name);
|
||||
|
||||
Reference in New Issue
Block a user