How should we represent enumerated types?
- Dominant language
- TypeScript
- Stars
- 38
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
Stub issue, will fill out more detail as we prioritize.
Quick list of alternatives (probably not exhaustive):
1. TypeScript `enum`. Risky for a variety of reasons, which are [only growing](https://devblogs.microsoft.com/typescript/announcing-typescript-5-8-beta/#the---erasablesyntaxonly-option).
2. Bare union type (e.g. `'foo' | 'bar' | ...`)
3. Something `enum`-like, derived from plain JavaScript values ([some examples](https://github.com/getodk/web-forms/pull/288#discussion_r1931023931))
4. ?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the four representation alternatives in the issue, including the linked TypeScript 5.8 note and the examples in pull request #288. Compare their implications for this project and record a decided approach with enough detail to guide later implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100