Animesh Sahu
02/04/2021, 10:11 AMA boolean was expected
🤔 I guess its a boolean otherwise code wouldn't have been compiled.Robert Jaros
02/04/2021, 2:44 PMkotlin-wrappers
and kotlinx-nodejs
artifacts to be published to Central anytime soon?Dmitry Romanov [JB]
02/05/2021, 8:08 AMJohn O'Reilly
02/05/2021, 4:13 PMHarald Pehl
02/05/2021, 5:30 PMclass TreeItemSelectEvent<T>(val treeItem: TreeItem<T>) : Event("treeitemselect")
fun select(treeItem: TreeItem<T>) {
element.dispatchEvent(TreeItemSelectEvent(treeItem))
}
When I try to create and dispatch the event, I get the following error:
TypeError: Failed to construct 'Event': Please use the 'new' operator, this DOM object constructor cannot be called as a function.
Using CustomEvent
instead of Event
doesn't help. What am I missing?Shannon Rhodes
02/05/2021, 6:55 PMgalex
02/06/2021, 1:36 PMLifecycleOwner
declared like that:
export namespace com.company.core.livedata {
class Lifecycle {
constructor();
readonly tags: kotlin.collections.MutableMap<string, any>;
isStarted: boolean;
start(): void;
stop(): void;
addStopObserver(block: () => void): void;
notifyObserversStop(): void;
}
}
export namespace com.company.core.livedata {
interface LifecycleOwner {
readonly lifecycle: com.company.core.livedata.Lifecycle;
}
}
I just don’t manage to import it in pure React app (with typescript). I import the module like that:
import * as companycore from 'companycore';
I can find Lifecycle
class if I log the whole module:
console.log("companycore", companycore)
But not the LifecycleOwner
interface.
Any idea?Slackbot
02/06/2021, 6:42 PMJulius Hannink
02/08/2021, 1:51 PMYou already registered Kotlin/JS target 'js' with another compiler: legacyAny idea on how to do that properly? I tried clearing gradle / idea / etc. caches but without success so far... :(
dave08
02/08/2021, 4:51 PMTarun Chawla
02/09/2021, 11:33 AMMarc Knaup
02/09/2021, 12:02 PMlive
, test
and dev
.
In each environment I’d like to use different configuration values, for example a different API URL.
So basically I’d have three .kt
files with different values each and depending on what I’d like to build/deploy I need a different one of these to be used 🤔
Ideally the values are provided when starting the server (e.g. webpack dev server) so that they can depend on environment variables (e.g. on Heroku).dave08
02/09/2021, 3:05 PMkotlin-react-tutorial.js?92c2:40758 Uncaught TypeError: Cannot read property 'toString' of undefined
at _no_name_provided__132.invoke_223 (kotlin-react-tutorial.js?92c2:40758)
at _no_name_provided__83.eval [as _$render] (kotlin-react-tutorial.js?92c2:40780)
at _no_name_provided__83.invoke_132 (kotlin-react-tutorial.js?92c2:24110)
at eval (kotlin-react-tutorial.js?92c2:24149)
at buildElements (kotlin-react-tutorial.js?92c2:23965)
at _no_name_provided__84.invoke_134 (kotlin-react-tutorial.js?92c2:24124)
at VideoList (kotlin-react-tutorial.js?92c2:24136)
at renderWithHooks (react-dom.development.js?b313:14985)
at updateFunctionComponent (react-dom.development.js?b313:17356)
at beginWork (react-dom.development.js?b313:19063)
In here:
_no_name_provided__132.prototype.invoke_223 = function ($this$rFunction, props) {
var tmp0_iterator = props.videos.iterator_68();
while (tmp0_iterator.hasNext_49()) {
var video = tmp0_iterator.next_56();
var tmp0_p_0 = null;
var tmp1_tag_0_1 = _no_name_provided_$factory_98(tmp0_p_0);
var tmp0_apply_0_3 = new RDOMBuilder(tmp1_tag_0_1);
>>> tmp0_apply_0_3._set_key_(video._id.toString()); <<<<<<
var tmp0__anonymous__1_5 = tmp0_apply_0_3._attrs_0;
_set_onClickFunction_(tmp0__anonymous__1_5, _no_name_provided_$factory_99(props, video));
if (video.equals(props.selectedVideo)) {
tmp0_apply_0_3.unaryPlus_8('\u25B6 ');
}tmp0_apply_0_3.unaryPlus_8('' + video._speaker + ': ' + video._title);
$this$rFunction.child_4(tmp0_apply_0_3.create_11());
Unit_getInstance();
}
};
I'm using the IR compiler in dev modeTarun Chawla
02/09/2021, 5:01 PMAndrey Nikanorov
02/09/2021, 5:28 PMShannon Rhodes
02/09/2021, 6:11 PM./gradlew clean
. I've tried build, run, and jsBrowserTask. What is the normal sequence of CLI commands?Joost Klitsie
02/10/2021, 8:44 AMTarun Chawla
02/10/2021, 10:27 AMdave08
02/10/2021, 10:53 AMdave08
02/10/2021, 2:10 PMrowExpansionTemplate?(data: any): JSX.Element | undefined;
rowGroupHeaderTemplate?(data: any, index: number): React.ReactNode | undefined;
In a Kotlin js react component wrapper?Tarun Chawla
02/10/2021, 3:30 PMdave08
02/10/2021, 4:15 PMRobert Jaros
02/10/2021, 5:58 PMprojectName.js
file processed by webpack, which makes all require()
directives resolved and added to the final bundle. It probably does not impact typical use cases, but for modular framework like KVision it makes a difference. I can't just work with an empty template project with all modules in build.gradle.kts
, because the bundle is very large even though the application is just a "hello world". It's a bit surprising for me considering IR should make final bundles lighter 😉Marc Knaup
02/10/2021, 7:11 PM-Xir-property-lazy-initialization
only relevant in projects with binaries?
Means I don’t have to set it in Kotlin/JS libraries at all, right?Chris
02/11/2021, 3:30 PMAlexander Weickmann
02/12/2021, 12:19 PMspierce7
02/13/2021, 2:57 AMrnett
02/13/2021, 7:33 AMdistribution
also seems not to work for Node, probably for related reasonsaltavir
02/13/2021, 2:39 PMdave08
02/14/2021, 2:46 PMdeclare const usernameToken: ({ username, password, }: {
username: string;
password: string;
}) => UsernameToken;
export default usernameToken;
export { UsernameToken };