typescript-enums
Science Score: 31.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (6.8%) to scientific vocabulary
Last synced: 10 months ago
·
JSON representation
·
Repository
Basic Info
- Host: GitHub
- Owner: scottwillmoore
- License: mit
- Language: TypeScript
- Default Branch: main
- Size: 10.7 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Created almost 3 years ago
· Last pushed almost 3 years ago
Metadata Files
Readme
License
Citation
README.md
TypeScript enums
A comprehensive analysis on whether TypeScript enums are good or bad... What are the alternatives that we can use? What are the considerations that we should take into account?
Alternatives
- Enums
- Const enums
- Numeric vs. string literals
- Union types
- Object as const
Considerations
- Bundle sizes
- Compilation performance
- Exhaustiveness
- Extending
- Philosophy ("not a type-level extension of JavaScript")
- Intellisense
- Isolated modules
- Iterating
- Performance
- Refactoring
- Renaming
- Type safety
References
Enums
- https://www.typescriptlang.org/docs/handbook/enums.html
- https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-0.html#all-enums-are-union-enums
Enums and unions
- https://blog.graphqleditor.com/enums-are-still-bad
- https://blog.logrocket.com/typescript-enums-vs-types/
- https://brockherion.dev/blog/posts/enums-vs-typed-strings-in-typescript/
- https://javascript.plainenglish.io/union-types-vs-enums-in-typescript-a43c2c01c5fa
- https://marketsplash.com/tutorials/typescript/typescript-enum-vs-type/
- https://medium.com/totally-typescript/why-typescript-enums-are-terrible-but-union-types-are-great-83324f571eba
- https://stackoverflow.com/questions/40275832/typescript-has-unions-so-are-enums-redundant
- https://www.bam.tech/en/article/should-you-use-enums-or-union-types-in-typescript
- https://www.youtube.com/watch?v=jjMbPt_H3RQ
Nominal types
- https://typescript.tv/best-practices/improve-your-type-safety-with-branded-types/
- https://medium.com/@KevinBGreene/surviving-the-typescript-ecosystem-branding-and-type-tagging-6cf6e516523d
- https://basarat.gitbook.io/typescript/main-1/nominaltyping
Reference management
- https://www.zotero.org/
- https://libguides.navitas.com/reference-management/comparison
- https://www.mendeley.com/reference-management/reference-manager
- https://endnote.com/
- https://stackoverflow.com/questions/26587527/cite-a-paper-using-github-markdown-syntax
- https://github.blog/2021-08-19-enhanced-support-citations-github/
- https://github.com/JabRef/jabref
- https://pandoc.org/chunkedhtml-demo/8.20-citation-syntax.html
Type aliases
- https://github.com/microsoft/TypeScript/issues/35654
- https://github.com/microsoft/TypeScript/pull/42149
- https://github.com/microsoft/TypeScript/issues/45954
- https://stackoverflow.com/questions/70731343/is-there-a-way-to-prevent-to-expand-type-in-typescript
- https://stackoverflow.com/questions/57683303/how-can-i-see-the-full-expanded-contract-of-a-typescript-type
- https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#differences-between-type-aliases-and-interfaces
Owner
- Name: Scott Moore
- Login: scottwillmoore
- Kind: user
- Location: Melbourne, Australia
- Company: Blackmagic Design
- Website: https://scottwillmoore.au
- Repositories: 35
- Profile: https://github.com/scottwillmoore
I'm enraptured by mathematics, electronics, and software development. In my free time I love to ski!
Citation (citations/bibliography.bib)
@book{texbook,
author = {Donald E. Knuth},
year = {1986},
title = {The {\TeX} Book},
publisher = {Addison-Wesley Professional}
}