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

fix: additional semicolon in TSInterfaceBody #868

Conversation

coderaiser
Copy link
Contributor

Closes #867.

TSInterfaceBody handling in printer.ts adds additional semicolons when recast.print is used. This produces not working and not parsable code. Anyways, prettyPrint works good, it do not look at source, and try to guess that semicolons is needed, but it's internal method that no one use.

This PR removes additional semicolons, and keeps code parsable for both cases: prettyPrint and print.
So internal from source code:

interface Hello {
    hello: any;
}

prettyPrint will produce:

 interface Hello {
    hello: any
}

And print will produce:

 interface Hello {
    hello: any;
}

@eventualbuddha eventualbuddha force-pushed the fix/additional-semicolon-in-ts-interface-body branch from 184ad76 to 6e0685c Compare April 27, 2022 22:42
@eventualbuddha eventualbuddha merged commit 809351a into benjamn:master Apr 27, 2022
@coderaiser coderaiser deleted the fix/additional-semicolon-in-ts-interface-body branch April 28, 2022 06:08
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

Successfully merging this pull request may close these issues.

Additional semicolon it TSInterfaceBody
2 participants