Tin

Examples · learn/16-tools · 222 of 339

task-2.solution.tools

examples/learn/16-tools/task-2.solution.tools.tintin run examples/learn/16-tools/task-2.solution.tools.tin
type Priority = | Low | Normal | Urgent

/// Add a todo item.
tool fn addTodo(
  /// What needs doing
  title: string,
  priority: Priority,
  /// Optional due date, as YYYY-MM-DD
  due: Option<string>,
): string => "added {title}"

fn main() {}