forked from microsoft/vscode-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmoduleInstaller.ts
More file actions
28 lines (23 loc) · 862 Bytes
/
moduleInstaller.ts
File metadata and controls
28 lines (23 loc) · 862 Bytes
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
import { EventEmitter } from 'events';
import { Uri } from 'vscode';
import { IModuleInstaller } from '../../client/common/installer/types';
import { Product } from '../../client/common/types';
export class MockModuleInstaller extends EventEmitter implements IModuleInstaller {
constructor(public readonly displayName: string, private supported: boolean) {
super();
}
// eslint-disable-next-line class-methods-use-this
public get name(): string {
return 'mock';
}
// eslint-disable-next-line class-methods-use-this
public get priority(): number {
return 0;
}
public async installModule(name: Product | string, _resource?: Uri): Promise<void> {
this.emit('installModule', name);
}
public async isSupported(_resource?: Uri): Promise<boolean> {
return this.supported;
}
}