You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 18, 2026. It is now read-only.
where daysOfWeek, for instance, is a union of literals type. There may be more than ten literals in this field's type. While I'm providing a meager string when setting this field. So TypeScript (justifiably) complains that string is not compatible with 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat' | 'sun'.
I don't want to provide a full 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat' | 'sun' as a type for every string I use for this field. Especially given how many literals there might be. Having an abstracted type (DayOfWeek) would be perfect for that.
But I realize that it might be hard to implement. Parsing ValueSets, I guess?
So I'm working on translating some string fields from CCDA to FHIR. FHIR type definitions have a form of:
where
daysOfWeek, for instance, is a union of literals type. There may be more than ten literals in this field's type. While I'm providing a meagerstringwhen setting this field. So TypeScript (justifiably) complains thatstringis not compatible with'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat' | 'sun'.I don't want to provide a full
'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat' | 'sun'as a type for every string I use for this field. Especially given how many literals there might be. Having an abstracted type (DayOfWeek) would be perfect for that.But I realize that it might be hard to implement. Parsing ValueSets, I guess?