Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 354 Bytes

no-string-throw.md

File metadata and controls

28 lines (21 loc) · 354 Bytes
sidebarDepth categories tags
0
TypeScript
TSLint
TypeScript

no-string-throw

抛出异常时禁止直接抛出字符串,而应当抛出 Error 对象。

throw 'not found';
throw new Error('not found');