Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/editor/browser/widget/multiDiffEditor/model.ts
3296 views
1
/*---------------------------------------------------------------------------------------------
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 { Event, IValueWithChangeEvent } from '../../../../base/common/event.js';
7
import { RefCounted } from '../diffEditor/utils.js';
8
import { IDiffEditorOptions } from '../../../common/config/editorOptions.js';
9
import { ITextModel } from '../../../common/model.js';
10
import { ContextKeyValue } from '../../../../platform/contextkey/common/contextkey.js';
11
12
export interface IMultiDiffEditorModel {
13
readonly documents: IValueWithChangeEvent<readonly RefCounted<IDocumentDiffItem>[] | 'loading'>;
14
readonly contextKeys?: Record<string, ContextKeyValue>;
15
}
16
17
export interface IDocumentDiffItem {
18
/**
19
* undefined if the file was created.
20
*/
21
readonly original: ITextModel | undefined;
22
23
/**
24
* undefined if the file was deleted.
25
*/
26
readonly modified: ITextModel | undefined;
27
readonly options?: IDiffEditorOptions;
28
readonly onOptionsDidChange?: Event<void>;
29
readonly contextKeys?: Record<string, ContextKeyValue>;
30
}
31
32