@universis/common
Version:
Universis - common directives and services
22 lines (21 loc) • 970 B
TypeScript
import { PipeTransform } from '@angular/core';
import { TemplateSettings } from 'lodash';
/**
* Template Pipe is an impure pipe that can escape
* HTML and interpolated data properties and
* execute JavaScript in "evaluate" delimiters
*/
export declare class TemplatePipe implements PipeTransform {
constructor();
/**
* Uses lodash template function to generate a string
* from a given template escaping the delimiters. It
* deletes the template source after its initialization,
* generates the string and nullifies the compiled template
* function variable to be garbage-collected.
* @param {string} inputTemplate: The template used to generate the string
* @param {any} value: The parameter passed to compiled template function
* @param {Object | undefined} options: Custom options to pass to lodash template
*/
transform(inputTemplate: string, value: any, options?: TemplateSettings | undefined): any;
}