feat(types): allow raw_number cells in TableBlock rows #2737

Open
zimeg opened 7:30pm on September 8, 2026 wants to merge 45 Ξ” into slackapi/node-slack-sdk main from
table-raw-number-cell

Summary

The TableBlock interface in @slack/types is missing the raw_number cell type documented at docs.slack.dev/reference/block-kit/blocks/table-block.

Currently rows is typed as (RichTextBlock | RawTextElement)[][] β€” but the docs state that table cells can have a type of rich_text, raw_text, or raw_number.

Feature request

  1. Add RawNumberElement β€” a new composition object type alongside RawTextElement: ts export interface RawNumberElement { type: 'raw_number'; text: string; }

  2. Consider typed models for table cells and column_settings β€” right now column_settings is TableBlockColumnSettings[] (already typed), but the cell union could be more explicit about what each cell type accepts (e.g. rich_text cells have elements, raw_text/raw_number have text).

Reference

  • Table block docs β€” documents raw_number as a valid cell type
  • Current TableBlock definition: packages/types/src/block-kit/blocks.ts
zimeg authored
of work between September 8 and September 9
Diff Delta:
45
About 15 Diff Delta/hour
Classified as:  Feature Add, General

zimeg's Description of Work #2689 TableBlock types: add RawNumberElement and consider typed cell/column_settings models

Summary

This pull request fixes the TableBlock type in @slack/types to allow raw_number cells, which the table-block reference documents but the type omitted.


  • The docs state table cells "can have a type of rich_text, raw_text, or raw_number", but TableBlock.rows was typed (RichTextBlock | RawTextElement)[][] (no raw_number) and its @description said only "raw_text or rich_text".

  • Adds the RawNumberElement composition object (type: 'raw_number', value, text) β€” the same definition introduced by the data_table PR #2638, so the two share one cell element type and whichever lands second drops the duplicate in a trivial merge.

  • Adds RawNumberElement to TableBlock.rows and corrects the @description to match the docs.

  • Adds the first tsd type coverage for TableBlock (all three cell types); TableBlock previously had no type tests.

Closes #2689. A working raw_number-in-table payload is in this Block Kit Builder preview (from the issue).

Requirements <!-- Place an x in each [ ] -->

Building updated commit group diff...
5 total changed files
Loading changes...
Loading changes...
Loading changes...