question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Localization] Typescript error in @material-ui/core/locale/index.d.ts

See original GitHub issue

Hey, this is my first open-source issue ever, so I hope I’m not doing anything wrong here.

I’m trying to implement localization to my react-typescript project and I get the following error:

TypeScript error in C:/Programowanie/Projekty/playmaker-pro-scouting-client/node_modules/@material-ui/core/locale/index.d.ts(2,13): '=' expected. TS1005

I think the solution is just to delete the keyword type from the line:

import type { ComponentsPropsList } from '../styles/props';

Am I right? If yes, can I open a pull request for this?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jakubfiglakcommented, Jun 30, 2020

@oliviertassinari Yeah, that’s what I suggested in the original comment:) Sure, I can give it a try!

0reactions
oliviertassinaricommented, Jun 30, 2020

@jakubfiglak Thanks for the reproduction, well spotted. What do you think of this fix?

diff --git a/packages/material-ui/src/locale/index.ts b/packages/material-ui/src/locale/index.ts
index 1bd244831..df15b50e8 100644
--- a/packages/material-ui/src/locale/index.ts
+++ b/packages/material-ui/src/locale/index.ts
@@ -1,5 +1,5 @@
 import * as React from 'react';
-import type { ComponentsPropsList } from '../styles/props';
+import { ComponentsPropsList } from '../styles/props';

 export interface Localization {
   props?: {

Do you want to work on it? 😃 (it would go into the next branch)

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Localization] Typescript error in @material-ui/core ... - GitHub
I'm trying to implement localization to my react-typescript project and I ... Typescript error in @material-ui/core/locale/index.d.ts #21617.
Read more >
How do I prevent VS 2022 to display typescript errors with d.ts ...
My colleague suggested this fix and its seems to have removed all the typescript errors from the visual studio error list.
Read more >
i18n in React Native apps - Brains & Beards
src/localization/i18n.ts import i18n from 'i18next' import ... If you use TypeScript (which I'd strongly suggest) you'll also need to add ...
Read more >
react-native-localization - npm
Simple module to localize the ReactNative interface. Latest version: 2.3.1, last published: 10 months ago.
Read more >
TypeScript - react-i18next documentation
So the first step is creating a declaration file ( react-i18next.d.ts ), for example: // import the original type declarations. import 'react-i18next';.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found