Skip to content

Refine implementation #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 8, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
code tidy up
  • Loading branch information
aSemy committed Apr 7, 2022
commit b22f8f76b47bbc78153ced86cd6c9347dc64a80c
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ abstract class KxsTsSourceCodeGenerator(
}

override fun generateTuple(element: TsDeclaration.TsTuple): String {
val types = element.typeRefs
.map { generateTypeReference(it) }
.joinToString(separator = ", ", prefix = "[", postfix = "]")
val types = element.typeRefs.joinToString(separator = ", ") {
generateTypeReference(it)
}

return """
|export type ${element.id.name} = $types;
|export type ${element.id.name} = [$types];
""".trimMargin()
}

Expand Down