{"action":"opened","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/5526","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/5526/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/5526/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/5526/events","html_url":"https://github.com/Microsoft/TypeScript/issues/5526","id":115097347,"number":5526,"title":"optional parameters in the middle.","user":{"login":"co-dh","id":860977,"avatar_url":"https://avatars.githubusercontent.com/u/860977?v=3","gravatar_id":"","url":"https://api.github.com/users/co-dh","html_url":"https://github.com/co-dh","followers_url":"https://api.github.com/users/co-dh/followers","following_url":"https://api.github.com/users/co-dh/following{/other_user}","gists_url":"https://api.github.com/users/co-dh/gists{/gist_id}","starred_url":"https://api.github.com/users/co-dh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/co-dh/subscriptions","organizations_url":"https://api.github.com/users/co-dh/orgs","repos_url":"https://api.github.com/users/co-dh/repos","events_url":"https://api.github.com/users/co-dh/events{/privacy}","received_events_url":"https://api.github.com/users/co-dh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-04T16:54:12Z","updated_at":"2015-11-04T16:54:12Z","closed_at":null,"body":"I found this problem while type d3.js\r\n\r\nd3.csv has the following signature:\r\nd3.csv(url[[, accessor], callback])\r\n\r\nso if there are two parameters, the second one will be callback, if 3, then the 3rd one will be callback.\r\nIt can be typed use overload, however, this feature will make less copy & paste.\r\n\r\none suggestion is to use ??: for level two optional parameter, \r\nthe other suggestion is to use [[,accessor], callback] syntax.\r\n"}}