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

Pull Request Overview

  • Opened on September 9, 2026
  • Status Open
  • Commit count 7 with first commit September 9, 2026

Total Delta

45 Total Diff Delta

Open Days

Open 8 weekdays

Test Delta

27 Diff Delta in Test Files
Breakdown by Phase

How long has this pull request spent in each phase of its lifecycle?

Fraction of total time Business days Phase
N/A 24.0 days Issue creation to work beginning
 
0.0 days Authoring 1 commit before pull request opened for review
 
0.0 days Awaiting first review
 
8.0 days Revising work with 6 commits in response to 0 reviews that left 4 comments

Total time for pull request still awaiting merge (longer than repo's target): 8.0 business days

Author avatar

feat(types): allow raw_number cells in TableBlock rows

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 [ ] -->

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

Comments Threads Pending Resolution

Resolved Comment Threads

No resolved comments have been left on this PR.