setTimeout や setInterval などのタイマー操作は『timer.jsx モジュール』、
document.getElementById や createElement 、document 自体への参照は『js/web.jsx モジュール』、
console.log などは『console.jsx モジュール』(これを使わず log 関数で代替可能)、
process や require など node 系は『js/node.jsx モジュール』をインポートして使用します。
ビルトイン系は import せずとも全てそのまま使える感じです。
モジュール一覧
http://jsx.github.io/doc/stdlibref.html
// setTimeout や requestAnimationFrame などのタイマー関数を使う場合は、このモジュールを import する import "timer.jsx"; class _Main { static function main(args : string[]) : void { log "Hello, world!"; Timer.setTimeout(function():void{ log "Hello, world!"; }, 300); } }
変換コマンド
jsx --executable web --output timer.js Timer.jsx