Skip to content

Commit 2c0d1ed

Browse files
committed
feat: introduce markName property to SuspendTransformAnnotation with validation support
1 parent b260950 commit 2c0d1ed

File tree

1 file changed

+38
-3
lines changed

1 file changed

+38
-3
lines changed

runtime/suspend-transform-annotation/src/commonMain/kotlin/love/forte/plugin/suspendtrans/annotation/SuspendTransformAnnotation.kt

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,19 @@ public expect annotation class JvmBlocking(
6262
* Note: If [asProperty] == `true`, the function cannot have parameters.
6363
*
6464
*/
65-
val asProperty: Boolean = false
65+
val asProperty: Boolean = false,
66+
67+
/**
68+
* The name of `@JvmName`.
69+
* Valid when not empty.
70+
*
71+
* If multiple markNames are effective for the same function on the same platform,
72+
* an exception will be generated during the compilation period.
73+
*
74+
* Note: In the JVM, adding `@JvmName` to a non-final function is usually not allowed by the compiler.
75+
* @since 0.13.0
76+
*/
77+
val markName: String = "",
6678
)
6779

6880
/**
@@ -101,7 +113,19 @@ public expect annotation class JvmAsync(
101113
*
102114
* Note: If [asProperty] == `true`, the function cannot have parameters.
103115
*/
104-
val asProperty: Boolean = false
116+
val asProperty: Boolean = false,
117+
118+
/**
119+
* The name of `@JvmName`.
120+
* Valid when not empty.
121+
*
122+
* If multiple markNames are effective for the same function on the same platform,
123+
* an exception will be generated during the compilation period.
124+
*
125+
* Note: In the JVM, adding `@JvmName` to a non-final function is usually not allowed by the compiler.
126+
* @since 0.13.0
127+
*/
128+
val markName: String = "",
105129
)
106130

107131

@@ -125,5 +149,16 @@ public expect annotation class JsPromise(
125149
* Note: If [asProperty] == `true`, the function cannot have parameters.
126150
*
127151
*/
128-
val asProperty: Boolean = false
152+
val asProperty: Boolean = false,
153+
154+
/**
155+
* The name of `@JsName`.
156+
* Valid when not empty.
157+
*
158+
* If multiple markNames are effective for the same function on the same platform,
159+
* an exception will be generated during the compilation period.
160+
*
161+
* @since 0.13.0
162+
*/
163+
val markName: String = "",
129164
)

0 commit comments

Comments
 (0)