fix(app-check): remove ReactNativeFirebaseAppCheckProvider from type-only export#8871
Open
kimchi-developer wants to merge 1 commit intoinvertase:mainfrom
Open
fix(app-check): remove ReactNativeFirebaseAppCheckProvider from type-only export#8871kimchi-developer wants to merge 1 commit intoinvertase:mainfrom
kimchi-developer wants to merge 1 commit intoinvertase:mainfrom
Conversation
…only export
ReactNativeFirebaseAppCheckProvider is exported as a class from ./modular,
but was also listed in the type-only export block.
When both exist, TypeScript prioritizes the type-only export, causing:
`'ReactNativeFirebaseAppCheckProvider' only refers to a type, but is being used as a value here.`
Removing it from `export type {}` allows the class export from `./modular` to take precedence.
Fixes invertase#8512
|
@kimchi-developer is attempting to deploy a commit to the Invertase Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When importing
ReactNativeFirebaseAppCheckProvideras documented:TypeScript throws:
Note: This is a different issue from #8512 (TS2614: "has no exported member"), which was fixed by #8529. That PR added the modular exports but kept
ReactNativeFirebaseAppCheckProviderin theexport type {}block, causing this new conflict.Root Cause
In
packages/app-check/lib/index.ts:When the same name is exported as both a type (via
export type) and a value (viaexport *), TypeScript prioritizes the type-only export, making it impossible to use as a constructor.Solution
Remove
ReactNativeFirebaseAppCheckProviderfrom theexport type {}block.The class will still be exported via
export * from './modular', and type inference will work correctly.Affected Versions
@react-native-firebase/app-check@23.8.5