API documentation covers exports
Why it matters
TypeScript types tell consumers what parameters exist; JSDoc tells them what those parameters mean, when to use the function, and what edge cases to watch for. A package with zero API documentation forces every consumer to read your source code or experiment by trial and error. ISO 25010 analysability is the directly impacted quality attribute: the time to understand and correctly use your API is the measure. For SDK packages that wrap external services, undocumented error conditions and edge cases are the primary source of consumer integration bugs.
Severity rationale
Low because missing API docs increase integration time and error rates but do not cause runtime failures — the package functions; it's just harder to use correctly.
Remediation
Add TSDoc comments to every exported function, class, and type. These render automatically in VS Code and other IDEs without any additional tooling.
/**
* Creates a new API client instance.
*
* @param config - Client configuration. `apiKey` is required; `timeout` defaults to 10 000ms.
* @returns A configured client ready to make requests.
* @throws {ApiError} When the server returns a 4xx or 5xx response.
*
* @example
* ```ts
* const client = createClient({ apiKey: 'sk-...' })
* const users = await client.request<User[]>('/users')
* ```
*/
export function createClient(config: ClientConfig): Client {}
At least 80% of public API functions must have JSDoc. For larger packages, generate a docs site: npx typedoc --out docs src/index.ts.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the SDK / Package Quality Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- iso-25010:2011 · maintainability.analysability — Analysability — JSDoc/TSDoc comments expose API intent without reading source
Taxons
History
- 2026-04-18·v1.0.0·Initial import from sdk-package-quality·automated