[K/JS] Remove FILE target from JsName annotation and use the new experimental JsFileName annotation instead

This commit is contained in:
Artem Kobzar
2023-07-27 09:44:28 +00:00
committed by Space Team
parent 029c71ebb1
commit 85ee2d71d2
16 changed files with 24 additions and 24 deletions
+2 -2
View File
@@ -281,7 +281,7 @@ public final annotation class JsExternalInheritorsOnly : kotlin.Annotation {
public constructor JsExternalInheritorsOnly()
}
@kotlin.annotation.Retention(value = AnnotationRetention.BINARY)
@kotlin.annotation.Retention(value = AnnotationRetention.SOURCE)
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.FILE})
public final annotation class JsFileName : kotlin.Annotation {
public constructor JsFileName(name: kotlin.String)
@@ -298,7 +298,7 @@ public final annotation class JsModule : kotlin.Annotation {
}
@kotlin.annotation.Retention(value = AnnotationRetention.BINARY)
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.FILE, AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER})
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER})
public final annotation class JsName : kotlin.Annotation {
public constructor JsName(name: kotlin.String)
@@ -11,7 +11,7 @@ import kotlin.reflect.KClass
/**
* Gives a declaration (a function, a property or a class) specific name in JavaScript.
*/
@Target(FILE, CLASS, FUNCTION, PROPERTY, CONSTRUCTOR, PROPERTY_GETTER, PROPERTY_SETTER)
@Target(CLASS, FUNCTION, PROPERTY, CONSTRUCTOR, PROPERTY_GETTER, PROPERTY_SETTER)
@OptionalExpectation
public expect annotation class JsName(val name: String)
@@ -37,6 +37,7 @@ public annotation class ExperimentalJsFileName
@Target(FILE)
@OptionalExpectation
@ExperimentalJsFileName
@Retention(AnnotationRetention.SOURCE)
public expect annotation class JsFileName(val name: String)
/**
+1 -1
View File
@@ -8,7 +8,7 @@ package kotlin.js
import kotlin.annotation.AnnotationTarget.*
@Retention(AnnotationRetention.BINARY)
@Target(FILE, CLASS, FUNCTION, PROPERTY, CONSTRUCTOR, PROPERTY_GETTER, PROPERTY_SETTER)
@Target(CLASS, FUNCTION, PROPERTY, CONSTRUCTOR, PROPERTY_GETTER, PROPERTY_SETTER)
internal external annotation class JsName(val name: String)
internal external annotation class native
+1 -1
View File
@@ -2,7 +2,7 @@
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@file:JsName("ComparatorJs")
@file:JsFileName("ComparatorJs")
package kotlin
@@ -58,7 +58,7 @@ internal annotation class marker
*
*/
@Retention(AnnotationRetention.BINARY)
@Target(FILE, CLASS, FUNCTION, PROPERTY, CONSTRUCTOR, PROPERTY_GETTER, PROPERTY_SETTER)
@Target(CLASS, FUNCTION, PROPERTY, CONSTRUCTOR, PROPERTY_GETTER, PROPERTY_SETTER)
public actual annotation class JsName(actual val name: String)
/**
@@ -66,7 +66,7 @@ public actual annotation class JsName(actual val name: String)
*
* This annotation can be applied only to files and only when the compilation granularity is `PER_FILE`.
*/
@Retention(AnnotationRetention.BINARY)
@Retention(AnnotationRetention.SOURCE)
@Target(FILE)
public actual annotation class JsFileName(actual val name: String)
@@ -3,7 +3,7 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@file:JsName("AbstractMutableCollectionJs")
@file:JsFileName("AbstractMutableCollectionJs")
package kotlin.collections
@@ -8,7 +8,7 @@
* Copyright 2007 Google Inc.
*/
@file:JsName("AbstractMutableListJs")
@file:JsFileName("AbstractMutableListJs")
package kotlin.collections
@@ -3,7 +3,7 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@file:JsName("ArrayListJs")
@file:JsFileName("ArrayListJs")
package kotlin.collections
@@ -3,7 +3,7 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@file:JsName("KCallableJs")
@file:JsFileName("KCallableJs")
package kotlin.reflect
@@ -3,7 +3,7 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@file:kotlin.js.JsName("KClassJs")
@file:kotlin.js.JsFileName("KClassJs")
package kotlin.reflect
@@ -4,7 +4,7 @@
*/
@file:Suppress("IMPLEMENTING_FUNCTION_INTERFACE")
@file:JsName("KPropertyJs")
@file:JsFileName("KPropertyJs")
package kotlin.reflect
@@ -3,12 +3,10 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
// TODO: Suppress will be until the next bootstrapping, after the bootstrapping the annotation should be replaced with [kotlin.js.JsFileName]
@file:Suppress("ANNOTATION_IS_NOT_APPLICABLE_TO_MULTIFILE_CLASSES")
@file:kotlin.js.JsName("CollectionsKt")
@file:kotlin.js.JsFileName("CollectionsKt")
@file:kotlin.jvm.JvmMultifileClass
@file:kotlin.jvm.JvmName("CollectionsKt")
@file:OptIn(kotlin.experimental.ExperimentalTypeInference::class)
@file:OptIn(kotlin.experimental.ExperimentalTypeInference::class, kotlin.js.ExperimentalJsFileName::class)
package kotlin.collections
@@ -32,7 +32,6 @@ public actual annotation class JsExport {
*/
@Retention(AnnotationRetention.BINARY)
@Target(
AnnotationTarget.FILE,
AnnotationTarget.CLASS,
AnnotationTarget.FUNCTION,
AnnotationTarget.PROPERTY,