aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/transformers/documentables
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src/main/kotlin/transformers/documentables')
-rw-r--r--plugins/base/src/main/kotlin/transformers/documentables/DeprecatedDocumentableFilterTransformer.kt12
1 files changed, 11 insertions, 1 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/documentables/DeprecatedDocumentableFilterTransformer.kt b/plugins/base/src/main/kotlin/transformers/documentables/DeprecatedDocumentableFilterTransformer.kt
index aab7c6ba..80696cbf 100644
--- a/plugins/base/src/main/kotlin/transformers/documentables/DeprecatedDocumentableFilterTransformer.kt
+++ b/plugins/base/src/main/kotlin/transformers/documentables/DeprecatedDocumentableFilterTransformer.kt
@@ -57,6 +57,10 @@ class DeprecatedDocumentableFilterTransformer(val context: DokkaContext) : PreMe
modified = modified || listModified
list
}
+ val typeAliases = filterTypeAliases(pckg.typealiases).let { (listModified, list) ->
+ modified = modified || listModified
+ list
+ }
when {
!modified -> pckg
else -> {
@@ -64,7 +68,8 @@ class DeprecatedDocumentableFilterTransformer(val context: DokkaContext) : PreMe
pckg.copy(
functions = functions,
properties = properties,
- classlikes = classlikes
+ classlikes = classlikes,
+ typealiases = typeAliases
)
}
}
@@ -95,6 +100,11 @@ class DeprecatedDocumentableFilterTransformer(val context: DokkaContext) : PreMe
)
}
+ private fun filterTypeAliases(typeAliases: List<DTypeAlias>) =
+ typeAliases.filter { it.isAllowedInPackage() }.let {
+ Pair(typeAliases.size != it.size, it)
+ }
+
private fun filterClasslikes(
classlikeList: List<DClasslike>
): Pair<Boolean, List<DClasslike>> {