diff options
author | vmishenev <vad-mishenev@yandex.ru> | 2021-07-28 14:57:38 +0300 |
---|---|---|
committer | vmishenev <vad-mishenev@yandex.ru> | 2021-07-28 19:11:50 +0300 |
commit | f03083d7534209ad94dc3c4d7afd17f58e58127d (patch) | |
tree | 8160e6e8d376fc16ad559cfa59048c5447d2e2bd /examples/gradle/dokka-multiplatform-example/src/jsMain | |
parent | 2cd95b0828518dde751d039f4456dcf93e04dfc1 (diff) | |
download | dokka-f03083d7534209ad94dc3c4d7afd17f58e58127d.tar.gz dokka-f03083d7534209ad94dc3c4d7afd17f58e58127d.tar.bz2 dokka-f03083d7534209ad94dc3c4d7afd17f58e58127d.zip |
Migrate Dokka examples to Dokka repo (KT-47798) (#2030)
* Migrate Dokka examples to Dokka repo (KT-47798)
* Configure workflow of examples checking
* Add workflow to deploy examples
Diffstat (limited to 'examples/gradle/dokka-multiplatform-example/src/jsMain')
3 files changed, 36 insertions, 0 deletions
diff --git a/examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/org/kotlintestmpp/asyncWithDealy.kt b/examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/org/kotlintestmpp/asyncWithDealy.kt new file mode 100644 index 00000000..7b5fe652 --- /dev/null +++ b/examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/org/kotlintestmpp/asyncWithDealy.kt @@ -0,0 +1,8 @@ +package org.kotlintestmpp + +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Deferred + +actual fun <T> CoroutineScope.asyncWithDealy(delay: Long, block: suspend () -> T): Deferred<T> { + TODO("Not yet implemented") +} diff --git a/examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/org/kotlintestmpp/main.kt b/examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/org/kotlintestmpp/main.kt new file mode 100644 index 00000000..8cb66e6d --- /dev/null +++ b/examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/org/kotlintestmpp/main.kt @@ -0,0 +1,17 @@ +package org.kotlintestmpp + +fun main(args : Array<String>) { + console.log("Hello, world!") +} + +fun js(){} +fun shared(){} + +/** + * Actual function for js + */ +actual fun getCurrentDate(): String { + return "test" +} + +fun String.myExtension() = println("test")
\ No newline at end of file diff --git a/examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/shouldbesuppressed/supp.kt b/examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/shouldbesuppressed/supp.kt new file mode 100644 index 00000000..21dca566 --- /dev/null +++ b/examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/shouldbesuppressed/supp.kt @@ -0,0 +1,11 @@ +package shouldbesuppressed + +/** + * This function should not be visible + */ +fun thatShouldNotBeVisible(): String = "oops" + +/** + * This class should not be visible + */ +class DontLookAtMe(val stealth: Int = 9001)
\ No newline at end of file |