1 parent
4bfeb9064d
commit
3f8c4d6974
3 files changed
+18
-2
No files matched your search
+3
-2
@@ -1868,9 +1868,10 @@ function genericPrintNoParens(path, options, print, args) {
|
||||
const parentParentParent = path.getParentNode(2);
|
||||
let isArrowFunctionTypeAnnotation =
|
||||
n.type === "TSFunctionType" ||
|
||||
!((!getFlowVariance(parent) &&
|
||||
!((parent.type === "ObjectTypeProperty" &&
|
||||
!getFlowVariance(parent) &&
|
||||
!parent.optional &&
|
||||
parent.type === "ObjectTypeProperty") ||
|
||||
util.locStart(parent) === util.locStart(n)) ||
|
||||
parent.type === "ObjectTypeCallProperty" ||
|
||||
(parentParentParent &&
|
||||
parentParentParent.type === "DeclareFunction"));
|
||||
|
||||
@@ -23,6 +23,11 @@ type T = { method(): void };
|
||||
declare class X { method(): void }
|
||||
declare function f(): void;
|
||||
var f: () => void;
|
||||
|
||||
declare class X {
|
||||
static deserialize(): mixed,
|
||||
static deserialize: () => mixed,
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
type T = { method: () => void };
|
||||
type T = { method(): void };
|
||||
@@ -30,4 +35,9 @@ declare class X { method(): void }
|
||||
declare function f(): void;
|
||||
var f: () => void;
|
||||
|
||||
declare class X {
|
||||
static deserialize(): mixed,
|
||||
static deserialize: () => mixed
|
||||
}
|
||||
|
||||
`;
|
||||
@@ -3,3 +3,8 @@ type T = { method(): void };
|
||||
declare class X { method(): void }
|
||||
declare function f(): void;
|
||||
var f: () => void;
|
||||
|
||||
declare class X {
|
||||
static deserialize(): mixed,
|
||||
static deserialize: () => mixed,
|
||||
}
|
||||
Reference in new issue
Block a user