Hi there, does anyone know is there some specific ...
# javascript
d
Hi there, does anyone know is there some specific options for compileKotlin2Js to target node js, after compilation command line args actually ignored in output file.
Copy code
(function (_, Kotlin) {
  'use strict';
  var println = Kotlin.kotlin.io.println_s8jyv4$;
  function main(args) {
    println('Hello Javascript, from' + args[2]);
  }
  _.main_kand9s$ = main;
  main([]);
  Kotlin.defineModule('output', _);
  return _;
}(module.exports, require('kotlin')));
s
There is no special support for this yet. You can get arguments by declaring:
Copy code
@JsModule("process")
external object process {
    val argv: Array<String>
}
^^ Taken from node.js CLI app https://github.com/Kotlin/ts2kt/
d
@Svyatoslav Kuzmich [JB] Got it, thanks! Know this tooling 😃 If you mentioned ts2kt, maybe you could help one more time, what is best way to use this compiled to kotling typings actually?