Commit 3b1fceb
committed
ref: drop isWithMetaField; inline isResourceIdentifier(base)
In FHIR only resources carry `meta`, so the hierarchy walk in
isWithMetaField is equivalent to `isResourceIdentifier(profile.base)`.
Inlining the check removes a redundant index helper and simplifies a
couple of writer conditions.
- Remove isWithMetaField from TypeSchemaIndex (interface, implementation,
return-object key).
- Inline isResourceIdentifier(flatProfile.base) at both call sites.
- Simplify canEmitIs from `(hasMeta && isResourceIdentifier(base)) ||
base.name === "Extension"` to `hasMeta || base.name === "Extension"`,
and the nested branch from `hasMeta && isResourceIdentifier(base)` to
just `hasMeta`.
- Drop now-unused tsIndex params from generateProfileHelpersImport and
generateFactoryMethods.
- Remove stale entry from docs/guides/typeschema-index.md.1 parent de66f19 commit 3b1fceb
3 files changed
Lines changed: 7 additions & 27 deletions
File tree
- docs/guides
- src
- api/writer-generator/typescript
- typeschema
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | 118 | | |
122 | 119 | | |
123 | 120 | | |
| |||
172 | 169 | | |
173 | 170 | | |
174 | 171 | | |
175 | | - | |
176 | 172 | | |
177 | 173 | | |
178 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
230 | 229 | | |
231 | 230 | | |
232 | 231 | | |
233 | 232 | | |
234 | 233 | | |
235 | | - | |
| 234 | + | |
236 | 235 | | |
237 | 236 | | |
238 | 237 | | |
| |||
356 | 355 | | |
357 | 356 | | |
358 | 357 | | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
| 358 | + | |
365 | 359 | | |
366 | 360 | | |
367 | | - | |
| 361 | + | |
368 | 362 | | |
369 | 363 | | |
370 | 364 | | |
| |||
391 | 385 | | |
392 | 386 | | |
393 | 387 | | |
394 | | - | |
| 388 | + | |
395 | 389 | | |
396 | 390 | | |
397 | 391 | | |
398 | | - | |
| 392 | + | |
399 | 393 | | |
400 | 394 | | |
401 | 395 | | |
| |||
754 | 748 | | |
755 | 749 | | |
756 | 750 | | |
757 | | - | |
| 751 | + | |
758 | 752 | | |
759 | 753 | | |
760 | 754 | | |
| |||
768 | 762 | | |
769 | 763 | | |
770 | 764 | | |
771 | | - | |
| 765 | + | |
772 | 766 | | |
773 | 767 | | |
774 | 768 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
317 | | - | |
318 | 317 | | |
319 | 318 | | |
320 | 319 | | |
| |||
573 | 572 | | |
574 | 573 | | |
575 | 574 | | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | 575 | | |
585 | 576 | | |
586 | 577 | | |
| |||
626 | 617 | | |
627 | 618 | | |
628 | 619 | | |
629 | | - | |
630 | 620 | | |
631 | 621 | | |
632 | 622 | | |
| |||
0 commit comments