External definition for const?


#1

How can I write a Kotlin external definition for

const ReactTestUtils = {
  renderIntoDocument: function(element) {

?


#2

I am guessing here, as you are not very specific in your question.

Did you try this?

@JsModule("whatever")
external object ReactTestUtils {
    fun renderIntoDocument(element: dynamic)
}