Felix
06/21/2023, 9:53 AMPair
) as Javascript arrays. However I would like the TypeScript signature to reflect the original tuple types.
E.g.
Expose Pair<Int, String>
as an Array
, however have the TypeScript type be [number, string]
turansky
06/21/2023, 10:37 PMJsTuple2
.
To construct it you can use tupleOf
factory function.Felix
06/23/2023, 2:50 PMExported declaration uses non-exportable return type: JsTuple2<Any, Any>
I assumed that JsTuple2<T,U>
is exportable if T
and U
are exportable. Am I wrong in assuming this?Felix
06/23/2023, 2:56 PMexport declare function removed(...): any/* js.core.JsTuple2<any, any> */;
turansky
06/23/2023, 2:59 PMJsTuple2
is non-external
It will be possible to fix modifier in Kotlin 1.9
only (compiler fixes required)Felix
06/23/2023, 3:01 PMturansky
06/23/2023, 5:51 PMexternal
-> exportableturansky
06/23/2023, 5:52 PMturansky
06/23/2023, 5:55 PMtype JsTuple2<A, B> = [A, B]