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(
1764
1764
|| ( node . kind === ts . SyntaxKind . MethodDeclaration && ! ts . isClassDeclaration ( node . parent ) )
1765
1765
) {
1766
1766
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 ) ;
1768
1769
const inheritedVariables : tsMorph . Identifier [ ] = [ ] ;
1769
1770
const nodeStart = node . getStart ( ) ;
1770
1771
const nodeEnd = node . getEnd ( ) ;
Original file line number Diff line number Diff line change @@ -21,6 +21,11 @@ let f = function () {
21
21
}
22
22
23
23
let obj = {
24
+ /**
25
+ * aaa
26
+ *
27
+ * @ssr
28
+ */
24
29
a : function ( ) {
25
30
return '123' + b ;
26
31
} ,
You can’t perform that action at this time.
0 commit comments