[F] getNodeAtPosition
Call Signature
function getNodeAtPosition( script, position, filter?): undefined | NodeResolve the node in the syntax tree that that is at the given position.
Parameters
| Parameter | Type | Description |
|---|---|---|
script | TypeSpecScriptNode | TypeSpec Script node |
position | number | Position |
filter? | (node) => boolean | Filter if wanting to return a parent containing node early. |
Returns
undefined | Node
Call Signature
function getNodeAtPosition<T>( script, position, filter): undefined | TResolve the node in the syntax tree that that is at the given position.
Type Parameters
| Type Parameter |
|---|
T extends Node |
Parameters
| Parameter | Type | Description |
|---|---|---|
script | TypeSpecScriptNode | TypeSpec Script node |
position | number | Position |
filter | (node) => node is T | Filter if wanting to return a parent containing node early. |
Returns
undefined | T