Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 386 Bytes

function-constructor.md

File metadata and controls

17 lines (12 loc) · 386 Bytes
sidebarDepth categories tags
0
TypeScript
TSLint
TypeScript

function-constructor

禁止使用原生函数构造器(Function)创建函数。

直接使用 Function 构造函数相当于在使用 eval 函数,无法定义参数及返回值的类型,另外在动态创建函数的时候还会有性能问题。