diff --git a/src/parser/estree_translator.ml b/src/parser/estree_translator.ml index cdd4eab75a2..28e36b2b251 100644 --- a/src/parser/estree_translator.ml +++ b/src/parser/estree_translator.ml @@ -1643,6 +1643,7 @@ with type t = Impl.t = struct match kind with | Default -> null | Asserts -> string "asserts" + | Implies -> string "implies" in node ?comments:(format_internal_comments comments) diff --git a/src/parser/flow_ast.ml b/src/parser/flow_ast.ml index da3c0efff4f..6376b6b4994 100644 --- a/src/parser/flow_ast.ml +++ b/src/parser/flow_ast.ml @@ -670,6 +670,7 @@ and Type : sig and kind = | Default | Asserts + | Implies and ('M, 'T) t' = { kind: kind; diff --git a/src/parser_utils/output/js_layout_generator.ml b/src/parser_utils/output/js_layout_generator.ml index 62d06c875c9..5977cd3cc02 100644 --- a/src/parser_utils/output/js_layout_generator.ml +++ b/src/parser_utils/output/js_layout_generator.ml @@ -3571,6 +3571,7 @@ and type_guard ~opts ~needs_parens guard = match kind with | Default -> [] | Asserts -> [Atom "asserts"] + | Implies -> [Atom "implies"] in let id_part = identifier x in let type_part = diff --git a/src/typing/errors/flow_intermediate_error.ml b/src/typing/errors/flow_intermediate_error.ml index 08b4db535d2..1c2514cd3c0 100644 --- a/src/typing/errors/flow_intermediate_error.ml +++ b/src/typing/errors/flow_intermediate_error.ml @@ -3828,6 +3828,7 @@ let to_printable_error : match kind with | Flow_ast.Type.TypeGuard.Default -> "This kind of type guard is" | Flow_ast.Type.TypeGuard.Asserts -> "Type guard assertions are" + | Flow_ast.Type.TypeGuard.Implies -> "One-sided type guards are" in [text (kind_str ^ " not yet supported.")] | MessageUnsupportedSyntax (UnsupportedInternalSlot { name; static = false }) ->