{"action":"created","issue":{"url":"https://api.github.com/repos/angular/ts2dart/issues/9","labels_url":"https://api.github.com/repos/angular/ts2dart/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/angular/ts2dart/issues/9/comments","events_url":"https://api.github.com/repos/angular/ts2dart/issues/9/events","html_url":"https://github.com/angular/ts2dart/issues/9","id":62585960,"number":9,"title":"Support function types (TypeScript), a.k.a. typedefs (Dart)","user":{"login":"yjbanov","id":211513,"avatar_url":"https://avatars.githubusercontent.com/u/211513?v=3","gravatar_id":"","url":"https://api.github.com/users/yjbanov","html_url":"https://github.com/yjbanov","followers_url":"https://api.github.com/users/yjbanov/followers","following_url":"https://api.github.com/users/yjbanov/following{/other_user}","gists_url":"https://api.github.com/users/yjbanov/gists{/gist_id}","starred_url":"https://api.github.com/users/yjbanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yjbanov/subscriptions","organizations_url":"https://api.github.com/users/yjbanov/orgs","repos_url":"https://api.github.com/users/yjbanov/repos","events_url":"https://api.github.com/users/yjbanov/events{/privacy}","received_events_url":"https://api.github.com/users/yjbanov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-18T04:24:23Z","updated_at":"2015-04-02T23:49:30Z","closed_at":null,"body":"This:\r\n\r\n```\r\ninterface SearchFunc {\r\n  (source: string, subString: string): boolean;\r\n}\r\n```\r\n\r\nShould transpile to this:\r\n\r\n```\r\ntypedef bool SearchFunc(String source, String subString);\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/angular/ts2dart/issues/comments/89082774","html_url":"https://github.com/angular/ts2dart/issues/9#issuecomment-89082774","issue_url":"https://api.github.com/repos/angular/ts2dart/issues/9","id":89082774,"user":{"login":"chalin","id":4140793,"avatar_url":"https://avatars.githubusercontent.com/u/4140793?v=3","gravatar_id":"","url":"https://api.github.com/users/chalin","html_url":"https://github.com/chalin","followers_url":"https://api.github.com/users/chalin/followers","following_url":"https://api.github.com/users/chalin/following{/other_user}","gists_url":"https://api.github.com/users/chalin/gists{/gist_id}","starred_url":"https://api.github.com/users/chalin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chalin/subscriptions","organizations_url":"https://api.github.com/users/chalin/orgs","repos_url":"https://api.github.com/users/chalin/repos","events_url":"https://api.github.com/users/chalin/events{/privacy}","received_events_url":"https://api.github.com/users/chalin/received_events","type":"User","site_admin":false},"created_at":"2015-04-02T23:49:30Z","updated_at":"2015-04-02T23:49:30Z","body":"Why not use a function **type alias** (see Section 3.9 of the [TS Spec](http://www.typescriptlang.org/Content/TypeScript%20Language%20Specification.pdf)): e.g.\r\n```ts\r\ntype SearchFunc = (source: string, subString: string) => boolean;\r\n```\r\nThis matches Dart more closely.\r\n\r\nI know that a type alias is different in that an interface *names* a distinct type (though typing is (mostly) structural in TS so I'm not sure that actually is a *significant* difference). Was the use of interfaces like this an idiom in TS used prior to 1.4?"}}