v0.0.10
Features
TypeSchema: Auto-collect extension dependencies during tree shake (#103)
- Extension definitions used by profiles are now included automatically — no need to list them manually in tree shake config
- Add
ignoreExtensionstree shake rule for excluding specific extensions by canonical URL
TypeSchema/TS: Choice type narrowing and validation for profiles (#105)
- Restrict
ChoiceFieldDeclaration.choicesto only the variants declared by the most derived constraint - Emit
validateExcludedfor disallowed choice variants in profile validation (e.g. body weight only permitsvalueQuantity, 10 others are excluded)
TypeSchema/API: Collision resolution config (#106)
- When multiple FHIR schemas produce a binding enum with the same name (e.g.
ObservationCategoryfromObservationandDiagnosticReport), the generator must pick one — previously it auto-selected the most common source and emitted a warning - Add
resolveCollisionsoption to.typeSchema()for explicit control over which source wins - IR report now shows
(selected)/(auto)marks and suggests config snippets for unresolved collisions
TS: Type discriminator support for slicing (#108)
- Support
typediscriminator in slicing — match slices byresourceTypefield - Generate typed getters/setters for type-discriminated slices (e.g.
getPatientEntry()/setPatientEntry()) - Example: Bundle Profile SD, profile-typed-bundle.test.ts.
TS: Generic type-family fields (#109)
- Emit generic type parameters for fields typed as a resource base type (
Resource,DomainResource) BundleEntry<T extends Resource = Resource>,DomainResource<T>— unparameterized usage is unchanged- Profile slices use narrowed generics:
BundleEntry<Patient>,BundleEntry<Organization>
TypeSchema refactoring
- Renames (#114, #117):
RegularTypeSchema→SpecializationTypeSchemaIdentifier→TypeIdentifierNestedTypeSchema→NestedType
- Remove generated profile override interface (#104)
- Narrow
FieldSlicingdiscriminator type fromstringto literal union (#110) - Add
typeFamily.complexTypes, removeresourceChildren(#111) - Make
SpecializationTypeSchemaa discriminated union:ResourceTypeSchema | ComplexTypeTypeSchema | LogicalTypeSchema(#113) - Split
resolveintoresolve(Identifier)andresolveType(TypeIdentifier)(#113) - Split dependency types:
Identifier[]for specializations,TypeIdentifier[]for profiles (#118)
Maintenance
Full Changelog: v0.0.9...v0.0.10