JS: replace all usages of @native annotation with external modifier, in tests, stdlib, etc
This commit is contained in:
@@ -255,7 +255,7 @@ fun specialJS(): List<GenericFunction> {
|
||||
templates add f("sort(comparison: (T, T) -> Int)") {
|
||||
only(ArraysOfObjects, ArraysOfPrimitives)
|
||||
exclude(PrimitiveType.Boolean)
|
||||
annotations("@native")
|
||||
external(true)
|
||||
returns("Unit")
|
||||
doc { "Sorts the array in-place according to the order specified by the given [comparison] function." }
|
||||
body { "noImpl" }
|
||||
|
||||
@@ -147,6 +147,7 @@ class GenericFunction(val signature: String, val keyword: String = "fun") {
|
||||
val returns = FamilyProperty<String>()
|
||||
val operator = FamilyProperty<Boolean>()
|
||||
val infix = FamilyProperty<Boolean>()
|
||||
val external = FamilyProperty<Boolean>()
|
||||
val body = object : FamilyProperty<String>() {
|
||||
override fun onKeySet(key: Family) = include(key)
|
||||
}
|
||||
@@ -410,6 +411,8 @@ class GenericFunction(val signature: String, val keyword: String = "fun") {
|
||||
}
|
||||
|
||||
builder.append("public ")
|
||||
if (external[f] == true)
|
||||
builder.append("external ")
|
||||
if (inline[f]?.isInline() == true)
|
||||
builder.append("inline ")
|
||||
if (infix[f] == true)
|
||||
|
||||
Reference in New Issue
Block a user