NodeHandle
[<Struct>]
type NodeHandle =
{
Index: int
Kind: SyntaxKind
Path: string
}| Assembly | Xantham.TypeScript.Wire |
| Attributes | [<Struct>] |
How a checker response names a syntax node: SymbolResponse.Declarations, SignatureResponse.Declaration and the location argument of every request that takes one all carry this string. It is RemoteNode.id in the typescript package, spelled index.kind.path.
A handle identifies a node within the program that produced it - the same snapshot and the same project. Against any other program it points at a different node or at none.
Fields
Kind: SyntaxKind
Kind: SyntaxKindThe kind the response claims. The blob is the authority; narrow with a view.
Path: string
Path: stringCanonical path of the file, as Ast.path spells it.
Functions and values
format (handle: NodeHandle) : string
format (handle: NodeHandle) : stringThe string form, for the location argument of a checker request.
parse (handle: string) : NodeHandle voption
parse (handle: string) : NodeHandle voptionDecodes a handle. ValueNone where the string is not one.
A path carries dots and, on Windows, a drive colon, so only the first two dots separate fields; everything after the second is the path.