You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When accessing the theme function in the tailwind.config.ts file for the typography key, there is a TypeScript error Binding element 'theme' implicitly has an 'any' type..
Here's the problematic config:
importtypographyfrom'@tailwindcss/typography';/** @type {import('tailwindcss').Config} */exportdefault{content: [],theme: {extend: {// Binding element 'theme' implicitly has an 'any' type.typography: ({ theme })=>({DEFAULT: {css: {color: theme('colors.pink[800]'),},},}),},},plugins: [typography],};
I managed to work around this by importing PluginUtils and making that the type of the { theme } object:
What version of @tailwindcss/typography are you using?
v0.5.10
What version of Node.js are you using?
v18.18.0
What browser are you using?
N/A
What operating system are you using?
Linux
Reproduction repository
https://stackblitz.com/edit/vitejs-vite-pjylzr?file=tailwind.config.ts
Describe your issue
When accessing the
theme
function in thetailwind.config.ts
file for thetypography
key, there is a TypeScript errorBinding element 'theme' implicitly has an 'any' type.
.Here's the problematic config:
I managed to work around this by importing
PluginUtils
and making that the type of the{ theme }
object:The text was updated successfully, but these errors were encountered: