1 | export * from './module/core';
|
---|
2 | export * from './module/duplex';
|
---|
3 | export {
|
---|
4 | PatchError as JsonPatchError,
|
---|
5 | _deepClone as deepClone,
|
---|
6 | escapePathComponent,
|
---|
7 | unescapePathComponent
|
---|
8 | } from './module/helpers';
|
---|
9 |
|
---|
10 |
|
---|
11 | /**
|
---|
12 | * Default export for backwards compat
|
---|
13 | */
|
---|
14 | import * as core from './module/core';
|
---|
15 | import * as duplex from './module/duplex';
|
---|
16 | import { PatchError as JsonPatchError, _deepClone as deepClone, escapePathComponent, unescapePathComponent } from './module/helpers';
|
---|
17 | declare const _default: {
|
---|
18 | JsonPatchError: typeof JsonPatchError;
|
---|
19 | deepClone: typeof deepClone;
|
---|
20 | escapePathComponent: typeof escapePathComponent;
|
---|
21 | unescapePathComponent: typeof unescapePathComponent;
|
---|
22 | unobserve<T>(root: T, observer: duplex.Observer<T>): void;
|
---|
23 | observe<T>(obj: Object | T[], callback?: (patches: core.Operation[]) => void): duplex.Observer<T>;
|
---|
24 | generate<T>(observer: duplex.Observer<Object>, invertible?: boolean): core.Operation[];
|
---|
25 | compare(tree1: Object | any[], tree2: Object | any[], invertible?: boolean): core.Operation[];
|
---|
26 | getValueByPointer(document: any, pointer: string): any;
|
---|
27 | applyOperation<T>(document: T, operation: core.Operation, validateOperation?: boolean | core.Validator<T>, mutateDocument?: boolean, banPrototypeModifications?: boolean, index?: number): core.OperationResult<T>;
|
---|
28 | applyPatch<T>(document: T, patch: core.Operation[], validateOperation?: boolean | core.Validator<T>, mutateDocument?: boolean, banPrototypeModifications?: boolean): core.PatchResult<T>;
|
---|
29 | applyReducer<T>(document: T, operation: core.Operation, index: number): T;
|
---|
30 | validator(operation: core.Operation, index: number, document?: any, existingPathFragment?: string): void;
|
---|
31 | validate<T>(sequence: core.Operation[], document?: T, externalValidator?: core.Validator<T>): JsonPatchError;
|
---|
32 | _areEquals(a: any, b: any): boolean;
|
---|
33 | };
|
---|
34 | export default _default; |
---|