{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/28685","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/28685/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/28685/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/28685/events","html_url":"https://github.com/Microsoft/TypeScript/issues/28685","id":384823746,"node_id":"MDU6SXNzdWUzODQ4MjM3NDY=","number":28685,"title":"Type casting bracket semicolon prefix after transpilation to JS","user":{"login":"pegak","id":12586960,"node_id":"MDQ6VXNlcjEyNTg2OTYw","avatar_url":"https://avatars3.githubusercontent.com/u/12586960?v=4","gravatar_id":"","url":"https://api.github.com/users/pegak","html_url":"https://github.com/pegak","followers_url":"https://api.github.com/users/pegak/followers","following_url":"https://api.github.com/users/pegak/following{/other_user}","gists_url":"https://api.github.com/users/pegak/gists{/gist_id}","starred_url":"https://api.github.com/users/pegak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pegak/subscriptions","organizations_url":"https://api.github.com/users/pegak/orgs","repos_url":"https://api.github.com/users/pegak/repos","events_url":"https://api.github.com/users/pegak/events{/privacy}","received_events_url":"https://api.github.com/users/pegak/received_events","type":"User","site_admin":false},"labels":[{"id":113971558,"node_id":"MDU6TGFiZWwxMTM5NzE1NTg=","url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Question","name":"Question","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-11-27T14:35:07Z","updated_at":"2018-11-28T11:48:23Z","closed_at":null,"author_association":"NONE","body":"<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨\r\n\r\nHalf of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common \"Bugs\" That Aren't Bugs section!\r\n\r\nPlease help us by doing the following steps before logging an issue:\r\n  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues\r\n  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ\r\n\r\nPlease fill in the *entire* template below.\r\n-->\r\n\r\n<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->\r\n**TypeScript Version:**  3.1.6\r\n\r\n<!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:**\r\nType-casting semicolon, type-casting ASI, type-casting transpilation\r\n**Code**\r\n\r\n```ts\r\nlet button = document.getElementById('button')\r\n\r\n(button as HTMLButtonElement).textContent = \"Say Hello\"\r\n```\r\n\r\n**Expected behavior:**\r\nParenthesis around button is there only for type-casting, so Typescript should remove them, not work with them like they are there because of Javascript.\r\n```js\r\nvar button = document.getElementById('button');\r\n\r\nbutton.textContent = \"Say Hello\";\r\n```\r\n**Actual behavior:**\r\n```js\r\nvar button = document.getElementById('button')(button).textContent = \"Say Hello\";\r\n```\r\n**Playground Link:**\r\nhttps://www.typescriptlang.org/play/#src=let%20button%20%3D%20document.getElementById('button')%0D%0A%0D%0A(button%20as%20HTMLButtonElement).textContent%20%3D%20%22Say%20Hello%22%0D%0A\r\n**Related Issues:** <!-- Did you find other bugs that looked similar? -->\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/442419663","html_url":"https://github.com/Microsoft/TypeScript/issues/28685#issuecomment-442419663","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/28685","id":442419663,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MjQxOTY2Mw==","user":{"login":"pegak","id":12586960,"node_id":"MDQ6VXNlcjEyNTg2OTYw","avatar_url":"https://avatars3.githubusercontent.com/u/12586960?v=4","gravatar_id":"","url":"https://api.github.com/users/pegak","html_url":"https://github.com/pegak","followers_url":"https://api.github.com/users/pegak/followers","following_url":"https://api.github.com/users/pegak/following{/other_user}","gists_url":"https://api.github.com/users/pegak/gists{/gist_id}","starred_url":"https://api.github.com/users/pegak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pegak/subscriptions","organizations_url":"https://api.github.com/users/pegak/orgs","repos_url":"https://api.github.com/users/pegak/repos","events_url":"https://api.github.com/users/pegak/events{/privacy}","received_events_url":"https://api.github.com/users/pegak/received_events","type":"User","site_admin":false},"created_at":"2018-11-28T11:48:23Z","updated_at":"2018-11-28T11:48:23Z","author_association":"NONE","body":"I know about this warning, but I thought that it could be possible to remove parenthesis when they are there only because of type casting."}}
{"actor":{"display_login":"pegak"}}