mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-13 19:48:37 -05:00
Merge from vscode 2b0b9136329c181a9e381463a1f7dc3a2d105a34 (#4880)
This commit is contained in:
@@ -31,7 +31,7 @@ export class ProgressService2 implements IProgressService2 {
|
||||
@IStatusbarService private readonly _statusbarService: IStatusbarService,
|
||||
) { }
|
||||
|
||||
withProgress<R=any>(options: IProgressOptions, task: (progress: IProgress<IProgressStep>) => Promise<R>, onDidCancel?: () => void): Promise<R> {
|
||||
withProgress<R = unknown>(options: IProgressOptions, task: (progress: IProgress<IProgressStep>) => Promise<R>, onDidCancel?: () => void): Promise<R> {
|
||||
|
||||
const { location } = options;
|
||||
if (typeof location === 'string') {
|
||||
@@ -58,7 +58,7 @@ export class ProgressService2 implements IProgressService2 {
|
||||
}
|
||||
}
|
||||
|
||||
private _withWindowProgress<R=any>(options: IProgressOptions, callback: (progress: IProgress<{ message?: string }>) => Promise<R>): Promise<R> {
|
||||
private _withWindowProgress<R = unknown>(options: IProgressOptions, callback: (progress: IProgress<{ message?: string }>) => Promise<R>): Promise<R> {
|
||||
|
||||
const task: [IProgressOptions, Progress<IProgressStep>] = [options, new Progress<IProgressStep>(() => this._updateWindowProgress())];
|
||||
|
||||
@@ -126,7 +126,7 @@ export class ProgressService2 implements IProgressService2 {
|
||||
}
|
||||
}
|
||||
|
||||
private _withNotificationProgress<P extends Promise<R>, R=any>(options: IProgressOptions, callback: (progress: IProgress<{ message?: string, increment?: number }>) => P, onDidCancel?: () => void): P {
|
||||
private _withNotificationProgress<P extends Promise<R>, R = unknown>(options: IProgressOptions, callback: (progress: IProgress<{ message?: string, increment?: number }>) => P, onDidCancel?: () => void): P {
|
||||
const toDispose: IDisposable[] = [];
|
||||
|
||||
const createNotification = (message: string | undefined, increment?: number): INotificationHandle | undefined => {
|
||||
@@ -221,7 +221,7 @@ export class ProgressService2 implements IProgressService2 {
|
||||
return p;
|
||||
}
|
||||
|
||||
private _withViewletProgress<P extends Promise<R>, R=any>(viewletId: string, task: (progress: IProgress<{ message?: string }>) => P): P {
|
||||
private _withViewletProgress<P extends Promise<R>, R = unknown>(viewletId: string, task: (progress: IProgress<{ message?: string }>) => P): P {
|
||||
|
||||
const promise = task(emptyProgress);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user