Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxingbaoyu committed Oct 12, 2022
1 parent 3b767e1 commit 2b49666
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/babel-generator/src/printer.ts
Expand Up @@ -1039,7 +1039,8 @@ class Printer {
} else if (
type === COMMENT_TYPE.INNER &&
!(node.type === "ObjectExpression" && node.properties.length > 1) &&
node.type !== "ClassBody"
node.type !== "ClassBody" &&
node.type !== "TSInterfaceBody"
) {
// class X {
// /*:: a: number*/
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-generator/test/index.js
Expand Up @@ -481,7 +481,7 @@ describe("generation", function () {
ast.comments[0].loc = null;
ast.comments[1].loc = undefined;

expect(generate(ast).code).toBe("/*#__PURE__*/ /*#__PURE__*/");
expect(generate(ast).code).toBe("/*#__PURE__*/\n/*#__PURE__*/");
});

it("leading comments without loc", () => {
Expand Down

0 comments on commit 2b49666

Please sign in to comment.