Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix imports of redux-toolkit types #4994

Merged
merged 1 commit into from
Sep 25, 2024
Merged

Fix imports of redux-toolkit types #4994

merged 1 commit into from
Sep 25, 2024

Conversation

eikhr
Copy link
Member

@eikhr eikhr commented Sep 25, 2024

Description

These were imported from the src folder of rtk because they weren't exported normally in earlier versions of rtk.

import type { EntityState } from '@reduxjs/toolkit/src/entities/models';

Seems like some new config makes this cause an error, but they have been added to exports so we can just import them normally.

import type { EntityState } from '@reduxjs/toolkit';

Result

Fixes 10 typescript errors in the places where stuff was imported incorrectly.

Testing

  • I have thoroughly tested my changes.

Fewer type-errors = good. This code is only used for type-checking.

These were imported from the src folder of rtk because they weren't
exported in earlier versions of rtk. Seems like some new config makes
this cause an error, but they have been added to exports so we can just
import them normally.
@eikhr eikhr added types Pull requests that improve or fix types bug-fix Pull requests that fix a bug labels Sep 25, 2024
Copy link

vercel bot commented Sep 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
lego-bricks-storybook ⬜️ Ignored (Inspect) Sep 25, 2024 11:15am

@eikhr eikhr added flawless Pull requests with "flawless" code, e.g. formatting or simple renaming. Should be used with caution! and removed bug-fix Pull requests that fix a bug labels Sep 25, 2024
@github-actions github-actions bot added the review-needed Pull requests that need review label Sep 25, 2024
@eikhr eikhr merged commit 932b29f into master Sep 25, 2024
6 checks passed
@eikhr eikhr deleted the wrong-rtk-type-imports branch September 25, 2024 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flawless Pull requests with "flawless" code, e.g. formatting or simple renaming. Should be used with caution! review-needed Pull requests that need review types Pull requests that improve or fix types
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants