From a550aee5ad4d39b4ff248cf9ad4a196e5ddab2ae Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Tue, 19 Mar 2024 12:24:08 -0400 Subject: [PATCH] Change which type is exported --- index.test.mts | 4 ++-- index.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/index.test.mts b/index.test.mts index 7f1df6a..9f7b977 100644 --- a/index.test.mts +++ b/index.test.mts @@ -3,7 +3,7 @@ import path from "node:path"; import postcss from "postcss"; import prettier from "prettier"; import { describe, it, expect } from "vitest"; -import { plugin, type ConfigItem } from "./index.js"; +import { plugin, type PluginOptions } from "./index.js"; // We don't care about formatting differences, so normalize with prettier function format(css: string) { @@ -13,7 +13,7 @@ function format(css: string) { async function run( input: string, output: string, - opts?: ConfigItem[], + opts?: PluginOptions, postcssOpts = {} ) { const result = await postcss([plugin(opts)]).process(input, postcssOpts); diff --git a/index.ts b/index.ts index 6e19789..2d86592 100644 --- a/index.ts +++ b/index.ts @@ -4,11 +4,11 @@ import type { PluginCreator } from "postcss"; const DEFAULT_INCLUDE = "**/*.module.css"; const DEFAULT_LAYERNAME = "components"; -export type ConfigItem = { +type ConfigItem = { include?: string; layerName?: string; }; -type PluginOptions = ConfigItem[]; +export type PluginOptions = ConfigItem[]; export const plugin: PluginCreator = ( configItems = [