Capability presets
Capability flags declare which optional Slack block types the destination
surface supports. They are consumed through the capabilities and
capabilityOverrides options of convert();
this page documents the underlying exports. For guidance on choosing a
profile, see Slack compatibility.
CapabilityFlags
interface CapabilityFlags {
readonly markdownBlock: boolean;
readonly tableBlock: boolean;
readonly preformattedLanguage: boolean;
readonly headerLevel: boolean;
readonly dataTable: boolean;
readonly dataVisualization: boolean;
readonly containerBlock: boolean;
}| Flag | Gates |
|---|---|
markdownBlock | markdown blocks: task-list checkboxes, wide-table fallback, markdown-block strategy |
tableBlock | Native table blocks |
preformattedLanguage | language field on code blocks (syntax highlighting) |
headerLevel | level field on header blocks |
dataTable | Paginated data_table blocks for large tables |
dataVisualization | Native chart blocks from mermaid fences |
containerBlock | Collapsible container blocks from <details> HTML |
CAPABILITY_PRESETS
A frozen map of preset name → full CapabilityFlags. Presets are cumulative
and keyed to Slack changelog dates:
| Preset | markdownBlock | tableBlock | preformattedLanguage | headerLevel | dataTable | dataVisualization | containerBlock |
|---|---|---|---|---|---|---|---|
conservative | — | — | — | — | — | — | — |
2025-02 | ✓ | — | — | — | — | — | — |
2025-08 | ✓ | ✓ | — | — | — | — | — |
2026-03 | ✓ | ✓ | ✓ | ✓ | — | — | — |
2026-05 | ✓ | ✓ | ✓ | ✓ | ✓ | — | — |
2026-06 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
latest | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
CapabilityPresetName is the union of the names above, also available as a
runtime constant object:
import { CAPABILITY_PRESETS, CapabilityPresetName } from "slackmark";
CAPABILITY_PRESETS[CapabilityPresetName.Conservative]; // all flags falseresolveCapabilities()
function resolveCapabilities(
input: CapabilityPresetName | CapabilityFlags | CapabilityFlagsPartial | undefined,
overrides?: CapabilityFlagsPartial,
): CapabilityFlags;The same resolution convert() applies internally, exported for code that
needs the effective flags:
undefined→latest.- A preset name → that preset. Unknown names throw
ConfigurationError(a typo must not silently enable every capability). - A full flags object → used as-is.
- A partial flags object → merged over
latest. overrides→ merged over the resolved base, flag by flag.
The result is a frozen object.
import { resolveCapabilities } from "slackmark";
const flags = resolveCapabilities("2025-08", { markdownBlock: false });
// { markdownBlock: false, tableBlock: true, ...rest false }