forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
43 lines (39 loc) · 1.57 KB
/
types.ts
File metadata and controls
43 lines (39 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { Event } from 'vscode';
import { IPersistentState } from '../types';
export const IExtensionChannelRule = Symbol('IExtensionChannelRule');
export interface IExtensionChannelRule {
/**
* Return `true` if insiders build is required to be installed for the channel
* @param isChannelRuleNew Carries boolean `true` if insiders channel just changed to this channel rule
*/
shouldLookForInsidersBuild(isChannelRuleNew?: boolean): Promise<boolean>;
}
export const IExtensionChannelService = Symbol('IExtensionChannelService');
export interface IExtensionChannelService {
readonly onDidChannelChange: Event<ExtensionChannels>;
readonly isChannelUsingDefaultConfiguration: boolean;
getChannel(): ExtensionChannels;
updateChannel(value: ExtensionChannels): Promise<void>;
}
export const IInsiderExtensionPrompt = Symbol('IInsiderExtensionPrompt');
export interface IInsiderExtensionPrompt {
/**
* Carries boolean `false` for the first session when user has not been notified.
* Gets updated to `true` once user has been prompted to install insiders.
*/
readonly hasUserBeenNotified: IPersistentState<boolean>;
notifyToInstallInsiders(): Promise<void>;
promptToReload(): Promise<void>;
}
/**
* Note the values in this enum must belong to `ExtensionChannels` type
*/
export enum ExtensionChannel {
/**
* "off" setting is defined as a no op, which means user keeps using the extension they are using
*/
off = 'off',
weekly = 'weekly',
daily = 'daily'
}
export type ExtensionChannels = 'off' | 'weekly' | 'daily';