Skip to content

refactor(perf): move to typescript#8904

Open
akashdeep931 wants to merge 5 commits intomainfrom
perf-typescript
Open

refactor(perf): move to typescript#8904
akashdeep931 wants to merge 5 commits intomainfrom
perf-typescript

Conversation

@akashdeep931
Copy link

@akashdeep931 akashdeep931 commented Feb 25, 2026

Description

First TypeScript migration for the perf package. Source is now written in TypeScript and namespaced types are fully separated from modular types:

  • Namespaced types live in lib/types/namespaced.ts and are aligned with the previous index.d.ts surface. This keeps the migration low-risk and makes it straightforward to remove namespaced support later.
  • Modular types live in lib/types/modular.ts and are consumed only by the modular API; the same file also contains the modular implementation (getPerformance, initializePerformance, trace, httpMetric, newScreenTrace, startScreenTrace). lib/types/internal.ts defines PerformanceModuleWithModularArg for internal modular-call typing.
  • The package continues to build with react-native-builder-bob (ESM + TypeScript declaration targets). No intentional changes to the public API or runtime behavior.

Breaking Changes

No consumer-facing breaking changes. Same public API and type surface; only the implementation and type file layout have changed (JS → TS, types split into types/namespaced.ts and types/modular.ts).

Related issues

Release Summary

@react-native-firebase/perf: TypeScript migration; namespaced and modular types separated into types/namespaced.ts and types/modular.ts. No API changes.

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My change supports the following platforms;
    • Android
    • iOS
    • Other (macOS, web)
  • My change includes tests;
    • e2e tests added or updated in packages/**/e2e (existing e2e unchanged; type-test and build validate TS)
    • jest tests added or updated in packages/**/__tests__ (existing tests updated for TS where applicable)
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes
    • No

Test Plan

  • yarn compile at repo root (builds all packages including perf).
  • Run perf type-test: ensure packages/perf/type-test.ts is included in root tsc and passes.
  • Run existing perf e2e: packages/perf/e2e/perf.e2e.js.
  • Run perf jest tests if present: packages/perf/__tests__/.
  • Verify local test app (e.g. tests app with perf) runs and can use perf.

Think react-native-firebase is great? Please consider supporting the project with any of the below:

@vercel
Copy link

vercel bot commented Feb 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-native-firebase Ready Ready Preview, Comment Feb 25, 2026 6:26pm

Request Review

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.

1 participant