@getodk/xpath 0.2.0 → 0.3.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.
- package/dist/.vite/manifest.json +4 -4
- package/dist/adapter/WHAT/WHATNode.d.ts +30 -0
- package/dist/adapter/WHAT/kind.d.ts +11 -0
- package/dist/adapter/WHAT/names.d.ts +6 -0
- package/dist/adapter/WHAT/optimizations.d.ts +37 -0
- package/dist/adapter/WHAT/platform.d.ts +6 -0
- package/dist/adapter/WHAT/traversal.d.ts +14 -0
- package/dist/adapter/WHAT/values.d.ts +2 -0
- package/dist/adapter/WHAT/whatDOMAdapter.d.ts +5 -0
- package/dist/adapter/defaults.d.ts +26 -0
- package/dist/adapter/interface/XPathCustomUnwrappableNode.d.ts +55 -0
- package/dist/adapter/interface/XPathDOMAdapter.d.ts +16 -0
- package/dist/adapter/interface/XPathDOMOptimizableOperations.d.ts +13 -0
- package/dist/adapter/interface/XPathNameAdapter.d.ts +23 -0
- package/dist/adapter/interface/XPathNode.d.ts +164 -0
- package/dist/adapter/interface/XPathNodeKindAdapter.d.ts +15 -0
- package/dist/adapter/interface/XPathTraversalAdapter.d.ts +38 -0
- package/dist/adapter/interface/XPathValueAdapter.d.ts +9 -0
- package/dist/adapter/xpathDOMProvider.d.ts +80 -0
- package/dist/context/Context.d.ts +12 -10
- package/dist/context/EvaluationContext.d.ts +18 -29
- package/dist/error/IncompatibleRuntimeEnvironmentError.d.ts +2 -0
- package/dist/evaluations/BooleanEvaluation.d.ts +4 -4
- package/dist/evaluations/DateTimeLikeEvaluation.d.ts +4 -4
- package/dist/evaluations/Evaluation.d.ts +12 -12
- package/dist/evaluations/EvaluationType.d.ts +5 -3
- package/dist/evaluations/LocationPathEvaluation.d.ts +44 -68
- package/dist/evaluations/NodeEvaluation.d.ts +6 -6
- package/dist/evaluations/NumberEvaluation.d.ts +4 -4
- package/dist/evaluations/StringEvaluation.d.ts +4 -4
- package/dist/evaluations/ValueEvaluation.d.ts +11 -11
- package/dist/evaluator/DefaultEvaluator.d.ts +16 -0
- package/dist/evaluator/Evaluator.d.ts +32 -26
- package/dist/evaluator/NamespaceResolver.d.ts +16 -10
- package/dist/evaluator/expression/AbsoluteLocationPathExpressionEvaluator.d.ts +0 -1
- package/dist/evaluator/expression/BinaryExpressionEvaluator.d.ts +2 -2
- package/dist/evaluator/expression/BooleanBinaryExpressionEvaluator.d.ts +5 -5
- package/dist/evaluator/expression/ExpressionEvaluator.d.ts +2 -2
- package/dist/evaluator/expression/FilterPathExpressionEvaluator.d.ts +2 -2
- package/dist/evaluator/expression/FunctionCallExpressionEvaluator.d.ts +2 -2
- package/dist/evaluator/expression/LocationPathEvaluator.d.ts +2 -2
- package/dist/evaluator/expression/LocationPathExpressionEvaluator.d.ts +3 -3
- package/dist/evaluator/expression/NumberExpressionEvaluator.d.ts +3 -3
- package/dist/evaluator/expression/NumberLiteralExpressionEvaluator.d.ts +0 -1
- package/dist/evaluator/expression/NumericBinaryExpressionEvaluator.d.ts +2 -2
- package/dist/evaluator/expression/RelativeLocationPathExpressionEvaluator.d.ts +0 -1
- package/dist/evaluator/expression/StringExpressionEvaluator.d.ts +3 -3
- package/dist/evaluator/expression/StringLiteralExpressionEvaluator.d.ts +0 -1
- package/dist/evaluator/expression/UnaryExpressionEvaluator.d.ts +2 -2
- package/dist/evaluator/expression/UnionExpressionEvaluator.d.ts +2 -2
- package/dist/evaluator/expression/factory.d.ts +0 -1
- package/dist/evaluator/functions/BooleanFunction.d.ts +2 -3
- package/dist/evaluator/functions/FunctionAlias.d.ts +2 -3
- package/dist/evaluator/functions/FunctionImplementation.d.ts +14 -14
- package/dist/evaluator/functions/FunctionLibrary.d.ts +6 -6
- package/dist/evaluator/functions/FunctionLibraryCollection.d.ts +3 -3
- package/dist/evaluator/functions/NodeSetFunction.d.ts +4 -4
- package/dist/evaluator/functions/NumberFunction.d.ts +2 -3
- package/dist/evaluator/functions/StringFunction.d.ts +2 -3
- package/dist/evaluator/functions/TypedFunctionImplementation.d.ts +5 -4
- package/dist/evaluator/result/BaseResult.d.ts +13 -9
- package/dist/evaluator/result/BooleanResult.d.ts +5 -6
- package/dist/evaluator/result/NodeSetResult.d.ts +28 -33
- package/dist/evaluator/result/NumberResult.d.ts +5 -6
- package/dist/evaluator/result/PrimitiveResult.d.ts +7 -8
- package/dist/evaluator/result/StringResult.d.ts +5 -6
- package/dist/evaluator/result/XPathEvaluationResult.d.ts +61 -0
- package/dist/evaluator/result/toXPathEvaluationResult.d.ts +5 -0
- package/dist/evaluator/step/Step.d.ts +1 -2
- package/dist/expressionParser-DpqfmhIO.js +3479 -0
- package/dist/expressionParser-DpqfmhIO.js.map +1 -0
- package/dist/expressionParser.d.ts +0 -1
- package/dist/expressionParser.js +1 -1
- package/dist/functions/_shared/number.d.ts +5 -5
- package/dist/functions/_shared/string.d.ts +2 -2
- package/dist/functions/enketo/index.d.ts +0 -1
- package/dist/functions/fn/boolean.d.ts +5 -6
- package/dist/functions/fn/index.d.ts +0 -1
- package/dist/functions/fn/node-set.d.ts +8 -9
- package/dist/functions/fn/number.d.ts +5 -6
- package/dist/functions/fn/string.d.ts +10 -11
- package/dist/functions/javarosa/index.d.ts +0 -1
- package/dist/functions/javarosa/string.d.ts +8 -2
- package/dist/functions/xforms/boolean.d.ts +4 -5
- package/dist/functions/xforms/datetime.d.ts +7 -8
- package/dist/functions/xforms/geo.d.ts +2 -3
- package/dist/functions/xforms/index.d.ts +0 -1
- package/dist/functions/xforms/node-set.d.ts +16 -7
- package/dist/functions/xforms/number.d.ts +21 -22
- package/dist/functions/xforms/select.d.ts +3 -4
- package/dist/functions/xforms/string.d.ts +8 -9
- package/dist/index.d.ts +44 -1
- package/dist/index.js +1575 -1151
- package/dist/index.js.map +1 -1
- package/dist/lib/datetime/coercion.d.ts +0 -1
- package/dist/lib/datetime/functions.d.ts +0 -1
- package/dist/static/grammar/ExpressionParser.d.ts +0 -1
- package/dist/static/grammar/SyntaxLanguage.d.ts +0 -1
- package/dist/static/grammar/SyntaxNode.d.ts +0 -1
- package/dist/static/grammar/SyntaxTree.d.ts +0 -1
- package/dist/static/grammar/TreeSitterXPathParser.d.ts +0 -1
- package/dist/static/grammar/type-names.d.ts +0 -1
- package/dist/xforms/XFormsElementRepresentation.d.ts +15 -0
- package/dist/xforms/XFormsItextTranslations.d.ts +75 -24
- package/dist/xforms/XFormsSecondaryInstances.d.ts +4 -0
- package/dist/xforms/XFormsXPathEvaluator.d.ts +35 -15
- package/package.json +14 -12
- package/dist/evaluator/result/ResultType.d.ts +0 -13
- package/dist/evaluator/result/index.d.ts +0 -8
- package/dist/expressionParser-BRkDdCO9.js +0 -2127
- package/dist/expressionParser-BRkDdCO9.js.map +0 -1
- package/dist/lib/dom/assertions.d.ts +0 -5
- package/dist/lib/dom/predicates.d.ts +0 -12
- package/dist/lib/dom/sort.d.ts +0 -1
- package/dist/lib/dom/traversal.d.ts +0 -22
- package/dist/lib/dom/types.d.ts +0 -21
- package/dist/lib/dom/xml.d.ts +0 -1
- package/dist/shared/constants.d.ts +0 -13
- package/dist/shared/index.d.ts +0 -2
- package/dist/shared/interface.d.ts +0 -33
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { XPathNode } from '../../adapter/interface/XPathNode.ts';
|
|
1
2
|
import { EvaluationContext } from '../../context/EvaluationContext.ts';
|
|
2
3
|
import { Evaluation } from '../../evaluations/Evaluation.ts';
|
|
3
4
|
import { AbsoluteLocationPathNode, AnyExprNode, FilterPathExprNode, RelativeLocationPathNode } from '../../static/grammar/SyntaxNode.ts';
|
|
4
|
-
|
|
5
5
|
export type ExpressionNode = AbsoluteLocationPathNode | AnyExprNode | FilterPathExprNode | RelativeLocationPathNode;
|
|
6
6
|
export interface ExpressionEvaluator {
|
|
7
7
|
readonly syntaxNode: ExpressionNode;
|
|
8
|
-
evaluate(context: EvaluationContext): Evaluation
|
|
8
|
+
evaluate<T extends XPathNode>(context: EvaluationContext<T>): Evaluation<T>;
|
|
9
9
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
import { XPathNode } from '../../adapter/interface/XPathNode.ts';
|
|
1
2
|
import { EvaluationContext } from '../../context/EvaluationContext.ts';
|
|
2
3
|
import { FilterPathExprNode } from '../../static/grammar/SyntaxNode.ts';
|
|
3
4
|
import { ExpressionEvaluator } from './ExpressionEvaluator.ts';
|
|
4
5
|
import { LocationPathEvaluator } from './LocationPathEvaluator.ts';
|
|
5
6
|
import { LocationPathExpressionEvaluator } from './LocationPathExpressionEvaluator.ts';
|
|
6
|
-
|
|
7
7
|
export declare class FilterPathExpressionEvaluator extends LocationPathEvaluator implements ExpressionEvaluator {
|
|
8
8
|
readonly syntaxNode: FilterPathExprNode;
|
|
9
9
|
readonly filterExpression: LocationPathExpressionEvaluator;
|
|
10
10
|
readonly hasSteps: boolean;
|
|
11
11
|
constructor(syntaxNode: FilterPathExprNode);
|
|
12
|
-
evaluateNodes(context: EvaluationContext): Iterable<
|
|
12
|
+
evaluateNodes<T extends XPathNode>(context: EvaluationContext<T>): Iterable<T>;
|
|
13
13
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { XPathNode } from '../../adapter/interface/XPathNode.ts';
|
|
1
2
|
import { EvaluationContext } from '../../context/EvaluationContext.ts';
|
|
2
3
|
import { Evaluation } from '../../evaluations/Evaluation.ts';
|
|
3
4
|
import { FunctionCallNode } from '../../static/grammar/SyntaxNode.ts';
|
|
4
5
|
import { ExpressionEvaluator } from './ExpressionEvaluator.ts';
|
|
5
|
-
|
|
6
6
|
interface FunctionCallName {
|
|
7
7
|
readonly prefix: string | null;
|
|
8
8
|
readonly localName: string;
|
|
@@ -12,6 +12,6 @@ export declare class FunctionCallExpressionEvaluator implements ExpressionEvalua
|
|
|
12
12
|
readonly name: FunctionCallName;
|
|
13
13
|
readonly argumentExpressions: readonly ExpressionEvaluator[];
|
|
14
14
|
constructor(syntaxNode: FunctionCallNode);
|
|
15
|
-
evaluate(context: EvaluationContext): Evaluation
|
|
15
|
+
evaluate<T extends XPathNode>(context: EvaluationContext<T>): Evaluation<T>;
|
|
16
16
|
}
|
|
17
17
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { XPathNode } from '../../adapter/interface/XPathNode.ts';
|
|
1
2
|
import { EvaluationContext } from '../../context/EvaluationContext.ts';
|
|
2
3
|
import { AbsoluteLocationPathNode, FilterPathExprNode, RelativeLocationPathNode } from '../../static/grammar/SyntaxNode.ts';
|
|
3
4
|
import { PathExprSteps } from '../step/Step.ts';
|
|
4
5
|
import { ExpressionEvaluator } from './ExpressionEvaluator.ts';
|
|
5
6
|
import { LocationPathExpressionEvaluator } from './LocationPathExpressionEvaluator.ts';
|
|
6
|
-
|
|
7
7
|
type LocationPathNode = AbsoluteLocationPathNode | FilterPathExprNode | RelativeLocationPathNode;
|
|
8
8
|
interface LocationPathExpressionOptions {
|
|
9
9
|
readonly isAbsolute: boolean;
|
|
@@ -19,6 +19,6 @@ export declare class LocationPathEvaluator extends LocationPathExpressionEvaluat
|
|
|
19
19
|
protected isSelf: boolean;
|
|
20
20
|
protected steps: PathExprSteps;
|
|
21
21
|
constructor(syntaxNode: LocationPathNode, options: LocationPathExpressionOptions);
|
|
22
|
-
evaluateNodes(context: EvaluationContext): Iterable<
|
|
22
|
+
evaluateNodes<T extends XPathNode>(context: EvaluationContext<T>): Iterable<T>;
|
|
23
23
|
}
|
|
24
24
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { XPathNode } from '../../adapter/interface/XPathNode.ts';
|
|
1
2
|
import { EvaluationContext } from '../../context/EvaluationContext.ts';
|
|
2
3
|
import { Evaluation } from '../../evaluations/Evaluation.ts';
|
|
3
4
|
import { ExpressionEvaluator, ExpressionNode } from './ExpressionEvaluator.ts';
|
|
4
|
-
|
|
5
5
|
export declare abstract class LocationPathExpressionEvaluator implements ExpressionEvaluator {
|
|
6
6
|
abstract readonly syntaxNode: ExpressionNode;
|
|
7
|
-
abstract evaluateNodes(context: EvaluationContext): Iterable<
|
|
8
|
-
evaluate(context: EvaluationContext): Evaluation<'NODE'>;
|
|
7
|
+
abstract evaluateNodes<T extends XPathNode>(context: EvaluationContext<T>): Iterable<T>;
|
|
8
|
+
evaluate<T extends XPathNode>(context: EvaluationContext<T>): Evaluation<T, 'NODE'>;
|
|
9
9
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { XPathNode } from '../../adapter/interface/XPathNode.ts';
|
|
1
2
|
import { EvaluationContext } from '../../context/EvaluationContext.ts';
|
|
2
3
|
import { NumberEvaluation } from '../../evaluations/NumberEvaluation.ts';
|
|
3
4
|
import { ExpressionEvaluator, ExpressionNode } from './ExpressionEvaluator.ts';
|
|
4
|
-
|
|
5
5
|
export declare abstract class NumberExpressionEvaluator<ConstValue extends number | null = null> implements ExpressionEvaluator {
|
|
6
6
|
protected readonly constValue: ConstValue;
|
|
7
7
|
constructor(constValue: ConstValue);
|
|
8
8
|
abstract readonly syntaxNode: ExpressionNode;
|
|
9
|
-
abstract evaluateNumber(context: EvaluationContext): number;
|
|
10
|
-
evaluate(context: EvaluationContext): NumberEvaluation
|
|
9
|
+
abstract evaluateNumber<T extends XPathNode>(context: EvaluationContext<T>): number;
|
|
10
|
+
evaluate<T extends XPathNode>(context: EvaluationContext<T>): NumberEvaluation<T>;
|
|
11
11
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { NumberNode } from '../../static/grammar/SyntaxNode.ts';
|
|
2
2
|
import { ExpressionEvaluator } from './ExpressionEvaluator.ts';
|
|
3
3
|
import { NumberExpressionEvaluator } from './NumberExpressionEvaluator.ts';
|
|
4
|
-
|
|
5
4
|
export declare class NumberLiteralExpressionEvaluator extends NumberExpressionEvaluator<number> implements ExpressionEvaluator {
|
|
6
5
|
readonly syntaxNode: NumberNode;
|
|
7
6
|
constructor(syntaxNode: NumberNode);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
import { XPathNode } from '../../adapter/interface/XPathNode.ts';
|
|
1
2
|
import { EvaluationContext } from '../../context/EvaluationContext.ts';
|
|
2
3
|
import { NumberEvaluation } from '../../evaluations/NumberEvaluation.ts';
|
|
3
4
|
import { AdditionExprNode, DivisionExprNode, ModuloExprNode, MultiplicationExprNode, SubtractionExprNode } from '../../static/grammar/SyntaxNode.ts';
|
|
4
5
|
import { BinaryExpressionEvaluator } from './BinaryExpressionEvaluator.ts';
|
|
5
|
-
|
|
6
6
|
type NumericBinaryExprNode = AdditionExprNode | DivisionExprNode | ModuloExprNode | MultiplicationExprNode | SubtractionExprNode;
|
|
7
7
|
type NumericOperation<Node extends NumericBinaryExprNode> = Node extends AdditionExprNode ? 'addition' : Node extends DivisionExprNode ? 'division' : Node extends ModuloExprNode ? 'modulo' : Node extends MultiplicationExprNode ? 'multiplication' : Node extends SubtractionExprNode ? 'subtraction' : never;
|
|
8
8
|
export declare class NumericBinaryExpressionEvaluator<Node extends NumericBinaryExprNode> extends BinaryExpressionEvaluator<Node> {
|
|
9
9
|
readonly operation: NumericOperation<Node>;
|
|
10
10
|
constructor(node: Node);
|
|
11
|
-
evaluate(context: EvaluationContext): NumberEvaluation
|
|
11
|
+
evaluate<T extends XPathNode>(context: EvaluationContext<T>): NumberEvaluation<T>;
|
|
12
12
|
}
|
|
13
13
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { RelativeLocationPathNode } from '../../static/grammar/SyntaxNode.ts';
|
|
2
2
|
import { ExpressionEvaluator } from './ExpressionEvaluator.ts';
|
|
3
3
|
import { LocationPathEvaluator } from './LocationPathEvaluator.ts';
|
|
4
|
-
|
|
5
4
|
export declare class RelativeLocationPathExpressionEvaluator extends LocationPathEvaluator implements ExpressionEvaluator {
|
|
6
5
|
readonly syntaxNode: RelativeLocationPathNode;
|
|
7
6
|
constructor(syntaxNode: RelativeLocationPathNode);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { XPathNode } from '../../adapter/interface/XPathNode.ts';
|
|
1
2
|
import { EvaluationContext } from '../../context/EvaluationContext.ts';
|
|
2
3
|
import { StringEvaluation } from '../../evaluations/StringEvaluation.ts';
|
|
3
4
|
import { ExpressionEvaluator, ExpressionNode } from './ExpressionEvaluator.ts';
|
|
4
|
-
|
|
5
5
|
export declare abstract class StringExpressionEvaluator<ConstValue extends string | null = null> implements ExpressionEvaluator {
|
|
6
6
|
protected readonly constValue: ConstValue;
|
|
7
7
|
constructor(constValue: ConstValue);
|
|
8
8
|
abstract readonly syntaxNode: ExpressionNode;
|
|
9
|
-
abstract evaluateString(context: EvaluationContext): string;
|
|
10
|
-
evaluate(context: EvaluationContext): StringEvaluation
|
|
9
|
+
abstract evaluateString<T extends XPathNode>(context: EvaluationContext<T>): string;
|
|
10
|
+
evaluate<T extends XPathNode>(context: EvaluationContext<T>): StringEvaluation<T>;
|
|
11
11
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { LiteralNode } from '../../static/grammar/SyntaxNode.ts';
|
|
2
2
|
import { ExpressionEvaluator } from './ExpressionEvaluator.ts';
|
|
3
3
|
import { StringExpressionEvaluator } from './StringExpressionEvaluator.ts';
|
|
4
|
-
|
|
5
4
|
export declare class StringLiteralExpressionEvaluator extends StringExpressionEvaluator<string> implements ExpressionEvaluator {
|
|
6
5
|
readonly syntaxNode: LiteralNode;
|
|
7
6
|
constructor(syntaxNode: LiteralNode);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { XPathNode } from '../../adapter/interface/XPathNode.ts';
|
|
1
2
|
import { EvaluationContext } from '../../context/EvaluationContext.ts';
|
|
2
3
|
import { UnaryExprNode } from '../../static/grammar/SyntaxNode.ts';
|
|
3
4
|
import { ExpressionEvaluator } from './ExpressionEvaluator.ts';
|
|
4
5
|
import { NumberExpressionEvaluator } from './NumberExpressionEvaluator.ts';
|
|
5
|
-
|
|
6
6
|
export declare class UnaryExpressionEvaluator extends NumberExpressionEvaluator {
|
|
7
7
|
readonly syntaxNode: UnaryExprNode;
|
|
8
8
|
readonly operand: ExpressionEvaluator;
|
|
9
9
|
constructor(syntaxNode: UnaryExprNode);
|
|
10
|
-
evaluateNumber(context: EvaluationContext): number;
|
|
10
|
+
evaluateNumber<T extends XPathNode>(context: EvaluationContext<T>): number;
|
|
11
11
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import { XPathNode } from '../../adapter/interface/XPathNode.ts';
|
|
1
2
|
import { EvaluationContext } from '../../context/EvaluationContext.ts';
|
|
2
3
|
import { UnionExprNode } from '../../static/grammar/SyntaxNode.ts';
|
|
3
4
|
import { ExpressionEvaluator } from './ExpressionEvaluator.ts';
|
|
4
5
|
import { LocationPathExpressionEvaluator } from './LocationPathExpressionEvaluator.ts';
|
|
5
|
-
|
|
6
6
|
export declare class UnionExpressionEvaluator extends LocationPathExpressionEvaluator {
|
|
7
7
|
readonly syntaxNode: UnionExprNode;
|
|
8
8
|
readonly lhs: ExpressionEvaluator;
|
|
9
9
|
readonly rhs: ExpressionEvaluator;
|
|
10
10
|
constructor(syntaxNode: UnionExprNode);
|
|
11
|
-
evaluateNodes(context: EvaluationContext): Iterable<
|
|
11
|
+
evaluateNodes<T extends XPathNode>(context: EvaluationContext<T>): Iterable<T>;
|
|
12
12
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AnyExprNode, ArgumentNode, ExprNode, XPathNode } from '../../static/grammar/SyntaxNode.ts';
|
|
2
2
|
import { ExpressionEvaluator } from './ExpressionEvaluator.ts';
|
|
3
|
-
|
|
4
3
|
type EvaluableExprNode = AnyExprNode | ArgumentNode | ExprNode | XPathNode;
|
|
5
4
|
export declare const createExpression: (syntaxNode: EvaluableExprNode) => ExpressionEvaluator;
|
|
6
5
|
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FunctionSignature } from './FunctionImplementation.ts';
|
|
2
2
|
import { TypedFunctionCallable, TypedFunctionImplementation } from './TypedFunctionImplementation.ts';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
constructor(localName: string, signature: FunctionSignature<Length>, call: TypedFunctionCallable<boolean>);
|
|
3
|
+
export declare class BooleanFunction extends TypedFunctionImplementation<boolean> {
|
|
4
|
+
constructor(localName: string, signature: FunctionSignature, call: TypedFunctionCallable<boolean>);
|
|
6
5
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FunctionImplementation } from './FunctionImplementation.ts';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
constructor(localName: string, baseImplementation: FunctionImplementation<Length>);
|
|
2
|
+
export declare class FunctionAlias extends FunctionImplementation {
|
|
3
|
+
constructor(localName: string, baseImplementation: FunctionImplementation);
|
|
5
4
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { XPathNode } from '../../adapter/interface/XPathNode.ts';
|
|
2
|
+
import { EvaluationContext } from '../../context/EvaluationContext.ts';
|
|
3
3
|
import { Evaluation } from '../../evaluations/Evaluation.ts';
|
|
4
|
-
import { EvaluationType } from '../../evaluations/EvaluationType.ts';
|
|
4
|
+
import { EvaluationType, PrimitiveEvaluationType } from '../../evaluations/EvaluationType.ts';
|
|
5
5
|
import { LocationPathEvaluation } from '../../evaluations/LocationPathEvaluation.ts';
|
|
6
|
-
|
|
7
6
|
export declare class UnknownFunctionError extends Error {
|
|
8
7
|
constructor(functionName: string);
|
|
9
8
|
}
|
|
@@ -16,25 +15,26 @@ export interface Parameter {
|
|
|
16
15
|
readonly arityType: ParameterArityType;
|
|
17
16
|
readonly typeHint?: ParameterTypeHint;
|
|
18
17
|
}
|
|
19
|
-
export type FunctionSignature
|
|
18
|
+
export type FunctionSignature = readonly Parameter[];
|
|
19
|
+
export type ArgumentEvaluation<T extends XPathNode> = Evaluation<any, PrimitiveEvaluationType> | Evaluation<T, EvaluationType>;
|
|
20
20
|
export interface EvaluableArgument {
|
|
21
|
-
evaluate(context:
|
|
21
|
+
evaluate<T extends XPathNode>(context: EvaluationContext<T>): ArgumentEvaluation<T>;
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
type ValidArguments<Arguments extends readonly EvaluableArgument[], IsValid> = [
|
|
24
|
+
true
|
|
25
|
+
] extends [IsValid] ? Arguments : never;
|
|
24
26
|
interface FunctionArity {
|
|
25
27
|
readonly min: number;
|
|
26
28
|
readonly max: number;
|
|
27
29
|
}
|
|
28
|
-
export type FunctionCallable = <Arguments extends readonly EvaluableArgument[]>(context: LocationPathEvaluation
|
|
29
|
-
export declare class FunctionImplementation
|
|
30
|
+
export type FunctionCallable = <T extends XPathNode, Arguments extends readonly EvaluableArgument[]>(context: LocationPathEvaluation<T>, args: Arguments) => Evaluation<T>;
|
|
31
|
+
export declare class FunctionImplementation {
|
|
30
32
|
readonly localName: string;
|
|
31
|
-
readonly signature: FunctionSignature
|
|
33
|
+
readonly signature: FunctionSignature;
|
|
32
34
|
readonly arity: FunctionArity;
|
|
33
35
|
protected readonly callable: FunctionCallable;
|
|
34
|
-
constructor(localName: string, signature: FunctionSignature
|
|
35
|
-
call(context: LocationPathEvaluation
|
|
36
|
+
constructor(localName: string, signature: FunctionSignature, runtimeImplementation: FunctionCallable | FunctionImplementation);
|
|
37
|
+
call<T extends XPathNode, Args extends readonly EvaluableArgument[]>(context: LocationPathEvaluation<T>, args: Args): Evaluation<T>;
|
|
36
38
|
protected validateArguments<Arguments extends readonly EvaluableArgument[]>(args: Arguments): asserts args is ValidArguments<Arguments, true>;
|
|
37
39
|
}
|
|
38
|
-
export interface AnyFunctionImplementation extends FunctionImplementation<number> {
|
|
39
|
-
}
|
|
40
40
|
export {};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
+
import { XPathNode } from '../../adapter/interface/XPathNode.ts';
|
|
1
2
|
import { Evaluation } from '../../evaluations/Evaluation.ts';
|
|
2
3
|
import { LocationPathEvaluation } from '../../evaluations/LocationPathEvaluation.ts';
|
|
3
|
-
import {
|
|
4
|
-
|
|
4
|
+
import { EvaluableArgument, FunctionImplementation } from './FunctionImplementation.ts';
|
|
5
5
|
type NamespaceURI = string | null;
|
|
6
6
|
type LocalName = string;
|
|
7
7
|
interface QualifiedName {
|
|
8
8
|
readonly namespaceURI: NamespaceURI;
|
|
9
9
|
readonly localName: LocalName;
|
|
10
10
|
}
|
|
11
|
-
export interface LibraryFunction extends
|
|
11
|
+
export interface LibraryFunction extends FunctionImplementation {
|
|
12
12
|
readonly qualifiedName: QualifiedName;
|
|
13
13
|
}
|
|
14
14
|
export declare class FunctionLibrary {
|
|
15
15
|
readonly namespaceURI: string;
|
|
16
16
|
protected readonly implementations: Map<LocalName, LibraryFunction>;
|
|
17
|
-
constructor(namespaceURI: string, entries: readonly
|
|
17
|
+
constructor(namespaceURI: string, entries: readonly FunctionImplementation[]);
|
|
18
18
|
has(localName: LocalName): boolean;
|
|
19
|
-
call(localName: LocalName, context: LocationPathEvaluation
|
|
20
|
-
getImplementation(localName: LocalName): FunctionImplementation
|
|
19
|
+
call<T extends XPathNode>(localName: LocalName, context: LocationPathEvaluation<T>, args: readonly EvaluableArgument[]): Evaluation<T>;
|
|
20
|
+
getImplementation(localName: LocalName): FunctionImplementation | null;
|
|
21
21
|
}
|
|
22
22
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { XPathNode } from '../../adapter/interface/XPathNode.ts';
|
|
1
2
|
import { Context } from '../../context/Context.ts';
|
|
2
3
|
import { FunctionImplementation } from './FunctionImplementation.ts';
|
|
3
4
|
import { FunctionLibrary } from './FunctionLibrary.ts';
|
|
4
|
-
|
|
5
5
|
interface BaseFunctionNameLookup {
|
|
6
6
|
readonly namespaceURI?: string | null;
|
|
7
7
|
readonly prefix?: string | null;
|
|
@@ -36,7 +36,7 @@ export declare class FunctionLibraryCollection {
|
|
|
36
36
|
protected readonly defaultFunctionLibraries: readonly FunctionLibrary[];
|
|
37
37
|
protected readonly namespacedFunctionLibraries: ReadonlyMap<string, FunctionLibrary>;
|
|
38
38
|
constructor(functionLibraries: Iterable<FunctionLibrary>, options?: FunctionLibraryCollectionOptions);
|
|
39
|
-
getDefaultImplementation(localName: string): FunctionImplementation
|
|
40
|
-
getImplementation(context: Context
|
|
39
|
+
getDefaultImplementation(localName: string): FunctionImplementation | null;
|
|
40
|
+
getImplementation<T extends XPathNode>(context: Context<T>, name: FunctionNameLookup): FunctionImplementation | null;
|
|
41
41
|
}
|
|
42
42
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { XPathNode } from '../../adapter/interface/XPathNode.ts';
|
|
1
2
|
import { LocationPathEvaluation } from '../../evaluations/LocationPathEvaluation.ts';
|
|
2
3
|
import { EvaluableArgument, FunctionSignature, FunctionImplementation } from './FunctionImplementation.ts';
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
constructor(localName: string, signature: FunctionSignature<Length>, call: NodeSetFunctionCallable);
|
|
4
|
+
export type NodeSetFunctionCallable = <T extends XPathNode, Arguments extends readonly EvaluableArgument[]>(context: LocationPathEvaluation<T>, args: Arguments) => Iterable<T>;
|
|
5
|
+
export declare class NodeSetFunction extends FunctionImplementation {
|
|
6
|
+
constructor(localName: string, signature: FunctionSignature, call: NodeSetFunctionCallable);
|
|
7
7
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FunctionSignature } from './FunctionImplementation.ts';
|
|
2
2
|
import { TypedFunctionCallable, TypedFunctionImplementation } from './TypedFunctionImplementation.ts';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
constructor(localName: string, signature: FunctionSignature<Length>, call: TypedFunctionCallable<number>);
|
|
3
|
+
export declare class NumberFunction extends TypedFunctionImplementation<number> {
|
|
4
|
+
constructor(localName: string, signature: FunctionSignature, call: TypedFunctionCallable<number>);
|
|
6
5
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FunctionSignature } from './FunctionImplementation.ts';
|
|
2
2
|
import { TypedFunctionCallable, TypedFunctionImplementation } from './TypedFunctionImplementation.ts';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
constructor(localName: string, signature: FunctionSignature<Length>, call: TypedFunctionCallable<string>);
|
|
3
|
+
export declare class StringFunction extends TypedFunctionImplementation<string> {
|
|
4
|
+
constructor(localName: string, signature: FunctionSignature, call: TypedFunctionCallable<string>);
|
|
6
5
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { XPathNode } from '../../adapter/interface/XPathNode.ts';
|
|
1
2
|
import { Evaluation } from '../../evaluations/Evaluation';
|
|
2
3
|
import { LocationPathEvaluation } from '../../evaluations/LocationPathEvaluation.ts';
|
|
3
4
|
import { EvaluableArgument, FunctionSignature, FunctionImplementation } from './FunctionImplementation.ts';
|
|
4
|
-
|
|
5
|
-
export type
|
|
6
|
-
export declare class TypedFunctionImplementation<
|
|
7
|
-
protected constructor(localName: string,
|
|
5
|
+
export type TypedFunctionCallable<R> = <T extends XPathNode, Arguments extends readonly EvaluableArgument[]>(context: LocationPathEvaluation<T>, args: Arguments) => R;
|
|
6
|
+
export type TypedFunctionResultFactory<R> = <T extends XPathNode>(context: LocationPathEvaluation<T>, value: R) => Evaluation<T>;
|
|
7
|
+
export declare abstract class TypedFunctionImplementation<R> extends FunctionImplementation {
|
|
8
|
+
protected constructor(localName: string, signature: FunctionSignature, call: TypedFunctionCallable<R>, resultFactory: TypedFunctionResultFactory<R>);
|
|
8
9
|
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export type PrimitiveResultType =
|
|
4
|
-
type
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
protected abstract readonly nodes: Iterable<Node> | null;
|
|
8
|
-
abstract readonly isIntermediateResult: boolean;
|
|
1
|
+
import { XPathNode } from '../../adapter/interface/XPathNode.ts';
|
|
2
|
+
import { ANY_UNORDERED_NODE_TYPE, BOOLEAN_TYPE, FIRST_ORDERED_NODE_TYPE, NUMBER_TYPE, ORDERED_NODE_ITERATOR_TYPE, ORDERED_NODE_SNAPSHOT_TYPE, STRING_TYPE, UNORDERED_NODE_ITERATOR_TYPE, UNORDERED_NODE_SNAPSHOT_TYPE, XPathEvaluationResult, XPathEvaluationResultType } from './XPathEvaluationResult.ts';
|
|
3
|
+
export type PrimitiveResultType = BOOLEAN_TYPE | NUMBER_TYPE | STRING_TYPE;
|
|
4
|
+
export type NodeSetResultType = ANY_UNORDERED_NODE_TYPE | FIRST_ORDERED_NODE_TYPE | ORDERED_NODE_ITERATOR_TYPE | ORDERED_NODE_SNAPSHOT_TYPE | UNORDERED_NODE_ITERATOR_TYPE | UNORDERED_NODE_SNAPSHOT_TYPE;
|
|
5
|
+
declare const NUMBER_TYPE: 1, STRING_TYPE: 2, BOOLEAN_TYPE: 3, UNORDERED_NODE_ITERATOR_TYPE: 4, ORDERED_NODE_ITERATOR_TYPE: 5, UNORDERED_NODE_SNAPSHOT_TYPE: 6, ORDERED_NODE_SNAPSHOT_TYPE: 7, ANY_UNORDERED_NODE_TYPE: 8, FIRST_ORDERED_NODE_TYPE: 9;
|
|
6
|
+
export declare abstract class BaseResult<T extends XPathNode> implements XPathEvaluationResult<T> {
|
|
9
7
|
static readonly ANY_TYPE: 0;
|
|
10
8
|
static readonly NUMBER_TYPE: 1;
|
|
11
9
|
static readonly STRING_TYPE: 2;
|
|
@@ -26,9 +24,15 @@ export declare abstract class BaseResult {
|
|
|
26
24
|
readonly ORDERED_NODE_SNAPSHOT_TYPE: 7;
|
|
27
25
|
readonly ANY_UNORDERED_NODE_TYPE: 8;
|
|
28
26
|
readonly FIRST_ORDERED_NODE_TYPE: 9;
|
|
29
|
-
protected
|
|
27
|
+
protected abstract readonly nodes: Iterable<T> | null;
|
|
28
|
+
abstract readonly resultType: XPathEvaluationResultType;
|
|
29
|
+
abstract readonly invalidIteratorState: boolean;
|
|
30
|
+
abstract readonly singleNodeValue: T | null;
|
|
31
|
+
abstract readonly snapshotLength: number;
|
|
30
32
|
abstract readonly booleanValue: boolean;
|
|
31
33
|
abstract readonly numberValue: number;
|
|
32
34
|
abstract readonly stringValue: string;
|
|
35
|
+
abstract iterateNext(): T | null;
|
|
36
|
+
abstract snapshotItem(index: number): T | null;
|
|
33
37
|
}
|
|
34
38
|
export {};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { XPathNode } from '../../adapter/interface/XPathNode.ts';
|
|
2
2
|
import { Evaluation } from '../../evaluations/Evaluation.ts';
|
|
3
3
|
import { PrimitiveResult } from './PrimitiveResult.ts';
|
|
4
|
-
|
|
5
|
-
export declare class BooleanResult extends PrimitiveResult implements
|
|
6
|
-
readonly isIntermediateResult = false;
|
|
7
|
-
protected readonly type: 3;
|
|
4
|
+
import { XPathEvaluationResult } from './XPathEvaluationResult.ts';
|
|
5
|
+
export declare class BooleanResult<T extends XPathNode> extends PrimitiveResult<T> implements XPathEvaluationResult<T> {
|
|
8
6
|
protected readonly nodes: null;
|
|
7
|
+
readonly resultType: 3;
|
|
9
8
|
readonly booleanValue: boolean;
|
|
10
9
|
readonly numberValue: number;
|
|
11
10
|
readonly stringValue: string;
|
|
12
|
-
constructor(evaluation: Evaluation);
|
|
11
|
+
constructor(evaluation: Evaluation<T>);
|
|
13
12
|
}
|
|
@@ -1,55 +1,50 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { XPathNode } from '../../adapter/interface/XPathNode.ts';
|
|
2
|
+
import { XPathDOMProvider } from '../../adapter/xpathDOMProvider.ts';
|
|
2
3
|
import { Reiterable } from '../../lib/iterators/index.ts';
|
|
3
4
|
import { NodeSetResultType, BaseResult } from './BaseResult.ts';
|
|
4
|
-
|
|
5
|
+
import { XPathEvaluationResult } from './XPathEvaluationResult.ts';
|
|
5
6
|
interface ComputedNodeSetResult {
|
|
6
7
|
readonly computedBooleanValue: boolean;
|
|
7
8
|
readonly computedNumberValue: number;
|
|
8
9
|
readonly computedStringValue: string;
|
|
9
10
|
}
|
|
10
|
-
export declare abstract class NodeSetResult extends BaseResult implements
|
|
11
|
-
protected readonly
|
|
12
|
-
readonly
|
|
13
|
-
protected readonly
|
|
14
|
-
protected readonly nodes: Iterable<Node>;
|
|
11
|
+
export declare abstract class NodeSetResult<T extends XPathNode> extends BaseResult<T> implements XPathEvaluationResult<T> {
|
|
12
|
+
protected readonly domProvider: XPathDOMProvider<T>;
|
|
13
|
+
protected readonly value: Iterable<T>;
|
|
14
|
+
protected readonly nodes: Iterable<T>;
|
|
15
15
|
protected computedBooleanValue: boolean | null;
|
|
16
16
|
protected computedNumberValue: number | null;
|
|
17
17
|
protected computedStringValue: string | null;
|
|
18
18
|
get booleanValue(): boolean;
|
|
19
19
|
get numberValue(): number;
|
|
20
20
|
get stringValue(): string;
|
|
21
|
-
protected computedSnapshotValue: readonly
|
|
22
|
-
abstract readonly resultType:
|
|
23
|
-
|
|
24
|
-
abstract readonly singleNodeValue: Node | null;
|
|
25
|
-
abstract readonly snapshotLength: number;
|
|
26
|
-
constructor(value: Iterable<Node>);
|
|
21
|
+
protected computedSnapshotValue: readonly T[] | null;
|
|
22
|
+
abstract readonly resultType: NodeSetResultType;
|
|
23
|
+
constructor(domProvider: XPathDOMProvider<T>, value: Iterable<T>);
|
|
27
24
|
protected compute(): ComputedNodeSetResult;
|
|
28
|
-
abstract iterateNext(): Node | null;
|
|
29
|
-
abstract snapshotItem(index: number): Node | null;
|
|
30
25
|
}
|
|
31
|
-
export declare class NodeSetSnapshotResult extends NodeSetResult {
|
|
32
|
-
readonly resultType:
|
|
33
|
-
readonly snapshot: readonly
|
|
34
|
-
readonly snapshotIterator: IterableIterator<
|
|
26
|
+
export declare class NodeSetSnapshotResult<T extends XPathNode> extends NodeSetResult<T> implements XPathEvaluationResult<T> {
|
|
27
|
+
readonly resultType: NodeSetResultType;
|
|
28
|
+
readonly snapshot: readonly T[];
|
|
29
|
+
readonly snapshotIterator: IterableIterator<T>;
|
|
35
30
|
readonly snapshotLength: number;
|
|
36
31
|
readonly invalidIteratorState: boolean;
|
|
37
|
-
readonly singleNodeValue:
|
|
38
|
-
constructor(resultType:
|
|
39
|
-
iterateNext():
|
|
40
|
-
snapshotItem(index: number):
|
|
32
|
+
readonly singleNodeValue: T | null;
|
|
33
|
+
constructor(domProvider: XPathDOMProvider<T>, resultType: NodeSetResultType, nodes: Iterable<T>);
|
|
34
|
+
iterateNext(): T | null;
|
|
35
|
+
snapshotItem(index: number): T | null;
|
|
41
36
|
}
|
|
42
|
-
export declare class NodeSetIteratorResult extends NodeSetResult {
|
|
43
|
-
readonly resultType:
|
|
44
|
-
protected activeIterator: IterableIterator<
|
|
45
|
-
protected nodes: Reiterable<
|
|
37
|
+
export declare class NodeSetIteratorResult<T extends XPathNode> extends NodeSetResult<T> implements XPathEvaluationResult<T> {
|
|
38
|
+
readonly resultType: NodeSetResultType;
|
|
39
|
+
protected activeIterator: IterableIterator<T> | null;
|
|
40
|
+
protected nodes: Reiterable<T>;
|
|
46
41
|
readonly invalidIteratorState: boolean;
|
|
47
|
-
protected computedSingleNodeValue:
|
|
48
|
-
get singleNodeValue():
|
|
42
|
+
protected computedSingleNodeValue: T | null | undefined;
|
|
43
|
+
get singleNodeValue(): T | null;
|
|
49
44
|
get snapshotLength(): number;
|
|
50
|
-
constructor(resultType:
|
|
51
|
-
protected activateIterator(): IterableIterator<
|
|
52
|
-
iterateNext():
|
|
53
|
-
snapshotItem(_index: number):
|
|
45
|
+
constructor(domProvider: XPathDOMProvider<T>, resultType: NodeSetResultType, nodes: Iterable<T>);
|
|
46
|
+
protected activateIterator(): IterableIterator<T>;
|
|
47
|
+
iterateNext(): T | null;
|
|
48
|
+
snapshotItem(_index: number): T | null;
|
|
54
49
|
}
|
|
55
50
|
export {};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { XPathNode } from '../../adapter/interface/XPathNode.ts';
|
|
2
2
|
import { Evaluation } from '../../evaluations/Evaluation.ts';
|
|
3
3
|
import { PrimitiveResult } from './PrimitiveResult.ts';
|
|
4
|
-
|
|
5
|
-
export declare class NumberResult extends PrimitiveResult implements
|
|
6
|
-
readonly isIntermediateResult = false;
|
|
7
|
-
protected readonly type: 1;
|
|
4
|
+
import { XPathEvaluationResult } from './XPathEvaluationResult.ts';
|
|
5
|
+
export declare class NumberResult<T extends XPathNode> extends PrimitiveResult<T> implements XPathEvaluationResult<T> {
|
|
8
6
|
protected readonly nodes: null;
|
|
7
|
+
readonly resultType: 1;
|
|
9
8
|
readonly booleanValue: boolean;
|
|
10
9
|
readonly numberValue: number;
|
|
11
10
|
readonly stringValue: string;
|
|
12
|
-
constructor(evaluation: Evaluation);
|
|
11
|
+
constructor(evaluation: Evaluation<T>);
|
|
13
12
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { XPathNode } from '../../adapter/interface/XPathNode.ts';
|
|
2
2
|
import { PrimitiveResultType, BaseResult } from './BaseResult.ts';
|
|
3
|
-
|
|
4
|
-
export declare abstract class PrimitiveResult extends BaseResult implements
|
|
5
|
-
|
|
6
|
-
get
|
|
7
|
-
get singleNodeValue(): Node | null;
|
|
3
|
+
import { XPathEvaluationResult } from './XPathEvaluationResult.ts';
|
|
4
|
+
export declare abstract class PrimitiveResult<T extends XPathNode> extends BaseResult<T> implements XPathEvaluationResult<T> {
|
|
5
|
+
abstract readonly resultType: PrimitiveResultType;
|
|
6
|
+
get singleNodeValue(): T | null;
|
|
8
7
|
get snapshotLength(): number;
|
|
9
8
|
readonly invalidIteratorState = true;
|
|
10
|
-
iterateNext():
|
|
11
|
-
snapshotItem(_index?: number):
|
|
9
|
+
iterateNext(): T | null;
|
|
10
|
+
snapshotItem(_index?: number): T | null;
|
|
12
11
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { XPathNode } from '../../adapter/interface/XPathNode.ts';
|
|
2
2
|
import { Evaluation } from '../../evaluations/Evaluation.ts';
|
|
3
3
|
import { PrimitiveResult } from './PrimitiveResult.ts';
|
|
4
|
-
|
|
5
|
-
export declare class StringResult extends PrimitiveResult implements
|
|
6
|
-
readonly isIntermediateResult = false;
|
|
7
|
-
protected readonly type: 2;
|
|
4
|
+
import { XPathEvaluationResult } from './XPathEvaluationResult.ts';
|
|
5
|
+
export declare class StringResult<T extends XPathNode> extends PrimitiveResult<T> implements XPathEvaluationResult<T> {
|
|
8
6
|
protected readonly nodes: null;
|
|
7
|
+
readonly resultType: 2;
|
|
9
8
|
readonly booleanValue: boolean;
|
|
10
9
|
readonly numberValue: number;
|
|
11
10
|
readonly stringValue: string;
|
|
12
|
-
constructor(evaluation: Evaluation);
|
|
11
|
+
constructor(evaluation: Evaluation<T>);
|
|
13
12
|
}
|