Skip to content
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

Element overriding #30

Merged
merged 4 commits into from
Apr 13, 2022
Merged
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
aSemy committed Apr 11, 2022
commit b69ce6abcbccc52bd609d0f8b8bc000c91c37d79
Original file line number Diff line number Diff line change
@@ -86,6 +86,7 @@ abstract class KxsTsSourceCodeGenerator(
""".trimMargin()
}


override fun generateInterface(element: TsDeclaration.TsInterface): String {

val properties = element.properties
@@ -100,6 +101,7 @@ abstract class KxsTsSourceCodeGenerator(
}
}


/**
* Generate
* ```typescript
@@ -145,6 +147,7 @@ abstract class KxsTsSourceCodeGenerator(
}
}


override fun generateTypeUnion(element: TsDeclaration.TsTypeUnion): String {
return if (element.typeRefs.isEmpty()) {
"""
@@ -248,7 +251,5 @@ abstract class KxsTsSourceCodeGenerator(
TsLiteral.TsMap.Type.MAP -> "Map<$keyTypeRef, $valueTypeRef>"
}
}

}

}
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ fun interface TsElementIdConverter {
.substringBeforeLast(">")

return when {
namespace.isBlank() -> TsElementId("$id")
namespace.isBlank() -> TsElementId(id)
else -> TsElementId("$namespace.$id")
}
}