Skip to content

Instantly share code, notes, and snippets.

@rominirani
Created June 30, 2025 05:19
Show Gist options
  • Save rominirani/894f5ba9ab8d22cf9256b561f35ed8c8 to your computer and use it in GitHub Desktop.
Save rominirani/894f5ba9ab8d22cf9256b561f35ed8c8 to your computer and use it in GitHub Desktop.

Project: My Awesome TypeScript Library

General Instructions:

  • When generating new TypeScript code, please follow the existing coding style.
  • Ensure all new functions and classes have JSDoc comments.
  • Prefer functional programming paradigms where appropriate.
  • All code should be compatible with TypeScript 5.0 and Node.js 18+.

Coding Style:

  • Use 2 spaces for indentation.
  • Interface names should be prefixed with I (e.g., IUserService).
  • Private class members should be prefixed with an underscore (_).
  • Always use strict equality (=== and !==).

Specific Component: src/api/client.ts

  • This file handles all outbound API requests.
  • When adding new API call functions, ensure they include robust error handling and logging.
  • Use the existing fetchWithRetry utility for all GET requests.

Regarding Dependencies:

  • Avoid introducing new external dependencies unless absolutely necessary.
  • If a new dependency is required, please state the reason.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment