UNPKG

sound-visualizer

Version:
15 lines (13 loc) 534 B
/** * Transforms the `lineWidth` option passed into a visualizer function * into a useable numeric value. * * @pure this function is deterministic and does not mutate state. * * @param lineWidth the option to transfrom * @param canvasWidth the width of the canvas; used to determine a value relative to the canvas when a thickness string is passed. * * @returns a numeric value **/ declare function widthFromOption(lineWidth: number | "thin" | "default" | "thick", canvasWidth: number): number; export { widthFromOption };