nope/resources/ui/graph/interfaces/IComplexTemplate.ts
2020-11-09 07:42:24 +01:00

16 lines
546 B
TypeScript

import { IJsonSchema } from '../../../../lib/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}
}