import * as vscode from 'vscode'; export declare const enum ExtHostTestItemEventOp { Upsert = 0, RemoveChild = 1, Invalidated = 2, SetProp = 3, Bulk = 4 } export interface ITestItemUpsertChild { op: ExtHostTestItemEventOp.Upsert; item: TestItemImpl; } export interface ITestItemRemoveChild { op: ExtHostTestItemEventOp.RemoveChild; id: string; } export interface ITestItemInvalidated { op: ExtHostTestItemEventOp.Invalidated; } export interface ITestItemSetProp { op: ExtHostTestItemEventOp.SetProp; key: keyof vscode.TestItem; value: any; previous: any; } export interface ITestItemBulkReplace { op: ExtHostTestItemEventOp.Bulk; ops: (ITestItemUpsertChild | ITestItemRemoveChild)[]; } export type ExtHostTestItemEvent = ITestItemUpsertChild | ITestItemRemoveChild | ITestItemInvalidated | ITestItemSetProp | ITestItemBulkReplace; export interface IExtHostTestItemApi { controllerId: string; parent?: vscode.TestItem; listener?: (evt: ExtHostTestItemEvent) => void; } export declare const createPrivateApiFor: (impl: vscode.TestItem, controllerId: string) => IExtHostTestItemApi; /** * Gets the private API for a test item implementation. This implementation * is a managed object, but we keep a weakmap to avoid exposing any of the * internals to extensions. */ export declare const getPrivateApiFor: (impl: vscode.TestItem) => IExtHostTestItemApi; /** * Returns a partial test item containing the writable properties in B that * are different from A. */ export declare const diffTestItems: (a: vscode.TestItem, b: vscode.TestItem) => Map<"label" | "tags" | "sortText" | "range" | "description" | "canResolveChildren" | "busy" | "error", unknown>; export declare class DuplicateTestItemError extends Error { constructor(id: string); } export declare class InvalidTestItemError extends Error { constructor(id: string); } export declare class MixedTestItemController extends Error { constructor(id: string, ctrlA: string, ctrlB: string); } export type TestItemCollectionImpl = vscode.TestItemCollection & { toJSON(): readonly TestItemImpl[]; } & Iterable; export declare class TestItemImpl implements vscode.TestItem { readonly id: string; readonly uri: vscode.Uri | undefined; readonly children: TestItemCollectionImpl; readonly parent: TestItemImpl | undefined; range: vscode.Range | undefined; description: string | undefined; sortText: string | undefined; label: string; error: string | vscode.MarkdownString; busy: boolean; canResolveChildren: boolean; tags: readonly vscode.TestTag[]; /** * Note that data is deprecated and here for back-compat only */ constructor(controllerId: string, id: string, label: string, uri: vscode.Uri | undefined); /** @deprecated back compat */ invalidateResults(): void; } export declare class TestItemRootImpl extends TestItemImpl { constructor(controllerId: string, label: string); } //# sourceMappingURL=testApi.d.ts.map