{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/212","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/212/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/212/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/212/events","html_url":"https://github.com/Microsoft/TypeScript/issues/212","id":38510974,"number":212,"title":"bind(), call(), and apply() are untyped","user":{"login":"jameslong","id":846867,"avatar_url":"https://avatars.githubusercontent.com/u/846867?v=3","gravatar_id":"","url":"https://api.github.com/users/jameslong","html_url":"https://github.com/jameslong","followers_url":"https://api.github.com/users/jameslong/followers","following_url":"https://api.github.com/users/jameslong/following{/other_user}","gists_url":"https://api.github.com/users/jameslong/gists{/gist_id}","starred_url":"https://api.github.com/users/jameslong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jameslong/subscriptions","organizations_url":"https://api.github.com/users/jameslong/orgs","repos_url":"https://api.github.com/users/jameslong/repos","events_url":"https://api.github.com/users/jameslong/events{/privacy}","received_events_url":"https://api.github.com/users/jameslong/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Committed","name":"Committed","color":"009800"},{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Fixed","name":"Fixed","color":"bfe5bf"},{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Suggestion","name":"Suggestion","color":"006b75"}],"state":"closed","locked":false,"assignee":{"login":"sandersn","id":293473,"avatar_url":"https://avatars.githubusercontent.com/u/293473?v=3","gravatar_id":"","url":"https://api.github.com/users/sandersn","html_url":"https://github.com/sandersn","followers_url":"https://api.github.com/users/sandersn/followers","following_url":"https://api.github.com/users/sandersn/following{/other_user}","gists_url":"https://api.github.com/users/sandersn/gists{/gist_id}","starred_url":"https://api.github.com/users/sandersn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandersn/subscriptions","organizations_url":"https://api.github.com/users/sandersn/orgs","repos_url":"https://api.github.com/users/sandersn/repos","events_url":"https://api.github.com/users/sandersn/events{/privacy}","received_events_url":"https://api.github.com/users/sandersn/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Microsoft/TypeScript/milestones/1","html_url":"https://github.com/Microsoft/TypeScript/milestones/TypeScript%202.0","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/milestones/1/labels","id":721040,"number":1,"title":"TypeScript 2.0","description":"The next major release of TypeScript","creator":{"login":"RyanCavanaugh","id":6685088,"avatar_url":"https://avatars.githubusercontent.com/u/6685088?v=3","gravatar_id":"","url":"https://api.github.com/users/RyanCavanaugh","html_url":"https://github.com/RyanCavanaugh","followers_url":"https://api.github.com/users/RyanCavanaugh/followers","following_url":"https://api.github.com/users/RyanCavanaugh/following{/other_user}","gists_url":"https://api.github.com/users/RyanCavanaugh/gists{/gist_id}","starred_url":"https://api.github.com/users/RyanCavanaugh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyanCavanaugh/subscriptions","organizations_url":"https://api.github.com/users/RyanCavanaugh/orgs","repos_url":"https://api.github.com/users/RyanCavanaugh/repos","events_url":"https://api.github.com/users/RyanCavanaugh/events{/privacy}","received_events_url":"https://api.github.com/users/RyanCavanaugh/received_events","type":"User","site_admin":false},"open_issues":131,"closed_issues":197,"state":"open","created_at":"2014-07-14T23:24:03Z","updated_at":"2016-04-25T17:41:47Z","due_on":null,"closed_at":null},"comments":28,"created_at":"2014-07-23T09:13:20Z","updated_at":"2016-04-25T17:51:33Z","closed_at":"2016-04-07T23:37:26Z","body":"bind() returns type 'any' and does not type check it's arguments. e.g.\r\n\r\n    var add = function (a: number, b: number) { return a + b; };\r\n    var addString = add.bind(null, 'hello');\r\n\r\ncompiles without error and 'addString' has type any. \r\n\r\nbind is a default way to achieve partial application so it would be great to have it typechecked properly.\r\n\r\nSimilarly for apply, the code\r\n\r\n    var listA = [1, 2, 3];\r\n    var listB = ['a', 'b', 'c'];\r\n    listA.push.apply(listA, listB);\r\n\r\ncompiles without error and listA is still incorrectly marked as type 'number[]'.\r\n\r\ncall() example:\r\n\r\n    var add5 = function (a: number) { return 5 + a; };\r\n    add5.call(null, 'a string');\r\n\r\nAgain without a compiler error."},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/214459595","html_url":"https://github.com/Microsoft/TypeScript/issues/212#issuecomment-214459595","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/212","id":214459595,"user":{"login":"sebilasse","id":750300,"avatar_url":"https://avatars.githubusercontent.com/u/750300?v=3","gravatar_id":"","url":"https://api.github.com/users/sebilasse","html_url":"https://github.com/sebilasse","followers_url":"https://api.github.com/users/sebilasse/followers","following_url":"https://api.github.com/users/sebilasse/following{/other_user}","gists_url":"https://api.github.com/users/sebilasse/gists{/gist_id}","starred_url":"https://api.github.com/users/sebilasse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebilasse/subscriptions","organizations_url":"https://api.github.com/users/sebilasse/orgs","repos_url":"https://api.github.com/users/sebilasse/repos","events_url":"https://api.github.com/users/sebilasse/events{/privacy}","received_events_url":"https://api.github.com/users/sebilasse/received_events","type":"User","site_admin":false},"created_at":"2016-04-25T17:51:33Z","updated_at":"2016-04-25T17:51:33Z","body":"@mhegazy and @basarat thanks for `bind`, `call` and `apply`.\r\nHow about [`name: string`] (https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Function/name) (ES6)?"}}