Skip to content

fix(app-check): remove ReactNativeFirebaseAppCheckProvider from type-only export#8871

Open
kimchi-developer wants to merge 1 commit intoinvertase:mainfrom
kimchi-developer:fix/app-check-provider-export
Open

fix(app-check): remove ReactNativeFirebaseAppCheckProvider from type-only export#8871
kimchi-developer wants to merge 1 commit intoinvertase:mainfrom
kimchi-developer:fix/app-check-provider-export

Conversation

@kimchi-developer
Copy link

@kimchi-developer kimchi-developer commented Feb 2, 2026

Problem

When importing ReactNativeFirebaseAppCheckProvider as documented:

import { ReactNativeFirebaseAppCheckProvider } from '@react-native-firebase/app-check';

const provider = new ReactNativeFirebaseAppCheckProvider(); // ❌ TS2693

TypeScript throws:

'ReactNativeFirebaseAppCheckProvider' only refers to a type, but is being used as a value here. (TS2693)

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 ReactNativeFirebaseAppCheckProvider in the export type {} block, causing this new conflict.

Root Cause

In packages/app-check/lib/index.ts:

export type {
  // ...
  ReactNativeFirebaseAppCheckProvider,  // ← exported as TYPE
} from './types/appcheck';

export * from './modular';  // ← also exports as VALUE (class)

When the same name is exported as both a type (via export type) and a value (via export *), TypeScript prioritizes the type-only export, making it impossible to use as a constructor.

Solution

Remove ReactNativeFirebaseAppCheckProvider from the export type {} block.

The class will still be exported via export * from './modular', and type inference will work correctly.

Affected Versions

  • Tested on @react-native-firebase/app-check@23.8.5

…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
@vercel
Copy link

vercel bot commented Feb 2, 2026

@kimchi-developer is attempting to deploy a commit to the Invertase Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant
Copy link

CLAassistant commented Feb 2, 2026

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants