[stdlib] Annotated new API with SinceKotlin(2.0) where required KT-64904
This commit is contained in:
committed by
Space Team
parent
1c4023fda5
commit
5afb2c5e4b
@@ -203,7 +203,7 @@ public interface List<out E> : Collection<E> {
|
||||
*/
|
||||
@ExperimentalJsExport
|
||||
@ExperimentalJsCollectionsApi
|
||||
@SinceKotlin("1.9")
|
||||
@SinceKotlin("2.0")
|
||||
public fun asJsReadonlyArrayView(): JsReadonlyArray<E> = createJsReadonlyArrayViewFrom(this)
|
||||
}
|
||||
|
||||
@@ -279,7 +279,7 @@ public interface MutableList<E> : List<E>, MutableCollection<E> {
|
||||
*/
|
||||
@ExperimentalJsExport
|
||||
@ExperimentalJsCollectionsApi
|
||||
@SinceKotlin("1.9")
|
||||
@SinceKotlin("2.0")
|
||||
public fun asJsArrayView(): JsArray<E> = createJsArrayViewFrom(this)
|
||||
}
|
||||
|
||||
@@ -309,7 +309,7 @@ public interface Set<out E> : Collection<E> {
|
||||
*/
|
||||
@ExperimentalJsExport
|
||||
@ExperimentalJsCollectionsApi
|
||||
@SinceKotlin("1.9")
|
||||
@SinceKotlin("2.0")
|
||||
public fun asJsReadonlySetView(): JsReadonlySet<E> = createJsReadonlySetViewFrom(this)
|
||||
}
|
||||
|
||||
@@ -349,7 +349,7 @@ public interface MutableSet<E> : Set<E>, MutableCollection<E> {
|
||||
*/
|
||||
@ExperimentalJsExport
|
||||
@ExperimentalJsCollectionsApi
|
||||
@SinceKotlin("1.9")
|
||||
@SinceKotlin("2.0")
|
||||
public fun asJsSetView(): JsSet<E> = createJsSetViewFrom(this)
|
||||
}
|
||||
|
||||
@@ -426,7 +426,7 @@ public interface Map<K, out V> {
|
||||
*/
|
||||
@ExperimentalJsExport
|
||||
@ExperimentalJsCollectionsApi
|
||||
@SinceKotlin("1.9")
|
||||
@SinceKotlin("2.0")
|
||||
public fun asJsReadonlyMapView(): JsReadonlyMap<K, V> = createJsReadonlyMapViewFrom(this)
|
||||
}
|
||||
|
||||
@@ -497,6 +497,6 @@ public interface MutableMap<K, V> : Map<K, V> {
|
||||
*/
|
||||
@ExperimentalJsExport
|
||||
@ExperimentalJsCollectionsApi
|
||||
@SinceKotlin("1.9")
|
||||
@SinceKotlin("2.0")
|
||||
public fun asJsMapView(): JsMap<K, V> = createJsMapViewFrom(this)
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ public actual open class ArrayList<E> internal constructor(private var array: Ar
|
||||
|
||||
@ExperimentalJsExport
|
||||
@ExperimentalJsCollectionsApi
|
||||
@SinceKotlin("1.9")
|
||||
@SinceKotlin("2.0")
|
||||
override fun asJsArrayView(): JsArray<E> = array.unsafeCast<JsArray<E>>()
|
||||
|
||||
internal override fun checkIsMutable() {
|
||||
|
||||
@@ -10,7 +10,7 @@ package kotlin.js.collections
|
||||
* Exposes the TypeScript [ReadonlyArray](https://www.typescriptlang.org/docs/handbook/2/objects.html#the-readonlyarray-type) to Kotlin.
|
||||
*/
|
||||
@JsName("ReadonlyArray")
|
||||
@SinceKotlin("1.9")
|
||||
@SinceKotlin("2.0")
|
||||
@ExperimentalJsCollectionsApi
|
||||
public external interface JsReadonlyArray<out E>
|
||||
|
||||
@@ -18,7 +18,7 @@ public external interface JsReadonlyArray<out E>
|
||||
* Exposes the JavaScript [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) to Kotlin.
|
||||
*/
|
||||
@JsName("Array")
|
||||
@SinceKotlin("1.9")
|
||||
@SinceKotlin("2.0")
|
||||
@ExperimentalJsCollectionsApi
|
||||
public external open class JsArray<E> : JsReadonlyArray<E>
|
||||
|
||||
@@ -26,7 +26,7 @@ public external open class JsArray<E> : JsReadonlyArray<E>
|
||||
* Exposes the TypeScript [ReadonlySet](https://github.com/microsoft/TypeScript/blob/bd952a7a83ce04b3541b952238b6c0e4316b7d5d/src/lib/es2015.collection.d.ts#L103) to Kotlin.
|
||||
*/
|
||||
@JsName("ReadonlySet")
|
||||
@SinceKotlin("1.9")
|
||||
@SinceKotlin("2.0")
|
||||
@ExperimentalJsCollectionsApi
|
||||
public external interface JsReadonlySet<out E>
|
||||
|
||||
@@ -34,7 +34,7 @@ public external interface JsReadonlySet<out E>
|
||||
* Exposes the JavaScript [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) to Kotlin.
|
||||
*/
|
||||
@JsName("Set")
|
||||
@SinceKotlin("1.9")
|
||||
@SinceKotlin("2.0")
|
||||
@ExperimentalJsCollectionsApi
|
||||
public external open class JsSet<E> : JsReadonlySet<E>
|
||||
|
||||
@@ -42,7 +42,7 @@ public external open class JsSet<E> : JsReadonlySet<E>
|
||||
* Exposes the TypeScript [ReadonlyMap](https://github.com/microsoft/TypeScript/blob/bd952a7a83ce04b3541b952238b6c0e4316b7d5d/src/lib/es2015.collection.d.ts#L37) to Kotlin.
|
||||
*/
|
||||
@JsName("ReadonlyMap")
|
||||
@SinceKotlin("1.9")
|
||||
@SinceKotlin("2.0")
|
||||
@ExperimentalJsCollectionsApi
|
||||
public external interface JsReadonlyMap<K, out V>
|
||||
|
||||
@@ -50,6 +50,6 @@ public external interface JsReadonlyMap<K, out V>
|
||||
* Exposes the JavaScript [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) to Kotlin.
|
||||
*/
|
||||
@JsName("Map")
|
||||
@SinceKotlin("1.9")
|
||||
@SinceKotlin("2.0")
|
||||
@ExperimentalJsCollectionsApi
|
||||
public external open class JsMap<K, V> : JsReadonlyMap<K, V>
|
||||
Reference in New Issue
Block a user