json-p3 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,157 @@
1
+ import { JSONPointer } from "../pointer";
2
+ import { JSONValue } from "../types";
3
+ export type OpObject = {
4
+ op: string;
5
+ path: string;
6
+ value?: JSONValue;
7
+ from?: string;
8
+ };
9
+ /**
10
+ * A JSON Patch operation.
11
+ */
12
+ export interface Op {
13
+ /**
14
+ * The patch operation name.
15
+ */
16
+ name: string;
17
+ /**
18
+ * Apply the patch operation to _value_.
19
+ * @param value - The target JSON value.
20
+ */
21
+ apply: (value: JSONValue, index: number) => JSONValue;
22
+ /**
23
+ * A plain object representation of the patch operation.
24
+ */
25
+ toObject: () => OpObject;
26
+ }
27
+ /**
28
+ * The JSON Patch _add_ operation.
29
+ */
30
+ export declare class OpAdd implements Op {
31
+ readonly path: JSONPointer;
32
+ readonly value: JSONValue;
33
+ name: string;
34
+ constructor(path: JSONPointer, value: JSONValue);
35
+ apply(value: JSONValue, index: number): JSONValue;
36
+ toObject(): OpObject;
37
+ }
38
+ /**
39
+ * The JSON Patch _remove_ operation.
40
+ */
41
+ export declare class OpRemove implements Op {
42
+ readonly path: JSONPointer;
43
+ name: string;
44
+ constructor(path: JSONPointer);
45
+ apply(value: JSONValue, index: number): JSONValue;
46
+ toObject(): OpObject;
47
+ }
48
+ /**
49
+ * The JSON Patch _replace_ operation.
50
+ */
51
+ export declare class OpReplace implements Op {
52
+ readonly path: JSONPointer;
53
+ readonly value: JSONValue;
54
+ name: string;
55
+ constructor(path: JSONPointer, value: JSONValue);
56
+ apply(value: JSONValue, index: number): JSONValue;
57
+ toObject(): OpObject;
58
+ }
59
+ /**
60
+ * The JSON Patch _move_ operation.
61
+ */
62
+ export declare class OpMove implements Op {
63
+ readonly from: JSONPointer;
64
+ readonly path: JSONPointer;
65
+ name: string;
66
+ constructor(from: JSONPointer, path: JSONPointer);
67
+ apply(value: JSONValue, index: number): JSONValue;
68
+ toObject(): OpObject;
69
+ }
70
+ /**
71
+ * The JSON Patch _copy_ operation.
72
+ */
73
+ export declare class OpCopy implements Op {
74
+ readonly from: JSONPointer;
75
+ readonly path: JSONPointer;
76
+ name: string;
77
+ constructor(from: JSONPointer, path: JSONPointer);
78
+ apply(value: JSONValue, index: number): JSONValue;
79
+ toObject(): OpObject;
80
+ protected deepCopy(value: JSONValue): JSONValue;
81
+ }
82
+ /**
83
+ * The JSON Patch _test_ operation.
84
+ */
85
+ export declare class OpTest implements Op {
86
+ readonly path: JSONPointer;
87
+ readonly value: JSONValue;
88
+ name: string;
89
+ constructor(path: JSONPointer, value: JSONValue);
90
+ apply(value: JSONValue, index: number): JSONValue;
91
+ toObject(): OpObject;
92
+ }
93
+ /**
94
+ *
95
+ */
96
+ export declare class JSONPatch {
97
+ private ops;
98
+ /**
99
+ *
100
+ * @param ops -
101
+ */
102
+ constructor(ops?: OpObject[]);
103
+ /**
104
+ *
105
+ * @param path -
106
+ * @param value -
107
+ * @returns
108
+ */
109
+ add(path: string | JSONPointer, value: JSONValue): this;
110
+ /**
111
+ *
112
+ * @param path -
113
+ */
114
+ remove(path: string | JSONPointer): this;
115
+ /**
116
+ *
117
+ * @param path -
118
+ * @param value -
119
+ * @returns
120
+ */
121
+ replace(path: string | JSONPointer, value: JSONValue): this;
122
+ /**
123
+ *
124
+ * @param from -
125
+ * @param path -
126
+ * @returns
127
+ */
128
+ move(from: string | JSONPointer, path: string | JSONPointer): this;
129
+ /**
130
+ *
131
+ * @param from -
132
+ * @param path -
133
+ * @returns
134
+ */
135
+ copy(from: string | JSONPointer, path: string | JSONPointer): this;
136
+ /**
137
+ *
138
+ * @param path -
139
+ * @param value -
140
+ * @returns
141
+ */
142
+ test(path: string | JSONPointer, value: JSONValue): this;
143
+ /**
144
+ *
145
+ * @param value -
146
+ */
147
+ apply(value: JSONValue): JSONValue;
148
+ /**
149
+ *
150
+ * @returns
151
+ */
152
+ toArray(): OpObject[];
153
+ protected build(ops: OpObject[]): void;
154
+ protected opPointer(opObj: OpObject, key: keyof OpObject, op: string, index: number): JSONPointer;
155
+ protected opValue(opObj: OpObject, key: keyof OpObject, op: string, index: number): JSONValue;
156
+ protected ensurePointer(p: JSONPointer | string, op: string, index: number): JSONPointer;
157
+ }
@@ -0,0 +1,60 @@
1
+ import { FilterExpression } from "./expression";
2
+ import { FilterFunction } from "./functions/function";
3
+ import { JSONPathNodeList } from "./node";
4
+ import { JSONPath } from "./path";
5
+ import { Token } from "./token";
6
+ import { JSONValue } from "../types";
7
+ /**
8
+ *
9
+ */
10
+ export type JSONPathEnvironmentOptions = {
11
+ /**
12
+ *
13
+ */
14
+ strict: boolean;
15
+ /**
16
+ *
17
+ */
18
+ maxIntIndex: number;
19
+ /**
20
+ *
21
+ */
22
+ minIntIndex: number;
23
+ };
24
+ export declare const defaultOptions: JSONPathEnvironmentOptions;
25
+ /**
26
+ *
27
+ */
28
+ export declare class JSONPathEnvironment {
29
+ readonly options: JSONPathEnvironmentOptions;
30
+ /**
31
+ *
32
+ */
33
+ filterRegister: Map<string, FilterFunction>;
34
+ private parser;
35
+ /**
36
+ *
37
+ * @param options -
38
+ */
39
+ constructor(options?: JSONPathEnvironmentOptions);
40
+ /**
41
+ *
42
+ * @param path -
43
+ * @returns
44
+ */
45
+ compile(path: string): JSONPath;
46
+ /**
47
+ *
48
+ * @param path -
49
+ * @param value -
50
+ * @returns
51
+ */
52
+ query(path: string, value: JSONValue): JSONPathNodeList;
53
+ protected setupFilterFunctions(): void;
54
+ /**
55
+ *
56
+ * @param token -
57
+ * @param args -
58
+ */
59
+ checkWellTypedness(token: Token, args: FilterExpression[]): FilterExpression[];
60
+ }
@@ -0,0 +1,50 @@
1
+ import { Token } from "./token";
2
+ /**
3
+ * Base class for all JSONPath errors.
4
+ */
5
+ export declare class JSONPathError extends Error {
6
+ readonly message: string;
7
+ readonly token: Token;
8
+ constructor(message: string, token: Token);
9
+ }
10
+ /**
11
+ * Error thrown due to unexpected, internal path tokenization problems.
12
+ */
13
+ export declare class JSONPathLexerError extends JSONPathError {
14
+ readonly message: string;
15
+ readonly token: Token;
16
+ constructor(message: string, token: Token);
17
+ }
18
+ /**
19
+ * Error thrown due to type errors when evaluating filter expressions.
20
+ */
21
+ export declare class JSONPathTypeError extends JSONPathError {
22
+ readonly message: string;
23
+ readonly token: Token;
24
+ constructor(message: string, token: Token);
25
+ }
26
+ /**
27
+ * Error thrown due to out of range indices.
28
+ */
29
+ export declare class JSONPathIndexError extends JSONPathError {
30
+ readonly message: string;
31
+ readonly token: Token;
32
+ constructor(message: string, token: Token);
33
+ }
34
+ /**
35
+ * Error thrown when attempting to retrieve a filter function that has not
36
+ * been registered.
37
+ */
38
+ export declare class UndefinedFilterFunctionError extends JSONPathError {
39
+ readonly message: string;
40
+ readonly token: Token;
41
+ constructor(message: string, token: Token);
42
+ }
43
+ /**
44
+ * Error thrown due to syntax errors found during parsing a JSONPath query.
45
+ */
46
+ export declare class JSONPathSyntaxError extends JSONPathError {
47
+ readonly message: string;
48
+ readonly token: Token;
49
+ constructor(message: string, token: Token);
50
+ }
@@ -0,0 +1,98 @@
1
+ import { JSONPathNodeList } from "./node";
2
+ import { JSONPath } from "./path";
3
+ import { Token } from "./token";
4
+ import { FilterContext } from "./types";
5
+ /**
6
+ * Base class for all filter expressions.
7
+ */
8
+ export declare abstract class FilterExpression {
9
+ readonly token: Token;
10
+ constructor(token: Token);
11
+ /**
12
+ * Evaluate the filter expression in the given context.
13
+ * @param context - Evaluation context.
14
+ */
15
+ abstract evaluate(context: FilterContext): unknown;
16
+ /**
17
+ * Return a string representation of the expression.
18
+ */
19
+ abstract toString(): string;
20
+ }
21
+ /**
22
+ * Base class for JSONPath ValueType literals.
23
+ */
24
+ export declare abstract class FilterExpressionLiteral extends FilterExpression {
25
+ }
26
+ export declare class NullLiteral extends FilterExpressionLiteral {
27
+ evaluate(): null;
28
+ toString(): string;
29
+ }
30
+ export declare class BooleanLiteral extends FilterExpressionLiteral {
31
+ readonly token: Token;
32
+ readonly value: boolean;
33
+ constructor(token: Token, value: boolean);
34
+ evaluate(): boolean;
35
+ toString(): string;
36
+ }
37
+ export declare class StringLiteral extends FilterExpressionLiteral {
38
+ readonly token: Token;
39
+ readonly value: string;
40
+ constructor(token: Token, value: string);
41
+ evaluate(): string;
42
+ toString(): string;
43
+ }
44
+ export declare class NumberLiteral extends FilterExpressionLiteral {
45
+ readonly token: Token;
46
+ readonly value: number;
47
+ constructor(token: Token, value: number);
48
+ evaluate(): number;
49
+ toString(): string;
50
+ }
51
+ export declare class PrefixExpression extends FilterExpression {
52
+ readonly token: Token;
53
+ readonly operator: string;
54
+ readonly right: FilterExpression;
55
+ constructor(token: Token, operator: string, right: FilterExpression);
56
+ evaluate(context: FilterContext): boolean;
57
+ toString(): string;
58
+ }
59
+ export declare class InfixExpression extends FilterExpression {
60
+ readonly token: Token;
61
+ readonly left: FilterExpression;
62
+ readonly operator: string;
63
+ readonly right: FilterExpression;
64
+ constructor(token: Token, left: FilterExpression, operator: string, right: FilterExpression);
65
+ evaluate(context: FilterContext): boolean;
66
+ toString(): string;
67
+ }
68
+ export declare class LogicalExpression extends FilterExpression {
69
+ readonly token: Token;
70
+ readonly expression: FilterExpression;
71
+ constructor(token: Token, expression: FilterExpression);
72
+ evaluate(context: FilterContext): boolean;
73
+ toString(): string;
74
+ }
75
+ /**
76
+ * Base class for relative and absolute JSONPath query expressions.
77
+ */
78
+ export declare abstract class JSONPathQuery extends FilterExpression {
79
+ readonly token: Token;
80
+ readonly path: JSONPath;
81
+ constructor(token: Token, path: JSONPath);
82
+ }
83
+ export declare class RelativeQuery extends JSONPathQuery {
84
+ evaluate(context: FilterContext): JSONPathNodeList;
85
+ toString(): string;
86
+ }
87
+ export declare class RootQuery extends JSONPathQuery {
88
+ evaluate(context: FilterContext): JSONPathNodeList;
89
+ toString(): string;
90
+ }
91
+ export declare class FunctionExtension extends FilterExpression {
92
+ readonly token: Token;
93
+ readonly name: string;
94
+ readonly args: FilterExpression[];
95
+ constructor(token: Token, name: string, args: FilterExpression[]);
96
+ evaluate(context: FilterContext): unknown;
97
+ toString(): string;
98
+ }
@@ -0,0 +1,7 @@
1
+ import { JSONPathNodeList } from "../node";
2
+ import { FilterFunction, FunctionExpressionType } from "./function";
3
+ export declare class Count implements FilterFunction {
4
+ readonly argTypes: FunctionExpressionType[];
5
+ readonly returnType = FunctionExpressionType.ValueType;
6
+ call(nodes: JSONPathNodeList): number;
7
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * The type of a JSONPath filter function parameter or return value, as
3
+ * described in See section 2.4.1 of draft-ietf-jsonpath-base-20.
4
+ */
5
+ export declare enum FunctionExpressionType {
6
+ ValueType = "ValueType",
7
+ LogicalType = "LogicalType",
8
+ NodesType = "NodesType"
9
+ }
10
+ /**
11
+ * A JSONPath filter function definition.
12
+ */
13
+ export interface FilterFunction {
14
+ /**
15
+ * Argument types expected by the filter function.
16
+ */
17
+ argTypes: FunctionExpressionType[];
18
+ /**
19
+ * The type of the value returned by the filter function.
20
+ */
21
+ returnType: FunctionExpressionType;
22
+ /**
23
+ * A function with unknown number and type of arguments.
24
+ */
25
+ call(...args: unknown[]): unknown;
26
+ }
@@ -0,0 +1,7 @@
1
+ export { Count } from "./count";
2
+ export { Length } from "./length";
3
+ export { Match } from "./match";
4
+ export { Search } from "./search";
5
+ export { Value } from "./value";
6
+ export { FunctionExpressionType } from "./function";
7
+ export type { FilterFunction } from "./function";
@@ -0,0 +1,7 @@
1
+ import { FilterFunction, FunctionExpressionType } from "./function";
2
+ import { Nothing } from "../types";
3
+ export declare class Length implements FilterFunction {
4
+ readonly argTypes: FunctionExpressionType[];
5
+ readonly returnType = FunctionExpressionType.ValueType;
6
+ call(value: unknown): number | typeof Nothing;
7
+ }
@@ -0,0 +1,24 @@
1
+ import { FilterFunction, FunctionExpressionType } from "./function";
2
+ export type MatchFilterFunctionOptions = {
3
+ /**
4
+ * The maximum number of regular expressions to cache.
5
+ */
6
+ cacheSize?: number;
7
+ /**
8
+ * If _true_, throw errors from regex construction and matching.
9
+ * The standard and default behavior is to ignore these errors
10
+ * and return _false_.
11
+ */
12
+ throwErrors?: boolean;
13
+ };
14
+ export declare class Match implements FilterFunction {
15
+ #private;
16
+ readonly options: MatchFilterFunctionOptions;
17
+ readonly argTypes: FunctionExpressionType[];
18
+ readonly returnType = FunctionExpressionType.LogicalType;
19
+ readonly cacheSize: number;
20
+ readonly throwErrors: boolean;
21
+ constructor(options?: MatchFilterFunctionOptions);
22
+ call(s: string, pattern: string): boolean;
23
+ protected fullMatch(pattern: string): string;
24
+ }
@@ -0,0 +1,24 @@
1
+ import { FilterFunction, FunctionExpressionType } from "./function";
2
+ export type SearchFilterFunctionOptions = {
3
+ /**
4
+ * The maximum number of regular expressions to cache. Defaults
5
+ * to 10.
6
+ */
7
+ cacheSize?: number;
8
+ /**
9
+ * If _true_, throw errors from regex construction and matching.
10
+ * The standard and default behavior is to ignore these errors
11
+ * and return _false_.
12
+ */
13
+ throwErrors?: boolean;
14
+ };
15
+ export declare class Search implements FilterFunction {
16
+ #private;
17
+ readonly options: SearchFilterFunctionOptions;
18
+ readonly argTypes: FunctionExpressionType[];
19
+ readonly returnType = FunctionExpressionType.LogicalType;
20
+ readonly cacheSize: number;
21
+ readonly throwErrors: boolean;
22
+ constructor(options?: SearchFilterFunctionOptions);
23
+ call(s: string, pattern: string): boolean;
24
+ }
@@ -0,0 +1,7 @@
1
+ import { JSONPathNodeList } from "../node";
2
+ import { FilterFunction, FunctionExpressionType } from "./function";
3
+ export declare class Value implements FilterFunction {
4
+ readonly argTypes: FunctionExpressionType[];
5
+ readonly returnType = FunctionExpressionType.ValueType;
6
+ call(nodes: JSONPathNodeList): unknown;
7
+ }
@@ -0,0 +1,46 @@
1
+ import { JSONValue } from "../types";
2
+ import { JSONPathEnvironment } from "./environment";
3
+ import { JSONPathNodeList } from "./node";
4
+ import { JSONPath } from "./path";
5
+ export { JSONPathEnvironment } from "./environment";
6
+ export type { JSONPathEnvironmentOptions } from "./environment";
7
+ export { JSONPath } from "./path";
8
+ export { JSONPathNodeList, JSONPathNode } from "./node";
9
+ export { Token, TokenKind } from "./token";
10
+ export * as selectors from "./selectors";
11
+ export * as expressions from "./expression";
12
+ export * as functions from "./functions";
13
+ export { FunctionExpressionType } from "./functions";
14
+ export type { FilterFunction } from "./functions";
15
+ export { JSONPathError, JSONPathIndexError, JSONPathLexerError, JSONPathSyntaxError, JSONPathTypeError, } from "./errors";
16
+ export { Nothing } from "./types";
17
+ export type { JSONPathValue, FilterContext } from "./types";
18
+ export declare const DEFAULT_ENVIRONMENT: JSONPathEnvironment;
19
+ /**
20
+ * Query JSON value _value_ with JSONPath expression _path_.
21
+ * @param path - A JSONPath expression/query.
22
+ * @param value - The JSON-like value the JSONPath query is applied to.
23
+ * @returns A list of JSONPathNode objects, one for each value matched
24
+ * by _path_ in _value_.
25
+ *
26
+ * @throws {@link JSONPathSyntaxError}
27
+ * If the path does not conform to standard syntax.
28
+ *
29
+ * @throws {@link JSONPathTypeError}
30
+ * If filter function arguments are invalid, or filter expression are
31
+ * used in an invalid way.
32
+ */
33
+ export declare function query(path: string, value: JSONValue): JSONPathNodeList;
34
+ /**
35
+ * Compile JSONPath _path_ for later use.
36
+ * @param path - A JSONPath expression/query.
37
+ * @returns A path object with a `query()` method.
38
+ *
39
+ * @throws {@link JSONPathSyntaxError}
40
+ * If the path does not conform to standard syntax.
41
+ *
42
+ * @throws {@link JSONPathTypeError}
43
+ * If filter function arguments are invalid, or filter expression are
44
+ * used in an invalid way.
45
+ */
46
+ export declare function compile(path: string): JSONPath;
@@ -0,0 +1,65 @@
1
+ import { Token, TokenKind } from "./token";
2
+ /**
3
+ * JSONPath lexical scanner.
4
+ *
5
+ * Lexer state is shared between this class and the current state function. A
6
+ * new _Lexer_ instance is automatically created every time a path is tokenized.
7
+ *
8
+ * Use {@link tokenize} to get an array of {@link Token}'s for a JSONPath query.
9
+ */
10
+ declare class Lexer {
11
+ #private;
12
+ readonly path: string;
13
+ /**
14
+ * Filter nesting level.
15
+ */
16
+ filterLevel: number;
17
+ /**
18
+ * A running count of parentheses for each, possibly nested, function call.
19
+ *
20
+ * If the stack is empty, we are not in a function call. Remember that
21
+ * function arguments can use arbitrarily nested in parentheses.
22
+ */
23
+ parenStack: number[];
24
+ /** Tokens resulting from tokenizing a JSONPath query. */
25
+ tokens: Token[];
26
+ /**
27
+ * @param path - A JSONPath query.
28
+ */
29
+ constructor(path: string);
30
+ get pos(): number;
31
+ get start(): number;
32
+ run(): void;
33
+ emit(t: TokenKind): void;
34
+ next(): string;
35
+ ignore(): void;
36
+ backup(): void;
37
+ peek(): string;
38
+ accept(valid: Set<string>): boolean;
39
+ acceptMatch(pattern: RegExp): boolean;
40
+ acceptRun(valid: Set<string>): boolean;
41
+ acceptMatchRun(pattern: RegExp): boolean;
42
+ ignoreWhitespace(): boolean;
43
+ error(msg: string): void;
44
+ }
45
+ /**
46
+ * Return a lexer for _path_ and an array to be populated with Tokens.
47
+ *
48
+ * `lexer.run()` must be called to populate the returned tokens array.
49
+ *
50
+ * You probably want to use {@link tokenize} instead of _lex_. This function
51
+ * is mostly for internal use, where we want to test the state of the returned
52
+ * _lexer_ after tokens have been populated.
53
+ *
54
+ * @param path - A JSONPath query.
55
+ * @returns A two-tuple containing a lexer for _path_ and an array to populate
56
+ * with tokens.
57
+ */
58
+ export declare function lex(path: string): [Lexer, Token[]];
59
+ /**
60
+ * Scan _path_ and return an array of tokens to be parsed by the parser.
61
+ * @param path - A JSONPath query.
62
+ * @returns Tokens to be parsed by the parser.
63
+ */
64
+ export declare function tokenize(path: string): Token[];
65
+ export {};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * A Least Recently Used cache, implemented as an extended Map.
3
+ */
4
+ export declare class LRUCache<K, V> extends Map<K, V> {
5
+ readonly maxSize: number;
6
+ constructor(maxSize?: number, entries?: Iterable<[K, V]>);
7
+ get(key: K): V | undefined;
8
+ set(key: K, value: V): this;
9
+ first(): any;
10
+ }
@@ -0,0 +1,74 @@
1
+ import { JSONPointer } from "../pointer";
2
+ import { JSONValue } from "../types";
3
+ /**
4
+ * The pair of a JSON value and its location found in the target JSON value.
5
+ */
6
+ export declare class JSONPathNode {
7
+ readonly value: JSONValue;
8
+ readonly location: Array<string | number>;
9
+ readonly root: JSONValue;
10
+ /**
11
+ * The normalized path to this node in the target JSON value.
12
+ */
13
+ readonly path: string;
14
+ /**
15
+ * @param value - The JSON value found at _location_.
16
+ * @param location - The parts of a normalized path to _value_.
17
+ * @param root - The target value at the top of the JSON node tree.
18
+ */
19
+ constructor(value: JSONValue, location: Array<string | number>, root: JSONValue);
20
+ /**
21
+ * Return this node's location as a {@link JSONPointer}.
22
+ */
23
+ toPointer(): JSONPointer;
24
+ }
25
+ /**
26
+ *
27
+ */
28
+ export declare class JSONPathNodeList {
29
+ readonly nodes: JSONPathNode[];
30
+ constructor(nodes: JSONPathNode[]);
31
+ /**
32
+ * @returns an iterator over nodes in the list.
33
+ */
34
+ [Symbol.iterator](): Iterator<JSONPathNode>;
35
+ /**
36
+ * @returns `true` if the node list is empty.
37
+ */
38
+ empty(): boolean;
39
+ /**
40
+ * @returns An array containing the values at each node in the list.
41
+ *
42
+ * @see {@link valuesOrSingular} to unpack the array if there is only
43
+ * one node in the list.
44
+ */
45
+ values(): JSONValue[];
46
+ /**
47
+ * Like {@link values}, but returns the node's value is there is only one
48
+ * node in the list.
49
+ */
50
+ valuesOrSingular(): JSONValue;
51
+ /**
52
+ * @returns An array of locations for each node in the node list.
53
+ *
54
+ * A location is an array of property names and array indices that were
55
+ * required to reach the node's value in the target JSON value.
56
+ */
57
+ locations(): Array<Array<string | number>>;
58
+ /**
59
+ * @returns An array of normalized path strings for each node in the list.
60
+ *
61
+ * A normalized path contains only property name and index selectors, and
62
+ * always uses bracketed segments, never shorthand selectors.
63
+ */
64
+ paths(): string[];
65
+ /**
66
+ * @returns An array of {@link JSONPointer} instances, one for each node
67
+ * in the list.
68
+ */
69
+ pointers(): JSONPointer[];
70
+ /**
71
+ * @returns The number of nodes in the node list.
72
+ */
73
+ get length(): number;
74
+ }