mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-13 06:43:06 +00:00
fix(C191): tipos JSDoc do delta (parseInput/classifyRelation) para o typecheck
This commit is contained in:
parent
b226ebb88a
commit
386e333916
1 changed files with 7 additions and 1 deletions
|
|
@ -344,6 +344,11 @@ const parseFreeText = (text, { delta = false } = {}) => {
|
|||
return matrixToDataset(matrix, 'txt')
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {{ label: string, value?: number, initial?: number, final?: number }} DatasetRow
|
||||
* @typedef {{ name: string, rows: { label: string, value: number }[] }} DatasetSeries
|
||||
*/
|
||||
|
||||
/**
|
||||
* Parse the raw input into `{ rows, format, issues }`. `buffer` is required for
|
||||
* xlsx/xls; `text` for csv/md/txt. `format` overrides the extension inference.
|
||||
|
|
@ -351,6 +356,7 @@ const parseFreeText = (text, { delta = false } = {}) => {
|
|||
* final, header naming the two periods) instead of the single-measure path.
|
||||
*
|
||||
* @param {{ text?: string | null, buffer?: Buffer | null, format?: string | null, delta?: boolean }} [options]
|
||||
* @returns {{ rows: DatasetRow[], series?: DatasetSeries[], startLabel?: string, endLabel?: string, format: string, issues: string[] }}
|
||||
*/
|
||||
export const parseInput = ({ text = null, buffer = null, format = null, delta = false } = {}) => {
|
||||
if (format === 'xlsx' || format === 'xls') {
|
||||
|
|
@ -379,7 +385,7 @@ export const parseInput = ({ text = null, buffer = null, format = null, delta =
|
|||
* series (few periods as columns, many as a line); anything else is a
|
||||
* ranking/comparison in horizontal bars.
|
||||
*
|
||||
* @param {{ label: string, value: number }[]} rows
|
||||
* @param {DatasetRow[]} rows
|
||||
* @param {string | null} [forcedType]
|
||||
*/
|
||||
export const classifyRelation = (rows, forcedType = null) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue