Edouard Goossens
03/13/2019, 11:45 AMw: Module "kotlin" is defined in more than one file
warnings. Is there a way to avoid that? Can I make npm aware of the fact that both packages depend on kotlin and it should only be included once? Thanks!gumil
03/13/2019, 9:35 PMnodeModulesDir
that was set ?Edouard Goossens
03/14/2019, 11:53 AMasync { suspendFunction() }.asPromise()
. Is there a more elegant way that doesn’t require wrappers?altavir
03/15/2019, 5:15 PMdynamic
to be passed to JS library. What is the easiest way to do it?Dico
03/15/2019, 5:48 PMjs("it")
?altavir
03/16/2019, 7:33 AMJsModule
and JsQualifier
, but it does not seem to work. If I try to use require
, the build is failing with a list of errors containing Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
.spand
03/20/2019, 9:16 AM?.let {}
doesnt use the extension function when receiver is dynamic. Anyone found a pattern just as concise way to express it ?Pavel Shorokhov
03/21/2019, 7:34 PMdiv("App-toolbar-button " + "App-toolbar-button__selected".takeIf { state.pageSelected == 0 }) {
How to get rid of strings concat?Pavel Shorokhov
03/21/2019, 11:46 PMJSON.parse<T>()
won't fails with incorrect json and will continue works.
For example:
data class Car(val name: String)
val car = JSON.parse<Car>("{\"qwe\":123}")
This code will works and car.name
will return undefined.
Is there any way to check that json matches to specified structure?jw
03/21/2019, 11:52 PMLeoColman
03/22/2019, 2:07 AMaltavir
03/27/2019, 1:08 PMjsTest
source set.robstoll
03/28/2019, 4:39 PMArtglorin
04/01/2019, 8:52 AMLawik
04/01/2019, 9:33 AMwaqas
04/04/2019, 6:52 AMkotlinOptions.moduleKind = "umd"
in my jsMain block. Whenever I build it I get in sharemodule/build/libs/sharedcode-js.jar
and sharedcode.js file only in /build/classes/kotlin/js/main/sharedcode.js
For now I just want to test shared code in a separate very simple Kotlin-JS project. Which file I am suppose to include in new project to use sharedcode built for JS?
Thread in #multiplatformVladyslav Sitalo
04/04/2019, 2:54 PMVladyslav Sitalo
04/07/2019, 5:08 PMmoduleName
module.exports = {
foo: { /* some code here */ },
C: { /* some code here */ }
}
I can import it to kotlin like this:
@file:JsModule("moduleName")
package ext.jspackage.name
external fun foo()
external class C
The problem with this is that if I want to use that functionality elsewhere in kotlin code - I’ll have to import the functions/objects directly. I.e. like import ext.jspackage.name.foo
. Which is not great, as that name can be generic/etc.
What I want is to recreate experience where I’d call the foo
function with module name prefix - moduleName.foo()
I can’t import modules in Kotlin though, and external
things can’t be defined within non external ones, so I can’t do something like
object moduleName {
external fun foo()
}
Is there a way to accomplish this?gbaldeck
04/08/2019, 3:15 AMRené
04/09/2019, 5:05 AMRené
04/09/2019, 5:16 AMgbaldeck
04/09/2019, 4:39 PMdanfma
04/10/2019, 10:27 PMspand
04/11/2019, 12:12 PMfinally
present on Promise
in kotlin-js-stdlib ?Robert Jaros
04/12/2019, 10:49 PMkotlin.js
is more than 10% larger (+200KB)? This has a significant impact on the size of the output files for Kotlin/JS apps.Robert Jaros
04/13/2019, 11:09 PMAlexander Weickmann
04/17/2019, 2:20 PMIlya Goncharov [JB]
04/18/2019, 8:34 AMRobert Jaros
04/21/2019, 9:37 PMarray.asDynamic().push(element)
?Lawik
04/24/2019, 10:20 AM