[K/JS] Add ability to exclude declarations from export by a new annotation @JsExport.Ignore.

This commit is contained in:
Artem Kobzar
2022-10-03 11:07:25 +00:00
committed by Space Team
parent 917c8606f5
commit eb2326eabb
49 changed files with 970 additions and 42 deletions
@@ -63,4 +63,18 @@ public annotation class ExperimentalJsExport
@Target(CLASS, PROPERTY, FUNCTION, FILE)
@SinceKotlin("1.4")
@OptionalExpectation
public expect annotation class JsExport()
public expect annotation class JsExport() {
/*
* The annotation prevents exporting the annotated member of an exported class.
* This annotation is experimental, meaning that the restrictions mentioned above are subject to change.
*/
@ExperimentalJsExport
@Retention(AnnotationRetention.BINARY)
@Target(CLASS, PROPERTY, FUNCTION)
@SinceKotlin("1.8")
// Suppress until bootstrapping
@Suppress("NESTED_OPTIONAL_EXPECTATION")
@OptionalExpectation
public annotation class Ignore()
}