CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-slack--types

Comprehensive TypeScript type definitions for building Slack applications and integrations with the Node Slack SDK

94

1.11x
Overview
Eval results
Files

task.mdevals/scenario-7/

Task Assignment Collector

Build a utility module for creating an interactive task assignment interface in Slack messages. The module should allow users to select multiple team members from a predefined list to assign them to a task.

Requirements

Input Structure

The module should accept:

  • A list of team member options, where each option has:
    • A display label (the team member's name)
    • A unique identifier value
    • Optional description text
  • An optional list of pre-selected team members (by their identifier values)
  • A unique action identifier for tracking interactions
  • Optional confirmation prompt configuration

Output Structure

The module should return a properly typed interactive element structure that:

  • Allows multiple selections from the team member list
  • Pre-selects any initially assigned team members
  • Triggers a confirmation dialog before finalizing the selection (if confirmation is configured)
  • Can receive focus when the interface loads (if specified)
  • Includes all necessary type information for Slack's Block Kit framework

Behavior

  • All team member options must be provided upfront (no dynamic loading)
  • Users can select zero or more team members
  • Pre-selected team members should be visually indicated in the interface
  • The action identifier must be included for event tracking

Test Cases

  • It creates a basic team member selector with three options and no pre-selection @test
  • It creates a selector with two pre-selected team members from a list of five @test
  • It creates a selector with a confirmation dialog that asks "Assign these members to the task?" @test
  • It creates a focused selector that receives input focus on load @test

@generates

API

export interface TeamMemberOption {
  label: string;
  value: string;
  description?: string;
}

export interface ConfirmationConfig {
  title: string;
  text: string;
  confirmText: string;
  denyText: string;
}

export interface TaskAssignmentCollectorConfig {
  actionId: string;
  teamMembers: TeamMemberOption[];
  preSelectedValues?: string[];
  confirmation?: ConfirmationConfig;
  autoFocus?: boolean;
}

export function createTaskAssignmentCollector(config: TaskAssignmentCollectorConfig): any;

Dependencies { .dependencies }

@slack/types { .dependency }

Provides Slack Block Kit type definitions for interactive elements.

Install with Tessl CLI

npx tessl i tessl/npm-slack--types

tile.json