/** @typedef {import('../data/features.js').FeatureKeys} FeatureKeys */ /** * @typedef {Object} OnFeatureUsageArguments * @prop {FeatureKeys} feature * @prop {import('./BrowserSelection.js').MissingSupportResultStats|undefined} featureData * @prop {import('postcss').Node} usage * @prop {string} message */ /** * @callback OnFeatureUsage * @param {OnFeatureUsageArguments} result * @return {any} */ export default class DoIUse { static default: any; /** * @param {Object} [options] * @param {ConstructorParameters[0]} [options.browsers] * @param {FeatureKeys[]} [options.ignore] * @param {OnFeatureUsage} [options.onFeatureUsage] * @param {string[]} [options.ignoreFiles] */ constructor(options?: { browsers?: [query?: string | readonly string[], from?: string | false][0]; ignore?: FeatureKeys[]; onFeatureUsage?: OnFeatureUsage; ignoreFiles?: string[]; }); browserQuery: string | readonly string[]; onFeatureUsage: OnFeatureUsage; ignoreOptions: ("outline" | "inline-block" | "rem" | "border-image" | "border-radius" | "font-size-adjust" | "text-decoration" | "object-fit" | "pointer-events" | "text-overflow" | "text-size-adjust" | "will-change" | "word-break" | "background-img-opts" | "background-position-x-y" | "calc" | "css-all" | "css-animation" | "css-any-link" | "css-appearance" | "css-at-counter-style" | "css-autofill" | "css-backdrop-filter" | "css-background-offsets" | "css-backgroundblendmode" | "css-boxshadow" | "css-canvas" | "css-clip-path" | "css-conic-gradients" | "css-container-queries-style" | "css-container-query-units" | "css-counters" | "css-env-function" | "css-featurequeries" | "css-filters" | "css-fixed" | "css-font-palette" | "css-font-stretch" | "css-gencontent" | "css-gradients" | "css-grid" | "css-grid-animation" | "css-hyphens" | "css-image-orientation" | "css-image-set" | "css-initial-value" | "css-logical-props" | "css-matches-pseudo" | "css-math-functions" | "css-masks" | "css-media-range-syntax" | "css-media-resolution" | "css-mediaqueries" | "css-motion-paths" | "css-mixblendmode" | "css-opacity" | "css-overflow-overlay" | "css-overscroll-behavior" | "css-placeholder" | "css-print-color-adjust" | "css-reflections" | "css-repeating-gradients" | "css-resize" | "css-revert-value" | "css-scrollbar" | "css-sel2" | "css-sel3" | "css-selection" | "css-shapes" | "css-sticky" | "css-table" | "css-textshadow" | "css-touch-action" | "css-transitions" | "css-unset-value" | "css-variables" | "css3-boxsizing" | "css3-colors" | "css3-cursors-grab" | "css3-cursors-newer" | "css3-cursors" | "css3-tabsize" | "flexbox" | "font-feature" | "font-unicode-range" | "fontface" | "fullscreen" | "intrinsic-width" | "kerning-pairs-ligatures" | "mdn-css-unicode-bidi-isolate" | "mdn-css-unicode-bidi-isolate-override" | "mdn-css-unicode-bidi-plaintext" | "mdn-text-decoration-color" | "mdn-text-decoration-line" | "mdn-text-decoration-shorthand" | "mdn-text-decoration-style" | "minmaxwh" | "multibackgrounds" | "multicolumn" | "pointer" | "transforms2d" | "transforms3d" | "user-select-none" | "viewport-units" | "wordwrap")[]; ignoreFiles: string[]; /** * @param {Object} [opts] * @param {ConstructorParameters[1]} [opts.from] */ info(opts?: { from?: [query?: string | readonly string[], from?: string | false][1]; }): { browsers: string[][]; features: Partial>; }; postcss(root: import("postcss").Root, result: import("postcss").Result): void | Promise; } export type FeatureKeys = import('../data/features.js').FeatureKeys; export type OnFeatureUsageArguments = { feature: FeatureKeys; featureData: import('./BrowserSelection.js').MissingSupportResultStats | undefined; usage: import('postcss').Node; message: string; }; export type OnFeatureUsage = (result: OnFeatureUsageArguments) => any;