Repository navigation
docs: add JSDoc to all exported functions in src/ - #464
Draft
quantcode-agent[bot] wants to merge 1 commit into
Draft
quantcode-agent[bot] wants to merge 1 commit into
quantcode-agent[bot] wants to merge 1 commit into
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.
Summary
Adds JSDoc comments (description,
@paramfor every parameter,@returns, and@throwswhere the function actually throws) to every exported function undersrc/. Comment-only change — no behaviour, signature, or export changes. Nothing outsidesrc/touched.Files changed
src/calculator.ts—add,subtract,multiply,divide(documents thatdividereturnsInfinity/NaNon zero rather than throwing)src/string-utils.ts—capitalize,reverse,truncate(@throws— currently a "not implemented" stub),slugify,wordCountsrc/task-manager.ts—TaskManagerclass plus public methodsadd,get,list,complete,remove,update,sortBy(remove/update/sortByget@throws— "not implemented" stubs)src/date-utils.ts—formatRelative,isSameDay(existing one-line summary reworded to mention local time),addDayssrc/validator.ts—isEmail,isUrl,isUsername,isAustralianPhoneAssumptions
TaskManagerclass were treated as exported functions and documented.Priority,Status,Task) are not functions and were left undocumented.BUG/TODOcomments (left untouched).Verification
bun test: 44 pass / 16 fail — identical before and after this change (failures are pre-existing stubs/bugs).git diffconfirmed comment-only; reviewed (no critical/high issues; two minor wording inaccuracies fixed and re-reviewed).