coding · Cursor · free
Add TSDoc comments to this code. Comments should say WHY and WHAT, never restate WHAT the code obviously does. For each exported symbol emit: One sentence summary that would help someone in autocomplete @param only when the type isn't self describing (units, ranges, allowed values, "not null when X") @returns only when the shape or condition isn't obvious @throws for every documented error path @example for anything with more than one plausible call shape @deprecated with the replacement, if applicable @remarks for non obvious behavior, side effects, complexity class DO NOT: Restate the function name in the summary Add @param count The count — that's noise, drop it Comment on obvious param types when TS already tells you Add @author / @version — git owns that Keep comments under 3 lines unless the "why" genuinely needs more. Return the file with comments inline.
#documentation #jsdoc #typescript