import { Uri } from '../../../common/uri/uri'; /** well known global option names */ export declare const enum GlobalMetadataOptionNames { projectRoot = "projectroot", ignoreCase = "ignorecase", typeshed = "typeshed", indexer = "indexer", indexerWithoutStdLib = "indexerwithoutstdlib", indexerOptions = "indexeroptions" } /** Any option name not belong to this will become global option */ export declare const enum MetadataOptionNames { fileName = "filename", library = "library", distLibrary = "distlibrary", ipythonMode = "ipythonmode", chainedTo = "chainedto" } /** List of allowed file metadata names */ export declare const fileMetadataNames: MetadataOptionNames[]; /** all the necessary information to set the right compiler settings */ export interface CompilerSettings { [name: string]: string; } /** Represents a parsed source file with metadata */ export interface FourSlashFile { content: string; fileName: string; fileUri: Uri; version: number; fileOptions: CompilerSettings; } /** Represents a set of parsed source files and options */ export interface FourSlashData { globalOptions: CompilerSettings; files: FourSlashFile[]; markerPositions: Map; markers: Marker[]; /** * Inserted in source files by surrounding desired text * in a range with `[|` and `|]`. For example, * * [|text in range|] * * is a range with `text in range` "selected". */ ranges: Range[]; rangesByText?: MultiMap | undefined; } export interface Marker { fileName: string; fileUri: Uri; position: number; data?: {}; } export interface Range { fileName: string; fileUri: Uri; marker?: Marker | undefined; pos: number; end: number; } export interface MultiMap extends Map { /** * Adds the value to an array of values associated with the key, and returns the array. * Creates the array if it does not already exist. */ add(key: string, value: T): T[]; /** * Removes a value from an array of values associated with the key. * Does not preserve the order of those values. * Does nothing if `key` is not in `map`, or `value` is not in `map[key]`. */ remove(key: string, value: T): void; } /** Review: is this needed? we might just use one from vscode */ export interface HostCancellationToken { isCancellationRequested(): boolean; } export declare class TestCancellationToken implements HostCancellationToken { private static readonly _notCanceled; private _numberOfCallsBeforeCancellation; isCancellationRequested(): boolean; setCancelled(numberOfCalls?: number): void; resetCancelled(): void; }