Copilot prompt
Generate JSDoc Comments
Generate complete JSDoc documentation for all functions and classes in a file.
Generate comprehensive JSDoc comments for every exported function, class, and type in this file. ## File to document: ```{{language}} {{code}} ``` ### JSDoc Requirements For every **function/method**, write: ```javascript /** * [One-sentence description of what it does, not how] * * @param {type} paramName - [Description of parameter] * @param {type} [optionalParam] - [Description] (default: [value]) * @returns {type} [Description of return value] * @throws {ErrorType} [When this error is thrown] * * @example * // [Brief usage example showing the most common case] * const result = functionName(param1, param2); * // result => [expected output] */ ``` For every **class**, write: ```javascript /** * [Class description — what it represents and its main purpose] * * @class * @example * const instance = new ClassName(config); * instance.method(); */ ``` For every **TypeScript interface/type**, write: ```typescript /** * [Interface description] * * @interface (or @typedef) * @property {type} propertyName - [Property description] */ ``` ### Quality Rules - First line is always a verb: "Gets", "Creates", "Validates", "Returns", etc. - Describe WHAT it does, not HOW it does it - All parameters documented with accurate types - @throws documented for any functions that can throw - @example shows realistic usage, not trivial examples - For async functions: mention that it returns a Promise in @returns Output the complete file with all comments added.
Fill in: {{language}}, {{code}}. In Loopy you fill these in a form and copy the finished prompt in one click.
More documentation prompts
- GeminiCode Explanation for Non-Technical AudienceTranslate technical code into plain English for product managers, executives, or non-developers.
- CursorProject Rules File SetupGenerate a comprehensive project rules file (such as AGENTS.md) tailored to your specific project stack and conventions.
- ClaudeTechnical Documentation WriterAPI docs, integration guides, and code examples for a technical audience with clear structure and copy-paste examples.

