Add TypeScript types for TextEncoder/TextDecoder to global type declarations
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- developer-experience, mobile
Research direction
Start by reading src/types/globals.d.ts and inspect how existing global APIs are declared. Add declarations for TextEncoder and TextDecoder, then verify that TypeScript users can reference both APIs without casts, DOM libraries, or custom declarations.
Written by the indexing model from the issue text.
Description
Hey! Both TextEncoder and TextDecoder are now natively available in Hermes:
TextEncoderlanded in Hermes for RN 0.74 (https://github.com/facebook/hermes/issues/948)TextDecoderlanded in Dec 2025 (https://github.com/facebook/hermes/pull/1855), should ship with RN 0.85
But neither is declared in React Native's TypeScript globals (src/types/globals.d.ts), so TypeScript users have to either cast through any, pull in lib: ["dom"], or add their own declarations to use these APIs without type errors.
Would be great to add the type declarations now that the runtime support is there. Happy to submit a PR if that helps.
- Dominant language
- C++
- Stars
- 127k
- Forks
- 25.3k
- PR merge metrics
- No merged PRs in 30d
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 react/react-native
-
Needs: Author Feedback Needs: Repro
Difficulty 1/5 Under an hour Newbie friendliness 92/100
react/react-native#58621 · 1 comment ·
-
Needs: Author Feedback Needs: Repro
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
react/react-native#58610 · 1 comment ·
-
Needs: Triage :mag:
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
react/react-native#58565 · 1 comment · 2 reactions ·
-
Needs: Author Feedback Needs: Repro
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
react/react-native#58555 · 4 comments · 1 reaction ·
-
Needs: Attention Needs: Repro
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
react/react-native#58526 · 2 comments ·
All issues in react/react-native
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·