constructor(label: string, documentation?: string): void;
  }

  /**
   * Signature help represents the signature of something
   * callable. There can be multiple signatures but only one
   * active and only one active parameter.
   */
  declare export class SignatureHelp {

    /**
     * One or more signatures.
     */
    signatures: SignatureInformation[];

    /**
     * The active signature.
     */
    activeSignature: number;

    /**
     * The active parameter of the active signature.
     */
    activeParameter: number;
  }

  /**
   * The signature help provider interface defines the contract between extensions and
   * the [parameter hints](https://code.visualstudio.com/docs/editor/editingevolved#_parameter-hints)-feature.
   */
  declare export interface SignatureHelpProvider {

    /**
     * Provide help for the signature at the given position and document.
     *
     * @param document The document in which the command was invoked.
     * @param position The position at which the command was invoked.
     * @param token A cancellation token.
     * @return Signature help or a thenable that resolves to such. The lack of a result can be
     * signaled by returning `undefined` or `null`.
     */
    provideSignatureHelp(document: TextDocument, position: Position, token: CancellationToken): SignatureHelp | Thenable<SignatureHelp>;
  }

  /**
   * Completion item kinds.
   */
  declare export type CompletionItemKindType = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17;
  declare export var CompletionItemKind: {
   Text: 0,
   Method: 1,
   Function: 2,
   Constructor: 3,
   Field: 4,
   Variable: 5,
   Class: 6,
   Interface: 7,
   Module: 8,
   Property: 9,
   Unit: 10,
   Value: 11,
   Enum: 12,
   Keyword: 13,
   Snippet: 14,
   Color: 15,
   File: 16,
   Reference: 17,
   ...
  }

  /**
   * A completion item represents a text snippet that is
   * proposed to complete text that is being typed.
   *
   * @see [CompletionItemProvider.provideCompletionItems](#CompletionItemProvider.provideCompletionItems)
   * @see [CompletionItemProvider.resolveCompletionItem](#CompletionItemProvider.resolveCompletionItem)
   */
  declare export class CompletionItem {

    /**
     * The label of this completion item. By default
     * this is also the text that is inserted when selecting
     * this completion.
     */
    label: string;

    /**
     * The kind of this completion item. Based on the kind
     * an icon is chosen by the editor.
     */
    kind: CompletionItemKindType;

    /**
     * A human-readable string with additional information
     * about this item, like type or symbol information.
     */
    detail: string;

    /**
     * A human-readable string that represents a doc-comment.
     */
    documentation: string;

    /**
     * A string that should be used when comparing this item
     * with other items. When `falsy` the [label](#CompletionItem.label)
     * is used.
     */
    sortText: string;

    /**
     * A string that should be used when filtering a set of
     * completion items. When `falsy` the [label](#CompletionItem.label)
     * is used.
     */
    filterText: string;

    /**
     * A string that should be inserted in a document when selecting
     * this completion. When `falsy` the [label](#CompletionItem.label)
     * is used.
     */
    insertText: string;

    /**
     * An [edit](#TextEdit) which is applied to a document when selecting
     * this completion. When an edit is provided the value of
     * [insertText](#CompletionItem.insertText) is ignored.
     *
     * The [range](#Range) of the edit must be single-line and one the same
     * line completions where [requested](#CompletionItemProvider.provideCompletionItems) at.
     */
    textEdit: TextEdit;

    /**
     * Creates a new completion item.
     *
     * Completion items must have at least a [label](#CompletionItem.label) which then
     * will be used as insert text as well as for sorting and filtering.
     *
     * @param label The label of the completion.
     */
    constructor(label: string): void;
  }

  /**
   * The completion item provider interface defines the contract between extensions and
   * the [IntelliSense](https://code.visualstudio.com/docs/editor/editingevolved#_intellisense).
   *
   * When computing *complete* completion items is expensive, providers can optionally implement
   * the `resolveCompletionItem`-function. In that case it is enough to return completion
   * items with a [label](#CompletionItem.label) from the
   * [provideCompletionItems](#CompletionItemProvider.provideCompletionItems)-function. Subsequently,
   * when a completion item is shown in the UI and gains focus this provider is asked to resolve
   * the item, like adding [doc-comment](#CompletionItem.documentation) or [details](#CompletionItem.detail).
   */
  declare export interface CompletionItemProvider {

    /**
     * Provide completion items for the given position and document.
     *
     * @param document The document in which the command was invoked.
     * @param position The position at which the command was invoked.
     * @param token A cancellation token.
     * @return An array of completions or a thenable that resolves to such. The lack of a result can be
     * signaled by returning `undefined`, `null`, an empty array.
     */
    provideCompletionItems(document: TextDocument, position: Position, token: CancellationToken): CompletionItem[] | Thenable<CompletionItem[]>;

    /**
     * Given a completion item fill in more data, like [doc-comment](#CompletionItem.documentation)
     * or [details](#CompletionItem.detail).
     *
     * The editor will only resolve a completion item once.
     *
     * @param item A completion item currently active in the UI.
     * @param token A cancellation token.
     * @return The resolved completion item or a thenable that resolves to of such. It is OK to return the given
     * `item`. When no result is returned, the given `item` will be used.
     */
    resolveCompletionItem?: (item: CompletionItem, token: CancellationToken) => CompletionItem | Thenable<CompletionItem>;
  }

  /**
   * A tuple of two characters, like a pair of
   * opening and closing brackets.
   */
  declare export type CharacterPair = [string, string];

  /**
   * Describes how comments for a language work.
   */
  declare export interface CommentRule {

    /**
     * The line comment token, like `// this is a comment`
     */
    lineComment?: string;

    /**
     * The block comment character pair, like `/* block comment *&#47;`
     */
    blockComment?: CharacterPair;
  }

  /**
   * Describes indentation rules for a language.
   */
  declare export interface IndentationRule {
    /**
     * If a line matches this pattern, then all the lines after it should be unindendented once (until another rule matches).
     */
    decreaseIndentPattern: RegExp;
    /**
     * If a line matches this pattern, then all the lines after it should be indented once (until another rule matches).
     */
    increaseIndentPattern: RegExp;
    /**
     * If a line matches this pattern, then **only the next line** after it should be indented once.
     */
    indentNextLinePattern?: RegExp;
    /**
     * If a line matches this pattern, then its indentation should not be changed and it should not be evaluated against the other rules.
     */
    unIndentedLinePattern?: RegExp;
  }

  /**
   * Describes what to do with the indentation when pressing Enter.
   */
  declare export type IndentActionType = 0 | 1 | 2 | 3;
  declare export var IndentAction: {
   /**
    * Insert new line and copy the previous line's indentation.
    */
   None: 0,
   /**
    * Insert new line and indent once (relative to the previous line's indentation).
    */
   Indent: 1,
   /**
    * Insert two new lines:
    *  - the first one indented which will hold the cursor
    *  - the second one at the same indentation level
    */
   IndentOutdent: 2,
   /**
    * Insert new line and outdent once (relative to the previous line's indentation).
    */
   Outdent: 3,
   ...
  }

  /**
   * Describes what to do when pressing Enter.
   */
  declare export interface EnterAction {
    /**
     * Describe what to do with the indentation.
     */
    indentAction: IndentActionType;
    /**
     * Describes text to be appended after the new line and after the indentation.
     */
    appendText?: string;
    /**
     * Describes the number of characters to remove from the new line's indentation.
     */
    removeText?: number;
  }

  /**
   * Describes a rule to be evaluated when pressing Enter.
   */
  declare export interface OnEnterRule {
    /**
     * This rule will only execute if the text before the cursor matches this regular expression.
     */
    beforeText: RegExp;
    /**
     * This rule will only execute if the text after the cursor matches this regular expression.
     */
    afterText?: RegExp;
    /**
     * The action to execute.
     */
    action: EnterAction;
  }

  /**
   * The language configuration interfaces defines the contract between extensions
   * and various editor features, like automatic bracket insertion, automatic indentation etc.
   */
  declare export interface LanguageConfiguration {
    /**
     * The language's comment settings.
     */
    comments?: CommentRule;
    /**
     * The language's brackets.
     * This configuration implicitly affects pressing Enter around these brackets.
     */
    brackets?: CharacterPair[];
    /**
     * The language's word definition.
     * If the language supports Unicode identifiers (e.g. JavaScript), it is preferable
     * to provide a word definition that uses exclusion of known separators.
     * e.g.: A regex that matches anything except known separators (and dot is allowed to occur in a floating point number):
     *   /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g
     */
    wordPattern?: RegExp;
    /**
     * The language's indentation settings.
     */
    indentationRules?: IndentationRule;
    /**
     * The language's rules to be evaluated when pressing Enter.
     */
    onEnterRules?: OnEnterRule[];

    /**
     * **Deprecated** Do not use.
     *
     * @deprecated Will be replaced by a better API soon.
     */
    __electricCharacterSupport?: {
     brackets: {
      tokenType: string,
      open: string,
      close: string,
      isElectric: boolean,
      ...
     }[],
     docComment?: {
      scope: string,
      open: string,
      lineStart: string,
      close?: string,
      ...
     },
     ...
    };

    /**
     * **Deprecated** Do not use.
     *
     * @deprecated Will be replaced by a better API soon.
     */
    __characterPairSupport?: { autoClosingPairs: {
     open: string,
     close: string,
     notIn?: string[],
     ...
    }[], ... };
  }

  /**
   * Represents the workspace configuration. The workspace configuration
   * is always a merged view of the configuration of the current [workspace](#workspace.rootPath)
   * and the installation-wide configuration.
   */
  declare export interface WorkspaceConfiguration {

    /**
     * Return a value from this configuration.
     *
     * @param section Configuration name, supports _dotted_ names.
     * @param defaultValue A value should be returned when no value could be found, is `undefined`.
     * @return The value `section` denotes or the default.
     */
    get<T>(section: string, defaultValue?: T): T;

    /**
     * Check if this configuration has a certain value.
     *
     * @param section configuration name, supports _dotted_ names.
     * @return `true` iff the section doesn't resolve to `undefined`.
     */
    has(section: string): boolean;

    /**
     * Readable dictionary that backs this configuration.
     * @readonly
     */
    [key: string]: any;
  }

  /**
   * Represents a location inside a resource, such as a line
   * inside a text file.
   */
  declare export class Location {

    /**
     * The resource identifier of this location.
     */
    uri: Uri;

    /**
     * The document range of this locations.
     */
    range: Range;

    /**
     * Creates a new location object.
     *
     * @param uri The resource identifier.
     * @param rangeOrPosition The range or position. Positions will be converted to an empty range.
     */
    constructor(uri: Uri, rangeOrPosition: Range | Position): void;
  }

  /**
   * Represents the severity of diagnostics.
   */
  declare export type DiagnosticSeverityType = 0 | 1 | 2 | 3;
  declare export var DiagnosticSeverity: {
   /**
    * Something not allowed by the rules of a language or other means.
    */
   Error: 0,
   /**
    * Something suspicious but allowed.
    */
   Warning: 1,
   /**
    * Something to inform about but not a problem.
    */
   Information: 2,
   /**
    * Something to hint to a better way of doing it, like proposing
    * a refactoring.
    */
   Hint: 3,
   ...
  }

  /**
   * Represents a diagnostic, such as a compiler error or warning. Diagnostic objects
   * are only valid in the scope of a file.
   */
  declare export class Diagnostic {

    /**
     * The range to which this diagnostic applies.
     */
    range: Range;

    /**
     * The human-readable message.
     */
    message: string;

    /**
     * A human-readable string describing the source of this
     * diagnostic, e.g. 'typescript' or 'super lint'.
     */
    source: string;

    /**
     * The severity, default is [error](#DiagnosticSeverity.Error).
     */
    severity: DiagnosticSeverityType;

    /**
     * A code or identifier for this diagnostics. Will not be surfaced
     * to the user, but should be used for later processing, e.g. when
     * providing [code actions](#CodeActionContext).
     */
    code: string | number;

    /**
     * Creates a new diagnostic object.
     *
     * @param range The range to which this diagnostic applies.
     * @param message The human-readable message.
     * @param severity The severity, default is [error](#DiagnosticSeverity.Error).
     */
    constructor(range: Range, message: string, severity?: DiagnosticSeverityType): void;
  }

  /**
   * A diagnostics collection is a container that manages a set of
   * [diagnostics](#Diagnostic). Diagnostics are always scopes to a
   * a diagnostics collection and a resource.
   *
   * To get an instance of a `DiagnosticCollection` use
   * [createDiagnosticCollection](#languages.createDiagnosticCollection).
   */
  declare export interface DiagnosticCollection {

    /**
     * The name of this diagnostic collection, for instance `typescript`. Every diagnostic
     * from this collection will be associated with this name. Also, the task framework uses this
     * name when defining [problem matchers](https://code.visualstudio.com/docs/editor/tasks#_defining-a-problem-matcher).
     */
    name: string;

    /**
     * Assign diagnostics for given resource. Will replace
     * existing diagnostics for that resource.
     *
     * @param uri A resource identifier.
     * @param diagnostics Array of diagnostics or `undefined`
     */
    set(uri: Uri, diagnostics: Diagnostic[]): void;

    /**
     * Remove all diagnostics from this collection that belong
     * to the provided `uri`. The same as `#set(uri, undefined)`.
     *
     * @param uri A resource identifier.
     */
    delete(uri: Uri): void;

    /**
     * Replace all entries in this collection.
     *
     * @param entries An array of tuples, like `[[file1, [d1, d2]], [file2, [d3, d4, d5]]]`, or `undefined`.
     */
    set(entries: [Uri, Diagnostic[]][]): void;

    /**
     * Remove all diagnostics from this collection. The same
     * as calling `#set(undefined)`;
     */
    clear(): void;

    /**
     * Dispose and free associated resources. Calls
     * [clear](#DiagnosticCollection.clear).
     */
    dispose(): void;
  }

  /**
   * Denotes a column in the VS Code window. Columns are
   * used to show editors side by side.
   */
  declare export type ViewColumnType = 1 | 2 | 3;
  declare export var ViewColumn: {
   One: 1,
   Two: 2,
   Three: 3,
   ...
  }

  /**
   * An output channel is a container for readonly textual information.
   *
   * To get an instance of an `OutputChannel` use
   * [createOutputChannel](#window.createOutputChannel).
   */
  declare export interface OutputChannel {

    /**
     * The human-readable name of this output channel.
     * @readonly
     */
    name: string;

    /**
     * Append the given value to the channel.
     *
     * @param value A string, falsy values will not be printed.
     */
    append(value: string): void;

    /**
     * Append the given value and a line feed character
     * to the channel.
     *
     * @param value A string, falsy values will be printed.
     */
    appendLine(value: string): void;

    /**
     * Removes all output from the channel.
     */
    clear(): void;

    /**
     * Reveal this channel in the UI.
     *
     * @param column The column in which to show the channel, default in [one](#ViewColumn.One).
     */
    show(column?: ViewColumnType): void;

    /**
     * Hide this channel from the UI.
     */
    hide(): void;

    /**
     * Dispose and free associated resources.
     */
    dispose(): void;
  }
Creates a new signature information object.

@param label A label string.
@param documentation A doc string.