{"action":"closed","issue":{"url":"https://api.github.com/repos/SitePen/dts-generator/issues/34","repository_url":"https://api.github.com/repos/SitePen/dts-generator","labels_url":"https://api.github.com/repos/SitePen/dts-generator/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/SitePen/dts-generator/issues/34/comments","events_url":"https://api.github.com/repos/SitePen/dts-generator/issues/34/events","html_url":"https://github.com/SitePen/dts-generator/issues/34","id":101215692,"number":34,"title":"Unable to use ES3 target option - propose using strings for setting the `target` option instead.","user":{"login":"sccolbert","id":137289,"avatar_url":"https://avatars.githubusercontent.com/u/137289?v=3","gravatar_id":"","url":"https://api.github.com/users/sccolbert","html_url":"https://github.com/sccolbert","followers_url":"https://api.github.com/users/sccolbert/followers","following_url":"https://api.github.com/users/sccolbert/following{/other_user}","gists_url":"https://api.github.com/users/sccolbert/gists{/gist_id}","starred_url":"https://api.github.com/users/sccolbert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sccolbert/subscriptions","organizations_url":"https://api.github.com/users/sccolbert/orgs","repos_url":"https://api.github.com/users/sccolbert/repos","events_url":"https://api.github.com/users/sccolbert/events{/privacy}","received_events_url":"https://api.github.com/users/sccolbert/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/SitePen/dts-generator/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"kitsonk","id":1282577,"avatar_url":"https://avatars.githubusercontent.com/u/1282577?v=3","gravatar_id":"","url":"https://api.github.com/users/kitsonk","html_url":"https://github.com/kitsonk","followers_url":"https://api.github.com/users/kitsonk/followers","following_url":"https://api.github.com/users/kitsonk/following{/other_user}","gists_url":"https://api.github.com/users/kitsonk/gists{/gist_id}","starred_url":"https://api.github.com/users/kitsonk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kitsonk/subscriptions","organizations_url":"https://api.github.com/users/kitsonk/orgs","repos_url":"https://api.github.com/users/kitsonk/repos","events_url":"https://api.github.com/users/kitsonk/events{/privacy}","received_events_url":"https://api.github.com/users/kitsonk/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/SitePen/dts-generator/milestones/2","html_url":"https://github.com/SitePen/dts-generator/milestones/1.7.0","labels_url":"https://api.github.com/repos/SitePen/dts-generator/milestones/2/labels","id":1388727,"number":2,"title":"1.7.0","description":null,"creator":{"login":"kitsonk","id":1282577,"avatar_url":"https://avatars.githubusercontent.com/u/1282577?v=3","gravatar_id":"","url":"https://api.github.com/users/kitsonk","html_url":"https://github.com/kitsonk","followers_url":"https://api.github.com/users/kitsonk/followers","following_url":"https://api.github.com/users/kitsonk/following{/other_user}","gists_url":"https://api.github.com/users/kitsonk/gists{/gist_id}","starred_url":"https://api.github.com/users/kitsonk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kitsonk/subscriptions","organizations_url":"https://api.github.com/users/kitsonk/orgs","repos_url":"https://api.github.com/users/kitsonk/repos","events_url":"https://api.github.com/users/kitsonk/events{/privacy}","received_events_url":"https://api.github.com/users/kitsonk/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":11,"state":"open","created_at":"2015-11-02T12:44:40Z","updated_at":"2016-03-01T15:02:11Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2015-08-15T22:45:34Z","updated_at":"2016-03-01T15:02:11Z","closed_at":"2016-03-01T15:02:11Z","body":"This line will fail if the `target` option is set to `ts.ScriptTarget.ES3`, because that value is `0` and will test `false`:\r\nhttps://github.com/SitePen/dts-generator/blob/master/index.ts#L104\r\n\r\nFuthermore, it's not completely safe for a user to `require` typescript and pass along that enum value, since it may come from a version of typescript which is different than the one imported by dts-generator. The safest/simplest way to fix both issues is to use a string for the `target` option."}}