Found while implementing #6004. Filed unassigned. Observational — recording a hole one level above the one #6004 closed, not proposing a change.
Measured (at 129c7a9e7)
#6004 typed what generateColumns() emits. But the object that emit is handed to is itself untyped — packages/plugin-grid/src/ObjectGrid.tsx:3210:
constdataTableSchema: any={type: 'data-table',caption: schema.label||schema.title,columns: orderedColumns,
data,
...
};@object-ui/types declares DataTableSchema (packages/types/src/data-display.ts:562, columns: TableColumn[]), and ObjectGrid.tsx:25 already imports it — it is simply never used as this object's annotation. So the ~30 keys assembled here (pagination, manualPagination, rowCount, frozenColumns, renderCellEditor, onRowSave, …) are checked against nothing, and neither is the columns slot itself.
The related cast two hops later, :3268:
columns: (dataTableSchema.columnsasany[]).map((c: any)=>({ … })),exists only because the surrounding value is any.
Why it is worth recording separately
#6004 made the PRODUCER's output type real; this is the SLOT it fills. Typing the emit and leaving the receiver any still leaves the two sides unable to disagree out loud — the emit type is enforced only up to orderedColumns, and this line is where that enforcement stops. It is the same declared != enforced family (#5453, #6373, #6424, #6425), one level up: a declared interface exists, is imported, and is not applied.
Deliberately not folded into #6004: that card's fence was generateColumns() and its call sites, and this annotation would surface a different key census — the schema-level keys, not the column-level ones — including several the grid passes that DataTableSchema may not declare (renderCellEditor, singleClickEdit, selectionResetKey, disableInnerScroll, borderless). That triage is the substance, so it needs sizing rather than a one-line annotation.
⚠️ Sizing note, measured on #6004: at this seam a bare annotation is likely to be inert for the same reason it was there — TypeScript's excess-property check is a freshness check, and several of these values arrive through spreads (buildGroupTableSchema does { ...dataTableSchema, … }). Whoever takes this should measure before assuming an annotation enforces anything; see the docblock above GridColumnDraft in ObjectGrid.tsx for the method.
Related
Generated by Claude Code
Generated by Claude Code
Found while implementing #6004. Filed unassigned. Observational — recording a hole one level above the one #6004 closed, not proposing a change.
Measured (at
129c7a9e7)#6004 typed what
generateColumns()emits. But the object that emit is handed to is itself untyped —packages/plugin-grid/src/ObjectGrid.tsx:3210:@object-ui/typesdeclaresDataTableSchema(packages/types/src/data-display.ts:562,columns: TableColumn[]), andObjectGrid.tsx:25already imports it — it is simply never used as this object's annotation. So the ~30 keys assembled here (pagination,manualPagination,rowCount,frozenColumns,renderCellEditor,onRowSave, …) are checked against nothing, and neither is thecolumnsslot itself.The related cast two hops later,
:3268:exists only because the surrounding value is
any.Why it is worth recording separately
#6004 made the PRODUCER's output type real; this is the SLOT it fills. Typing the emit and leaving the receiver
anystill leaves the two sides unable to disagree out loud — the emit type is enforced only up toorderedColumns, and this line is where that enforcement stops. It is the samedeclared != enforcedfamily (#5453, #6373, #6424, #6425), one level up: a declared interface exists, is imported, and is not applied.Deliberately not folded into #6004: that card's fence was
generateColumns()and its call sites, and this annotation would surface a different key census — the schema-level keys, not the column-level ones — including several the grid passes thatDataTableSchemamay not declare (renderCellEditor,singleClickEdit,selectionResetKey,disableInnerScroll,borderless). That triage is the substance, so it needs sizing rather than a one-line annotation.buildGroupTableSchemadoes{ ...dataTableSchema, … }). Whoever takes this should measure before assuming an annotation enforces anything; see the docblock aboveGridColumnDraftinObjectGrid.tsxfor the method.Related
generateColumns()is untyped (any[]), so nothing type-checks what it writes intoDataTableSchema.columns: TableColumn[]— the hole that hid #5853 and #5453 #6004 — the producer half, now typed (this is the receiver half)data-tablereads two column keysTableColumndoes not declare —headerIconandfitContent#6424 —headerIcon/fitContent: keysdata-tablereads thatTableColumndoes not declareplugin-dashboard's producerGenerated by Claude Code
Generated by Claude Code