Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/editor/common/model/textModelPart.ts
3294 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 { Disposable } from '../../../base/common/lifecycle.js';
7
8
export class TextModelPart extends Disposable {
9
private _isDisposed = false;
10
11
public override dispose(): void {
12
super.dispose();
13
this._isDisposed = true;
14
}
15
protected assertNotDisposed(): void {
16
if (this._isDisposed) {
17
throw new Error('TextModelPart is disposed!');
18
}
19
}
20
}
21
22