index.d.ts 1.8 KB

12345678910111213141516171819202122232425262728
  1. import { BrowserVersion, Options, AllVersionsOptions, AllBrowsersBrowserVersion, NestedBrowserVersions, TimelineOptions, TimelineEvent, BrowserTimeline } from "./types.js";
  2. export declare function _resetHasWarned(): void;
  3. /**
  4. * Returns browser versions compatible with specified Baseline targets.
  5. * Defaults to returning the minimum versions of the core browser set that support Baseline Widely available.
  6. * Takes an optional configuration `Object` with four optional properties:
  7. * - `listAllCompatibleVersions`: `false` (default) or `true`
  8. * - `includeDownstreamBrowsers`: `false` (default) or `true`
  9. * - `widelyAvailableOnDate`: date in format `YYYY-MM-DD`
  10. * - `targetYear`: year in format `YYYY`
  11. * - `supressWarnings`: `false` (default) or `true`
  12. */
  13. export declare function getCompatibleVersions(userOptions?: Options): BrowserVersion[];
  14. /**
  15. * Returns all browser versions known to this module with their level of Baseline support as a JavaScript `Array` (`"array"`), `Object` (`"object"`) or a CSV string (`"csv"`).
  16. * Takes an optional configuration `Object` with three optional properties:
  17. * - `includeDownstreamBrowsers`: `false` (default) or `true`
  18. * - `outputFormat`: `"array"` (default), `"object"` or `"csv"`
  19. * - `useSupports`: `false` (default) or `true`, replaces `wa_compatible` property with optional `supports` property which returns `widely` or `newly` available when present.
  20. * - `supressWarnings`: `false` (default) or `true`
  21. */
  22. export declare function getAllVersions(userOptions?: AllVersionsOptions): AllBrowsersBrowserVersion[] | NestedBrowserVersions | string;
  23. export declare function getTimeline(userOptions?: TimelineOptions & {
  24. groupBy?: "date";
  25. }): TimelineEvent[];
  26. export declare function getTimeline(userOptions: TimelineOptions & {
  27. groupBy: "browser";
  28. }): BrowserTimeline;