/** * A drop-in replacement for lodash's `template`, limited to interpolation. * * Supported delimiters (lodash defaults): * `<%= expression %>` — interpolate * `${ expression }` — interpolate (ES template syntax) * `<%- expression %>` — interpolate, HTML-escaped * * `<% statements %>` (the "evaluate" delimiter) is intentionally not supported. * * Unlike lodash, the compiled template is not built with `new Function`, so it * works under a CSP that forbids `unsafe-eval`. The price is a restricted * expression grammar: literals, identifiers resolved against the data object, * property access and function calls. Operators, assignments and anything else * throw a `SyntaxError` at compile time. */ type TemplateData = Record; /** * Compiles `source` into a function that interpolates a data object into it, * mirroring `lodash.template(source)(data)` for interpolation-only templates. */ export declare const safeTemplate: (source: string) => (data?: TemplateData) => string; export {}; //# sourceMappingURL=safeTemplate.d.ts.map