SeanFeng
SeanFeng
这个是不是因为搜索出来默认就会复制小驼峰导致的啊
那为什么刷新之后还会有提示,并且没有复制,只是单纯提示,哈哈哈就是觉得奇怪,也不妨碍什么🤣🤣🤣
只要初始值是引用类型,就会出现这种问题,测试用例没加上这个: ```ts test('reset array', async () => { const region = createRegion([]); const {set, reset, getValue} = region; set(prevValue => { prevValue.push('testValue'); return prevValue; }); expect(getValue()).toStrictEqual(['testValue']); reset(); expect(getValue()).toStrictEqual([]); }); ```
> 暂时不认为这是一个 bug。 > > 就像是如果使用 `mutable` 的方式使用 `react`,很多时候也会产生问题,`region-core` 本身就是一个 `react` 下的状态管理方案,本身就不希望用户以 `mutable` 的方式来使用。 > > 这是一个可解释的行为,当然 `copy` 一份也是一个可解释的行为,这两个我都能接受。 > > 那么,最终我决定还是不引入一个库(以及额外的计算逻辑)来解决这个问题(因为它不是问题,而是可解释的某种行为)。 > > 所以,就像在 useState 中的一样,你应该总是使用 `[...state, value]` 来代替...
> We said that `T` and `U` `extend readonly unknown[]`, then why we can pass a not-readonly tuple as a generic parameter? What does `readonly` exactly mean in the context...
Just add @latest. ``` ... "command": "npx", "args": [ "-y", "task-master-mcp@latest" ], ... ```
已成功领取本issue
Hope to also provide a shortcut key for triggering~
+1 而且顺序也反了