From 4e1676c6935f8b18e6eac1a7aca0856b7af63e93 Mon Sep 17 00:00:00 2001 From: Luna <105922175+ImLunaHey@users.noreply.github.com> Date: Fri, 30 Dec 2022 10:42:33 +1030 Subject: [PATCH] feat: allow autocomplete for target --- src/options.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/options.ts b/src/options.ts index d99a1bb17..fbcd6dbf8 100644 --- a/src/options.ts +++ b/src/options.ts @@ -43,6 +43,11 @@ export type BannerOrFooter = } | ((ctx: { format: Format }) => { js?: string; css?: string } | undefined) +type Autocomplete = Keys | Omit; +export type BrowserTarget = 'chrome' | 'deno' | 'edge' | 'firefox' | 'hermes' | 'ie' | 'ios' | 'node' | 'opera' | 'rhino' | 'safari'; +export type EsTarget = 'es3' | 'es5' | 'es6' | 'es2015' | 'es2016' | 'es2017' | 'es2018' | 'es2019' | 'es2020' | 'es2021' | 'es2022' | 'esnext'; +export type Target = Autocomplete; + /** * The options available in tsup.config.ts * Not all of them are available from CLI flags @@ -64,7 +69,7 @@ export type Options = { * * default to `node14` */ - target?: string | string[] + target?: Target | Target[] minify?: boolean minifyWhitespace?: boolean minifyIdentifiers?: boolean