equinor / equinor/fusion-framework
Remove @ts-ignore when rendering Component in createComponent
- Dominant language
- TypeScript
- Stars
- 10
- Forks
- 10
- Avg merge
- 19h 40m
- Merged PRs (30d)
- 150
Description
## Context
`createComponent()` in [`packages/react/app/src/create-component.tsx`](https://github.com/equinor/fusion-framework/blob/main/packages/react/app/src/create-component.tsx) renders the consumer-provided `Component` with `@ts-ignore`, since its prop types can't be proven compatible with the generic component signature at this call site.
## Task
Investigate whether the generic constraints on `createComponent`/`ComponentRenderer` can be tightened so `` can be rendered without `@ts-ignore`.
## Acceptance criteria
- [ ] `@ts-ignore` removed, or a documented reason recorded for why it must remain
- [ ] No regression to existing `createComponent` consumers
Contributor guide
Research direction
Start in packages/react/app/src/create-component.tsx and inspect createComponent, ComponentRenderer, and the consumer-provided Component call site. Trace existing createComponent consumers to determine whether tighter generic constraints preserve their usage. Done means removing @ts-ignore without regressions, or documenting why it must remain.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 67/100