tasksModule
MS Code Extension API / core/extensionAPI/modules/tasksModule
core/extensionAPI/modules/tasksModule
Type Aliases
TasksModule
TasksModule =
ReturnType<typeofcreateTasksModule>
Defined in: core/extensionAPI/modules/tasksModule.ts:51
Functions
createTasksModule()
createTasksModule(
extId):object
Defined in: core/extensionAPI/modules/tasksModule.ts:9
Parameters
extId
string
Returns
execute
execute: (
cmd,cwd,onData,channel?) =>object
Execute a shell command and stream output.
outputChannel: false → silent (no Output panel, no Tasks panel entry).
outputChannel: string → mirrored to that channel + listed in Tasks panel.
Parameters
cmd
string
cwd
string
onData
(d) => void
channel?
string | false
Returns
object
kill
kill: () =>
void
Returns
void
result
result:
Promise<{exitCode:number; }>
runInBackground
runInBackground: (
command,options?) =>object
Run a command in the background and pipe its output to a named Output Channel (visible in the Termis > Output panel). The task will appear in the Tasks panel.
Parameters
command
string
options?
cwd?
string
outputChannel?
string
Returns
object
kill
kill: () =>
void
Returns
void
result
result:
Promise<{exitCode:number; }>
Example
mscode.tasks.runInBackground('npm install', {
cwd: '/sdcard/my-project',
outputChannel: 'npm',
});