equinor / equinor/fusion-framework

Remove @ts-ignore when rendering Component in createComponent

Open
#5,083 0 comments 0 reactions 0 assignees View on GitHub
module:react tech-debt
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.