forgojs / forgojs/forgo

Prop types are not inferred if component is returned indirectly.

Open
#68 2 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue
Dominant language
TypeScript
Stars
321
Forks
10
PR merge metrics
No merged PRs in 30d

Description

When using TypeScript, prop types are not correctly inferred if the forgo component is not directly returned, see [minimal example](https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAKjgQwM5wGbQOYU1CEOAciyl2IG4AoUSWOGATzAFM4BvOAMRwgDlWAdwDChSADtWEmCJjQ4AX3yE4AIjK41NaqwAe9eMzZwAKq1QwACgTDoAvJ2pwXcCchCsAXHEtRgEtjUitTUAPRhcAAiwFCsAMbwcTAArlAScBAYbsJw8eIQUjLU+RKW0bEJMD685ALCYuCF0rLyUAA85pY2EHYAfHCOABQAlIMDHM5wyWkZUkKYfAB0jZItQ5Ou09IAJqxQG24e7Ipjm1vbqelHnpRwEXD8x3DA6H6F2IwsrDsANCjoYDwVAACwgKQANjs4AAjVhTFwhREjGiKHQPACSEh2lUSl1mmWy8zyBSKMBKhXKWJxcUSNT4glEpJacmgnQs1lsqAGwzG9gmU1K5XyTTJgxyC00EBWzJkGwR22x+0O7k8SjOCpcM2uqtYdwePTAXzAAU+rzgEIglgVSPVOi1rCuGRFaxkqPRkQAEhAhKwAG77f5CEHSPJoGCmxghuBgWxwGlVCFMF7wHYQCxwITQADWFLK8BE4Z+9LqjNWzRkrI6XU5vW54tG4ycLiF8BdFfgjmJUplopa7O6XL68q2cSVBy4uvVzYu2rmx31kUN6GQcVhyHi2YAhDapqd7fjru2ye7qEA)

![image](https://user-images.githubusercontent.com/27073716/183133308-8bcf4404-489f-426c-83c9-8f9c821490e5.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the linked TypeScript minimal example and compare prop inference when the Forgo component is returned directly versus indirectly. Trace the component type definitions used by that example and reproduce the reported inference failure. Done means prop types are inferred correctly in the indirect-return case, with the example demonstrating the corrected behavior.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.