-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
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
Typescript - Lack of index signature in interface ThemeOptions #12189
Labels
Comments
What's wrong with https://material-ui.com/guides/typescript/#customization-of-theme? |
There is nothing wrong with it, i'm sorry, I didn't understand very well
the Typescript module augmentation. Now I do, thank you and sorry for
bothering :)
…On Wed, 18 Jul 2018 at 18:06, Olivier Tassinari ***@***.***> wrote:
What's wrong with
https://material-ui.com/guides/typescript/#customization-of-theme?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#12189 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AIZXyf8I21sc91xNa_gDLoKyW3owU3kUks5uH10PgaJpZM4VU2BA>
.
|
@benjaminbours Awesome. We are always looking forward to improving the TypeScript support. |
This was referenced Mar 17, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected Behavior
I would like to add additional variables to a theme so I can use them everywhere, like describe here. So i expected Typescript to compile this for exemple:
Current Behavior
I got this error when Typescript compile:
Object literal may only specify known properties, and 'custom' does not exist in type 'ThemeOptions'.
Your Environment
I can share my tsconfig.json or more if you want but I think just adding
[propName: string]: any;
in the interface ThemeOptions should fix the problem.
The text was updated successfully, but these errors were encountered: