{"action":"opened","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3149","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3149/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3149/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3149/events","html_url":"https://github.com/Microsoft/TypeScript/issues/3149","id":75942174,"number":3149,"title":"Problem with interpreting of union into context","user":{"login":"luboid","id":383517,"avatar_url":"https://avatars.githubusercontent.com/u/383517?v=3","gravatar_id":"","url":"https://api.github.com/users/luboid","html_url":"https://github.com/luboid","followers_url":"https://api.github.com/users/luboid/followers","following_url":"https://api.github.com/users/luboid/following{/other_user}","gists_url":"https://api.github.com/users/luboid/gists{/gist_id}","starred_url":"https://api.github.com/users/luboid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luboid/subscriptions","organizations_url":"https://api.github.com/users/luboid/orgs","repos_url":"https://api.github.com/users/luboid/repos","events_url":"https://api.github.com/users/luboid/events{/privacy}","received_events_url":"https://api.github.com/users/luboid/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-13T10:48:44Z","updated_at":"2015-05-13T10:48:44Z","closed_at":null,"body":"\r\nI am working with 1.5.0-beta\r\n\r\n```javascript\r\nexport interface IPrcbNumOptions {\r\n    options?: any;\r\n    events?: any;\r\n}\r\n\r\n@customAttribute('prcb-num')\r\n@inject(Element)\r\nexport default class PrcbNum {\r\n  @bindable options: IPrcbNumOptions|string;\r\n  @bindable value: number|string;\r\n\r\n  constructor(element:Element) {\r\n  }\r\n\r\n  bind(executionContext, aaa:IPrcbNumOptions|string) {\r\n    if (typeof aaa === 'string') {\r\n      // this is ok\r\n      this.options = JSON.parse(aaa);\r\n    }\r\n    if (typeof this.options === 'string') {\r\n     //error TS2345: Argument of type 'string |IPrcbNumOptions' is not assignable to parameter of type 'string'.  \r\n      //Type 'IPrcbNumOptions' is not assignable to type 'string'.\r\n      this.options = JSON.parse(this.options);\r\n    }\r\n  }\r\n}\r\n```"}}