Skip to content

TableBlock types: add RawNumberElement and consider typed cell/column_settings models #2689

Description

@zimeg

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:

    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

Metadata

Metadata

Assignees

Labels

enhancementM-T: A feature request for new functionalityneeds infoAn issue that is claimed to be a bug and hasn't been reproduced, or otherwise needs more infopkg:typesapplies to `@slack/types`semver:minor

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions