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
I've been running this, and noticed that when the jsDoc for a function is outdated, then rehearsal will prefer that to the actual usage in the code. Can this be updated to override any existing jsDoc types with the actual type that is used by the code?
Hi @mikrostew Rehearsal prioritized "types from JSDoc" over "types from usage" (in drain mode) to give engineer more flexibility over inferred types. JSDoc allows you to describe more complex types than compiler can detect from usage.
I would recommend to just remove @param / @return from JSDoc and run Rehearsal fix to allow it to infer from usage.
Let's keep this ticket open, will think what we can do.
I've been running this, and noticed that when the jsDoc for a function is outdated, then rehearsal will prefer that to the actual usage in the code. Can this be updated to override any existing jsDoc types with the actual type that is used by the code?
I created #1183 to demonstrate this.
The text was updated successfully, but these errors were encountered: