Skip to content

Commit f3d1dce

Browse files
committed
chore(changeset): declare the AnyComponentSchema emit-headroom change (objectui#11573)
Claude-Session: https://claude.ai/code/session_01CPvhwGcirXqBGEdPSb72TZ Co-authored-by: Claude <noreply@anthropic.com>
1 parent 3b4f156 commit f3d1dce

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
'@object-ui/types': patch
3+
---
4+
5+
fix(types): `AnyComponentSchema`'s declaration prints every category union by name, so `@object-ui/types` no longer sits at the edge of TypeScript's serialization ceiling (objectui#11573)
6+
7+
`tsc` prints an inferred type in full wherever a declaration uses it, and past
8+
its serialization ceiling it refuses with TS7056 ("The inferred type of this
9+
node exceeds the maximum length the compiler will serialize"). `@object-ui/types`
10+
then emits no declarations, and every consumer of `@object-ui/types/zod` fails
11+
with TS7016. `AnyComponentSchema` listed every category union inline, so its
12+
declaration printed the sum of all of them: measured with TypeScript's own
13+
counter, it read under one percent short of the ceiling against
14+
`@objectstack/spec` built from objectstack `main`, and the Spec Main Shape Gate
15+
had already gone red on it once.
16+
17+
Each of the sixteen category unions `AnyComponentSchema` lists now has a named
18+
type in its own module — an interface that extends the union's inferred type
19+
and adds no member (`LayoutZodType`, `PublicBlockComponentZodType` and their
20+
siblings) — and `AnyComponentSchema`'s declaration prints a reference to each
21+
instead of its body.
22+
23+
What changes for a consumer is the printed `.d.ts` TEXT of existing exports,
24+
and nothing else: `AnyComponentSchema` and the sixteen unions are the same
25+
values, and every type read through `z.input` / `z.output` is unchanged. The
26+
new names are exported from their own modules, which is what lets the
27+
declaration reference them; they are not added to the `@object-ui/types/zod`
28+
entry, so nothing new is importable.
29+
30+
`packages/types/src/__tests__/any-component-emit-headroom-11573.test.ts` reads
31+
the declaration's size with the compiler's own counter, fails when it crosses a
32+
tenth of the ceiling below it, and lists every member as named or inline.

0 commit comments

Comments
 (0)