Skip to content

Commit f5fad3b

Browse files
committed
fixed enum name
1 parent 1aaccd9 commit f5fad3b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/yup/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,12 @@ export const YupSchemaVisitor = (
6969
}
7070

7171
const values = node.values
72-
?.map((v) => `${enumname}.${tsVisitor.convertName(v.name.value)}`)
72+
?.map(
73+
(v) =>
74+
`${enumname}.${tsVisitor.convertName(v.name.value, {
75+
transformUnderscore: false,
76+
})}`
77+
)
7378
.join(", ");
7479
return new DeclarationBlock({})
7580
.export()

0 commit comments

Comments
 (0)