Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 422 Bytes

enums.md

File metadata and controls

23 lines (14 loc) · 422 Bytes

enums

📝 Avoid using TypeScript's enums.

💡 This rule is manually fixable by editor suggestions.

Enforces that code doesn't use TypeScript's enums:

Invalid Code

enum Values {}

Valid Code

const Value = {} as const;

export type Value = (typeof Value)[keyof typeof Value];