{"action":"closed","issue":{"url":"https://api.github.com/repos/bloomberg/bucklescript/issues/193","repository_url":"https://api.github.com/repos/bloomberg/bucklescript","labels_url":"https://api.github.com/repos/bloomberg/bucklescript/issues/193/labels{/name}","comments_url":"https://api.github.com/repos/bloomberg/bucklescript/issues/193/comments","events_url":"https://api.github.com/repos/bloomberg/bucklescript/issues/193/events","html_url":"https://github.com/bloomberg/bucklescript/issues/193","id":142309359,"number":193,"title":"allow `ty` attribute in `js.raw`","user":{"login":"bobzhang","id":747051,"avatar_url":"https://avatars.githubusercontent.com/u/747051?v=3","gravatar_id":"","url":"https://api.github.com/users/bobzhang","html_url":"https://github.com/bobzhang","followers_url":"https://api.github.com/users/bobzhang/followers","following_url":"https://api.github.com/users/bobzhang/following{/other_user}","gists_url":"https://api.github.com/users/bobzhang/gists{/gist_id}","starred_url":"https://api.github.com/users/bobzhang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobzhang/subscriptions","organizations_url":"https://api.github.com/users/bobzhang/orgs","repos_url":"https://api.github.com/users/bobzhang/repos","events_url":"https://api.github.com/users/bobzhang/events{/privacy}","received_events_url":"https://api.github.com/users/bobzhang/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/bloomberg/bucklescript/milestones/1","html_url":"https://github.com/bloomberg/bucklescript/milestones/alpha-release","labels_url":"https://api.github.com/repos/bloomberg/bucklescript/milestones/1/labels","id":1565886,"number":1,"title":"alpha-release","description":"","creator":{"login":"bobzhang","id":747051,"avatar_url":"https://avatars.githubusercontent.com/u/747051?v=3","gravatar_id":"","url":"https://api.github.com/users/bobzhang","html_url":"https://github.com/bobzhang","followers_url":"https://api.github.com/users/bobzhang/followers","following_url":"https://api.github.com/users/bobzhang/following{/other_user}","gists_url":"https://api.github.com/users/bobzhang/gists{/gist_id}","starred_url":"https://api.github.com/users/bobzhang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobzhang/subscriptions","organizations_url":"https://api.github.com/users/bobzhang/orgs","repos_url":"https://api.github.com/users/bobzhang/repos","events_url":"https://api.github.com/users/bobzhang/events{/privacy}","received_events_url":"https://api.github.com/users/bobzhang/received_events","type":"User","site_admin":false},"open_issues":15,"closed_issues":4,"state":"open","created_at":"2016-02-05T16:46:56Z","updated_at":"2016-03-23T02:05:24Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-03-21T10:31:43Z","updated_at":"2016-03-23T02:05:24Z","closed_at":"2016-03-23T02:05:24Z","body":"for example\r\n\r\n```ocaml\r\nlet f u = [%js.raw{| Object.keys|}[@ty : _ -> string]] u\r\n```\r\nwill get translated into\r\n\r\n\r\n```js\r\nfunction f (u){\r\n  return Object.keys(u)\r\n}\r\n```\r\nThis allows one time use of js functions without writing `external`, it will also be as efficient as hand written js, since we can deduce arities from type declarations like external.\r\n\r\nWith this, `js.raw` is also self documented\r\n"}}