Skip to content

Commit 9176ef3

Browse files
TakehiroTadaclaude
andcommitted
fix: complete getMethodsFromService for TS 5.9 and hey-api 0.90.1
- Use Identifier.text instead of getText() for robust HTTP method name extraction - Fix JSDoc extraction by searching from VariableStatement level instead of ArrowFunction - Update tests/utils.ts to use hey-api 0.90.1 plugins API - Update test snapshots to include correctly extracted JSDoc comments Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 65047fa commit 9176ef3

File tree

4 files changed

+230
-6
lines changed

4 files changed

+230
-6
lines changed

src/service.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export function getMethodsFromService(node: SourceFile): FunctionDescription[] {
8080
if (ts.isCallExpression(callExpression)) {
8181
const expr = callExpression.expression;
8282
if (ts.isPropertyAccessExpression(expr)) {
83-
httpMethodName = expr.name.getText();
83+
httpMethodName = (expr.name as ts.Identifier).text;
8484
}
8585
}
8686

@@ -97,7 +97,7 @@ export function getMethodsFromService(node: SourceFile): FunctionDescription[] {
9797
return [tsNode];
9898
};
9999

100-
const children = getAllChildren(arrowFunction);
100+
const children = getAllChildren(variableStatement.compilerNode);
101101
// get all JSDoc comments
102102
// this should be an array of 1 or 0
103103
const jsDocs = children

0 commit comments

Comments
 (0)