Open
Description
I'm wondering if combined types (using &
) and Omitted fields (using Omit<>
) are supported. I understand that these features are not supported by F#, but I was hoping that this tool had a workaround for it.
I tried it in the online demo and it seems ts2fable
simply doesn't even try.
Input:
type Foo = {
field1: "value1" | "value2";
field2: number;
}
type Combined = Foo & {
other: string;
}
type Omitted = Omit<Foo, "value">;
Output:
// ts2fable 0.9.0
module rec moduleName
open System
open Fable.Core
open Fable.Core.JS
type [<AllowNullLiteral>] Foo =
abstract field1: FooField1 with get, set
abstract field2: float with get, set
type [<AllowNullLiteral>] Combined =
interface end
type Omitted =
Omit<Foo, string>
type [<StringEnum>] [<RequireQualifiedAccess>] FooField1 =
| Value1
| Value2
Activity