Skip to content

Commit 69f5060

Browse files
committed
Make string the first option in the JavaClasses alias
Seems to be a bug with so many options in an alias it doesn't get the correct type. Making the first option a string seems to fix this
1 parent abec259 commit 69f5060

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main/kotlin/generator/LuaEmitter.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,12 @@ class LuaEmitter {
8686

8787
fun emitAvailableImports(parsedClasses: List<ParsedClass>): String {
8888
val sb = StringBuilder()
89-
sb.appendLine("---@alias JavaClasses")
89+
sb.appendLine("---@alias JavaClasses string|")
9090
parsedClasses.forEach { parsedClass ->
9191
val fullName = "${parsedClass.packageName}.${parsedClass.name}"
92-
sb.appendLine("---| '\"$fullName\"'")
92+
sb.appendLine("---| '\"$fullName\"' ")
9393
}
9494
// Add normal string to the alias as to not cause warnings when someone uses an import not in the list
95-
sb.appendLine("---| string")
9695
return sb.toString()
9796
}
9897
}

0 commit comments

Comments
 (0)