{"action":"closed","issue":{"url":"https://api.github.com/repos/facebook/prepack/issues/614","repository_url":"https://api.github.com/repos/facebook/prepack","labels_url":"https://api.github.com/repos/facebook/prepack/issues/614/labels{/name}","comments_url":"https://api.github.com/repos/facebook/prepack/issues/614/comments","events_url":"https://api.github.com/repos/facebook/prepack/issues/614/events","html_url":"https://github.com/facebook/prepack/issues/614","id":227435565,"number":614,"title":"Why Does Prepack Need Mocks/Shims?","user":{"login":"ilyaigpetrov","id":1090811,"avatar_url":"https://avatars1.githubusercontent.com/u/1090811?v=3","gravatar_id":"","url":"https://api.github.com/users/ilyaigpetrov","html_url":"https://github.com/ilyaigpetrov","followers_url":"https://api.github.com/users/ilyaigpetrov/followers","following_url":"https://api.github.com/users/ilyaigpetrov/following{/other_user}","gists_url":"https://api.github.com/users/ilyaigpetrov/gists{/gist_id}","starred_url":"https://api.github.com/users/ilyaigpetrov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilyaigpetrov/subscriptions","organizations_url":"https://api.github.com/users/ilyaigpetrov/orgs","repos_url":"https://api.github.com/users/ilyaigpetrov/repos","events_url":"https://api.github.com/users/ilyaigpetrov/events{/privacy}","received_events_url":"https://api.github.com/users/ilyaigpetrov/received_events","type":"User","site_admin":false},"labels":[{"id":279345230,"url":"https://api.github.com/repos/facebook/prepack/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-05-09T17:10:22Z","updated_at":"2017-06-16T01:17:16Z","closed_at":"2017-06-16T01:17:16Z","body":"I want to mark that `global.window` is only accessible at runtime, so Prepack should \"transport\" it to runtime without substitution or \"speculation\" about its value (including props/children, etc.).\r\n\r\nInput:\r\n```js\r\n'use strict';\r\n__assumeDataProperty(global, 'window', __abstract());\r\nconsole.log(window.document);\r\n```\r\nOutput:\r\n```console\r\nThis operation is not yet supported on abstract values ::global.window and ::global \r\n__IntrospectionError\r\n```\r\nExpected:\r\n```js\r\n(function () {\r\n  var _0 = this;\r\n\r\n  var _1 = _0.window;\r\n\r\n  if (_0.window !== _1) {\r\n    throw new Error(\"Prepack model invariant violation: \" + _0.window);\r\n  }\r\n\r\n  console.log(_1.document); // Access props only at runtime for unknown abstract variables!\r\n}).call(this);\r\n```"}}
{"actor":{"display_login":"NTillmann"}}