swe-programming-typescriptlisted
Install: claude install-skill wahidyankf/ose-primer
# TypeScript Coding Standards
## Purpose
Progressive disclosure of TypeScript coding standards for agents writing TypeScript code.
**Authoritative Source**: [docs/explanation/software-engineering/programming-languages/typescript/README.md](../../../docs/explanation/software-engineering/programming-languages/typescript/README.md)
**Usage**: Auto-loaded for agents when writing TypeScript code. Provides quick reference to idioms, best practices, and antipatterns.
## Quick Standards Reference
### Naming Conventions
**Types and Interfaces**: PascalCase
- Types: `UserAccount`, `PaymentDetails`
- Interfaces: `IPaymentProcessor` or `PaymentProcessor` (no prefix preferred)
- Type aliases: `type UserId = string`
**Functions and Variables**: camelCase
- Functions: `calculateTotal()`, `findUserById()`
- Variables: `userName`, `totalAmount`
- Constants: `UPPER_SNAKE_CASE` (`MAX_RETRIES`, `API_ENDPOINT`)
**Files**: kebab-case
- `user-account.ts`, `payment-processor.ts`
### Modern TypeScript Features
**Type Inference**: Let TypeScript infer when obvious
```typescript
const name = "John"; // string inferred
const count = 42; // number inferred
```
**Union Types**: Use for multiple possible types
```typescript
type Result = Success | Error;
type Status = "pending" | "completed" | "failed";
```
**Type Guards**: Use for type narrowing
```typescript
function isString(value: unknown): value is string {
return typeof value === "string";
}
```
**Generics**: Use for reusable ty