-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
create-react-app-with-typescript: TS2344: 'Type Removals | "classes"' does not satisfy constraint 'string' #11656
Comments
We are getting the same error. Only happens on Typescript 2.9.x, does not happen on 2.8.x. |
Same exact issue here. @giantryansaul |
same issue. ERROR in [at-loader] ./node_modules/@material-ui/core/index.d.ts:57:77 does not appear when Typescript is locked down to 2.8.4 |
TS 2.9 has start support |
I am also getting lots of these errors wherever I import material-ui components with Typescript 2.9
but it only seems to happen when I do imports like import Grid from '@material-ui/core/Grid'; |
With @mctep's suggestion, I set the "keyOfStringsOnly" option to true in my tsconfig.json file, which fixed the issue: |
@mctep : the workaround suggested will be good enough for now, thanks! |
Run in same issue like @olee . Downgraded ts to 2.8.3. |
same ! |
I'm getting this similar error with TS 2.9 and TS 3.2:
|
@klundgren This is a possible duplicate of #14179. Could you please follow #14179 (comment). If this doesn't help please open a new issue and follow the issue template. |
Expected Behavior
Demo page should render without an error.
Current Behavior
On following instructions to clone (using curl command line provided in readme) the following error is shown in the browser:-
/Users/xxxxxx/create-react-app-with-typescript/node_modules/@material-ui/core/index.d.ts (12,3): Type '"classes" | Removals' does not satisfy the constraint 'string'. Type 'Removals' is not assignable to type 'string'. Type 'keyof C' is not assignable to type 'string'. Type 'string | number | symbol' is not assignable to type 'string'. Type 'number' is not assignable to type 'string'.
The package.json specifies 'latest' for all dependancies, and it seems that material-ui typings are not compatible with Typescript version 2.9.1. Changing the version to 2.8.1 fixes the issue.
Steps to Reproduce (for bugs)
Follow instructions on readme for create-react-app-with-typescript
The text was updated successfully, but these errors were encountered: