From 6ab0cca4b7a48bc5bee658dd4cae59273f8df198 Mon Sep 17 00:00:00 2001 From: Greg Price Date: Sat, 7 May 2022 23:45:27 -0700 Subject: [PATCH] flow: ObjectTypeProperty takes flags `static` and `method` These are already present in parser output. --- def/flow.ts | 2 ++ gen/builders.ts | 2 ++ gen/namedTypes.ts | 2 ++ 3 files changed, 6 insertions(+) diff --git a/def/flow.ts b/def/flow.ts index 7df97cf8..347c0433 100644 --- a/def/flow.ts +++ b/def/flow.ts @@ -171,6 +171,8 @@ export default function (fork: Fork) { .field("key", or(def("Literal"), def("Identifier"))) .field("value", def("FlowType")) .field("optional", Boolean) + .field("static", Boolean, defaults["false"]) + .field("method", Boolean, defaults["false"]) .field("variance", LegacyVariance, defaults["null"]); def("ObjectTypeIndexer") diff --git a/gen/builders.ts b/gen/builders.ts index 3f5254ba..2fe21544 100644 --- a/gen/builders.ts +++ b/gen/builders.ts @@ -1907,7 +1907,9 @@ export interface ObjectTypePropertyBuilder { comments?: K.CommentKind[] | null, key: K.LiteralKind | K.IdentifierKind, loc?: K.SourceLocationKind | null, + method?: boolean, optional: boolean, + static?: boolean, value: K.FlowTypeKind, variance?: K.VarianceKind | "plus" | "minus" | null } diff --git a/gen/namedTypes.ts b/gen/namedTypes.ts index a520ef45..7c6ea458 100644 --- a/gen/namedTypes.ts +++ b/gen/namedTypes.ts @@ -890,6 +890,8 @@ export namespace namedTypes { key: K.LiteralKind | K.IdentifierKind; value: K.FlowTypeKind; optional: boolean; + static?: boolean; + method?: boolean; variance?: K.VarianceKind | "plus" | "minus" | null; }