Skip to content

Commit

Permalink
🤖 Merge PR DefinitelyTyped#70745 Updates postcss-pxtorem types v6.1.0…
Browse files Browse the repository at this point in the history
… by @VignaAngularis
  • Loading branch information
VignaAngularis authored Oct 1, 2024
1 parent 2234e7a commit a1c6892
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
6 changes: 3 additions & 3 deletions types/postcss-pxtorem/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { PluginCreator } from "postcss";

import { Input, PluginCreator } from "postcss";
declare namespace PostcssPxToRem {
interface Options {
rootValue?: number | ((pixelValue: number) => number);
rootValue?: number | ((input: Input) => number);
unitPrecision?: number;
propList?: string[];
selectorBlackList?: Array<string | RegExp>;
replace?: boolean;
mediaQuery?: boolean;
minPixelValue?: number;
exclude?: string | RegExp | ((file: string) => boolean);
unit?: string;
}
}

Expand Down
2 changes: 1 addition & 1 deletion types/postcss-pxtorem/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@types/postcss-pxtorem",
"version": "6.0.9999",
"version": "6.1.9999",
"projects": [
"https://github.com/cuth/postcss-pxtorem#readme"
],
Expand Down
8 changes: 8 additions & 0 deletions types/postcss-pxtorem/postcss-pxtorem-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,11 @@ pxtorem({ minPixelValue: "2" });
pxtorem({ exclude: "file" });
// @ts-expect-error
pxtorem({ exclude: 2 });

pxtorem({ rootValue: () => 16 });
// @ts-expect-error
pxtorem({ rootValue: () => "16px" });

pxtorem({ unit: "px" });
// @ts-expect-error
pxtorem({ unit: 0 });

0 comments on commit a1c6892

Please sign in to comment.