Options
All
  • Public
  • Public/Protected
  • All
Menu

A task to execute

层级

  • Task

索引

Constructors(1)

constructor

  • Creates a new task.

    Parameters

    • taskDefinition: TaskDefinition
    • scope: WorkspaceFolder | Global | Workspace

      Specifies the task's scope. It is either a global or a workspace task or a task for a specific workspace folder. Global tasks are currently not supported.

    • name: string

      The task's name. Is presented in the user interface.

    • source: string

      The task's source (e.g. 'gulp', 'npm', ...). Is presented in the user interface.

    • Optional execution: ProcessExecution | ShellExecution | CustomExecution

      The process or shell execution.

    • Optional problemMatchers: string | string[]

      the names of problem matchers to use, like '$tsc' or '$eslint'. Problem matchers can be contributed by an extension using the problemMatchers extension point.

    Returns Task

  • Creates a new task.

    deprecated

    Use the new constructors that allow specifying a scope for the task.

    Parameters

    • taskDefinition: TaskDefinition
    • name: string

      The task's name. Is presented in the user interface.

    • source: string

      The task's source (e.g. 'gulp', 'npm', ...). Is presented in the user interface.

    • Optional execution: ProcessExecution | ShellExecution

      The process or shell execution.

    • Optional problemMatchers: string | string[]

      the names of problem matchers to use, like '$tsc' or '$eslint'. Problem matchers can be contributed by an extension using the problemMatchers extension point.

    Returns Task

Properties(11)

definition

definition: TaskDefinition

The task's definition.

Optional Readonly scope

The task's scope.

name

name: string

The task's name

Optional detail

detail: string

A human-readable string which is rendered less prominently on a separate line in places where the task's name is displayed. Supports rendering of theme icons via the $(<name>)-syntax.

Optional execution

The task's execution engine

isBackground

isBackground: boolean

Whether the task is a background task or not.

source

source: string

A human-readable string describing the source of this shell task, e.g. 'gulp' or 'npm'. Supports rendering of theme icons via the $(<name>)-syntax.

Optional group

group: TaskGroup

The task group this tasks belongs to. See TaskGroup for a predefined set of available groups. Defaults to undefined meaning that the task doesn't belong to any special group.

presentationOptions

presentationOptions: TaskPresentationOptions

The presentation options. Defaults to an empty literal.

problemMatchers

problemMatchers: string[]

The problem matchers attached to the task. Defaults to an empty array.

runOptions

runOptions: RunOptions

Run options for the task

友链:VS Code 中文文档 | VS Code 官网文档 | VS Code 扩展市场

Generated by TypeDoc. Maintained by 洛竹