{"action":"created","issue":{"url":"https://api.github.com/repos/vuejs/vue-cli/issues/1653","repository_url":"https://api.github.com/repos/vuejs/vue-cli","labels_url":"https://api.github.com/repos/vuejs/vue-cli/issues/1653/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vue-cli/issues/1653/comments","events_url":"https://api.github.com/repos/vuejs/vue-cli/issues/1653/events","html_url":"https://github.com/vuejs/vue-cli/issues/1653","id":334832824,"node_id":"MDU6SXNzdWUzMzQ4MzI4MjQ=","number":1653,"title":"Using namespaces in TypeScript produces issues in runtime","user":{"login":"lazarljubenovic","id":7661457,"node_id":"MDQ6VXNlcjc2NjE0NTc=","avatar_url":"https://avatars3.githubusercontent.com/u/7661457?v=4","gravatar_id":"","url":"https://api.github.com/users/lazarljubenovic","html_url":"https://github.com/lazarljubenovic","followers_url":"https://api.github.com/users/lazarljubenovic/followers","following_url":"https://api.github.com/users/lazarljubenovic/following{/other_user}","gists_url":"https://api.github.com/users/lazarljubenovic/gists{/gist_id}","starred_url":"https://api.github.com/users/lazarljubenovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lazarljubenovic/subscriptions","organizations_url":"https://api.github.com/users/lazarljubenovic/orgs","repos_url":"https://api.github.com/users/lazarljubenovic/repos","events_url":"https://api.github.com/users/lazarljubenovic/events{/privacy}","received_events_url":"https://api.github.com/users/lazarljubenovic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-06-22T10:44:54Z","updated_at":"2018-06-25T05:40:04Z","closed_at":null,"author_association":"NONE","body":"### Version\r\n3.0.0-rc.3\r\n\r\n### Reproduction link\r\n[https://github.com/lazarljubenovic/vue-typescript-namespace-issue](https://github.com/lazarljubenovic/vue-typescript-namespace-issue)\r\n\r\n### Steps to reproduce\r\n1. Run the project.\r\n2. Open developer tools in Chrome\r\n\r\n### What is expected?\r\nThe project runs.\r\n\r\n### What is actually happening?\r\nThe projects compiles successfully, but it throws at runtime. An error is shown in the console.\r\n\r\n```\r\nUncaught TypeError: Cannot read property 'Nested' of undefined\r\n    at eval (HelloWorld.vue?5a80:40)\r\n    at eval (HelloWorld.vue?5a80:41)\r\n    at Module../node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/ts-loader/index.js??ref--12-1!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/HelloWorld.vue?vue&type=script&lang=ts (app.js:826)\r\n    at __webpack_require__ (app.js:722)\r\n    at fn (app.js:99)\r\n    at eval (HelloWorld.vue?06f5:1)\r\n    at Module../src/components/HelloWorld.vue?vue&type=script&lang=ts (app.js:1437)\r\n    at __webpack_require__ (app.js:722)\r\n    at fn (app.js:99)\r\n    at eval (HelloWorld.vue?e24f:1)\r\n```\r\n\r\n<!-- generated by vue-issues. DO NOT REMOVE -->"},"comment":{"url":"https://api.github.com/repos/vuejs/vue-cli/issues/comments/399837584","html_url":"https://github.com/vuejs/vue-cli/issues/1653#issuecomment-399837584","issue_url":"https://api.github.com/repos/vuejs/vue-cli/issues/1653","id":399837584,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTgzNzU4NA==","user":{"login":"lazarljubenovic","id":7661457,"node_id":"MDQ6VXNlcjc2NjE0NTc=","avatar_url":"https://avatars3.githubusercontent.com/u/7661457?v=4","gravatar_id":"","url":"https://api.github.com/users/lazarljubenovic","html_url":"https://github.com/lazarljubenovic","followers_url":"https://api.github.com/users/lazarljubenovic/followers","following_url":"https://api.github.com/users/lazarljubenovic/following{/other_user}","gists_url":"https://api.github.com/users/lazarljubenovic/gists{/gist_id}","starred_url":"https://api.github.com/users/lazarljubenovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lazarljubenovic/subscriptions","organizations_url":"https://api.github.com/users/lazarljubenovic/orgs","repos_url":"https://api.github.com/users/lazarljubenovic/repos","events_url":"https://api.github.com/users/lazarljubenovic/events{/privacy}","received_events_url":"https://api.github.com/users/lazarljubenovic/received_events","type":"User","site_admin":false},"created_at":"2018-06-25T05:40:04Z","updated_at":"2018-06-25T05:40:04Z","author_association":"NONE","body":"JavaScript is case-sensitive, so it should work with `This` even though `this` is reserved. Indeed, Using `Thissss` still produces the wrong result:\r\n\r\n```js\r\n(o=(\"undefined\"!==typeof b[\"Thissss\"]&&b[\"Thissss\"]).Is)\r\n```\r\n\r\nIn my prod code, my namespaces are named `Api`, `Users`, etc. so it's not about the name, it always fails."}}
{"actor":{"display_login":"lazarljubenovic"}}