{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/12919","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/12919/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/12919/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/12919/events","html_url":"https://github.com/Microsoft/TypeScript/issues/12919","id":195619912,"number":12919,"title":"allow an object narrowed to a certain interface be used where such interface is expected","user":{"login":"aleksey-bykov","id":937933,"avatar_url":"https://avatars.githubusercontent.com/u/937933?v=3","gravatar_id":"","url":"https://api.github.com/users/aleksey-bykov","html_url":"https://github.com/aleksey-bykov","followers_url":"https://api.github.com/users/aleksey-bykov/followers","following_url":"https://api.github.com/users/aleksey-bykov/following{/other_user}","gists_url":"https://api.github.com/users/aleksey-bykov/gists{/gist_id}","starred_url":"https://api.github.com/users/aleksey-bykov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleksey-bykov/subscriptions","organizations_url":"https://api.github.com/users/aleksey-bykov/orgs","repos_url":"https://api.github.com/users/aleksey-bykov/repos","events_url":"https://api.github.com/users/aleksey-bykov/events{/privacy}","received_events_url":"https://api.github.com/users/aleksey-bykov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-14T19:15:52Z","updated_at":"2016-12-14T19:18:42Z","closed_at":null,"body":"```typescript\r\ninterface A { value: number | string };\r\ninterface B { value: number; }\r\nfunction takeOnlyB(value: B): void {}\r\nconst data: A = { value: 'hey' };\r\ndata.value = 1; // <-- from this point on we know for sure that value is number\r\ntakeOnlyB(data);  // <-- problem, despite effectively being of type `B` data still can't be used\r\n\r\n// expected:  takeOnlyB should accept data because it's been asserted to comply with `B`\r\n```\r\n\r\n```\r\nArgument of type 'A' is not assignable to parameter of type 'B'.\r\n  Types of property 'value' are incompatible.\r\n    Type 'string | number' is not assignable to type 'number'.\r\n      Type 'string' is not assignable to type 'number'.\r\n```"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/267128627","html_url":"https://github.com/Microsoft/TypeScript/issues/12919#issuecomment-267128627","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/12919","id":267128627,"user":{"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},"created_at":"2016-12-14T19:18:42Z","updated_at":"2016-12-14T19:18:42Z","body":"Duplicate #10065"}}
{"actor":{"display_login":"RyanCavanaugh"}}