@sussudio/platform
Version:
Internal APIs for VS Code's service injection the base services.
17 lines (16 loc) • 1.25 kB
JavaScript
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { createDecorator } from '../../instantiation/common/instantiation.mjs';
export const State = {
Uninitialized: { type: 'uninitialized' /* StateType.Uninitialized */ },
Idle: (updateType, error) => ({ type: 'idle' /* StateType.Idle */, updateType, error }),
CheckingForUpdates: (explicit) => ({ type: 'checking for updates' /* StateType.CheckingForUpdates */, explicit }),
AvailableForDownload: (update) => ({ type: 'available for download' /* StateType.AvailableForDownload */, update }),
Downloading: (update) => ({ type: 'downloading' /* StateType.Downloading */, update }),
Downloaded: (update) => ({ type: 'downloaded' /* StateType.Downloaded */, update }),
Updating: (update) => ({ type: 'updating' /* StateType.Updating */, update }),
Ready: (update) => ({ type: 'ready' /* StateType.Ready */, update }),
};
export const IUpdateService = createDecorator('updateService');