aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/signatures
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2020-04-03 12:45:54 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-04-07 11:43:41 +0200
commitfe24837fb51d5004ec3d7d728ce4c325a192e426 (patch)
treeec8a3548d06036fa042ff52447eb35d22497d0ee /plugins/base/src/main/kotlin/signatures
parent828b20f1d7ba7e84f34452452ffa395638a72f2e (diff)
downloaddokka-fe24837fb51d5004ec3d7d728ce4c325a192e426.tar.gz
dokka-fe24837fb51d5004ec3d7d728ce4c325a192e426.tar.bz2
dokka-fe24837fb51d5004ec3d7d728ce4c325a192e426.zip
Add DTypeAlias documentable
Diffstat (limited to 'plugins/base/src/main/kotlin/signatures')
-rw-r--r--plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt b/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt
index 8d8c5f73..a30e1b72 100644
--- a/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt
+++ b/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt
@@ -27,6 +27,7 @@ class KotlinSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLog
is DClasslike -> signature(documentable)
is DTypeParameter -> signature(documentable)
is DEnumEntry -> signature(documentable)
+ is DTypeAlias -> signature(documentable)
else -> throw NotImplementedError(
"Cannot generate signature for ${documentable::class.qualifiedName} ${documentable.name}"
)
@@ -105,6 +106,13 @@ class KotlinSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLog
else -> true
}
+ private fun signature(t: DTypeAlias) = contentBuilder.contentFor(t, ContentKind.Symbol, setOf(TextStyle.Monospace)) {
+ text("typealias ")
+ signatureForProjection(t.type)
+ text(" = ")
+ signatureForProjection(t.underlyingType)
+ }
+
private fun signature(t: DTypeParameter) = contentBuilder.contentFor(t) {
link(t.name, t.dri)
list(t.bounds, prefix = " : ") {