Skip to content

Generics with labeled tuple type parameters are parsed incorrectly #434

Open
@Programmerino

Description

@Programmerino

A declaration file containing:

export interface Example {
    problem: Promise<[a: string, b: string]>;
    missed: number;
}

is compiled to (tested on the website and on 0.8.0-build.638)

type [<AllowNullLiteral>] Example =
    abstract problem: Promise<a> with get, set
    abstract string: obj with get, set
    abstract b: string with get, set

My expectation is that, based on how ts2fable normally translates labeled tuple types, it would be compiled to:

type [<AllowNullLiteral>] Example =
    abstract problem: Promise<string * string> with get, set
    abstract missed: float with get, set

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions