Inline Edit Prompt

Developer Toolscursor-ai-tipscode_elementprimary_changeerror_scenario

Scopes the inline edit precisely — changes behavior without breaking the interface contract. The 'no any' and 'non-exported helper' rules maintain code quality standards.

Prompt
Refactor this {{code_element}} to:
1. {{primary_change}}
2. Keep the existing public API / function signature unchanged
3. Add proper TypeScript types (no \`any\`)
4. Handle the error case where {{error_scenario}}
5. Add a JSDoc comment explaining the purpose and parameters

Constraints:
- Do not rename the export
- Do not change how this is called from other files
- If you need a helper function, define it in the same file as a non-exported function

Variables to customize

{{code_element}}{{primary_change}}{{error_scenario}}

Why this prompt works

Scopes the inline edit precisely — changes behavior without breaking the interface contract. The 'no any' and 'non-exported helper' rules maintain code quality standards.

What you get when you save this prompt

Your workspace unlocks powerful tools to iterate and improve.

AI OPTIMIZE

AI Optimization

One-click improvement with structure analysis and pattern suggestions.

VERSION DIFF

Version History

Track every edit. Compare versions side-by-side with word-level diffs.

ORGANIZE
Development
Code Review
Testing
Marketing

Folders & Tags

Organize your library with nested folders, tags, and drag-and-drop.

MCP
$ npm i -g @promptingbox/mcp
Claude · Cursor · ChatGPT

Use Everywhere

Access prompts from Claude, Cursor, ChatGPT & more via MCP integration.

Your prompts, organized

Save, version, and access your best prompts across ChatGPT, Claude, Cursor, and more.