Keep the Cell of a column checked, and let any column be read - #204
Merged
Merged
Conversation
johanrd
marked this pull request as draft
September 23, 2026 11:33
universal-ember#202 makes `CellArgs` default to `any` on `Column` and `Table`, so that a column whose Cell asks for args fits a `Column<DataType>` parameter, which the plugin helpers need. It also stops checking the Cell of every column written by hand. `Column<Person>['Cell']` is `ComponentLike<any>`: it takes any args and requires none, not even `@row` and `@column`. On 4.0.0 it was `ComponentLike<CellContext<T>>`. Both hold if the Cell is read through a type whose `[Invoke]` is a method. TypeScript compares the parameters of a method bivariantly, so such a column fits a parameter that names no args, while the args are still checked where the Cell is rendered. The config keeps `ComponentLike`, so a Cell is still checked against its column's meta. The default goes back to `unknown`. The plugin helpers are untouched. Cowritten by Claude
johanrd
force-pushed
the
any-column-main
branch
from
September 23, 2026 11:46
3ac77a3 to
572c298
Compare
johanrd
marked this pull request as ready for review
September 23, 2026 12:41
NullVoxPopuli
approved these changes
Sep 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#202 defaults
CellArgstoanyso a column with cell args fitsColumn<DataType>, which the plugin helpers need. It also stops checking the Cell of every column written by hand:In
cells-test.gtson main, both@glint-expect-errordirectives report as unused: rendering a Cell with no args at all is no longer an error. Here they are consumed again.Both properties hold if the Cell is read through a type whose
[Invoke]is a method.ComponentLikedeclares it as a property, and the parameters of a property function are contravariant — hence theany. Method parameters are compared bivariantly, so such a column fits a parameter that names no args, while the args are still checked where the Cell is rendered.ColumnConfig.CellkeepsComponentLike, so a Cell is still checked against its column's meta and the table meta. Only the read side,Column.Cell, changes. The default goes back tounknown, the plugin helpers are untouched, andtakesAnyColumn/takesAnyTablepass unchanged.Cowritten by Claude