Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

476 B
Raw Blame
import type { Label } from "../api/labels.js";

export type LabelJson = {
  readonly id: string;
  readonly name: string;
  readonly color: string;
};

export type TaskLabelJson = {
  readonly name: string;
  readonly color: string;
};

export function toLabelJson(label: Label): LabelJson {
  return { id: label.id, name: label.name, color: label.color };
}

export function toTaskLabelJson(label: Label): TaskLabelJson {
  return { name: label.name, color: label.color };
}