(expr: string)
| 37 | } |
| 38 | |
| 39 | export function getStaticExprValue<T>(expr: string): T { |
| 40 | // TODO: 需要安全性检查 |
| 41 | // eslint-disable-next-line no-new-func |
| 42 | return Function(`"use strict";return (${expr})`)(); |
| 43 | } |
| 44 | |
| 45 | export function isJSExpressionFn(data: any): data is IPublicTypeJSFunction { |
| 46 | return data?.type === 'JSExpression' && data?.extType === 'function'; |
no outgoing calls
no test coverage detected
searching dependent graphs…