JS: use external modifier instead of @native annotation
This commit is contained in:
@@ -20,18 +20,22 @@ import kotlin.annotation.AnnotationTarget.*
|
||||
|
||||
@native
|
||||
@Target(CLASS, FUNCTION, PROPERTY, CONSTRUCTOR, VALUE_PARAMETER, PROPERTY_GETTER, PROPERTY_SETTER)
|
||||
@Deprecated("Use `external` modifier instead")
|
||||
public annotation class native(@Deprecated public val name: String = "")
|
||||
|
||||
@native
|
||||
@Target(FUNCTION)
|
||||
@Deprecated
|
||||
public annotation class nativeGetter
|
||||
|
||||
@native
|
||||
@Target(FUNCTION)
|
||||
@Deprecated
|
||||
public annotation class nativeSetter
|
||||
|
||||
@native
|
||||
@Target(FUNCTION)
|
||||
@Deprecated
|
||||
public annotation class nativeInvoke
|
||||
|
||||
@native
|
||||
|
||||
@@ -22,12 +22,15 @@ package kotlin
|
||||
// so they annotated as 'native' to avoid warnings/errors from some minifiers.
|
||||
// They was reserved word in ECMAScript 2, but is not since ECMAScript 5.
|
||||
|
||||
@native
|
||||
// Additional note:
|
||||
// Although it's reasonable to mark these annotations as `@native` (`external` since 1.1),
|
||||
// we prohibit marking annotations this way.
|
||||
// TODO: Another workaround is required to remove these annotations from kotlin.js
|
||||
|
||||
@Target(AnnotationTarget.PROPERTY, AnnotationTarget.FIELD)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
public annotation class Volatile
|
||||
|
||||
@native
|
||||
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
public annotation class Synchronized
|
||||
|
||||
Reference in New Issue
Block a user