method-shorthand-jsdoc

Installation
SKILL.md

Method Shorthand for JSDoc Preservation

When factory functions have helper functions that are only used by returned methods, move them INTO the return object using method shorthand. This ensures JSDoc comments are properly passed through to consumers.

Related Skills: See factory-function-composition for the four-zone factory anatomy and the this decision rule.

The Problem

You write a factory function with a well-documented helper:

function createHeadDoc(options: { workspaceId: string }) {
	const { workspaceId } = options;
Installs
53
GitHub Stars
4.6K
First Seen
Jan 28, 2026
method-shorthand-jsdoc — epicenterhq/epicenter