refactor: 将回调参数名从 item 重命名为 element

使参数名更准确地反映其表示数组元素而非通用项的含义,提升代码可读性。
This commit is contained in:
2026-03-04 14:50:03 +08:00
parent 63e4610833
commit fb6c2899c1
+2 -2
View File
@@ -29,8 +29,8 @@ export const createArrayTracer = <T extends JsonValue>(
if (!!walker) {
const initial: T[] = [];
walker({
add: (item) => {
initial.push(item);
add: (element) => {
initial.push(element);
metadata.length++;
},
});