agsamantha/node_modules/langsmith/dist/anonymizer/index.d.ts

17 lines
509 B
TypeScript
Raw Normal View History

2024-10-02 15:15:21 -05:00
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;