docxtemplater
Version:
Generate docx, pptx, and xlsx from templates (Word, Powerpoint and Excel documents), from Node.js, the Browser and the command line
34 lines (29 loc) • 878 B
TypeScript
import { DXT } from "./js/docxtemplater";
interface ParserOptions {
filters?: { [x: string]: (input: any, ...filters: any[]) => any };
csp?: boolean;
cache?: any;
literals?: { [x: string]: any };
isIdentifierStart?: (char: string) => boolean;
isIdentifierContinue?: (char: string) => boolean;
handleDotThis?: boolean;
postEvaluate?: (
result: any,
tag: string,
scope: any,
context: DXT.ParserContext
) => any;
postCompile?: (tag: string, meta: any, expr: any) => void;
}
interface ExpressionParser extends DXT.Parser {
compiled: any;
getIdentifiers(): string[];
getObjectIdentifiers(): any;
}
type Parser = {
(tag: string): ExpressionParser;
filters: { [x: string]: (input: any, ...filters: any[]) => any };
configure: (options: ParserOptions) => (tag: string) => DXT.Parser;
};
declare var expressionParser: Parser;
export default expressionParser;