ts2fable icon indicating copy to clipboard operation
ts2fable copied to clipboard

U5<string, string, string, string, string> option

Open ctaggart opened this issue 6 years ago • 4 comments

https://github.com/fable-compiler/ts2fable-exports/blob/master/Yargs.fs#L222

TypeScript

type?: "array" | "boolean" | "count" | "number" | "string";

currently:

abstract ``type``: U5<string, string, string, string, string> option with get, set

probably should be:

abstract ``type``: string option with get, set

ctaggart avatar Mar 23 '18 15:03 ctaggart

How about this?

type [<StringEnum>] [<RequireQualifiedAccess>] TypeAnonymous =
    | Array
    | Boolean
    | Count
    | Number
    | String

type [<AllowNullLiteral>] Options =
    abstract ``type``: TypeAnonymous option with get,set

humhei avatar Mar 23 '18 23:03 humhei

Or just lay it aside ? Keeping the issue open And waiting f# anonymous type

humhei avatar Mar 23 '18 23:03 humhei

It would be nice to extract out the anonymous StringEnum if we can come up with a naming convention that does not have naming conflicts. If I was to make this manually, I would call it OptionsType which is a combination of the parent type name and the member that it is in.

ctaggart avatar Mar 26 '18 16:03 ctaggart

This is really a duplicate of #45

ctaggart avatar Mar 26 '18 20:03 ctaggart