agsamantha/node_modules/langsmith/dist/anonymizer/index.d.ts
2024-10-02 15:15:21 -05:00

16 lines
509 B
TypeScript

export interface StringNode {
value: string;
path: string;
}
export interface StringNodeProcessor {
maskNodes: (nodes: StringNode[]) => StringNode[];
}
export interface StringNodeRule {
type?: "pattern";
pattern: RegExp | string;
replace?: string;
}
export type ReplacerType = ((value: string, path?: string) => string) | StringNodeRule[] | StringNodeProcessor;
export declare function createAnonymizer(replacer: ReplacerType, options?: {
maxDepth?: number;
}): <T>(data: T) => T;