{"action":"opened","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6311","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6311/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6311/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6311/events","html_url":"https://github.com/Microsoft/TypeScript/issues/6311","id":124528549,"number":6311,"title":"Type predicate calling another predicate with different argument position","user":{"login":"andy-hanson","id":5387404,"avatar_url":"https://avatars.githubusercontent.com/u/5387404?v=3","gravatar_id":"","url":"https://api.github.com/users/andy-hanson","html_url":"https://github.com/andy-hanson","followers_url":"https://api.github.com/users/andy-hanson/followers","following_url":"https://api.github.com/users/andy-hanson/following{/other_user}","gists_url":"https://api.github.com/users/andy-hanson/gists{/gist_id}","starred_url":"https://api.github.com/users/andy-hanson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andy-hanson/subscriptions","organizations_url":"https://api.github.com/users/andy-hanson/orgs","repos_url":"https://api.github.com/users/andy-hanson/repos","events_url":"https://api.github.com/users/andy-hanson/events{/privacy}","received_events_url":"https://api.github.com/users/andy-hanson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-01T03:04:30Z","updated_at":"2016-01-01T03:04:30Z","closed_at":null,"body":"This code will not compile:\r\n\r\n\tfunction isString1(a: number, b: Object): b is string {\r\n\t\treturn typeof b === 'string'\r\n\t}\r\n\r\n\tfunction isString2(a: Object): a is string {\r\n\t\treturn isString1(0, a)\r\n\t}\r\n\r\nOutput:\r\n\r\n\tfoo.ts(6,9): error TS1226: Type predicate 'b is string' is not assignable to 'a is string'.\r\n\t  Parameter 'b' is not in the same position as parameter 'a'.\r\n\r\nThe code will work if I swap the parameters of `isString1` so that the predicated parameter for both functions is the first argument.\r\nIs there a good reason that this is required?\r\n"}}