From 18d9e9b2b502683da92236ca349c7024a486301f Mon Sep 17 00:00:00 2001 From: Svyatoslav Kuzmich Date: Thu, 3 Oct 2019 15:39:48 +0300 Subject: [PATCH] [JS] Make JsExport experimental - JsExport was meant to be experimental from the beginning but annotation was missing - Add missing @SinceKotlin --- libraries/stdlib/js/src/kotlin/annotations.kt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/libraries/stdlib/js/src/kotlin/annotations.kt b/libraries/stdlib/js/src/kotlin/annotations.kt index 6b6a79681a6..2168f3d8aaf 100644 --- a/libraries/stdlib/js/src/kotlin/annotations.kt +++ b/libraries/stdlib/js/src/kotlin/annotations.kt @@ -161,12 +161,27 @@ public annotation class JsNonModule @Target(AnnotationTarget.FILE) public annotation class JsQualifier(val value: String) +/** + * Marks experimental JS export annotations. + * + * Note that behaviour of these annotations will likely be changed in the future. + * + * Usages of such annotations will be reported as warnings unless an explicit opt-in with + * the [UseExperimental] annotation, e.g. `@UseExperimental(ExperimentalJsExport::class)`, + * or with the `-Xuse-experimental=kotlin.js.ExperimentalJsExport` compiler option is given. + */ +@Experimental(level = Experimental.Level.WARNING) +@SinceKotlin("1.3") +public annotation class ExperimentalJsExport + /** * Exports top-level declaration. * * Used in future IR-based backend. * Has no effect in current JS backend. */ +@ExperimentalJsExport +@SinceKotlin("1.3") @Retention(AnnotationRetention.BINARY) @Target(CLASS, PROPERTY, FUNCTION, FILE) public annotation class JsExport