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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider compatibility with a less strict typescript #16255

Closed
fgarcia opened this issue Jun 16, 2019 · 1 comment · Fixed by #17214
Closed

Consider compatibility with a less strict typescript #16255

fgarcia opened this issue Jun 16, 2019 · 1 comment · Fixed by #17214

Comments

@fgarcia
Copy link

fgarcia commented Jun 16, 2019

According the Typescript guide:

Our definitions are tested with the following tsconfig.json. Using a less strict tsconfig.json or omitting some of the libraries might cause errors.

Following the config file I saw the the minimum baseline of a supported Typescript configuration is strict: true that literally means enabling all known and possible checks. As a consequence, it also means that Material UI is not guaranteed to work without errors in projects that do not enable all checks.

In my case, I've been hunting down errors caused since Typescript 3.5 as in #15942, #16088 (comment), #16088

In that case it seems that I could solve my problems enabling strictNullChecks but that one alone triggers 892 errors in my current project. Right now I cannot get a time budget to fix those, so our only solution for the time being is holding back the Typescript upgrade.

Please, consider supporting projects that want to use Material UI without being forced to fix every single strict check. I do believe there are plenty of legacy projects that must disable full strict mode to benefit from Typescript.

Your Environment 🌎

Tech Version
Material-UI v4.1.1
React 16.8.3
TypeScript 3.5.2
@eps1lon
Copy link
Member

eps1lon commented Jun 16, 2019

Agreed. We should follow @types/ packages. But they also have strictNullChecks: true which won't solve your issue completely I fear.

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

Successfully merging a pull request may close this issue.

2 participants