fun <reified T> eval(javascript: String): T
Evaluates the given JavaScript string and casts the result to the desired JVM type. You can request a cast to interfaces that map to JS objects, collections, the Graal/Polyglot Value type, boxed primitives and more.