Provide some docs for dynamic.iterator()

This commit is contained in:
Ilya Gorbunov
2016-12-20 23:37:45 +03:00
parent b2a4c27709
commit f07323715f
+6 -1
View File
@@ -30,7 +30,12 @@ public inline fun <T> Any?.unsafeCast(): @kotlin.internal.NoInfer T = this.asDyn
@JsName("unsafeCastDynamic")
public inline fun <T> dynamic.unsafeCast(): @kotlin.internal.NoInfer T = this
// TODO add the support ES6 iterators
/**
* Allows to iterate this `dynamic` object in the following cases:
* - when it has an `iterator` function,
* - when it is an array
* - when it is an instance of [kotlin.collections.Iterable]
*/
@kotlin.internal.DynamicExtension
public operator fun dynamic.iterator(): Iterator<dynamic> {
val r: Any? = this