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 printing of exact object flow type annotations #1114

Merged
merged 1 commit into from Apr 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/printer.js
Expand Up @@ -704,10 +704,10 @@ function genericPrintNoParens(path, options, print) {
if (props.length === 0) {
return group(
concat([
"{",
leftBrace,
comments.printDanglingComments(path, options),
softline,
"}"
rightBrace
])
);
} else {
Expand Down
8 changes: 8 additions & 0 deletions tests/exact_object/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,8 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`test.js 1`] = `
"type Props = {||};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
type Props = {||};
"
`;
1 change: 1 addition & 0 deletions tests/exact_object/jsfmt.spec.js
@@ -0,0 +1 @@
run_spec(__dirname);
1 change: 1 addition & 0 deletions tests/exact_object/test.js
@@ -0,0 +1 @@
type Props = {||};