Skip to content
masterclassBuddyTech Buzz5 fresh blogs · 5:00 AM IST

TanStack · Type Alias

Column

Column is TanStack Table's feature-aware column type. It combines the core column contract with members derived from enabled features and is parameterized by features, row data, and cell-value type.

How it works

Column combines the core column shape with the feature-specific types selected by TFeatures. TData identifies the row model, while TValue describes the value produced by the column and defaults to unknown when omitted.

Syntax

type Column<TFeatures, TData, TValue> = Column_Core<TFeatures, TData, TValue> & ExtractFeatureMapTypes<TFeatures, Column_FeatureMap<TFeatures, TData>>;

Parameters

NameTypeDescription
TFeaturesTFeatures extends TableFeaturesEnabled table features used to derive feature-specific column types; must extend TableFeatures.
TDataTData extends RowDataThe table's row-data type; must extend RowData.
TValueTValue = unknownThe value type represented by the column; defaults to unknown.

Returns

A type combining Column_Core<TFeatures, TData, TValue> with the feature-specific types extracted from Column_FeatureMap<TFeatures, TData>.

Key points

  • Column starts with the core column contract and then augments it with feature-dependent members.
  • The intersection adds types computed from the selected table features and row-data model.
  • The feature generic is restricted to the library's TableFeatures shape.
  • The row generic must satisfy TanStack Table's RowData constraint.
  • The alias is defined in the library's types/Column.ts source file.

Example: Typing a user-name column

import type { Column, RowData, TableFeatures } from '@tanstack/table-core'

type User = { name: string; age: number }
type Features = TableFeatures

type UserNameColumn = Column<Features, User, string>

This declares a column type for User rows whose cell values are strings.

When to use it

Represent a concrete column for a specific row model

Typing table internals

Specify string, number, or another precise TValue for column operations

Type-safe cell values

Expose members contributed by the table features enabled for a table

Feature-aware APIs

Interview questions

QWhat does the Column type alias represent?

Column is a generic type alias that combines Column_Core with the feature-derived types from ExtractFeatureMapTypes. Its three parameters describe enabled features, row data, and column values.

Follow-up: How would you preserve value safety for a numeric column? Use Column<Features, Row, number> rather than relying on the unknown default.

QWhat are Column's generic parameters and constraints?

TFeatures must extend TableFeatures, and TData must extend RowData. TValue is optional and defaults to unknown.

Follow-up: Why constrain TData to RowData? The alias follows the table library's row-data contract instead of accepting an unconstrained type.

QHow does Column incorporate table features?

The alias is defined as Column_Core<TFeatures, TData, TValue> intersected with ExtractFeatureMapTypes<TFeatures, Column_FeatureMap<TFeatures, TData>>. This adds feature-specific column members to the core column contract.

Follow-up: What changes when features differ? The extracted feature map changes the additional members available on the resulting column type.

  • Column_Core
  • Column_FeatureMap
  • ColumnDef
  • RowData
  • TableFeatures

Source: Column | TanStack Table Docs. Checked 2026-10-16.