UNPKG

som-exp-sdk

Version:

Evaluate the User Expression

40 lines (39 loc) 1.24 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ExpressionTypeInfo = void 0; class ExpressionTypeInfo { constructor(className, fileName, methods) { this.className = ""; this.fileName = ""; this.methods = []; this.setClassName = (className) => { this.className = className; }; this.setFileName = (fileName) => { this.fileName = fileName; }; this.setMethods = (methods) => { this.methods = methods; }; this.getClassName = () => { return this.className; }; this.getFileName = () => { return this.fileName; }; this.getMethods = () => { return this.methods; }; this.isHealthy = () => { return !!this.className && !!this.fileName && !!this.methods && Array.isArray(this.methods) && this.methods.length > 0; }; this.className = className ? className : ""; this.fileName = fileName ? fileName : ""; this.methods = methods ? methods : []; } } exports.ExpressionTypeInfo = ExpressionTypeInfo;