Provide extension unsafeCast for dynamic.
#KT-15310
This commit is contained in:
@@ -23,6 +23,13 @@ public inline fun Any?.asDynamic(): dynamic = this
|
||||
*/
|
||||
public inline fun <T> Any?.unsafeCast(): @kotlin.internal.NoInfer T = this.asDynamic()
|
||||
|
||||
/**
|
||||
* Reinterprets this `dynamic` value as a value of the specified type [T] without any actual type checking.
|
||||
*/
|
||||
@kotlin.internal.DynamicExtension
|
||||
@JsName("unsafeCastDynamic")
|
||||
public inline fun <T> dynamic.unsafeCast(): @kotlin.internal.NoInfer T = this
|
||||
|
||||
// TODO add the support ES6 iterators
|
||||
@kotlin.internal.DynamicExtension
|
||||
public operator fun dynamic.iterator(): Iterator<dynamic> {
|
||||
|
||||
Reference in New Issue
Block a user