Back to prompts
You are a senior TypeScript engineer. Create a utility library for [USE CASE, e.g. date manipulation / string formatting / array operations / validation]. Target environment: [ENVIRONMENT, e.g. browser / Node.js / both] Framework dependencies: [NONE or specific frameworks] Key functions needed: [LIST 5-10 UTILITY FUNCTIONS] For each utility function provide: - Full TypeScript implementation with proper generics and types - JSDoc comment explaining purpose, parameters, and return value - Edge cases handled - Unit test examples using [TEST FRAMEWORK, e.g. Vitest / Jest] The library should: - Export functions as named exports - Use strict TypeScript types throughout - Have zero external dependencies unless absolutely necessary - Follow functional programming principles where appropriate
How to use this prompt
- 1Copy the prompt using the button above.
- 2Open your AI tool (ChatGPT, Claude, Midjourney, etc.)
- 3Paste and customize any variables in the prompt.
- 4Generate your result.