Talon
07/10/2018, 5:14 PM"Any type is not supported"
ehubbard
07/11/2018, 2:49 PMowlish
07/12/2018, 8:56 PMjw
07/15/2018, 1:21 AMjw
07/16/2018, 8:09 PMrequire
in node? For example, I want to test code that uses URL
.Nail Gilaziev
07/17/2018, 8:09 AMmarcinmoskala
07/17/2018, 12:19 PMEdouard Goossens
07/20/2018, 4:18 PMMatt
07/20/2018, 5:07 PM@JsNonModule
gbaldeck
07/20/2018, 6:22 PMkrtko
07/20/2018, 10:44 PMkasper.kondzielski
07/23/2018, 9:12 PMmain.bundle.js:1 Uncaught (in promise) ReferenceError: JSONFormatter is not defined
at P (main.bundle.js:1)
at b (main.bundle.js:1)
krtko
07/24/2018, 11:28 PMdany
07/25/2018, 8:55 AMfrellan
07/25/2018, 9:08 AMkrtko
07/27/2018, 9:03 PMkrtko
07/27/2018, 9:27 PMankushg
08/01/2018, 2:55 AMSergi Ortega
08/01/2018, 8:48 AMNorg
08/01/2018, 5:32 PMattrs.caption = state.toBeDeleted?.asDynamic()["name"].toString()
I'm expecting that if state.toBeDeleted
is null
, the rest of row will not be invoked, and null
will be the value of the whole expression. But this row is compiled into:
$receiver.attrs.caption = ((tmp$ = this$Content.state.toBeDeleted) != null ? tmp$ : null)['name'].toString();
And the result is Cannot read property 'name' of null
. Am I misunderstanding something?jw
08/02/2018, 3:06 AM-g
for the install task. I would also just love to see project.buildDir changed to rootProject.buildDir (if the locking works). But global would be preferred for CI so that I could share the global installs across runs (similar to how Gradle stuff is in ~/.gradle)gbaldeck
08/02/2018, 9:11 PMankushg
08/02/2018, 11:59 PMnapperley
08/04/2018, 4:28 AMfair_enough
08/08/2018, 12:42 PMapomelov
08/08/2018, 3:17 PMapomelov
08/09/2018, 6:01 AMConfig
. There is also declare type Config = { ... }
. In kotlin code Config
becomes an external interface with plenty of optional vars. How should I create an instance of this interface? Just like this?
val cfg = object : Config {
override var width: dynamic
get() = 200
set(value) {}
override var height: dynamic
get() = 300
set(value) {}
...
}
It looks monstrous for me...fair_enough
08/09/2018, 10:26 AMcompileKotlin2Js {
kotlinOptions.outputFile = "${projectDir}/build/web/output.js"
kotlinOptions.moduleKind = "commonjs"
kotlinOptions.sourceMap = true
}
which is like:
(function (_, Kotlin) {
'use strict';
var println = Kotlin.kotlin.io.println_s8jyv4$;
var Kind_OBJECT = Kotlin.Kind.OBJECT;
var Kind_CLASS = Kotlin.Kind.CLASS;
function Example() {
Example$Companion_getInstance();
println('Example constructor');
}
Example.prototype.exampleMethod = function () {
println('Example method');
};
function Example$Companion() {
Example$Companion_instance = this;
}
Example$Companion.prototype.exampleStaticMethod = function () {
println('Example static method');
};
Example$Companion.$metadata$ = {
kind: Kind_OBJECT,
simpleName: 'Companion',
interfaces: []
};
var Example$Companion_instance = null;
function Example$Companion_getInstance() {
if (Example$Companion_instance === null) {
new Example$Companion();
}
return Example$Companion_instance;
}
Example.$metadata$ = {
kind: Kind_CLASS,
simpleName: 'Example',
interfaces: []
};
Object.defineProperty(Example, 'Companion', {
get: Example$Companion_getInstance
});
var package$net = <http://_.net|_.net> || (<http://_.net|_.net> = {});
var package$aliceintokyo = package$net.aliceintokyo || (package$net.aliceintokyo = {});
package$aliceintokyo.Example = Example;
Kotlin.defineModule('output', _);
return _;
}(module.exports, require('kotlin')));
//# sourceMappingURL=output.js.map
So now I want it to use in node js project.
When I created simple nodeje module, installed it and I called
var simple = require("simple");
console.log(simple)
I got printed:
[object Module]
When I did same with example, I got no error, but:
[object Object]
What am I doing wrong? How to require compiled kotlinjs?spierce7
08/09/2018, 1:20 PMgcx11
08/10/2018, 8:37 PMError: Error loading module 'output'. Its dependency 'kotlin' was not found. Please, check whether 'kotlin' is loaded prior to 'output'
Gradle file:
https://github.com/gcx11/FiveInLine/blob/master/build.gradlegcx11
08/10/2018, 8:37 PMError: Error loading module 'output'. Its dependency 'kotlin' was not found. Please, check whether 'kotlin' is loaded prior to 'output'
Gradle file:
https://github.com/gcx11/FiveInLine/blob/master/build.gradleRoman Artemev [JB]
08/11/2018, 1:02 AMgcx11
08/12/2018, 9:44 AM