Preserve TanStack Table v9 inference with createColumnHelper, columns(), tableOptions, tableFeatures, and metaHelper. Load for ColumnDef errors, reusable tables, typed meta, named registries, or unnecessary manual feature generics.
71
88%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
This skill builds on core and table-features. Let the feature object and helpers carry types through userland.
import {
createColumnHelper,
metaHelper,
tableFeatures,
} from '@tanstack/table-core'
type Person = { id: string; age: number }
type ColumnMeta = { align?: 'start' | 'end' }
const features = tableFeatures({ columnMeta: metaHelper<ColumnMeta>() })
const helper = createColumnHelper<typeof features, Person>()
export const columns = helper.columns([
helper.accessor('age', { meta: { align: 'end' } }),
])const columns = helper.columns([
helper.accessor('id', { header: 'ID' }),
helper.accessor('age', { header: 'Age' }),
])columns() preserves each accessor's TValue instead of widening the array.
const defaults = tableOptions<typeof features, Person>({
defaultColumn: { meta: { align: 'start' } },
})Use tableOptions for reusable fragments; direct adapter options are enough for one-offs.
Wrong:
const columns: ColumnDef<typeof features, Person, unknown>[] = [
helper.accessor('age', {}),
]Correct:
const columns = helper.columns([helper.accessor('age', {})])The broad annotation discards the accessor-specific number value type.
Source: docs/guide/helpers.md#createcolumnhelper
Wrong:
type Features = TableFeaturesCorrect:
type Features = typeof featuresThe concrete registry is the source of feature-gated APIs and registry keys.
Source: packages/table-core/src/types/TableFeatures.ts
Wrong:
declare module '@tanstack/table-core' {
interface ColumnMeta<TData, TValue> {
align?: string
}
}Correct:
const features = tableFeatures({
columnMeta: metaHelper<{ align?: 'start' | 'end' }>(),
})V9 type-only feature slots keep meta types scoped to the table factory.
Source: docs/guide/table-and-column-meta.md
Inspect node_modules/@tanstack/table-core/dist/helpers/ and the signatures re-exported by dist/index.d.ts; avoid copying deep internal generic signatures into application code.
9e523bc
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.