@report-toolkit/transformers
Version:
See docs at [https://ibm.github.io/report-toolkit](https://ibm.github.io/report-toolkit)
37 lines (36 loc) • 1.18 kB
TypeScript
/**
* @type {TransformerMeta}
*/
export const meta: TransformerMeta;
/**
* Given a report, generate a SHA1 hash of the stack trace. Useful when
* determining whether a stack trace is new or already known.
* @param {Partial<StackHashTransformOptions>} [opts] - Options
* @type {TransformFunction<Report,StackHashTransformResult>}
*/
export const transform: TransformFunction<Report, StackHashTransformResult>;
export type StackHashTransformResult = {
dumpEventTime: string;
filename?: string;
sha1: string;
message: string;
};
export type StackHashTransformOptions = {
fields: TransformerField[];
strip: RegExp | ((arg0: string) => string | string);
};
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>;