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.