Found while bringing content/docs/plugins/plugin-calendar.mdx under check:doc-snippet-types (objectui#5174 batch 6, PR to follow). Filed unassigned and not fixed there — that PR's surface is the UNGATED_DOCS ledger plus three doc pages, and packages/* source is out of scope by its dispatch.
What
packages/plugin-calendar/src/ObjectCalendar.tsx declares:
schema: ObjectGridSchema | CalendarSchema;
Neither member admits an object-calendar node:
ObjectGridSchema.type is the literal 'object-grid' (packages/types/dist/objectql.d.ts).CalendarSchema is the form date picker — type: 'calendar', with mode, minDate, maxDate, onChange (packages/types/dist/form.d.ts). It is a different widget entirely.
ObjectCalendarSchema — type: 'object-calendar', objectName, startDateField, endDateField, titleField, defaultView — exists in @object-ui/types and is exported, but this prop does not name it.
Measured
Compiled against the built dist, --strict, through the doc-snippet gate's own program:
[semantic] content/docs/plugins/plugin-calendar.mdx TS2322:
Type '{ objectName: string; calendar: { startDateField: string; titleField: string; }; }'
is not assignable to type 'ObjectGridSchema | CalendarSchema'.
Property 'type' is missing in type '{ ... }' but required in type 'ObjectGridSchema'.
Adding the type the page teaches does not clear it — it moves the diagnostic to
Type '"object-calendar"' is not assignable to type '"object-grid"', because that member is a single literal.
Why this is the declaration's half, not the documentation's
The runtime path is real and is the one the platform itself takes:
packages/plugin-calendar/src/index.tsx registers ObjectCalendarRenderer for object-calendar (and for view:calendar) and renders ObjectCalendar with schema={bound} — the authored object-calendar node. The renderer is typed schema: any, so nothing turns the node away at that boundary.ObjectCalendar.tsx reads objectName (line 120), staticData (113), data (109), filter and sort — and reaches the calendar block through (schema as any).calendar in getCalendarConfig (line 140).
So the component genuinely serves object-calendar nodes and its own reads are spelled as any to get at them. That is the same shape twice ruled on already:
- objectui#5018 —
ObjectMapSchema: "组件 props 类型写的是 ObjectGridSchema,每处 map 读取都走 as any" (closed). - objectui#5903 —
ObjectGanttProps.schema moved from ObjectGridSchema to ObjectGanttSchema, and its docblock records the same reason: "It used to be ObjectGridSchema, and that is why ten genuine reads had to be spelled (schema as any).K".
plugin-calendar is the remaining member of that family.
Cost
A reader following the page's Direct Component Usage section — importing ObjectCalendar and rendering it in their own React tree, which is exactly what that section is for — cannot type-check the schema they were just taught to write. The two escapes are both bad: annotate as ObjectGridSchema (what the page's TypeScript Support section did until this batch corrected it — an annotation that is simply false), or cast, which is the lenient-consumer workaround AGENTS.md refuses.
Because of this, that block ships in the batch-6 PR carrying a FRAGMENT_MARKER declaration naming this gap, rather than a cast. It becomes a compiling block the day the declaration names ObjectCalendarSchema.
Scope note, unmeasured here
Whether ObjectCalendarSchema should also declare calendar (it does not today, so the block lands on BaseSchema's index signature and is unchecked) is a second, related question — ObjectGanttSchema does declare gantt. Recorded, not asserted: that is a separate decision about the authoring surface, not part of repointing this prop.
Related: objectui#5018, objectui#5903, objectui#5784, objectui#5667.
Found while bringing
content/docs/plugins/plugin-calendar.mdxundercheck:doc-snippet-types(objectui#5174 batch 6, PR to follow). Filed unassigned and not fixed there — that PR's surface is theUNGATED_DOCSledger plus three doc pages, andpackages/*source is out of scope by its dispatch.What
packages/plugin-calendar/src/ObjectCalendar.tsxdeclares:Neither member admits an
object-calendarnode:ObjectGridSchema.typeis the literal'object-grid'(packages/types/dist/objectql.d.ts).CalendarSchemais the form date picker —type: 'calendar', withmode,minDate,maxDate,onChange(packages/types/dist/form.d.ts). It is a different widget entirely.ObjectCalendarSchema—type: 'object-calendar',objectName,startDateField,endDateField,titleField,defaultView— exists in@object-ui/typesand is exported, but this prop does not name it.Measured
Compiled against the built
dist,--strict, through the doc-snippet gate's own program:Adding the
typethe page teaches does not clear it — it moves the diagnostic toType '"object-calendar"' is not assignable to type '"object-grid"', because that member is a single literal.Why this is the declaration's half, not the documentation's
The runtime path is real and is the one the platform itself takes:
packages/plugin-calendar/src/index.tsxregistersObjectCalendarRendererforobject-calendar(and forview:calendar) and rendersObjectCalendarwithschema={bound}— the authoredobject-calendarnode. The renderer is typedschema: any, so nothing turns the node away at that boundary.ObjectCalendar.tsxreadsobjectName(line 120),staticData(113),data(109),filterandsort— and reaches thecalendarblock through(schema as any).calendaringetCalendarConfig(line 140).So the component genuinely serves
object-calendarnodes and its own reads are spelledas anyto get at them. That is the same shape twice ruled on already:ObjectMapSchema: "组件 props 类型写的是ObjectGridSchema,每处 map 读取都走as any" (closed).ObjectGanttProps.schemamoved fromObjectGridSchematoObjectGanttSchema, and its docblock records the same reason: "It used to beObjectGridSchema, and that is why ten genuine reads had to be spelled(schema as any).K".plugin-calendar is the remaining member of that family.
Cost
A reader following the page's Direct Component Usage section — importing
ObjectCalendarand rendering it in their own React tree, which is exactly what that section is for — cannot type-check the schema they were just taught to write. The two escapes are both bad: annotate asObjectGridSchema(what the page's TypeScript Support section did until this batch corrected it — an annotation that is simply false), or cast, which is the lenient-consumer workaround AGENTS.md refuses.Because of this, that block ships in the batch-6 PR carrying a
FRAGMENT_MARKERdeclaration naming this gap, rather than a cast. It becomes a compiling block the day the declaration namesObjectCalendarSchema.Scope note, unmeasured here
Whether
ObjectCalendarSchemashould also declarecalendar(it does not today, so the block lands onBaseSchema's index signature and is unchecked) is a second, related question —ObjectGanttSchemadoes declaregantt. Recorded, not asserted: that is a separate decision about the authoring surface, not part of repointing this prop.Related: objectui#5018, objectui#5903, objectui#5784, objectui#5667.