import { ExpressionRenderDefinition } from './types' ; export class ExpressionRenderer < Config = unknown > { public readonly name : string ; public readonly displayName : string ; public readonly help : string ; public readonly validate : ( ) => void | Error ; public readonly reuseDomNode : boolean ; public readonly render : ExpressionRenderDefinition < Config > [ 'render' ] ; constructor ( config ) { const { name , displayName , help , validate , reuseDomNode , render } = config ; this . name = name ; this . displayName = displayName || name ; this . help = help || '' ; this . validate = validate || ( ( ) => { } ) ; this . reuseDomNode = Boolean ( reuseDomNode ) ; this . render = render ; } }