---
source: lib/src/sdk/typescript/types.rs
expression: client
---
// @generated by usage-cli from test.usage.kdl. Do not edit manually.
import { CliRunner, CliResult } from "./runtime";
import { ToolArgs } from "./types";

export class Tool {
  private runner: CliRunner;

  constructor(binPath?: string) {
    this.runner = new CliRunner(binPath ?? "tool");
  }
  /** [files]… */
  async exec(args: ToolArgs): Promise<CliResult> {
    const cmdArgs: string[] = [];
    if (args.files !== undefined) { cmdArgs.push(...args.files); }
    return this.runner.run(cmdArgs);
  }
}
