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

Let Parser ignore TypseScript syntax #6954

Open
7 tasks
ShortDevelopment opened this issue Oct 1, 2023 · 2 comments
Open
7 tasks

Let Parser ignore TypseScript syntax #6954

ShortDevelopment opened this issue Oct 1, 2023 · 2 comments

Comments

@ShortDevelopment
Copy link
Contributor

ShortDevelopment commented Oct 1, 2023

Idea

Since CC is now a standalone js engine it might be cool to have the capability to execute typescript files directly via CC to allow for a faster development cycle.

Implementation

This feature would work by just throwing away type information in the parser.
It should be available via an opt-in flag.

Tasks

  • Ignore simple type-annotations
  • Ignore type definitions (type keyword)
  • Ignore type declarations (declare keyword)
  • Ignore TS interface syntax (interface and implements keyword)
  • Parse and expose TS enum fields (future)
  • Handle namespaces
  • Handle TS decorators (future)

...


See #1435 (comment)

@rhuanjl
Copy link
Collaborator

rhuanjl commented Apr 22, 2024

I'm a little concerned about quite how intrusive this could be in the parser; would it be intended as a feature for an embedded use cases or just for testing with ch?

@ShortDevelopment
Copy link
Contributor Author

This was just a general idea.
It might be a nice feature to attract users (like bun does) but it of cause may not impact parsing performance.

The priority for this is definitely very low.

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