swordev / suid

A port of Material-UI (MUI) built with SolidJS.
https://suid.io
MIT License
673 stars 48 forks source link

SUID types makes typescript indexation too slow. #207

Closed webblocksapp closed 1 year ago

webblocksapp commented 1 year ago

I'm needing to import a component interface from SUID in order to extend it to build my own component based on SUID.

The issue is when importing SuidTextFieldProps or any AnySuidComponentProps, typescript types indexation becomes too slow in vscode, and makes difficult types autocomplete slowing down the development flow. Every time I do a change in the code, any SUID type take too long to re-load.

ezgif-5-d2181d48ae

juanrgm commented 1 year ago

This is a known issue in MUI. I've tried to minimize the performance impact on TypeScript but it's difficult because of its design limitations.

What version of TypeScript and what CPU do you use?

webblocksapp commented 1 year ago

Hi @juanrgm thanks for your soon reply.

This is a known issue in MUI. I've tried to minimize the performance impact on TypeScript but it's difficult because of its design limitations.

I'm currently working on a business project where I'm building a company design system using React MUI. Specifically, we're using version 5.10.11, and I haven't encountered any intellisense issues. We have over 20 components that extend from MUI interfaces.

I tried to follow the same approach for a personal project using SUID but intellisense gets stuck when using the library's interfaces.

Those are my machine specs:

MacBook Pro 2020 2,3 GHz Quad-Core Intel Core i7 16 GB 3733 MHz LPDDR4X Typescript version 4.9.5

juanrgm commented 1 year ago

Waiting for TypeScript 5.1 (https://github.com/microsoft/TypeScript/pull/53246).

juanrgm commented 1 year ago

TtypeScript 5.1 has already been released.

If you still have problems, open a new issue.