Urara-Blog/node_modules/.pnpm-store/v3/files/eb/3b9653ed84701c0b14ba23e746ea14a1c4b50b15e5d41be96102dd24bd95d3b178893734c3b758570f15ee671f3bf17125ed9a05505af6384cce3fac0aaf80
2022-08-14 01:14:53 +08:00

60 lines
1.7 KiB
Text

export = BasePlugin;
declare class BasePlugin {
/**
* @param {string[]} targets
* @param {string[]} nodeTypes
* @param {import('postcss').Result=} result
*/
constructor(targets: string[], nodeTypes: string[], result?: import('postcss').Result | undefined);
/** @type {NodeWithInfo[]} */
nodes: NodeWithInfo[];
targets: Set<string>;
nodeTypes: Set<string>;
result: import("postcss").Result | undefined;
/**
* @param {import('postcss').Node} node
* @param {{identifier: string, hack: string}} metadata
* @return {void}
*/
push(node: import('postcss').Node, metadata: {
identifier: string;
hack: string;
}): void;
/**
* @param {import('postcss').Node} node
* @return {boolean}
*/
any(node: import('postcss').Node): boolean;
/**
* @param {import('postcss').Node} node
* @return {void}
*/
detectAndResolve(node: import('postcss').Node): void;
/**
* @param {import('postcss').Node} node
* @return {void}
*/
detectAndWarn(node: import('postcss').Node): void;
/** @param {import('postcss').Node} node */
detect(node: import('postcss').Node): void;
/** @return {void} */
resolve(): void;
warn(): void;
}
declare namespace BasePlugin {
export { Plugin, NodeWithInfo };
}
type NodeWithInfo = import('postcss').Node & {
_stylehacks: {
message: string;
browsers: Set<string>;
identifier: string;
hack: string;
};
};
type Plugin = {
targets: Set<string>;
nodeTypes: Set<string>;
detectAndResolve: (node: import('postcss').Node) => void;
detectAndWarn: (node: import('postcss').Node) => void;
};