Document a Function or Module
Complete JSDoc or docstrings with precise types, throws, constraints, and a usage example.
Beginner1 min read
Customize
Fill these in and the prompt below updates as you type. Anything you leave blank stays as a placeholder.
Your prompt
1 placeholder leftWrite JSDoc / docstring documentation for the following code. Include: - A one-sentence summary of what it does - @param tags with types and descriptions for every parameter - @returns with type and description - @throws for any errors it can raise - A usage example in @example Be precise about types. If a parameter has constraints (e.g. must be positive, must be ISO 8601), document that. Code: {{code}}