MINJA KIM
MINJA KIM

Reputation: 1018

Vscode typescript styledcomponent too slow

My vscode type-checking be too slow, when I am using styledcomponent

I Have searched this issue several times, but I founds some relative issue on hit-hub.

I tried to read and tried to figure out what is going on !

But because of my poor English, I couldn’t understand what happens. And is it on fixing Process or already fixed ?

And is there alternative solution ?

Sorry for ask lazy qustion, but I really couldn’t understand.

My version Typescript: 3.7.3 @types/styled-components: 5.1.0

Relative posts

https://amp.reddit.com/r/vscode/comments/babzpx/vs_code_issue_with_styledcomponents/

https://amp.reddit.com/r/typescript/comments/blbx9g/vscode_tslint_linting_is_very_slow_sometimes_is/

https://github.com/microsoft/TypeScript/issues/30663

Upvotes: 4

Views: 2251

Answers (1)

Fareed Khan
Fareed Khan

Reputation: 2923

Solution 1

You should make sure that you are pulling the latest version of @types/styled-components and also any older versions should not be present in your project.


If you are using JavaScript, you may need to clear your automatic typings cache to clear the file that caused this from their cache. To do this, delete the typings typing cache file listed below and restart vscode:

For MAC:

Mac: ~/Library/Caches/TypeScript/3.4

For WINDOWS:

Windows: %LOCALAPPDATA%\Microsoft\TypeScript\3.4

FOR LINUX:

Linux: ~/.cache/typescript/3.4

Solution 2

Downgrade your workspace to use an older version of typescript by following these instructions

Try to install @types/styled-components@ into your workspace.

See: DefinitelyTyped/DefinitelyTyped#34391 for more details

Upvotes: 4

Related Questions