MCPcopy Index your code
hub / github.com/kpdecker/jsdiff / ChangeObject

Interface ChangeObject

src/types.ts:1–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1export interface ChangeObject<ValueT> {
2 /**
3 * The concatenated content of all the tokens represented by this change object - i.e. generally the text that is either added, deleted, or common, as a single string.
4 * In cases where tokens are considered common but are non-identical (e.g. because an option like `ignoreCase` or a custom `comparator` was used), the value from the *new* string will be provided here.
5 */
6 value: ValueT;
7 /**
8 * true if the value was inserted into the new string, otherwise false
9 */
10 added: boolean;
11 /**
12 * true if the value was removed from the old string, otherwise false
13 */
14 removed: boolean;
15 /**
16 * How many tokens (e.g. chars for `diffChars`, lines for `diffLines`) the value in the change object consists of
17 */
18 count: number;
19}
20
21// Name "Change" is used here for consistency with the previous type definitions from
22// DefinitelyTyped. I would *guess* this is probably the single most common type for people to

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected