Raise deprecation level for jsClass functions

Suppress error in tests

#KT-21703
This commit is contained in:
Ilya Gorbunov
2018-09-06 20:57:14 +03:00
parent 35f42c7d35
commit 62ffacab09
6 changed files with 11 additions and 2 deletions
@@ -19,10 +19,10 @@ external interface JsClass<T : Any> {
val name: String
}
@Deprecated("Use class literal and extension property `js` instead.", replaceWith = ReplaceWith("T::class.js"), level = DeprecationLevel.WARNING)
@Deprecated("Use class literal and extension property `js` instead.", replaceWith = ReplaceWith("T::class.js"), level = DeprecationLevel.ERROR)
external fun <T : Any> jsClass(): JsClass<T>
@Deprecated("Use class literal and extension property `js` instead.", replaceWith = ReplaceWith("this::class.js"), level = DeprecationLevel.WARNING)
@Deprecated("Use class literal and extension property `js` instead.", replaceWith = ReplaceWith("this::class.js"), level = DeprecationLevel.ERROR)
val <T : Any> T.jsClass: JsClass<T>
get() = when (jsTypeOf(this)) {
"string" -> js("String")