Ana Sekuloski
09/17/2024, 6:47 PMHans van Dodewaard
09/17/2024, 7:13 PMPHondogo
09/17/2024, 7:34 PMorg.jetbrains.compose.experimental.jscanvas.enabled=true
Hans van Dodewaard
09/17/2024, 7:58 PMPHondogo
09/17/2024, 8:16 PMFernando
09/18/2024, 9:11 AMbuild
folder, you can import it using npm locally or publish it.
Be aware that lists and suspend functions have their gotchasAna Sekuloski
09/19/2024, 8:01 PMFernando
09/20/2024, 8:45 AMPromise
and for lists turn them into Array
not sure what you mean by "generic lists", if you mean a List<T>
you'll need to turn them into Array<T>
- But you'll need to define the type, if you want to have many types of data in it you can use the dynamic
(only available on the JS target).
Example:
fun getProjects(): Promise<Array<Project>?> {
return GlobalScope.promise {
projectRepository.getProjects() // This project repository is on common main that the signature is `suspend List<Project>?`
}
}