dokar3 / quickjs-kt

A QuickJS binding for idiomatic Kotlin, with Async/DSL/ES Modules support.
Apache License 2.0
41 stars 3 forks source link

Fix type converters #90

Closed dokar3 closed 3 months ago

dokar3 commented 3 months ago

This PR brings some Breaking changes:

  1. Map JS Array to Kotlin List instead of Array, this fixes moshi's fromJonsValue()
  2. Use KType instead of KClass in converters, this enables generics support for type converters
  3. Due to the previous change, deprecate evaluate(code, Class<T>) and similar functions, add evaluate(code, KType) as the replacement