diff --git a/packages/react-native/.doxygen.config.template b/packages/react-native/.doxygen.config.template index 72db8de8be9..cd4047ae375 100644 --- a/packages/react-native/.doxygen.config.template +++ b/packages/react-native/.doxygen.config.template @@ -2443,7 +2443,7 @@ INCLUDE_FILE_PATTERNS = # recursively expanded use the := operator instead of the = operator. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -PREDEFINED = FOLLY_PACK_PUSH="" FOLLY_PACK_POP="" FOLLY_PACK_ATTR="" __attribute__(x)="" ${PREDEFINED} +PREDEFINED = FOLLY_PACK_PUSH="" FOLLY_PACK_POP="" FOLLY_PACK_ATTR="" __attribute__(x)="" __deprecated_msg(x)="" ${PREDEFINED} # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The diff --git a/scripts/cxx-api/manual_test/.doxygen.config.template b/scripts/cxx-api/manual_test/.doxygen.config.template index 80290595ec9..6f762bb4b57 100644 --- a/scripts/cxx-api/manual_test/.doxygen.config.template +++ b/scripts/cxx-api/manual_test/.doxygen.config.template @@ -2442,7 +2442,7 @@ INCLUDE_FILE_PATTERNS = # recursively expanded use the := operator instead of the = operator. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -PREDEFINED = FOLLY_PACK_PUSH="" FOLLY_PACK_POP="" FOLLY_PACK_ATTR="" __attribute__(x)="" ${PREDEFINED} +PREDEFINED = FOLLY_PACK_PUSH="" FOLLY_PACK_POP="" FOLLY_PACK_ATTR="" __attribute__(x)="" __deprecated_msg(x)="" ${PREDEFINED} # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The diff --git a/scripts/cxx-api/tests/snapshots/.doxygen.config.template b/scripts/cxx-api/tests/snapshots/.doxygen.config.template index a01a146395a..13cbc7b5737 100644 --- a/scripts/cxx-api/tests/snapshots/.doxygen.config.template +++ b/scripts/cxx-api/tests/snapshots/.doxygen.config.template @@ -2442,7 +2442,7 @@ INCLUDE_FILE_PATTERNS = # recursively expanded use the := operator instead of the = operator. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -PREDEFINED = FOLLY_PACK_PUSH="" FOLLY_PACK_POP="" FOLLY_PACK_ATTR="" __attribute__(x)="" +PREDEFINED = FOLLY_PACK_PUSH="" FOLLY_PACK_POP="" FOLLY_PACK_ATTR="" __attribute__(x)="" __deprecated_msg(x)="" # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The diff --git a/scripts/cxx-api/tests/snapshots/should_handle_deprecated_msg/snapshot.api b/scripts/cxx-api/tests/snapshots/should_handle_deprecated_msg/snapshot.api new file mode 100644 index 00000000000..65e0334c1d0 --- /dev/null +++ b/scripts/cxx-api/tests/snapshots/should_handle_deprecated_msg/snapshot.api @@ -0,0 +1,16 @@ +interface RCTDeprecatedInterface { + public virtual void customBubblingEventTypes(); + public virtual void legacyTitle(); + public virtual void normalMethod(); + public virtual void oldMethod(); +} + +interface RCTTestInterface { + public virtual NSArray * deprecatedMethod:(id param); + public virtual void normalMethod:(NSString * name); +} + +protocol RCTDeprecatedProtocol { + public virtual void deprecatedProtocolMethod(); + public virtual void normalProtocolMethod(); +} diff --git a/scripts/cxx-api/tests/snapshots/should_handle_deprecated_msg/test.h b/scripts/cxx-api/tests/snapshots/should_handle_deprecated_msg/test.h new file mode 100644 index 00000000000..b3d47328979 --- /dev/null +++ b/scripts/cxx-api/tests/snapshots/should_handle_deprecated_msg/test.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +@interface RCTTestInterface + +- (void)normalMethod:(NSString *)name; + +- (NSArray *)deprecatedMethod:(id)param __deprecated_msg("Use newMethod instead."); + +@end + +@interface RCTDeprecatedInterface + +- (void)normalMethod; + +- (void)oldMethod __deprecated_msg("Use newMethod instead."); + +- (void)customBubblingEventTypes __deprecated_msg("Use RCTBubblingEventBlock props instead."); + +- (void)legacyTitle __deprecated_msg("This API will be removed along with the legacy architecture."); + +@end + +@protocol RCTDeprecatedProtocol + +- (void)normalProtocolMethod; + +- (void)deprecatedProtocolMethod __deprecated_msg("Protocol method is deprecated."); + +@end