Use const for symbol when indexing. PR911

This commit is contained in:
zhongsp 2019-06-01 19:40:01 +08:00
parent f7d6b38f07
commit 1eed25898c

View File

@ -22,7 +22,7 @@ sym2 === sym3; // false, symbols是唯一的
像字符串一样symbols也可以被用做对象属性的键。
```ts
let sym = Symbol();
const sym = Symbol();
let obj = {
[sym]: "value"