Skip to content

Fix CQS signal modernize-use-using in xplat/js/react-native-github/packages #52630

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/react-native/React/CxxBridge/RCTCxxBridge.mm
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@

static NSString *const RCTJSThreadName = @"com.facebook.react.JavaScript";

typedef void (^RCTPendingCall)();
using RCTPendingCall = void (^)();

using namespace facebook::jsi;
using namespace facebook::react;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

#import <jsinspector-modern/ReactCdp.h>

typedef facebook::react::jsinspector_modern::NetworkRequestListener RCTInspectorNetworkListener;
using RCTInspectorNetworkListener = facebook::react::jsinspector_modern::NetworkRequestListener;

typedef facebook::react::jsinspector_modern::ScopedExecutor<RCTInspectorNetworkListener> RCTInspectorNetworkExecutor;
using RCTInspectorNetworkExecutor = facebook::react::jsinspector_modern::ScopedExecutor<RCTInspectorNetworkListener>;

typedef facebook::react::jsinspector_modern::LoadNetworkResourceRequest RCTInspectorLoadNetworkResourceRequest;
using RCTInspectorLoadNetworkResourceRequest = facebook::react::jsinspector_modern::LoadNetworkResourceRequest;

/**
* A helper class that wraps around NSURLSession to make network requests.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#import "RCTInspectorNetworkHelper.h"
#import <React/RCTLog.h>

typedef void (^ListenerBlock)(RCTInspectorNetworkListener *);
using ListenerBlock = void (^)(RCTInspectorNetworkListener *);

@interface RCTInspectorNetworkHelper () <NSURLSessionDataDelegate>
@property (nonatomic, strong) NSURLSession *session;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#import <React/RCTViewManager.h>

typedef dispatch_block_t RCTUIManagerMountingBlock;
using RCTUIManagerMountingBlock = dispatch_block_t;

/**
* Allows hooking into UIManager internals. This can be used to execute code at
Expand Down
4 changes: 2 additions & 2 deletions packages/react-native/React/Views/RCTFont.mm
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ + (UIFont *)UIFont:(id)json
UIFontWeightRegular,
doubleValue)

typedef BOOL RCTFontStyle;
using RCTFontStyle = BOOL;
RCT_ENUM_CONVERTER(
RCTFontStyle,
(@{
Expand All @@ -216,7 +216,7 @@ + (UIFont *)UIFont:(id)json
NO,
boolValue)

typedef NSDictionary RCTFontVariantDescriptor;
using RCTFontVariantDescriptor = NSDictionary;
+ (RCTFontVariantDescriptor *)RCTFontVariantDescriptor:(id)json
{
static NSDictionary *mapping;
Expand Down
4 changes: 2 additions & 2 deletions packages/react-native/ReactCommon/cxxreact/CxxModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ class CxxModule {
class SyncTagType {};

public:
typedef std::function<std::unique_ptr<CxxModule>()> Provider;
using Provider = std::function<std::unique_ptr<CxxModule>()>;

typedef std::function<void(std::vector<folly::dynamic>)> Callback;
using Callback = std::function<void(std::vector<folly::dynamic>)>;

constexpr static AsyncTagType AsyncTag = AsyncTagType();
constexpr static SyncTagType SyncTag = SyncTagType();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ namespace detail {
// only for types compatible with folly::dynamic.
template <typename T>
struct is_dynamic {
typedef typename std::
enable_if<std::is_assignable<folly::dynamic, T>::value, T>::type type;
using type = typename std::
enable_if<std::is_assignable<folly::dynamic, T>::value, T>::type;
};

} // end namespace detail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ enum ReactNativeLogLevel {
ReactNativeLogLevelFatal = 4
};

typedef void (*reactnativelogfunctype)(ReactNativeLogLevel, const char*);
using reactnativelogfunctype = void (*)(ReactNativeLogLevel, const char*);

#ifdef __cplusplus
extern "C" {
Expand Down
Loading