Skip to main content

compileFunction 编译函数

compileFunction

类型: MethodDeclaration

所属类: CommandFunctionList

定义位置: command.ts

描述

编译函数

参数 script: 函数返回值脚本

返回值:编译后的函数

参数

参数名类型描述默认值
scriptstring--

返回值

类型: Function

编译后的函数

源代码

位置: 第 906 行

private compileFunction(script: string): Function {
try {
return new Function(`return ${script}`)
} catch (error) {
return Function.empty
}
}

文档生成时间:2025/7/7 12:07:06