{"action":"closed","issue":{"url":"https://api.github.com/repos/screepers/Screeps-Typescript-Declarations/issues/28","repository_url":"https://api.github.com/repos/screepers/Screeps-Typescript-Declarations","labels_url":"https://api.github.com/repos/screepers/Screeps-Typescript-Declarations/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/screepers/Screeps-Typescript-Declarations/issues/28/comments","events_url":"https://api.github.com/repos/screepers/Screeps-Typescript-Declarations/issues/28/events","html_url":"https://github.com/screepers/Screeps-Typescript-Declarations/issues/28","id":164000576,"number":28,"title":"Many types are 1-tuples where they should be arrays","user":{"login":"valerian","id":239688,"avatar_url":"https://avatars.githubusercontent.com/u/239688?v=3","gravatar_id":"","url":"https://api.github.com/users/valerian","html_url":"https://github.com/valerian","followers_url":"https://api.github.com/users/valerian/followers","following_url":"https://api.github.com/users/valerian/following{/other_user}","gists_url":"https://api.github.com/users/valerian/gists{/gist_id}","starred_url":"https://api.github.com/users/valerian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valerian/subscriptions","organizations_url":"https://api.github.com/users/valerian/orgs","repos_url":"https://api.github.com/users/valerian/repos","events_url":"https://api.github.com/users/valerian/events{/privacy}","received_events_url":"https://api.github.com/users/valerian/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-06T05:25:19Z","updated_at":"2016-07-06T06:23:27Z","closed_at":"2016-07-06T06:23:27Z","body":"Throughout the declarations there are many occurrences of 1-tuples where it should have been an array.\r\n\r\n`[string]` is a 1-tuple containing 1 element of type string.\r\n\r\n`string[]` is an array of string elements.\r\n\r\nAnd what is even more confusing is that tuples are bugged in TypeScript, allowing to use more elements than defined: https://github.com/Microsoft/TypeScript/issues/6229\r\n\r\nAn example of this issue in the present declarations:\r\n\r\n`RoomPosition.findClosestByRange<T>(objects: [T|RoomPosition], opts?: {filter: any|string }): T;`\r\n\r\nWhich should actually be:\r\n\r\n`RoomPosition.findClosestByRange<T>(objects: T[]|RoomPosition[], opts?: {filter: any|string }): T;`\r\n\r\nI will try to fix all of them and do a pull request."}}
{"actor":{"display_login":"NhanHo"}}