Skip to content

Commit

Permalink
deprecate hasConstants from ReactModule annotation (#39489)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #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
  • Loading branch information
philIip authored and facebook-github-bot committed Sep 16, 2023
1 parent 9f52378 commit ccfd4c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
/**
* 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)
Expand All @@ -38,6 +41,7 @@
* 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;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
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);
Expand Down

0 comments on commit ccfd4c0

Please sign in to comment.