Repository navigation
docs(routes): list every ProcessCallback TypeError and describe the decorator target - #105
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Module authors read the TSDoc of
ProcessCallback,SetParameterProviderandAddParameterModifierto learn what the decorators accept and when they fail. Since #67 that TSDoc lagged the code. The@throwsofProcessCallbacknamed only the@Connectioncase.@param target Controller classwas wrong on all three, because the target is the decorated prototype and the code readstarget.constructor.docs/2.controllers.mdandUPGRADING.mdalready describe the behaviour; this brings the published declarations in line. ANT-1812.What changes
ProcessCallbacklists eachTypeErrorit throws: a descriptor with novalue, a classControllerdid not create (a static method lands here, since its target is the class and the constructor isFunction), a symbol key with no location, and@Connectionoutsidewebsocketormonitormode.@param targeton the three functions describes the decorator target as the prototype whose constructor is the controller class.Comment-only. No code, test or emitted JavaScript changes.
Proof
Each documented throw, observed against the built
distwith a probe callingProcessCallbackdirectly (the@Connectioncase is already covered by the suites):antelopejs-comment-proof origin/main:Comment proof: 2 packages, 17 entries unchanged against origin/main (committed HEAD).
Suppressions in authored code files (origin/main and committed HEAD). A lint directive counts once per rule it names;
*is a directive naming none.anti-slop/no-unknown-parameters@ts-expect-error@ts-ignoreSAFETY:commentspnpm run checks: