@codingame/monaco-vscode-extensions-service-override
Version:
VSCode public API plugged on the monaco editor - extensions service-override
23 lines (20 loc) • 1.01 kB
JavaScript
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
import { MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
import { IDownloadService } from 'vscode/vscode/vs/platform/download/common/download.service';
import { URI } from 'vscode/vscode/vs/base/common/uri';
let MainThreadDownloadService = class MainThreadDownloadService extends Disposable {
constructor(extHostContext, downloadService) {
super();
this.downloadService = downloadService;
}
$download(uri, to) {
return this.downloadService.download(URI.revive(uri), URI.revive(to));
}
};
MainThreadDownloadService = __decorate([
extHostNamedCustomer(MainContext.MainThreadDownloadService),
( __param(1, IDownloadService))
], MainThreadDownloadService);
export { MainThreadDownloadService };