This project was bootstrapped with Create React App.
- The override types were added to
src/types/overrides-mui.d.ts
and aLocalizationProvider
was added. No other code changes where made. - The
tsconfig.json
file was updated to setskipLibCheck: false
to match my real project. - A
type-check
script was added topackage.json
.
-
Clone this repository
-
Run
yarn
to install dependencies. -
Run
yarn type-check
to show the following error:node_modules/@material-ui/core/styles/overrides.d.ts:100:64 - error TS2344: Type 'ComponentNameToClassKey[Name]' does not satisfy the constraint 'string'. Type '"fixed" | "required" | "square" | "active" | "disabled" | "track" | "default" | "error" | "progress" | "message" | "middle" | "media" | "hidden" | "body" | "button" | "caption" | ... 486 more ... | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. 100 [Name in keyof ComponentNameToClassKey]?: Partial<StyleRules<ComponentNameToClassKey[Name]>>; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~