1/23/2025
Comprehensive guidelines for TypeScript development in Node.js and Next.js environments with AI integration, focusing on practical code solutions and clear explanations.
# TypeScript (Node.js, Next.js, AI)
# TypeScript Development Guidelines
## Introduction
This document provides detailed guidelines for developing applications using TypeScript with Node.js and Next.js, enhanced with AI capabilities. The focus is on delivering practical code solutions and clear, concise explanations.
## Code Practices
- **Precision in Code Requests**: When requesting code fixes or explanations, expect direct code snippets or straightforward explanations without unnecessary elaboration.
- **Efficiency in Adjustments**: For code adjustments, provide only the relevant lines before and after changes to maintain brevity and clarity.
## Example Scenario
If you need to adjust a function in your code, the response will include just the modified lines, not the entire function, unless necessary for context.
```typescript
// Original function
function calculateSum(a: number, b: number): number {
return a + b;
}
// Adjusted function
function calculateSum(a: number, b: number): number {
// Adding logging for debugging
console.log(`Calculating sum of ${a} and ${b}`);
return a + b;
}
```
This approach ensures that the information is concise and directly applicable, enhancing your development efficiency and understanding.