Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 554 Bytes

no-construct.md

File metadata and controls

34 lines (26 loc) · 554 Bytes
sidebarDepth categories tags
0
TypeScript
TSLint
TypeScript

no-construct

禁止访问 String, Number, 和 Boolean 构造器。

const a = new Boolean('true');
const b = new String(123);
const c = new Number('123');
const a = Boolean('true');
const b = String(123);
const c = Number('123');

参考:new Number() vs Number()