Skip to content

Commit 7385d1c

Browse files
committed
fix: remove ts-ignore and add proper type handling
1 parent 1f4f2bf commit 7385d1c

File tree

1 file changed

+5
-4
lines changed
  • packages/openapi-ts/src/plugins/@hey-api/sdk

1 file changed

+5
-4
lines changed

packages/openapi-ts/src/plugins/@hey-api/sdk/plugin.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,11 +266,12 @@ const generateClassSdk = ({
266266
generateClass(childClass);
267267

268268
// Skip if the property already exists
269-
/** @ts-ignore */
270269
if (
271-
currentClass.nodes.find(
272-
(node) => node.name?.escapedText === childClassName.propertyName,
273-
)
270+
currentClass.nodes.find((node: ts.ClassElement) => (
271+
node.name &&
272+
ts.isIdentifier(node.name) &&
273+
node.name.escapedText === childClassName.propertyName
274+
))
274275
) {
275276
continue;
276277
}

0 commit comments

Comments
 (0)