{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/2626","repository_url":"https://api.github.com/repos/dart-lang/sdk","labels_url":"https://api.github.com/repos/dart-lang/sdk/issues/2626/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/sdk/issues/2626/comments","events_url":"https://api.github.com/repos/dart-lang/sdk/issues/2626/events","html_url":"https://github.com/dart-lang/sdk/issues/2626","id":84507318,"number":2626,"title":"typedef for simple type aliases","user":{"login":"rakudrama","id":2108821,"avatar_url":"https://avatars.githubusercontent.com/u/2108821?v=3","gravatar_id":"","url":"https://api.github.com/users/rakudrama","html_url":"https://github.com/rakudrama","followers_url":"https://api.github.com/users/rakudrama/followers","following_url":"https://api.github.com/users/rakudrama/following{/other_user}","gists_url":"https://api.github.com/users/rakudrama/gists{/gist_id}","starred_url":"https://api.github.com/users/rakudrama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rakudrama/subscriptions","organizations_url":"https://api.github.com/users/rakudrama/orgs","repos_url":"https://api.github.com/users/rakudrama/repos","events_url":"https://api.github.com/users/rakudrama/events{/privacy}","received_events_url":"https://api.github.com/users/rakudrama/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dart-lang/sdk/labels/accepted","name":"accepted","color":"ededed"},{"url":"https://api.github.com/repos/dart-lang/sdk/labels/area-language","name":"area-language","color":"c7def8"},{"url":"https://api.github.com/repos/dart-lang/sdk/labels/Priority-Medium","name":"Priority-Medium","color":"fbca04"},{"url":"https://api.github.com/repos/dart-lang/sdk/labels/type-enhancement","name":"type-enhancement","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"gbracha","id":4052598,"avatar_url":"https://avatars.githubusercontent.com/u/4052598?v=3","gravatar_id":"","url":"https://api.github.com/users/gbracha","html_url":"https://github.com/gbracha","followers_url":"https://api.github.com/users/gbracha/followers","following_url":"https://api.github.com/users/gbracha/following{/other_user}","gists_url":"https://api.github.com/users/gbracha/gists{/gist_id}","starred_url":"https://api.github.com/users/gbracha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gbracha/subscriptions","organizations_url":"https://api.github.com/users/gbracha/orgs","repos_url":"https://api.github.com/users/gbracha/repos","events_url":"https://api.github.com/users/gbracha/events{/privacy}","received_events_url":"https://api.github.com/users/gbracha/received_events","type":"User","site_admin":false},"milestone":null,"comments":11,"created_at":"2012-04-18T00:19:08Z","updated_at":"2016-02-16T15:20:14Z","closed_at":null,"body":"In the dom library there are several types which are sum (union) types.\n\nIDBKey and SerializedScriptValue are two examples - both include numbers, strings and JavaScript arrays (Lists) among other things, and neither includes functions or arbitrary user defined types.\n\nWe are forced to use Dynamic for these types.\nIf typedef could do a simple renaming we could generate more readable interfaces.\n\ne.g.\n\ninterface IDBFactory {\n&nbsp;&nbsp;&nbsp;int cmp(Dynamic first, Dynamic second);\n}\n\ncould become\n\n/\\*\\* Documentation about IDBKey in one place. \\*/\ntypedef IDBKey = Dynamic;\n\ninterface IDBFactory {\n&nbsp;&nbsp;&nbsp;int cmp(IDBKey first, IDBKey second);   // Tools can navigate to the definition.\n}\n"},"comment":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/comments/184726126","html_url":"https://github.com/dart-lang/sdk/issues/2626#issuecomment-184726126","issue_url":"https://api.github.com/repos/dart-lang/sdk/issues/2626","id":184726126,"user":{"login":"eernstg","id":9606994,"avatar_url":"https://avatars.githubusercontent.com/u/9606994?v=3","gravatar_id":"","url":"https://api.github.com/users/eernstg","html_url":"https://github.com/eernstg","followers_url":"https://api.github.com/users/eernstg/followers","following_url":"https://api.github.com/users/eernstg/following{/other_user}","gists_url":"https://api.github.com/users/eernstg/gists{/gist_id}","starred_url":"https://api.github.com/users/eernstg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eernstg/subscriptions","organizations_url":"https://api.github.com/users/eernstg/orgs","repos_url":"https://api.github.com/users/eernstg/repos","events_url":"https://api.github.com/users/eernstg/events{/privacy}","received_events_url":"https://api.github.com/users/eernstg/received_events","type":"User","site_admin":false},"created_at":"2016-02-16T15:20:14Z","updated_at":"2016-02-16T15:20:14Z","body":"Thanks for the input! I'm on the Dart team, and I think we'll have union types and maybe the generalized `typedef`s as well (and I also want them), but it's always a much more involved process to change the language than you'd think. Even though I can't promise you that they will be added anytime soon, your input helps keeping the priority of these features in place."}}