Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package com.dokar.quickjs.converter
import com.dokar.quickjs.QuickJs
import kotlin.reflect.KType
/**
* The type converter for custom classes used by [QuickJs]'s functions.
*/
interface TypeConverter {
/**
* The source type class.
*/
val sourceType: KType
/**
* The target type class.
*/
val targetType: KType
/**
* Convert a value of type [Source] to type [Target].
*/
fun convertToTarget(value: Source): Target
/**
* Convert a value of type [Target] back to type [Source].
*/
fun convertToSource(value: Target): Source? = null
}