import type { Ball, Chart, KeyItem, MlbSprayOptions, MlbTotals } from "./charts.types.ts"; /** A ball's type as one of the five words of the chart, from the words of Statcast's `events` (`home_run`, `field_out`) and the usual short forms; any other word is kept, in lower case. */ export declare function ballType(type: string | undefined): string | undefined; /** * A spray chart for baseball from batted-ball data: where each ball came down, on the ballpark of that season (`park` and `year`, past parks * included, each with the fence it had then), each hit type in its own mark (a single a small circle, a double a diamond, a triple a triangle, * a home run a star, an out an open circle), the balls that came down beyond the fence drawn beyond it, and if asked the spray zones (pull, * centre and opposite by infield and outfield, by the side the batter bats from). Balls come as Statcast's `hc_x` and `hc_y` (`mlbam`), as feet * from home plate (`retrosheet`) or as Retrosheet's hit-location codes. * @example * ```ts * import { mlbSprayChart } from "@johnmorrisdotca/kyogijo-stadiums/charts"; * const chart = mlbSprayChart( * [ * { x: 125.4, y: 90, type: "single" }, * { x: 60, y: 60, type: "home_run" }, * { x: 150, y: 120, type: "field_out" }, * { zone: "8D", type: "double" }, * ], * { park: "polo-grounds", year: 1915, bats: "R", zones: true }, * ); * console.log(chart.totals.balls, chart.totals.types["home run"], chart.options.park, chart.options.year); * console.log(chart.draw().includes("Polo Grounds")); * // 4 1 polo-grounds 1915 * // true * ``` */ export declare function mlbSprayChart(balls: readonly Ball[], options?: MlbSprayOptions): Chart & { key: KeyItem[]; };