Skip to content

Commit

Permalink
fix: types for include/exclude patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
bennypowers committed Sep 19, 2024
1 parent 65c2ab6 commit 75b4881
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .changeset/witty-mangos-fetch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"web-dev-server-plugin-lit-css": patch
"rollup-plugin-lit-css": patch
---

Corrected types for include and exclude. No runtime changes
6 changes: 3 additions & 3 deletions packages/rollup-plugin-lit-css/rollup-plugin-lit-css.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import type { Plugin } from 'rollup';
import type { Options } from '@pwrs/lit-css/lit-css';

import { createFilter } from '@rollup/pluginutils';
import { createFilter, type FilterPattern } from '@rollup/pluginutils';
import { transform } from '@pwrs/lit-css';
import { resolve } from 'node:path';

export interface LitCSSOptions extends Omit<Options, 'css'> {
include?: RegExp | string[];
exclude?: RegExp | string[];
include?: FilterPattern;
exclude?: FilterPattern;
}

export function litCss(options?: LitCSSOptions): Plugin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import type { Options } from '@pwrs/lit-css/lit-css';
import type { Plugin } from '@web/dev-server-core';

import { transform } from '@pwrs/lit-css';
import { createFilter } from '@rollup/pluginutils';
import { createFilter, type FilterPattern } from '@rollup/pluginutils';

export interface LitCSSOptions extends Omit<Options, 'css'> {
include?: RegExp | string[];
exclude?: RegExp | string[];
include?: FilterPattern;
exclude?: FilterPattern;
}

export function litCss(options?: LitCSSOptions): Plugin {
Expand Down

0 comments on commit 75b4881

Please sign in to comment.