Skip to content

TypeScript types #30

@laurentpayot

Description

@laurentpayot

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions