I am having a function that accepts one string parameter. This parameter can have only one of a few defined possible values. What is the best way to document the same? Shoul
What about:
/** * @typedef {"keyvalue" | "bar" | "timeseries" | "pie" | "table"} MetricFormat */ /** * @param format {MetricFormat} */ export function fetchMetric(format) { return fetch(`/matric}`, format); }