Raise minimum TypeScript to 5.0.4 and drop TS 3.8 support (v9)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 70/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- react-native, typescript
- Domain
- build-system, ci-cd, documentation, mobile
Research direction
Start by reviewing the Type Check TypeScript 3.8 CI job, the downlevel build step, and the typesVersions mapping in packages/core/package.json. Check the alpha tracking notes in #6656 and the TypeScript version policy in the linked migration guide. Done means the floor is 5.0.4, the old down-level setup and CI job are retired or updated, and v9 migration or release notes document the user impact.
Written by the indexing model from the issue text.
Description
Summary
Raise the React Native SDK's minimum supported TypeScript version to 5.0.4 and drop the TypeScript 3.8 down-leveling setup.
Target: v9 (next major). This is a breaking change and will be implemented as part of the v9 major, alongside the
@sentry/*JavaScript SDK v11 bump.
Background
JavaScript SDK v11 raises its minimum TypeScript to 5.0.4 and stops emitting down-leveled types (migration guide — TypeScript Version Policy). Confirmed against the alpha: @sentry/core@11.0.0-alpha.2 no longer ships the typesVersions / types-ts3.8 fallback that v10 provided for TS <5.0.
Because the RN SDK re-exports and references @sentry/core types, its effective TypeScript floor is inherited from core. The v11 core .d.ts files use TS 4.0/4.5+ syntax (labeled tuple elements; inline type import specifiers) that older TypeScript cannot parse — this is what fails the Type Check TypeScript 3.8 CI job on the alpha.2 spike (#6655). Our own downlevel-dts step only rewrites the RN SDK's own declarations; it does not (and cannot practically) rewrite the transitive @sentry/core types.
See the alpha.2 tracking notes in #6656.
Is 5.0.4 viable for React Native?
Yes. 5.0.4 is exactly the TypeScript version the RN community template pinned for RN 0.73–0.76; RN 0.77+ ships newer (^5.8.x). RN 0.71/0.72 templated TS 4.8.4, but TypeScript is decoupled from the RN version and can be bumped independently.
User impact
Compile-time only, TypeScript users only:
- Not affected: JavaScript-only users, and TypeScript users already on
>= 5.0.4(the majority). - Affected: TypeScript users below
5.0.4— they must bumptypescript(a devDependency change, independent of their RN version). No runtime/behavior impact.
The SDK's react-native peer floor stays >= 0.65.0: the SDK still runs on old RN, but its types will require TS 5.0.4.
Tasks
- Raise the minimum supported TypeScript to
5.0.4. - Remove the down-level setup: the
downlevelbuild step, thedownlevel-dtsdevDependency, and thetypesVersions<4.9 → ts3.8mapping inpackages/core/package.json. - Replace/retire the
Type Check TypeScript 3.8CI job with one pinned to the new5.0.4floor. - Document in the v9 migration guide / release notes: "Minimum TypeScript raised to 5.0.4 (following
@sentry/corev11); React Native support unchanged (>= 0.65). TypeScript users below 5.0.4 must upgrade TypeScript — this does not require a React Native upgrade."
- Dominant language
- TypeScript
- Stars
- 1.8k
- Forks
- 367
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 94
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from getsentry/sentry-react-native
-
React-Native Replays Task
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
getsentry/sentry-react-native#6680 · 1 comment ·
-
Improvement React-Native
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getsentry/sentry-react-native#6143 · 2 comments ·
-
React-Native Task User Feedbacks
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
getsentry/sentry-react-native#5932 · 2 comments ·
-
React-Native Replays Task
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
getsentry/sentry-react-native#5882 · 1 comment ·
-
Good First Issue React-Native Task
Difficulty 1/5 Under an hour Newbie friendliness 65/100
getsentry/sentry-react-native#5771 · 1 comment ·
All issues in getsentry/sentry-react-native
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·