Fix support for Flow's QualifiedTypeIdentifier (#9396)
This commit is contained in:
parent
8bc9f9a05f
commit
d4e045ac24
@ -1,3 +1,4 @@
|
|||||||
type A = interface { p: string };
|
type A = interface { p: string };
|
||||||
type B = interface extends X { p: string };
|
type B = interface extends X { p: string };
|
||||||
type C = interface extends X, Y { p: string };
|
type C = interface extends X, Y { p: string };
|
||||||
|
type D = interface extends X.Y<Z> { p: string };
|
||||||
|
|||||||
@ -7,3 +7,6 @@ type B = interface extends X {
|
|||||||
type C = interface extends X, Y {
|
type C = interface extends X, Y {
|
||||||
p: string
|
p: string
|
||||||
};
|
};
|
||||||
|
type D = interface extends X.Y<Z> {
|
||||||
|
p: string
|
||||||
|
};
|
||||||
|
|||||||
@ -14,3 +14,5 @@ type overloads =
|
|||||||
;
|
;
|
||||||
|
|
||||||
type func = string => string;
|
type func = string => string;
|
||||||
|
|
||||||
|
type D = X.Y<Z>;
|
||||||
|
|||||||
@ -9,3 +9,4 @@ type union = {
|
|||||||
};
|
};
|
||||||
type overloads = (x: string) => number & (x: number) => string;
|
type overloads = (x: string) => number & (x: number) => string;
|
||||||
type func = (string) => string;
|
type func = (string) => string;
|
||||||
|
type D = X.Y<Z>;
|
||||||
|
|||||||
@ -191,7 +191,7 @@ defineType("GenericTypeAnnotation", {
|
|||||||
visitor: ["id", "typeParameters"],
|
visitor: ["id", "typeParameters"],
|
||||||
aliases: ["Flow", "FlowType"],
|
aliases: ["Flow", "FlowType"],
|
||||||
fields: {
|
fields: {
|
||||||
id: validateType("Identifier"),
|
id: validateType(["Identifier", "QualifiedTypeIdentifier"]),
|
||||||
typeParameters: validateOptionalType("TypeParameterInstantiation"),
|
typeParameters: validateOptionalType("TypeParameterInstantiation"),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@ -204,7 +204,7 @@ defineType("InterfaceExtends", {
|
|||||||
visitor: ["id", "typeParameters"],
|
visitor: ["id", "typeParameters"],
|
||||||
aliases: ["Flow"],
|
aliases: ["Flow"],
|
||||||
fields: {
|
fields: {
|
||||||
id: validateType("Identifier"),
|
id: validateType(["Identifier", "QualifiedTypeIdentifier"]),
|
||||||
typeParameters: validateOptionalType("TypeParameterInstantiation"),
|
typeParameters: validateOptionalType("TypeParameterInstantiation"),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user