From 8c63c15298f76f7cffd4150a4df17114e655c948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannu=20Kankaanp=C3=A4=C3=A4?= Date: Thu, 23 Dec 2021 13:14:45 +0200 Subject: [PATCH] added formatType to public api --- src/main/kotlin/me/ntrrgc/tsGenerator/TypeScriptGenerator.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/me/ntrrgc/tsGenerator/TypeScriptGenerator.kt b/src/main/kotlin/me/ntrrgc/tsGenerator/TypeScriptGenerator.kt index 7c255d9..58d0bd5 100644 --- a/src/main/kotlin/me/ntrrgc/tsGenerator/TypeScriptGenerator.kt +++ b/src/main/kotlin/me/ntrrgc/tsGenerator/TypeScriptGenerator.kt @@ -23,7 +23,6 @@ import kotlin.reflect.* import kotlin.reflect.full.createType import kotlin.reflect.full.declaredMemberProperties import kotlin.reflect.full.isSubclassOf -import kotlin.reflect.full.superclasses import kotlin.reflect.jvm.javaType /** @@ -266,4 +265,8 @@ class TypeScriptGenerator( val individualDefinitions: Set get() = generatedDefinitions.toSet() + + fun formatType(kType: KType): String { + return formatKType(kType).formatWithoutParenthesis() + } } \ No newline at end of file