Skip to main content

commands API

The commands api module allows you to register commands that can be run from the CLUI command bar and other contribution points.

Usage

import { commands } from '@replit/extensions';

Methods

commands.add

Adds a command to the command system.

add(__namedParameters: AddCommandArgs): void

Types

ActionCommandArgs

undefined

BaseCommandArgs

undefined

CommandArgs

ActionCommandArgs | ContextCommandArgs

CommandFnArgs

undefined

CommandProxy

 | 

CommandsFn

(args: CommandFnArgs) => Promise

ContextCommandArgs

undefined

CreateCommand

(args: CommandFnArgs) => undefined

Run

() => any

SerializableValue

string | number | boolean |  | undefined |  | 
Was this helpful?