btea

Results 424 comments of btea

`gogocode-core` 的依赖包 `recast-yx` 产出的代码存在这个问题

```ts // both of these result in 'true' Boolean("hello"); // type: boolean, value: true !!"world"; // type: true, value: true ``` ```!!"world"``` `type` 应该是 `boolean`

@mqyqingfeng 哈哈,是这样吗?我还以为是你手误

> @btea 快去给官方文档提 PR 吧 @mqyqingfeng 这里似乎是正确的,相关人员给的回答解释 https://www.typescriptlang.org/play#example/type-widening-and-narrowing

> > ```ts > > // both of these result in 'true' > > Boolean("hello"); // type: boolean, value: true > > !!"world"; // type: true, value: true > >...

> > > @btea 快去给官方文档提 PR 吧 > > > > > > @mqyqingfeng 这里似乎是正确的,相关人员给的回答解释 https://www.typescriptlang.org/play#example/type-widening-and-narrowing > > 确实是的,但他们也没有明确的用 const 呀…… 对,如果用 let ,此时推导的变量类型是 `boolean`, 要是再加一个 if 判断,此时变量类型就会被收窄,ts 推导得到一个 `true`...

**Null与数字**,第2步,`rprim=null`应改成`rprim=1`

@nitta-honoka push 会改变原数组,也有返回值,返回值为数组push成功之后的长度。所以,c = a.push(3),c的值为3

`在 JavaScript 中,最基本的将数据成组和分发的方式就是通过对象。` `数据成组` 应该是 `数据分组`

@mqyqingfeng 嗯,是的,意思好像差不多,不过成组比较少见,刚开始读起来总感觉不通畅,还以为写错了