-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
docs: edit copy for tick() in testing and api docs #35697
Conversation
You can preview 111004d at https://pr35697-111004d.ngbuilds.io/. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I just noticed this yesterday and wanted to open a PR about this. (Glad you beat me to it 😇)
* processNewMacroTasksSynchronously, whether to invoke the new macroTasks, by default is | ||
* false, means the new macroTasks will be invoked | ||
* @param millis, the number of milliseconds to advance the virtual timer | ||
* @param tickOptions, the options of `tick()`, which has a flag called |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure exactly what is wrong (maybe the commas after the param names), but these docs do not seem to be included on the API docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move the param descriptions up before @usageNotes
, like this:
@param fn A function that takes two arguments.
* *millis* The number of milliseconds to advance the virtual timer.
* *tickOptions* The options to pass to the `tick()` function.
Then put the rest of the advice about using the options into the @usageNotes
(rephrasing as appropriate and responding to George's notes 😄 )
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
8dbc523
to
7eaef73
Compare
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
You can preview 7eaef73 at https://pr35697-7eaef73.ngbuilds.io/. |
You can preview 6b36b4f at https://pr35697-6b36b4f.ngbuilds.io/. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one small suggestion. But otherwise nice tidy up.
* Any arguments passed when calling this returned function will be passed through to the `fn` | ||
* function in the parameters when it is called. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
* @param millis The number of milliseconds to advance the virtual timer. | ||
* @param tickOptions The options to pass to the `tick()` function. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
* | ||
* @param maxTurns | ||
* @returns The simulated time elapsed, in millis. | ||
* @param maxTurns A maximum number of turns. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So digging through the code, I think that maxTurns
is basically the maximum number of times the scheduler will attempt to clear its queue before it gives up with an error. It's a kind of Time To Live (TTL) number.
6b36b4f
to
c5b31ca
Compare
You can preview c5b31ca at https://pr35697-c5b31ca.ngbuilds.io/. |
Pete and others have already reviewed this. I think we're good! Thanks, George!
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes #35696
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #35696
What is the new behavior?
Style/copy edits to recent PR #33838
Does this PR introduce a breaking change?
Other information