TypeScript Support #11238
jahirfiquitiva
started this conversation in
Ideas
TypeScript Support
#11238
Replies: 3 comments 3 replies
-
I don't know if this is enough to fix the TypeScript error, but extend: {
// theme has implicit type any
- typography: (theme) => ({
+ typography: ({ theme }) => ({
DEFAULT: { |
Beta Was this translation helpful? Give feedback.
1 reply
-
You can use the following: typography: (theme: PluginAPI["theme"]) => ({ ... }) where PluginAPI comes from If you get |
Beta Was this translation helpful? Give feedback.
1 reply
-
Caution This is wrong, I entirely misunderstood the question. Sorry! No need to type the function: import type { Config } from 'tailwindcss'
export default {
content: [],
theme: {
extend: {},
},
plugins: [],
} satisfies Config |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to use
tailwind.config.ts
, but I'm not sure how to typetheme
in thetypography
function.Would you mind helping me out with that?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions