File

src/app/features/conflict-resolution/auto-resolution/conflict-resolution-strategy.ts

Description

Implement this interface to provide custom strategies how certain conflicts of an Entity type can be resolved automatically.

see ConflictResolutionModule

Index

Methods

Methods

autoDeleteConflictingRevision
autoDeleteConflictingRevision(currentDoc: any, conflictingDoc: any)
Parameters :
Name Type Optional
currentDoc any No
conflictingDoc any No
Returns : boolean
import { InjectionToken } from "@angular/core";

/**
 * Use this token to provide (and thereby register) custom implementations of {@link ConflictResolutionStrategy}.
 *
 * `{ provide: CONFLICT_RESOLUTION_STRATEGY, useClass: MyConflictResolutionStrategy, multi: true }`
 *
 * see {@link ConflictResolutionModule}
 */
export const CONFLICT_RESOLUTION_STRATEGY =
  new InjectionToken<ConflictResolutionStrategy>("ConflictResolutionStrategy");

/**
 * Implement this interface to provide custom strategies how certain conflicts of an Entity type can be resolved automatically.
 *
 * see {@link ConflictResolutionModule}
 */
export interface ConflictResolutionStrategy {
  autoDeleteConflictingRevision(currentDoc: any, conflictingDoc: any): boolean;
}

results matching ""

    No results matching ""