import { CallExpressionParams , ExpressionParams , FunctionExpressionParams , VariableExpressionParams , VariableShorthandNumberParams , HighlightedVariableExpressionParams , ConditionalExpressionParams , VariableShorthandFuncParams , QuestionShorthandNumberAfterConvertParams , RepeatExpressionParams } from 'src/types/ExpressionParamTypes' ; export function isHighlightedVariableExpressionParams ( expressionParams ) { return ( ! ! ( expressionParams as HighlightedVariableExpressionParams ) . name && ! ! ( expressionParams as HighlightedVariableExpressionParams ) . highlighted ) ; } export function isVariableShorthandNumberParams ( expressionParams ) { return ( ( expressionParams as VariableShorthandNumberParams ) . shorthandNumber !== undefined ) ; } export function isVariableShorthandFuncParams ( expressionParams ) { return ( ( expressionParams as VariableShorthandFuncParams ) . shorthandFunc !== undefined ) ; } export function isVariableExpressionParams ( expressionParams ) { return typeof expressionParams === 'string' ; } export function isFunctionExpressionParams ( expressionParams ) { return ( ! ! ( expressionParams as FunctionExpressionParams ) . arg && ! ! ( expressionParams as FunctionExpressionParams ) . body ) ; } export function isCallExpressionParams ( expressionParams ) { return Array . isArray ( expressionParams ) ; } export function isConditionalParams ( expressionParams ) { return ( ! ! ( expressionParams as ConditionalExpressionParams ) . condition && ! ! ( expressionParams as ConditionalExpressionParams ) . trueCase && ! ! ( expressionParams as ConditionalExpressionParams ) . falseCase && ! ! ( expressionParams as ConditionalExpressionParams ) . checkType ) ; } export function isQuestionShorthandNumberAfterConvertParams ( expressionParams ) { return ! ! ( expressionParams as QuestionShorthandNumberAfterConvertParams ) . shorthandNumberAfterConvert ; } export function isRepeatExpressionParams ( expressionParams ) { return ! ! ( expressionParams as RepeatExpressionParams ) . child ; }