Open ahejlsberg opened 1 month ago
Thanks for the PR!
This section of the codebase is owned by @saschanaz - if they write a comment saying "LGTM" then it will be merged.
You also need to npm run build && npm run baseline-accept
.
(Looks good. feel free to merge when the TS PR is ready)
One question, why not use (Edit: Oh, for backward compat, cool.)deferred
modifier when we are using TypeScript here?
And another question, is it the requirement here for the callback to be called asynchronously? What happens if those callbacks can be called both sync/async?
And another question, is it the requirement here for the callback to be called asynchronously?
The deferred
modifier (and the /** @deferred */
JSDoc comment) asserts that the callback is never called synchronously. If a synchronous call is a possibility, then the parameter shouldn't have the modifier.
BTW, I haven't been able to find any authoritative documentation on sync vs. async for the various DOM callbacks, so it could well be that some of the modifiers shouldn't be present.
This PR adds
/** @deferred */
comments to deferred callback parameters in preparation for https://github.com/microsoft/TypeScript/pull/58729.