File tree Expand file tree Collapse file tree 2 files changed +11
-18
lines changed
Expand file tree Collapse file tree 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';
66 * warnWhenCannotResolve?: boolean,
77 * mediaQueries?: boolean,
88 * selectors?: boolean}} PostCssCalcOptions
9- *
9+ */
10+ /**
11+ * @type {import('postcss').PluginCreator<PostCssCalcOptions> }
1012 * @param {PostCssCalcOptions } opts
13+ * @return {import('postcss').Plugin }
1114 */
1215function pluginCreator ( opts ) {
1316 const options = Object . assign ( {
@@ -20,10 +23,6 @@ function pluginCreator(opts) {
2023
2124 return {
2225 postcssPlugin : 'postcss-calc' ,
23- /**
24- * @param {import('postcss').Root } css
25- * @param {{result: import('postcss').Result} } helpers
26- */
2726 OnceExit ( css , { result } ) {
2827 css . walk ( node => {
2928 const { type } = node ;
Original file line number Diff line number Diff line change @@ -12,19 +12,13 @@ export type PostCssCalcOptions = {
1212 * warnWhenCannotResolve?: boolean,
1313 * mediaQueries?: boolean,
1414 * selectors?: boolean}} PostCssCalcOptions
15- *
16- * @param {PostCssCalcOptions } opts
1715 */
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 ;
2822declare namespace pluginCreator {
29- const postcss : boolean ;
23+ const postcss : true ;
3024}
You can’t perform that action at this time.
0 commit comments