Title
z

zeckson

07/04/2017, 12:51 PM
hello, guys! Can I somehow pass
process.argv
into my
main
. I have following code:
fun main(args: Array<String>) {
    val token = args[2]
}
Вut it transpiles to:
(function (_, Kotlin) {
  'use strict';
  function main(args) {
    var token = args[2];
  }
  _.main_kand9s$ = main;
  main([]);
  Kotlin.defineModule('server', _);
  return _;
}(module.exports, require('kotlin')));
I’m using a workaround like this currently:
fun main(args: Array<String>) {
    val token = process.argv[2]
}
But maybe is there a better solution?
k

konsoletyper

07/04/2017, 12:52 PM