Fix printing of exact object flow type annotations (#1114)
Fixes #1089.
This commit is contained in:
1 parent
eff5af6ca9
commit
96b0a33cff
4 files changed
+12
-2
No files matched your search
+2
-2
@@ -704,10 +704,10 @@ function genericPrintNoParens(path, options, print) {
|
||||
if (props.length === 0) {
|
||||
return group(
|
||||
concat([
|
||||
"{",
|
||||
leftBrace,
|
||||
comments.printDanglingComments(path, options),
|
||||
softline,
|
||||
"}"
|
||||
rightBrace
|
||||
])
|
||||
);
|
||||
} else {
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`test.js 1`] = `
|
||||
"type Props = {||};
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
type Props = {||};
|
||||
"
|
||||
`;
|
||||
@@ -0,0 +1 @@
|
||||
run_spec(__dirname);
|
||||
@@ -0,0 +1 @@
|
||||
type Props = {||};
|
||||
Reference in new issue
Block a user