All files / src/sections roadmap.ts

100% Statements 25/25
100% Branches 5/5
100% Functions 3/3
100% Lines 25/25

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 261x 1x 1x 1x 1x 1x 1x 1x 1x 1x 6x 6x 6x 6x 6x 6x 1x 1x 5x 5x 1x 1x 1x 6x 6x  
import { type ListOptions, ListSection } from './list-section.js';
 
interface RoadmapItem {
  text: string;
}
 
export interface RoadmapOptions extends Partial<ListOptions<RoadmapItem>> {}
 
export class Roadmap extends ListSection<RoadmapItem> {
  constructor(options?: RoadmapOptions) {
    super({
      title: options?.title ?? 'Roadmap',
      type: 'Unordered',
      ...options,
    });
  }
 
  protected itemMapper(item: RoadmapItem): string {
    return item.text;
  }
}
 
export function roadmapSection(options?: RoadmapOptions) {
  return new Roadmap(options);
}