tsdoc-comments

Document exported TypeScript APIs with TSDoc annotations including @param, @returns, and @template tags.

Updated Jul 17, 2017
One-click install
npx skills add https://github.com/luyi985/lyi-bash --skill tsdoc-comments-luyi985
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tsdoc-comments
Source: https://github.com/luyi985/lyi-bash/tree/main/ai/skills/tsdoc-comments
Command: npx skills add https://github.com/luyi985/lyi-bash --skill tsdoc-comments-luyi985

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TSDoc standardizes TypeScript documentation, ensuring consistent, helpful information for IDE tooltips and generated docs.

Core Features & Use Cases

  • Document public APIs with precise parameter, return, and template documentation.
  • Aid library authors and API designers with clear examples and rationale.
  • Maintain up-to-date docs for TypeScript libraries to improve developer experience.

Quick Start

Document an exported TypeScript API with TSDoc annotations including proper @param, @returns, and @template usage.

Frequently Asked Questions about tsdoc-comments

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I document TypeScript public APIs with TSDoc?

To document TypeScript public APIs with TSDoc, you apply standardized annotations to exported symbols. This involves adding @param, @returns, and @template tags to functions, classes, and generics to ensure consistent IDE tooltips and generated documentation.

What is the best way to standardize TypeScript library documentation?

Standardizing TypeScript library documentation is best achieved by applying TSDoc annotations across all exported symbols. This practice ensures clear parameter, return, and template documentation, significantly improving developer understanding and experience.

When do I need to use TSDoc annotations in my codebase?

You need to use TSDoc annotations when authoring TypeScript libraries or designing public APIs. It is required for documenting exported symbols to provide clear rationale, examples, and parameter information for IDE tooltips and generated docs.

Does TSDoc work with TypeScript generics and template tags?

Yes, TSDoc works with TypeScript generics by utilizing the @template tag. Documenting public APIs with TSDoc requires including @param, @returns, and @template tags to clearly define generic types across functions and classes.

How do I maintain up-to-date docs for a TypeScript library?

To maintain up-to-date docs for a TypeScript library, consistently apply TSDoc annotations to exported symbols. This includes keeping @param, @returns, and @template tags current, and maintaining guidance on examples and caveats to improve developer experience.

Why does my TypeScript library lack consistent IDE tooltips?

Your TypeScript library lacks consistent IDE tooltips if exported symbols are missing standardized TSDoc annotations. Applying proper @param, @returns, and @template tags across public APIs ensures helpful, consistent information displays in IDE environments.