Skip to content

Commit

Permalink
Re-introduce the deprecated constructor on ReactModuleInfo
Browse files Browse the repository at this point in the history
Summary:
This alleviates a breaking change on `ReactModuleInfo` constructor.
While the ctor was deprecated, we realized that there are more than 250 usages in OSS.
We'll need to properly communicate this removal before we do it.

Changelog:
[Android] [Fixed] - Re-introduce the deprecated constructor on ReactModuleInfo

Differential Revision: D66755541
  • Loading branch information
cortinico authored and facebook-github-bot committed Dec 4, 2024
1 parent 0217d7e commit 175fdb1
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,24 @@ public class ReactModuleInfo(
public val isCxxModule: Boolean,
public val isTurboModule: Boolean
) {

@Deprecated(
"This constructor is deprecated and will be removed in the future. Use ReactModuleInfo(String, String, boolean, boolean, boolean, boolean)]",
replaceWith =
ReplaceWith(
expression =
"ReactModuleInfo(name, className, canOverrideExistingModule, needsEagerInit, isCxxModule, isTurboModule)"),
level = DeprecationLevel.WARNING)
public constructor(
name: String,
className: String,
canOverrideExistingModule: Boolean,
needsEagerInit: Boolean,
@Suppress("UNUSED_PARAMETER") hasConstants: Boolean,
isCxxModule: Boolean,
isTurboModule: Boolean
) : this(name, className, canOverrideExistingModule, needsEagerInit, isCxxModule, isTurboModule)

public companion object {
/**
* Checks if the passed class is a TurboModule. Useful to populate the parameter [isTurboModule]
Expand Down

0 comments on commit 175fdb1

Please sign in to comment.