File tree 2 files changed +11
-18
lines changed
2 files changed +11
-18
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,11 @@ import transform from './lib/transform';
6
6
* warnWhenCannotResolve?: boolean,
7
7
* mediaQueries?: boolean,
8
8
* selectors?: boolean}} PostCssCalcOptions
9
- *
9
+ */
10
+ /**
11
+ * @type {import('postcss').PluginCreator<PostCssCalcOptions> }
10
12
* @param {PostCssCalcOptions } opts
13
+ * @return {import('postcss').Plugin }
11
14
*/
12
15
function pluginCreator ( opts ) {
13
16
const options = Object . assign ( {
@@ -20,10 +23,6 @@ function pluginCreator(opts) {
20
23
21
24
return {
22
25
postcssPlugin : 'postcss-calc' ,
23
- /**
24
- * @param {import('postcss').Root } css
25
- * @param {{result: import('postcss').Result} } helpers
26
- */
27
26
OnceExit ( css , { result } ) {
28
27
css . walk ( node => {
29
28
const { type } = node ;
Original file line number Diff line number Diff line change @@ -12,19 +12,13 @@ export type PostCssCalcOptions = {
12
12
* warnWhenCannotResolve?: boolean,
13
13
* mediaQueries?: boolean,
14
14
* selectors?: boolean}} PostCssCalcOptions
15
- *
16
- * @param {PostCssCalcOptions } opts
17
15
*/
18
- declare function pluginCreator ( opts : PostCssCalcOptions ) : {
19
- postcssPlugin : string ;
20
- /**
21
- * @param {import('postcss').Root } css
22
- * @param {{result: import('postcss').Result} } helpers
23
- */
24
- OnceExit ( css : import ( 'postcss' ) . Root , { result } : {
25
- result : import ( 'postcss' ) . Result ;
26
- } ) : void ;
27
- } ;
16
+ /**
17
+ * @type {import('postcss').PluginCreator<PostCssCalcOptions> }
18
+ * @param {PostCssCalcOptions } opts
19
+ * @return {import('postcss').Plugin }
20
+ */
21
+ declare function pluginCreator ( opts : PostCssCalcOptions ) : import ( 'postcss' ) . Plugin ;
28
22
declare namespace pluginCreator {
29
- const postcss : boolean ;
23
+ const postcss : true ;
30
24
}
You can’t perform that action at this time.
0 commit comments