adopted-ember-addons / adopted-ember-addons/validated-changeset

Add a more ergonomic structure to represent the changes structure

未关闭
#144 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
38
派生
27
PR 合并指标
30 天内没有已合并 PR

描述

Reference: https://runkit.com/nullvoxpopuli/how-to-use-changeset-data-and-changes

instead of .changes being:
```
[ {key: "foo", value: 1}, Object {key: "bar", value: "there"}, …]
```
it should be something easier to understand in isolation, like:
```js
{
"foo": {
original: 0,
current: 1,
},
"property.path.0.deep": {
original: 'hello',
current: 'there'
}
}
```
now, this can easily be computed from the existing .changes, but I think because it is a common desire to build this structure, it should be provided out of the box. maybe via:
```js
changeset.changedValues;
```

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。