This repository was archived by the owner on Jan 28, 2025. It is now read-only.
Commit adc689c
Handle an interface with suspend that returns a JS friendly type
If we are KustomExporting an interface that contains a suspend that
returns a JS friendly type (e.g. Long <-> Double), we want to await
the promise result before importing the JS type back to the Kotlin
type.
> promise.toLong().await()
becomes:
> promise.await().toLong()1 parent 0726ff6 commit adc689c
File tree
3 files changed
+36
-2
lines changed- compiler/src/main/kotlin/deezer/kustomexport/compiler/js/pattern
- samples/src/commonMain/kotlin/sample/coroutines
3 files changed
+36
-2
lines changedLines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
145 | 147 | | |
146 | 148 | | |
147 | 149 | | |
148 | | - | |
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
| |||
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments