mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Merge from vscode 52dcb723a39ae75bee1bd56b3312d7fcdc87aeed (#6719)
This commit is contained in:
@@ -51,7 +51,7 @@ class ModelEditTask implements IDisposable {
|
||||
|
||||
protected _edits: IIdentifiedSingleEditOperation[];
|
||||
private _expectedModelVersionId: number | undefined;
|
||||
protected _newEol: EndOfLineSequence;
|
||||
protected _newEol: EndOfLineSequence | undefined;
|
||||
|
||||
constructor(private readonly _modelReference: IReference<IResolvedTextEditorModel>) {
|
||||
this._model = this._modelReference.object.textEditorModel;
|
||||
@@ -142,7 +142,7 @@ class BulkEditModel implements IDisposable {
|
||||
private _textModelResolverService: ITextModelService;
|
||||
private _edits = new Map<string, ResourceTextEdit[]>();
|
||||
private _editor: ICodeEditor | undefined;
|
||||
private _tasks: ModelEditTask[];
|
||||
private _tasks: ModelEditTask[] | undefined;
|
||||
private _progress: IProgress<void>;
|
||||
|
||||
constructor(
|
||||
@@ -159,7 +159,7 @@ class BulkEditModel implements IDisposable {
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
this._tasks = dispose(this._tasks);
|
||||
this._tasks = dispose(this._tasks!);
|
||||
}
|
||||
|
||||
addEdit(edit: ResourceTextEdit): void {
|
||||
@@ -196,7 +196,7 @@ class BulkEditModel implements IDisposable {
|
||||
}
|
||||
|
||||
value.forEach(edit => task.addEdit(edit));
|
||||
this._tasks.push(task);
|
||||
this._tasks!.push(task);
|
||||
this._progress.report(undefined);
|
||||
});
|
||||
promises.push(promise);
|
||||
@@ -208,7 +208,7 @@ class BulkEditModel implements IDisposable {
|
||||
}
|
||||
|
||||
validate(): ValidationResult {
|
||||
for (const task of this._tasks) {
|
||||
for (const task of this._tasks!) {
|
||||
const result = task.validate();
|
||||
if (!result.canApply) {
|
||||
return result;
|
||||
@@ -218,7 +218,7 @@ class BulkEditModel implements IDisposable {
|
||||
}
|
||||
|
||||
apply(): void {
|
||||
for (const task of this._tasks) {
|
||||
for (const task of this._tasks!) {
|
||||
task.apply();
|
||||
this._progress.report(undefined);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user