deprecate hasConstants from ReactModule annotation (#39489)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39489

## Changelog
[Android][Deprecated] - deprecate hasConstants from ReactModule annotation

this is not used in our framework anymore, deprecating

Reviewed By: cortinico

Differential Revision: D49262867

fbshipit-source-id: 90e5ee75cf20345c6121e77a3328f9c96f104cdb
This commit is contained in:
Phillip Pan
2023-09-16 01:35:01 -07:00
committed by Facebook GitHub Bot
parent 9f52378cc1
commit ccfd4c080c
2 changed files with 5 additions and 1 deletions
@@ -16,6 +16,9 @@ import java.lang.annotation.Target;
/**
* Annotation for use on {@link com.facebook.react.bridge.BaseJavaModule}s to describe properties
* for that module.
*
* @deprecated This property is unused and it's planning to be removed in a future version of React
* Native. Please refrain from using it.
*/
@Retention(RUNTIME)
@Target(TYPE)
@@ -38,6 +41,7 @@ public @interface ReactModule {
* Whether this module has constants to add, defaults to true as that is safer for when a correct
* annotation is not included
*/
@Deprecated
boolean hasConstants() default true;
/**
@@ -36,7 +36,7 @@ import okhttp3.WebSocket;
import okhttp3.WebSocketListener;
import okio.ByteString;
@ReactModule(name = NativeWebSocketModuleSpec.NAME, hasConstants = false)
@ReactModule(name = NativeWebSocketModuleSpec.NAME)
public final class WebSocketModule extends NativeWebSocketModuleSpec {
public interface ContentHandler {
void onMessage(String text, WritableMap params);