{"action":"created","issue":{"url":"https://api.github.com/repos/luciotato/LiteScript/issues/11","labels_url":"https://api.github.com/repos/luciotato/LiteScript/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/luciotato/LiteScript/issues/11/comments","events_url":"https://api.github.com/repos/luciotato/LiteScript/issues/11/events","html_url":"https://github.com/luciotato/LiteScript/issues/11","id":53983759,"number":11,"title":"global doesn't apply to import","user":{"login":"desm","id":805145,"avatar_url":"https://avatars.githubusercontent.com/u/805145?v=3","gravatar_id":"","url":"https://api.github.com/users/desm","html_url":"https://github.com/desm","followers_url":"https://api.github.com/users/desm/followers","following_url":"https://api.github.com/users/desm/following{/other_user}","gists_url":"https://api.github.com/users/desm/gists{/gist_id}","starred_url":"https://api.github.com/users/desm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/desm/subscriptions","organizations_url":"https://api.github.com/users/desm/orgs","repos_url":"https://api.github.com/users/desm/repos","events_url":"https://api.github.com/users/desm/events{/privacy}","received_events_url":"https://api.github.com/users/desm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-11T06:32:18Z","updated_at":"2015-01-11T08:07:11Z","closed_at":null,"body":"Hi, I get the following error when trying to run the sample LiteScript blog-example-dns.lite.md:\r\n\r\n    $ git clone git@github.com:luciotato/LiteScript.git\r\n    $ cd LiteScript/doc\r\n    $ lite -es6 blog-example-dns.lite.md\r\n    LiteScript-to-js v0.8.9 Build Date Thu Oct 23 2014 07:54:38 GMT-0300 (ART)\r\n    compiler options: {\"verboseLevel\":1,\"warningLevel\":1,\"comments\":1,\"target\":\"js\",\"outDir\":\"generated/js\",\"perf\":0,\"generateSourceMap\":true,\"defines\":[],\"includeDirs\":[],\"projectDir\":\".\",\"mainModuleName\":\"blog-example-dns.lite.md\",\"storeMessages\":false,\"now\":\"2015-01-11T06:15:13.193Z\",\"es6\":true}\r\n    cwd: /data/projects/LiteScript/doc\r\n    compile : blog-example-dns.lite.md\r\n    Project Dir: /data/projects/LiteScript/doc\r\n    Main Module: blog-example-dns\r\n    Out Dir: /data/projects/LiteScript/doc/generated/js\r\n    preprocessor #defined [ 'ENV_JS', 'ENV_NODE', 'TARGET_JS' ]\r\n    Compiling blog-example-dns\r\n     ERROR: /data/projects/LiteScript/doc/blog-example-dns.lite.md:7:5. 'global' can only apply to declare|class|namespace|function|var not to 'import' \r\n     /data/projects/LiteScript/doc/blog-example-dns.lite.md:7:5. 'global' can only apply to declare|class|namespace|function|var not to 'import' \r\n\r\nCommit hash: '5767d7'\r\nLiteScript version: LiteScript-to-js v0.8.9 Build Date Thu Oct 23 2014 07:54:38 GMT-0300 (ART)\r\n"},"comment":{"url":"https://api.github.com/repos/luciotato/LiteScript/issues/comments/69486866","html_url":"https://github.com/luciotato/LiteScript/issues/11#issuecomment-69486866","issue_url":"https://api.github.com/repos/luciotato/LiteScript/issues/11","id":69486866,"user":{"login":"desm","id":805145,"avatar_url":"https://avatars.githubusercontent.com/u/805145?v=3","gravatar_id":"","url":"https://api.github.com/users/desm","html_url":"https://github.com/desm","followers_url":"https://api.github.com/users/desm/followers","following_url":"https://api.github.com/users/desm/following{/other_user}","gists_url":"https://api.github.com/users/desm/gists{/gist_id}","starred_url":"https://api.github.com/users/desm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/desm/subscriptions","organizations_url":"https://api.github.com/users/desm/orgs","repos_url":"https://api.github.com/users/desm/repos","events_url":"https://api.github.com/users/desm/events{/privacy}","received_events_url":"https://api.github.com/users/desm/received_events","type":"User","site_admin":false},"created_at":"2015-01-11T08:07:11Z","updated_at":"2015-01-11T08:07:11Z","body":"In the end, I need to use the 'lite -s' flag, so that it doesn't lookup an interface for the dns module.\r\n\r\n    $ lite -es6 -s blog-example-dns.lite.md\r\n    LiteScript-to-js v0.8.9 Build Date Thu Oct 23 2014 07:54:38 GMT-0300 (ART)\r\n    compiler options: {\"verboseLevel\":1,\"warningLevel\":1,\"comments\":1,\"target\":\"js\",\"outDir\":\"generated/js\",\"perf\":0,\"generateSourceMap\":true,\"single\":true,\"defines\":[],\"includeDirs\":[],\"projectDir\":\".\",\"mainModuleName\":\"blog-example-dns.lite.md\",\"storeMessages\":false,\"now\":\"2015-01-11T08:02:53.500Z\",\"es6\":true}\r\n    cwd: /data/projects/LiteScript/doc\r\n    compile : blog-example-dns.lite.md\r\n    Project Dir: /data/projects/LiteScript/doc\r\n    Main Module: blog-example-dns\r\n    Out Dir: /data/projects/LiteScript/doc/generated/js\r\n    preprocessor #defined [ 'ENV_JS', 'ENV_NODE', 'TARGET_JS' ]\r\n    Compiling blog-example-dns\r\n     WARNING: /data/projects/LiteScript/doc/blog-example-dns.lite.md:15:47. No member named 'resolve' on 'dns:any' \r\n     WARNING: /data/projects/LiteScript/doc/blog-example-dns.lite.md:7:12 declaration is here \r\n     WARNING: /data/projects/LiteScript/doc/blog-example-dns.lite.md:17:56. No member named 'reverse' on 'dns:any' \r\n     WARNING: /data/projects/LiteScript/doc/blog-example-dns.lite.md:7:12 declaration is here \r\n    Producing js\r\n    Generated .js files (1) at /data/projects/LiteScript/doc/generated/js\r\n    0 errors, 4 warnings.\r\n\r\nI can then run the JS file successfully, though not with node 0.10.33.  I think you need 0.11 or greater.  I am using v0.13.0-pre and it works.  You need to use the `--harmony` flag.\r\n\r\n    $ /usr/local/bin/node -v\r\n    v0.13.0-pre\r\n    \r\n    $ /usr/local/bin/node --harmony generated/js/blog-example-dns.js \r\n    74.125.226.104 reverse: yyz08s13-in-f8.1e100.net\r\n    74.125.226.99 reverse: yyz08s13-in-f3.1e100.net\r\n    74.125.226.105 reverse: yyz08s13-in-f9.1e100.net\r\n    74.125.226.110 reverse: yyz08s13-in-f14.1e100.net\r\n    74.125.226.100 reverse: yyz08s13-in-f4.1e100.net\r\n    74.125.226.96 reverse: yyz08s13-in-f0.1e100.net\r\n    74.125.226.97 reverse: yyz08s13-in-f1.1e100.net\r\n    74.125.226.103 reverse: yyz08s13-in-f7.1e100.net\r\n    74.125.226.101 reverse: yyz08s13-in-f5.1e100.net\r\n    74.125.226.98 reverse: yyz08s13-in-f2.1e100.net\r\n    74.125.226.102 reverse: yyz08s13-in-f6.1e100.net\r\n\r\n"}}