Package-level declarations

Types

Link copied to clipboard
object DllLoader

Utility object for loading native SWC library files.

Link copied to clipboard
object Spans

Utility object for creating Span objects.

Link copied to clipboard
interface SwcCallback

Callback interface for async operations.

Link copied to clipboard

Exception thrown when SWC operations fail.

Link copied to clipboard
object SwcJson

Utility object for JSON parsing operations.

Link copied to clipboard
class SwcNative

Main entry point for SWC (Speedy Web Compiler) operations in Kotlin/Java.

Link copied to clipboard
@Serializable
data class TransformOutput(val code: String, val msg: String? = null)

Output from SWC transform, print, or minify operations.

Link copied to clipboard
object TruePlusMinusSerializer : KSerializer<TruePlusMinus>

Custom serializer for TruePlusMinus enum that handles:

Link copied to clipboard
@Serializable
sealed class Union

Union types for representing TypeScript union types in Kotlin.

Properties

Link copied to clipboard
val outputJson: Json

Simple JSON decoder for TransformOutput.

Functions

Link copied to clipboard

Create an empty span with all values set to 0.

Link copied to clipboard
fun parseAstTree(jsonStr: String): Program

Parse a JSON string into a Program AST node.

Link copied to clipboard
fun span(start: Int = 0, end: Int = 0, ctxt: Int = 0, block: Span.() -> Unit = {}): Span

Create a Span object with specified start, end, and context values.