UNPKG

@finnair/path

Version:
16 lines (15 loc) 746 B
import { PathMatcher } from './PathMatcher.js'; import { Path } from './Path.js'; import { JsonReplacer, JsonValue } from './jsonClone.js'; export declare class Projection { private readonly includes; private readonly excludes; private readonly always; private readonly replacer?; private readonly allowGaps; private constructor(); map<T extends object>(input: T): JsonValue; match(path: Path): boolean; static of(includes?: PathMatcher[], excludes?: PathMatcher[], always?: PathMatcher[], replacer?: JsonReplacer): Projection; } export declare function projection(includes?: PathMatcher[], excludes?: PathMatcher[], always?: PathMatcher[], replacer?: JsonReplacer): <T extends object>(input: T) => JsonValue;