/** * @template T * @typedef {{missing: T, partial: T}} Filter */ /** * @typedef {Object} MissingSupportResultStats * @prop {string} title * @prop {caniuse.Feature} caniuseData * @prop {string} [missing] * @prop {Record>} [missingData] * @prop {string} [partial] * @prop {Record>} [partialData] */ /** * @typedef {Partial>} BrowserSupportStats */ /** * @typedef {Object} MissingSupportResult * @prop {string[][]} browsers * @prop {Partial>} features */ export default class BrowserSelection { /** * @param {Record>} browserStats * @return {string} */ static lackingBrowsers(browserStats: Record>): string; /** @type {Map} */ static "__#private@#browserSupportCache": Map; /** * @see BrowserSelection.compileBrowserSupport * @param {ConstructorParameters} constructorParameters * @return {MissingSupportResult} `{browsers, features}` */ static missingSupport(query?: string | string[], from?: string | false): MissingSupportResult; /** * @param {string | string[]} [query] * @param {string | false} [from] */ constructor(query?: string | string[], from?: string | false); browsersRequest: string | string[]; /** * @param {string} browser * @param {string} version * @return {string[]|undefined} */ test(browser: string, version: string): string[] | undefined; list(): string[][]; /** * @param {import('caniuse-lite').StatsByAgentID} stats * @return {Filter>>} */ filterStats(stats: import("caniuse-lite").StatsByAgentID): Filter>>; /** * Get data on CSS features not supported by the given autoprefixer-like * browser selection. * @return {BrowserSupportStats} `features` is an array of: * ``` * { * 'feature-name': { * title: 'Title of feature' * missing: "IE (8), Chrome (31)" * missingData: { * // map of browser -> version -> (lack of)support code * ie: { '8': 'n' }, * chrome: { '31': 'n' } * } * partialData: { * // map of browser -> version -> (partial)support code * ie: { '7': 'a' }, * ff: { '29': 'a #1' } * } * caniuseData: { * // caniuse-db json data for this feature * } * }, * 'feature-name-2': {} // etc. * } * ``` * * `feature-name` is a caniuse-db slug. */ compileBrowserSupport(): BrowserSupportStats; #private; } export type Filter = { missing: T; partial: T; }; export type MissingSupportResultStats = { title: string; caniuseData: caniuse.Feature; missing?: string; missingData?: Record>; partial?: string; partialData?: Record>; }; export type BrowserSupportStats = Partial>; export type MissingSupportResult = { browsers: string[][]; features: Partial>; }; import * as caniuse from 'caniuse-lite'; //# sourceMappingURL=BrowserSelection.d.ts.map