immutable-js / immutable-js/immutable-devtools

use non deprecated way to get record name

未关闭 适合新手
#10 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
1
派生
1
平均合并
1 分钟
30 天内合并 PR
1

描述

multiple locations [1] get record name using `._name` which is marked as deprecated [2]

we could have an utility function that uses the modern way and falls back to `_name` if not found to be backward compatible but allow future versions of immutable to drop `._name`.

[1] https://github.com/immutable-js/immutable-devtools/blob/3bd80e851f51a1b78a860c1e6e47c69e400b268f/packages/devtools/src/createFormatters.ts#L121

https://github.com/immutable-js/immutable-devtools/blob/3bd80e851f51a1b78a860c1e6e47c69e400b268f/packages/devtools/src/createFormatters.ts#L148

[2] https://github.com/immutable-js/immutable-js/blob/9acd11a87e1c628f08639f9ae0539073f4ee46d8/src/Record.js#L63

贡献指南

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

调研方向

从 packages/devtools/src/createFormatters.ts 中访问 `._name` 的两个引用位置开始,然后将 Record.js 中已弃用的 API 参考与现代的 record-name API 进行比较。集中处理查找并保持向后兼容,同时验证 record 格式化仍能获取名称,而不直接依赖已弃用的访问方式。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript
领域
tooling
Issue 类型
重构
难度
2/5
预计耗时
1-3 小时
活跃度
冷清
描述清晰度
基本清楚
新手友好度
68/100

把新 issue 发到你的邮箱

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