Skip to content

reuse type defined in scheduler #33694

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bubucuo
Copy link
Contributor

@bubucuo bubucuo commented Jul 4, 2025

type Callback is defined in the Scheduler package. Meanwhile:
1.In ReactFiberWorkLoop.js, the callback variable is not explicitly typed.
2.The RenderTaskFn type is defined in ReactFiberRootScheduler.js. While it requires a didTimeout parameter, this argument isn’t necessarily essential in all scenarios.

Summary

How did you test this change?

type Callback is defined in the Scheduler package. Meanwhile:
	1.In ReactFiberWorkLoop.js, the callback variable is not explicitly typed.
	2.The RenderTaskFn type is defined in ReactFiberRootScheduler.js. While it requires a didTimeout parameter, this argument isn’t necessarily essential in all scenarios.
@react-sizebot
Copy link

Comparing: ef8b6fa...562234c

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB +0.05% 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 530.50 kB 530.50 kB = 93.66 kB 93.66 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB +0.05% 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 655.04 kB 655.04 kB = 115.35 kB 115.35 kB
facebook-www/ReactDOM-prod.classic.js = 675.12 kB 675.12 kB = 118.77 kB 118.77 kB
facebook-www/ReactDOM-prod.modern.js = 665.54 kB 665.54 kB = 117.13 kB 117.13 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 562234c

@bubucuo bubucuo marked this pull request as draft July 5, 2025 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants