Repository navigation
Add TypeScript declaration for the performance global #58610
Description
Activity
- addedNeeds: ReproThis issue could be improved with a clear list of steps to reproduce the issue.This issue could be improved with a clear list of steps to reproduce the issue.
on Sep 21, 2026 Warning
Missing reproducer: We could not detect a reproducible example in your issue report. Reproducers are mandatory and we can accept only one of those as a valid reproducer:
- For majority of bugs: send us a Pull Request with the RNTesterPlayground.js edited to reproduce your bug.
- If your bug is UI related: a Snack
- If your bug is build/upgrade related: a project using our Reproducer Template
You can read more about about it on our website: How to report a bug.I've also found that
queueMicrotaskis also missing TS declarations as well. See hereexport default function queueMicrotask(callback: () => unknown) { We currently declare it ourself like this
declare global { function queueMicrotask(callback: () => void): void; }- addedNeeds: AttentionIssues where the author has responded to feedback.Issues where the author has responded to feedback.and removed
on Oct 1, 2026 atobandbtoaare also missing ts declarations. See here https://github.com/facebook/hermes/blob/6e2181b288b0306d8bd1988d38d32aa879b745d5/lib/VM/JSLib/GlobalObject.cpp#L768-L771We currently declare it ourself like this
declare global { function atob(data: string): string; function btoa(data: string): string; }Thanks for the detailed write-up @johnnycheng0210! Since there hadn't been activity for a couple of weeks, I opened #58831, which adds declarations for
performance/Performance/PerformanceEntry/PerformanceMark/PerformanceMeasurealong with type tests. Sorry if you were already working on it, and your review there would be very welcome.I kept that PR scoped to
performance. ThequeueMicrotask,atobandbtoagaps you mentioned aren't covered yet, so they're still open for a follow-up.
Description
Hey! React Native installs a performance global on every app, but its TypeScript types do not declare it.
This is the same gap as #56325 (TextEncoder / TextDecoder).
Happy to submit a PR if that helps
Steps to reproduce
tsconfig.json
.ts file
error
React Native Version
0.85.3
Affected Platforms
Other (please specify)
Output of
npx @react-native-community/cli infoStacktrace or Logs
MANDATORY Reproducer
this is just adding ts declarations
Screenshots and Videos
No response