https://kotlinlang.org logo
#server
Title
# server
m

Mikael Ståldal

01/25/2023, 9:28 AM
Is this supposed to be used on JVM, or only in JS? (The docs are a bit confusing.) https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.js/-promise/
r

Rob Elliot

01/25/2023, 9:30 AM
It's in kotlin.js and the first line of https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.js/ is
Functions and other APIs specific to the JavaScript platform.
So I'd assume it's js only?
s

Sam

01/25/2023, 9:30 AM
😄 nice, the URI has
jvm
and
js
in it
☝️ 1
r

Rob Elliot

01/25/2023, 9:31 AM
The entire stdlib seems to be under jvm - presumably for historic reasons?
m

Mikael Ståldal

01/25/2023, 9:31 AM
I also think it is JS only, but the URL is confusing indeed.
r

Rob Elliot

01/25/2023, 9:32 AM
I think the important bit is the orange dot - if you toggle off the orange JS at the top everything disappears.
👆 1
n

napperley

01/26/2023, 12:42 AM
Did you see the yellow dots in the documentation? A yellow dot beside a part of the API means it is available for Kotlin JS. Filters are available at the top of the web page to toggle Kotlin development platforms (Common, JVM, JS, Native; WASM isn't available yet).
d

Dirk

01/27/2023, 3:32 PM
image.png
👍 1
2 Views