McEna
05/29/2019, 8:24 PMthana
05/31/2019, 1:17 PMspierce7
05/31/2019, 5:20 PMthana
05/31/2019, 8:44 PMNote that Kotlin compiler does not apply such mangling to external declarations, so you don't have to use @JsName on them. Another case worth noticing is inheriting non-external classes from external classes. In this case any overridden functions won't be mangled as well.But it still will apply name mangling on properties, won't it?
thana
05/31/2019, 8:52 PMdata class
not inheriting from anything that names aren't mangeled at all. but if i implemement or extend from a class declared external the names get mangeled contradicting what the documentation saysJoffrey
06/03/2019, 9:01 PMexport interface Headers {
'content-length'?: string;
}
Dukat generates the following, which is valid Kotlin in general:
external interface Headers {
var `content-length`: String?
get() = definedExternally
set(value) = definedExternally
}
But now the compiler complains:
Name contains illegal chars that can't appear in JavaScript identifier
Does this mean that the kotlin compiler doesn't support outputting JS with string properties?
I tried with @JsName
, but it doesn't accept the dash either. Is there a way to work around this?
EDIT: question posted on StackOverflow
https://stackoverflow.com/questions/56434633/external-declaration-gives-name-contains-illegal-chars-that-cant-appear-in-javRobert Jaros
06/04/2019, 9:16 PMkotlin-frontend-plugin
failing with error notarget No matching version found for kotlinx-serialization-runtime-js@0.11.0
?U75957
06/05/2019, 6:26 AM[JB] Shagen
06/05/2019, 2:20 PMcfnz
06/06/2019, 5:15 AMthana
06/07/2019, 9:41 AMprototype
of a js class and when will it simply be on this
? What does this decision depend on?Alexander Weickmann
06/07/2019, 1:33 PMvar d = new Date();
d.setDate(d.getDate()-5);
But the Kotlin JS Date object does not expose setDate ...U75957
06/07/2019, 2:53 PMconst val TEST1 = "test1"
object Test2 {
const val TEST2 = "test2"
}
class Test {
object Test3 {
const val TEST3 = "test3"
}
}
U75957
06/09/2019, 4:36 PM@beforeTest
and async @afterTest
will be properly chained. But in fact @beforeTest
, @afterTest
and an actual test starts in parallel. How to achieve the expected result?
class TestA : CoroutineScope by GlobalScope {
@BeforeTest
fun beforeTest() = promise {
println("beforeTest START")
delay(100)
println("beforeTest END")
}
@AfterTest
fun afterTest() = promise {
println("afterTest START")
delay(100)
println("afterTest END")
}
@Test
fun test1() = promise {
println("test1 START")
delay(100)
assertTrue(true)
println("test1 END")
}
@Test
fun test2() = promise {
println("test2 START")
delay(100)
assertTrue(true)
println("test2 END")
}
}
result:
JS: beforeTest START
JS: test1 START
JS: afterTest START
JS: beforeTest END
JS: test1 END
JS: afterTest END
JS: beforeTest START
JS: test2 START
JS: afterTest START
JS: beforeTest END
JS: test2 END
JS: afterTest END
turansky
06/13/2019, 11:03 AMhallvard
06/14/2019, 1:49 PMwindow.navigator.sendBeacon
. In JS I usually just do navigator.sendBeacon
. Does anyone in here have any knowledge to share?hallvard
06/15/2019, 10:48 AM.js
file to work on. Is there a complete list of settings and configurations for the DCE tool somewhere? I find the references and examples on kotlinlang.org to be scarce ...Valentyn
06/15/2019, 1:53 PMgalex
06/18/2019, 7:51 AMJan Stoltman
06/18/2019, 1:16 PMToddobryan
06/18/2019, 4:31 PMU75957
06/19/2019, 7:15 AMprototype
like this SomeClass.prototype.prop = "value"
. But when I do:
object SomeClass : SomeLibClass() {
override var prop = "value"
}
it produce such js code:
Object.defineProperty(SomeClass.prototype, 'prop', {
get: function () {
return this.prop_x8fmwh$_0;
},
set: function (prop) {
this.prop_x8fmwh$_0 = prop;
}
});
And it does not work. Looks like it's not equal to SomeClass.prototype.prop = "value"
. Why? And how to force kotlin/js produce just SomeClass.prototype.prop = "value"
?thana
06/19/2019, 11:07 AMsomeList.toTypedArray()
somewhere and in the debugger i can see it uses an Array
-implementation instead of a js-native array...Ilya Goncharov [JB]
06/19/2019, 12:30 PMvictor
06/19/2019, 3:52 PMUncaught TypeError: Cannot read property 'org' of undefined
at eval (SharedCode.js?ae59:2368)
at Module.eval (SharedCode.js?ae59:2859)
at eval (SharedCode.js:3319)
at Module../src/SharedCode.js (app.js:13570)
at __webpack_require__ (app.js:767)
at fn (app.js:130)
at eval (main.js:18)
at Module../src/main.js (app.js:14770)
at __webpack_require__ (app.js:767)
at fn (app.js:130)
Is there any example to put some KotlinJS code into VueJS project?snrostov
06/19/2019, 4:45 PMvictor
06/19/2019, 5:36 PMvictor
06/19/2019, 5:38 PMJoffrey
06/19/2019, 9:52 PMgaetan
06/20/2019, 11:53 AMgaetan
06/20/2019, 11:53 AMsdeleuze
06/20/2019, 12:32 PMgaetan
06/20/2019, 12:34 PMsdeleuze
06/20/2019, 12:35 PMsnrostov
06/20/2019, 1:16 PMkotlin-platform-common
, kotlin-platform-js
, kotlin-platform-jvm
instead of new kotlin-multiplatform
?gaetan
06/20/2019, 1:20 PMsdeleuze
06/20/2019, 1:34 PM./gradlew :frontend:run -t
?snrostov
06/20/2019, 1:37 PMkotlin {
target {
browser {
runTask {
devServer = devServer.copy(port = 8081)
}
}
}
}
sdeleuze
06/20/2019, 1:38 PMsnrostov
06/20/2019, 1:39 PMkotlin {
target {
browser {
runTask {
devServer = devServer!!.copy(proxy = mapOf("/api" to "<http://localhost:8081>"))
}
}
Where <http://localhost:8081>
- backend endpointsdeleuze
06/20/2019, 1:41 PMsnrostov
06/20/2019, 1:42 PMgaetan
06/22/2019, 12:39 AMsnrostov
11/10/2020, 3:42 PM