Skip to content

Commit d5d5360

Browse files
committed
do not generate Partial Array
1 parent fd7f08e commit d5d5360

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

json/src/TSGenerator.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ open class TSGenerator(
112112
}
113113
var fullType = if (ts[0].isLowerCase()) ts
114114
else ts + (args.takeIf { it.isNotEmpty() }?.joinToString(prefix = "<", postfix = ">") { tsType(it.type) } ?: "")
115-
if (args.firstOrNull()?.type?.jvmErasure?.isSubclassOf(Enum::class) == true) fullType = "Partial<$fullType>"
115+
if (fullType.startsWith("Record") && args.firstOrNull()?.type?.jvmErasure?.isSubclassOf(Enum::class) == true)
116+
fullType = "Partial<$fullType>"
116117
return fullType
117118
}
118119

0 commit comments

Comments
 (0)