Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 485 Bytes

object-literal-key-quotes.md

File metadata and controls

30 lines (22 loc) · 485 Bytes
sidebarDepth categories tags
0
TypeScript
TSLint
TypeScript

object-literal-key-quotes

索引类型的对象,需要引号的key 必须使用引号,不需要引号的key 一定不加引号。

let obj = { 'foo': 'foo', 'b-ar': 'bar' };
let obj = { foo: 'foo', 'b-ar': 'bar' };