diff --git a/packages/react-native/React/Views/RCTFont.mm b/packages/react-native/React/Views/RCTFont.mm index fe350138fd9..ed6425e9cf2 100644 --- a/packages/react-native/React/Views/RCTFont.mm +++ b/packages/react-native/React/Views/RCTFont.mm @@ -205,7 +205,7 @@ RCT_ENUM_CONVERTER( UIFontWeightRegular, doubleValue) -typedef BOOL RCTFontStyle; +using RCTFontStyle = BOOL; RCT_ENUM_CONVERTER( RCTFontStyle, (@{ @@ -216,7 +216,7 @@ RCT_ENUM_CONVERTER( NO, boolValue) -typedef NSDictionary RCTFontVariantDescriptor; +using RCTFontVariantDescriptor = NSDictionary; + (RCTFontVariantDescriptor *)RCTFontVariantDescriptor:(id)json { static NSDictionary *mapping; diff --git a/packages/react-native/ReactCommon/cxxreact/CxxModule.h b/packages/react-native/ReactCommon/cxxreact/CxxModule.h index fed1a7353a3..a825c401388 100644 --- a/packages/react-native/ReactCommon/cxxreact/CxxModule.h +++ b/packages/react-native/ReactCommon/cxxreact/CxxModule.h @@ -53,9 +53,9 @@ class CxxModule { class SyncTagType {}; public: - typedef std::function()> Provider; + using Provider = std::function()>; - typedef std::function)> Callback; + using Callback = std::function)>; constexpr static AsyncTagType AsyncTag = AsyncTagType(); constexpr static SyncTagType SyncTag = SyncTagType(); diff --git a/packages/react-native/ReactCommon/cxxreact/JsArgumentHelpers.h b/packages/react-native/ReactCommon/cxxreact/JsArgumentHelpers.h index 9a907017985..cf5343cb3e7 100644 --- a/packages/react-native/ReactCommon/cxxreact/JsArgumentHelpers.h +++ b/packages/react-native/ReactCommon/cxxreact/JsArgumentHelpers.h @@ -68,8 +68,8 @@ namespace detail { // only for types compatible with folly::dynamic. template struct is_dynamic { - typedef typename std:: - enable_if::value, T>::type type; + using type = typename std:: + enable_if::value, T>::type; }; } // end namespace detail diff --git a/packages/react-native/ReactCommon/logger/react_native_log.h b/packages/react-native/ReactCommon/logger/react_native_log.h index 5f585efa428..a05b4c6e6a3 100644 --- a/packages/react-native/ReactCommon/logger/react_native_log.h +++ b/packages/react-native/ReactCommon/logger/react_native_log.h @@ -14,7 +14,7 @@ enum ReactNativeLogLevel { ReactNativeLogLevelFatal = 4 }; -typedef void (*reactnativelogfunctype)(ReactNativeLogLevel, const char*); +using reactnativelogfunctype = void (*)(ReactNativeLogLevel, const char*); #ifdef __cplusplus extern "C" {