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

Superficial downstream Typescript support #66

Closed
StoneCypher opened this issue Apr 18, 2021 · 4 comments
Closed

Superficial downstream Typescript support #66

StoneCypher opened this issue Apr 18, 2021 · 4 comments

Comments

@StoneCypher
Copy link
Contributor

You can fake support of Typescript for parsers without actually meaningfully supporting it, but still provide some value to downstream users

All that it takes in practice is adding a string for the output type

This could be supported as an argument in the options tuple, with basically no other changes

The end result of such a thing is that output from the parser would be easy to integrate into a typescript project, and would receive non-trivial (though still incomplete) typechecking

If I provided a PR that did this, and it was short and not awful, would it be considered?

@StoneCypher
Copy link
Contributor Author

This was previously pegjs/pegjs#562

@hildjj
Copy link
Contributor

hildjj commented Apr 18, 2021

Yes, I'm interested in this.

@hildjj
Copy link
Contributor

hildjj commented Apr 18, 2021

(assuming backward-compat, opt-in, and clean enough syntax for its use that doesn't conflict with anything else that's on the table) :)

@StoneCypher
Copy link
Contributor Author

Everything I do will expect backward compatability and either opt-in or safe default. I am an absolutist about backcompat.

I will try my best to not conflict with other things, but I would appreciate help in that regard.

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

2 participants