-
Notifications
You must be signed in to change notification settings - Fork 483
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
Parsing .d.ts files #539
Comments
yeah if i have type definitions in my tsx file it throws with the "missing semicolon" error |
@ceremonious try adding --parser=flow to the command at the command line, i think it is working for me |
2 tasks
This was referenced Feb 9, 2024
the parsing is successful, but output doesn't match. For example, I'm seeing export declare const two: number; converted to export declare var two: number; This changes expectations around mutability |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is it possible to use jscodeshift to modify
.d.ts
files?I'm trying to parse a file that looks like this:
If I use Babel as a parser, I get this error:
SyntaxError: Missing semicolon. (2:7)
If I use Typescript, I get this error:
SyntaxError: Missing initializer in const declaration. (13:41)
Is there a different parser or parser config I can use?
The text was updated successfully, but these errors were encountered: