Tahul / pinceau

🖌️ Make your <script> lighter and your <style> smarter
https://pinceau.dev
MIT License
680 stars 19 forks source link

Unexpected TS issue with the type of css function #76

Closed Barbapapazes closed 1 year ago

Barbapapazes commented 1 year ago

Hello,

Here an error with the css function. Does anyone know how to deals with it ?

image

Barbapapazes commented 1 year ago

Solution was here https://pinceau.dev/get-started/installation#volar

agenordebriat commented 1 year ago

@Barbapapazes @Tahul Any idea on why I'm getting the same issue? Pinceau works fine except for this.

Setup :

Did a simple npx nuxi init <project> and only added pinceau/nuxt as a module. Providing a tokens.config.ts – copy/pasted from the documentation – didn't change anything.

Barbapapazes commented 1 year ago

Haye you tried to add some config to your ts config?

https://pinceau.dev/get-started/installation/#volar

agenordebriat commented 1 year ago

My tsconfig.json file already had everything it needed, since I'm on Nuxt using the module, except the last "pinceau.css" path.

I added `"pinceau.css": ["//.nuxt/pinceau/theme.css"], and it got rid of the error. Thing is, it should be there from the get go! I'll have a look at it and open a PR to fix this. I'll open a different issue now because CSS properties are not being auto-completed.

The content of the .nuxt/pinceau/utils.ts file look wrong:

import { PinceauTheme, PropertyValue } from 'pinceau'

export const utils = undefined

export type GeneratedPinceauUtils = typeof utils

export default utils

Thanks for having me look at the doc again.