UNPKG

docxml

Version:

TypeScript (component) library for building and parsing a DOCX file

18 lines (17 loc) 1.7 kB
/** * @file * Proxies most of the fontoxpath methods and fixes some of the typing around it. Also, XPath errors * will no longer have a stack trace pointing to the (minified) fontoxpath internals, but instead * tell you where the query was run from. */ import fontoxpath from 'fontoxpath'; export type { INodesFactory } from 'fontoxpath'; export declare const XQUERY_3_1_LANGUAGE: fontoxpath.Language.XQUERY_3_1_LANGUAGE; export declare function evaluateXPath(...[query, node, domFacade, variables, returnType, options]: Parameters<typeof fontoxpath.evaluateXPath>): any; export declare function evaluateXPathToArray(...[query, node, domFacade, variables, options]: Parameters<typeof fontoxpath.evaluateXPathToArray>): any[]; export declare function evaluateXPathToMap<P = Record<string, unknown>>(...[query, node, domFacade, variables, options]: Parameters<typeof fontoxpath.evaluateXPathToMap>): P; export declare function evaluateXPathToFirstNode(...[query, node, domFacade, variables, options]: Parameters<typeof fontoxpath.evaluateXPathToFirstNode>): Node | null; export declare function evaluateXPathToNodes(...[query, node, domFacade, variables, options]: Parameters<typeof fontoxpath.evaluateXPathToNodes>): Node[]; export declare function evaluateXPathToBoolean(...[query, node, domFacade, variables, options]: Parameters<typeof fontoxpath.evaluateXPathToBoolean>): boolean; export declare function evaluateXPathToNumber(...[query, node, domFacade, variables, options]: Parameters<typeof fontoxpath.evaluateXPathToNumber>): number; export declare function evaluateXPathToString(...[query, node, domFacade, variables, options]: Parameters<typeof fontoxpath.evaluateXPathToString>): string;