We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When AST with TSInterfaceBody changed, it produced additional semicolon, which is not valid code:
AST
TSInterfaceBody
const {print, parse} = require('recast'); const code = [ "interface Hello {", " 'hello': any;", " 'hello': string;", "}", ].join(eol); const ast = recast.parse(code, { parser: require('recast/parser/typescript'), }); ast.program.body[0].body.body.pop(); recast.print(ast).code; // returns "interface Hello {", " 'hello': any;;", "}",
Also I want to mention that recast.prettyPrint not cover this case, so it's not tested with print.
recast.prettyPrint
print
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
When
AST
withTSInterfaceBody
changed, it produced additional semicolon, which is not valid code:Also I want to mention that
recast.prettyPrint
not cover this case, so it's not tested withprint
.The text was updated successfully, but these errors were encountered: