You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and pepper deferred(...) calls around each callback that has an issue.
But the callbacks don't error, subsequent references to a variable error. Users are likely to just cast instead.
If this was behind --strict it would be an easier sell for many many call-sites in an update.
Hard to get a sense without running on bigger codebases.
With this PR, we are generally misunderstanding more code. Doesn't seem to catch as many bugs as we would think. It does error on idiomatic code like doing some async cleanup, but using to a variable afterwards
Swapping the default behavior is quite surprising. It's probably a better default, but is it breaks for the sake of breaks?
What are the conclusions and next steps?
We don't feel comfortable merging for 5.6.
We do want to review the breaks.
Ask for feedback from partner teams - can they adopt this? Are they catching bugs?
The text was updated successfully, but these errors were encountered:
Function Expression Callback Analysis and
deferred
#58729
/** @deferred */
to the Node.js.d.ts
files node: Add deferred tag for ts5.6 DefinitelyTyped/DefinitelyTyped#70084/** @deferred */
incorrectly to paramerters it doesn't really apply to. Silently does nothing.@deferred @param {number} x */
deferred
needs to be added because a function is asynchronously called.deferred
?deferred
had to be sprinkled over so many signatures in Node.js.listener
as a heuristic to figure out where to put it.deferred
the right default?deferred
vs.immediate
.deferred
. Assuming possibly-called favors APIs like this.immediate
might actually be inferrable!deferred
would be the right choice..d.ts
files outside of their control - the only workaround is toupdate the
d.ts
or (very challenging for a lot of devs to be honest) ordefine a function like
and pepper
deferred(...)
calls around each callback that has an issue.--strict
it would be an easier sell for many many call-sites in an update.The text was updated successfully, but these errors were encountered: