Skip to content

Commit 1b804a9

Browse files
gpoitchromainmenke
andauthored
[postcss-global-data] Fix type for files option (#864)
* [postcss-global-data] Fix type for files option The type for the `files` option is incorrect. Only accepting an empty array or undefined. It should be an array of strings or undefined. * Update plugins/postcss-global-data/src/index.ts * build + changelog --------- Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com> Co-authored-by: Romain Menke <romainmenke@gmail.com>
1 parent 47f7913 commit 1b804a9

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

plugins/postcss-global-data/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changes to PostCSS global-data
22

3+
### Unreleased (patch)
4+
5+
- Fixed: TypeScript definition of the plugin options.
6+
37
### 1.0.2 (February 15, 2023)
48

59
- Fixed: file watching with PostCSS CLI

plugins/postcss-global-data/dist/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { PluginCreator } from 'postcss';
22
/** postcss-global-data plugin options */
33
export type pluginOptions = {
44
/** List of files to be used as context */
5-
files?: [];
5+
files?: Array<string>;
66
};
77
declare const creator: PluginCreator<pluginOptions>;
88
export default creator;

plugins/postcss-global-data/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { parseImport } from './parse-import';
44
/** postcss-global-data plugin options */
55
export type pluginOptions = {
66
/** List of files to be used as context */
7-
files?: [],
7+
files?: Array<string>,
88
};
99

1010
const creator: PluginCreator<pluginOptions> = (opts?: pluginOptions) => {

0 commit comments

Comments
 (0)