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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript types very slow #33618

Closed
2 tasks done
sawa-ko opened this issue Jul 23, 2022 · 1 comment
Closed
2 tasks done

TypeScript types very slow #33618

sawa-ko opened this issue Jul 23, 2022 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@sawa-ko
Copy link

sawa-ko commented Jul 23, 2022

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 馃槸

Currently when using MUI with typescript the typing gets very slow when you use a component.

For example, as shown in the video, when I use the button component, the typescript typing becomes very slow, since I put a wrong code and typescript detects it seconds later. You can also see how it takes time for variant types to appear.

I even tried using Github CodeSpaces, thinking it was my computer issues, but the same problem happens.

I don't know if it only happens with VS Code because I haven't tried it with other code editors.

Code_k3rcLWNXHv.mp4

Expected behavior 馃

A fast and functional typescript typing, that obtains for example, the types of variants of a button quickly as it should be and that does not affect the slowness of the typescript typing so much.

Steps to reproduce 馃暪

Steps:

  1. Use this template: https://github.com/mui/material-ui/tree/master/examples/nextjs-with-typescript
  2. Put a Button component (for example)
  3. See how typescript types get slow throughout the code.

Context 馃敠

I'm trying to use MUI with next.js using TypeScript, but this issue greatly affects the development experience as it doesn't take advantage of the special feature of typescript. Which is the typing of types.

I know it's not a problem that prevents you from being able to use next.js with MUI, but in development experience that slowness is fatal, IMHO.

Your environment 馃寧

npx @mui/envinfo
System:
  Linux 5.4 Ubuntu 20.04.4 LTS (Focal Fossa)
Binaries
  Node: 16.14.2 -/.nodejs/current/bin/node
  Yarn: 1.22.10 - /opt/yarn/stable/bin/yarn
  npm: 8.5.0 - -/.nodejs/current/bin/npm 
Browsers
  Chrome: Not Found
  Firefox: Not Found
npmPackages
  @emotion/react : latest => 11.9.3 
  @emotion/styled: latest => 11.9.3 
  @mui/base:  5.0.0-alpha. 90
  @mui/icons-material : latest => 5,8.4
  @mui/material: latest => 5.9.1 
  @mui/private-them1ng:  5.9.1
  @mui/styled-engine:  5.8.7
  @mui/system:  5.9.1
  @mui/types:  7.1.4
  @mui/utils:  5.9.1
  @types/react: latest => 18.0.15
  react: latest => 18.2
  react-dom: latest => 18.2.0 
  typescript: latest => 4.7.4
@sawa-ko sawa-ko added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jul 23, 2022
@sawa-ko sawa-ko changed the title Typescript types very slow TypeScript types very slow Jul 23, 2022
@michaldudak
Copy link
Member

Duplicate of #19113

@michaldudak michaldudak marked this as a duplicate of #19113 Jul 27, 2022
@michaldudak michaldudak closed this as not planned Won't fix, can't repro, duplicate, stale Jul 27, 2022
@michaldudak michaldudak added duplicate This issue or pull request already exists and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants