{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/4938","repository_url":"https://api.github.com/repos/dart-lang/sdk","labels_url":"https://api.github.com/repos/dart-lang/sdk/issues/4938/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/sdk/issues/4938/comments","events_url":"https://api.github.com/repos/dart-lang/sdk/issues/4938/events","html_url":"https://github.com/dart-lang/sdk/issues/4938","id":84515503,"number":4938,"title":"Union types","user":{"login":"blois","id":2152569,"avatar_url":"https://avatars1.githubusercontent.com/u/2152569?v=4","gravatar_id":"","url":"https://api.github.com/users/blois","html_url":"https://github.com/blois","followers_url":"https://api.github.com/users/blois/followers","following_url":"https://api.github.com/users/blois/following{/other_user}","gists_url":"https://api.github.com/users/blois/gists{/gist_id}","starred_url":"https://api.github.com/users/blois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blois/subscriptions","organizations_url":"https://api.github.com/users/blois/orgs","repos_url":"https://api.github.com/users/blois/repos","events_url":"https://api.github.com/users/blois/events{/privacy}","received_events_url":"https://api.github.com/users/blois/received_events","type":"User","site_admin":false},"labels":[{"id":334171875,"url":"https://api.github.com/repos/dart-lang/sdk/labels/P2%20medium","name":"P2 medium","color":"fbca04","default":false},{"id":334529063,"url":"https://api.github.com/repos/dart-lang/sdk/labels/Type:%20bug","name":"Type: bug","color":"ededed","default":false},{"id":269672814,"url":"https://api.github.com/repos/dart-lang/sdk/labels/analyzer-strong-mode","name":"analyzer-strong-mode","color":"d4c5f9","default":false},{"id":219928175,"url":"https://api.github.com/repos/dart-lang/sdk/labels/area-language","name":"area-language","color":"c7def8","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":21,"created_at":"2012-09-05T20:48:38Z","updated_at":"2018-05-08T15:08:39Z","closed_at":null,"author_association":"NONE","body":"Currently Dart does not support function overloads based on parameter type and this makes it verbose/awkward to clone/wrap Javascript APIs which accept multiple types.\n\nFor example, WebSocket.send() can accept a String, a Blob or an ArrayBuffer.\n\nIn Dart, this can either be exposed as:\nWebSocket.sendString, sendBlob, sendArrayBuffer which is verbose\nor:\nWebSocket.send(Dynamic data), which is no longer a self-documenting API.\n\nIt would be great to have some variant of union types, along the lines of JSDoc:\nWebSocket.send(String|Blob|ArrayBuffer data);\n"},"comment":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/comments/387435606","html_url":"https://github.com/dart-lang/sdk/issues/4938#issuecomment-387435606","issue_url":"https://api.github.com/repos/dart-lang/sdk/issues/4938","id":387435606,"user":{"login":"eernstg","id":9606994,"avatar_url":"https://avatars1.githubusercontent.com/u/9606994?v=4","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":"2018-05-08T15:08:39Z","updated_at":"2018-05-08T15:08:39Z","author_association":"MEMBER","body":"That should certainly be a separate issue (and I don't think we have an existing issue which covers that request)."}}
{"actor":{"display_login":"eernstg"}}