Skip to content

Fix types in Register#107

Open
Link2Twenty wants to merge 3 commits intostrapi:mainfrom
Link2Twenty:register-types
Open

Fix types in Register#107
Link2Twenty wants to merge 3 commits intostrapi:mainfrom
Link2Twenty:register-types

Conversation

@Link2Twenty
Copy link
Contributor

@Link2Twenty Link2Twenty commented Jan 29, 2026

What does it do?

Remove the any from register and update the function so it matches the existing type.
One of the changes is to make App a default export, this is simply to make the linter happy and changing the type might be the correct way to go.

Why is it needed?

Types are good

How to test it?

Load the types in and see the linter is happy.

Related issue(s)/PR(s)

N/A


Edit:
I noticed there was already a type the describes this whole export so I've set it up to use that instead.
While I was in there I realised the mapping of translation keys wasn't happening so I've added that in.
Let me know if yo need that to be a send PR.

Signed-off-by: Andrew Bone <AndrewB05@gmail.com>
addMenuLink['Component'] expects 

```tsx
() => Promise<{
  default: React.ComponentType;
}>;
```

Meaning the component must be the default export

Signed-off-by: Andrew Bone <AndrewB05@gmail.com>
@changeset-bot
Copy link

changeset-bot bot commented Jan 29, 2026

⚠️ No Changeset found

Latest commit: 7279300

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dosubot
Copy link

dosubot bot commented Jan 29, 2026

Related Documentation

Checked 2 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

- Use the `StrapiAppPlugin` type rather than remaking it
- fix registerTrads so it actually transforms languages. 

Signed-off-by: Andrew Bone <AndrewB05@gmail.com>
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants