Module: util/tryConstructTarget
Namespaces
Functions
constructLineTarget
▸ constructLineTarget(editor, range, isReversed): LineTarget | undefined
Constructs a LineTarget from the given range, or returns undefined if the range is undefined
Parameters
| Name | Type | Description |
|---|---|---|
editor | TextEditor | The editor containing the range |
range | undefined | Range | The range to convert into a target |
isReversed | boolean | Whether the rain should be backward |
Returns
LineTarget | undefined
A new LineTarget constructed from the given range, or null if the range is undefined
Defined in
util/tryConstructTarget.ts:64
tryConstructPlainTarget
▸ tryConstructPlainTarget(editor, range, isReversed): PlainTarget | undefined
Constructs a PlainTarget from the given range, or returns undefined if the range is undefined
Parameters
| Name | Type | Description |
|---|---|---|
editor | TextEditor | The editor containing the range |
range | undefined | Range | The range to convert into a target |
isReversed | boolean | Whether the rain should be backward |
Returns
PlainTarget | undefined
A new PlainTarget constructed from the given range, or null if the range is undefined
Defined in
util/tryConstructTarget.ts:47
tryConstructTarget
▸ tryConstructTarget<T>(constructor, editor, range, isReversed): T | undefined
Constructs a target from the given range or returns undefined if the range is undefined
Type parameters
| Name | Type |
|---|---|
T | extends Target |
Parameters
| Name | Type | Description |
|---|---|---|
constructor | TargetConstructor<T> | The type of target to construct |
editor | TextEditor | The editor containing the range |
range | undefined | Range | The range to convert into a target |
isReversed | boolean | Whether the rain should be backward |
Returns
T | undefined
A new target constructed from the given range, or null if the range is undefined
Defined in
util/tryConstructTarget.ts:23