lahmatiy / postcss-csso

PostCSS plugin to minify CSS using CSSO

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeScript types

laurentpayot opened this issue Β· comments

Hi, thanks for this nice plugin πŸ‘

When importing the plugin in my vite.config.ts file

import cssoPlugin from 'postcss-csso'

I get the following error in VS Code:

Could not find a declaration file for module 'postcss-csso'. '/home/laurent/projects/myproject/node_modules/.pnpm/postcss-csso@6.0.1_postcss@8.4.21/node_modules/postcss-csso/cjs/index.cjs' implicitly has an 'any' type.
  Try `npm i --save-dev @types/postcss-csso` if it exists or add a new declaration (.d.ts) file containing `declare module 'postcss-csso';`ts(7016)

Could a type declaration file be added to tame TypeScript?

Cheers,
Laurent