theme type
#2881
Replies: 2 comments
-
This section in our docs shows how to define a theme type: https://emotion.sh/docs/typescript#define-a-theme You should be able to do something like this: import MyTheme from 'source';
declare module '@emotion/react' {
export type Theme = typeof MyTheme
} Whether you need |
Beta Was this translation helpful? Give feedback.
0 replies
-
thanks for the reply, yes, I made a mistake, I always thought that global types cannot be |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
an idea ~
Is it possible to extend theme type by
import(to-key).Theme
and then enterto-key
in tsconfig paths, finalthis avoids the need to manually enter the type and can be deduced
Beta Was this translation helpful? Give feedback.
All reactions