You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Works with variables in modules & namespaces.
Doesn't work with top-level variables:
```typescript
export let v: number;
```
`v` is mutable and should be converted into:
```fsharp
let [<Import(...)>] mutable v: float = jsNative
```
BUT: ts2fable places everything in a recursive module:
```fsharp
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
-> would require change of generated code for top-level variables.
Instead these variables are still immutable.
==>
v1
andl1
should be mutable:The text was updated successfully, but these errors were encountered: