Types
This section covers naming for:
interfaceclassenumtypeAlias(type aliases)typeParameter(generics)
Pages:
✅ Good
ts
interface User {
// WHY: PascalCase for interface/type names
id: string;
}
class UserService {} // WHY: PascalCase for classes❌ Bad
ts
interface IUser {
// WHY: leading 'I' prefix is discouraged
id: string;
}
class userService {} // WHY: camelCase for class name is confusing