File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1764,7 +1764,8 @@ export function emitFile(
17641764 || ( node . kind === ts . SyntaxKind . MethodDeclaration && ! ts . isClassDeclaration ( node . parent ) )
17651765 ) {
17661766 const wrappedNode = createWrappedNode ( node , { typeChecker} ) ;
1767- const identifiers = wrappedNode . getDescendantsOfKind ( ts . SyntaxKind . Identifier ) ;
1767+ const body = wrappedNode . getBody ( ) ;
1768+ const identifiers = body . getKind ( ) === ts . SyntaxKind . Identifier ? [ body as tsMorph . Identifier ] : body . getDescendantsOfKind ( ts . SyntaxKind . Identifier ) ;
17681769 const inheritedVariables : tsMorph . Identifier [ ] = [ ] ;
17691770 const nodeStart = node . getStart ( ) ;
17701771 const nodeEnd = node . getEnd ( ) ;
Original file line number Diff line number Diff line change @@ -21,6 +21,11 @@ let f = function () {
2121}
2222
2323let obj = {
24+ /**
25+ * aaa
26+ *
27+ * @ssr
28+ */
2429 a : function ( ) {
2530 return '123' + b ;
2631 } ,
You can’t perform that action at this time.
0 commit comments