Type Alias: LixPlugin

LixPlugin = object

Properties

applyChanges()?

optional applyChanges: ({ file, changes, }) => object

Parameters

{
file, changes, \}
changes

Change[]

file

Omit<LixFile, "data"> & object

The file to which the changes should be applied.

The file.data might be undefined if the file does not exist at the time of applying the changes. This can happen when merging a version that created a new file that did not exist in the target version. Or, a file has been deleted and should be restored at a later point.

Returns

object

fileData

fileData: Uint8Array


detectChanges()?

optional detectChanges: ({ before, after, }) => DetectedChange[]

Detects changes between the before and after file update(s).

Before is undefined if the file did not exist before ( the file was created).

After is always defined. Either the file was updated, or deleted. If the file is deleted, lix own change control will handle the deletion. Hence, after is always be defined.

Parameters

{
before, after, \}
after

Omit<LixFile, "data"> & object

before?

Omit<LixFile, "data"> & object

Returns

DetectedChange[]


detectChangesGlob?

optional detectChangesGlob: string

The glob pattern that should invoke detectChanges().

Example

`**/*.json` for all JSON files
  `**/*.inlang` for all inlang files

diffUiComponent?

optional diffUiComponent: CustomElementConstructor

UI components that are used to render the diff view.


key

key: string