Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript inference improvement on choice parser #108

Open
chrisarts opened this issue Jul 5, 2023 · 0 comments
Open

Typescript inference improvement on choice parser #108

chrisarts opened this issue Jul 5, 2023 · 0 comments

Comments

@chrisarts
Copy link

chrisarts commented Jul 5, 2023

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] {
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant