{"action":"opened","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/6184","repository_url":"https://api.github.com/repos/facebook/flow","labels_url":"https://api.github.com/repos/facebook/flow/issues/6184/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/6184/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/6184/events","html_url":"https://github.com/facebook/flow/issues/6184","id":316588248,"number":6184,"title":"String interpolation for non-string objects","user":{"login":"Paxa","id":26019,"avatar_url":"https://avatars3.githubusercontent.com/u/26019?v=4","gravatar_id":"","url":"https://api.github.com/users/Paxa","html_url":"https://github.com/Paxa","followers_url":"https://api.github.com/users/Paxa/followers","following_url":"https://api.github.com/users/Paxa/following{/other_user}","gists_url":"https://api.github.com/users/Paxa/gists{/gist_id}","starred_url":"https://api.github.com/users/Paxa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Paxa/subscriptions","organizations_url":"https://api.github.com/users/Paxa/orgs","repos_url":"https://api.github.com/users/Paxa/repos","events_url":"https://api.github.com/users/Paxa/events{/privacy}","received_events_url":"https://api.github.com/users/Paxa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-22T15:27:18Z","updated_at":"2018-04-22T15:27:18Z","closed_at":null,"author_association":"NONE","body":"[Template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) (back-tick strings) will call `toString()` for every interpolated non-string object, but flow doesn't think so\r\n\r\n[flow try example](https://flow.org/try/#0PQKgBAAgZgNg9gdzCYAoVADAIgQwC4CmYBAHjgLYAOMBAXGAwCQDeAdgUroQBQCUAvhkwBBAE6icAT2JkqNemBYBtAIwBdQZgDyAIwBWBAMZ4ZFanUXNmOeiv6bUhmDgDOLsMLDMweOAGU8UQBLVgBzPi8wUQI8AFdRVjAAIgA-FOE0pIBuMH5czABhWJdfcjA4fSMTUjN5S3YkYUEgA)\r\n\r\nPerfectly working code example:\r\n```js\r\n`Date: ${new Date()}` // => 'Date: Sun Apr 22 2018 ...'\r\n`Array: ${[1]}` // 'Array: 1'\r\n`Object: ${{a: 1}}` // 'Object: [object Object]'\r\n\r\nclass A { toString() { return \"~~A~~\"; } }\r\n`Custom object: ${new A}` // 'Custom object: ~~A~~'\r\n```\r\n\r\nIs it a bug?"}}
{"actor":{"display_login":"Paxa"}}