How to extend a JS class in fable
问题 Given a class defined in an external JS library (let's call it Foo) then I'd like to extend in F# type bar() = inherits Foo ... However I can' only find examples of how to integrate with functions and [<Import("Foo", from="my-module")>] let Foo = JsNative will of course not let me derive Bar from Foo. So how Do I do that 回答1: The Import attribute can be used on a type declaration. e.g. [<Import("Foo", from="my-module")>] type Foo() = class end type Bar() = inherit Foo() You can then also