{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3262","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3262/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3262/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3262/events","html_url":"https://github.com/Microsoft/TypeScript/pull/3262","id":80547138,"number":3262,"title":"Custom type guard function","user":{"login":"tinganho","id":1324476,"avatar_url":"https://avatars.githubusercontent.com/u/1324476?v=3","gravatar_id":"","url":"https://api.github.com/users/tinganho","html_url":"https://github.com/tinganho","followers_url":"https://api.github.com/users/tinganho/followers","following_url":"https://api.github.com/users/tinganho/following{/other_user}","gists_url":"https://api.github.com/users/tinganho/gists{/gist_id}","starred_url":"https://api.github.com/users/tinganho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tinganho/subscriptions","organizations_url":"https://api.github.com/users/tinganho/orgs","repos_url":"https://api.github.com/users/tinganho/repos","events_url":"https://api.github.com/users/tinganho/events{/privacy}","received_events_url":"https://api.github.com/users/tinganho/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/cla-already-signed","name":"cla-already-signed","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":42,"created_at":"2015-05-25T14:03:58Z","updated_at":"2015-06-04T17:55:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/3262","html_url":"https://github.com/Microsoft/TypeScript/pull/3262","diff_url":"https://github.com/Microsoft/TypeScript/pull/3262.diff","patch_url":"https://github.com/Microsoft/TypeScript/pull/3262.patch"},"body":"Implements only the function part of #1007. I thought it was best to have some early feedback first before I implement the class method part. So that I know I'm on the same page.\r\n\r\nI consider the type guard type as a new type. Pls. check my tests for all specifications right now. I'm not sure if it's according to your specs. So would be good to have feedback on that.\r\n\r\nAnother question I have is if I should ban declaring type guard types on non-function-like declarations? I haven't implemented this ban yet. Example:\r\n```typescript\r\nvar a: t is item //Error\r\n```"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/108991303","html_url":"https://github.com/Microsoft/TypeScript/pull/3262#issuecomment-108991303","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3262","id":108991303,"user":{"login":"JsonFreeman","id":8052525,"avatar_url":"https://avatars.githubusercontent.com/u/8052525?v=3","gravatar_id":"","url":"https://api.github.com/users/JsonFreeman","html_url":"https://github.com/JsonFreeman","followers_url":"https://api.github.com/users/JsonFreeman/followers","following_url":"https://api.github.com/users/JsonFreeman/following{/other_user}","gists_url":"https://api.github.com/users/JsonFreeman/gists{/gist_id}","starred_url":"https://api.github.com/users/JsonFreeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JsonFreeman/subscriptions","organizations_url":"https://api.github.com/users/JsonFreeman/orgs","repos_url":"https://api.github.com/users/JsonFreeman/repos","events_url":"https://api.github.com/users/JsonFreeman/events{/privacy}","received_events_url":"https://api.github.com/users/JsonFreeman/received_events","type":"User","site_admin":false},"created_at":"2015-06-04T17:55:37Z","updated_at":"2015-06-04T17:55:37Z","body":"Thanks for all the iterating @tinganho. The signature overload problem is one that should be solved separately, not as part of this pull requests. We've known about it for a while, and need a more general solution anyway that is independent of type predicates."}}