Skip to content

Commit

Permalink
Add util function to create Kairo types (#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
hudson155 authored Feb 7, 2025
1 parent c4bb977 commit c34ffe6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kairo-reflect/src/main/kotlin/kairo/reflect/KairoType.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import kotlin.reflect.KClass
import kotlin.reflect.KType
import kotlin.reflect.full.allSupertypes
import kotlin.reflect.jvm.javaType
import kotlin.reflect.typeOf

@Suppress("UseDataClass")
public class KairoType<T : Any>(
Expand All @@ -27,3 +28,6 @@ public class KairoType<T : Any>(
}
}
}

public inline fun <reified T : Any> kairoType(): KairoType<T> =
KairoType(typeOf<T>())

0 comments on commit c34ffe6

Please sign in to comment.