Skip to content

Commit 58a264d

Browse files
committed
refactor: postcss types
1 parent 02f72bd commit 58a264d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

packages/postcss-purgecss/src/index.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Helpers, PluginCreator, Root } from "postcss";
1+
import * as postcss from "postcss";
22

33
import PurgeCSS, {
44
defaultOptions,
@@ -12,8 +12,8 @@ const PLUGIN_NAME = "postcss-purgecss";
1212

1313
async function purgeCSS(
1414
opts: UserDefinedOptions,
15-
root: Root,
16-
{ result }: Helpers
15+
root: postcss.Root,
16+
{ result }: postcss.Helpers
1717
): Promise<void> {
1818
const purgeCSS = new PurgeCSS();
1919
const options = {
@@ -70,7 +70,9 @@ async function purgeCSS(
7070
}
7171
}
7272

73-
const purgeCSSPlugin: PluginCreator<UserDefinedOptions> = function (opts) {
73+
const purgeCSSPlugin: postcss.PluginCreator<UserDefinedOptions> = function (
74+
opts
75+
) {
7476
if (typeof opts === "undefined")
7577
throw new Error("PurgeCSS plugin does not have the correct options");
7678
return {

0 commit comments

Comments
 (0)