cancandan
09/05/2017, 12:54 PMlewik
09/06/2017, 10:12 AMlewik
09/06/2017, 12:38 PMtestMe
method. I can't call it in old js: I see testMe_61zpoe$
lewik
09/07/2017, 5:52 AMkarelpeeters
09/07/2017, 9:49 PMtgmcians
09/08/2017, 12:45 PMbamdmux
09/14/2017, 5:25 AMjdemeulenaere
09/16/2017, 10:42 AMnapperley
09/25/2017, 12:57 AMhiperbou
09/25/2017, 10:58 AMdanfma
09/27/2017, 2:18 AMkotlin-dce-js
is generating invalid code?bashor
09/27/2017, 10:32 AMjdemeulenaere
09/27/2017, 8:11 PMnaitbit
09/28/2017, 9:09 AMsortBy
on mutableList
More specifically:
children.sortBy{ it.toString() }
generates
var sortWith = Kotlin.kotlin.collections.sortWith_nqfjgj$;
var wrapFunction = Kotlin.wrapFunction;
var compareBy$lambda = wrapFunction(function () {
var compareValues = Kotlin.kotlin.comparisons.compareValues_s00gnj$;
return function (closure$selector) {
return function (a, b) {
var selector = closure$selector;
return compareValues(selector(a), selector(b));
};
};
});
var Comparator = Kotlin.kotlin.Comparator;
function Comparator$ObjectLiteral(closure$comparison) {
this.closure$comparison = closure$comparison;
}
Comparator$ObjectLiteral.prototype.compare = function (a, b) {
return this.closure$comparison(a, b);
};
Comparator$ObjectLiteral.$metadata$ = {kind: Kotlin.Kind.CLASS, interfaces: [Comparator]};
and Firebase complains:
TypeError: wrapFunction is not a function
at /tmp/fbfn_20366LgmtP4EM7pSy/kot.js:96:26
at Object.<anonymous> (/tmp/fbfn_20366LgmtP4EM7pSy/kot.js:167:2)
at Module._compile (module.js:624:30)
at Object.Module._extensions..js (module.js:635:10)
at Module.load (module.js:545:32)
at tryModuleLoad (module.js:508:12)
at Function.Module._load (module.js:500:3)
at Module.require (module.js:568:17)
at require (internal/module.js:11:18)
danfma
09/29/2017, 7:18 PMDeactivated User
09/30/2017, 4:49 PMalexander.egger
10/06/2017, 8:31 AMTristan Caron
10/08/2017, 6:44 PMmyLib = await import('<http://etc.com/lib.js>');
myLib.myFunction();
Or in Dart
import 'myLib.dart' deferred as 'myLibLoader';
const myLib = await myLibLoader;
myLib.myFunction();
napperley
10/08/2017, 10:12 PMsdeleuze
10/10/2017, 1:25 PMERROR in Entry module not found: Error: Can't resolve '/home/sdeleuze/workspace/kotlin-examples/gradle/js-dce/build/classes/main/min/kotlin-dce-example_main.js'
snrostov
10/10/2017, 2:08 PMsdeleuze
10/10/2017, 4:22 PMsdeleuze
10/11/2017, 7:34 AMsdeleuze
10/11/2017, 3:10 PMwindow.onload
and eventSource.onmessage
have the same `((Event) -> dynamic)?`declaration, so I don't understand why I can use window.onload
without a problem and not eventSource.onmessage
.sdeleuze
10/11/2017, 3:29 PMEvent
and not in my use case MessageEvent
?nulldev
10/12/2017, 2:20 AMkarelpeeters
10/12/2017, 1:07 PM//js
karel = {
"name": "Karel Peeters"
};
//kotlin
class Person(val name: String) {
fun printName() = println(name)
}
external val karel: Person
fun main(args: Array<String>) {
karel.printName()
}
I have some data defined externally that matches some classes in fields, but it doesn't have the functions the class needs. Is there a way to automatically use the Kotlin-defined ones?lewik
10/13/2017, 12:10 PM{someId1: Obj1, someId2: Obj2}
How can I access to it in kotlin? I can't come up with external definition.Tristan Caron
10/16/2017, 12:10 PMnomad
10/16/2017, 1:00 PMnomad
10/16/2017, 1:00 PMkarelpeeters
10/16/2017, 1:01 PMnomad
10/16/2017, 1:01 PMkarelpeeters
10/16/2017, 1:01 PMbashor
10/16/2017, 1:17 PMnomad
10/16/2017, 1:25 PMbashor
10/16/2017, 2:31 PM