forked from microsoft/vscode-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextensions.ts
More file actions
23 lines (22 loc) · 936 Bytes
/
extensions.ts
File metadata and controls
23 lines (22 loc) · 936 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { injectable } from 'inversify';
import { IExtensions } from '../../client/common/types';
import { Extension, Event } from 'vscode';
import { MockExtension } from './extension';
@injectable()
export class MockExtensions implements IExtensions {
extensionIdsToFind: unknown[] = [];
all: readonly Extension<unknown>[] = [];
onDidChange: Event<void> = () => {
throw new Error('Method not implemented');
};
getExtension(extensionId: string): Extension<unknown> | undefined;
getExtension<T>(extensionId: string): Extension<T> | undefined;
getExtension(extensionId: unknown): import('vscode').Extension<unknown> | undefined {
if (this.extensionIdsToFind.includes(extensionId)) {
return new MockExtension();
}
}
determineExtensionFromCallStack(): Promise<{ extensionId: string; displayName: string }> {
throw new Error('Method not implemented.');
}
}