Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Latest commit

 

History

History
16 lines (11 loc) · 349 Bytes

no-const-enum.md

File metadata and controls

16 lines (11 loc) · 349 Bytes

no-const-enum

Avoid using const enums. These can't be used by JavaScript users or by TypeScript users with --isolatedModules enabled.

Bad:

const enum Bit { Off, On }
export function f(b: Bit): void;

Good:

export function f(b: 0 | 1): void;