File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
packages/graphqlsp/src/ast Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @0no-co/graphqlsp ' : patch
3+ ---
4+
5+ Fix support for default exported graphql() invocations
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ export type ValueDeclaration =
1010 | ts . ConstructorDeclaration
1111 | ts . EnumDeclaration
1212 | ts . EnumMember
13+ | ts . ExportAssignment
1314 | ts . ExportSpecifier
1415 | ts . FunctionDeclaration
1516 | ts . FunctionExpression
@@ -56,6 +57,7 @@ export function isValueDeclaration(node: ts.Node): node is ValueDeclaration {
5657 case ts . SyntaxKind . Constructor :
5758 case ts . SyntaxKind . EnumDeclaration :
5859 case ts . SyntaxKind . EnumMember :
60+ case ts . SyntaxKind . ExportAssignment :
5961 case ts . SyntaxKind . FunctionDeclaration :
6062 case ts . SyntaxKind . FunctionExpression :
6163 case ts . SyntaxKind . GetAccessor :
@@ -111,6 +113,8 @@ export function getValueOfValueDeclaration(
111113 case ts . SyntaxKind . PropertyDeclaration :
112114 case ts . SyntaxKind . VariableDeclaration :
113115 return node . initializer ;
116+ case ts . SyntaxKind . ExportAssignment :
117+ return node . expression ;
114118 case ts . SyntaxKind . BinaryExpression :
115119 return isAssignmentOperator ( node . operatorToken ) ? node . right : undefined ;
116120 case ts . SyntaxKind . ShorthandPropertyAssignment :
You can’t perform that action at this time.
0 commit comments