16 lines
539 B
TypeScript
16 lines
539 B
TypeScript
import { IJsonSchema } from '../../../types/IJSONSchema';
|
|
|
|
export interface IComplexTemplate<D> {
|
|
type: 'complex'
|
|
/** The Mustache Template */
|
|
mustache: string;
|
|
/** The Schema for the Query */
|
|
schema: IJsonSchema;
|
|
/** Sample Data => Required for Rendering */
|
|
example: {
|
|
[index: string]: any
|
|
}
|
|
// Function to Adapt the Template.
|
|
adaptSchema? (template: IComplexTemplate<D>, data: D): IComplexTemplate<D>,
|
|
adaptData? (data: D, genObject: {[index: string] : any}): {[index: string] : any}
|
|
} |