From 581ab8d1357f63482200deef1b4178accfffa49c Mon Sep 17 00:00:00 2001 From: Don Isaac Date: Thu, 19 Sep 2024 15:57:24 -0400 Subject: [PATCH 1/3] feat: add isolatedDeclarations to compilerOptions --- Cargo.lock | 2 +- test/tsconfig.common.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 781cc9c..2db678a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -134,7 +134,7 @@ dependencies = [ [[package]] name = "tsconfig" -version = "0.2.1" +version = "0.3.1" dependencies = [ "json_comments", "regex", diff --git a/test/tsconfig.common.json b/test/tsconfig.common.json index ba77469..a61aec2 100644 --- a/test/tsconfig.common.json +++ b/test/tsconfig.common.json @@ -17,6 +17,7 @@ "importHelpers": true /* Import emit helpers from 'tslib'. */, "downlevelIteration": true /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */, "isolatedModules": true /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */, + "isolatedDeclarations": true, /* Strict Type-Checking Options */ "strict": true /* Enable all strict type-checking options. */, From e2f5b2b2fd92c0868a2899a91f31413d259ed29f Mon Sep 17 00:00:00 2001 From: Don Isaac Date: Thu, 19 Sep 2024 15:59:01 -0400 Subject: [PATCH 2/3] chore: add mistakenly unstaged changes --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index 5e31fb5..7e6bdf9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -364,6 +364,7 @@ pub struct CompilerOptions { pub import_helpers: Option, pub incremental: Option, pub isolated_modules: Option, + pub isolated_declarations: Option, pub jsx: Option, pub lib: Option>, pub module: Option, From e33c86ba206dbf27fd0bab33afeb13440825a246 Mon Sep 17 00:00:00 2001 From: Don Isaac Date: Thu, 19 Sep 2024 16:07:01 -0400 Subject: [PATCH 3/3] feat: support modern ECMAScript libs and targets (#1) --- src/lib.rs | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 7e6bdf9..5cc99c8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -472,10 +472,10 @@ pub struct CompilerOptions { #[derive(Deserialize, Debug, PartialEq, Copy, Clone, Default)] #[serde(rename_all = "lowercase")] pub enum ModuleDetectionMode { - #[default] - Auto, - Legacy, - Force, + #[default] + Auto, + Legacy, + Force, } /// Module resolution mode @@ -581,6 +581,9 @@ pub enum Target { Es2018, Es2019, Es2020, + Es2021, + Es2022, + Es2023, EsNext, Other(String), } @@ -602,6 +605,9 @@ impl<'de> Deserialize<'de> for Target { "ES2018" => Target::Es2018, "ES2019" => Target::Es2019, "ES2020" => Target::Es2020, + "ES2021" => Target::Es2021, + "ES2022" => Target::Es2022, + "ES2023" => Target::Es2023, "ESNEXT" => Target::EsNext, other => Target::Other(other.to_string()), }; @@ -631,6 +637,9 @@ pub enum Lib { Es2018, Es2019, Es2020, + Es2021, + Es2022, + Es2023, EsNext, Dom, WebWorker, @@ -684,6 +693,9 @@ impl<'de> Deserialize<'de> for Lib { "ES2018" => Lib::Es2018, "ES2019" => Lib::Es2019, "ES2020" => Lib::Es2020, + "ES2021" => Lib::Es2021, + "ES2022" => Lib::Es2022, + "ES2023" => Lib::Es2023, "ESNext" => Lib::EsNext, "DOM" => Lib::Dom, "WEBWORKER" => Lib::WebWorker,