Skip to content

Commit 3324e94

Browse files
authored
Merge pull request #3500 from hey-api/fix/typescript-enum-ref
fix: reference enum object when creating enum types
2 parents f38367d + 127e67b commit 3324e94

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.changeset/nice-memes-do.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@hey-api/openapi-ts": patch
3+
---
4+
5+
**plugin(typescript)**: fix: reference enum object when creating enum types

packages/openapi-ts/src/plugins/@hey-api/typescript/shared/export.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ export const exportType = ({
151151
.alias(symbol)
152152
.export()
153153
.$if(plugin.config.comments && createSchemaComment(schema), (t, v) => t.doc(v))
154-
.type($.type(symbol).idx($.type(symbol).typeofType().keyof()).typeofType());
154+
.type($.type(symbolObject).idx($.type(symbolObject).typeofType().keyof()).typeofType());
155155
plugin.node(node);
156156
return;
157157
} else if (

0 commit comments

Comments
 (0)