| 1 | // Targets, engine names defined in compat-tables |
| 2 | export type Target = |
| 3 | | "node" |
| 4 | | "deno" |
| 5 | | "chrome" |
| 6 | | "opera" |
| 7 | | "edge" |
| 8 | | "firefox" |
| 9 | | "safari" |
| 10 | | "ie" |
| 11 | | "ios" |
| 12 | | "android" |
| 13 | | "electron" |
| 14 | | "samsung"; |
| 15 | |
| 16 | export type Targets = { |
| 17 | [target in Target]?: string; |
| 18 | }; |
| 19 | |
| 20 | export type TargetsTuple = Omit<Targets, "node"> & { |
| 21 | node?: string | true; |
| 22 | }; |
| 23 | |
| 24 | export type Browsers = string | ReadonlyArray<string>; |
| 25 | |
| 26 | export type InputTargets = { |
| 27 | browsers?: Browsers; |
| 28 | // When `true`, this completely replaces the `browsers` option. |
| 29 | // When `intersect`, this is intersected with the `browsers` |
| 30 | // option (giving the higher browsers as the result). |
| 31 | // TODO(Babel 8): Make `true` behave like `intersect` and |
| 32 | // remove `intersect`. |
| 33 | esmodules?: boolean | "intersect"; |
| 34 | } & Targets; |
| 35 | |
| 36 | export type { BrowserslistBrowserName } from "./targets"; |