Move Closeable to its usage, move internal Serializable to kotlin package in JS, introduce internal typealias in kotlin.io in JVM.
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
package java.io
|
||||
|
||||
@library
|
||||
public interface Closeable {
|
||||
public fun close(): Unit
|
||||
}
|
||||
|
||||
internal interface Serializable
|
||||
@@ -101,4 +101,7 @@ internal inline fun <T> Array<out T>.copyToArrayOfAny(isVarargs: Boolean): Array
|
||||
// no need to copy vararg array in JS
|
||||
this
|
||||
else
|
||||
this.copyOf()
|
||||
this.copyOf()
|
||||
|
||||
// temporary for shared code, until we have an annotation like JvmSerializable
|
||||
internal interface Serializable
|
||||
@@ -1,6 +1,5 @@
|
||||
package kotlin.dom
|
||||
|
||||
import java.io.Closeable
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
|
||||
@@ -26,6 +25,10 @@ public fun mouseEventHandler(handler: (MouseEvent) -> Unit): EventListener {
|
||||
}
|
||||
}
|
||||
|
||||
public interface Closeable {
|
||||
public open fun close(): Unit
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a handler on the named event
|
||||
*/
|
||||
|
||||
-4
@@ -340,10 +340,6 @@
|
||||
append: throwAbstractFunctionInvocationError("Appendable#append")
|
||||
});
|
||||
|
||||
Kotlin.Closeable = Kotlin.createTraitNow(null, null, {
|
||||
close: throwAbstractFunctionInvocationError("Closeable#close")
|
||||
});
|
||||
|
||||
Kotlin.safeParseInt = function (str) {
|
||||
var r = parseInt(str, 10);
|
||||
return isNaN(r) ? null : r;
|
||||
|
||||
Reference in New Issue
Block a user