immutable-js / immutable-js/immutable-devtools

use non deprecated way to get record name

Open Beginner friendly
#10 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1
Forks
1
Avg merge
1m
Merged PRs (30d)
1

Description

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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in packages/devtools/src/createFormatters.ts at the two cited locations that access `._name`, then compare the deprecated API reference in Record.js with the modern record-name API. Centralize the lookup with backward compatibility and verify that record formatting still obtains names without relying directly on the deprecated access.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.