getsentry / getsentry/sentry-react-native

Review and clean up public API surface types

Offen
#6,094 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
React-Native Task
Vorherrschende Sprache
TypeScript
Sterne
1.8k
Forks
366
Ø Merge
1 T. 5 Std.
Gemergte PRs (30 T.)
93

Beschreibung

## Context

With the addition of `@microsoft/api-extractor` in #6093, we now have visibility into the public API surface. The tool reports 36 `ae-forgotten-export` warnings — types that appear in public function signatures but are not exported from `index.ts`.

None of these types are documented in the Sentry docs, and no users have reported needing them. TypeScript's structural typing means consumers can pass plain object literals without importing the types explicitly.

## What needs reviewing

For each type, decide whether to **export it** (make it part of the public API) or **mark it `@internal`** (explicitly keep it private).

### Options/config types (used as integration/function parameters)
- `ReactNativeTracingOptions`, `ReactNativeTracingState`, `ReactNativeTracingIntegration`
- `ReactNavigationIntegrationOptions`, `ReactNativeNavigationOptions`
- `ReactNativeClientOptions`, `ReactNativeTransportOptions`, `BaseReactNativeOptions`, `ReactNativeWrapperOptions`
- `ReactNativeErrorHandlersOptions`, `LinkedErrorsOptions`, `BreadcrumbsOptions`
- `MobileReplayOptions`, `MobileReplayIntegration`
- `HermesProfilingOptions`
- `GraphQLReactNativeIntegrationOptions`, `SpotlightReactNativeIntegrationOptions`, `SupabaseReactNativeIntegrationOptions`
- `FeedbackFormProps`, `FeedbackButtonProps`, `ScreenshotButtonProps`, `FeedbackFormTheme`
- `TouchEventBoundaryProps`
- `AppStartIntegration`, `defaultIdleOptions`

### Internal/external types (likely should stay unexported)
- `FeedbackFormState`, `FeedbackIntegration`, `GlobalErrorBoundaryState` — internal component state
- `Replay`, `ReplayConfiguration` — `@sentry/browser` internals
- `HostComponent`, `ViewProps` — react-native types
- `ExpoAssetInstance`, `ExpoImageSource`, `ExpoImageLoadOptions`, `ExpoImageRef` — internal Expo types

## Additional items to review
- `logger` from `@sentry/browser` is exported publicly — is this intentional?

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit den öffentlichen Exporten in index.ts und dem in #6093 eingeführten @microsoft/api-extractor-Bericht. Überprüfe jeden aufgeführten vergessenen Export-Typ und entscheide, ob er zur öffentlichen API gehört oder mit @internal markiert werden sollte, einschließlich der Frage, ob der logger-Export beabsichtigt ist. Erledigt ist die Aufgabe, wenn alle 36 Warnungen eine ausdrückliche Lösung haben und die API-Oberfläche diese Entscheidungen widerspiegelt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
react-native, typescript
Bereich
api, mobile
Issue-Typ
Refactoring
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.