Skip to content

Commit 7880092

Browse files
committed
update docusaurus
1 parent 2fc0fe5 commit 7880092

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

website/src/pages/index.mdx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -700,12 +700,8 @@ Examples:
700700
701701
Const assertions must be used over enums.
702702
703-
While enums can still fulfill similar use cases as const assertions, we tend to avoid using them.
704-
The TypeScript documentation highlights several reasons into the limitations and potential issues with enums, such as:
705-
706-
- [Const enum pitfalls](https://www.typescriptlang.org/docs/handbook/enums.html#const-enum-pitfalls)
707-
- [Objects vs Enums](https://www.typescriptlang.org/docs/handbook/enums.html#objects-vs-enums)
708-
- [Reverse mappings](https://www.typescriptlang.org/docs/handbook/enums.html#reverse-mappings)
703+
Enums are generally discouraged in the TypeScript ecosystem due to their runtime cost and quirks.
704+
The TypeScript documentation outlines several [pitfalls](https://www.typescriptlang.org/docs/handbook/enums.html#const-enum-pitfalls), and recently introduced the [--erasableSyntaxOnly](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-8.html#the---erasablesyntaxonly-option) flag to disable runtime-generating features like enums altogether.
709705
710706
<Rule href="https://eslint.org/docs/latest/rules/no-restricted-syntax">{`'no-restricted-syntax': [
711707
'error',

0 commit comments

Comments
 (0)