Skip to content

Commit

Permalink
Fix cssnanoPlugin type to return Processor not Plugin
Browse files Browse the repository at this point in the history
Invoking `postcss` gives you a Processor, not a Plugin.
  • Loading branch information
isker authored and ludofischer committed Aug 10, 2022
1 parent 1b6e4ec commit b92dbe3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/cssnano/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function resolveConfig(options) {
/**
* @type {import('postcss').PluginCreator<Options>}
* @param {Options=} options
* @return {import('postcss').Plugin}
* @return {import('postcss').Processor}
*/
function cssnanoPlugin(options = {}) {
if (Array.isArray(options.plugins)) {
Expand Down
4 changes: 2 additions & 2 deletions packages/cssnano/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ export = cssnanoPlugin;
/**
* @type {import('postcss').PluginCreator<Options>}
* @param {Options=} options
* @return {import('postcss').Plugin}
* @return {import('postcss').Processor}
*/
declare function cssnanoPlugin(options?: Options | undefined): import('postcss').Plugin;
declare function cssnanoPlugin(options?: Options | undefined): import('postcss').Processor;
declare namespace cssnanoPlugin {
export { postcss, Options };
}
Expand Down

0 comments on commit b92dbe3

Please sign in to comment.