Fix printing of exact object flow type annotations (#1114)

Fixes #1089.
master
Simon Lydell 2017-04-03 19:24:36 +02:00 committed by Christopher Chedeau
parent eff5af6ca9
commit 96b0a33cff
4 changed files with 12 additions and 2 deletions

View File

@ -704,10 +704,10 @@ function genericPrintNoParens(path, options, print) {
if (props.length === 0) {
return group(
concat([
"{",
leftBrace,
comments.printDanglingComments(path, options),
softline,
"}"
rightBrace
])
);
} else {

View File

@ -0,0 +1,8 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`test.js 1`] = `
"type Props = {||};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
type Props = {||};
"
`;

View File

@ -0,0 +1 @@
run_spec(__dirname);

View File

@ -0,0 +1 @@
type Props = {||};