got the kotlin/Dom.kt, Preconditions.kt and AbstractIterator.kt compiling as JS; needs more testing of using these APIs from JS though...

This commit is contained in:
James Strachan
2012-05-29 15:02:17 +01:00
parent 64703106ea
commit 1a77c36040
10 changed files with 137 additions and 88 deletions
+12
View File
@@ -10,3 +10,15 @@ trait Iterable<T> {
library("splitString")
public fun String.split(regex : String) : Array<String> = js.noImpl
library
class IllegalArgumentException(message: String = "") : Exception() {}
library
class IllegalStateException(message: String = "") : Exception() {}
library
class IndexOutOfBoundsException(message: String = "") : Exception() {}
library
class UnsupportedOperationException(message: String = "") : Exception() {}
+16
View File
@@ -73,6 +73,22 @@ public abstract open class AbstractCollection<erased E> : Collection<E> {
library
public abstract open class AbstractList<erased E> : AbstractCollection<E>, List<E> {
public override fun isEmpty() : Boolean = js.noImpl
public override fun contains(o : Any?) : Boolean = js.noImpl
public override fun iterator() : Iterator<E> = js.noImpl
// public override fun indexOf(o : Any?) : Int = js.noImpl
// public override fun lastIndexOf(o : Any?) : Int = js.noImpl
// public override fun toArray() : Array<Any?> = js.noImpl
// public override fun toArray<erased T>(a : Array<out T>) : Array<T> = js.noImpl
public override fun set(index : Int, element : E) : E = js.noImpl
public override fun add(e : E) : Boolean = js.noImpl
public override fun add(index : Int, element : E) : Unit = js.noImpl
library("removeByIndex")
public override fun remove(index : Int) : E = js.noImpl
public override fun remove(o : Any?) : Boolean = js.noImpl
public override fun clear() : Unit = js.noImpl
public override fun addAll(c : java.util.Collection<out E>) : Boolean = js.noImpl
// public override fun addAll(index : Int, c : java.util.Collection<out E>) : Boolean = js.noImpl
}
library