-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Description
- The issue is present in the latest release.
- I have searched the issues of this repository and believe that this is not a duplicate.
Current Behavior 😯
I have been able to trace the following errors to some changes made recently to use TS features such as Omit which aren't available in 3.2.4 (as far as I understand, that's the minimum TS version that MUI supports) or trailing commas:
- [docs] Add more props documentation to IntelliSense #20264 (
Omit) - Bump prettier to 2.0.0 #20211 (the trailing comma issue)
Click to expand
node_modules/@material-ui/core/Backdrop/Backdrop.d.ts:8:52 - error TS2304: Cannot find name 'Omit'.
8 React.HTMLAttributes<HTMLDivElement> & Partial<Omit<FadeProps, 'children'>>,
~~~~
node_modules/@material-ui/core/Box/Box.d.ts:29:22 - error TS1009: Trailing comma not allowed.
29 typeof typography,
~
node_modules/@material-ui/core/Fade/Fade.d.ts:4:36 - error TS2304: Cannot find name 'Omit'.
4 export interface FadeProps extends Omit<TransitionProps, 'children'> {
~~~~
node_modules/@material-ui/core/TextareaAutosize/TextareaAutosize.d.ts:4:11 - error TS2304: Cannot find name 'Omit'.
4 extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'children' | 'rows'> {
~~~~
node_modules/@material-ui/core/styles/shadows.d.ts:26:9 - error TS1009: Trailing comma not allowed.
26 string,
~
Expected Behavior 🤔
Steps to Reproduce 🕹
Steps:
- Install
@material-ui/[email protected] - Run your project through
tscusing[email protected] - Observe the errors above
Context 🔦
We set a minimum supported version of TypeScript to 3.2.4 in our design system to match Material-UI but seems like the latest MUI version uses newer TypeScript features. This isn't usually a big issue to React projects, but we also support Angular teams via Custom Elements and usually bumping TypeScript requires them to bump their Angular versions too (usually across major version boundaries) which can be a bit painful. For example, Angular 7.2 supports TS 3.2.4, Angular 8.0.0 adds support for 3.4 dropping support for older versions, Angular 9.0.0 requires 3.6/3.7
Your Environment 🌎
| Tech | Version |
|---|---|
| Material-UI | v4.9.9 |
| TypeScript | v3.2.4 |