mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
Facebook GitHub Bot
parent
9f52378cc1
commit
ccfd4c080c
+4
@@ -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;
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user