{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/2076","repository_url":"https://api.github.com/repos/facebook/flow","labels_url":"https://api.github.com/repos/facebook/flow/issues/2076/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/2076/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/2076/events","html_url":"https://github.com/facebook/flow/issues/2076","id":165235003,"number":2076,"title":"Regression: Template literals can no longer include non-strings.","user":{"login":"LegNeato","id":368904,"avatar_url":"https://avatars.githubusercontent.com/u/368904?v=3","gravatar_id":"","url":"https://api.github.com/users/LegNeato","html_url":"https://github.com/LegNeato","followers_url":"https://api.github.com/users/LegNeato/followers","following_url":"https://api.github.com/users/LegNeato/following{/other_user}","gists_url":"https://api.github.com/users/LegNeato/gists{/gist_id}","starred_url":"https://api.github.com/users/LegNeato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LegNeato/subscriptions","organizations_url":"https://api.github.com/users/LegNeato/orgs","repos_url":"https://api.github.com/users/LegNeato/repos","events_url":"https://api.github.com/users/LegNeato/events{/privacy}","received_events_url":"https://api.github.com/users/LegNeato/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-07-13T04:30:45Z","updated_at":"2016-08-10T19:11:49Z","closed_at":"2016-07-14T02:41:34Z","body":"This code:\r\n\r\n```js\r\nthrow new Error(`NODE_ENV set to invalid value: ${process.env.NODE_ENV}.`);\r\n```\r\n\r\nGives the error:\r\n```js\r\n 21:   throw new Error(`NODE_ENV set to invalid value: ${process.env.NODE_ENV}.`);\r\n                                                         ^^^^^^^^^^^^^^^^^^^^ undefined. This type cannot be added to\r\n 21:   throw new Error(`NODE_ENV set to invalid value: ${process.env.NODE_ENV}.`);\r\n                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string\r\n```\r\n\r\nWhich isn't correct...that should be fine I think? Previous `flow` versions did not complain, but I started seeing these after I upgraded to:\r\n\r\n```\r\nFlow, a static type checker for JavaScript, version 0.28.0\r\n```"},"comment":{"url":"https://api.github.com/repos/facebook/flow/issues/comments/238972294","html_url":"https://github.com/facebook/flow/issues/2076#issuecomment-238972294","issue_url":"https://api.github.com/repos/facebook/flow/issues/2076","id":238972294,"user":{"login":"samwgoldman","id":254842,"avatar_url":"https://avatars.githubusercontent.com/u/254842?v=3","gravatar_id":"","url":"https://api.github.com/users/samwgoldman","html_url":"https://github.com/samwgoldman","followers_url":"https://api.github.com/users/samwgoldman/followers","following_url":"https://api.github.com/users/samwgoldman/following{/other_user}","gists_url":"https://api.github.com/users/samwgoldman/gists{/gist_id}","starred_url":"https://api.github.com/users/samwgoldman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samwgoldman/subscriptions","organizations_url":"https://api.github.com/users/samwgoldman/orgs","repos_url":"https://api.github.com/users/samwgoldman/repos","events_url":"https://api.github.com/users/samwgoldman/events{/privacy}","received_events_url":"https://api.github.com/users/samwgoldman/received_events","type":"User","site_admin":false},"created_at":"2016-08-10T19:11:49Z","updated_at":"2016-08-10T19:11:49Z","body":"Yeah, @thejameskyle is absolutely right. I just want to add that this change made string concatenation with `+` and string concatenation with template literals consistent. We are still open to changing the rules for both. For example, we don't require explicit casts for numbers, because patterns like `0 + \"%\"` are so incredibly common. We're not so stuck in our ways :)"}}
{"actor":{"display_login":"samwgoldman"}}