1
>
/*---------------------------------------------------------------------------------------------
snippetsMerge.ts
2
>
* Copyright (c) Microsoft Corporation. All rights reserved.
3
>
* Licensed under the MIT License. See License.txt in the project root for license information.
4
>
*--------------------------------------------------------------------------------------------*/
5
>
6
>
import { IStringDictionary } from '../../../base/common/collections.js';
7
>
8
>
export interface IMergeResult {
9
>
local: {
10
>
added: IStringDictionary<string>;
11
>
updated: IStringDictionary<string>;
12
>
removed: string[];
13
>
};
14
>
remote: {
15
>
added: IStringDictionary<string>;
16
>
updated: IStringDictionary<string>;
17
>
removed: string[];
18
>
};
19
>
conflicts: string[];
20
>
}
21
>
22
>
export function merge(local: IStringDictionary<string>, remote: IStringDictionary<string> | null, base: IStringDictionary<string> | null): IMergeResult {
23
const localAdded: IStringDictionary<string> = {};
24
const localUpdated: IStringDictionary<string> = {};