{"action":"closed","issue":{"url":"https://api.github.com/repos/fable-compiler/Fable/issues/1314","repository_url":"https://api.github.com/repos/fable-compiler/Fable","labels_url":"https://api.github.com/repos/fable-compiler/Fable/issues/1314/labels{/name}","comments_url":"https://api.github.com/repos/fable-compiler/Fable/issues/1314/comments","events_url":"https://api.github.com/repos/fable-compiler/Fable/issues/1314/events","html_url":"https://github.com/fable-compiler/Fable/issues/1314","id":286528153,"node_id":"MDU6SXNzdWUyODY1MjgxNTM=","number":1314,"title":"Importing value as mutable makes the value a function when accessing it","user":{"login":"Zaid-Ajaj","id":13316248,"node_id":"MDQ6VXNlcjEzMzE2MjQ4","avatar_url":"https://avatars3.githubusercontent.com/u/13316248?v=4","gravatar_id":"","url":"https://api.github.com/users/Zaid-Ajaj","html_url":"https://github.com/Zaid-Ajaj","followers_url":"https://api.github.com/users/Zaid-Ajaj/followers","following_url":"https://api.github.com/users/Zaid-Ajaj/following{/other_user}","gists_url":"https://api.github.com/users/Zaid-Ajaj/gists{/gist_id}","starred_url":"https://api.github.com/users/Zaid-Ajaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zaid-Ajaj/subscriptions","organizations_url":"https://api.github.com/users/Zaid-Ajaj/orgs","repos_url":"https://api.github.com/users/Zaid-Ajaj/repos","events_url":"https://api.github.com/users/Zaid-Ajaj/events{/privacy}","received_events_url":"https://api.github.com/users/Zaid-Ajaj/received_events","type":"User","site_admin":false},"labels":[{"id":326301155,"node_id":"MDU6TGFiZWwzMjYzMDExNTU=","url":"https://api.github.com/repos/fable-compiler/Fable/labels/discussion","name":"discussion","color":"009800","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/fable-compiler/Fable/milestones/5","html_url":"https://github.com/fable-compiler/Fable/milestone/5","labels_url":"https://api.github.com/repos/fable-compiler/Fable/milestones/5/labels","id":3019858,"node_id":"MDk6TWlsZXN0b25lMzAxOTg1OA==","number":5,"title":"1.3.8","description":"","creator":{"login":"alfonsogarciacaro","id":8275461,"node_id":"MDQ6VXNlcjgyNzU0NjE=","avatar_url":"https://avatars0.githubusercontent.com/u/8275461?v=4","gravatar_id":"","url":"https://api.github.com/users/alfonsogarciacaro","html_url":"https://github.com/alfonsogarciacaro","followers_url":"https://api.github.com/users/alfonsogarciacaro/followers","following_url":"https://api.github.com/users/alfonsogarciacaro/following{/other_user}","gists_url":"https://api.github.com/users/alfonsogarciacaro/gists{/gist_id}","starred_url":"https://api.github.com/users/alfonsogarciacaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfonsogarciacaro/subscriptions","organizations_url":"https://api.github.com/users/alfonsogarciacaro/orgs","repos_url":"https://api.github.com/users/alfonsogarciacaro/repos","events_url":"https://api.github.com/users/alfonsogarciacaro/events{/privacy}","received_events_url":"https://api.github.com/users/alfonsogarciacaro/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":1,"state":"open","created_at":"2018-01-08T14:53:15Z","updated_at":"2018-12-12T22:16:04Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2018-01-06T23:10:13Z","updated_at":"2018-12-12T22:16:04Z","closed_at":"2018-12-12T22:16:04Z","author_association":"MEMBER","body":"### Description\r\nWhen importing a value from some javascript module and annotating it with `mutable`, the value becomes a function when you want to access it. \r\n\r\n### Repro code\r\nThe following works:\r\n```fs\r\nopen Fable.Core\r\nopen Fable.Core.JsInterop\r\n\r\nlet someValue : string = import \"someValue\" \"someModule\"\r\nlet value = someValue\r\n```\r\nCompiles to JS\r\n```js\r\nimport { someValue as someValue_1 } from \"someModule\";\r\nexport const someValue = someValue_1;\r\nexport const value = someValue;\r\n```\r\nBut as soon as you make the imported value mutable:\r\n```fs\r\nopen Fable.Core\r\nopen Fable.Core.JsInterop\r\n\r\nlet mutable someValue : string = import \"someValue\" \"someModule\"\r\nlet value = someValue\r\n```\r\nThe compilation is incorrect:\r\n```js\r\nimport { someValue as someValue_1 } from \"someModule\";\r\nexport let someValue = someValue_1;\r\nexport const value = someValue();\r\n```\r\nGiving me all kinds of `someValue is not a function` errors\r\nThis error happens regardless of using `import` or `importMember`\r\n\r\n* Fable version (`dotnet fable --version`): 1.3.7\r\n* Operating system: Linux Ubuntu 17\r\n"}}
{"actor":{"display_login":"alfonsogarciacaro"}}