Skip to content

Maybe add TypeScript Declaration update to migration guide? #1603

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

Closed
1 of 4 tasks
fakob opened this issue May 29, 2024 · 2 comments · Fixed by #1604
Closed
1 of 4 tasks

Maybe add TypeScript Declaration update to migration guide? #1603

fakob opened this issue May 29, 2024 · 2 comments · Fixed by #1604

Comments

@fakob
Copy link

fakob commented May 29, 2024

Documentation Is:

  • Missing
  • Needed
  • Confusing
  • Not Sure?

Please Explain in Detail...

Hello there, thanks for your work!

Today I upgraded from version 6 to 7 and applied the changes mentioned in the migration guide. As I was using typescript, I then got errors like this:
Property 'menuItemButton' does not exist on type 'typeof import("*.module.css")'.ts(2339)
I did not know, but I had to change my TypeScript Declaration.

Your Proposal for Changes

It might be helpful for others to mention this in the migration guide. Up to you.
In the css case I had to change default to =

declare module '*.module.css' {
  const classes: { [key: string]: string };
  export default classes;
}

to this

declare module '*.module.css' {
  const classes: { [key: string]: string };
  export = classes;
}
@alexander-akait
Copy link
Member

Hello, good idea, I will do it

@zxkws
Copy link

zxkws commented Sep 30, 2024

hi, bro, this is very importan,it cost me about two hours, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants