@report-toolkit/transformers
Version:
See docs at [https://ibm.github.io/report-toolkit](https://ibm.github.io/report-toolkit)
35 lines (34 loc) • 1.02 kB
TypeScript
/**
* @type {TransformerMeta}
*/
export const meta: TransformerMeta;
/**
* CSV transformer; accepts whatever json2csv can handle
* @see https://npm.im/json2csv
* @param {CSVTransformOptions} [parserOpts]
* @type {TransformFunction<string|object,CSVTransformResult>}
*/
export const transform: TransformFunction<string | object, CSVTransformResult>;
/**
* This is a single CSV-formatted row
*/
export type CSVTransformResult = string;
/**
* Options for AsyncParser
*/
export type CSVTransformOptions = any;
export type Report = import("../../diff/node_modules/@report-toolkit/common/src/report.js").Report;
export type TransformerMeta = {
id: string;
description?: string;
input?: string[];
output: string;
alias?: string[];
defaults?: any;
};
export type TransformerField = {
label: string;
value: string | ((arg0: any) => string);
color?: string | ((arg0: any) => string);
};
export type TransformFunction<T, U> = (opts?: any) => import("rxjs").OperatorFunction<T, U>;