IR: Move annotation @JsExport to common source set in stdlib #KT-35966
This commit is contained in:
@@ -12,4 +12,36 @@ import kotlin.annotation.AnnotationTarget.*
|
||||
*/
|
||||
@Target(CLASS, FUNCTION, PROPERTY, CONSTRUCTOR, PROPERTY_GETTER, PROPERTY_SETTER)
|
||||
@OptionalExpectation
|
||||
public expect annotation class JsName(val name: String)
|
||||
public expect annotation class JsName(val name: String)
|
||||
|
||||
/**
|
||||
* Marks experimental JS export annotations.
|
||||
*
|
||||
* Note that behavior 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 [OptIn] annotation, e.g. `@OptIn(ExperimentalJsExport::class)`,
|
||||
* or with the `-Xopt-in=kotlin.js.ExperimentalJsExport` compiler option is given.
|
||||
*/
|
||||
@Suppress("DEPRECATION")
|
||||
@Experimental(level = Experimental.Level.WARNING)
|
||||
@RequiresOptIn(level = RequiresOptIn.Level.WARNING)
|
||||
@MustBeDocumented
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
@SinceKotlin("1.4")
|
||||
public annotation class ExperimentalJsExport
|
||||
|
||||
/**
|
||||
* Exports top-level declaration.
|
||||
*
|
||||
* Compiler exports from the module those top-level declarations that are marked with this annotation.
|
||||
* There is no effect if this annotation is applied to a non-top-level declaration.
|
||||
*
|
||||
* This annotation has effect only on top-level declarations and only in IR-based JS backend.
|
||||
*/
|
||||
@ExperimentalJsExport
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
@Target(CLASS, PROPERTY, FUNCTION, FILE)
|
||||
@SinceKotlin("1.4")
|
||||
@OptionalExpectation
|
||||
public expect annotation class JsExport()
|
||||
Reference in New Issue
Block a user