We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mutable variables in modules and namespaces (#393) were fixed in #398, but for top-level variables that issue still remains:
export var v: number; export let l: number;
==>
let [<Import("v","...")>] v: float = jsNative let [<Import("l","...")>] l: float = jsNative
It should be
let [<Import("v","...")>] mutable v: float = jsNative let [<Import("l","...")>] mutable l: float = jsNative
BUT: ts2fable places everything in a recursive module:
module rec Name open System //... let [<Import(...)>] mutable v: float = jsNative
In a rec module, mutable let bindings aren't allowed:
error FS0874: Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces
-> requires a bigger rewrite than #393/#398 -- and a bigger change of generated code for top-level variables.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Mutable variables in modules and namespaces (#393) were fixed in #398, but for top-level variables that issue still remains:
==>
It should be
BUT: ts2fable places everything in a recursive module:
In a rec module, mutable let bindings aren't allowed:
-> requires a bigger rewrite than #393/#398 -- and a bigger change of generated code for top-level variables.
(extra issue for better tracking -- and #393 doesn't mention top-level variables (only tried while testing the fix))
The text was updated successfully, but these errors were encountered: