@designliquido/xpath
    Preparing search index...

    Interface FunctionItem

    Represents a function item - a first-class function value in XPath 3.0.

    Function items can be:

    • Named functions obtained via function references (fn:upper-case#1)
    • Anonymous inline functions (function($x) { $x + 1 })
    • Partially applied functions

    This interface extends XPathFunctionItem from context.ts to ensure FunctionItem values are valid XPathResult values.

    interface FunctionItem {
        __isFunctionItem: true;
        type?: FunctionType;
        implementation: (...args: any[]) => any;
        name?: string;
        namespace?: string;
        arity: number;
        closureContext?: Record<string, any>;
    }
    Index

    Properties

    __isFunctionItem: true

    Marker to identify this as a function item

    The type signature of the function

    implementation: (...args: any[]) => any

    The actual implementation

    name?: string

    Function name (undefined for anonymous functions)

    namespace?: string

    Namespace URI for named functions

    arity: number

    Number of parameters

    closureContext?: Record<string, any>

    Captured closure context for inline functions