Edoardo Luppi
06/26/2023, 12:40 PMread<T>(ctor: new (store: KeyValueStore) => T): void;
Note the new
for the type.
What would be the corresponding Kotlin declaration?hfhbd
06/26/2023, 12:45 PMfun<T> read(ctor (KeyValueStore) -> T): Unit
Edoardo Luppi
06/26/2023, 12:46 PM::MyClass
), the TS declaration file ends up containing read: (p0: KeyValueStore) => T
, which doesn't allow passing a constructor reference AFAIKhfhbd
06/26/2023, 1:10 PMval createTree: (fileName: String, procedure: CobolFIRTree.ProcedureTree) -> CobolFIRTree = ::CobolFIRTree
val tree: CobolFIRTree = createTree("myFile", procedures)