3.0.0 • Published 1 year ago
@types/human-object-diff v3.0.0
Installation
npm install --save @types/human-object-diff
Summary
This package contains type definitions for human-object-diff (https://github.com/Spence-S/human-object-diff).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/human-object-diff.
index.d.ts
// Type definitions for human-object-diff 2.0
// Project: https://github.com/Spence-S/human-object-diff
// Definitions by: Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace DiffEngine {
type TemplateType = "N" | "D" | "E" | "I" | "R" | "AE" | "NS" | "DS" | "ES" | "IS" | "RS" | "AES";
type PathPredicate = (path: Array<string | number>, key: string | number) => boolean;
interface Options {
/**
* @default 'MM/dd/yyyy hh:mm a'
*/
dateFormat?: string | undefined;
prefilter: string[] | PathPredicate | undefined;
/**
* @default 'Obj'
*/
objectName?: string | undefined;
/**
* @default false
*/
ignoreArrays?: boolean | undefined;
/**
* @default []
*/
sensitivePaths?: string[] | undefined;
/**
* @default false
*/
dontHumanizePropertyNames?: boolean | undefined;
templates?: Record<TemplateType, string> | undefined;
}
}
declare class DiffEngine {
readonly config: Required<DiffEngine.Options>;
readonly templates: Record<DiffEngine.TemplateType, string>;
readonly sentenceDiffs: string[];
readonly sentences: string[];
constructor(config?: DiffEngine.Options);
// tslint:disable-next-line:no-unnecessary-generics
diff<LHS, RHS = LHS>(lhs: LHS, rhs: RHS): DiffEngine["sentenceDiffs"];
}
export = DiffEngine;
Additional Details
- Last updated: Thu, 08 Jul 2021 14:22:58 GMT
- Dependencies: none
- Global values: none
Credits
These definitions were written by Piotr Błażejewicz.