Fable icon indicating copy to clipboard operation
Fable copied to clipboard

`let mutable private` used with JS import generate wrong JavaScript code

Open MangelMaxime opened this issue 1 year ago • 0 comments

Description

open Fable.Core.JsInterop

type ToastrOptions =
    abstract Thing : string

[<RequireQualifiedAccess>]
module Toastr =
    let mutable private theOptions: ToastrOptions =
        //()
        import "options" "toastr"
import { options } from "toastr";

export const Toastr_theOptions = options;

Toastr_theOptions should not be a const (immutable) but a let.

REPL

Related information

  • Fable version: 4.20.0
  • Operating system

MangelMaxime avatar Sep 30 '24 14:09 MangelMaxime