react-component / react-component/tree

[bug] [typescript] Not all publicly exposed and settable props are properly defined

Open
#548 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.3k
Forks
490
Avg merge
3d 17h
Merged PRs (30d)
5

Description

For instance, the on functions have inline types rather than being specified in interfaces. For example, here's the onSelect definition in the Tree Props interface.

This makes it more difficult, as there aren't any types that I can import to strongly type my functions.

For now, as a workaround, I'll make my own type aliases where necessary.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/Tree.tsx at the Tree Props interface and inspect the inline onSelect type linked in the issue. Identify other publicly exposed, settable props whose types are only inline, then make the relevant types importable and verify that consumers can strongly type their functions.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.