import { Commit } from "./commit"; import { GitgraphCore } from "./gitgraph"; import { Coordinate } from "./branches-paths"; export { Omit, NonMatchingPropNames, NonMatchingProp, booleanOptionOr, numberOptionOr, pick, debug, isUndefined, withoutUndefinedKeys, arrowSvgPath, }; /** * Omit some keys from an original type. */ declare type Omit = Pick>; /** * Get all property names not matching a type. * * @ref http://tycho01.github.io/typical/modules/_object_nonmatchingpropsnames_.html */ declare type NonMatchingPropNames = { [K in keyof T]: T[K] extends X ? never : K; }[keyof T]; /** * Get all properties with names not matching a type. * * @ref http://tycho01.github.io/typical/modules/_object_nonmatchingprops_.html */ declare type NonMatchingProp = Pick>; /** * Provide a default value to a boolean. * @param value * @param defaultValue */ declare function booleanOptionOr(value: any, defaultValue: boolean): boolean; /** * Provide a default value to a number. * @param value * @param defaultValue */ declare function numberOptionOr(value: any, defaultValue: number): number; /** * Creates an object composed of the picked object properties. * @param obj The source object * @param paths The property paths to pick */ declare function pick(obj: T, paths: K[]): Pick; /** * Print a light version of commits into the console. * @param commits List of commits * @param paths The property paths to pick */ declare function debug(commits: Array>, paths: Array>): void; /** * Return true if is undefined. * * @param obj */ declare function isUndefined(obj: any): obj is undefined; /** * Return a version of the object without any undefined keys. * * @param obj */ declare function withoutUndefinedKeys(obj?: T): NonMatchingProp; /** * Return a string ready to use in `svg.path.d` to draw an arrow from params. * * @param graph Graph context * @param parent Parent commit of the target commit * @param commit Target commit */ declare function arrowSvgPath(graph: GitgraphCore, parent: Coordinate, commit: Commit): string;