remcohaszing / monaco-tailwindcss

Tailwindcss intellisense support in Monaco editor
https://monaco-tailwindcss.js.org
MIT License
87 stars 14 forks source link

Dont use tailwinds config ts type directly but omit 'content' #66

Closed mhsdesign closed 1 year ago

mhsdesign commented 2 years ago

This and other references to Config should be changed, as we dont care about the required key 'content' https://github.com/remcohaszing/monaco-tailwindcss/blob/1987075f6f7f53127847836b3d2c08d931231c31/tailwindcss.worker.d.ts#L10

In my tests a simple Omit<Config, 'content'> didnt work but thats the direction...

remcohaszing commented 2 years ago

I agree, we don’t use content, so might as well omit it.

We can just define type TailwindConfig = Omit<Config, 'content'> in index.d.ts, then use that where appropriate.

mhsdesign commented 2 years ago

well we also declare tailwinds internal function types and must replace it there as well ... bit ugly