All Downloads are FREE. Search and download functionalities are using the official Maven repository.

main.seskar.compiler.value.backend.JsValue.kt Maven / Gradle / Ivy

There is a newer version: 3.75.0
Show newest version
package seskar.compiler.value.backend

import org.jetbrains.kotlin.descriptors.ClassKind
import org.jetbrains.kotlin.ir.declarations.IrClass
import org.jetbrains.kotlin.ir.util.getAnnotation
import org.jetbrains.kotlin.name.FqName

internal val JS_VALUE = FqName("seskar.js.JsValue")

internal fun IrClass.isJsValue(): Boolean {
    if (kind != ClassKind.CLASS)
        return false

    if (!isValue)
        return false

    getAnnotation(JS_VALUE)
        ?: return false

    return true
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy