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
36 lines (30 loc) · 1.4 KB
/
types.ts
File metadata and controls
36 lines (30 loc) · 1.4 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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
'use strict';
import { CancellationToken, SymbolInformation, TextDocument, TextEditor, Uri } from 'vscode';
import { IDisposable } from '../../common/types';
import { TestFile, TestFunction, TestSuite } from '../common/types';
export const ITestCodeNavigatorCommandHandler = Symbol('ITestCodeNavigatorCommandHandler');
export interface ITestCodeNavigatorCommandHandler extends IDisposable {
register(): void;
}
export type NavigableItem = TestFile | TestFunction | TestSuite;
export enum NavigableItemType {
testFile = 'testFile',
testFunction = 'testFunction',
testSuite = 'testSuite'
}
export const ITestCodeNavigator = Symbol('ITestCodeNavigator');
export interface ITestCodeNavigator {
navigateTo(resource: Uri, item: NavigableItem, focus: boolean): Promise<void>;
}
export const ITestNavigatorHelper = Symbol('ITestNavigatorHelper');
export interface ITestNavigatorHelper {
openFile(file?: Uri): Promise<[TextDocument, TextEditor]>;
findSymbol(doc: TextDocument, predicate: SymbolSearch, token: CancellationToken): Promise<SymbolInformation | undefined>;
}
export type SymbolSearch = (item: SymbolInformation) => boolean;
export const ITestExplorerCommandHandler = Symbol('ITestExplorerCommandHandler');
export interface ITestExplorerCommandHandler extends IDisposable {
register(): void;
}