From 56ad99d3320e8d92ee03346a4946c677feda4a03 Mon Sep 17 00:00:00 2001 From: Sam Zhou Date: Wed, 17 Apr 2024 16:33:36 -0700 Subject: [PATCH] [flow][cleanup][EZ] Kill `RequiredInlineKeyof` variant of mapped type error Summary: Unused because it's supported Changelog: [internal] Reviewed By: gkz Differential Revision: D56271320 fbshipit-source-id: d744e7356f6c28713d7785d62b23406d6ab97fe3 --- src/typing/debug_js.ml | 1 - src/typing/errors/error_message.ml | 8 -------- 2 files changed, 9 deletions(-) diff --git a/src/typing/debug_js.ml b/src/typing/debug_js.ml index 302abb1b867..d49479bcfe2 100644 --- a/src/typing/debug_js.ml +++ b/src/typing/debug_js.ml @@ -1962,7 +1962,6 @@ let dump_error_message = match kind with | InterfaceOrDeclaredClass -> "InterfaceOrDeclaredClass" | ExtraProperties -> "ExtraProperties" - | RequiredInlineKeyof -> "RequiredInlineKeyof" | ExplicitExactOrInexact -> "ExplicitExactOrInexact" | RemoveOptionality -> "RemoveOptionality" ) diff --git a/src/typing/errors/error_message.ml b/src/typing/errors/error_message.ml index e5890d9235f..44271903773 100644 --- a/src/typing/errors/error_message.ml +++ b/src/typing/errors/error_message.ml @@ -872,7 +872,6 @@ and ts_syntax_kind = and invalid_mapped_type_error_kind = | InterfaceOrDeclaredClass | ExtraProperties - | RequiredInlineKeyof | ExplicitExactOrInexact | RemoveOptionality @@ -5300,13 +5299,6 @@ let friendly_message_of_msg loc_of_aloc msg = [text "Mapped Types are not supported in interfaces or declared classes."] | ExtraProperties -> [text "Mapped Types cannot be used when other properties or indexers are present."] - | RequiredInlineKeyof -> - [ - text - "Fully general mapped types are not supported yet. All mapped types must use an inline keyof: "; - code "{[key in keyof O]: T}"; - text "."; - ] | ExplicitExactOrInexact -> [ text "Mapped Types take on the exactness of the argument passed to keyof. They do not ";