Title: [compiler] Flow type annotations triggering stdlib imports. · Issue #36 · lightscript/lightscript · GitHub
Open Graph Title: [compiler] Flow type annotations triggering stdlib imports. · Issue #36 · lightscript/lightscript
X Title: [compiler] Flow type annotations triggering stdlib imports. · Issue #36 · lightscript/lightscript
Description: On lightscript@0.5.9: import type Foo from 'foo'; import type Foo2 from 'foo'; import type Foo3 from 'foo'; var a: {add(x:Foo, ...y:Array
Open Graph Description: On lightscript@0.5.9: import type Foo from 'foo'; import type Foo2 from 'foo'; import type Foo3 from 'foo'; var a: {add(x:Foo, ...y:Array
X Description: On lightscript@0.5.9: import type Foo from 'foo'; import type Foo2 from 'foo'; import type Foo3 from 'foo'; var a: {add(x:Foo, ...y:Array<Foo2>): Foo3}; a; import add ...
Opengraph URL: https://github.com/lightscript/lightscript/issues/36
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[compiler] Flow type annotations triggering stdlib imports.","articleBody":"On `lightscript@0.5.9`:\r\n```js\r\n import type Foo from 'foo';\r\n import type Foo2 from 'foo';\r\n import type Foo3 from 'foo';\r\n var a: {add(x:Foo, ...y:Array\u003cFoo2\u003e): Foo3}; a;\r\n```\r\n```js\r\nimport add from 'lodash/add';\r\nimport type Foo from 'foo';\r\nimport type Foo2 from 'foo';\r\nimport type Foo3 from 'foo';\r\nvar a: { add: (x: Foo, ...y: Array\u003cFoo2\u003e) =\u003e Foo3 };a;\r\n```\r\n\r\nThe `add` identifier inside of the Flow type annotation on line 4 is apparently being treated as a `ReferencedIdentifier` and therefore triggering the lodash import. This definitely shouldn't be the case.\r\n\r\nI don't have a suggested resolution at the moment as I haven't been able to figure it out myself. This may actually be a Babel bug.","author":{"url":"https://github.com/wcjohnson","@type":"Person","name":"wcjohnson"},"datePublished":"2017-06-18T01:31:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/36/lightscript/issues/36"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:abff8ffd-79b6-9eae-1d90-9378a71d97a8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 973E:3ED847:12D04AC:1B9BB14:6A4E4246 |
| html-safe-nonce | 3d9ef46f117cabb109c54bf6a950ae4902d22611920a42d0706216288e3c471e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NzNFOjNFRDg0NzoxMkQwNEFDOjFCOUJCMTQ6NkE0RTQyNDYiLCJ2aXNpdG9yX2lkIjoiNzc2NjU4OTY1OTQ5MzA1NzA5NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 066a506c8261d89a1d75069f8cd2ec9d980a8ffbf414659c4ae0caa838875cd7 |
| hovercard-subject-tag | issue:236694036 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/lightscript/lightscript/36/issue_layout |
| twitter:image | https://opengraph.githubassets.com/240efa3e29872e3e6f9c6dd2d619af14c71d4529f7fccad7b8dd04bbe2165349/lightscript/lightscript/issues/36 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/240efa3e29872e3e6f9c6dd2d619af14c71d4529f7fccad7b8dd04bbe2165349/lightscript/lightscript/issues/36 |
| og:image:alt | On lightscript@0.5.9: import type Foo from 'foo'; import type Foo2 from 'foo'; import type Foo3 from 'foo'; var a: {add(x:Foo, ...y:Array |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | wcjohnson |
| hostname | github.com |
| expected-hostname | github.com |
| None | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/lightscript/lightscript git https://github.com/lightscript/lightscript.git |
| octolytics-dimension-user_id | 20427295 |
| octolytics-dimension-user_login | lightscript |
| octolytics-dimension-repository_id | 63191213 |
| octolytics-dimension-repository_nwo | lightscript/lightscript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 63191213 |
| octolytics-dimension-repository_network_root_nwo | lightscript/lightscript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9fabff9b8b127e686a3ec86f91422e818056ca2c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width