Skip to content

Commit a1c6200

Browse files
feat: add types (#54)
* feat: add types * chore: fix typo
1 parent a2c2baf commit a1c6200

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

index.d.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { PluginCreator } from "postcss";
2+
3+
export interface Options {
4+
/**
5+
* Wraps the entire rule inside `@layer` syntax.
6+
*/
7+
layer?: string;
8+
9+
/**
10+
* Where to search for css props, globbing allowed.
11+
*/
12+
files?: string[];
13+
14+
/**
15+
* Selector where the props are pushed to instead of `:root`.
16+
*/
17+
custom_selector?: string;
18+
}
19+
20+
type Props = Record<string, string | number>;
21+
22+
export type PostcssJitPropsOptions = Options & Props;
23+
declare const postcssJitProps: PluginCreator<PostcssJitPropsOptions>;
24+
25+
export default postcssJitProps;

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"css-vars",
1010
"css-custom-properties"
1111
],
12+
"types": "index.d.ts",
1213
"scripts": {
1314
"test": "jest --coverage && eslint .",
1415
"dev": "jest --coverage --watch",

0 commit comments

Comments
 (0)