Flow opaque type 6.x backport (#6081)
* Flow opaque type backport * Add tests for strip types, comments, and babel-generator * Fix failing tests, run scripts * Bump babylon to 6.18.0
This commit is contained in:
@@ -103,6 +103,14 @@ defineType("DeclareTypeAlias", {
|
||||
}
|
||||
});
|
||||
|
||||
defineType("DeclareOpaqueType", {
|
||||
visitor: ["id", "typeParameters", "supertype"],
|
||||
aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
|
||||
fields: {
|
||||
// todo
|
||||
}
|
||||
});
|
||||
|
||||
defineType("DeclareVariable", {
|
||||
visitor: ["id"],
|
||||
aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
|
||||
@@ -111,6 +119,14 @@ defineType("DeclareVariable", {
|
||||
}
|
||||
});
|
||||
|
||||
defineType("DeclareExportDeclaration", {
|
||||
visitor: ["declaration", "specifiers", "source"],
|
||||
aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
|
||||
fields: {
|
||||
// todo
|
||||
},
|
||||
});
|
||||
|
||||
defineType("ExistentialTypeParam", {
|
||||
aliases: ["Flow"]
|
||||
});
|
||||
@@ -236,6 +252,14 @@ defineType("TypeAlias", {
|
||||
}
|
||||
});
|
||||
|
||||
defineType("OpaqueType", {
|
||||
visitor: ["id", "typeParameters", "impltype", "supertype"],
|
||||
aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
|
||||
fields: {
|
||||
// todo
|
||||
}
|
||||
});
|
||||
|
||||
defineType("TypeAnnotation", {
|
||||
visitor: ["typeAnnotation"],
|
||||
aliases: ["Flow"],
|
||||
|
||||
@@ -70,6 +70,7 @@ getBindingIdentifiers.keys = {
|
||||
DeclareVariable: ["id"],
|
||||
InterfaceDeclaration: ["id"],
|
||||
TypeAlias: ["id"],
|
||||
OpaqueType: ["id"],
|
||||
|
||||
CatchClause: ["param"],
|
||||
LabeledStatement: ["label"],
|
||||
|
||||
Reference in New Issue
Block a user