Skip to main content

Module: processTargets/processTargets

Functions

default

default(context, targets): Target[][]

Converts the abstract target descriptions provided by the user to a concrete representation usable by actions. Conceptually, the input will be something like "the function call argument containing the cursor" and the output will be something like "line 3, characters 5 through 10".

Parameters

NameTypeDescription
contextProcessedTargetsContextCaptures the environment needed to convert the abstract target description given by the user to a concrete representation usable by actions
targetsTargetDescriptor[]The abstract target representations provided by the user

Returns

Target[][]

A list of lists of typed selections, one list per input target. Each typed selection includes the selection, as well the uri of the document containing it, and potentially rich context information such as how to remove the target

Defined in

processTargets/processTargets.ts:30


getModifierStagesFromTargetModifiers

getModifierStagesFromTargetModifiers(targetModifiers): ModifierStage[]

Convert a list of target modifiers to modifier stages

Parameters

NameType
targetModifiersModifier[]

Returns

ModifierStage[]

Defined in

processTargets/processTargets.ts:206


processModifierStages

processModifierStages(context, modifierStages, targets): Target[]

Run all targets through the modifier stages

Parameters

NameType
contextProcessedTargetsContext
modifierStagesModifierStage[]
targetsTarget[]

Returns

Target[]

Defined in

processTargets/processTargets.ts:215


targetsToContinuousTarget

targetsToContinuousTarget(anchorTarget, activeTarget, excludeAnchor?, excludeActive?): Target

Parameters

NameTypeDefault value
anchorTargetTargetundefined
activeTargetTargetundefined
excludeAnchorbooleanfalse
excludeActivebooleanfalse

Returns

Target

Defined in

processTargets/processTargets.ts:88