David Otasek
02/17/2022, 10:38 PM0.0.1-pre.264-kotlin-1.5.31
. However, the targeted project is using 17.0.1-pre.148-kotlin-1.4.30
. Bringing the target project's dependencies up to date is the virtuous path to this, but it has thus far proved very difficult. The KotlinConf explorer GitHub has no record of any code referring to previous versions that I could reference either.
The following is the import 'plumbing' that works in the newer project:
@file:JsModule("react-ace")
@file:JsNonModule
package ace
import react.*
@JsName("default")
external val aceEditor: ComponentClass<AceEditorProps>
external interface AceEditorProps : Props {
var ref : MutableRefObject<Nothing>
var mode: String
var theme : String
var annotations : Array<AceAnnotation>
var markers : Array<AceMarker>
var defaultValue : String?
var value : String?
var setOptions : AceOptions
}
Is there something simple that could be done to have this work with the older version while I try to update all the dependencies?turansky
02/17/2022, 11:00 PMProps
-> RProps
?
Looks like only this change will be required for downgradeturansky
02/17/2022, 11:04 PMAceEditor
- recommended (like in examples)
2. ReadonlyArray
for properties and parameters
3. Package name from NPM package name
@file:JsModule("react-ace")
@file:JsNonModule
package react.ace
import react.*
@JsName("default")
external val AceEditor: ComponentClass<AceEditorProps>
external interface AceEditorProps : Props {
// ...
var markers : ReadonlyArray<AceMarker>
}
David Otasek
02/17/2022, 11:05 PM@JsName("default")
external val aceEditor: RComponent<AceEditorProps, RState>
external interface AceEditorProps : RProps {
var ref : RMutableRef<Nothing>
var mode: String
var theme : String
var annotations : Array<Annotation>
var markers : Array<AceMarker>
var defaultValue : String?
var value : String?
var setOptions : AceOptions
}
turansky
02/17/2022, 11:06 PM@JsName("default")
external val AceEditor: RClass<AceEditorProps>
turansky
02/17/2022, 11:06 PMDavid Otasek
02/17/2022, 11:07 PMDavid Otasek
02/17/2022, 11:08 PMDavid Otasek
02/17/2022, 11:08 PMDavid Otasek
02/17/2022, 11:14 PM@file:JsModule("react-ace")
@file:JsNonModule
package ui.components.ace
import react.*
@JsName("default")
external val aceEditor: RClass<AceEditorProps>
external interface AceEditorProps : RProps {
var ref : RMutableRef<Nothing>
var mode: String
var theme : String
var annotations : Array<Annotation>
var markers : Array<AceMarker>
var defaultValue : String?
var value : String?
var setOptions : AceOptions
}
David Otasek
02/17/2022, 11:14 PM