Skip to content

Typescript inference improvement on choice parser #108

@chrisarts

Description

@chrisarts

Im following your videos and constructing my own parser based on your explanation and at this point im just using your same types but for choice I think that overload is nor required and can be replaced by:

export function choice<Parsers extends Parser<any>[]>(parsers: Parsers): Parsers[number] {
...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions