Created
September 4, 2017 06:04
-
-
Save nosix/c83344c310078b20551250f767e5129b to your computer and use it in GitHub Desktop.
convert deprecated @nativeGetter/@nativeSetter to inline extension function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
external interface MethodMap | |
inline operator fun MethodMap.get(propertyName: String): Function<Any>? = this.asDynamic()[propertyName] | |
inline operator fun MethodMap.set(propertyName: String, value: Function<Any>?) { | |
this.asDynamic()[propertyName] = value | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
external interface MethodMap { | |
@nativeGetter | |
operator fun get(propertyName: String): Function<Any>? | |
@nativeSetter | |
operator fun set(propertyName: String, value: Function<Any>) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment