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
feat(core): add tagsSplitDeduplication option for barrel + shared type extraction
Add a new `tagsSplitDeduplication` output option (default: false) that
extracts shared infrastructure types (e.g. HTTPStatusCode*) emitted by
client header builders into a `common-types.ts` file, then generates a
barrel `index.ts` with named re-exports for public types.
When enabled (with `indexFiles: true`):
- Shared types are collected across all per-tag files and deduplicated
- Extracted to `<commonTypesFileName>.ts` (default: 'common-types')
- Per-tag files import shared types from the common file
- Barrel uses named re-exports for exported types + `export *` for tags
When disabled (default): behavior is identical to before — shared types
are inlined per-tag, no barrel, no extraction.
The header builder API is backward compatible: `ClientHeaderBuilder`
return type widens from `string` to `string | HeaderResult`. Existing
builders returning `string` continue to work unchanged.
Currently only `generateFetchHeader` emits `sharedTypes` (HTTPStatusCode*
family). The extraction mechanism is generic — other header builders can
adopt it incrementally.
Remove stale barrel snapshots from the previous naive implementation
(gated on `indexFiles` alone). The barrel now requires both
`indexFiles` and `tagsSplitDeduplication` to be `true`.
Related design discussion: #3553Closes#3553
0 commit comments