·method-shorthand-jsdoc
</>

method-shorthand-jsdoc

epicenterhq/epicenter

Move helper functions into return objects using method shorthand for proper JSDoc preservation. Use when factory functions have internal helpers that should expose documentation to consumers, or when hovering over returned methods shows no JSDoc.

9Installs·1Trend·@epicenterhq

Installation

$npx skills add https://github.com/epicenterhq/epicenter --skill method-shorthand-jsdoc

SKILL.md

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.

When you hover over head.getEpoch() in your IDE, you see... nothing. The JSDoc is lost.

Move the helper INTO the return object using method shorthand:

Move helper functions into return objects using method shorthand for proper JSDoc preservation. Use when factory functions have internal helpers that should expose documentation to consumers, or when hovering over returned methods shows no JSDoc. Source: epicenterhq/epicenter.

View raw

Facts (cite-ready)

Stable fields and commands for AI/search citations.

Install command
npx skills add https://github.com/epicenterhq/epicenter --skill method-shorthand-jsdoc
Category
</>Dev Tools
Verified
First Seen
2026-02-01
Updated
2026-02-18

Quick answers

What is method-shorthand-jsdoc?

Move helper functions into return objects using method shorthand for proper JSDoc preservation. Use when factory functions have internal helpers that should expose documentation to consumers, or when hovering over returned methods shows no JSDoc. Source: epicenterhq/epicenter.

How do I install method-shorthand-jsdoc?

Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/epicenterhq/epicenter --skill method-shorthand-jsdoc Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code or Cursor

Where is the source repository?

https://github.com/epicenterhq/epicenter

Details

Category
</>Dev Tools
Source
skills.sh
First Seen
2026-02-01