From 1240b8834f70e73edf327347a2851fe79bfb51e5 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Sat, 16 Mar 2024 00:06:03 +0000 Subject: [PATCH 001/172] chore: Publish 1.4.9-nightly-20240316.1 --- bindings/Cargo.lock | 10 +++++----- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_node/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 4 ++-- package.json | 2 +- packages/minifier/package.json | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 739bec71d77a..cad441e5bc30 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -223,7 +223,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.4.8" +version = "1.4.9-nightly-20240316.1" dependencies = [ "anyhow", "getrandom", @@ -283,7 +283,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.4.8" +version = "1.4.9-nightly-20240316.1" dependencies = [ "anyhow", "getrandom", @@ -3039,7 +3039,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.200" +version = "0.91.201" dependencies = [ "anyhow", "swc_cli_impl", @@ -3047,9 +3047,9 @@ dependencies = [ [[package]] name = "swc_cli_impl" -version = "0.8.18" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc166dcd6a5c9cc0cdee11bbf7519467e847da5cfd514fe04c4e51e670c54fda" +checksum = "264ba0adccc8721359ed240c004f8744846f5431a50d0c8f7717defbd02547c9" dependencies = [ "anyhow", "atty", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index e960d6b5cd4a..fcf2f4d05dc6 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.8" +version = "1.4.9-nightly-20240316.1" [lib] bench = false diff --git a/bindings/binding_minifier_node/Cargo.toml b/bindings/binding_minifier_node/Cargo.toml index 4ebc97f5cb97..931fb0c27ee5 100644 --- a/bindings/binding_minifier_node/Cargo.toml +++ b/bindings/binding_minifier_node/Cargo.toml @@ -35,7 +35,7 @@ tracing-chrome = "0.5.0" tracing-futures = "0.2.5" tracing-subscriber = { version = "0.3.9", features = ["env-filter"] } -swc_compiler_base = { version = "0.7.15", features = ["node"] } +swc_compiler_base = { version = "0.7.17", features = ["node"] } swc_config = "0.1.11" swc_core = { version = "0.90.22", features = [ "allocator_node", diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index a8d6edde3219..8dc5118e6eef 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.8" +version = "1.4.9-nightly-20240316.1" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 50090508171e..e96c27158dc2 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.200" +version = "0.91.201" [[bin]] bench = false @@ -19,4 +19,4 @@ plugin = ["swc_cli_impl/plugin"] [dependencies] anyhow = "1.0.66" -swc_cli_impl = "0.8.18" +swc_cli_impl = "0.8.21" diff --git a/package.json b/package.json index 773713e1ba06..947d25f38805 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.4.8", + "version": "1.4.9-nightly-20240316.1", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/package.json b/packages/minifier/package.json index feb81c34c656..d03abeb132eb 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.4.8", + "version": "1.4.9-nightly-20240316.1", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", From f2300dadbf8de9270f0e431dff61b7905fe08caa Mon Sep 17 00:00:00 2001 From: Kyuuhachi <1547062+Kyuuhachi@users.noreply.github.com> Date: Sun, 17 Mar 2024 14:03:14 +0100 Subject: [PATCH 002/172] refactor(common): Debug-print spans more compactly (#8746) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description:** `dbg!()` output on ASTs is kinda verbose, ```rs ExprStmt { span: Span { lo: BytePos( 37, ), hi: BytePos( 50, ), ctxt: #0, }, expr: Lit( Str( Str { span: Span { lo: BytePos( 37, ), hi: BytePos( 49, ), ctxt: #0, }, value: "use strict", raw: Some( "\"use strict\"", ), }, ), ), } ``` A lot of the space is wasted on spans — 9 lines per span, even though it's pretty much unimportant cruft. This PR changes that to just one line per span: ```rs ExprStmt { span: 37..50#0, expr: Lit( Str( Str { span: 37..49#0, value: "use strict", raw: Some( "\"use strict\"", ), }, ), ), } ``` While not a statistically meaningful measurement, in my tests (sample size = 1) this change reduces the `dbg!()` of a 1103-byte script from 5597 to 2885 lines, which is a 48% reduction. In `{:?}` mode it goes from 40034 to 25457 chars, or 37% reduction. --- crates/jsdoc/tests/fixtures/abstracttag.debug | 200 +---- crates/jsdoc/tests/fixtures/accesstag.debug | 470 ++--------- crates/jsdoc/tests/fixtures/alias.debug | 120 +-- crates/jsdoc/tests/fixtures/alias2.debug | 90 +-- crates/jsdoc/tests/fixtures/alias3.debug | 90 +-- crates/jsdoc/tests/fixtures/alias4.debug | 130 +-- crates/jsdoc/tests/fixtures/alias5.debug | 340 +------- crates/jsdoc/tests/fixtures/alias6.debug | 140 +--- .../jsdoc/tests/fixtures/aliasexports.debug | 160 +--- crates/jsdoc/tests/fixtures/aliasglobal.debug | 70 +- .../jsdoc/tests/fixtures/aliasglobal2.debug | 160 +--- .../jsdoc/tests/fixtures/aliasresolve.debug | 180 +---- .../jsdoc/tests/fixtures/aliasresolve2.debug | 180 +---- crates/jsdoc/tests/fixtures/also.debug | 450 ++--------- crates/jsdoc/tests/fixtures/also2.debug | 160 +--- .../jsdoc/tests/fixtures/anonymousclass.debug | 220 +----- .../tests/fixtures/anonymousclassparam.debug | 70 +- .../jsdoc/tests/fixtures/arrowfunction.debug | 170 +--- .../jsdoc/tests/fixtures/asyncfunction.debug | 250 +----- crates/jsdoc/tests/fixtures/asynctag.debug | 90 +-- crates/jsdoc/tests/fixtures/augmentall.debug | 240 +----- crates/jsdoc/tests/fixtures/augmentall2.debug | 240 +----- crates/jsdoc/tests/fixtures/augmentstag.debug | 390 +-------- .../jsdoc/tests/fixtures/augmentstag2.debug | 60 +- .../jsdoc/tests/fixtures/augmentstag3.debug | 250 +----- .../jsdoc/tests/fixtures/augmentstag4.debug | 230 +----- .../jsdoc/tests/fixtures/augmentstag5.debug | 550 ++----------- .../jsdoc/tests/fixtures/augmentstag6.debug | 150 +--- crates/jsdoc/tests/fixtures/authortag.debug | 160 +--- crates/jsdoc/tests/fixtures/borrowstag.debug | 130 +-- crates/jsdoc/tests/fixtures/borrowstag2.debug | 190 +---- crates/jsdoc/tests/fixtures/callbacktag.debug | 140 +--- .../jsdoc/tests/fixtures/classdesctag.debug | 230 +----- .../tests/fixtures/classproperties.debug | 80 +- crates/jsdoc/tests/fixtures/classtag.debug | 50 +- crates/jsdoc/tests/fixtures/classtag2.debug | 520 ++---------- .../tests/fixtures/classwithoutname.debug | 60 +- crates/jsdoc/tests/fixtures/constanttag.debug | 320 +------- .../jsdoc/tests/fixtures/constanttag2.debug | 20 +- .../jsdoc/tests/fixtures/constructortag.debug | 180 +---- .../jsdoc/tests/fixtures/constructstag.debug | 260 +----- .../jsdoc/tests/fixtures/constructstag2.debug | 180 +---- .../jsdoc/tests/fixtures/constructstag3.debug | 320 +------- .../jsdoc/tests/fixtures/constructstag4.debug | 280 +------ .../jsdoc/tests/fixtures/constructstag5.debug | 150 +--- .../jsdoc/tests/fixtures/copyrighttag.debug | 60 +- .../jsdoc/tests/fixtures/defaultparams.debug | 730 ++--------------- .../jsdoc/tests/fixtures/defaultparams2.debug | 90 +-- crates/jsdoc/tests/fixtures/defaulttag.debug | 660 ++-------------- crates/jsdoc/tests/fixtures/definetag.debug | 60 +- .../jsdoc/tests/fixtures/deprecatedtag.debug | 120 +-- .../jsdoc/tests/fixtures/descriptiontag.debug | 120 +-- .../jsdoc/tests/fixtures/destructuring.debug | 70 +- crates/jsdoc/tests/fixtures/dicttag.debug | 60 +- crates/jsdoc/tests/fixtures/doclet.debug | 140 +--- .../jsdoc/tests/fixtures/emptycomments.debug | 120 +-- crates/jsdoc/tests/fixtures/enumtag.debug | 220 +----- crates/jsdoc/tests/fixtures/enumtag2.debug | 340 +------- crates/jsdoc/tests/fixtures/enumtag3.debug | 100 +-- .../jsdoc/tests/fixtures/eventfirestag.debug | 330 +------- crates/jsdoc/tests/fixtures/eventorder.debug | 250 +----- crates/jsdoc/tests/fixtures/exampletag.debug | 160 +--- .../jsdoc/tests/fixtures/exceptiontag.debug | 240 +----- crates/jsdoc/tests/fixtures/exportclass.debug | 90 +-- .../jsdoc/tests/fixtures/exportdefault.debug | 90 +-- .../tests/fixtures/exportdefaultclass.debug | 110 +-- crates/jsdoc/tests/fixtures/exports.debug | 350 +-------- crates/jsdoc/tests/fixtures/exportstag.debug | 190 +---- crates/jsdoc/tests/fixtures/exportstag2.debug | 130 +-- crates/jsdoc/tests/fixtures/exportstag3.debug | 100 +-- crates/jsdoc/tests/fixtures/exportstag4.debug | 130 +-- crates/jsdoc/tests/fixtures/exportstag5.debug | 150 +--- crates/jsdoc/tests/fixtures/exportstag6.debug | 190 +---- crates/jsdoc/tests/fixtures/exportstag7.debug | 170 +--- crates/jsdoc/tests/fixtures/exportstag8.debug | 60 +- crates/jsdoc/tests/fixtures/exporttag.debug | 120 +-- crates/jsdoc/tests/fixtures/externaltag.debug | 360 +-------- .../jsdoc/tests/fixtures/externaltag2.debug | 170 +--- .../jsdoc/tests/fixtures/externaltag3.debug | 320 +------- crates/jsdoc/tests/fixtures/externstag.debug | 60 +- crates/jsdoc/tests/fixtures/file.debug | 100 +-- .../tests/fixtures/fileoverviewtag.debug | 60 +- .../jsdoc/tests/fixtures/funcExpression.debug | 90 +-- .../tests/fixtures/funcExpression2.debug | 90 +-- .../tests/fixtures/funcExpression3.debug | 90 +-- crates/jsdoc/tests/fixtures/functiontag.debug | 100 +-- crates/jsdoc/tests/fixtures/generators.debug | 80 +- crates/jsdoc/tests/fixtures/getset.debug | 390 +-------- crates/jsdoc/tests/fixtures/getset2.debug | 140 +--- crates/jsdoc/tests/fixtures/globaltag.debug | 120 +-- .../tests/fixtures/hideconstructortag.debug | 680 ++-------------- crates/jsdoc/tests/fixtures/ignoretag.debug | 50 +- crates/jsdoc/tests/fixtures/ignoretag2.debug | 50 +- .../tests/fixtures/implicitcasttag.debug | 100 +-- .../jsdoc/tests/fixtures/inheritdoctag.debug | 540 ++----------- .../jsdoc/tests/fixtures/inlinecomment.debug | 40 +- .../tests/fixtures/inlineparamcomment.debug | 40 +- .../tests/fixtures/inlineparamcomment2.debug | 120 +-- crates/jsdoc/tests/fixtures/inner.debug | 40 +- crates/jsdoc/tests/fixtures/innerscope.debug | 110 +-- crates/jsdoc/tests/fixtures/innerscope2.debug | 110 +-- .../tests/fixtures/instanceproperty.debug | 90 +-- .../tests/fixtures/interface-implements.debug | 640 ++------------- .../jsdoc/tests/fixtures/interfacetag2.debug | 60 +- .../jsdoc/tests/fixtures/interfacetag3.debug | 60 +- crates/jsdoc/tests/fixtures/kindtag.debug | 60 +- crates/jsdoc/tests/fixtures/lends.debug | 180 +---- crates/jsdoc/tests/fixtures/lends2.debug | 170 +--- crates/jsdoc/tests/fixtures/lends3.debug | 180 +---- crates/jsdoc/tests/fixtures/lends4.debug | 150 +--- crates/jsdoc/tests/fixtures/lends5.debug | 150 +--- crates/jsdoc/tests/fixtures/lends6.debug | 300 +------ crates/jsdoc/tests/fixtures/lendsglobal.debug | 160 +--- crates/jsdoc/tests/fixtures/letkeyword.debug | 80 +- crates/jsdoc/tests/fixtures/licensetag.debug | 60 +- crates/jsdoc/tests/fixtures/linktag.debug | 220 +----- crates/jsdoc/tests/fixtures/listenstag.debug | 430 +--------- crates/jsdoc/tests/fixtures/memberoftag.debug | 180 +---- .../jsdoc/tests/fixtures/memberoftag2.debug | 140 +--- .../jsdoc/tests/fixtures/memberoftag3.debug | 200 +---- .../jsdoc/tests/fixtures/memberoftag4.debug | 200 +---- .../jsdoc/tests/fixtures/memberoftag5.debug | 100 +-- .../tests/fixtures/memberoftagforced.debug | 530 ++----------- crates/jsdoc/tests/fixtures/membertag.debug | 280 +------ .../tests/fixtures/methoddefinition.debug | 40 +- crates/jsdoc/tests/fixtures/mixintag.debug | 160 +--- crates/jsdoc/tests/fixtures/mixintag2.debug | 510 ++---------- crates/jsdoc/tests/fixtures/modifiestag.debug | 60 +- .../jsdoc/tests/fixtures/moduleclasses.debug | 190 +---- crates/jsdoc/tests/fixtures/moduleinner.debug | 250 +----- .../tests/fixtures/moduleisconstructor.debug | 270 +------ .../tests/fixtures/moduleisconstructor2.debug | 250 +----- .../tests/fixtures/moduleisfunction.debug | 140 +--- .../tests/fixtures/modules/data/mod-1.debug | 70 +- .../tests/fixtures/modules/data/mod-2.debug | 70 +- .../tests/fixtures/modules/data/mod-3.debug | 170 +--- crates/jsdoc/tests/fixtures/moduletag.debug | 140 +--- crates/jsdoc/tests/fixtures/moduletag10.debug | 70 +- crates/jsdoc/tests/fixtures/moduletag11.debug | 130 +-- crates/jsdoc/tests/fixtures/moduletag2.debug | 110 +-- crates/jsdoc/tests/fixtures/moduletag3.debug | 290 +------ crates/jsdoc/tests/fixtures/moduletag4.debug | 200 +---- crates/jsdoc/tests/fixtures/moduletag5.debug | 70 +- crates/jsdoc/tests/fixtures/moduletag6.debug | 130 +-- crates/jsdoc/tests/fixtures/moduletag7.debug | 90 +-- crates/jsdoc/tests/fixtures/moduletag8.debug | 180 +---- crates/jsdoc/tests/fixtures/moduletag9.debug | 70 +- .../jsdoc/tests/fixtures/namespacetag.debug | 240 +----- crates/jsdoc/tests/fixtures/nametag.debug | 170 +--- crates/jsdoc/tests/fixtures/noaliastag.debug | 60 +- .../jsdoc/tests/fixtures/nocollapsetag.debug | 110 +-- .../jsdoc/tests/fixtures/nocompiletag.debug | 60 +- .../tests/fixtures/nosideeffectstag.debug | 60 +- .../tests/fixtures/numericpropertytag.debug | 200 +---- crates/jsdoc/tests/fixtures/objectlit.debug | 60 +- crates/jsdoc/tests/fixtures/objectlit2.debug | 40 +- crates/jsdoc/tests/fixtures/objectlit3.debug | 80 +- crates/jsdoc/tests/fixtures/overridetag.debug | 540 ++----------- .../jsdoc/tests/fixtures/overridetag2.debug | 510 ++---------- crates/jsdoc/tests/fixtures/packagetag.debug | 50 +- crates/jsdoc/tests/fixtures/packagetag2.debug | 60 +- crates/jsdoc/tests/fixtures/paramtag.debug | 720 ++--------------- crates/jsdoc/tests/fixtures/paramtag2.debug | 190 +---- .../tests/fixtures/paramtaginvalidtype.debug | 120 +-- crates/jsdoc/tests/fixtures/plugins.debug | 130 +-- .../tests/fixtures/polymerbehaviortag.debug | 60 +- crates/jsdoc/tests/fixtures/polymertag.debug | 60 +- crates/jsdoc/tests/fixtures/preservetag.debug | 60 +- crates/jsdoc/tests/fixtures/privatetag.debug | 80 +- crates/jsdoc/tests/fixtures/privatetag2.debug | 60 +- crates/jsdoc/tests/fixtures/projecttag.debug | 180 +---- crates/jsdoc/tests/fixtures/propertytag.debug | 270 +------ .../jsdoc/tests/fixtures/protectedtag.debug | 230 +----- .../jsdoc/tests/fixtures/protectedtag2.debug | 130 +-- crates/jsdoc/tests/fixtures/publictag.debug | 60 +- crates/jsdoc/tests/fixtures/publictag2.debug | 50 +- crates/jsdoc/tests/fixtures/quotename.debug | 170 +--- crates/jsdoc/tests/fixtures/quotename2.debug | 120 +-- crates/jsdoc/tests/fixtures/readonlytag.debug | 100 +-- crates/jsdoc/tests/fixtures/requirestag.debug | 480 ++---------- crates/jsdoc/tests/fixtures/restparams.debug | 260 +----- crates/jsdoc/tests/fixtures/restparams2.debug | 90 +-- crates/jsdoc/tests/fixtures/returnstag.debug | 280 +------ crates/jsdoc/tests/fixtures/scopetags.debug | 220 +----- crates/jsdoc/tests/fixtures/seetag.debug | 120 +-- crates/jsdoc/tests/fixtures/sincetag.debug | 60 +- .../jsdoc/tests/fixtures/specialchars.debug | 90 +-- .../jsdoc/tests/fixtures/specialnames.debug | 160 +--- crates/jsdoc/tests/fixtures/structtag.debug | 60 +- crates/jsdoc/tests/fixtures/summarytag.debug | 60 +- crates/jsdoc/tests/fixtures/suppresstag.debug | 60 +- crates/jsdoc/tests/fixtures/templatetag.debug | 110 +-- .../tests/fixtures/this-and-objectlit.debug | 70 +- crates/jsdoc/tests/fixtures/this.debug | 70 +- crates/jsdoc/tests/fixtures/this2.debug | 140 +--- crates/jsdoc/tests/fixtures/this3.debug | 20 +- crates/jsdoc/tests/fixtures/this4.debug | 70 +- crates/jsdoc/tests/fixtures/this5.debug | 150 +--- crates/jsdoc/tests/fixtures/this6.debug | 190 +---- crates/jsdoc/tests/fixtures/thistag.debug | 140 +--- crates/jsdoc/tests/fixtures/thistag2.debug | 210 +---- crates/jsdoc/tests/fixtures/todotag.debug | 100 +-- crates/jsdoc/tests/fixtures/typedeftag.debug | 310 +------- crates/jsdoc/tests/fixtures/typedeftag2.debug | 80 +- crates/jsdoc/tests/fixtures/typekind.debug | 70 +- crates/jsdoc/tests/fixtures/typetag.debug | 180 +---- crates/jsdoc/tests/fixtures/typetag2.debug | 60 +- .../jsdoc/tests/fixtures/typetaginline.debug | 740 ++---------------- .../tests/fixtures/typetagwithnewline.debug | 170 +--- .../tests/fixtures/undocumentedtag.debug | 60 +- .../tests/fixtures/unrestrictedtag.debug | 60 +- crates/jsdoc/tests/fixtures/utf8.debug | 60 +- crates/jsdoc/tests/fixtures/var.debug | 60 +- crates/jsdoc/tests/fixtures/variations.debug | 690 ++-------------- .../jsdoc/tests/fixtures/variationtag.debug | 240 +----- crates/jsdoc/tests/fixtures/versiontag.debug | 60 +- crates/jsdoc/tests/fixtures/virtual.debug | 70 +- crates/jsdoc/tests/fixtures/virtual2.debug | 270 +------ crates/jsdoc/tests/fixtures/virtual3.debug | 130 +-- crates/jsdoc/tests/fixtures/yieldstag.debug | 210 +---- crates/swc_common/src/syntax_pos.rs | 8 +- .../empty-with-comments/input.ts.comments | 10 +- .../custom/issue-236/input.ts.stdout | 426 ---------- 223 files changed, 3904 insertions(+), 35500 deletions(-) delete mode 100644 crates/swc_ecma_parser/tests/typescript/custom/issue-236/input.ts.stdout diff --git a/crates/jsdoc/tests/fixtures/abstracttag.debug b/crates/jsdoc/tests/fixtures/abstracttag.debug index 134c6c1b77ae..b6f71227f76e 100644 --- a/crates/jsdoc/tests/fixtures/abstracttag.debug +++ b/crates/jsdoc/tests/fixtures/abstracttag.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, ty: None, name: None, }, @@ -63,122 +23,42 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 46, - ), - hi: BytePos( - 46, - ), - ctxt: #0, - }, + span: 46..46#0, description: Text { - span: Span { - lo: BytePos( - 46, - ), - hi: BytePos( - 46, - ), - ctxt: #0, - }, + span: 46..46#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 46, - ), - hi: BytePos( - 54, - ), - ctxt: #0, - }, + span: 46..54#0, tag_name: Text { - span: Span { - lo: BytePos( - 46, - ), - hi: BytePos( - 54, - ), - ctxt: #0, - }, + span: 46..54#0, value: "abstract", }, tag: Abstract( AbstractTag { - span: Span { - lo: BytePos( - 46, - ), - hi: BytePos( - 54, - ), - ctxt: #0, - }, + span: 46..54#0, }, ), }, ], }, JsDoc { - span: Span { - lo: BytePos( - 100, - ), - hi: BytePos( - 100, - ), - ctxt: #0, - }, + span: 100..100#0, description: Text { - span: Span { - lo: BytePos( - 100, - ), - hi: BytePos( - 100, - ), - ctxt: #0, - }, + span: 100..100#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 100, - ), - hi: BytePos( - 111, - ), - ctxt: #0, - }, + span: 100..111#0, tag_name: Text { - span: Span { - lo: BytePos( - 100, - ), - hi: BytePos( - 111, - ), - ctxt: #0, - }, + span: 100..111#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 100, - ), - hi: BytePos( - 111, - ), - ctxt: #0, - }, + span: 100..111#0, ty: None, name: None, }, @@ -187,61 +67,21 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 150, - ), - hi: BytePos( - 150, - ), - ctxt: #0, - }, + span: 150..150#0, description: Text { - span: Span { - lo: BytePos( - 150, - ), - hi: BytePos( - 150, - ), - ctxt: #0, - }, + span: 150..150#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 150, - ), - hi: BytePos( - 157, - ), - ctxt: #0, - }, + span: 150..157#0, tag_name: Text { - span: Span { - lo: BytePos( - 150, - ), - hi: BytePos( - 157, - ), - ctxt: #0, - }, + span: 150..157#0, value: "virtual", }, tag: Abstract( AbstractTag { - span: Span { - lo: BytePos( - 150, - ), - hi: BytePos( - 157, - ), - ctxt: #0, - }, + span: 150..157#0, }, ), }, diff --git a/crates/jsdoc/tests/fixtures/accesstag.debug b/crates/jsdoc/tests/fixtures/accesstag.debug index 411a4df7b20b..40a513a4b578 100644 --- a/crates/jsdoc/tests/fixtures/accesstag.debug +++ b/crates/jsdoc/tests/fixtures/accesstag.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, ty: None, name: None, }, @@ -63,71 +23,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 46, - ), - hi: BytePos( - 46, - ), - ctxt: #0, - }, + span: 46..46#0, description: Text { - span: Span { - lo: BytePos( - 46, - ), - hi: BytePos( - 46, - ), - ctxt: #0, - }, + span: 46..46#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 46, - ), - hi: BytePos( - 52, - ), - ctxt: #0, - }, + span: 46..52#0, tag_name: Text { - span: Span { - lo: BytePos( - 46, - ), - hi: BytePos( - 52, - ), - ctxt: #0, - }, + span: 46..52#0, value: "access", }, tag: Access( AccessTag { - span: Span { - lo: BytePos( - 46, - ), - hi: BytePos( - 52, - ), - ctxt: #0, - }, + span: 46..52#0, access: Text { - span: Span { - lo: BytePos( - 46, - ), - hi: BytePos( - 53, - ), - ctxt: #0, - }, + span: 46..53#0, value: "private", }, }, @@ -136,71 +48,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 91, - ), - hi: BytePos( - 91, - ), - ctxt: #0, - }, + span: 91..91#0, description: Text { - span: Span { - lo: BytePos( - 91, - ), - hi: BytePos( - 91, - ), - ctxt: #0, - }, + span: 91..91#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 91, - ), - hi: BytePos( - 97, - ), - ctxt: #0, - }, + span: 91..97#0, tag_name: Text { - span: Span { - lo: BytePos( - 91, - ), - hi: BytePos( - 97, - ), - ctxt: #0, - }, + span: 91..97#0, value: "access", }, tag: Access( AccessTag { - span: Span { - lo: BytePos( - 91, - ), - hi: BytePos( - 97, - ), - ctxt: #0, - }, + span: 91..97#0, access: Text { - span: Span { - lo: BytePos( - 91, - ), - hi: BytePos( - 100, - ), - ctxt: #0, - }, + span: 91..100#0, value: "protected", }, }, @@ -209,71 +73,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 140, - ), - hi: BytePos( - 140, - ), - ctxt: #0, - }, + span: 140..140#0, description: Text { - span: Span { - lo: BytePos( - 140, - ), - hi: BytePos( - 140, - ), - ctxt: #0, - }, + span: 140..140#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 140, - ), - hi: BytePos( - 146, - ), - ctxt: #0, - }, + span: 140..146#0, tag_name: Text { - span: Span { - lo: BytePos( - 140, - ), - hi: BytePos( - 146, - ), - ctxt: #0, - }, + span: 140..146#0, value: "access", }, tag: Access( AccessTag { - span: Span { - lo: BytePos( - 140, - ), - hi: BytePos( - 146, - ), - ctxt: #0, - }, + span: 140..146#0, access: Text { - span: Span { - lo: BytePos( - 140, - ), - hi: BytePos( - 146, - ), - ctxt: #0, - }, + span: 140..146#0, value: "public", }, }, @@ -282,85 +98,29 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 186, - ), - hi: BytePos( - 186, - ), - ctxt: #0, - }, + span: 186..186#0, description: Text { - span: Span { - lo: BytePos( - 186, - ), - hi: BytePos( - 193, - ), - ctxt: #0, - }, + span: 186..193#0, value: "nothing", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 238, - ), - hi: BytePos( - 238, - ), - ctxt: #0, - }, + span: 238..238#0, description: Text { - span: Span { - lo: BytePos( - 238, - ), - hi: BytePos( - 238, - ), - ctxt: #0, - }, + span: 238..238#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 238, - ), - hi: BytePos( - 249, - ), - ctxt: #0, - }, + span: 238..249#0, tag_name: Text { - span: Span { - lo: BytePos( - 238, - ), - hi: BytePos( - 249, - ), - ctxt: #0, - }, + span: 238..249#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 238, - ), - hi: BytePos( - 249, - ), - ctxt: #0, - }, + span: 238..249#0, ty: None, name: None, }, @@ -369,61 +129,21 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 288, - ), - ctxt: #0, - }, + span: 0..288#0, description: Text { - span: Span { - lo: BytePos( - 288, - ), - hi: BytePos( - 288, - ), - ctxt: #0, - }, + span: 288..288#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 288, - ), - hi: BytePos( - 295, - ), - ctxt: #0, - }, + span: 288..295#0, tag_name: Text { - span: Span { - lo: BytePos( - 288, - ), - hi: BytePos( - 295, - ), - ctxt: #0, - }, + span: 288..295#0, value: "private", }, tag: Private( PrivateTag { - span: Span { - lo: BytePos( - 288, - ), - hi: BytePos( - 295, - ), - ctxt: #0, - }, + span: 288..295#0, ty: None, }, ), @@ -431,61 +151,21 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 326, - ), - ctxt: #0, - }, + span: 0..326#0, description: Text { - span: Span { - lo: BytePos( - 326, - ), - hi: BytePos( - 326, - ), - ctxt: #0, - }, + span: 326..326#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 326, - ), - hi: BytePos( - 335, - ), - ctxt: #0, - }, + span: 326..335#0, tag_name: Text { - span: Span { - lo: BytePos( - 326, - ), - hi: BytePos( - 335, - ), - ctxt: #0, - }, + span: 326..335#0, value: "protected", }, tag: Protected( ProtectedTag { - span: Span { - lo: BytePos( - 326, - ), - hi: BytePos( - 335, - ), - ctxt: #0, - }, + span: 326..335#0, ty: None, }, ), @@ -493,86 +173,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 368, - ), - hi: BytePos( - 368, - ), - ctxt: #0, - }, + span: 368..368#0, description: Text { - span: Span { - lo: BytePos( - 368, - ), - hi: BytePos( - 368, - ), - ctxt: #0, - }, + span: 368..368#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 368, - ), - hi: BytePos( - 374, - ), - ctxt: #0, - }, + span: 368..374#0, tag_name: Text { - span: Span { - lo: BytePos( - 368, - ), - hi: BytePos( - 374, - ), - ctxt: #0, - }, + span: 368..374#0, value: "public", }, tag: Public( PublicTag { - span: Span { - lo: BytePos( - 368, - ), - hi: BytePos( - 374, - ), - ctxt: #0, - }, + span: 368..374#0, }, ), }, ], }, JsDoc { - span: Span { - lo: BytePos( - 407, - ), - hi: BytePos( - 407, - ), - ctxt: #0, - }, + span: 407..407#0, description: Text { - span: Span { - lo: BytePos( - 407, - ), - hi: BytePos( - 414, - ), - ctxt: #0, - }, + span: 407..414#0, value: "nothing", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/alias.debug b/crates/jsdoc/tests/fixtures/alias.debug index 6c4170b49971..c9ff972edaa8 100644 --- a/crates/jsdoc/tests/fixtures/alias.debug +++ b/crates/jsdoc/tests/fixtures/alias.debug @@ -1,81 +1,25 @@ [ JsDoc { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 35, - ), - ctxt: #0, - }, + span: 0..35#0, description: Text { - span: Span { - lo: BytePos( - 35, - ), - hi: BytePos( - 55, - ), - ctxt: #0, - }, + span: 35..55#0, value: "Give x another name.", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 35, - ), - hi: BytePos( - 40, - ), - ctxt: #0, - }, + span: 35..40#0, tag_name: Text { - span: Span { - lo: BytePos( - 35, - ), - hi: BytePos( - 40, - ), - ctxt: #0, - }, + span: 35..40#0, value: "alias", }, tag: Alias( AliasTag { - span: Span { - lo: BytePos( - 35, - ), - hi: BytePos( - 40, - ), - ctxt: #0, - }, + span: 35..40#0, name_path: NamePath { - span: Span { - lo: BytePos( - 35, - ), - hi: BytePos( - 59, - ), - ctxt: #0, - }, + span: 35..59#0, components: [ Text { - span: Span { - lo: BytePos( - 35, - ), - hi: BytePos( - 43, - ), - ctxt: #0, - }, + span: 35..43#0, value: "myObject", }, ], @@ -84,38 +28,14 @@ ), }, TagItem { - span: Span { - lo: BytePos( - 35, - ), - hi: BytePos( - 44, - ), - ctxt: #0, - }, + span: 35..44#0, tag_name: Text { - span: Span { - lo: BytePos( - 35, - ), - hi: BytePos( - 44, - ), - ctxt: #0, - }, + span: 35..44#0, value: "namespace", }, tag: Namespace( NamespaceTag { - span: Span { - lo: BytePos( - 35, - ), - hi: BytePos( - 44, - ), - ctxt: #0, - }, + span: 35..44#0, ty: None, name: None, }, @@ -124,25 +44,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 133, - ), - hi: BytePos( - 133, - ), - ctxt: #0, - }, + span: 133..133#0, description: Text { - span: Span { - lo: BytePos( - 133, - ), - hi: BytePos( - 144, - ), - ctxt: #0, - }, + span: 133..144#0, value: "document me", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/alias2.debug b/crates/jsdoc/tests/fixtures/alias2.debug index fd6ec9eec0bb..aaf925c87b00 100644 --- a/crates/jsdoc/tests/fixtures/alias2.debug +++ b/crates/jsdoc/tests/fixtures/alias2.debug @@ -1,81 +1,25 @@ [ JsDoc { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 29, - ), - ctxt: #0, - }, + span: 20..29#0, description: Text { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 20, - ), - ctxt: #0, - }, + span: 20..20#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 25, - ), - ctxt: #0, - }, + span: 20..25#0, tag_name: Text { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 25, - ), - ctxt: #0, - }, + span: 20..25#0, value: "alias", }, tag: Alias( AliasTag { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 25, - ), - ctxt: #0, - }, + span: 20..25#0, name_path: NamePath { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 29, - ), - ctxt: #0, - }, + span: 20..29#0, components: [ Text { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 22, - ), - ctxt: #0, - }, + span: 20..22#0, value: "ns", }, ], @@ -86,25 +30,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 68, - ), - hi: BytePos( - 68, - ), - ctxt: #0, - }, + span: 68..68#0, description: Text { - span: Span { - lo: BytePos( - 68, - ), - hi: BytePos( - 79, - ), - ctxt: #0, - }, + span: 68..79#0, value: "document me", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/alias3.debug b/crates/jsdoc/tests/fixtures/alias3.debug index daa70744851b..1f9cdfc7ba65 100644 --- a/crates/jsdoc/tests/fixtures/alias3.debug +++ b/crates/jsdoc/tests/fixtures/alias3.debug @@ -1,85 +1,29 @@ [ JsDoc { - span: Span { - lo: BytePos( - 36, - ), - hi: BytePos( - 36, - ), - ctxt: #0, - }, + span: 36..36#0, description: Text { - span: Span { - lo: BytePos( - 36, - ), - hi: BytePos( - 36, - ), - ctxt: #0, - }, + span: 36..36#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 36, - ), - hi: BytePos( - 41, - ), - ctxt: #0, - }, + span: 36..41#0, tag_name: Text { - span: Span { - lo: BytePos( - 36, - ), - hi: BytePos( - 41, - ), - ctxt: #0, - }, + span: 36..41#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 36, - ), - hi: BytePos( - 41, - ), - ctxt: #0, - }, + span: 36..41#0, ty: Some( Text { - span: Span { - lo: BytePos( - 36, - ), - hi: BytePos( - 63, - ), - ctxt: #0, - }, + span: 36..63#0, value: "@alias trackr.CookieManager", }, ), name: Some( Text { - span: Span { - lo: BytePos( - 36, - ), - hi: BytePos( - 54, - ), - ctxt: #0, - }, + span: 36..54#0, value: "@param {object} kv", }, ), @@ -89,25 +33,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 144, - ), - hi: BytePos( - 144, - ), - ctxt: #0, - }, + span: 144..144#0, description: Text { - span: Span { - lo: BytePos( - 144, - ), - hi: BytePos( - 155, - ), - ctxt: #0, - }, + span: 144..155#0, value: "document me", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/alias4.debug b/crates/jsdoc/tests/fixtures/alias4.debug index fce93ce34b49..c81de358b8ab 100644 --- a/crates/jsdoc/tests/fixtures/alias4.debug +++ b/crates/jsdoc/tests/fixtures/alias4.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "jacket", }, }, @@ -85,72 +29,24 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 58, - ), - hi: BytePos( - 58, - ), - ctxt: #0, - }, + span: 58..58#0, description: Text { - span: Span { - lo: BytePos( - 58, - ), - hi: BytePos( - 91, - ), - ctxt: #0, - }, + span: 58..91#0, value: "Jacket constructor.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 58, - ), - hi: BytePos( - 69, - ), - ctxt: #0, - }, + span: 58..69#0, tag_name: Text { - span: Span { - lo: BytePos( - 58, - ), - hi: BytePos( - 69, - ), - ctxt: #0, - }, + span: 58..69#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 58, - ), - hi: BytePos( - 69, - ), - ctxt: #0, - }, + span: 58..69#0, ty: Some( Text { - span: Span { - lo: BytePos( - 58, - ), - hi: BytePos( - 80, - ), - ctxt: #0, - }, + span: 58..80#0, value: "* @alias module:jacket", }, ), diff --git a/crates/jsdoc/tests/fixtures/alias5.debug b/crates/jsdoc/tests/fixtures/alias5.debug index a8d09bdbf564..01fadfda3266 100644 --- a/crates/jsdoc/tests/fixtures/alias5.debug +++ b/crates/jsdoc/tests/fixtures/alias5.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 25, - ), - ctxt: #0, - }, + span: 1..25#0, value: "Toaster singleton.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, ty: None, name: None, }, @@ -63,82 +23,26 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 129, - ), - hi: BytePos( - 194, - ), - ctxt: #0, - }, + span: 129..194#0, description: Text { - span: Span { - lo: BytePos( - 129, - ), - hi: BytePos( - 157, - ), - ctxt: #0, - }, + span: 129..157#0, value: "Toast an item.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 129, - ), - hi: BytePos( - 134, - ), - ctxt: #0, - }, + span: 129..134#0, tag_name: Text { - span: Span { - lo: BytePos( - 129, - ), - hi: BytePos( - 134, - ), - ctxt: #0, - }, + span: 129..134#0, value: "alias", }, tag: Alias( AliasTag { - span: Span { - lo: BytePos( - 129, - ), - hi: BytePos( - 134, - ), - ctxt: #0, - }, + span: 129..134#0, name_path: NamePath { - span: Span { - lo: BytePos( - 129, - ), - hi: BytePos( - 194, - ), - ctxt: #0, - }, + span: 129..194#0, components: [ Text { - span: Span { - lo: BytePos( - 129, - ), - hi: BytePos( - 136, - ), - ctxt: #0, - }, + span: 129..136#0, value: "Toaster", }, ], @@ -149,82 +53,26 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 306, - ), - hi: BytePos( - 306, - ), - ctxt: #0, - }, + span: 306..306#0, description: Text { - span: Span { - lo: BytePos( - 306, - ), - hi: BytePos( - 338, - ), - ctxt: #0, - }, + span: 306..338#0, value: "Clean the toaster.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 306, - ), - hi: BytePos( - 311, - ), - ctxt: #0, - }, + span: 306..311#0, tag_name: Text { - span: Span { - lo: BytePos( - 306, - ), - hi: BytePos( - 311, - ), - ctxt: #0, - }, + span: 306..311#0, value: "alias", }, tag: Alias( AliasTag { - span: Span { - lo: BytePos( - 306, - ), - hi: BytePos( - 311, - ), - ctxt: #0, - }, + span: 306..311#0, name_path: NamePath { - span: Span { - lo: BytePos( - 306, - ), - hi: BytePos( - 353, - ), - ctxt: #0, - }, + span: 306..353#0, components: [ Text { - span: Span { - lo: BytePos( - 306, - ), - hi: BytePos( - 311, - ), - ctxt: #0, - }, + span: 306..311#0, value: "clean", }, ], @@ -233,59 +81,19 @@ ), }, TagItem { - span: Span { - lo: BytePos( - 306, - ), - hi: BytePos( - 314, - ), - ctxt: #0, - }, + span: 306..314#0, tag_name: Text { - span: Span { - lo: BytePos( - 306, - ), - hi: BytePos( - 314, - ), - ctxt: #0, - }, + span: 306..314#0, value: "memberof", }, tag: MemberOf( MemberOfTag { - span: Span { - lo: BytePos( - 306, - ), - hi: BytePos( - 314, - ), - ctxt: #0, - }, + span: 306..314#0, parent_name_path: NamePath { - span: Span { - lo: BytePos( - 306, - ), - hi: BytePos( - 328, - ), - ctxt: #0, - }, + span: 306..328#0, components: [ Text { - span: Span { - lo: BytePos( - 306, - ), - hi: BytePos( - 313, - ), - ctxt: #0, - }, + span: 306..313#0, value: "Toaster", }, ], @@ -294,120 +102,40 @@ ), }, TagItem { - span: Span { - lo: BytePos( - 306, - ), - hi: BytePos( - 314, - ), - ctxt: #0, - }, + span: 306..314#0, tag_name: Text { - span: Span { - lo: BytePos( - 306, - ), - hi: BytePos( - 314, - ), - ctxt: #0, - }, + span: 306..314#0, value: "instance", }, tag: Instance( InstanceTag { - span: Span { - lo: BytePos( - 306, - ), - hi: BytePos( - 314, - ), - ctxt: #0, - }, + span: 306..314#0, }, ), }, ], }, JsDoc { - span: Span { - lo: BytePos( - 480, - ), - hi: BytePos( - 553, - ), - ctxt: #0, - }, + span: 480..553#0, description: Text { - span: Span { - lo: BytePos( - 480, - ), - hi: BytePos( - 527, - ), - ctxt: #0, - }, + span: 480..527#0, value: "Get the Toaster instance.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 480, - ), - hi: BytePos( - 485, - ), - ctxt: #0, - }, + span: 480..485#0, tag_name: Text { - span: Span { - lo: BytePos( - 480, - ), - hi: BytePos( - 485, - ), - ctxt: #0, - }, + span: 480..485#0, value: "alias", }, tag: Alias( AliasTag { - span: Span { - lo: BytePos( - 480, - ), - hi: BytePos( - 485, - ), - ctxt: #0, - }, + span: 480..485#0, name_path: NamePath { - span: Span { - lo: BytePos( - 480, - ), - hi: BytePos( - 553, - ), - ctxt: #0, - }, + span: 480..553#0, components: [ Text { - span: Span { - lo: BytePos( - 480, - ), - hi: BytePos( - 487, - ), - ctxt: #0, - }, + span: 480..487#0, value: "Toaster", }, ], diff --git a/crates/jsdoc/tests/fixtures/alias6.debug b/crates/jsdoc/tests/fixtures/alias6.debug index 04b4362523ae..374455e3f9dd 100644 --- a/crates/jsdoc/tests/fixtures/alias6.debug +++ b/crates/jsdoc/tests/fixtures/alias6.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 16..16#0, description: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 16..16#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 22, - ), - ctxt: #0, - }, + span: 16..22#0, tag_name: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 22, - ), - ctxt: #0, - }, + span: 16..22#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 22, - ), - ctxt: #0, - }, + span: 16..22#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, ty: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 23, - ), - ctxt: #0, - }, + span: 16..23#0, value: "example", }, }, @@ -85,82 +29,26 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 40, - ), - hi: BytePos( - 48, - ), - ctxt: #0, - }, + span: 40..48#0, description: Text { - span: Span { - lo: BytePos( - 40, - ), - hi: BytePos( - 40, - ), - ctxt: #0, - }, + span: 40..40#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 40, - ), - hi: BytePos( - 45, - ), - ctxt: #0, - }, + span: 40..45#0, tag_name: Text { - span: Span { - lo: BytePos( - 40, - ), - hi: BytePos( - 45, - ), - ctxt: #0, - }, + span: 40..45#0, value: "alias", }, tag: Alias( AliasTag { - span: Span { - lo: BytePos( - 40, - ), - hi: BytePos( - 45, - ), - ctxt: #0, - }, + span: 40..45#0, name_path: NamePath { - span: Span { - lo: BytePos( - 40, - ), - hi: BytePos( - 48, - ), - ctxt: #0, - }, + span: 40..48#0, components: [ Text { - span: Span { - lo: BytePos( - 40, - ), - hi: BytePos( - 46, - ), - ctxt: #0, - }, + span: 40..46#0, value: "module", }, ], diff --git a/crates/jsdoc/tests/fixtures/aliasexports.debug b/crates/jsdoc/tests/fixtures/aliasexports.debug index 365be010ac24..03e3752d6fa5 100644 --- a/crates/jsdoc/tests/fixtures/aliasexports.debug +++ b/crates/jsdoc/tests/fixtures/aliasexports.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 4, - ), - ctxt: #0, - }, + span: 1..4#0, value: "foo", }, }, @@ -85,82 +29,26 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 21, - ), - hi: BytePos( - 30, - ), - ctxt: #0, - }, + span: 21..30#0, description: Text { - span: Span { - lo: BytePos( - 21, - ), - hi: BytePos( - 37, - ), - ctxt: #0, - }, + span: 21..37#0, value: "Bar class.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 21, - ), - hi: BytePos( - 26, - ), - ctxt: #0, - }, + span: 21..26#0, tag_name: Text { - span: Span { - lo: BytePos( - 21, - ), - hi: BytePos( - 26, - ), - ctxt: #0, - }, + span: 21..26#0, value: "alias", }, tag: Alias( AliasTag { - span: Span { - lo: BytePos( - 21, - ), - hi: BytePos( - 26, - ), - ctxt: #0, - }, + span: 21..26#0, name_path: NamePath { - span: Span { - lo: BytePos( - 21, - ), - hi: BytePos( - 30, - ), - ctxt: #0, - }, + span: 21..30#0, components: [ Text { - span: Span { - lo: BytePos( - 21, - ), - hi: BytePos( - 27, - ), - ctxt: #0, - }, + span: 21..27#0, value: "module", }, ], @@ -171,25 +59,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 87, - ), - hi: BytePos( - 87, - ), - ctxt: #0, - }, + span: 87..87#0, description: Text { - span: Span { - lo: BytePos( - 87, - ), - hi: BytePos( - 100, - ), - ctxt: #0, - }, + span: 87..100#0, value: "Create a Bar.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/aliasglobal.debug b/crates/jsdoc/tests/fixtures/aliasglobal.debug index bbe20b31f7bc..a1faf022db8f 100644 --- a/crates/jsdoc/tests/fixtures/aliasglobal.debug +++ b/crates/jsdoc/tests/fixtures/aliasglobal.debug @@ -1,81 +1,25 @@ [ JsDoc { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 24, - ), - ctxt: #0, - }, + span: 20..24#0, description: Text { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 20, - ), - ctxt: #0, - }, + span: 20..20#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 25, - ), - ctxt: #0, - }, + span: 20..25#0, tag_name: Text { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 25, - ), - ctxt: #0, - }, + span: 20..25#0, value: "alias", }, tag: Alias( AliasTag { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 25, - ), - ctxt: #0, - }, + span: 20..25#0, name_path: NamePath { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 24, - ), - ctxt: #0, - }, + span: 20..24#0, components: [ Text { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 28, - ), - ctxt: #0, - }, + span: 20..28#0, value: "", }, ], diff --git a/crates/jsdoc/tests/fixtures/aliasglobal2.debug b/crates/jsdoc/tests/fixtures/aliasglobal2.debug index 2742ca2a9b8d..aecbcd4968f8 100644 --- a/crates/jsdoc/tests/fixtures/aliasglobal2.debug +++ b/crates/jsdoc/tests/fixtures/aliasglobal2.debug @@ -1,81 +1,25 @@ [ JsDoc { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 20, - ), - ctxt: #0, - }, + span: 20..20#0, description: Text { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 53, - ), - ctxt: #0, - }, + span: 20..53#0, value: "Creates a new test object.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 25, - ), - ctxt: #0, - }, + span: 20..25#0, tag_name: Text { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 25, - ), - ctxt: #0, - }, + span: 20..25#0, value: "alias", }, tag: Alias( AliasTag { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 25, - ), - ctxt: #0, - }, + span: 20..25#0, name_path: NamePath { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 45, - ), - ctxt: #0, - }, + span: 20..45#0, components: [ Text { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 24, - ), - ctxt: #0, - }, + span: 20..24#0, value: "Test", }, ], @@ -84,38 +28,14 @@ ), }, TagItem { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 31, - ), - ctxt: #0, - }, + span: 20..31#0, tag_name: Text { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 31, - ), - ctxt: #0, - }, + span: 20..31#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 31, - ), - ctxt: #0, - }, + span: 20..31#0, ty: None, name: None, }, @@ -124,73 +44,25 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 149, - ), - hi: BytePos( - 149, - ), - ctxt: #0, - }, + span: 149..149#0, description: Text { - span: Span { - lo: BytePos( - 149, - ), - hi: BytePos( - 161, - ), - ctxt: #0, - }, + span: 149..161#0, value: "Document me.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 210, - ), - hi: BytePos( - 210, - ), - ctxt: #0, - }, + span: 210..210#0, description: Text { - span: Span { - lo: BytePos( - 210, - ), - hi: BytePos( - 222, - ), - ctxt: #0, - }, + span: 210..222#0, value: "Document me.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 287, - ), - hi: BytePos( - 287, - ), - ctxt: #0, - }, + span: 287..287#0, description: Text { - span: Span { - lo: BytePos( - 287, - ), - hi: BytePos( - 299, - ), - ctxt: #0, - }, + span: 287..299#0, value: "Document me.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/aliasresolve.debug b/crates/jsdoc/tests/fixtures/aliasresolve.debug index ac872fe637a1..af98d336ddea 100644 --- a/crates/jsdoc/tests/fixtures/aliasresolve.debug +++ b/crates/jsdoc/tests/fixtures/aliasresolve.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 0..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, value: "namespace", }, tag: Namespace( NamespaceTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, ty: None, name: None, }, @@ -63,73 +23,25 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 56, - ), - hi: BytePos( - 56, - ), - ctxt: #0, - }, + span: 56..56#0, description: Text { - span: Span { - lo: BytePos( - 56, - ), - hi: BytePos( - 56, - ), - ctxt: #0, - }, + span: 56..56#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 56, - ), - hi: BytePos( - 65, - ), - ctxt: #0, - }, + span: 56..65#0, tag_name: Text { - span: Span { - lo: BytePos( - 56, - ), - hi: BytePos( - 65, - ), - ctxt: #0, - }, + span: 56..65#0, value: "namespace", }, tag: Namespace( NamespaceTag { - span: Span { - lo: BytePos( - 56, - ), - hi: BytePos( - 65, - ), - ctxt: #0, - }, + span: 56..65#0, ty: None, name: Some( Text { - span: Span { - lo: BytePos( - 56, - ), - hi: BytePos( - 66, - ), - ctxt: #0, - }, + span: 56..66#0, value: "@alias A.F", }, ), @@ -139,85 +51,29 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 125, - ), - hi: BytePos( - 125, - ), - ctxt: #0, - }, + span: 125..125#0, description: Text { - span: Span { - lo: BytePos( - 125, - ), - hi: BytePos( - 125, - ), - ctxt: #0, - }, + span: 125..125#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 125, - ), - hi: BytePos( - 131, - ), - ctxt: #0, - }, + span: 125..131#0, tag_name: Text { - span: Span { - lo: BytePos( - 125, - ), - hi: BytePos( - 131, - ), - ctxt: #0, - }, + span: 125..131#0, value: "return", }, tag: Return( ReturnTag { - span: Span { - lo: BytePos( - 125, - ), - hi: BytePos( - 131, - ), - ctxt: #0, - }, + span: 125..131#0, ty: Some( Text { - span: Span { - lo: BytePos( - 125, - ), - hi: BytePos( - 133, - ), - ctxt: #0, - }, + span: 125..133#0, value: "{String}", }, ), description: Text { - span: Span { - lo: BytePos( - 125, - ), - hi: BytePos( - 125, - ), - ctxt: #0, - }, + span: 125..125#0, value: "", }, }, diff --git a/crates/jsdoc/tests/fixtures/aliasresolve2.debug b/crates/jsdoc/tests/fixtures/aliasresolve2.debug index d11c029b9160..55312a5a6b7b 100644 --- a/crates/jsdoc/tests/fixtures/aliasresolve2.debug +++ b/crates/jsdoc/tests/fixtures/aliasresolve2.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 0..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, value: "namespace", }, tag: Namespace( NamespaceTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, ty: None, name: None, }, @@ -63,73 +23,25 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 36, - ), - hi: BytePos( - 36, - ), - ctxt: #0, - }, + span: 36..36#0, description: Text { - span: Span { - lo: BytePos( - 36, - ), - hi: BytePos( - 36, - ), - ctxt: #0, - }, + span: 36..36#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 36, - ), - hi: BytePos( - 45, - ), - ctxt: #0, - }, + span: 36..45#0, tag_name: Text { - span: Span { - lo: BytePos( - 36, - ), - hi: BytePos( - 45, - ), - ctxt: #0, - }, + span: 36..45#0, value: "namespace", }, tag: Namespace( NamespaceTag { - span: Span { - lo: BytePos( - 36, - ), - hi: BytePos( - 45, - ), - ctxt: #0, - }, + span: 36..45#0, ty: None, name: Some( Text { - span: Span { - lo: BytePos( - 36, - ), - hi: BytePos( - 46, - ), - ctxt: #0, - }, + span: 36..46#0, value: "@alias A.F", }, ), @@ -139,85 +51,29 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 105, - ), - hi: BytePos( - 105, - ), - ctxt: #0, - }, + span: 105..105#0, description: Text { - span: Span { - lo: BytePos( - 105, - ), - hi: BytePos( - 105, - ), - ctxt: #0, - }, + span: 105..105#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 105, - ), - hi: BytePos( - 111, - ), - ctxt: #0, - }, + span: 105..111#0, tag_name: Text { - span: Span { - lo: BytePos( - 105, - ), - hi: BytePos( - 111, - ), - ctxt: #0, - }, + span: 105..111#0, value: "return", }, tag: Return( ReturnTag { - span: Span { - lo: BytePos( - 105, - ), - hi: BytePos( - 111, - ), - ctxt: #0, - }, + span: 105..111#0, ty: Some( Text { - span: Span { - lo: BytePos( - 105, - ), - hi: BytePos( - 113, - ), - ctxt: #0, - }, + span: 105..113#0, value: "{String}", }, ), description: Text { - span: Span { - lo: BytePos( - 105, - ), - hi: BytePos( - 105, - ), - ctxt: #0, - }, + span: 105..105#0, value: "", }, }, diff --git a/crates/jsdoc/tests/fixtures/also.debug b/crates/jsdoc/tests/fixtures/also.debug index 75e673f161ea..42879ebff758 100644 --- a/crates/jsdoc/tests/fixtures/also.debug +++ b/crates/jsdoc/tests/fixtures/also.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, ty: None, name: None, }, @@ -63,86 +23,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 116, - ), - hi: BytePos( - 116, - ), - ctxt: #0, - }, + span: 116..116#0, description: Text { - span: Span { - lo: BytePos( - 116, - ), - hi: BytePos( - 154, - ), - ctxt: #0, - }, + span: 116..154#0, value: "Set the value of the name property.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 116, - ), - hi: BytePos( - 121, - ), - ctxt: #0, - }, + span: 116..121#0, tag_name: Text { - span: Span { - lo: BytePos( - 116, - ), - hi: BytePos( - 121, - ), - ctxt: #0, - }, + span: 116..121#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 116, - ), - hi: BytePos( - 121, - ), - ctxt: #0, - }, + span: 116..121#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 116, - ), - hi: BytePos( - 124, - ), - ctxt: #0, - }, + span: 116..124#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 116, - ), - hi: BytePos( - 123, - ), - ctxt: #0, - }, + span: 116..123#0, value: "newName", }, }, @@ -151,85 +55,29 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 195, - ), - hi: BytePos( - 195, - ), - ctxt: #0, - }, + span: 195..195#0, description: Text { - span: Span { - lo: BytePos( - 195, - ), - hi: BytePos( - 233, - ), - ctxt: #0, - }, + span: 195..233#0, value: "Get the value of the name property.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 195, - ), - hi: BytePos( - 202, - ), - ctxt: #0, - }, + span: 195..202#0, tag_name: Text { - span: Span { - lo: BytePos( - 195, - ), - hi: BytePos( - 202, - ), - ctxt: #0, - }, + span: 195..202#0, value: "returns", }, tag: Return( ReturnTag { - span: Span { - lo: BytePos( - 195, - ), - hi: BytePos( - 202, - ), - ctxt: #0, - }, + span: 195..202#0, ty: Some( Text { - span: Span { - lo: BytePos( - 195, - ), - hi: BytePos( - 203, - ), - ctxt: #0, - }, + span: 195..203#0, value: "{string}", }, ), description: Text { - span: Span { - lo: BytePos( - 195, - ), - hi: BytePos( - 195, - ), - ctxt: #0, - }, + span: 195..195#0, value: "", }, }, @@ -238,86 +86,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 391, - ), - hi: BytePos( - 391, - ), - ctxt: #0, - }, + span: 391..391#0, description: Text { - span: Span { - lo: BytePos( - 391, - ), - hi: BytePos( - 430, - ), - ctxt: #0, - }, + span: 391..430#0, value: "Set the value of the shape property.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 391, - ), - hi: BytePos( - 396, - ), - ctxt: #0, - }, + span: 391..396#0, tag_name: Text { - span: Span { - lo: BytePos( - 391, - ), - hi: BytePos( - 396, - ), - ctxt: #0, - }, + span: 391..396#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 391, - ), - hi: BytePos( - 396, - ), - ctxt: #0, - }, + span: 391..396#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 391, - ), - hi: BytePos( - 399, - ), - ctxt: #0, - }, + span: 391..399#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 391, - ), - hi: BytePos( - 399, - ), - ctxt: #0, - }, + span: 391..399#0, value: "newShape", }, }, @@ -326,149 +118,53 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 466, - ), - hi: BytePos( - 466, - ), - ctxt: #0, - }, + span: 466..466#0, description: Text { - span: Span { - lo: BytePos( - 466, - ), - hi: BytePos( - 531, - ), - ctxt: #0, - }, + span: 466..531#0, value: "Set the value of the shape property, plus some other property.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 466, - ), - hi: BytePos( - 471, - ), - ctxt: #0, - }, + span: 466..471#0, tag_name: Text { - span: Span { - lo: BytePos( - 466, - ), - hi: BytePos( - 471, - ), - ctxt: #0, - }, + span: 466..471#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 466, - ), - hi: BytePos( - 471, - ), - ctxt: #0, - }, + span: 466..471#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 466, - ), - hi: BytePos( - 474, - ), - ctxt: #0, - }, + span: 466..474#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 466, - ), - hi: BytePos( - 474, - ), - ctxt: #0, - }, + span: 466..474#0, value: "newShape", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 466, - ), - hi: BytePos( - 471, - ), - ctxt: #0, - }, + span: 466..471#0, tag_name: Text { - span: Span { - lo: BytePos( - 466, - ), - hi: BytePos( - 471, - ), - ctxt: #0, - }, + span: 466..471#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 466, - ), - hi: BytePos( - 471, - ), - ctxt: #0, - }, + span: 466..471#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 466, - ), - hi: BytePos( - 474, - ), - ctxt: #0, - }, + span: 466..474#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 466, - ), - hi: BytePos( - 481, - ), - ctxt: #0, - }, + span: 466..481#0, value: "mysteryProperty", }, }, @@ -477,85 +173,29 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 602, - ), - hi: BytePos( - 602, - ), - ctxt: #0, - }, + span: 602..602#0, description: Text { - span: Span { - lo: BytePos( - 602, - ), - hi: BytePos( - 641, - ), - ctxt: #0, - }, + span: 602..641#0, value: "Get the value of the shape property.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 602, - ), - hi: BytePos( - 609, - ), - ctxt: #0, - }, + span: 602..609#0, tag_name: Text { - span: Span { - lo: BytePos( - 602, - ), - hi: BytePos( - 609, - ), - ctxt: #0, - }, + span: 602..609#0, value: "returns", }, tag: Return( ReturnTag { - span: Span { - lo: BytePos( - 602, - ), - hi: BytePos( - 609, - ), - ctxt: #0, - }, + span: 602..609#0, ty: Some( Text { - span: Span { - lo: BytePos( - 602, - ), - hi: BytePos( - 610, - ), - ctxt: #0, - }, + span: 602..610#0, value: "{string}", }, ), description: Text { - span: Span { - lo: BytePos( - 602, - ), - hi: BytePos( - 602, - ), - ctxt: #0, - }, + span: 602..602#0, value: "", }, }, diff --git a/crates/jsdoc/tests/fixtures/also2.debug b/crates/jsdoc/tests/fixtures/also2.debug index 123702ba2863..05fc9836c0b0 100644 --- a/crates/jsdoc/tests/fixtures/also2.debug +++ b/crates/jsdoc/tests/fixtures/also2.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, ty: None, name: None, }, @@ -63,134 +23,46 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 65, - ), - hi: BytePos( - 65, - ), - ctxt: #0, - }, + span: 65..65#0, description: Text { - span: Span { - lo: BytePos( - 65, - ), - hi: BytePos( - 100, - ), - ctxt: #0, - }, + span: 65..100#0, value: "Add a lane to the bowling alley.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 65, - ), - hi: BytePos( - 69, - ), - ctxt: #0, - }, + span: 65..69#0, tag_name: Text { - span: Span { - lo: BytePos( - 65, - ), - hi: BytePos( - 69, - ), - ctxt: #0, - }, + span: 65..69#0, value: "also", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 65, - ), - hi: BytePos( - 69, - ), - ctxt: #0, - }, + span: 65..69#0, extras: Text { - span: Span { - lo: BytePos( - 65, - ), - hi: BytePos( - 122, - ), - ctxt: #0, - }, + span: 65..122#0, value: "* Add the specified number of lanes to the bowling alley.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 65, - ), - hi: BytePos( - 70, - ), - ctxt: #0, - }, + span: 65..70#0, tag_name: Text { - span: Span { - lo: BytePos( - 65, - ), - hi: BytePos( - 70, - ), - ctxt: #0, - }, + span: 65..70#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 65, - ), - hi: BytePos( - 70, - ), - ctxt: #0, - }, + span: 65..70#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 65, - ), - hi: BytePos( - 73, - ), - ctxt: #0, - }, + span: 65..73#0, value: "{number}", }, ), desc: Text { - span: Span { - lo: BytePos( - 65, - ), - hi: BytePos( - 104, - ), - ctxt: #0, - }, + span: 65..104#0, value: "[lanes=1] - The number of lanes to add.", }, }, diff --git a/crates/jsdoc/tests/fixtures/anonymousclass.debug b/crates/jsdoc/tests/fixtures/anonymousclass.debug index 1c00008cff99..085a1816ed38 100644 --- a/crates/jsdoc/tests/fixtures/anonymousclass.debug +++ b/crates/jsdoc/tests/fixtures/anonymousclass.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, value: "test", }, }, @@ -85,110 +29,38 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 22, - ), - hi: BytePos( - 22, - ), - ctxt: #0, - }, + span: 22..22#0, description: Text { - span: Span { - lo: BytePos( - 22, - ), - hi: BytePos( - 32, - ), - ctxt: #0, - }, + span: 22..32#0, value: "Test class", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 67, - ), - hi: BytePos( - 67, - ), - ctxt: #0, - }, + span: 67..67#0, description: Text { - span: Span { - lo: BytePos( - 67, - ), - hi: BytePos( - 90, - ), - ctxt: #0, - }, + span: 67..90#0, value: "Test constructor\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 67, - ), - hi: BytePos( - 72, - ), - ctxt: #0, - }, + span: 67..72#0, tag_name: Text { - span: Span { - lo: BytePos( - 67, - ), - hi: BytePos( - 72, - ), - ctxt: #0, - }, + span: 67..72#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 67, - ), - hi: BytePos( - 72, - ), - ctxt: #0, - }, + span: 67..72#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 67, - ), - hi: BytePos( - 75, - ), - ctxt: #0, - }, + span: 67..75#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 67, - ), - hi: BytePos( - 90, - ), - ctxt: #0, - }, + span: 67..90#0, value: "foo - The foo parameter", }, }, @@ -197,73 +69,25 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 181, - ), - hi: BytePos( - 181, - ), - ctxt: #0, - }, + span: 181..181#0, description: Text { - span: Span { - lo: BytePos( - 181, - ), - hi: BytePos( - 192, - ), - ctxt: #0, - }, + span: 181..192#0, value: "Test member", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 235, - ), - hi: BytePos( - 235, - ), - ctxt: #0, - }, + span: 235..235#0, description: Text { - span: Span { - lo: BytePos( - 235, - ), - hi: BytePos( - 246, - ), - ctxt: #0, - }, + span: 235..246#0, value: "Test method", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 273, - ), - hi: BytePos( - 273, - ), - ctxt: #0, - }, + span: 273..273#0, description: Text { - span: Span { - lo: BytePos( - 273, - ), - hi: BytePos( - 291, - ), - ctxt: #0, - }, + span: 273..291#0, value: "Test static method", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/anonymousclassparam.debug b/crates/jsdoc/tests/fixtures/anonymousclassparam.debug index 7cfc22576594..b9707b113046 100644 --- a/crates/jsdoc/tests/fixtures/anonymousclassparam.debug +++ b/crates/jsdoc/tests/fixtures/anonymousclassparam.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 4, - ), - ctxt: #0, - }, + span: 1..4#0, value: "foo", }, }, diff --git a/crates/jsdoc/tests/fixtures/arrowfunction.debug b/crates/jsdoc/tests/fixtures/arrowfunction.debug index 64019a7d821e..99f1647a0b18 100644 --- a/crates/jsdoc/tests/fixtures/arrowfunction.debug +++ b/crates/jsdoc/tests/fixtures/arrowfunction.debug @@ -1,85 +1,29 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 31, - ), - ctxt: #0, - }, + span: 1..31#0, value: "Increment a number by 1.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "{number}", }, ), desc: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 29, - ), - ctxt: #0, - }, + span: 1..29#0, value: "n - The number to increment.", }, }, @@ -88,95 +32,31 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 117, - ), - hi: BytePos( - 117, - ), - ctxt: #0, - }, + span: 117..117#0, description: Text { - span: Span { - lo: BytePos( - 117, - ), - hi: BytePos( - 146, - ), - ctxt: #0, - }, + span: 117..146#0, value: "Print a value to the console.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 171, - ), - hi: BytePos( - 175, - ), - ctxt: #0, - }, + span: 171..175#0, description: Text { - span: Span { - lo: BytePos( - 171, - ), - hi: BytePos( - 171, - ), - ctxt: #0, - }, + span: 171..171#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 171, - ), - hi: BytePos( - 175, - ), - ctxt: #0, - }, + span: 171..175#0, tag_name: Text { - span: Span { - lo: BytePos( - 171, - ), - hi: BytePos( - 175, - ), - ctxt: #0, - }, + span: 171..175#0, value: "type", }, tag: Type( TypeTag { - span: Span { - lo: BytePos( - 171, - ), - hi: BytePos( - 175, - ), - ctxt: #0, - }, + span: 171..175#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -185,25 +65,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 215, - ), - hi: BytePos( - 215, - ), - ctxt: #0, - }, + span: 215..215#0, description: Text { - span: Span { - lo: BytePos( - 215, - ), - hi: BytePos( - 253, - ), - ctxt: #0, - }, + span: 215..253#0, value: "Create a class with a `name` property.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/asyncfunction.debug b/crates/jsdoc/tests/fixtures/asyncfunction.debug index a332ad0fee8e..187dd4420a20 100644 --- a/crates/jsdoc/tests/fixtures/asyncfunction.debug +++ b/crates/jsdoc/tests/fixtures/asyncfunction.debug @@ -1,85 +1,29 @@ [ JsDoc { - span: Span { - lo: BytePos( - 152, - ), - hi: BytePos( - 152, - ), - ctxt: #0, - }, + span: 152..152#0, description: Text { - span: Span { - lo: BytePos( - 152, - ), - hi: BytePos( - 168, - ), - ctxt: #0, - }, + span: 152..168#0, value: "Add a number.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 152, - ), - hi: BytePos( - 157, - ), - ctxt: #0, - }, + span: 152..157#0, tag_name: Text { - span: Span { - lo: BytePos( - 152, - ), - hi: BytePos( - 157, - ), - ctxt: #0, - }, + span: 152..157#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 152, - ), - hi: BytePos( - 157, - ), - ctxt: #0, - }, + span: 152..157#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 152, - ), - hi: BytePos( - 160, - ), - ctxt: #0, - }, + span: 152..160#0, value: "{number}", }, ), desc: Text { - span: Span { - lo: BytePos( - 152, - ), - hi: BytePos( - 174, - ), - ctxt: #0, - }, + span: 152..174#0, value: "x - The number to add.", }, }, @@ -88,86 +32,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 356, - ), - hi: BytePos( - 356, - ), - ctxt: #0, - }, + span: 356..356#0, description: Text { - span: Span { - lo: BytePos( - 356, - ), - hi: BytePos( - 377, - ), - ctxt: #0, - }, + span: 356..377#0, value: "Subtract a number.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 356, - ), - hi: BytePos( - 361, - ), - ctxt: #0, - }, + span: 356..361#0, tag_name: Text { - span: Span { - lo: BytePos( - 356, - ), - hi: BytePos( - 361, - ), - ctxt: #0, - }, + span: 356..361#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 356, - ), - hi: BytePos( - 361, - ), - ctxt: #0, - }, + span: 356..361#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 356, - ), - hi: BytePos( - 364, - ), - ctxt: #0, - }, + span: 356..364#0, value: "{number}", }, ), desc: Text { - span: Span { - lo: BytePos( - 356, - ), - hi: BytePos( - 383, - ), - ctxt: #0, - }, + span: 356..383#0, value: "x - The number to subtract.", }, }, @@ -176,134 +64,46 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 590, - ), - hi: BytePos( - 590, - ), - ctxt: #0, - }, + span: 590..590#0, description: Text { - span: Span { - lo: BytePos( - 590, - ), - hi: BytePos( - 602, - ), - ctxt: #0, - }, + span: 590..602#0, value: "Adder class.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 632, - ), - hi: BytePos( - 632, - ), - ctxt: #0, - }, + span: 632..632#0, description: Text { - span: Span { - lo: BytePos( - 632, - ), - hi: BytePos( - 660, - ), - ctxt: #0, - }, + span: 632..660#0, value: "Construct an Adder instance.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 706, - ), - hi: BytePos( - 706, - ), - ctxt: #0, - }, + span: 706..706#0, description: Text { - span: Span { - lo: BytePos( - 706, - ), - hi: BytePos( - 726, - ), - ctxt: #0, - }, + span: 706..726#0, value: "Add a number.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 706, - ), - hi: BytePos( - 711, - ), - ctxt: #0, - }, + span: 706..711#0, tag_name: Text { - span: Span { - lo: BytePos( - 706, - ), - hi: BytePos( - 711, - ), - ctxt: #0, - }, + span: 706..711#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 706, - ), - hi: BytePos( - 711, - ), - ctxt: #0, - }, + span: 706..711#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 706, - ), - hi: BytePos( - 714, - ), - ctxt: #0, - }, + span: 706..714#0, value: "{number}", }, ), desc: Text { - span: Span { - lo: BytePos( - 706, - ), - hi: BytePos( - 728, - ), - ctxt: #0, - }, + span: 706..728#0, value: "x - The number to add.", }, }, diff --git a/crates/jsdoc/tests/fixtures/asynctag.debug b/crates/jsdoc/tests/fixtures/asynctag.debug index 894a13a750bb..fcdf8309adfe 100644 --- a/crates/jsdoc/tests/fixtures/asynctag.debug +++ b/crates/jsdoc/tests/fixtures/asynctag.debug @@ -1,71 +1,23 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 29, - ), - ctxt: #0, - }, + span: 1..29#0, value: "Asynchronous function.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "function", }, tag: Function( FunctionTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, name: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 4, - ), - ctxt: #0, - }, + span: 1..4#0, value: "foo", }, ), @@ -73,38 +25,14 @@ ), }, TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "async", }, tag: Async( AsyncTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, }, ), }, diff --git a/crates/jsdoc/tests/fixtures/augmentall.debug b/crates/jsdoc/tests/fixtures/augmentall.debug index 603504b13d31..b6b4c8b4a9c9 100644 --- a/crates/jsdoc/tests/fixtures/augmentall.debug +++ b/crates/jsdoc/tests/fixtures/augmentall.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 21, - ), - ctxt: #0, - }, + span: 1..21#0, value: "Parent interface.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, value: "interface", }, tag: Interface( InterfaceTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, name: None, }, ), @@ -62,96 +22,32 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 70, - ), - hi: BytePos( - 70, - ), - ctxt: #0, - }, + span: 70..70#0, description: Text { - span: Span { - lo: BytePos( - 70, - ), - hi: BytePos( - 90, - ), - ctxt: #0, - }, + span: 70..90#0, value: "Open the connection.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 146, - ), - hi: BytePos( - 146, - ), - ctxt: #0, - }, + span: 146..146#0, description: Text { - span: Span { - lo: BytePos( - 146, - ), - hi: BytePos( - 161, - ), - ctxt: #0, - }, + span: 146..161#0, value: "Child class.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 146, - ), - hi: BytePos( - 151, - ), - ctxt: #0, - }, + span: 146..151#0, tag_name: Text { - span: Span { - lo: BytePos( - 146, - ), - hi: BytePos( - 151, - ), - ctxt: #0, - }, + span: 146..151#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 146, - ), - hi: BytePos( - 151, - ), - ctxt: #0, - }, + span: 146..151#0, ty: Some( Text { - span: Span { - lo: BytePos( - 146, - ), - hi: BytePos( - 172, - ), - ctxt: #0, - }, + span: 146..172#0, value: "* @implements {Connection}", }, ), @@ -162,133 +58,45 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 230, - ), - hi: BytePos( - 230, - ), - ctxt: #0, - }, + span: 230..230#0, description: Text { - span: Span { - lo: BytePos( - 230, - ), - hi: BytePos( - 230, - ), - ctxt: #0, - }, + span: 230..230#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 230, - ), - hi: BytePos( - 240, - ), - ctxt: #0, - }, + span: 230..240#0, tag_name: Text { - span: Span { - lo: BytePos( - 230, - ), - hi: BytePos( - 240, - ), - ctxt: #0, - }, + span: 230..240#0, value: "inheritdoc", }, tag: InheritDoc( InheritDocTag { - span: Span { - lo: BytePos( - 230, - ), - hi: BytePos( - 240, - ), - ctxt: #0, - }, + span: 230..240#0, }, ), }, ], }, JsDoc { - span: Span { - lo: BytePos( - 289, - ), - hi: BytePos( - 289, - ), - ctxt: #0, - }, + span: 289..289#0, description: Text { - span: Span { - lo: BytePos( - 289, - ), - hi: BytePos( - 317, - ), - ctxt: #0, - }, + span: 289..317#0, value: "Extension of child class.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 289, - ), - hi: BytePos( - 294, - ), - ctxt: #0, - }, + span: 289..294#0, tag_name: Text { - span: Span { - lo: BytePos( - 289, - ), - hi: BytePos( - 294, - ), - ctxt: #0, - }, + span: 289..294#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 289, - ), - hi: BytePos( - 294, - ), - ctxt: #0, - }, + span: 289..294#0, ty: Some( Text { - span: Span { - lo: BytePos( - 289, - ), - hi: BytePos( - 308, - ), - ctxt: #0, - }, + span: 289..308#0, value: "* @extends {Socket}", }, ), diff --git a/crates/jsdoc/tests/fixtures/augmentall2.debug b/crates/jsdoc/tests/fixtures/augmentall2.debug index 67c355f34c48..734fe2a0d147 100644 --- a/crates/jsdoc/tests/fixtures/augmentall2.debug +++ b/crates/jsdoc/tests/fixtures/augmentall2.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 21, - ), - ctxt: #0, - }, + span: 1..21#0, value: "Parent interface.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, value: "interface", }, tag: Interface( InterfaceTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, name: None, }, ), @@ -62,96 +22,32 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 70, - ), - hi: BytePos( - 70, - ), - ctxt: #0, - }, + span: 70..70#0, description: Text { - span: Span { - lo: BytePos( - 70, - ), - hi: BytePos( - 90, - ), - ctxt: #0, - }, + span: 70..90#0, value: "Open the connection.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 146, - ), - hi: BytePos( - 146, - ), - ctxt: #0, - }, + span: 146..146#0, description: Text { - span: Span { - lo: BytePos( - 146, - ), - hi: BytePos( - 165, - ), - ctxt: #0, - }, + span: 146..165#0, value: "Child interface.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 146, - ), - hi: BytePos( - 155, - ), - ctxt: #0, - }, + span: 146..155#0, tag_name: Text { - span: Span { - lo: BytePos( - 146, - ), - hi: BytePos( - 155, - ), - ctxt: #0, - }, + span: 146..155#0, value: "interface", }, tag: Interface( InterfaceTag { - span: Span { - lo: BytePos( - 146, - ), - hi: BytePos( - 155, - ), - ctxt: #0, - }, + span: 146..155#0, name: Some( Text { - span: Span { - lo: BytePos( - 146, - ), - hi: BytePos( - 169, - ), - ctxt: #0, - }, + span: 146..169#0, value: "* @extends {Connection}", }, ), @@ -161,72 +57,24 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 235, - ), - hi: BytePos( - 235, - ), - ctxt: #0, - }, + span: 235..235#0, description: Text { - span: Span { - lo: BytePos( - 235, - ), - hi: BytePos( - 272, - ), - ctxt: #0, - }, + span: 235..272#0, value: "Implementation of child interface.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 235, - ), - hi: BytePos( - 240, - ), - ctxt: #0, - }, + span: 235..240#0, tag_name: Text { - span: Span { - lo: BytePos( - 235, - ), - hi: BytePos( - 240, - ), - ctxt: #0, - }, + span: 235..240#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 235, - ), - hi: BytePos( - 240, - ), - ctxt: #0, - }, + span: 235..240#0, ty: Some( Text { - span: Span { - lo: BytePos( - 235, - ), - hi: BytePos( - 257, - ), - ctxt: #0, - }, + span: 235..257#0, value: "* @implements {Socket}", }, ), @@ -237,61 +85,21 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 346, - ), - hi: BytePos( - 346, - ), - ctxt: #0, - }, + span: 346..346#0, description: Text { - span: Span { - lo: BytePos( - 346, - ), - hi: BytePos( - 346, - ), - ctxt: #0, - }, + span: 346..346#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 346, - ), - hi: BytePos( - 356, - ), - ctxt: #0, - }, + span: 346..356#0, tag_name: Text { - span: Span { - lo: BytePos( - 346, - ), - hi: BytePos( - 356, - ), - ctxt: #0, - }, + span: 346..356#0, value: "inheritdoc", }, tag: InheritDoc( InheritDocTag { - span: Span { - lo: BytePos( - 346, - ), - hi: BytePos( - 356, - ), - ctxt: #0, - }, + span: 346..356#0, }, ), }, diff --git a/crates/jsdoc/tests/fixtures/augmentstag.debug b/crates/jsdoc/tests/fixtures/augmentstag.debug index 701f1ce516fe..283b428c3b80 100644 --- a/crates/jsdoc/tests/fixtures/augmentstag.debug +++ b/crates/jsdoc/tests/fixtures/augmentstag.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, ty: None, name: None, }, @@ -63,95 +23,31 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 46, - ), - hi: BytePos( - 46, - ), - ctxt: #0, - }, + span: 46..46#0, description: Text { - span: Span { - lo: BytePos( - 46, - ), - hi: BytePos( - 60, - ), - ctxt: #0, - }, + span: 46..60#0, value: "First property", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 94, - ), - hi: BytePos( - 94, - ), - ctxt: #0, - }, + span: 94..94#0, description: Text { - span: Span { - lo: BytePos( - 94, - ), - hi: BytePos( - 112, - ), - ctxt: #0, - }, + span: 94..112#0, value: "Second property\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 94, - ), - hi: BytePos( - 98, - ), - ctxt: #0, - }, + span: 94..98#0, tag_name: Text { - span: Span { - lo: BytePos( - 94, - ), - hi: BytePos( - 98, - ), - ctxt: #0, - }, + span: 94..98#0, value: "type", }, tag: Type( TypeTag { - span: Span { - lo: BytePos( - 94, - ), - hi: BytePos( - 98, - ), - ctxt: #0, - }, + span: 94..98#0, name: Text { - span: Span { - lo: BytePos( - 94, - ), - hi: BytePos( - 102, - ), - ctxt: #0, - }, + span: 94..102#0, value: "{String}", }, }, @@ -160,144 +56,48 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 178, - ), - hi: BytePos( - 178, - ), - ctxt: #0, - }, + span: 178..178#0, description: Text { - span: Span { - lo: BytePos( - 178, - ), - hi: BytePos( - 198, - ), - ctxt: #0, - }, + span: 178..198#0, value: "First parent method.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 250, - ), - hi: BytePos( - 250, - ), - ctxt: #0, - }, + span: 250..250#0, description: Text { - span: Span { - lo: BytePos( - 250, - ), - hi: BytePos( - 271, - ), - ctxt: #0, - }, + span: 250..271#0, value: "Second parent method.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 323, - ), - hi: BytePos( - 323, - ), - ctxt: #0, - }, + span: 323..323#0, description: Text { - span: Span { - lo: BytePos( - 323, - ), - hi: BytePos( - 343, - ), - ctxt: #0, - }, + span: 323..343#0, value: "Third parent method.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 395, - ), - hi: BytePos( - 395, - ), - ctxt: #0, - }, + span: 395..395#0, description: Text { - span: Span { - lo: BytePos( - 395, - ), - hi: BytePos( - 395, - ), - ctxt: #0, - }, + span: 395..395#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 395, - ), - hi: BytePos( - 406, - ), - ctxt: #0, - }, + span: 395..406#0, tag_name: Text { - span: Span { - lo: BytePos( - 395, - ), - hi: BytePos( - 406, - ), - ctxt: #0, - }, + span: 395..406#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 395, - ), - hi: BytePos( - 406, - ), - ctxt: #0, - }, + span: 395..406#0, ty: Some( Text { - span: Span { - lo: BytePos( - 395, - ), - hi: BytePos( - 409, - ), - ctxt: #0, - }, + span: 395..409#0, value: "* @extends Foo", }, ), @@ -308,120 +108,40 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 456, - ), - hi: BytePos( - 456, - ), - ctxt: #0, - }, + span: 456..456#0, description: Text { - span: Span { - lo: BytePos( - 456, - ), - hi: BytePos( - 468, - ), - ctxt: #0, - }, + span: 456..468#0, value: "Third prop *", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 501, - ), - hi: BytePos( - 501, - ), - ctxt: #0, - }, + span: 501..501#0, description: Text { - span: Span { - lo: BytePos( - 501, - ), - hi: BytePos( - 521, - ), - ctxt: #0, - }, + span: 501..521#0, value: "Second child method.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 573, - ), - hi: BytePos( - 573, - ), - ctxt: #0, - }, + span: 573..573#0, description: Text { - span: Span { - lo: BytePos( - 573, - ), - hi: BytePos( - 573, - ), - ctxt: #0, - }, + span: 573..573#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 573, - ), - hi: BytePos( - 584, - ), - ctxt: #0, - }, + span: 573..584#0, tag_name: Text { - span: Span { - lo: BytePos( - 573, - ), - hi: BytePos( - 584, - ), - ctxt: #0, - }, + span: 573..584#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 573, - ), - hi: BytePos( - 584, - ), - ctxt: #0, - }, + span: 573..584#0, ty: Some( Text { - span: Span { - lo: BytePos( - 573, - ), - hi: BytePos( - 589, - ), - ctxt: #0, - }, + span: 573..589#0, value: "* @extends {Bar}", }, ), @@ -432,49 +152,17 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 636, - ), - hi: BytePos( - 636, - ), - ctxt: #0, - }, + span: 636..636#0, description: Text { - span: Span { - lo: BytePos( - 636, - ), - hi: BytePos( - 650, - ), - ctxt: #0, - }, + span: 636..650#0, value: "Override prop1", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 685, - ), - hi: BytePos( - 685, - ), - ctxt: #0, - }, + span: 685..685#0, description: Text { - span: Span { - lo: BytePos( - 685, - ), - hi: BytePos( - 709, - ), - ctxt: #0, - }, + span: 685..709#0, value: "Third grandchild method.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/augmentstag2.debug b/crates/jsdoc/tests/fixtures/augmentstag2.debug index 433784a0a276..fad02c5f30bd 100644 --- a/crates/jsdoc/tests/fixtures/augmentstag2.debug +++ b/crates/jsdoc/tests/fixtures/augmentstag2.debug @@ -1,71 +1,23 @@ [ JsDoc { - span: Span { - lo: BytePos( - 69, - ), - hi: BytePos( - 69, - ), - ctxt: #0, - }, + span: 69..69#0, description: Text { - span: Span { - lo: BytePos( - 69, - ), - hi: BytePos( - 69, - ), - ctxt: #0, - }, + span: 69..69#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 69, - ), - hi: BytePos( - 80, - ), - ctxt: #0, - }, + span: 69..80#0, tag_name: Text { - span: Span { - lo: BytePos( - 69, - ), - hi: BytePos( - 80, - ), - ctxt: #0, - }, + span: 69..80#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 69, - ), - hi: BytePos( - 80, - ), - ctxt: #0, - }, + span: 69..80#0, ty: Some( Text { - span: Span { - lo: BytePos( - 69, - ), - hi: BytePos( - 97, - ), - ctxt: #0, - }, + span: 69..97#0, value: "* @extends UndocumentedThing", }, ), diff --git a/crates/jsdoc/tests/fixtures/augmentstag3.debug b/crates/jsdoc/tests/fixtures/augmentstag3.debug index 29a0fea7639b..828242be776c 100644 --- a/crates/jsdoc/tests/fixtures/augmentstag3.debug +++ b/crates/jsdoc/tests/fixtures/augmentstag3.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 74, - ), - hi: BytePos( - 74, - ), - ctxt: #0, - }, + span: 74..74#0, description: Text { - span: Span { - lo: BytePos( - 74, - ), - hi: BytePos( - 74, - ), - ctxt: #0, - }, + span: 74..74#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 74, - ), - hi: BytePos( - 79, - ), - ctxt: #0, - }, + span: 74..79#0, tag_name: Text { - span: Span { - lo: BytePos( - 74, - ), - hi: BytePos( - 79, - ), - ctxt: #0, - }, + span: 74..79#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 74, - ), - hi: BytePos( - 79, - ), - ctxt: #0, - }, + span: 74..79#0, ty: None, name: None, }, @@ -63,85 +23,29 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 107, - ), - hi: BytePos( - 107, - ), - ctxt: #0, - }, + span: 107..107#0, description: Text { - span: Span { - lo: BytePos( - 107, - ), - hi: BytePos( - 116, - ), - ctxt: #0, - }, + span: 107..116#0, value: "A method.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 165, - ), - hi: BytePos( - 165, - ), - ctxt: #0, - }, + span: 165..165#0, description: Text { - span: Span { - lo: BytePos( - 165, - ), - hi: BytePos( - 165, - ), - ctxt: #0, - }, + span: 165..165#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 165, - ), - hi: BytePos( - 170, - ), - ctxt: #0, - }, + span: 165..170#0, tag_name: Text { - span: Span { - lo: BytePos( - 165, - ), - hi: BytePos( - 170, - ), - ctxt: #0, - }, + span: 165..170#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 165, - ), - hi: BytePos( - 170, - ), - ctxt: #0, - }, + span: 165..170#0, ty: None, name: None, }, @@ -150,96 +54,32 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 198, - ), - hi: BytePos( - 198, - ), - ctxt: #0, - }, + span: 198..198#0, description: Text { - span: Span { - lo: BytePos( - 198, - ), - hi: BytePos( - 213, - ), - ctxt: #0, - }, + span: 198..213#0, value: "Another method.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 261, - ), - hi: BytePos( - 261, - ), - ctxt: #0, - }, + span: 261..261#0, description: Text { - span: Span { - lo: BytePos( - 261, - ), - hi: BytePos( - 261, - ), - ctxt: #0, - }, + span: 261..261#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 261, - ), - hi: BytePos( - 266, - ), - ctxt: #0, - }, + span: 261..266#0, tag_name: Text { - span: Span { - lo: BytePos( - 261, - ), - hi: BytePos( - 266, - ), - ctxt: #0, - }, + span: 261..266#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 261, - ), - hi: BytePos( - 266, - ), - ctxt: #0, - }, + span: 261..266#0, ty: Some( Text { - span: Span { - lo: BytePos( - 261, - ), - hi: BytePos( - 276, - ), - ctxt: #0, - }, + span: 261..276#0, value: "* @augments Foo", }, ), @@ -248,59 +88,19 @@ ), }, TagItem { - span: Span { - lo: BytePos( - 261, - ), - hi: BytePos( - 269, - ), - ctxt: #0, - }, + span: 261..269#0, tag_name: Text { - span: Span { - lo: BytePos( - 261, - ), - hi: BytePos( - 269, - ), - ctxt: #0, - }, + span: 261..269#0, value: "augments", }, tag: Augments( AugmentsTag { - span: Span { - lo: BytePos( - 261, - ), - hi: BytePos( - 269, - ), - ctxt: #0, - }, + span: 261..269#0, class: NamePath { - span: Span { - lo: BytePos( - 261, - ), - hi: BytePos( - 261, - ), - ctxt: #0, - }, + span: 261..261#0, components: [ Text { - span: Span { - lo: BytePos( - 261, - ), - hi: BytePos( - 264, - ), - ctxt: #0, - }, + span: 261..264#0, value: "Bar", }, ], diff --git a/crates/jsdoc/tests/fixtures/augmentstag4.debug b/crates/jsdoc/tests/fixtures/augmentstag4.debug index 417fe82eda37..3ba7e886664c 100644 --- a/crates/jsdoc/tests/fixtures/augmentstag4.debug +++ b/crates/jsdoc/tests/fixtures/augmentstag4.debug @@ -1,71 +1,23 @@ [ JsDoc { - span: Span { - lo: BytePos( - 49, - ), - hi: BytePos( - 49, - ), - ctxt: #0, - }, + span: 49..49#0, description: Text { - span: Span { - lo: BytePos( - 49, - ), - hi: BytePos( - 49, - ), - ctxt: #0, - }, + span: 49..49#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 49, - ), - hi: BytePos( - 60, - ), - ctxt: #0, - }, + span: 49..60#0, tag_name: Text { - span: Span { - lo: BytePos( - 49, - ), - hi: BytePos( - 60, - ), - ctxt: #0, - }, + span: 49..60#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 49, - ), - hi: BytePos( - 60, - ), - ctxt: #0, - }, + span: 49..60#0, ty: Some( Text { - span: Span { - lo: BytePos( - 49, - ), - hi: BytePos( - 72, - ), - ctxt: #0, - }, + span: 49..72#0, value: "* @classdesc Base class", }, ), @@ -76,120 +28,40 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 126, - ), - hi: BytePos( - 126, - ), - ctxt: #0, - }, + span: 126..126#0, description: Text { - span: Span { - lo: BytePos( - 126, - ), - hi: BytePos( - 132, - ), - ctxt: #0, - }, + span: 126..132#0, value: "member", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 169, - ), - hi: BytePos( - 169, - ), - ctxt: #0, - }, + span: 169..169#0, description: Text { - span: Span { - lo: BytePos( - 169, - ), - hi: BytePos( - 183, - ), - ctxt: #0, - }, + span: 169..183#0, value: "another member", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 218, - ), - hi: BytePos( - 218, - ), - ctxt: #0, - }, + span: 218..218#0, description: Text { - span: Span { - lo: BytePos( - 218, - ), - hi: BytePos( - 248, - ), - ctxt: #0, - }, + span: 218..248#0, value: "explicitly named member\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 218, - ), - hi: BytePos( - 226, - ), - ctxt: #0, - }, + span: 218..226#0, tag_name: Text { - span: Span { - lo: BytePos( - 218, - ), - hi: BytePos( - 226, - ), - ctxt: #0, - }, + span: 218..226#0, value: "function", }, tag: Function( FunctionTag { - span: Span { - lo: BytePos( - 218, - ), - hi: BytePos( - 226, - ), - ctxt: #0, - }, + span: 218..226#0, name: Some( Text { - span: Span { - lo: BytePos( - 218, - ), - hi: BytePos( - 228, - ), - ctxt: #0, - }, + span: 218..228#0, value: "Base#test3", }, ), @@ -199,86 +71,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 325, - ), - hi: BytePos( - 325, - ), - ctxt: #0, - }, + span: 325..325#0, description: Text { - span: Span { - lo: BytePos( - 325, - ), - hi: BytePos( - 325, - ), - ctxt: #0, - }, + span: 325..325#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 325, - ), - hi: BytePos( - 336, - ), - ctxt: #0, - }, + span: 325..336#0, tag_name: Text { - span: Span { - lo: BytePos( - 325, - ), - hi: BytePos( - 336, - ), - ctxt: #0, - }, + span: 325..336#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 325, - ), - hi: BytePos( - 336, - ), - ctxt: #0, - }, + span: 325..336#0, ty: Some( Text { - span: Span { - lo: BytePos( - 325, - ), - hi: BytePos( - 340, - ), - ctxt: #0, - }, + span: 325..340#0, value: "* @extends Base", }, ), name: Some( Text { - span: Span { - lo: BytePos( - 325, - ), - hi: BytePos( - 355, - ), - ctxt: #0, - }, + span: 325..355#0, value: "* @classdesc Extension of Base", }, ), diff --git a/crates/jsdoc/tests/fixtures/augmentstag5.debug b/crates/jsdoc/tests/fixtures/augmentstag5.debug index b099dd27a136..b28bcc56db1b 100644 --- a/crates/jsdoc/tests/fixtures/augmentstag5.debug +++ b/crates/jsdoc/tests/fixtures/augmentstag5.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, ty: None, name: None, }, @@ -63,82 +23,26 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 69, - ), - hi: BytePos( - 71, - ), - ctxt: #0, - }, + span: 69..71#0, description: Text { - span: Span { - lo: BytePos( - 69, - ), - hi: BytePos( - 69, - ), - ctxt: #0, - }, + span: 69..69#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 69, - ), - hi: BytePos( - 74, - ), - ctxt: #0, - }, + span: 69..74#0, tag_name: Text { - span: Span { - lo: BytePos( - 69, - ), - hi: BytePos( - 74, - ), - ctxt: #0, - }, + span: 69..74#0, value: "lends", }, tag: Lends( LendsTag { - span: Span { - lo: BytePos( - 69, - ), - hi: BytePos( - 74, - ), - ctxt: #0, - }, + span: 69..74#0, name: NamePath { - span: Span { - lo: BytePos( - 69, - ), - hi: BytePos( - 71, - ), - ctxt: #0, - }, + span: 69..71#0, components: [ Text { - span: Span { - lo: BytePos( - 69, - ), - hi: BytePos( - 73, - ), - ctxt: #0, - }, + span: 69..73#0, value: "Base", }, ], @@ -149,71 +53,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 96, - ), - hi: BytePos( - 123, - ), - ctxt: #0, - }, + span: 96..123#0, description: Text { - span: Span { - lo: BytePos( - 96, - ), - hi: BytePos( - 113, - ), - ctxt: #0, - }, + span: 96..113#0, value: "Description for {", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 96, - ), - hi: BytePos( - 100, - ), - ctxt: #0, - }, + span: 96..100#0, tag_name: Text { - span: Span { - lo: BytePos( - 96, - ), - hi: BytePos( - 100, - ), - ctxt: #0, - }, + span: 96..100#0, value: "link", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 96, - ), - hi: BytePos( - 100, - ), - ctxt: #0, - }, + span: 96..100#0, extras: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -222,71 +78,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 197, - ), - hi: BytePos( - 219, - ), - ctxt: #0, - }, + span: 197..219#0, description: Text { - span: Span { - lo: BytePos( - 197, - ), - hi: BytePos( - 214, - ), - ctxt: #0, - }, + span: 197..214#0, value: "Description for {", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 197, - ), - hi: BytePos( - 201, - ), - ctxt: #0, - }, + span: 197..201#0, tag_name: Text { - span: Span { - lo: BytePos( - 197, - ), - hi: BytePos( - 201, - ), - ctxt: #0, - }, + span: 197..201#0, value: "link", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 197, - ), - hi: BytePos( - 201, - ), - ctxt: #0, - }, + span: 197..201#0, extras: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -295,61 +103,21 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 286, - ), - hi: BytePos( - 286, - ), - ctxt: #0, - }, + span: 286..286#0, description: Text { - span: Span { - lo: BytePos( - 286, - ), - hi: BytePos( - 286, - ), - ctxt: #0, - }, + span: 286..286#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 286, - ), - hi: BytePos( - 291, - ), - ctxt: #0, - }, + span: 286..291#0, tag_name: Text { - span: Span { - lo: BytePos( - 286, - ), - hi: BytePos( - 291, - ), - ctxt: #0, - }, + span: 286..291#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 286, - ), - hi: BytePos( - 291, - ), - ctxt: #0, - }, + span: 286..291#0, ty: None, name: None, }, @@ -358,82 +126,26 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 339, - ), - hi: BytePos( - 341, - ), - ctxt: #0, - }, + span: 339..341#0, description: Text { - span: Span { - lo: BytePos( - 339, - ), - hi: BytePos( - 339, - ), - ctxt: #0, - }, + span: 339..339#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 339, - ), - hi: BytePos( - 344, - ), - ctxt: #0, - }, + span: 339..344#0, tag_name: Text { - span: Span { - lo: BytePos( - 339, - ), - hi: BytePos( - 344, - ), - ctxt: #0, - }, + span: 339..344#0, value: "lends", }, tag: Lends( LendsTag { - span: Span { - lo: BytePos( - 339, - ), - hi: BytePos( - 344, - ), - ctxt: #0, - }, + span: 339..344#0, name: NamePath { - span: Span { - lo: BytePos( - 339, - ), - hi: BytePos( - 341, - ), - ctxt: #0, - }, + span: 339..341#0, components: [ Text { - span: Span { - lo: BytePos( - 339, - ), - hi: BytePos( - 343, - ), - ctxt: #0, - }, + span: 339..343#0, value: "Base", }, ], @@ -444,71 +156,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 366, - ), - hi: BytePos( - 393, - ), - ctxt: #0, - }, + span: 366..393#0, description: Text { - span: Span { - lo: BytePos( - 366, - ), - hi: BytePos( - 383, - ), - ctxt: #0, - }, + span: 366..383#0, value: "Description for {", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 366, - ), - hi: BytePos( - 370, - ), - ctxt: #0, - }, + span: 366..370#0, tag_name: Text { - span: Span { - lo: BytePos( - 366, - ), - hi: BytePos( - 370, - ), - ctxt: #0, - }, + span: 366..370#0, value: "link", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 366, - ), - hi: BytePos( - 370, - ), - ctxt: #0, - }, + span: 366..370#0, extras: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -517,71 +181,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 467, - ), - hi: BytePos( - 489, - ), - ctxt: #0, - }, + span: 467..489#0, description: Text { - span: Span { - lo: BytePos( - 467, - ), - hi: BytePos( - 484, - ), - ctxt: #0, - }, + span: 467..484#0, value: "Description for {", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 467, - ), - hi: BytePos( - 471, - ), - ctxt: #0, - }, + span: 467..471#0, tag_name: Text { - span: Span { - lo: BytePos( - 467, - ), - hi: BytePos( - 471, - ), - ctxt: #0, - }, + span: 467..471#0, value: "link", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 467, - ), - hi: BytePos( - 471, - ), - ctxt: #0, - }, + span: 467..471#0, extras: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -590,86 +206,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 556, - ), - hi: BytePos( - 556, - ), - ctxt: #0, - }, + span: 556..556#0, description: Text { - span: Span { - lo: BytePos( - 556, - ), - hi: BytePos( - 556, - ), - ctxt: #0, - }, + span: 556..556#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 556, - ), - hi: BytePos( - 561, - ), - ctxt: #0, - }, + span: 556..561#0, tag_name: Text { - span: Span { - lo: BytePos( - 556, - ), - hi: BytePos( - 561, - ), - ctxt: #0, - }, + span: 556..561#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 556, - ), - hi: BytePos( - 561, - ), - ctxt: #0, - }, + span: 556..561#0, ty: Some( Text { - span: Span { - lo: BytePos( - 556, - ), - hi: BytePos( - 573, - ), - ctxt: #0, - }, + span: 556..573#0, value: "* @augments Base0", }, ), name: Some( Text { - span: Span { - lo: BytePos( - 556, - ), - hi: BytePos( - 573, - ), - ctxt: #0, - }, + span: 556..573#0, value: "* @augments Base1", }, ), diff --git a/crates/jsdoc/tests/fixtures/augmentstag6.debug b/crates/jsdoc/tests/fixtures/augmentstag6.debug index ca2ae58360e9..bf6c194198d4 100644 --- a/crates/jsdoc/tests/fixtures/augmentstag6.debug +++ b/crates/jsdoc/tests/fixtures/augmentstag6.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 16..16#0, description: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 16..16#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 25, - ), - ctxt: #0, - }, + span: 16..25#0, tag_name: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 25, - ), - ctxt: #0, - }, + span: 16..25#0, value: "interface", }, tag: Interface( InterfaceTag { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 25, - ), - ctxt: #0, - }, + span: 16..25#0, name: None, }, ), @@ -62,96 +22,32 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 61, - ), - hi: BytePos( - 61, - ), - ctxt: #0, - }, + span: 61..61#0, description: Text { - span: Span { - lo: BytePos( - 61, - ), - hi: BytePos( - 81, - ), - ctxt: #0, - }, + span: 61..81#0, value: "Open the connection.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 134, - ), - hi: BytePos( - 134, - ), - ctxt: #0, - }, + span: 134..134#0, description: Text { - span: Span { - lo: BytePos( - 134, - ), - hi: BytePos( - 134, - ), - ctxt: #0, - }, + span: 134..134#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 134, - ), - hi: BytePos( - 143, - ), - ctxt: #0, - }, + span: 134..143#0, tag_name: Text { - span: Span { - lo: BytePos( - 134, - ), - hi: BytePos( - 143, - ), - ctxt: #0, - }, + span: 134..143#0, value: "interface", }, tag: Interface( InterfaceTag { - span: Span { - lo: BytePos( - 134, - ), - hi: BytePos( - 143, - ), - ctxt: #0, - }, + span: 134..143#0, name: Some( Text { - span: Span { - lo: BytePos( - 134, - ), - hi: BytePos( - 158, - ), - ctxt: #0, - }, + span: 134..158#0, value: "* @extends {IConnection}", }, ), @@ -161,25 +57,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 217, - ), - hi: BytePos( - 217, - ), - ctxt: #0, - }, + span: 217..217#0, description: Text { - span: Span { - lo: BytePos( - 217, - ), - hi: BytePos( - 238, - ), - ctxt: #0, - }, + span: 217..238#0, value: "Close the connection.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/authortag.debug b/crates/jsdoc/tests/fixtures/authortag.debug index ec03b91217d3..d218e7938240 100644 --- a/crates/jsdoc/tests/fixtures/authortag.debug +++ b/crates/jsdoc/tests/fixtures/authortag.debug @@ -1,71 +1,23 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 44, - ), - ctxt: #0, - }, + span: 1..44#0, value: "@author Michael Mathews ", }, ), @@ -76,119 +28,39 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 92, - ), - hi: BytePos( - 122, - ), - ctxt: #0, - }, + span: 92..122#0, description: Text { - span: Span { - lo: BytePos( - 92, - ), - hi: BytePos( - 92, - ), - ctxt: #0, - }, + span: 92..92#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 92, - ), - hi: BytePos( - 98, - ), - ctxt: #0, - }, + span: 92..98#0, tag_name: Text { - span: Span { - lo: BytePos( - 92, - ), - hi: BytePos( - 98, - ), - ctxt: #0, - }, + span: 92..98#0, value: "author", }, tag: Author( AuthorTag { - span: Span { - lo: BytePos( - 92, - ), - hi: BytePos( - 98, - ), - ctxt: #0, - }, + span: 92..98#0, author: Text { - span: Span { - lo: BytePos( - 92, - ), - hi: BytePos( - 121, - ), - ctxt: #0, - }, + span: 92..121#0, value: "John Doe ", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 92, - ), - hi: BytePos( - 98, - ), - ctxt: #0, - }, + span: 92..98#0, tag_name: Text { - span: Span { - lo: BytePos( - 92, - ), - hi: BytePos( - 98, - ), - ctxt: #0, - }, + span: 92..98#0, value: "author", }, tag: Author( AuthorTag { - span: Span { - lo: BytePos( - 92, - ), - hi: BytePos( - 98, - ), - ctxt: #0, - }, + span: 92..98#0, author: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, diff --git a/crates/jsdoc/tests/fixtures/borrowstag.debug b/crates/jsdoc/tests/fixtures/borrowstag.debug index 239e4cbbe2f4..3b20048d82e1 100644 --- a/crates/jsdoc/tests/fixtures/borrowstag.debug +++ b/crates/jsdoc/tests/fixtures/borrowstag.debug @@ -1,72 +1,24 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, value: "namespace", }, tag: Namespace( NamespaceTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, ty: None, name: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 22, - ), - ctxt: #0, - }, + span: 1..22#0, value: "borrows trstr as trim", }, ), @@ -76,86 +28,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 81, - ), - hi: BytePos( - 81, - ), - ctxt: #0, - }, + span: 81..81#0, description: Text { - span: Span { - lo: BytePos( - 81, - ), - hi: BytePos( - 120, - ), - ctxt: #0, - }, + span: 81..120#0, value: "Remove whitespace from around a string.", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 81, - ), - hi: BytePos( - 86, - ), - ctxt: #0, - }, + span: 81..86#0, tag_name: Text { - span: Span { - lo: BytePos( - 81, - ), - hi: BytePos( - 86, - ), - ctxt: #0, - }, + span: 81..86#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 81, - ), - hi: BytePos( - 86, - ), - ctxt: #0, - }, + span: 81..86#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 81, - ), - hi: BytePos( - 89, - ), - ctxt: #0, - }, + span: 81..89#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 81, - ), - hi: BytePos( - 84, - ), - ctxt: #0, - }, + span: 81..84#0, value: "str", }, }, diff --git a/crates/jsdoc/tests/fixtures/borrowstag2.debug b/crates/jsdoc/tests/fixtures/borrowstag2.debug index c628f1d64222..e8a6ec0eeb97 100644 --- a/crates/jsdoc/tests/fixtures/borrowstag2.debug +++ b/crates/jsdoc/tests/fixtures/borrowstag2.debug @@ -1,72 +1,24 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, value: "namespace", }, tag: Namespace( NamespaceTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, ty: None, name: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 14, - ), - ctxt: #0, - }, + span: 1..14#0, value: "borrows rtrim", }, ), @@ -76,73 +28,25 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 76, - ), - hi: BytePos( - 76, - ), - ctxt: #0, - }, + span: 76..76#0, description: Text { - span: Span { - lo: BytePos( - 76, - ), - hi: BytePos( - 76, - ), - ctxt: #0, - }, + span: 76..76#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 76, - ), - hi: BytePos( - 85, - ), - ctxt: #0, - }, + span: 76..85#0, tag_name: Text { - span: Span { - lo: BytePos( - 76, - ), - hi: BytePos( - 85, - ), - ctxt: #0, - }, + span: 76..85#0, value: "namespace", }, tag: Namespace( NamespaceTag { - span: Span { - lo: BytePos( - 76, - ), - hi: BytePos( - 85, - ), - ctxt: #0, - }, + span: 76..85#0, ty: None, name: Some( Text { - span: Span { - lo: BytePos( - 76, - ), - hi: BytePos( - 89, - ), - ctxt: #0, - }, + span: 76..89#0, value: "borrows rtrim", }, ), @@ -152,86 +56,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 147, - ), - hi: BytePos( - 147, - ), - ctxt: #0, - }, + span: 147..147#0, description: Text { - span: Span { - lo: BytePos( - 147, - ), - hi: BytePos( - 197, - ), - ctxt: #0, - }, + span: 147..197#0, value: "Remove whitespace from the right side of a string.", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 147, - ), - hi: BytePos( - 152, - ), - ctxt: #0, - }, + span: 147..152#0, tag_name: Text { - span: Span { - lo: BytePos( - 147, - ), - hi: BytePos( - 152, - ), - ctxt: #0, - }, + span: 147..152#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 147, - ), - hi: BytePos( - 152, - ), - ctxt: #0, - }, + span: 147..152#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 147, - ), - hi: BytePos( - 155, - ), - ctxt: #0, - }, + span: 147..155#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 147, - ), - hi: BytePos( - 150, - ), - ctxt: #0, - }, + span: 147..150#0, value: "str", }, }, diff --git a/crates/jsdoc/tests/fixtures/callbacktag.debug b/crates/jsdoc/tests/fixtures/callbacktag.debug index 39b8324cb99a..0cc8ce6e6310 100644 --- a/crates/jsdoc/tests/fixtures/callbacktag.debug +++ b/crates/jsdoc/tests/fixtures/callbacktag.debug @@ -1,85 +1,29 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 26, - ), - ctxt: #0, - }, + span: 1..26#0, value: "{requestResponseCallback}", }, ), desc: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 3, - ), - ctxt: #0, - }, + span: 1..3#0, value: "cb", }, }, @@ -88,86 +32,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 85, - ), - hi: BytePos( - 85, - ), - ctxt: #0, - }, + span: 85..85#0, description: Text { - span: Span { - lo: BytePos( - 85, - ), - hi: BytePos( - 85, - ), - ctxt: #0, - }, + span: 85..85#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 85, - ), - hi: BytePos( - 90, - ), - ctxt: #0, - }, + span: 85..90#0, tag_name: Text { - span: Span { - lo: BytePos( - 85, - ), - hi: BytePos( - 90, - ), - ctxt: #0, - }, + span: 85..90#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 85, - ), - hi: BytePos( - 90, - ), - ctxt: #0, - }, + span: 85..90#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 85, - ), - hi: BytePos( - 104, - ), - ctxt: #0, - }, + span: 85..104#0, value: "{wrongTypeCallback}", }, ), desc: Text { - span: Span { - lo: BytePos( - 85, - ), - hi: BytePos( - 87, - ), - ctxt: #0, - }, + span: 85..87#0, value: "cb", }, }, diff --git a/crates/jsdoc/tests/fixtures/classdesctag.debug b/crates/jsdoc/tests/fixtures/classdesctag.debug index 493b4b078c6b..ab8ba2802d97 100644 --- a/crates/jsdoc/tests/fixtures/classdesctag.debug +++ b/crates/jsdoc/tests/fixtures/classdesctag.debug @@ -1,71 +1,23 @@ [ JsDoc { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 16..16#0, description: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 24, - ), - ctxt: #0, - }, + span: 16..24#0, value: "Asdf.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 21, - ), - ctxt: #0, - }, + span: 16..21#0, tag_name: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 21, - ), - ctxt: #0, - }, + span: 16..21#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 21, - ), - ctxt: #0, - }, + span: 16..21#0, ty: Some( Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 56, - ), - ctxt: #0, - }, + span: 16..56#0, value: "* @classdesc A description of the class.", }, ), @@ -76,134 +28,46 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 104, - ), - hi: BytePos( - 104, - ), - ctxt: #0, - }, + span: 104..104#0, description: Text { - span: Span { - lo: BytePos( - 104, - ), - hi: BytePos( - 104, - ), - ctxt: #0, - }, + span: 104..104#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 104, - ), - hi: BytePos( - 113, - ), - ctxt: #0, - }, + span: 104..113#0, tag_name: Text { - span: Span { - lo: BytePos( - 104, - ), - hi: BytePos( - 113, - ), - ctxt: #0, - }, + span: 104..113#0, value: "classdesc", }, tag: ClassDesc( JSDocClassDescTag { - span: Span { - lo: BytePos( - 104, - ), - hi: BytePos( - 113, - ), - ctxt: #0, - }, + span: 104..113#0, desc: Text { - span: Span { - lo: BytePos( - 104, - ), - hi: BytePos( - 131, - ), - ctxt: #0, - }, + span: 104..131#0, value: "A description of the class.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 104, - ), - hi: BytePos( - 109, - ), - ctxt: #0, - }, + span: 104..109#0, tag_name: Text { - span: Span { - lo: BytePos( - 104, - ), - hi: BytePos( - 109, - ), - ctxt: #0, - }, + span: 104..109#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 104, - ), - hi: BytePos( - 109, - ), - ctxt: #0, - }, + span: 104..109#0, ty: Some( Text { - span: Span { - lo: BytePos( - 104, - ), - hi: BytePos( - 107, - ), - ctxt: #0, - }, + span: 104..107#0, value: "Bar", }, ), name: Some( Text { - span: Span { - lo: BytePos( - 104, - ), - hi: BytePos( - 118, - ), - ctxt: #0, - }, + span: 104..118#0, value: "* @constructor", }, ), @@ -213,72 +77,24 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 185, - ), - hi: BytePos( - 185, - ), - ctxt: #0, - }, + span: 185..185#0, description: Text { - span: Span { - lo: BytePos( - 185, - ), - hi: BytePos( - 202, - ), - ctxt: #0, - }, + span: 185..202#0, value: "The Baz class.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 185, - ), - hi: BytePos( - 190, - ), - ctxt: #0, - }, + span: 185..190#0, tag_name: Text { - span: Span { - lo: BytePos( - 185, - ), - hi: BytePos( - 190, - ), - ctxt: #0, - }, + span: 185..190#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 185, - ), - hi: BytePos( - 190, - ), - ctxt: #0, - }, + span: 185..190#0, ty: Some( Text { - span: Span { - lo: BytePos( - 185, - ), - hi: BytePos( - 216, - ), - ctxt: #0, - }, + span: 185..216#0, value: "* Description of the Baz class.", }, ), diff --git a/crates/jsdoc/tests/fixtures/classproperties.debug b/crates/jsdoc/tests/fixtures/classproperties.debug index 4fbc208beb1a..c6c22aa3ae77 100644 --- a/crates/jsdoc/tests/fixtures/classproperties.debug +++ b/crates/jsdoc/tests/fixtures/classproperties.debug @@ -1,96 +1,32 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 14, - ), - ctxt: #0, - }, + span: 1..14#0, value: "Sample class.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 36, - ), - hi: BytePos( - 36, - ), - ctxt: #0, - }, + span: 36..36#0, description: Text { - span: Span { - lo: BytePos( - 36, - ), - hi: BytePos( - 52, - ), - ctxt: #0, - }, + span: 36..52#0, value: "Public property.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 76, - ), - hi: BytePos( - 76, - ), - ctxt: #0, - }, + span: 76..76#0, description: Text { - span: Span { - lo: BytePos( - 76, - ), - hi: BytePos( - 93, - ), - ctxt: #0, - }, + span: 76..93#0, value: "Private property.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 118, - ), - hi: BytePos( - 118, - ), - ctxt: #0, - }, + span: 118..118#0, description: Text { - span: Span { - lo: BytePos( - 118, - ), - hi: BytePos( - 156, - ), - ctxt: #0, - }, + span: 118..156#0, value: "Property with no value assigned to it.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/classtag.debug b/crates/jsdoc/tests/fixtures/classtag.debug index 18a9be3d1e48..a94d5ef59dd6 100644 --- a/crates/jsdoc/tests/fixtures/classtag.debug +++ b/crates/jsdoc/tests/fixtures/classtag.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 32, - ), - ctxt: #0, - }, + span: 1..32#0, value: "Describe the Ticker class here.", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, ty: None, name: None, }, diff --git a/crates/jsdoc/tests/fixtures/classtag2.debug b/crates/jsdoc/tests/fixtures/classtag2.debug index 4df56aefd7d7..71d831618435 100644 --- a/crates/jsdoc/tests/fixtures/classtag2.debug +++ b/crates/jsdoc/tests/fixtures/classtag2.debug @@ -1,157 +1,53 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 38, - ), - ctxt: #0, - }, + span: 1..38#0, value: "Describe the Subscription class here.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 75, - ), - hi: BytePos( - 75, - ), - ctxt: #0, - }, + span: 75..75#0, description: Text { - span: Span { - lo: BytePos( - 75, - ), - hi: BytePos( - 119, - ), - ctxt: #0, - }, + span: 75..119#0, value: "Describe the constructor here.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 75, - ), - hi: BytePos( - 80, - ), - ctxt: #0, - }, + span: 75..80#0, tag_name: Text { - span: Span { - lo: BytePos( - 75, - ), - hi: BytePos( - 80, - ), - ctxt: #0, - }, + span: 75..80#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 75, - ), - hi: BytePos( - 80, - ), - ctxt: #0, - }, + span: 75..80#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 75, - ), - hi: BytePos( - 83, - ), - ctxt: #0, - }, + span: 75..83#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 75, - ), - hi: BytePos( - 111, - ), - ctxt: #0, - }, + span: 75..111#0, value: "name - The name of the subscription.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 75, - ), - hi: BytePos( - 82, - ), - ctxt: #0, - }, + span: 75..82#0, tag_name: Text { - span: Span { - lo: BytePos( - 75, - ), - hi: BytePos( - 82, - ), - ctxt: #0, - }, + span: 75..82#0, value: "example", }, tag: Example( ExampleTag { - span: Span { - lo: BytePos( - 75, - ), - hi: BytePos( - 82, - ), - ctxt: #0, - }, + span: 75..82#0, text: Text { - span: Span { - lo: BytePos( - 75, - ), - hi: BytePos( - 121, - ), - ctxt: #0, - }, + span: 75..121#0, value: "* var subscription = new Subscription();\n ", }, }, @@ -160,134 +56,46 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 284, - ), - hi: BytePos( - 284, - ), - ctxt: #0, - }, + span: 284..284#0, description: Text { - span: Span { - lo: BytePos( - 284, - ), - hi: BytePos( - 317, - ), - ctxt: #0, - }, + span: 284..317#0, value: "Force the subscription to expire.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 344, - ), - hi: BytePos( - 344, - ), - ctxt: #0, - }, + span: 344..344#0, description: Text { - span: Span { - lo: BytePos( - 344, - ), - hi: BytePos( - 379, - ), - ctxt: #0, - }, + span: 344..379#0, value: "Describe the Subscriber class here.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 426, - ), - hi: BytePos( - 426, - ), - ctxt: #0, - }, + span: 426..426#0, description: Text { - span: Span { - lo: BytePos( - 426, - ), - hi: BytePos( - 470, - ), - ctxt: #0, - }, + span: 426..470#0, value: "Describe the constructor here.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 426, - ), - hi: BytePos( - 431, - ), - ctxt: #0, - }, + span: 426..431#0, tag_name: Text { - span: Span { - lo: BytePos( - 426, - ), - hi: BytePos( - 431, - ), - ctxt: #0, - }, + span: 426..431#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 426, - ), - hi: BytePos( - 431, - ), - ctxt: #0, - }, + span: 426..431#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 426, - ), - hi: BytePos( - 434, - ), - ctxt: #0, - }, + span: 426..434#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 426, - ), - hi: BytePos( - 460, - ), - ctxt: #0, - }, + span: 426..460#0, value: "name - The name of the subscriber.", }, }, @@ -296,85 +104,29 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 571, - ), - hi: BytePos( - 571, - ), - ctxt: #0, - }, + span: 571..571#0, description: Text { - span: Span { - lo: BytePos( - 571, - ), - hi: BytePos( - 615, - ), - ctxt: #0, - }, + span: 571..615#0, value: "Check whether the subscriber has a callback.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 647, - ), - ctxt: #0, - }, + span: 0..647#0, description: Text { - span: Span { - lo: BytePos( - 647, - ), - hi: BytePos( - 669, - ), - ctxt: #0, - }, + span: 647..669#0, value: "Subclass namespace.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 647, - ), - hi: BytePos( - 656, - ), - ctxt: #0, - }, + span: 647..656#0, tag_name: Text { - span: Span { - lo: BytePos( - 647, - ), - hi: BytePos( - 656, - ), - ctxt: #0, - }, + span: 647..656#0, value: "namespace", }, tag: Namespace( NamespaceTag { - span: Span { - lo: BytePos( - 647, - ), - hi: BytePos( - 656, - ), - ctxt: #0, - }, + span: 647..656#0, ty: None, name: None, }, @@ -383,61 +135,21 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 714, - ), - hi: BytePos( - 714, - ), - ctxt: #0, - }, + span: 714..714#0, description: Text { - span: Span { - lo: BytePos( - 714, - ), - hi: BytePos( - 748, - ), - ctxt: #0, - }, + span: 714..748#0, value: "Expiring subscription subclass.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 714, - ), - hi: BytePos( - 719, - ), - ctxt: #0, - }, + span: 714..719#0, tag_name: Text { - span: Span { - lo: BytePos( - 714, - ), - hi: BytePos( - 719, - ), - ctxt: #0, - }, + span: 714..719#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 714, - ), - hi: BytePos( - 719, - ), - ctxt: #0, - }, + span: 714..719#0, ty: None, name: None, }, @@ -446,86 +158,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 834, - ), - hi: BytePos( - 834, - ), - ctxt: #0, - }, + span: 834..834#0, description: Text { - span: Span { - lo: BytePos( - 834, - ), - hi: BytePos( - 878, - ), - ctxt: #0, - }, + span: 834..878#0, value: "Describe the constructor here.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 834, - ), - hi: BytePos( - 839, - ), - ctxt: #0, - }, + span: 834..839#0, tag_name: Text { - span: Span { - lo: BytePos( - 834, - ), - hi: BytePos( - 839, - ), - ctxt: #0, - }, + span: 834..839#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 834, - ), - hi: BytePos( - 839, - ), - ctxt: #0, - }, + span: 834..839#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 834, - ), - hi: BytePos( - 842, - ), - ctxt: #0, - }, + span: 834..842#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 834, - ), - hi: BytePos( - 870, - ), - ctxt: #0, - }, + span: 834..870#0, value: "name - The name of the subscription.", }, }, @@ -534,82 +190,26 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 979, - ), - hi: BytePos( - 979, - ), - ctxt: #0, - }, + span: 979..979#0, description: Text { - span: Span { - lo: BytePos( - 979, - ), - hi: BytePos( - 979, - ), - ctxt: #0, - }, + span: 979..979#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 979, - ), - hi: BytePos( - 987, - ), - ctxt: #0, - }, + span: 979..987#0, tag_name: Text { - span: Span { - lo: BytePos( - 979, - ), - hi: BytePos( - 987, - ), - ctxt: #0, - }, + span: 979..987#0, value: "memberof", }, tag: MemberOf( MemberOfTag { - span: Span { - lo: BytePos( - 979, - ), - hi: BytePos( - 987, - ), - ctxt: #0, - }, + span: 979..987#0, parent_name_path: NamePath { - span: Span { - lo: BytePos( - 979, - ), - hi: BytePos( - 979, - ), - ctxt: #0, - }, + span: 979..979#0, components: [ Text { - span: Span { - lo: BytePos( - 979, - ), - hi: BytePos( - 989, - ), - ctxt: #0, - }, + span: 979..989#0, value: "subclasses", }, ], @@ -620,25 +220,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 1039, - ), - hi: BytePos( - 1039, - ), - ctxt: #0, - }, + span: 1039..1039#0, description: Text { - span: Span { - lo: BytePos( - 1039, - ), - hi: BytePos( - 1055, - ), - ctxt: #0, - }, + span: 1039..1055#0, value: "Instance method.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/classwithoutname.debug b/crates/jsdoc/tests/fixtures/classwithoutname.debug index de33b9c3aabd..99fa4a78841d 100644 --- a/crates/jsdoc/tests/fixtures/classwithoutname.debug +++ b/crates/jsdoc/tests/fixtures/classwithoutname.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 99, - ), - hi: BytePos( - 99, - ), - ctxt: #0, - }, + span: 99..99#0, description: Text { - span: Span { - lo: BytePos( - 99, - ), - hi: BytePos( - 136, - ), - ctxt: #0, - }, + span: 99..136#0, value: "Create an instance of MyClass.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 99, - ), - hi: BytePos( - 109, - ), - ctxt: #0, - }, + span: 99..109#0, tag_name: Text { - span: Span { - lo: BytePos( - 99, - ), - hi: BytePos( - 109, - ), - ctxt: #0, - }, + span: 99..109#0, value: "constructs", }, tag: Constructs( ConstructsTag { - span: Span { - lo: BytePos( - 99, - ), - hi: BytePos( - 109, - ), - ctxt: #0, - }, + span: 99..109#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, diff --git a/crates/jsdoc/tests/fixtures/constanttag.debug b/crates/jsdoc/tests/fixtures/constanttag.debug index 88e21edfdca3..140e2e5e3c90 100644 --- a/crates/jsdoc/tests/fixtures/constanttag.debug +++ b/crates/jsdoc/tests/fixtures/constanttag.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "constant", }, tag: Const( ConstTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, ty: None, name: None, }, @@ -63,61 +23,21 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 32, - ), - hi: BytePos( - 36, - ), - ctxt: #0, - }, + span: 32..36#0, description: Text { - span: Span { - lo: BytePos( - 32, - ), - hi: BytePos( - 32, - ), - ctxt: #0, - }, + span: 32..32#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 32, - ), - hi: BytePos( - 37, - ), - ctxt: #0, - }, + span: 32..37#0, tag_name: Text { - span: Span { - lo: BytePos( - 32, - ), - hi: BytePos( - 37, - ), - ctxt: #0, - }, + span: 32..37#0, value: "const", }, tag: Const( ConstTag { - span: Span { - lo: BytePos( - 32, - ), - hi: BytePos( - 37, - ), - ctxt: #0, - }, + span: 32..37#0, ty: None, name: None, }, @@ -126,61 +46,21 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 51, - ), - hi: BytePos( - 64, - ), - ctxt: #0, - }, + span: 51..64#0, description: Text { - span: Span { - lo: BytePos( - 51, - ), - hi: BytePos( - 51, - ), - ctxt: #0, - }, + span: 51..51#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 51, - ), - hi: BytePos( - 56, - ), - ctxt: #0, - }, + span: 51..56#0, tag_name: Text { - span: Span { - lo: BytePos( - 51, - ), - hi: BytePos( - 56, - ), - ctxt: #0, - }, + span: 51..56#0, value: "const", }, tag: Const( ConstTag { - span: Span { - lo: BytePos( - 51, - ), - hi: BytePos( - 56, - ), - ctxt: #0, - }, + span: 51..56#0, ty: None, name: None, }, @@ -189,61 +69,21 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 79, - ), - hi: BytePos( - 88, - ), - ctxt: #0, - }, + span: 79..88#0, description: Text { - span: Span { - lo: BytePos( - 79, - ), - hi: BytePos( - 79, - ), - ctxt: #0, - }, + span: 79..79#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 79, - ), - hi: BytePos( - 84, - ), - ctxt: #0, - }, + span: 79..84#0, tag_name: Text { - span: Span { - lo: BytePos( - 79, - ), - hi: BytePos( - 84, - ), - ctxt: #0, - }, + span: 79..84#0, value: "const", }, tag: Const( ConstTag { - span: Span { - lo: BytePos( - 79, - ), - hi: BytePos( - 84, - ), - ctxt: #0, - }, + span: 79..84#0, ty: None, name: None, }, @@ -252,61 +92,21 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 116, - ), - hi: BytePos( - 132, - ), - ctxt: #0, - }, + span: 116..132#0, description: Text { - span: Span { - lo: BytePos( - 116, - ), - hi: BytePos( - 116, - ), - ctxt: #0, - }, + span: 116..116#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 116, - ), - hi: BytePos( - 121, - ), - ctxt: #0, - }, + span: 116..121#0, tag_name: Text { - span: Span { - lo: BytePos( - 116, - ), - hi: BytePos( - 121, - ), - ctxt: #0, - }, + span: 116..121#0, value: "const", }, tag: Const( ConstTag { - span: Span { - lo: BytePos( - 116, - ), - hi: BytePos( - 121, - ), - ctxt: #0, - }, + span: 116..121#0, ty: None, name: None, }, @@ -315,61 +115,21 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 161, - ), - hi: BytePos( - 168, - ), - ctxt: #0, - }, + span: 161..168#0, description: Text { - span: Span { - lo: BytePos( - 161, - ), - hi: BytePos( - 161, - ), - ctxt: #0, - }, + span: 161..161#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 161, - ), - hi: BytePos( - 166, - ), - ctxt: #0, - }, + span: 161..166#0, tag_name: Text { - span: Span { - lo: BytePos( - 161, - ), - hi: BytePos( - 166, - ), - ctxt: #0, - }, + span: 161..166#0, value: "const", }, tag: Const( ConstTag { - span: Span { - lo: BytePos( - 161, - ), - hi: BytePos( - 166, - ), - ctxt: #0, - }, + span: 161..166#0, ty: None, name: None, }, @@ -378,25 +138,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 197, - ), - hi: BytePos( - 197, - ), - ctxt: #0, - }, + span: 197..197#0, description: Text { - span: Span { - lo: BytePos( - 197, - ), - hi: BytePos( - 216, - ), - ctxt: #0, - }, + span: 197..216#0, value: "auto-detected const", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/constanttag2.debug b/crates/jsdoc/tests/fixtures/constanttag2.debug index ed747068726c..63701a6c6772 100644 --- a/crates/jsdoc/tests/fixtures/constanttag2.debug +++ b/crates/jsdoc/tests/fixtures/constanttag2.debug @@ -1,24 +1,8 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 34, - ), - ctxt: #0, - }, + span: 1..34#0, value: "ES 2015 class assigned to a const", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/constructortag.debug b/crates/jsdoc/tests/fixtures/constructortag.debug index 9e7da1c2bebf..b39cb6e364c2 100644 --- a/crates/jsdoc/tests/fixtures/constructortag.debug +++ b/crates/jsdoc/tests/fixtures/constructortag.debug @@ -1,85 +1,29 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 41, - ), - ctxt: #0, - }, + span: 1..41#0, value: "Describe your constructor function here.", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 26, - ), - ctxt: #0, - }, + span: 1..26#0, value: "Describe your class here.", }, ), name: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 13, - ), - ctxt: #0, - }, + span: 1..13#0, value: "@constructor", }, ), @@ -87,111 +31,39 @@ ), }, TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 4, - ), - ctxt: #0, - }, + span: 1..4#0, value: "url", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "throws", }, tag: Throw( ThrowTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, text: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 13, - ), - ctxt: #0, - }, + span: 1..13#0, value: "MalformedURL", }, }, @@ -200,25 +72,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 181, - ), - hi: BytePos( - 181, - ), - ctxt: #0, - }, + span: 181..181#0, description: Text { - span: Span { - lo: BytePos( - 181, - ), - hi: BytePos( - 207, - ), - ctxt: #0, - }, + span: 181..207#0, value: "Document your method here.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/constructstag.debug b/crates/jsdoc/tests/fixtures/constructstag.debug index 0202fd85ca3c..3e817514d0df 100644 --- a/crates/jsdoc/tests/fixtures/constructstag.debug +++ b/crates/jsdoc/tests/fixtures/constructstag.debug @@ -1,229 +1,77 @@ [ JsDoc { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 30, - ), - ctxt: #0, - }, + span: 30..30#0, description: Text { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 70, - ), - ctxt: #0, - }, + span: 30..70#0, value: "Document your constructor function here.", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 40, - ), - ctxt: #0, - }, + span: 30..40#0, tag_name: Text { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 40, - ), - ctxt: #0, - }, + span: 30..40#0, value: "constructs", }, tag: Constructs( ConstructsTag { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 40, - ), - ctxt: #0, - }, + span: 30..40#0, name: Text { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 39, - ), - ctxt: #0, - }, + span: 30..39#0, value: "TextBlock", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 39, - ), - ctxt: #0, - }, + span: 30..39#0, tag_name: Text { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 39, - ), - ctxt: #0, - }, + span: 30..39#0, value: "classdesc", }, tag: ClassDesc( JSDocClassDescTag { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 39, - ), - ctxt: #0, - }, + span: 30..39#0, desc: Text { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 54, - ), - ctxt: #0, - }, + span: 30..54#0, value: "Describe your class here", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 35, - ), - ctxt: #0, - }, + span: 30..35#0, tag_name: Text { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 35, - ), - ctxt: #0, - }, + span: 30..35#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 35, - ), - ctxt: #0, - }, + span: 30..35#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 38, - ), - ctxt: #0, - }, + span: 30..38#0, value: "{object}", }, ), desc: Text { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 34, - ), - ctxt: #0, - }, + span: 30..34#0, value: "opts", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 36, - ), - ctxt: #0, - }, + span: 30..36#0, tag_name: Text { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 36, - ), - ctxt: #0, - }, + span: 30..36#0, value: "throws", }, tag: Throw( ThrowTag { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 36, - ), - ctxt: #0, - }, + span: 30..36#0, text: Text { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 41, - ), - ctxt: #0, - }, + span: 30..41#0, value: "MissingNode", }, }, @@ -232,82 +80,26 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 272, - ), - hi: BytePos( - 272, - ), - ctxt: #0, - }, + span: 272..272#0, description: Text { - span: Span { - lo: BytePos( - 272, - ), - hi: BytePos( - 298, - ), - ctxt: #0, - }, + span: 272..298#0, value: "Document your method here.", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 272, - ), - hi: BytePos( - 280, - ), - ctxt: #0, - }, + span: 272..280#0, tag_name: Text { - span: Span { - lo: BytePos( - 272, - ), - hi: BytePos( - 280, - ), - ctxt: #0, - }, + span: 272..280#0, value: "memberof", }, tag: MemberOf( MemberOfTag { - span: Span { - lo: BytePos( - 272, - ), - hi: BytePos( - 280, - ), - ctxt: #0, - }, + span: 272..280#0, parent_name_path: NamePath { - span: Span { - lo: BytePos( - 272, - ), - hi: BytePos( - 278, - ), - ctxt: #0, - }, + span: 272..278#0, components: [ Text { - span: Span { - lo: BytePos( - 272, - ), - hi: BytePos( - 281, - ), - ctxt: #0, - }, + span: 272..281#0, value: "TextBlock", }, ], diff --git a/crates/jsdoc/tests/fixtures/constructstag2.debug b/crates/jsdoc/tests/fixtures/constructstag2.debug index f379cf6e3865..f03e9a088302 100644 --- a/crates/jsdoc/tests/fixtures/constructstag2.debug +++ b/crates/jsdoc/tests/fixtures/constructstag2.debug @@ -1,133 +1,45 @@ [ JsDoc { - span: Span { - lo: BytePos( - 22, - ), - hi: BytePos( - 22, - ), - ctxt: #0, - }, + span: 22..22#0, description: Text { - span: Span { - lo: BytePos( - 22, - ), - hi: BytePos( - 22, - ), - ctxt: #0, - }, + span: 22..22#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 22, - ), - hi: BytePos( - 32, - ), - ctxt: #0, - }, + span: 22..32#0, tag_name: Text { - span: Span { - lo: BytePos( - 22, - ), - hi: BytePos( - 32, - ), - ctxt: #0, - }, + span: 22..32#0, value: "constructs", }, tag: Constructs( ConstructsTag { - span: Span { - lo: BytePos( - 22, - ), - hi: BytePos( - 32, - ), - ctxt: #0, - }, + span: 22..32#0, name: Text { - span: Span { - lo: BytePos( - 22, - ), - hi: BytePos( - 26, - ), - ctxt: #0, - }, + span: 22..26#0, value: "Menu", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 22, - ), - hi: BytePos( - 27, - ), - ctxt: #0, - }, + span: 22..27#0, tag_name: Text { - span: Span { - lo: BytePos( - 22, - ), - hi: BytePos( - 27, - ), - ctxt: #0, - }, + span: 22..27#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 22, - ), - hi: BytePos( - 27, - ), - ctxt: #0, - }, + span: 22..27#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 22, - ), - hi: BytePos( - 27, - ), - ctxt: #0, - }, + span: 22..27#0, value: "items", }, ), desc: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -136,82 +48,26 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 125, - ), - hi: BytePos( - 125, - ), - ctxt: #0, - }, + span: 125..125#0, description: Text { - span: Span { - lo: BytePos( - 125, - ), - hi: BytePos( - 125, - ), - ctxt: #0, - }, + span: 125..125#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 125, - ), - hi: BytePos( - 133, - ), - ctxt: #0, - }, + span: 125..133#0, tag_name: Text { - span: Span { - lo: BytePos( - 125, - ), - hi: BytePos( - 133, - ), - ctxt: #0, - }, + span: 125..133#0, value: "memberof", }, tag: MemberOf( MemberOfTag { - span: Span { - lo: BytePos( - 125, - ), - hi: BytePos( - 133, - ), - ctxt: #0, - }, + span: 125..133#0, parent_name_path: NamePath { - span: Span { - lo: BytePos( - 125, - ), - hi: BytePos( - 135, - ), - ctxt: #0, - }, + span: 125..135#0, components: [ Text { - span: Span { - lo: BytePos( - 125, - ), - hi: BytePos( - 129, - ), - ctxt: #0, - }, + span: 125..129#0, value: "Menu", }, ], diff --git a/crates/jsdoc/tests/fixtures/constructstag3.debug b/crates/jsdoc/tests/fixtures/constructstag3.debug index a8f8a9673e58..fadbce5f8e0a 100644 --- a/crates/jsdoc/tests/fixtures/constructstag3.debug +++ b/crates/jsdoc/tests/fixtures/constructstag3.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 34, - ), - ctxt: #0, - }, + span: 1..34#0, value: "A class that represents a person.", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, ty: None, name: None, }, @@ -63,134 +23,46 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 91, - ), - hi: BytePos( - 91, - ), - ctxt: #0, - }, + span: 91..91#0, description: Text { - span: Span { - lo: BytePos( - 91, - ), - hi: BytePos( - 91, - ), - ctxt: #0, - }, + span: 91..91#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 91, - ), - hi: BytePos( - 101, - ), - ctxt: #0, - }, + span: 91..101#0, tag_name: Text { - span: Span { - lo: BytePos( - 91, - ), - hi: BytePos( - 101, - ), - ctxt: #0, - }, + span: 91..101#0, value: "constructs", }, tag: Constructs( ConstructsTag { - span: Span { - lo: BytePos( - 91, - ), - hi: BytePos( - 101, - ), - ctxt: #0, - }, + span: 91..101#0, name: Text { - span: Span { - lo: BytePos( - 91, - ), - hi: BytePos( - 97, - ), - ctxt: #0, - }, + span: 91..97#0, value: "Person", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 91, - ), - hi: BytePos( - 96, - ), - ctxt: #0, - }, + span: 91..96#0, tag_name: Text { - span: Span { - lo: BytePos( - 91, - ), - hi: BytePos( - 96, - ), - ctxt: #0, - }, + span: 91..96#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 91, - ), - hi: BytePos( - 96, - ), - ctxt: #0, - }, + span: 91..96#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 91, - ), - hi: BytePos( - 99, - ), - ctxt: #0, - }, + span: 91..99#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 91, - ), - hi: BytePos( - 95, - ), - ctxt: #0, - }, + span: 91..95#0, value: "name", }, }, @@ -199,106 +71,34 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 201, - ), - hi: BytePos( - 201, - ), - ctxt: #0, - }, + span: 201..201#0, description: Text { - span: Span { - lo: BytePos( - 201, - ), - hi: BytePos( - 224, - ), - ctxt: #0, - }, + span: 201..224#0, value: "The name of the person.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 270, - ), - hi: BytePos( - 270, - ), - ctxt: #0, - }, + span: 270..270#0, description: Text { - span: Span { - lo: BytePos( - 270, - ), - hi: BytePos( - 270, - ), - ctxt: #0, - }, + span: 270..270#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 270, - ), - hi: BytePos( - 278, - ), - ctxt: #0, - }, + span: 270..278#0, tag_name: Text { - span: Span { - lo: BytePos( - 270, - ), - hi: BytePos( - 278, - ), - ctxt: #0, - }, + span: 270..278#0, value: "memberof", }, tag: MemberOf( MemberOfTag { - span: Span { - lo: BytePos( - 270, - ), - hi: BytePos( - 278, - ), - ctxt: #0, - }, + span: 270..278#0, parent_name_path: NamePath { - span: Span { - lo: BytePos( - 270, - ), - hi: BytePos( - 308, - ), - ctxt: #0, - }, + span: 270..308#0, components: [ Text { - span: Span { - lo: BytePos( - 270, - ), - hi: BytePos( - 276, - ), - ctxt: #0, - }, + span: 270..276#0, value: "Person", }, ], @@ -307,63 +107,23 @@ ), }, TagItem { - span: Span { - lo: BytePos( - 270, - ), - hi: BytePos( - 275, - ), - ctxt: #0, - }, + span: 270..275#0, tag_name: Text { - span: Span { - lo: BytePos( - 270, - ), - hi: BytePos( - 275, - ), - ctxt: #0, - }, + span: 270..275#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 270, - ), - hi: BytePos( - 275, - ), - ctxt: #0, - }, + span: 270..275#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 270, - ), - hi: BytePos( - 278, - ), - ctxt: #0, - }, + span: 270..278#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 270, - ), - hi: BytePos( - 277, - ), - ctxt: #0, - }, + span: 270..277#0, value: "message", }, }, @@ -372,25 +132,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 378, - ), - hi: BytePos( - 378, - ), - ctxt: #0, - }, + span: 378..378#0, description: Text { - span: Span { - lo: BytePos( - 378, - ), - hi: BytePos( - 399, - ), - ctxt: #0, - }, + span: 378..399#0, value: "The person's message.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/constructstag4.debug b/crates/jsdoc/tests/fixtures/constructstag4.debug index a3ed5625a050..36269d7f2366 100644 --- a/crates/jsdoc/tests/fixtures/constructstag4.debug +++ b/crates/jsdoc/tests/fixtures/constructstag4.debug @@ -1,81 +1,25 @@ [ JsDoc { - span: Span { - lo: BytePos( - 27, - ), - hi: BytePos( - 27, - ), - ctxt: #0, - }, + span: 27..27#0, description: Text { - span: Span { - lo: BytePos( - 27, - ), - hi: BytePos( - 27, - ), - ctxt: #0, - }, + span: 27..27#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 27, - ), - hi: BytePos( - 32, - ), - ctxt: #0, - }, + span: 27..32#0, tag_name: Text { - span: Span { - lo: BytePos( - 27, - ), - hi: BytePos( - 32, - ), - ctxt: #0, - }, + span: 27..32#0, value: "lends", }, tag: Lends( LendsTag { - span: Span { - lo: BytePos( - 27, - ), - hi: BytePos( - 32, - ), - ctxt: #0, - }, + span: 27..32#0, name: NamePath { - span: Span { - lo: BytePos( - 27, - ), - hi: BytePos( - 28, - ), - ctxt: #0, - }, + span: 27..28#0, components: [ Text { - span: Span { - lo: BytePos( - 27, - ), - hi: BytePos( - 33, - ), - ctxt: #0, - }, + span: 27..33#0, value: "Person", }, ], @@ -86,119 +30,39 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 55, - ), - hi: BytePos( - 55, - ), - ctxt: #0, - }, + span: 55..55#0, description: Text { - span: Span { - lo: BytePos( - 55, - ), - hi: BytePos( - 80, - ), - ctxt: #0, - }, + span: 55..80#0, value: "Describe the constructor.", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 55, - ), - hi: BytePos( - 64, - ), - ctxt: #0, - }, + span: 55..64#0, tag_name: Text { - span: Span { - lo: BytePos( - 55, - ), - hi: BytePos( - 64, - ), - ctxt: #0, - }, + span: 55..64#0, value: "classdesc", }, tag: ClassDesc( JSDocClassDescTag { - span: Span { - lo: BytePos( - 55, - ), - hi: BytePos( - 64, - ), - ctxt: #0, - }, + span: 55..64#0, desc: Text { - span: Span { - lo: BytePos( - 55, - ), - hi: BytePos( - 88, - ), - ctxt: #0, - }, + span: 55..88#0, value: "A class that represents a person.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 55, - ), - hi: BytePos( - 65, - ), - ctxt: #0, - }, + span: 55..65#0, tag_name: Text { - span: Span { - lo: BytePos( - 55, - ), - hi: BytePos( - 65, - ), - ctxt: #0, - }, + span: 55..65#0, value: "constructs", }, tag: Constructs( ConstructsTag { - span: Span { - lo: BytePos( - 55, - ), - hi: BytePos( - 65, - ), - ctxt: #0, - }, + span: 55..65#0, name: Text { - span: Span { - lo: BytePos( - 55, - ), - hi: BytePos( - 75, - ), - ctxt: #0, - }, + span: 55..75#0, value: "@param {string} name", }, }, @@ -207,110 +71,38 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 245, - ), - hi: BytePos( - 245, - ), - ctxt: #0, - }, + span: 245..245#0, description: Text { - span: Span { - lo: BytePos( - 245, - ), - hi: BytePos( - 268, - ), - ctxt: #0, - }, + span: 245..268#0, value: "The name of the person.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 314, - ), - hi: BytePos( - 314, - ), - ctxt: #0, - }, + span: 314..314#0, description: Text { - span: Span { - lo: BytePos( - 314, - ), - hi: BytePos( - 314, - ), - ctxt: #0, - }, + span: 314..314#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 314, - ), - hi: BytePos( - 319, - ), - ctxt: #0, - }, + span: 314..319#0, tag_name: Text { - span: Span { - lo: BytePos( - 314, - ), - hi: BytePos( - 319, - ), - ctxt: #0, - }, + span: 314..319#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 314, - ), - hi: BytePos( - 319, - ), - ctxt: #0, - }, + span: 314..319#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 314, - ), - hi: BytePos( - 322, - ), - ctxt: #0, - }, + span: 314..322#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 314, - ), - hi: BytePos( - 321, - ), - ctxt: #0, - }, + span: 314..321#0, value: "message", }, }, @@ -319,25 +111,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 396, - ), - hi: BytePos( - 396, - ), - ctxt: #0, - }, + span: 396..396#0, description: Text { - span: Span { - lo: BytePos( - 396, - ), - hi: BytePos( - 417, - ), - ctxt: #0, - }, + span: 396..417#0, value: "The person's message.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/constructstag5.debug b/crates/jsdoc/tests/fixtures/constructstag5.debug index 6a9628095386..9ecd1158f63c 100644 --- a/crates/jsdoc/tests/fixtures/constructstag5.debug +++ b/crates/jsdoc/tests/fixtures/constructstag5.debug @@ -1,81 +1,25 @@ [ JsDoc { - span: Span { - lo: BytePos( - 37, - ), - hi: BytePos( - 37, - ), - ctxt: #0, - }, + span: 37..37#0, description: Text { - span: Span { - lo: BytePos( - 37, - ), - hi: BytePos( - 37, - ), - ctxt: #0, - }, + span: 37..37#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 37, - ), - hi: BytePos( - 42, - ), - ctxt: #0, - }, + span: 37..42#0, tag_name: Text { - span: Span { - lo: BytePos( - 37, - ), - hi: BytePos( - 42, - ), - ctxt: #0, - }, + span: 37..42#0, value: "lends", }, tag: Lends( LendsTag { - span: Span { - lo: BytePos( - 37, - ), - hi: BytePos( - 42, - ), - ctxt: #0, - }, + span: 37..42#0, name: NamePath { - span: Span { - lo: BytePos( - 37, - ), - hi: BytePos( - 38, - ), - ctxt: #0, - }, + span: 37..38#0, components: [ Text { - span: Span { - lo: BytePos( - 37, - ), - hi: BytePos( - 41, - ), - ctxt: #0, - }, + span: 37..41#0, value: "Duck", }, ], @@ -86,71 +30,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 71, - ), - hi: BytePos( - 71, - ), - ctxt: #0, - }, + span: 71..71#0, description: Text { - span: Span { - lo: BytePos( - 71, - ), - hi: BytePos( - 89, - ), - ctxt: #0, - }, + span: 71..89#0, value: "Constructs a duck.", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 71, - ), - hi: BytePos( - 81, - ), - ctxt: #0, - }, + span: 71..81#0, tag_name: Text { - span: Span { - lo: BytePos( - 71, - ), - hi: BytePos( - 81, - ), - ctxt: #0, - }, + span: 71..81#0, value: "constructs", }, tag: Constructs( ConstructsTag { - span: Span { - lo: BytePos( - 71, - ), - hi: BytePos( - 81, - ), - ctxt: #0, - }, + span: 71..81#0, name: Text { - span: Span { - lo: BytePos( - 71, - ), - hi: BytePos( - 81, - ), - ctxt: #0, - }, + span: 71..81#0, value: "@param tog", }, }, @@ -159,25 +55,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 245, - ), - hi: BytePos( - 245, - ), - ctxt: #0, - }, + span: 245..245#0, description: Text { - span: Span { - lo: BytePos( - 245, - ), - hi: BytePos( - 255, - ), - ctxt: #0, - }, + span: 245..255#0, value: "Say hello.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/copyrighttag.debug b/crates/jsdoc/tests/fixtures/copyrighttag.debug index 08ed0f4482e7..353a45c8f124 100644 --- a/crates/jsdoc/tests/fixtures/copyrighttag.debug +++ b/crates/jsdoc/tests/fixtures/copyrighttag.debug @@ -1,71 +1,23 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 36, - ), - ctxt: #0, - }, + span: 1..36#0, value: "@copyright (c) 2011 Michael Mathews", }, ), diff --git a/crates/jsdoc/tests/fixtures/defaultparams.debug b/crates/jsdoc/tests/fixtures/defaultparams.debug index 65d597370775..ecfd86f9785e 100644 --- a/crates/jsdoc/tests/fixtures/defaultparams.debug +++ b/crates/jsdoc/tests/fixtures/defaultparams.debug @@ -1,85 +1,29 @@ [ JsDoc { - span: Span { - lo: BytePos( - 126, - ), - hi: BytePos( - 126, - ), - ctxt: #0, - }, + span: 126..126#0, description: Text { - span: Span { - lo: BytePos( - 126, - ), - hi: BytePos( - 158, - ), - ctxt: #0, - }, + span: 126..158#0, value: "Set the user's first name.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 126, - ), - hi: BytePos( - 131, - ), - ctxt: #0, - }, + span: 126..131#0, tag_name: Text { - span: Span { - lo: BytePos( - 126, - ), - hi: BytePos( - 131, - ), - ctxt: #0, - }, + span: 126..131#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 126, - ), - hi: BytePos( - 131, - ), - ctxt: #0, - }, + span: 126..131#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 126, - ), - hi: BytePos( - 134, - ), - ctxt: #0, - }, + span: 126..134#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 126, - ), - hi: BytePos( - 160, - ), - ctxt: #0, - }, + span: 126..160#0, value: "firstName - The user's first name.", }, }, @@ -88,86 +32,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 269, - ), - hi: BytePos( - 269, - ), - ctxt: #0, - }, + span: 269..269#0, description: Text { - span: Span { - lo: BytePos( - 269, - ), - hi: BytePos( - 300, - ), - ctxt: #0, - }, + span: 269..300#0, value: "Set the user's last name.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 269, - ), - hi: BytePos( - 274, - ), - ctxt: #0, - }, + span: 269..274#0, tag_name: Text { - span: Span { - lo: BytePos( - 269, - ), - hi: BytePos( - 274, - ), - ctxt: #0, - }, + span: 269..274#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 269, - ), - hi: BytePos( - 274, - ), - ctxt: #0, - }, + span: 269..274#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 269, - ), - hi: BytePos( - 277, - ), - ctxt: #0, - }, + span: 269..277#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 269, - ), - hi: BytePos( - 309, - ), - ctxt: #0, - }, + span: 269..309#0, value: "[lastName=Braun] - The user's last name.", }, }, @@ -176,212 +64,76 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 414, - ), - hi: BytePos( - 414, - ), - ctxt: #0, - }, + span: 414..414#0, description: Text { - span: Span { - lo: BytePos( - 414, - ), - hi: BytePos( - 465, - ), - ctxt: #0, - }, + span: 414..465#0, value: "Set the user's first, middle, and last names.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 414, - ), - hi: BytePos( - 419, - ), - ctxt: #0, - }, + span: 414..419#0, tag_name: Text { - span: Span { - lo: BytePos( - 414, - ), - hi: BytePos( - 419, - ), - ctxt: #0, - }, + span: 414..419#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 414, - ), - hi: BytePos( - 419, - ), - ctxt: #0, - }, + span: 414..419#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 414, - ), - hi: BytePos( - 422, - ), - ctxt: #0, - }, + span: 414..422#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 414, - ), - hi: BytePos( - 448, - ), - ctxt: #0, - }, + span: 414..448#0, value: "firstName - The user's first name.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 414, - ), - hi: BytePos( - 419, - ), - ctxt: #0, - }, + span: 414..419#0, tag_name: Text { - span: Span { - lo: BytePos( - 414, - ), - hi: BytePos( - 419, - ), - ctxt: #0, - }, + span: 414..419#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 414, - ), - hi: BytePos( - 419, - ), - ctxt: #0, - }, + span: 414..419#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 414, - ), - hi: BytePos( - 422, - ), - ctxt: #0, - }, + span: 414..422#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 414, - ), - hi: BytePos( - 450, - ), - ctxt: #0, - }, + span: 414..450#0, value: "middleName - The user's middle name.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 414, - ), - hi: BytePos( - 419, - ), - ctxt: #0, - }, + span: 414..419#0, tag_name: Text { - span: Span { - lo: BytePos( - 414, - ), - hi: BytePos( - 419, - ), - ctxt: #0, - }, + span: 414..419#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 414, - ), - hi: BytePos( - 419, - ), - ctxt: #0, - }, + span: 414..419#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 414, - ), - hi: BytePos( - 422, - ), - ctxt: #0, - }, + span: 414..422#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 414, - ), - hi: BytePos( - 446, - ), - ctxt: #0, - }, + span: 414..446#0, value: "lastName - The user's last name.", }, }, @@ -390,86 +142,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 712, - ), - hi: BytePos( - 712, - ), - ctxt: #0, - }, + span: 712..712#0, description: Text { - span: Span { - lo: BytePos( - 712, - ), - hi: BytePos( - 741, - ), - ctxt: #0, - }, + span: 712..741#0, value: "Set the user's manager.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 712, - ), - hi: BytePos( - 717, - ), - ctxt: #0, - }, + span: 712..717#0, tag_name: Text { - span: Span { - lo: BytePos( - 712, - ), - hi: BytePos( - 717, - ), - ctxt: #0, - }, + span: 712..717#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 712, - ), - hi: BytePos( - 717, - ), - ctxt: #0, - }, + span: 712..717#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 712, - ), - hi: BytePos( - 721, - ), - ctxt: #0, - }, + span: 712..721#0, value: "{Manager}", }, ), desc: Text { - span: Span { - lo: BytePos( - 712, - ), - hi: BytePos( - 734, - ), - ctxt: #0, - }, + span: 712..734#0, value: "manager - The manager.", }, }, @@ -478,86 +174,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 831, - ), - hi: BytePos( - 831, - ), - ctxt: #0, - }, + span: 831..831#0, description: Text { - span: Span { - lo: BytePos( - 831, - ), - hi: BytePos( - 878, - ), - ctxt: #0, - }, + span: 831..878#0, value: "Set whether the user is currently active.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 831, - ), - hi: BytePos( - 836, - ), - ctxt: #0, - }, + span: 831..836#0, tag_name: Text { - span: Span { - lo: BytePos( - 831, - ), - hi: BytePos( - 836, - ), - ctxt: #0, - }, + span: 831..836#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 831, - ), - hi: BytePos( - 836, - ), - ctxt: #0, - }, + span: 831..836#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 831, - ), - hi: BytePos( - 840, - ), - ctxt: #0, - }, + span: 831..840#0, value: "{boolean}", }, ), desc: Text { - span: Span { - lo: BytePos( - 831, - ), - hi: BytePos( - 886, - ), - ctxt: #0, - }, + span: 831..886#0, value: "isActive - Set to `true` if active; otherwise, `false`.", }, }, @@ -566,86 +206,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 1003, - ), - hi: BytePos( - 1003, - ), - ctxt: #0, - }, + span: 1003..1003#0, description: Text { - span: Span { - lo: BytePos( - 1003, - ), - hi: BytePos( - 1050, - ), - ctxt: #0, - }, + span: 1003..1050#0, value: "Set the year in which the employee was born.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1003, - ), - hi: BytePos( - 1008, - ), - ctxt: #0, - }, + span: 1003..1008#0, tag_name: Text { - span: Span { - lo: BytePos( - 1003, - ), - hi: BytePos( - 1008, - ), - ctxt: #0, - }, + span: 1003..1008#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 1003, - ), - hi: BytePos( - 1008, - ), - ctxt: #0, - }, + span: 1003..1008#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 1003, - ), - hi: BytePos( - 1011, - ), - ctxt: #0, - }, + span: 1003..1011#0, value: "{number}", }, ), desc: Text { - span: Span { - lo: BytePos( - 1003, - ), - hi: BytePos( - 1036, - ), - ctxt: #0, - }, + span: 1003..1036#0, value: "year - The four-digit birth year.", }, }, @@ -654,86 +238,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 1151, - ), - hi: BytePos( - 1151, - ), - ctxt: #0, - }, + span: 1151..1151#0, description: Text { - span: Span { - lo: BytePos( - 1151, - ), - hi: BytePos( - 1229, - ), - ctxt: #0, - }, + span: 1151..1229#0, value: "Set the name of the user's dog. At this time, only one dog is supported.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1151, - ), - hi: BytePos( - 1156, - ), - ctxt: #0, - }, + span: 1151..1156#0, tag_name: Text { - span: Span { - lo: BytePos( - 1151, - ), - hi: BytePos( - 1156, - ), - ctxt: #0, - }, + span: 1151..1156#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 1151, - ), - hi: BytePos( - 1156, - ), - ctxt: #0, - }, + span: 1151..1156#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 1151, - ), - hi: BytePos( - 1159, - ), - ctxt: #0, - }, + span: 1151..1159#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 1151, - ), - hi: BytePos( - 1188, - ), - ctxt: #0, - }, + span: 1151..1188#0, value: "dogName - The name of the user's dog.", }, }, @@ -742,86 +270,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 1333, - ), - hi: BytePos( - 1333, - ), - ctxt: #0, - }, + span: 1333..1333#0, description: Text { - span: Span { - lo: BytePos( - 1333, - ), - hi: BytePos( - 1378, - ), - ctxt: #0, - }, + span: 1333..1378#0, value: "Set the user's favorite pizza toppings.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1333, - ), - hi: BytePos( - 1338, - ), - ctxt: #0, - }, + span: 1333..1338#0, tag_name: Text { - span: Span { - lo: BytePos( - 1333, - ), - hi: BytePos( - 1338, - ), - ctxt: #0, - }, + span: 1333..1338#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 1333, - ), - hi: BytePos( - 1338, - ), - ctxt: #0, - }, + span: 1333..1338#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 1333, - ), - hi: BytePos( - 1348, - ), - ctxt: #0, - }, + span: 1333..1348#0, value: "{PizzaToppings}", }, ), desc: Text { - span: Span { - lo: BytePos( - 1333, - ), - hi: BytePos( - 1373, - ), - ctxt: #0, - }, + span: 1333..1373#0, value: "toppings - The user's favorite toppings.", }, }, @@ -830,86 +302,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 1519, - ), - hi: BytePos( - 1519, - ), - ctxt: #0, - }, + span: 1519..1519#0, description: Text { - span: Span { - lo: BytePos( - 1519, - ), - hi: BytePos( - 1557, - ), - ctxt: #0, - }, + span: 1519..1557#0, value: "Set whether the user is a ninja.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1519, - ), - hi: BytePos( - 1524, - ), - ctxt: #0, - }, + span: 1519..1524#0, tag_name: Text { - span: Span { - lo: BytePos( - 1519, - ), - hi: BytePos( - 1524, - ), - ctxt: #0, - }, + span: 1519..1524#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 1519, - ), - hi: BytePos( - 1524, - ), - ctxt: #0, - }, + span: 1519..1524#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 1519, - ), - hi: BytePos( - 1528, - ), - ctxt: #0, - }, + span: 1519..1528#0, value: "{boolean}", }, ), desc: Text { - span: Span { - lo: BytePos( - 1519, - ), - hi: BytePos( - 1586, - ), - ctxt: #0, - }, + span: 1519..1586#0, value: "isNinja - Set to `true` if the user is a ninja; otherwise, `false`.", }, }, diff --git a/crates/jsdoc/tests/fixtures/defaultparams2.debug b/crates/jsdoc/tests/fixtures/defaultparams2.debug index 79df674bd70f..0fb3c57b009b 100644 --- a/crates/jsdoc/tests/fixtures/defaultparams2.debug +++ b/crates/jsdoc/tests/fixtures/defaultparams2.debug @@ -1,109 +1,37 @@ [ JsDoc { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 16..16#0, description: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 50, - ), - ctxt: #0, - }, + span: 16..50#0, value: "Class representing pizza toppings.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 84, - ), - hi: BytePos( - 84, - ), - ctxt: #0, - }, + span: 84..84#0, description: Text { - span: Span { - lo: BytePos( - 84, - ), - hi: BytePos( - 147, - ), - ctxt: #0, - }, + span: 84..147#0, value: "Set whether sardines are included in the pizza toppings.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 84, - ), - hi: BytePos( - 89, - ), - ctxt: #0, - }, + span: 84..89#0, tag_name: Text { - span: Span { - lo: BytePos( - 84, - ), - hi: BytePos( - 89, - ), - ctxt: #0, - }, + span: 84..89#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 84, - ), - hi: BytePos( - 89, - ), - ctxt: #0, - }, + span: 84..89#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 84, - ), - hi: BytePos( - 93, - ), - ctxt: #0, - }, + span: 84..93#0, value: "{boolean}", }, ), desc: Text { - span: Span { - lo: BytePos( - 84, - ), - hi: BytePos( - 140, - ), - ctxt: #0, - }, + span: 84..140#0, value: "[bool] `true` to include sardines, `false` to omit them.", }, }, diff --git a/crates/jsdoc/tests/fixtures/defaulttag.debug b/crates/jsdoc/tests/fixtures/defaulttag.debug index a1fae1b2dfa7..ec9ead8d2ab0 100644 --- a/crates/jsdoc/tests/fixtures/defaulttag.debug +++ b/crates/jsdoc/tests/fixtures/defaulttag.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, value: "default", }, tag: Default( DefaultTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, value: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -73,71 +25,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 43, - ), - ctxt: #0, - }, + span: 43..43#0, description: Text { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 43, - ), - ctxt: #0, - }, + span: 43..43#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 50, - ), - ctxt: #0, - }, + span: 43..50#0, tag_name: Text { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 50, - ), - ctxt: #0, - }, + span: 43..50#0, value: "default", }, tag: Default( DefaultTag { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 50, - ), - ctxt: #0, - }, + span: 43..50#0, value: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -146,71 +50,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 86, - ), - hi: BytePos( - 86, - ), - ctxt: #0, - }, + span: 86..86#0, description: Text { - span: Span { - lo: BytePos( - 86, - ), - hi: BytePos( - 86, - ), - ctxt: #0, - }, + span: 86..86#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 86, - ), - hi: BytePos( - 93, - ), - ctxt: #0, - }, + span: 86..93#0, tag_name: Text { - span: Span { - lo: BytePos( - 86, - ), - hi: BytePos( - 93, - ), - ctxt: #0, - }, + span: 86..93#0, value: "default", }, tag: Default( DefaultTag { - span: Span { - lo: BytePos( - 86, - ), - hi: BytePos( - 93, - ), - ctxt: #0, - }, + span: 86..93#0, value: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -219,71 +75,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 125, - ), - hi: BytePos( - 125, - ), - ctxt: #0, - }, + span: 125..125#0, description: Text { - span: Span { - lo: BytePos( - 125, - ), - hi: BytePos( - 125, - ), - ctxt: #0, - }, + span: 125..125#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 125, - ), - hi: BytePos( - 132, - ), - ctxt: #0, - }, + span: 125..132#0, tag_name: Text { - span: Span { - lo: BytePos( - 125, - ), - hi: BytePos( - 132, - ), - ctxt: #0, - }, + span: 125..132#0, value: "default", }, tag: Default( DefaultTag { - span: Span { - lo: BytePos( - 125, - ), - hi: BytePos( - 132, - ), - ctxt: #0, - }, + span: 125..132#0, value: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -292,71 +100,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 166, - ), - hi: BytePos( - 166, - ), - ctxt: #0, - }, + span: 166..166#0, description: Text { - span: Span { - lo: BytePos( - 166, - ), - hi: BytePos( - 166, - ), - ctxt: #0, - }, + span: 166..166#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 166, - ), - hi: BytePos( - 173, - ), - ctxt: #0, - }, + span: 166..173#0, tag_name: Text { - span: Span { - lo: BytePos( - 166, - ), - hi: BytePos( - 173, - ), - ctxt: #0, - }, + span: 166..173#0, value: "default", }, tag: Default( DefaultTag { - span: Span { - lo: BytePos( - 166, - ), - hi: BytePos( - 173, - ), - ctxt: #0, - }, + span: 166..173#0, value: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -365,71 +125,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 210, - ), - hi: BytePos( - 210, - ), - ctxt: #0, - }, + span: 210..210#0, description: Text { - span: Span { - lo: BytePos( - 210, - ), - hi: BytePos( - 210, - ), - ctxt: #0, - }, + span: 210..210#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 210, - ), - hi: BytePos( - 217, - ), - ctxt: #0, - }, + span: 210..217#0, tag_name: Text { - span: Span { - lo: BytePos( - 210, - ), - hi: BytePos( - 217, - ), - ctxt: #0, - }, + span: 210..217#0, value: "default", }, tag: Default( DefaultTag { - span: Span { - lo: BytePos( - 210, - ), - hi: BytePos( - 217, - ), - ctxt: #0, - }, + span: 210..217#0, value: Text { - span: Span { - lo: BytePos( - 210, - ), - hi: BytePos( - 227, - ), - ctxt: #0, - }, + span: 210..227#0, value: "the parent window", }, }, @@ -438,71 +150,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 279, - ), - hi: BytePos( - 279, - ), - ctxt: #0, - }, + span: 279..279#0, description: Text { - span: Span { - lo: BytePos( - 279, - ), - hi: BytePos( - 279, - ), - ctxt: #0, - }, + span: 279..279#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 279, - ), - hi: BytePos( - 286, - ), - ctxt: #0, - }, + span: 279..286#0, tag_name: Text { - span: Span { - lo: BytePos( - 279, - ), - hi: BytePos( - 286, - ), - ctxt: #0, - }, + span: 279..286#0, value: "default", }, tag: Default( DefaultTag { - span: Span { - lo: BytePos( - 279, - ), - hi: BytePos( - 286, - ), - ctxt: #0, - }, + span: 279..286#0, value: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -511,71 +175,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 335, - ), - hi: BytePos( - 335, - ), - ctxt: #0, - }, + span: 335..335#0, description: Text { - span: Span { - lo: BytePos( - 335, - ), - hi: BytePos( - 335, - ), - ctxt: #0, - }, + span: 335..335#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 335, - ), - hi: BytePos( - 342, - ), - ctxt: #0, - }, + span: 335..342#0, tag_name: Text { - span: Span { - lo: BytePos( - 335, - ), - hi: BytePos( - 342, - ), - ctxt: #0, - }, + span: 335..342#0, value: "default", }, tag: Default( DefaultTag { - span: Span { - lo: BytePos( - 335, - ), - hi: BytePos( - 342, - ), - ctxt: #0, - }, + span: 335..342#0, value: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -584,71 +200,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 408, - ), - hi: BytePos( - 408, - ), - ctxt: #0, - }, + span: 408..408#0, description: Text { - span: Span { - lo: BytePos( - 408, - ), - hi: BytePos( - 408, - ), - ctxt: #0, - }, + span: 408..408#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 408, - ), - hi: BytePos( - 415, - ), - ctxt: #0, - }, + span: 408..415#0, tag_name: Text { - span: Span { - lo: BytePos( - 408, - ), - hi: BytePos( - 415, - ), - ctxt: #0, - }, + span: 408..415#0, value: "default", }, tag: Default( DefaultTag { - span: Span { - lo: BytePos( - 408, - ), - hi: BytePos( - 415, - ), - ctxt: #0, - }, + span: 408..415#0, value: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -657,71 +225,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 509, - ), - hi: BytePos( - 509, - ), - ctxt: #0, - }, + span: 509..509#0, description: Text { - span: Span { - lo: BytePos( - 509, - ), - hi: BytePos( - 509, - ), - ctxt: #0, - }, + span: 509..509#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 509, - ), - hi: BytePos( - 516, - ), - ctxt: #0, - }, + span: 509..516#0, tag_name: Text { - span: Span { - lo: BytePos( - 509, - ), - hi: BytePos( - 516, - ), - ctxt: #0, - }, + span: 509..516#0, value: "default", }, tag: Default( DefaultTag { - span: Span { - lo: BytePos( - 509, - ), - hi: BytePos( - 516, - ), - ctxt: #0, - }, + span: 509..516#0, value: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -730,71 +250,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 555, - ), - hi: BytePos( - 555, - ), - ctxt: #0, - }, + span: 555..555#0, description: Text { - span: Span { - lo: BytePos( - 555, - ), - hi: BytePos( - 555, - ), - ctxt: #0, - }, + span: 555..555#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 555, - ), - hi: BytePos( - 562, - ), - ctxt: #0, - }, + span: 555..562#0, tag_name: Text { - span: Span { - lo: BytePos( - 555, - ), - hi: BytePos( - 562, - ), - ctxt: #0, - }, + span: 555..562#0, value: "default", }, tag: Default( DefaultTag { - span: Span { - lo: BytePos( - 555, - ), - hi: BytePos( - 562, - ), - ctxt: #0, - }, + span: 555..562#0, value: Text { - span: Span { - lo: BytePos( - 555, - ), - hi: BytePos( - 571, - ), - ctxt: #0, - }, + span: 555..571#0, value: "* @type {string}", }, }, diff --git a/crates/jsdoc/tests/fixtures/definetag.debug b/crates/jsdoc/tests/fixtures/definetag.debug index f57f368b5742..d1f3d5910984 100644 --- a/crates/jsdoc/tests/fixtures/definetag.debug +++ b/crates/jsdoc/tests/fixtures/definetag.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 45, - ), - ctxt: #0, - }, + span: 1..45#0, value: "Controls whether debugging is enabled.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "define", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, extras: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 47, - ), - ctxt: #0, - }, + span: 1..47#0, value: "{boolean} `true` if enabled, `false` otherwise", }, }, diff --git a/crates/jsdoc/tests/fixtures/deprecatedtag.debug b/crates/jsdoc/tests/fixtures/deprecatedtag.debug index 5061da0814f4..3cf59c5357c3 100644 --- a/crates/jsdoc/tests/fixtures/deprecatedtag.debug +++ b/crates/jsdoc/tests/fixtures/deprecatedtag.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 11, - ), - ctxt: #0, - }, + span: 1..11#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 11, - ), - ctxt: #0, - }, + span: 1..11#0, value: "deprecated", }, tag: Deprecated( DeprecatedTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 11, - ), - ctxt: #0, - }, + span: 1..11#0, text: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -73,71 +25,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 41, - ), - hi: BytePos( - 41, - ), - ctxt: #0, - }, + span: 41..41#0, description: Text { - span: Span { - lo: BytePos( - 41, - ), - hi: BytePos( - 41, - ), - ctxt: #0, - }, + span: 41..41#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 41, - ), - hi: BytePos( - 51, - ), - ctxt: #0, - }, + span: 41..51#0, tag_name: Text { - span: Span { - lo: BytePos( - 41, - ), - hi: BytePos( - 51, - ), - ctxt: #0, - }, + span: 41..51#0, value: "deprecated", }, tag: Deprecated( DeprecatedTag { - span: Span { - lo: BytePos( - 41, - ), - hi: BytePos( - 51, - ), - ctxt: #0, - }, + span: 41..51#0, text: Text { - span: Span { - lo: BytePos( - 41, - ), - hi: BytePos( - 58, - ), - ctxt: #0, - }, + span: 41..58#0, value: "since version 2.0", }, }, diff --git a/crates/jsdoc/tests/fixtures/descriptiontag.debug b/crates/jsdoc/tests/fixtures/descriptiontag.debug index f8b8f218086b..2a60331331bc 100644 --- a/crates/jsdoc/tests/fixtures/descriptiontag.debug +++ b/crates/jsdoc/tests/fixtures/descriptiontag.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 18, - ), - ctxt: #0, - }, + span: 1..18#0, value: "Blah Blah Blah\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, value: "desc", }, tag: Description( DescriptionTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, text: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 15, - ), - ctxt: #0, - }, + span: 1..15#0, value: "halb halb halb", }, }, @@ -73,71 +25,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 56, - ), - hi: BytePos( - 64, - ), - ctxt: #0, - }, + span: 56..64#0, description: Text { - span: Span { - lo: BytePos( - 56, - ), - hi: BytePos( - 56, - ), - ctxt: #0, - }, + span: 56..56#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 56, - ), - hi: BytePos( - 67, - ), - ctxt: #0, - }, + span: 56..67#0, tag_name: Text { - span: Span { - lo: BytePos( - 56, - ), - hi: BytePos( - 67, - ), - ctxt: #0, - }, + span: 56..67#0, value: "description", }, tag: Description( DescriptionTag { - span: Span { - lo: BytePos( - 56, - ), - hi: BytePos( - 67, - ), - ctxt: #0, - }, + span: 56..67#0, text: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, diff --git a/crates/jsdoc/tests/fixtures/destructuring.debug b/crates/jsdoc/tests/fixtures/destructuring.debug index 1481e90a14f8..7dfcfc4afb8a 100644 --- a/crates/jsdoc/tests/fixtures/destructuring.debug +++ b/crates/jsdoc/tests/fixtures/destructuring.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 14, - ), - ctxt: #0, - }, + span: 1..14#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 46, - ), - ctxt: #0, - }, + span: 1..46#0, value: "A builder function for the Stick application;", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 4, - ), - ctxt: #0, - }, + span: 1..4#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 4, - ), - ctxt: #0, - }, + span: 1..4#0, value: "var", }, tag: Member( MemberTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 4, - ), - ctxt: #0, - }, + span: 1..4#0, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "function", }, }, diff --git a/crates/jsdoc/tests/fixtures/dicttag.debug b/crates/jsdoc/tests/fixtures/dicttag.debug index 8fd92f0e6f33..9f3f60022287 100644 --- a/crates/jsdoc/tests/fixtures/dicttag.debug +++ b/crates/jsdoc/tests/fixtures/dicttag.debug @@ -1,71 +1,23 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, value: "* @dict", }, ), diff --git a/crates/jsdoc/tests/fixtures/doclet.debug b/crates/jsdoc/tests/fixtures/doclet.debug index 4a3238c3e197..8e6df611acbe 100644 --- a/crates/jsdoc/tests/fixtures/doclet.debug +++ b/crates/jsdoc/tests/fixtures/doclet.debug @@ -1,85 +1,29 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 133, - ), - ctxt: #0, - }, + span: 1..133#0, value: "Markdown asterisks in a doclet that does not use leading asterisks.\n **Strong** is strong.\n\n * List item 1.\n * List item 2.", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 21, - ), - ctxt: #0, - }, + span: 1..21#0, value: "thingy - The thingy.", }, }, @@ -88,86 +32,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 216, - ), - hi: BytePos( - 216, - ), - ctxt: #0, - }, + span: 216..216#0, description: Text { - span: Span { - lo: BytePos( - 216, - ), - hi: BytePos( - 342, - ), - ctxt: #0, - }, + span: 216..342#0, value: "Markdown asterisks in a doclet that uses leading asterisks.\n * **Strong** is strong.\n *\n * * List item 1.\n * * List item 2.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 216, - ), - hi: BytePos( - 221, - ), - ctxt: #0, - }, + span: 216..221#0, tag_name: Text { - span: Span { - lo: BytePos( - 216, - ), - hi: BytePos( - 221, - ), - ctxt: #0, - }, + span: 216..221#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 216, - ), - hi: BytePos( - 221, - ), - ctxt: #0, - }, + span: 216..221#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 216, - ), - hi: BytePos( - 224, - ), - ctxt: #0, - }, + span: 216..224#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 216, - ), - hi: BytePos( - 236, - ), - ctxt: #0, - }, + span: 216..236#0, value: "thingy - The thingy.", }, }, diff --git a/crates/jsdoc/tests/fixtures/emptycomments.debug b/crates/jsdoc/tests/fixtures/emptycomments.debug index ff9e22132f0f..706bf4d1b622 100644 --- a/crates/jsdoc/tests/fixtures/emptycomments.debug +++ b/crates/jsdoc/tests/fixtures/emptycomments.debug @@ -1,144 +1,48 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 29, - ), - ctxt: #0, - }, + span: 29..29#0, description: Text { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 29, - ), - ctxt: #0, - }, + span: 29..29#0, value: "", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 127, - ), - hi: BytePos( - 127, - ), - ctxt: #0, - }, + span: 127..127#0, description: Text { - span: Span { - lo: BytePos( - 127, - ), - hi: BytePos( - 129, - ), - ctxt: #0, - }, + span: 127..129#0, value: "\t ", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 228, - ), - ctxt: #0, - }, + span: 228..228#0, description: Text { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 232, - ), - ctxt: #0, - }, + span: 228..232#0, value: "\t\t\t ", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 321, - ), - hi: BytePos( - 321, - ), - ctxt: #0, - }, + span: 321..321#0, description: Text { - span: Span { - lo: BytePos( - 321, - ), - hi: BytePos( - 321, - ), - ctxt: #0, - }, + span: 321..321#0, value: "", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 416, - ), - hi: BytePos( - 416, - ), - ctxt: #0, - }, + span: 416..416#0, description: Text { - span: Span { - lo: BytePos( - 416, - ), - hi: BytePos( - 416, - ), - ctxt: #0, - }, + span: 416..416#0, value: "", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/enumtag.debug b/crates/jsdoc/tests/fixtures/enumtag.debug index d73f1764a1af..1f7ecaba85f3 100644 --- a/crates/jsdoc/tests/fixtures/enumtag.debug +++ b/crates/jsdoc/tests/fixtures/enumtag.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 30, - ), - ctxt: #0, - }, + span: 1..30#0, value: "Enum for tri-state values.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, value: "enum", }, tag: Enum( EnumTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "{number}", }, }, @@ -73,95 +25,31 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 78, - ), - hi: BytePos( - 78, - ), - ctxt: #0, - }, + span: 78..78#0, description: Text { - span: Span { - lo: BytePos( - 78, - ), - hi: BytePos( - 82, - ), - ctxt: #0, - }, + span: 78..82#0, value: "true", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 122, - ), - hi: BytePos( - 132, - ), - ctxt: #0, - }, + span: 122..132#0, description: Text { - span: Span { - lo: BytePos( - 122, - ), - hi: BytePos( - 122, - ), - ctxt: #0, - }, + span: 122..122#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 122, - ), - hi: BytePos( - 126, - ), - ctxt: #0, - }, + span: 122..126#0, tag_name: Text { - span: Span { - lo: BytePos( - 122, - ), - hi: BytePos( - 126, - ), - ctxt: #0, - }, + span: 122..126#0, value: "type", }, tag: Type( TypeTag { - span: Span { - lo: BytePos( - 122, - ), - hi: BytePos( - 126, - ), - ctxt: #0, - }, + span: 122..126#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -170,71 +58,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 165, - ), - hi: BytePos( - 165, - ), - ctxt: #0, - }, + span: 165..165#0, description: Text { - span: Span { - lo: BytePos( - 165, - ), - hi: BytePos( - 203, - ), - ctxt: #0, - }, + span: 165..203#0, value: "Numeric enum for true/false values.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 165, - ), - hi: BytePos( - 169, - ), - ctxt: #0, - }, + span: 165..169#0, tag_name: Text { - span: Span { - lo: BytePos( - 165, - ), - hi: BytePos( - 169, - ), - ctxt: #0, - }, + span: 165..169#0, value: "enum", }, tag: Enum( EnumTag { - span: Span { - lo: BytePos( - 165, - ), - hi: BytePos( - 169, - ), - ctxt: #0, - }, + span: 165..169#0, ty: Text { - span: Span { - lo: BytePos( - 165, - ), - hi: BytePos( - 174, - ), - ctxt: #0, - }, + span: 165..174#0, value: "{boolean}", }, }, @@ -243,25 +83,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 260, - ), - hi: BytePos( - 260, - ), - ctxt: #0, - }, + span: 260..260#0, description: Text { - span: Span { - lo: BytePos( - 260, - ), - hi: BytePos( - 265, - ), - ctxt: #0, - }, + span: 260..265#0, value: "false", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/enumtag2.debug b/crates/jsdoc/tests/fixtures/enumtag2.debug index 71fc56d92115..2b5acbfd4e6c 100644 --- a/crates/jsdoc/tests/fixtures/enumtag2.debug +++ b/crates/jsdoc/tests/fixtures/enumtag2.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 3, - ), - ctxt: #0, - }, + span: 1..3#0, value: "my", }, }, @@ -85,130 +29,42 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 36, - ), - ctxt: #0, - }, + span: 26..36#0, description: Text { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 56, - ), - ctxt: #0, - }, + span: 26..56#0, value: "Enum for quad-state values.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 30, - ), - ctxt: #0, - }, + span: 26..30#0, tag_name: Text { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 30, - ), - ctxt: #0, - }, + span: 26..30#0, value: "enum", }, tag: Enum( EnumTag { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 30, - ), - ctxt: #0, - }, + span: 26..30#0, ty: Text { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 34, - ), - ctxt: #0, - }, + span: 26..34#0, value: "{number}", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 34, - ), - ctxt: #0, - }, + span: 26..34#0, tag_name: Text { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 34, - ), - ctxt: #0, - }, + span: 26..34#0, value: "memberof", }, tag: MemberOf( MemberOfTag { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 34, - ), - ctxt: #0, - }, + span: 26..34#0, parent_name_path: NamePath { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 36, - ), - ctxt: #0, - }, + span: 26..36#0, components: [ Text { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 32, - ), - ctxt: #0, - }, + span: 26..32#0, value: "module", }, ], @@ -219,95 +75,31 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 154, - ), - hi: BytePos( - 154, - ), - ctxt: #0, - }, + span: 154..154#0, description: Text { - span: Span { - lo: BytePos( - 154, - ), - hi: BytePos( - 158, - ), - ctxt: #0, - }, + span: 154..158#0, value: "true", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 229, - ), - hi: BytePos( - 229, - ), - ctxt: #0, - }, + span: 229..229#0, description: Text { - span: Span { - lo: BytePos( - 229, - ), - hi: BytePos( - 260, - ), - ctxt: #0, - }, + span: 229..260#0, value: "Enum for penta-state values.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 229, - ), - hi: BytePos( - 233, - ), - ctxt: #0, - }, + span: 229..233#0, tag_name: Text { - span: Span { - lo: BytePos( - 229, - ), - hi: BytePos( - 233, - ), - ctxt: #0, - }, + span: 229..233#0, value: "enum", }, tag: Enum( EnumTag { - span: Span { - lo: BytePos( - 229, - ), - hi: BytePos( - 233, - ), - ctxt: #0, - }, + span: 229..233#0, ty: Text { - span: Span { - lo: BytePos( - 229, - ), - hi: BytePos( - 237, - ), - ctxt: #0, - }, + span: 229..237#0, value: "{number}", }, }, @@ -316,71 +108,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 308, - ), - hi: BytePos( - 308, - ), - ctxt: #0, - }, + span: 308..308#0, description: Text { - span: Span { - lo: BytePos( - 308, - ), - hi: BytePos( - 353, - ), - ctxt: #0, - }, + span: 308..353#0, value: "Enum for penta-state values, BUT SHOUTIER.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 308, - ), - hi: BytePos( - 312, - ), - ctxt: #0, - }, + span: 308..312#0, tag_name: Text { - span: Span { - lo: BytePos( - 308, - ), - hi: BytePos( - 312, - ), - ctxt: #0, - }, + span: 308..312#0, value: "enum", }, tag: Enum( EnumTag { - span: Span { - lo: BytePos( - 308, - ), - hi: BytePos( - 312, - ), - ctxt: #0, - }, + span: 308..312#0, ty: Text { - span: Span { - lo: BytePos( - 308, - ), - hi: BytePos( - 316, - ), - ctxt: #0, - }, + span: 308..316#0, value: "{number}", }, }, @@ -389,25 +133,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 407, - ), - hi: BytePos( - 407, - ), - ctxt: #0, - }, + span: 407..407#0, description: Text { - span: Span { - lo: BytePos( - 407, - ), - hi: BytePos( - 411, - ), - ctxt: #0, - }, + span: 407..411#0, value: "true", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/enumtag3.debug b/crates/jsdoc/tests/fixtures/enumtag3.debug index f808eb95a0be..2db761a29031 100644 --- a/crates/jsdoc/tests/fixtures/enumtag3.debug +++ b/crates/jsdoc/tests/fixtures/enumtag3.debug @@ -1,118 +1,38 @@ [ JsDoc { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 26, - ), - ctxt: #0, - }, + span: 26..26#0, description: Text { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 26, - ), - ctxt: #0, - }, + span: 26..26#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 33, - ), - ctxt: #0, - }, + span: 26..33#0, tag_name: Text { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 33, - ), - ctxt: #0, - }, + span: 26..33#0, value: "exports", }, tag: Exports( ExportsTag { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 33, - ), - ctxt: #0, - }, + span: 26..33#0, module_name: Text { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 34, - ), - ctxt: #0, - }, + span: 26..34#0, value: "mymodule", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 30, - ), - ctxt: #0, - }, + span: 26..30#0, tag_name: Text { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 30, - ), - ctxt: #0, - }, + span: 26..30#0, value: "enum", }, tag: Enum( EnumTag { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 30, - ), - ctxt: #0, - }, + span: 26..30#0, ty: Text { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 34, - ), - ctxt: #0, - }, + span: 26..34#0, value: "{string}", }, }, diff --git a/crates/jsdoc/tests/fixtures/eventfirestag.debug b/crates/jsdoc/tests/fixtures/eventfirestag.debug index 5226ac66d5aa..2169d3839ae6 100644 --- a/crates/jsdoc/tests/fixtures/eventfirestag.debug +++ b/crates/jsdoc/tests/fixtures/eventfirestag.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, ty: None, name: None, }, @@ -63,119 +23,39 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 48, - ), - hi: BytePos( - 48, - ), - ctxt: #0, - }, + span: 48..48#0, description: Text { - span: Span { - lo: BytePos( - 48, - ), - hi: BytePos( - 71, - ), - ctxt: #0, - }, + span: 48..71#0, value: "Throw a snowball.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 48, - ), - hi: BytePos( - 53, - ), - ctxt: #0, - }, + span: 48..53#0, tag_name: Text { - span: Span { - lo: BytePos( - 48, - ), - hi: BytePos( - 53, - ), - ctxt: #0, - }, + span: 48..53#0, value: "fires", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 48, - ), - hi: BytePos( - 53, - ), - ctxt: #0, - }, + span: 48..53#0, extras: Text { - span: Span { - lo: BytePos( - 48, - ), - hi: BytePos( - 61, - ), - ctxt: #0, - }, + span: 48..61#0, value: "Hurl#snowball", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 48, - ), - hi: BytePos( - 53, - ), - ctxt: #0, - }, + span: 48..53#0, tag_name: Text { - span: Span { - lo: BytePos( - 48, - ), - hi: BytePos( - 53, - ), - ctxt: #0, - }, + span: 48..53#0, value: "fires", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 48, - ), - hi: BytePos( - 53, - ), - ctxt: #0, - }, + span: 48..53#0, extras: Text { - span: Span { - lo: BytePos( - 48, - ), - hi: BytePos( - 64, - ), - ctxt: #0, - }, + span: 48..64#0, value: "Hurl#event:brick", }, }, @@ -184,71 +64,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 175, - ), - hi: BytePos( - 175, - ), - ctxt: #0, - }, + span: 175..175#0, description: Text { - span: Span { - lo: BytePos( - 175, - ), - hi: BytePos( - 175, - ), - ctxt: #0, - }, + span: 175..175#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 175, - ), - hi: BytePos( - 180, - ), - ctxt: #0, - }, + span: 175..180#0, tag_name: Text { - span: Span { - lo: BytePos( - 175, - ), - hi: BytePos( - 180, - ), - ctxt: #0, - }, + span: 175..180#0, value: "event", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 175, - ), - hi: BytePos( - 180, - ), - ctxt: #0, - }, + span: 175..180#0, extras: Text { - span: Span { - lo: BytePos( - 175, - ), - hi: BytePos( - 188, - ), - ctxt: #0, - }, + span: 175..188#0, value: "Hurl#snowball", }, }, @@ -257,71 +89,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 250, - ), - hi: BytePos( - 250, - ), - ctxt: #0, - }, + span: 250..250#0, description: Text { - span: Span { - lo: BytePos( - 250, - ), - hi: BytePos( - 279, - ), - ctxt: #0, - }, + span: 250..279#0, value: "Throw a football match.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 250, - ), - hi: BytePos( - 255, - ), - ctxt: #0, - }, + span: 250..255#0, tag_name: Text { - span: Span { - lo: BytePos( - 250, - ), - hi: BytePos( - 255, - ), - ctxt: #0, - }, + span: 250..255#0, value: "emits", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 250, - ), - hi: BytePos( - 255, - ), - ctxt: #0, - }, + span: 250..255#0, extras: Text { - span: Span { - lo: BytePos( - 250, - ), - hi: BytePos( - 268, - ), - ctxt: #0, - }, + span: 250..268#0, value: "Hurl#footballMatch", }, }, @@ -330,71 +114,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 366, - ), - hi: BytePos( - 366, - ), - ctxt: #0, - }, + span: 366..366#0, description: Text { - span: Span { - lo: BytePos( - 366, - ), - hi: BytePos( - 366, - ), - ctxt: #0, - }, + span: 366..366#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 366, - ), - hi: BytePos( - 371, - ), - ctxt: #0, - }, + span: 366..371#0, tag_name: Text { - span: Span { - lo: BytePos( - 366, - ), - hi: BytePos( - 371, - ), - ctxt: #0, - }, + span: 366..371#0, value: "event", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 366, - ), - hi: BytePos( - 371, - ), - ctxt: #0, - }, + span: 366..371#0, extras: Text { - span: Span { - lo: BytePos( - 366, - ), - hi: BytePos( - 384, - ), - ctxt: #0, - }, + span: 366..384#0, value: "Hurl#footballMatch", }, }, diff --git a/crates/jsdoc/tests/fixtures/eventorder.debug b/crates/jsdoc/tests/fixtures/eventorder.debug index ad551f9f579a..cda7d371ffac 100644 --- a/crates/jsdoc/tests/fixtures/eventorder.debug +++ b/crates/jsdoc/tests/fixtures/eventorder.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 44, - ), - hi: BytePos( - 44, - ), - ctxt: #0, - }, + span: 44..44#0, description: Text { - span: Span { - lo: BytePos( - 44, - ), - hi: BytePos( - 60, - ), - ctxt: #0, - }, + span: 44..60#0, value: "Socket class.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 44, - ), - hi: BytePos( - 49, - ), - ctxt: #0, - }, + span: 44..49#0, tag_name: Text { - span: Span { - lo: BytePos( - 44, - ), - hi: BytePos( - 49, - ), - ctxt: #0, - }, + span: 44..49#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 44, - ), - hi: BytePos( - 49, - ), - ctxt: #0, - }, + span: 44..49#0, ty: None, name: None, }, @@ -63,148 +23,52 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 113, - ), - hi: BytePos( - 113, - ), - ctxt: #0, - }, + span: 113..113#0, description: Text { - span: Span { - lo: BytePos( - 113, - ), - hi: BytePos( - 130, - ), - ctxt: #0, - }, + span: 113..130#0, value: "Send a packet.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 113, - ), - hi: BytePos( - 118, - ), - ctxt: #0, - }, + span: 113..118#0, tag_name: Text { - span: Span { - lo: BytePos( - 113, - ), - hi: BytePos( - 118, - ), - ctxt: #0, - }, + span: 113..118#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 113, - ), - hi: BytePos( - 118, - ), - ctxt: #0, - }, + span: 113..118#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 113, - ), - hi: BytePos( - 121, - ), - ctxt: #0, - }, + span: 113..121#0, value: "{Packet}", }, ), desc: Text { - span: Span { - lo: BytePos( - 113, - ), - hi: BytePos( - 141, - ), - ctxt: #0, - }, + span: 113..141#0, value: "packet - The packet to send.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 113, - ), - hi: BytePos( - 119, - ), - ctxt: #0, - }, + span: 113..119#0, tag_name: Text { - span: Span { - lo: BytePos( - 113, - ), - hi: BytePos( - 119, - ), - ctxt: #0, - }, + span: 113..119#0, value: "return", }, tag: Return( ReturnTag { - span: Span { - lo: BytePos( - 113, - ), - hi: BytePos( - 119, - ), - ctxt: #0, - }, + span: 113..119#0, ty: Some( Text { - span: Span { - lo: BytePos( - 113, - ), - hi: BytePos( - 122, - ), - ctxt: #0, - }, + span: 113..122#0, value: "{boolean}", }, ), description: Text { - span: Span { - lo: BytePos( - 113, - ), - hi: BytePos( - 151, - ), - ctxt: #0, - }, + span: 113..151#0, value: "`true` on success, `false` on failure.", }, }, @@ -213,72 +77,24 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 305, - ), - hi: BytePos( - 305, - ), - ctxt: #0, - }, + span: 305..305#0, description: Text { - span: Span { - lo: BytePos( - 305, - ), - hi: BytePos( - 342, - ), - ctxt: #0, - }, + span: 305..342#0, value: "Virtual doclet for `Packet` class.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 305, - ), - hi: BytePos( - 310, - ), - ctxt: #0, - }, + span: 305..310#0, tag_name: Text { - span: Span { - lo: BytePos( - 305, - ), - hi: BytePos( - 310, - ), - ctxt: #0, - }, + span: 305..310#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 305, - ), - hi: BytePos( - 310, - ), - ctxt: #0, - }, + span: 305..310#0, ty: Some( Text { - span: Span { - lo: BytePos( - 305, - ), - hi: BytePos( - 311, - ), - ctxt: #0, - }, + span: 305..311#0, value: "Packet", }, ), @@ -289,25 +105,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 369, - ), - hi: BytePos( - 369, - ), - ctxt: #0, - }, + span: 369..369#0, description: Text { - span: Span { - lo: BytePos( - 369, - ), - hi: BytePos( - 386, - ), - ctxt: #0, - }, + span: 369..386#0, value: "Close the socket.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/exampletag.debug b/crates/jsdoc/tests/fixtures/exampletag.debug index e9439ebf1627..76890b3aaf00 100644 --- a/crates/jsdoc/tests/fixtures/exampletag.debug +++ b/crates/jsdoc/tests/fixtures/exampletag.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, value: "example", }, tag: Example( ExampleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, text: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 47, - ), - ctxt: #0, - }, + span: 1..47#0, value: "* console.log(\"foo\");\n * console.log(\"bar\");\n ", }, }, @@ -73,119 +25,39 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 72, - ), - hi: BytePos( - 72, - ), - ctxt: #0, - }, + span: 72..72#0, description: Text { - span: Span { - lo: BytePos( - 72, - ), - hi: BytePos( - 72, - ), - ctxt: #0, - }, + span: 72..72#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 72, - ), - hi: BytePos( - 79, - ), - ctxt: #0, - }, + span: 72..79#0, tag_name: Text { - span: Span { - lo: BytePos( - 72, - ), - hi: BytePos( - 79, - ), - ctxt: #0, - }, + span: 72..79#0, value: "example", }, tag: Example( ExampleTag { - span: Span { - lo: BytePos( - 72, - ), - hi: BytePos( - 79, - ), - ctxt: #0, - }, + span: 72..79#0, text: Text { - span: Span { - lo: BytePos( - 72, - ), - hi: BytePos( - 120, - ), - ctxt: #0, - }, + span: 72..120#0, value: "* console.log(\"foo\");\n * console.log(\"bar\");\n * ", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 72, - ), - hi: BytePos( - 79, - ), - ctxt: #0, - }, + span: 72..79#0, tag_name: Text { - span: Span { - lo: BytePos( - 72, - ), - hi: BytePos( - 79, - ), - ctxt: #0, - }, + span: 72..79#0, value: "example", }, tag: Example( ExampleTag { - span: Span { - lo: BytePos( - 72, - ), - hi: BytePos( - 79, - ), - ctxt: #0, - }, + span: 72..79#0, text: Text { - span: Span { - lo: BytePos( - 72, - ), - hi: BytePos( - 114, - ), - ctxt: #0, - }, + span: 72..114#0, value: "* Example 2\n * 1 + 2;\n ", }, }, diff --git a/crates/jsdoc/tests/fixtures/exceptiontag.debug b/crates/jsdoc/tests/fixtures/exceptiontag.debug index 9eaab3cc51dc..47913240aa01 100644 --- a/crates/jsdoc/tests/fixtures/exceptiontag.debug +++ b/crates/jsdoc/tests/fixtures/exceptiontag.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "throws", }, tag: Throw( ThrowTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, text: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 27, - ), - ctxt: #0, - }, + span: 1..27#0, value: "{InvalidArgumentException}", }, }, @@ -73,71 +25,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 69, - ), - hi: BytePos( - 69, - ), - ctxt: #0, - }, + span: 69..69#0, description: Text { - span: Span { - lo: BytePos( - 69, - ), - hi: BytePos( - 69, - ), - ctxt: #0, - }, + span: 69..69#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 69, - ), - hi: BytePos( - 78, - ), - ctxt: #0, - }, + span: 69..78#0, tag_name: Text { - span: Span { - lo: BytePos( - 69, - ), - hi: BytePos( - 78, - ), - ctxt: #0, - }, + span: 69..78#0, value: "exception", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 69, - ), - hi: BytePos( - 78, - ), - ctxt: #0, - }, + span: 69..78#0, extras: Text { - span: Span { - lo: BytePos( - 69, - ), - hi: BytePos( - 109, - ), - ctxt: #0, - }, + span: 69..109#0, value: "Will throw an error if argument is null.", }, }, @@ -146,71 +50,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 154, - ), - hi: BytePos( - 154, - ), - ctxt: #0, - }, + span: 154..154#0, description: Text { - span: Span { - lo: BytePos( - 154, - ), - hi: BytePos( - 154, - ), - ctxt: #0, - }, + span: 154..154#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 154, - ), - hi: BytePos( - 163, - ), - ctxt: #0, - }, + span: 154..163#0, tag_name: Text { - span: Span { - lo: BytePos( - 154, - ), - hi: BytePos( - 163, - ), - ctxt: #0, - }, + span: 154..163#0, value: "exception", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 154, - ), - hi: BytePos( - 163, - ), - ctxt: #0, - }, + span: 154..163#0, extras: Text { - span: Span { - lo: BytePos( - 154, - ), - hi: BytePos( - 197, - ), - ctxt: #0, - }, + span: 154..197#0, value: "{DivideByZero} Argument x must be non-zero.", }, }, @@ -219,71 +75,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 242, - ), - hi: BytePos( - 242, - ), - ctxt: #0, - }, + span: 242..242#0, description: Text { - span: Span { - lo: BytePos( - 242, - ), - hi: BytePos( - 278, - ), - ctxt: #0, - }, + span: 242..278#0, value: "A description of the function.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 242, - ), - hi: BytePos( - 251, - ), - ctxt: #0, - }, + span: 242..251#0, tag_name: Text { - span: Span { - lo: BytePos( - 242, - ), - hi: BytePos( - 251, - ), - ctxt: #0, - }, + span: 242..251#0, value: "exception", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 242, - ), - hi: BytePos( - 251, - ), - ctxt: #0, - }, + span: 242..251#0, extras: Text { - span: Span { - lo: BytePos( - 242, - ), - hi: BytePos( - 282, - ), - ctxt: #0, - }, + span: 242..282#0, value: "{Object} A description of the exception.", }, }, diff --git a/crates/jsdoc/tests/fixtures/exportclass.debug b/crates/jsdoc/tests/fixtures/exportclass.debug index ffbedb79f201..66b743edc54d 100644 --- a/crates/jsdoc/tests/fixtures/exportclass.debug +++ b/crates/jsdoc/tests/fixtures/exportclass.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 14, - ), - ctxt: #0, - }, + span: 1..14#0, value: "Foo module\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 4, - ), - ctxt: #0, - }, + span: 1..4#0, value: "foo", }, }, @@ -85,25 +29,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 39, - ), - hi: BytePos( - 39, - ), - ctxt: #0, - }, + span: 39..39#0, description: Text { - span: Span { - lo: BytePos( - 39, - ), - hi: BytePos( - 56, - ), - ctxt: #0, - }, + span: 39..56#0, value: "Class description", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/exportdefault.debug b/crates/jsdoc/tests/fixtures/exportdefault.debug index 0a3d32a244c6..f8cdfaa87d3d 100644 --- a/crates/jsdoc/tests/fixtures/exportdefault.debug +++ b/crates/jsdoc/tests/fixtures/exportdefault.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, value: "test", }, }, @@ -85,25 +29,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 22, - ), - hi: BytePos( - 22, - ), - ctxt: #0, - }, + span: 22..22#0, description: Text { - span: Span { - lo: BytePos( - 22, - ), - hi: BytePos( - 32, - ), - ctxt: #0, - }, + span: 22..32#0, value: "Test value", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/exportdefaultclass.debug b/crates/jsdoc/tests/fixtures/exportdefaultclass.debug index 7b0027baf2bf..acf7336c939a 100644 --- a/crates/jsdoc/tests/fixtures/exportdefaultclass.debug +++ b/crates/jsdoc/tests/fixtures/exportdefaultclass.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, value: "test", }, }, @@ -85,49 +29,17 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 22, - ), - hi: BytePos( - 22, - ), - ctxt: #0, - }, + span: 22..22#0, description: Text { - span: Span { - lo: BytePos( - 22, - ), - hi: BytePos( - 32, - ), - ctxt: #0, - }, + span: 22..32#0, value: "Test class", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 71, - ), - hi: BytePos( - 71, - ), - ctxt: #0, - }, + span: 71..71#0, description: Text { - span: Span { - lo: BytePos( - 71, - ), - hi: BytePos( - 87, - ), - ctxt: #0, - }, + span: 71..87#0, value: "Test constructor", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/exports.debug b/crates/jsdoc/tests/fixtures/exports.debug index 611c9c6d2716..09411f3b8109 100644 --- a/crates/jsdoc/tests/fixtures/exports.debug +++ b/crates/jsdoc/tests/fixtures/exports.debug @@ -1,130 +1,42 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 50, - ), - ctxt: #0, - }, + span: 1..50#0, value: "An example of a server-side JavaScript module.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "world", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "hello", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, value: "example", }, tag: Example( ExampleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, text: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 58, - ), - ctxt: #0, - }, + span: 1..58#0, value: "* var g = require('hello/world').sayHello('Gracie');\n ", }, }, @@ -133,148 +45,52 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 152, - ), - hi: BytePos( - 152, - ), - ctxt: #0, - }, + span: 152..152#0, description: Text { - span: Span { - lo: BytePos( - 152, - ), - hi: BytePos( - 175, - ), - ctxt: #0, - }, + span: 152..175#0, value: "Generate a greeting.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 152, - ), - hi: BytePos( - 157, - ), - ctxt: #0, - }, + span: 152..157#0, tag_name: Text { - span: Span { - lo: BytePos( - 152, - ), - hi: BytePos( - 157, - ), - ctxt: #0, - }, + span: 152..157#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 152, - ), - hi: BytePos( - 157, - ), - ctxt: #0, - }, + span: 152..157#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 152, - ), - hi: BytePos( - 160, - ), - ctxt: #0, - }, + span: 152..160#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 152, - ), - hi: BytePos( - 191, - ), - ctxt: #0, - }, + span: 152..191#0, value: "[subject=\"world\"] To whom we say hello.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 152, - ), - hi: BytePos( - 159, - ), - ctxt: #0, - }, + span: 152..159#0, tag_name: Text { - span: Span { - lo: BytePos( - 152, - ), - hi: BytePos( - 159, - ), - ctxt: #0, - }, + span: 152..159#0, value: "returns", }, tag: Return( ReturnTag { - span: Span { - lo: BytePos( - 152, - ), - hi: BytePos( - 159, - ), - ctxt: #0, - }, + span: 152..159#0, ty: Some( Text { - span: Span { - lo: BytePos( - 152, - ), - hi: BytePos( - 160, - ), - ctxt: #0, - }, + span: 152..160#0, value: "{string}", }, ), description: Text { - span: Span { - lo: BytePos( - 152, - ), - hi: BytePos( - 152, - ), - ctxt: #0, - }, + span: 152..152#0, value: "", }, }, @@ -283,148 +99,52 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 351, - ), - hi: BytePos( - 351, - ), - ctxt: #0, - }, + span: 351..351#0, description: Text { - span: Span { - lo: BytePos( - 351, - ), - hi: BytePos( - 381, - ), - ctxt: #0, - }, + span: 351..381#0, value: "Generate a morose farewell.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 351, - ), - hi: BytePos( - 356, - ), - ctxt: #0, - }, + span: 351..356#0, tag_name: Text { - span: Span { - lo: BytePos( - 351, - ), - hi: BytePos( - 356, - ), - ctxt: #0, - }, + span: 351..356#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 351, - ), - hi: BytePos( - 356, - ), - ctxt: #0, - }, + span: 351..356#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 351, - ), - hi: BytePos( - 359, - ), - ctxt: #0, - }, + span: 351..359#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 351, - ), - hi: BytePos( - 392, - ), - ctxt: #0, - }, + span: 351..392#0, value: "[subject=\"world\"] To whom we say goodbye.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 351, - ), - hi: BytePos( - 358, - ), - ctxt: #0, - }, + span: 351..358#0, tag_name: Text { - span: Span { - lo: BytePos( - 351, - ), - hi: BytePos( - 358, - ), - ctxt: #0, - }, + span: 351..358#0, value: "returns", }, tag: Return( ReturnTag { - span: Span { - lo: BytePos( - 351, - ), - hi: BytePos( - 358, - ), - ctxt: #0, - }, + span: 351..358#0, ty: Some( Text { - span: Span { - lo: BytePos( - 351, - ), - hi: BytePos( - 359, - ), - ctxt: #0, - }, + span: 351..359#0, value: "{string}", }, ), description: Text { - span: Span { - lo: BytePos( - 351, - ), - hi: BytePos( - 351, - ), - ctxt: #0, - }, + span: 351..351#0, value: "", }, }, diff --git a/crates/jsdoc/tests/fixtures/exportstag.debug b/crates/jsdoc/tests/fixtures/exportstag.debug index b6f1cf99d012..56aced1322ad 100644 --- a/crates/jsdoc/tests/fixtures/exportstag.debug +++ b/crates/jsdoc/tests/fixtures/exportstag.debug @@ -1,118 +1,38 @@ [ JsDoc { - span: Span { - lo: BytePos( - 25, - ), - hi: BytePos( - 25, - ), - ctxt: #0, - }, + span: 25..25#0, description: Text { - span: Span { - lo: BytePos( - 25, - ), - hi: BytePos( - 55, - ), - ctxt: #0, - }, + span: 25..55#0, value: "A module representing a shirt.", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 25, - ), - hi: BytePos( - 32, - ), - ctxt: #0, - }, + span: 25..32#0, tag_name: Text { - span: Span { - lo: BytePos( - 25, - ), - hi: BytePos( - 32, - ), - ctxt: #0, - }, + span: 25..32#0, value: "exports", }, tag: Exports( ExportsTag { - span: Span { - lo: BytePos( - 25, - ), - hi: BytePos( - 32, - ), - ctxt: #0, - }, + span: 25..32#0, module_name: Text { - span: Span { - lo: BytePos( - 25, - ), - hi: BytePos( - 33, - ), - ctxt: #0, - }, + span: 25..33#0, value: "my/shirt", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 25, - ), - hi: BytePos( - 32, - ), - ctxt: #0, - }, + span: 25..32#0, tag_name: Text { - span: Span { - lo: BytePos( - 25, - ), - hi: BytePos( - 32, - ), - ctxt: #0, - }, + span: 25..32#0, value: "version", }, tag: Version( VersionTag { - span: Span { - lo: BytePos( - 25, - ), - hi: BytePos( - 32, - ), - ctxt: #0, - }, + span: 25..32#0, value: Text { - span: Span { - lo: BytePos( - 25, - ), - hi: BytePos( - 28, - ), - ctxt: #0, - }, + span: 25..28#0, value: "1.0", }, }, @@ -121,85 +41,29 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 150, - ), - hi: BytePos( - 150, - ), - ctxt: #0, - }, + span: 150..150#0, description: Text { - span: Span { - lo: BytePos( - 150, - ), - hi: BytePos( - 175, - ), - ctxt: #0, - }, + span: 150..175#0, value: "A property of the module.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 216, - ), - hi: BytePos( - 216, - ), - ctxt: #0, - }, + span: 216..216#0, description: Text { - span: Span { - lo: BytePos( - 216, - ), - hi: BytePos( - 216, - ), - ctxt: #0, - }, + span: 216..216#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 216, - ), - hi: BytePos( - 227, - ), - ctxt: #0, - }, + span: 216..227#0, tag_name: Text { - span: Span { - lo: BytePos( - 216, - ), - hi: BytePos( - 227, - ), - ctxt: #0, - }, + span: 216..227#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 216, - ), - hi: BytePos( - 227, - ), - ctxt: #0, - }, + span: 216..227#0, ty: None, name: None, }, @@ -208,25 +72,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 285, - ), - hi: BytePos( - 285, - ), - ctxt: #0, - }, + span: 285..285#0, description: Text { - span: Span { - lo: BytePos( - 285, - ), - hi: BytePos( - 309, - ), - ctxt: #0, - }, + span: 285..309#0, value: "A property of the class.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/exportstag2.debug b/crates/jsdoc/tests/fixtures/exportstag2.debug index a48ab8ddbcf5..9639c166d031 100644 --- a/crates/jsdoc/tests/fixtures/exportstag2.debug +++ b/crates/jsdoc/tests/fixtures/exportstag2.debug @@ -1,129 +1,41 @@ [ JsDoc { - span: Span { - lo: BytePos( - 54, - ), - hi: BytePos( - 96, - ), - ctxt: #0, - }, + span: 54..96#0, description: Text { - span: Span { - lo: BytePos( - 54, - ), - hi: BytePos( - 83, - ), - ctxt: #0, - }, + span: 54..83#0, value: "A module representing a coat.", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 54, - ), - hi: BytePos( - 61, - ), - ctxt: #0, - }, + span: 54..61#0, tag_name: Text { - span: Span { - lo: BytePos( - 54, - ), - hi: BytePos( - 61, - ), - ctxt: #0, - }, + span: 54..61#0, value: "exports", }, tag: Exports( ExportsTag { - span: Span { - lo: BytePos( - 54, - ), - hi: BytePos( - 61, - ), - ctxt: #0, - }, + span: 54..61#0, module_name: Text { - span: Span { - lo: BytePos( - 54, - ), - hi: BytePos( - 61, - ), - ctxt: #0, - }, + span: 54..61#0, value: "my/coat", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 54, - ), - hi: BytePos( - 62, - ), - ctxt: #0, - }, + span: 54..62#0, tag_name: Text { - span: Span { - lo: BytePos( - 54, - ), - hi: BytePos( - 62, - ), - ctxt: #0, - }, + span: 54..62#0, value: "requires", }, tag: Requires( RequiresTag { - span: Span { - lo: BytePos( - 54, - ), - hi: BytePos( - 62, - ), - ctxt: #0, - }, + span: 54..62#0, name_path: NamePath { - span: Span { - lo: BytePos( - 54, - ), - hi: BytePos( - 96, - ), - ctxt: #0, - }, + span: 54..96#0, components: [ Text { - span: Span { - lo: BytePos( - 54, - ), - hi: BytePos( - 56, - ), - ctxt: #0, - }, + span: 54..56#0, value: "my", }, ], @@ -134,25 +46,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 251, - ), - hi: BytePos( - 251, - ), - ctxt: #0, - }, + span: 251..251#0, description: Text { - span: Span { - lo: BytePos( - 251, - ), - hi: BytePos( - 262, - ), - ctxt: #0, - }, + span: 251..262#0, value: "document me", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/exportstag3.debug b/crates/jsdoc/tests/fixtures/exportstag3.debug index 6f9f580f4e79..f10084b2f180 100644 --- a/crates/jsdoc/tests/fixtures/exportstag3.debug +++ b/crates/jsdoc/tests/fixtures/exportstag3.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 13, - ), - hi: BytePos( - 13, - ), - ctxt: #0, - }, + span: 13..13#0, description: Text { - span: Span { - lo: BytePos( - 13, - ), - hi: BytePos( - 65, - ), - ctxt: #0, - }, + span: 13..65#0, value: "Utility functions to ease working with DOM elements.", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 13, - ), - hi: BytePos( - 20, - ), - ctxt: #0, - }, + span: 13..20#0, tag_name: Text { - span: Span { - lo: BytePos( - 13, - ), - hi: BytePos( - 20, - ), - ctxt: #0, - }, + span: 13..20#0, value: "exports", }, tag: Exports( ExportsTag { - span: Span { - lo: BytePos( - 13, - ), - hi: BytePos( - 20, - ), - ctxt: #0, - }, + span: 13..20#0, module_name: Text { - span: Span { - lo: BytePos( - 13, - ), - hi: BytePos( - 23, - ), - ctxt: #0, - }, + span: 13..23#0, value: "html/utils", }, }, @@ -73,49 +25,17 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 169, - ), - hi: BytePos( - 169, - ), - ctxt: #0, - }, + span: 169..169#0, description: Text { - span: Span { - lo: BytePos( - 169, - ), - hi: BytePos( - 211, - ), - ctxt: #0, - }, + span: 169..211#0, value: "Get the value of a property on an element.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 340, - ), - hi: BytePos( - 340, - ), - ctxt: #0, - }, + span: 340..340#0, description: Text { - span: Span { - lo: BytePos( - 340, - ), - hi: BytePos( - 388, - ), - ctxt: #0, - }, + span: 340..388#0, value: "Determine if an element is in the document head.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/exportstag4.debug b/crates/jsdoc/tests/fixtures/exportstag4.debug index 2d3f0d091ad9..96cdc8f3d864 100644 --- a/crates/jsdoc/tests/fixtures/exportstag4.debug +++ b/crates/jsdoc/tests/fixtures/exportstag4.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 12, - ), - hi: BytePos( - 24, - ), - ctxt: #0, - }, + span: 12..24#0, description: Text { - span: Span { - lo: BytePos( - 12, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 12..12#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 12, - ), - hi: BytePos( - 19, - ), - ctxt: #0, - }, + span: 12..19#0, tag_name: Text { - span: Span { - lo: BytePos( - 12, - ), - hi: BytePos( - 19, - ), - ctxt: #0, - }, + span: 12..19#0, value: "exports", }, tag: Exports( ExportsTag { - span: Span { - lo: BytePos( - 12, - ), - hi: BytePos( - 19, - ), - ctxt: #0, - }, + span: 12..19#0, module_name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -73,61 +25,21 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 64, - ), - hi: BytePos( - 64, - ), - ctxt: #0, - }, + span: 64..64#0, description: Text { - span: Span { - lo: BytePos( - 64, - ), - hi: BytePos( - 64, - ), - ctxt: #0, - }, + span: 64..64#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 64, - ), - hi: BytePos( - 69, - ), - ctxt: #0, - }, + span: 64..69#0, tag_name: Text { - span: Span { - lo: BytePos( - 64, - ), - hi: BytePos( - 69, - ), - ctxt: #0, - }, + span: 64..69#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 64, - ), - hi: BytePos( - 69, - ), - ctxt: #0, - }, + span: 64..69#0, ty: None, name: None, }, @@ -136,25 +48,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 115, - ), - hi: BytePos( - 115, - ), - ctxt: #0, - }, + span: 115..115#0, description: Text { - span: Span { - lo: BytePos( - 115, - ), - hi: BytePos( - 126, - ), - ctxt: #0, - }, + span: 115..126#0, value: "Some method", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/exportstag5.debug b/crates/jsdoc/tests/fixtures/exportstag5.debug index 661b80215c33..6cd8d868be2e 100644 --- a/crates/jsdoc/tests/fixtures/exportstag5.debug +++ b/crates/jsdoc/tests/fixtures/exportstag5.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 72, - ), - hi: BytePos( - 76, - ), - ctxt: #0, - }, + span: 72..76#0, description: Text { - span: Span { - lo: BytePos( - 72, - ), - hi: BytePos( - 72, - ), - ctxt: #0, - }, + span: 72..72#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 72, - ), - hi: BytePos( - 79, - ), - ctxt: #0, - }, + span: 72..79#0, tag_name: Text { - span: Span { - lo: BytePos( - 72, - ), - hi: BytePos( - 79, - ), - ctxt: #0, - }, + span: 72..79#0, value: "exports", }, tag: Exports( ExportsTag { - span: Span { - lo: BytePos( - 72, - ), - hi: BytePos( - 79, - ), - ctxt: #0, - }, + span: 72..79#0, module_name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -73,82 +25,26 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 129, - ), - hi: BytePos( - 143, - ), - ctxt: #0, - }, + span: 129..143#0, description: Text { - span: Span { - lo: BytePos( - 129, - ), - hi: BytePos( - 129, - ), - ctxt: #0, - }, + span: 129..129#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 129, - ), - hi: BytePos( - 134, - ), - ctxt: #0, - }, + span: 129..134#0, tag_name: Text { - span: Span { - lo: BytePos( - 129, - ), - hi: BytePos( - 134, - ), - ctxt: #0, - }, + span: 129..134#0, value: "lends", }, tag: Lends( LendsTag { - span: Span { - lo: BytePos( - 129, - ), - hi: BytePos( - 134, - ), - ctxt: #0, - }, + span: 129..134#0, name: NamePath { - span: Span { - lo: BytePos( - 129, - ), - hi: BytePos( - 143, - ), - ctxt: #0, - }, + span: 129..143#0, components: [ Text { - span: Span { - lo: BytePos( - 129, - ), - hi: BytePos( - 135, - ), - ctxt: #0, - }, + span: 129..135#0, value: "module", }, ], @@ -159,25 +55,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 186, - ), - hi: BytePos( - 186, - ), - ctxt: #0, - }, + span: 186..186#0, description: Text { - span: Span { - lo: BytePos( - 186, - ), - hi: BytePos( - 223, - ), - ctxt: #0, - }, + span: 186..223#0, value: "This should be in the Foo module doc.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/exportstag6.debug b/crates/jsdoc/tests/fixtures/exportstag6.debug index f6f99f539ee7..bfc953bbdc65 100644 --- a/crates/jsdoc/tests/fixtures/exportstag6.debug +++ b/crates/jsdoc/tests/fixtures/exportstag6.debug @@ -1,118 +1,38 @@ [ JsDoc { - span: Span { - lo: BytePos( - 18, - ), - hi: BytePos( - 18, - ), - ctxt: #0, - }, + span: 18..18#0, description: Text { - span: Span { - lo: BytePos( - 18, - ), - hi: BytePos( - 51, - ), - ctxt: #0, - }, + span: 18..51#0, value: "A module representing a shirt.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 18, - ), - hi: BytePos( - 25, - ), - ctxt: #0, - }, + span: 18..25#0, tag_name: Text { - span: Span { - lo: BytePos( - 18, - ), - hi: BytePos( - 25, - ), - ctxt: #0, - }, + span: 18..25#0, value: "exports", }, tag: Exports( ExportsTag { - span: Span { - lo: BytePos( - 18, - ), - hi: BytePos( - 25, - ), - ctxt: #0, - }, + span: 18..25#0, module_name: Text { - span: Span { - lo: BytePos( - 18, - ), - hi: BytePos( - 26, - ), - ctxt: #0, - }, + span: 18..26#0, value: "my/shirt", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 18, - ), - hi: BytePos( - 25, - ), - ctxt: #0, - }, + span: 18..25#0, tag_name: Text { - span: Span { - lo: BytePos( - 18, - ), - hi: BytePos( - 25, - ), - ctxt: #0, - }, + span: 18..25#0, value: "version", }, tag: Version( VersionTag { - span: Span { - lo: BytePos( - 18, - ), - hi: BytePos( - 25, - ), - ctxt: #0, - }, + span: 18..25#0, value: Text { - span: Span { - lo: BytePos( - 18, - ), - hi: BytePos( - 21, - ), - ctxt: #0, - }, + span: 18..21#0, value: "1.0", }, }, @@ -121,85 +41,29 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 116, - ), - hi: BytePos( - 116, - ), - ctxt: #0, - }, + span: 116..116#0, description: Text { - span: Span { - lo: BytePos( - 116, - ), - hi: BytePos( - 141, - ), - ctxt: #0, - }, + span: 116..141#0, value: "A property of the module.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 187, - ), - hi: BytePos( - 187, - ), - ctxt: #0, - }, + span: 187..187#0, description: Text { - span: Span { - lo: BytePos( - 187, - ), - hi: BytePos( - 187, - ), - ctxt: #0, - }, + span: 187..187#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 187, - ), - hi: BytePos( - 198, - ), - ctxt: #0, - }, + span: 187..198#0, tag_name: Text { - span: Span { - lo: BytePos( - 187, - ), - hi: BytePos( - 198, - ), - ctxt: #0, - }, + span: 187..198#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 187, - ), - hi: BytePos( - 198, - ), - ctxt: #0, - }, + span: 187..198#0, ty: None, name: None, }, @@ -208,25 +72,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 261, - ), - hi: BytePos( - 261, - ), - ctxt: #0, - }, + span: 261..261#0, description: Text { - span: Span { - lo: BytePos( - 261, - ), - hi: BytePos( - 285, - ), - ctxt: #0, - }, + span: 261..285#0, value: "A property of the class.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/exportstag7.debug b/crates/jsdoc/tests/fixtures/exportstag7.debug index b5715433ffac..7dbfc25cf430 100644 --- a/crates/jsdoc/tests/fixtures/exportstag7.debug +++ b/crates/jsdoc/tests/fixtures/exportstag7.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 25, - ), - ctxt: #0, - }, + span: 16..25#0, description: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 16..16#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 23, - ), - ctxt: #0, - }, + span: 16..23#0, tag_name: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 23, - ), - ctxt: #0, - }, + span: 16..23#0, value: "exports", }, tag: Exports( ExportsTag { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 23, - ), - ctxt: #0, - }, + span: 16..23#0, module_name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -73,85 +25,29 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 65, - ), - hi: BytePos( - 65, - ), - ctxt: #0, - }, + span: 65..65#0, description: Text { - span: Span { - lo: BytePos( - 65, - ), - hi: BytePos( - 90, - ), - ctxt: #0, - }, + span: 65..90#0, value: "A property of the module.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 124, - ), - hi: BytePos( - 124, - ), - ctxt: #0, - }, + span: 124..124#0, description: Text { - span: Span { - lo: BytePos( - 124, - ), - hi: BytePos( - 124, - ), - ctxt: #0, - }, + span: 124..124#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 124, - ), - hi: BytePos( - 135, - ), - ctxt: #0, - }, + span: 124..135#0, tag_name: Text { - span: Span { - lo: BytePos( - 124, - ), - hi: BytePos( - 135, - ), - ctxt: #0, - }, + span: 124..135#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 124, - ), - hi: BytePos( - 135, - ), - ctxt: #0, - }, + span: 124..135#0, ty: None, name: None, }, @@ -160,49 +56,17 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 186, - ), - hi: BytePos( - 186, - ), - ctxt: #0, - }, + span: 186..186#0, description: Text { - span: Span { - lo: BytePos( - 186, - ), - hi: BytePos( - 210, - ), - ctxt: #0, - }, + span: 186..210#0, value: "A property of the class.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 244, - ), - hi: BytePos( - 244, - ), - ctxt: #0, - }, + span: 244..244#0, description: Text { - span: Span { - lo: BytePos( - 244, - ), - hi: BytePos( - 264, - ), - ctxt: #0, - }, + span: 244..264#0, value: "Iron the turtleneck.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/exportstag8.debug b/crates/jsdoc/tests/fixtures/exportstag8.debug index 25afc8a88982..da9a5b57f80c 100644 --- a/crates/jsdoc/tests/fixtures/exportstag8.debug +++ b/crates/jsdoc/tests/fixtures/exportstag8.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 32, - ), - ctxt: #0, - }, + span: 16..32#0, description: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 16..16#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 23, - ), - ctxt: #0, - }, + span: 16..23#0, tag_name: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 23, - ), - ctxt: #0, - }, + span: 16..23#0, value: "exports", }, tag: Exports( ExportsTag { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 23, - ), - ctxt: #0, - }, + span: 16..23#0, module_name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, diff --git a/crates/jsdoc/tests/fixtures/exporttag.debug b/crates/jsdoc/tests/fixtures/exporttag.debug index 4d67356bc5ea..0fbbd375c890 100644 --- a/crates/jsdoc/tests/fixtures/exporttag.debug +++ b/crates/jsdoc/tests/fixtures/exporttag.debug @@ -1,71 +1,23 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 1..16#0, value: "My class.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, value: "* @export", }, ), @@ -76,71 +28,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 75, - ), - hi: BytePos( - 75, - ), - ctxt: #0, - }, + span: 75..75#0, description: Text { - span: Span { - lo: BytePos( - 75, - ), - hi: BytePos( - 98, - ), - ctxt: #0, - }, + span: 75..98#0, value: "My public method.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 75, - ), - hi: BytePos( - 81, - ), - ctxt: #0, - }, + span: 75..81#0, tag_name: Text { - span: Span { - lo: BytePos( - 75, - ), - hi: BytePos( - 81, - ), - ctxt: #0, - }, + span: 75..81#0, value: "export", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 75, - ), - hi: BytePos( - 81, - ), - ctxt: #0, - }, + span: 75..81#0, extras: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, diff --git a/crates/jsdoc/tests/fixtures/externaltag.debug b/crates/jsdoc/tests/fixtures/externaltag.debug index b757d1e4b934..adcb76c53469 100644 --- a/crates/jsdoc/tests/fixtures/externaltag.debug +++ b/crates/jsdoc/tests/fixtures/externaltag.debug @@ -1,118 +1,38 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 31, - ), - ctxt: #0, - }, + span: 1..31#0, value: "The built in string object.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "external", }, tag: External( ExternalTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "String", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 4, - ), - ctxt: #0, - }, + span: 1..4#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 4, - ), - ctxt: #0, - }, + span: 1..4#0, value: "see", }, tag: See( SeeTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 4, - ), - ctxt: #0, - }, + span: 1..4#0, text: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 91, - ), - ctxt: #0, - }, + span: 1..91#0, value: "{@link https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String String}", }, }, @@ -121,72 +41,24 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 160, - ), - hi: BytePos( - 160, - ), - ctxt: #0, - }, + span: 160..160#0, description: Text { - span: Span { - lo: BytePos( - 160, - ), - hi: BytePos( - 204, - ), - ctxt: #0, - }, + span: 160..204#0, value: "Adds a new method to the built-in string.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 160, - ), - hi: BytePos( - 168, - ), - ctxt: #0, - }, + span: 160..168#0, tag_name: Text { - span: Span { - lo: BytePos( - 160, - ), - hi: BytePos( - 168, - ), - ctxt: #0, - }, + span: 160..168#0, value: "function", }, tag: Function( FunctionTag { - span: Span { - lo: BytePos( - 160, - ), - hi: BytePos( - 168, - ), - ctxt: #0, - }, + span: 160..168#0, name: Some( Text { - span: Span { - lo: BytePos( - 160, - ), - hi: BytePos( - 181, - ), - ctxt: #0, - }, + span: 160..181#0, value: "external:String#rot13", }, ), @@ -194,48 +66,16 @@ ), }, TagItem { - span: Span { - lo: BytePos( - 160, - ), - hi: BytePos( - 167, - ), - ctxt: #0, - }, + span: 160..167#0, tag_name: Text { - span: Span { - lo: BytePos( - 160, - ), - hi: BytePos( - 167, - ), - ctxt: #0, - }, + span: 160..167#0, value: "example", }, tag: Example( ExampleTag { - span: Span { - lo: BytePos( - 160, - ), - hi: BytePos( - 167, - ), - ctxt: #0, - }, + span: 160..167#0, text: Text { - span: Span { - lo: BytePos( - 160, - ), - hi: BytePos( - 256, - ), - ctxt: #0, - }, + span: 160..256#0, value: "* var greeting = new String('hello world');\n * console.log( greeting.rot13() ); // uryyb jbeyq\n ", }, }, @@ -244,119 +84,39 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 357, - ), - hi: BytePos( - 357, - ), - ctxt: #0, - }, + span: 357..357#0, description: Text { - span: Span { - lo: BytePos( - 357, - ), - hi: BytePos( - 388, - ), - ctxt: #0, - }, + span: 357..388#0, value: "The jQuery plugin namespace.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 357, - ), - hi: BytePos( - 365, - ), - ctxt: #0, - }, + span: 357..365#0, tag_name: Text { - span: Span { - lo: BytePos( - 357, - ), - hi: BytePos( - 365, - ), - ctxt: #0, - }, + span: 357..365#0, value: "external", }, tag: External( ExternalTag { - span: Span { - lo: BytePos( - 357, - ), - hi: BytePos( - 365, - ), - ctxt: #0, - }, + span: 357..365#0, name: Text { - span: Span { - lo: BytePos( - 357, - ), - hi: BytePos( - 368, - ), - ctxt: #0, - }, + span: 357..368#0, value: "\"jQuery.fn\"", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 357, - ), - hi: BytePos( - 360, - ), - ctxt: #0, - }, + span: 357..360#0, tag_name: Text { - span: Span { - lo: BytePos( - 357, - ), - hi: BytePos( - 360, - ), - ctxt: #0, - }, + span: 357..360#0, value: "see", }, tag: See( SeeTag { - span: Span { - lo: BytePos( - 357, - ), - hi: BytePos( - 360, - ), - ctxt: #0, - }, + span: 357..360#0, text: Text { - span: Span { - lo: BytePos( - 357, - ), - hi: BytePos( - 429, - ), - ctxt: #0, - }, + span: 357..429#0, value: "{@link http://docs.jquery.com/Plugins/Authoring The jQuery Plugin Guide}", }, }, @@ -365,72 +125,24 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 504, - ), - hi: BytePos( - 504, - ), - ctxt: #0, - }, + span: 504..504#0, description: Text { - span: Span { - lo: BytePos( - 504, - ), - hi: BytePos( - 563, - ), - ctxt: #0, - }, + span: 504..563#0, value: "A jQuery plugin to make stars fly around your home page.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 504, - ), - hi: BytePos( - 512, - ), - ctxt: #0, - }, + span: 504..512#0, tag_name: Text { - span: Span { - lo: BytePos( - 504, - ), - hi: BytePos( - 512, - ), - ctxt: #0, - }, + span: 504..512#0, value: "function", }, tag: Function( FunctionTag { - span: Span { - lo: BytePos( - 504, - ), - hi: BytePos( - 512, - ), - ctxt: #0, - }, + span: 504..512#0, name: Some( Text { - span: Span { - lo: BytePos( - 504, - ), - hi: BytePos( - 534, - ), - ctxt: #0, - }, + span: 504..534#0, value: "external:\"jQuery.fn\".starfairy", }, ), diff --git a/crates/jsdoc/tests/fixtures/externaltag2.debug b/crates/jsdoc/tests/fixtures/externaltag2.debug index 1341eda28bad..21397325e456 100644 --- a/crates/jsdoc/tests/fixtures/externaltag2.debug +++ b/crates/jsdoc/tests/fixtures/externaltag2.debug @@ -1,118 +1,38 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 35, - ), - ctxt: #0, - }, + span: 1..35#0, value: "Namespace provided by the browser.", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "external", }, tag: External( ExternalTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 15, - ), - ctxt: #0, - }, + span: 1..15#0, value: "XMLHttpRequest", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 4, - ), - ctxt: #0, - }, + span: 1..4#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 4, - ), - ctxt: #0, - }, + span: 1..4#0, value: "see", }, tag: See( SeeTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 4, - ), - ctxt: #0, - }, + span: 1..4#0, text: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 48, - ), - ctxt: #0, - }, + span: 1..48#0, value: "https://developer.mozilla.org/en/xmlhttprequest", }, }, @@ -121,86 +41,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 135, - ), - hi: BytePos( - 135, - ), - ctxt: #0, - }, + span: 135..135#0, description: Text { - span: Span { - lo: BytePos( - 135, - ), - hi: BytePos( - 210, - ), - ctxt: #0, - }, + span: 135..210#0, value: "Extends the built in XMLHttpRequest to send data encoded with a secret key.", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 135, - ), - hi: BytePos( - 140, - ), - ctxt: #0, - }, + span: 135..140#0, tag_name: Text { - span: Span { - lo: BytePos( - 135, - ), - hi: BytePos( - 140, - ), - ctxt: #0, - }, + span: 135..140#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 135, - ), - hi: BytePos( - 140, - ), - ctxt: #0, - }, + span: 135..140#0, ty: Some( Text { - span: Span { - lo: BytePos( - 135, - ), - hi: BytePos( - 151, - ), - ctxt: #0, - }, + span: 135..151#0, value: "EncryptedRequest", }, ), name: Some( Text { - span: Span { - lo: BytePos( - 135, - ), - hi: BytePos( - 167, - ), - ctxt: #0, - }, + span: 135..167#0, value: "@extends external:XMLHttpRequest", }, ), diff --git a/crates/jsdoc/tests/fixtures/externaltag3.debug b/crates/jsdoc/tests/fixtures/externaltag3.debug index 99a5a9b254bb..ea9887d7ad0a 100644 --- a/crates/jsdoc/tests/fixtures/externaltag3.debug +++ b/crates/jsdoc/tests/fixtures/externaltag3.debug @@ -1,118 +1,38 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 31, - ), - ctxt: #0, - }, + span: 1..31#0, value: "The built in string object.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "external", }, tag: External( ExternalTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "{String}", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 4, - ), - ctxt: #0, - }, + span: 1..4#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 4, - ), - ctxt: #0, - }, + span: 1..4#0, value: "see", }, tag: See( SeeTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 4, - ), - ctxt: #0, - }, + span: 1..4#0, text: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 91, - ), - ctxt: #0, - }, + span: 1..91#0, value: "{@link https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String String}", }, }, @@ -121,72 +41,24 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 162, - ), - hi: BytePos( - 162, - ), - ctxt: #0, - }, + span: 162..162#0, description: Text { - span: Span { - lo: BytePos( - 162, - ), - hi: BytePos( - 206, - ), - ctxt: #0, - }, + span: 162..206#0, value: "Adds a new method to the built-in string.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 162, - ), - hi: BytePos( - 170, - ), - ctxt: #0, - }, + span: 162..170#0, tag_name: Text { - span: Span { - lo: BytePos( - 162, - ), - hi: BytePos( - 170, - ), - ctxt: #0, - }, + span: 162..170#0, value: "function", }, tag: Function( FunctionTag { - span: Span { - lo: BytePos( - 162, - ), - hi: BytePos( - 170, - ), - ctxt: #0, - }, + span: 162..170#0, name: Some( Text { - span: Span { - lo: BytePos( - 162, - ), - hi: BytePos( - 183, - ), - ctxt: #0, - }, + span: 162..183#0, value: "external:String#rot13", }, ), @@ -194,48 +66,16 @@ ), }, TagItem { - span: Span { - lo: BytePos( - 162, - ), - hi: BytePos( - 169, - ), - ctxt: #0, - }, + span: 162..169#0, tag_name: Text { - span: Span { - lo: BytePos( - 162, - ), - hi: BytePos( - 169, - ), - ctxt: #0, - }, + span: 162..169#0, value: "example", }, tag: Example( ExampleTag { - span: Span { - lo: BytePos( - 162, - ), - hi: BytePos( - 169, - ), - ctxt: #0, - }, + span: 162..169#0, text: Text { - span: Span { - lo: BytePos( - 162, - ), - hi: BytePos( - 258, - ), - ctxt: #0, - }, + span: 162..258#0, value: "* var greeting = new String('hello world');\n * console.log( greeting.rot13() ); // uryyb jbeyq\n ", }, }, @@ -244,71 +84,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 359, - ), - hi: BytePos( - 359, - ), - ctxt: #0, - }, + span: 359..359#0, description: Text { - span: Span { - lo: BytePos( - 359, - ), - hi: BytePos( - 359, - ), - ctxt: #0, - }, + span: 359..359#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 359, - ), - hi: BytePos( - 367, - ), - ctxt: #0, - }, + span: 359..367#0, tag_name: Text { - span: Span { - lo: BytePos( - 359, - ), - hi: BytePos( - 367, - ), - ctxt: #0, - }, + span: 359..367#0, value: "external", }, tag: External( ExternalTag { - span: Span { - lo: BytePos( - 359, - ), - hi: BytePos( - 367, - ), - ctxt: #0, - }, + span: 359..367#0, name: Text { - span: Span { - lo: BytePos( - 359, - ), - hi: BytePos( - 374, - ), - ctxt: #0, - }, + span: 359..374#0, value: "{\"foo.bar.baz\"}", }, }, @@ -317,72 +109,24 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 398, - ), - hi: BytePos( - 398, - ), - ctxt: #0, - }, + span: 398..398#0, description: Text { - span: Span { - lo: BytePos( - 398, - ), - hi: BytePos( - 411, - ), - ctxt: #0, - }, + span: 398..411#0, value: "Blah blah\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 398, - ), - hi: BytePos( - 406, - ), - ctxt: #0, - }, + span: 398..406#0, tag_name: Text { - span: Span { - lo: BytePos( - 398, - ), - hi: BytePos( - 406, - ), - ctxt: #0, - }, + span: 398..406#0, value: "function", }, tag: Function( FunctionTag { - span: Span { - lo: BytePos( - 398, - ), - hi: BytePos( - 406, - ), - ctxt: #0, - }, + span: 398..406#0, name: Some( Text { - span: Span { - lo: BytePos( - 398, - ), - hi: BytePos( - 425, - ), - ctxt: #0, - }, + span: 398..425#0, value: "external:\"foo.bar.baz\"#blah", }, ), diff --git a/crates/jsdoc/tests/fixtures/externstag.debug b/crates/jsdoc/tests/fixtures/externstag.debug index 51d4594c86a2..247e1a538d28 100644 --- a/crates/jsdoc/tests/fixtures/externstag.debug +++ b/crates/jsdoc/tests/fixtures/externstag.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 31, - ), - ctxt: #0, - }, + span: 1..31#0, value: "This is an externs file.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, value: "externs", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, extras: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, diff --git a/crates/jsdoc/tests/fixtures/file.debug b/crates/jsdoc/tests/fixtures/file.debug index 55b62b60c1cc..544e232072b2 100644 --- a/crates/jsdoc/tests/fixtures/file.debug +++ b/crates/jsdoc/tests/fixtures/file.debug @@ -1,118 +1,38 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "overview", }, tag: File( FileTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, text: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 23, - ), - ctxt: #0, - }, + span: 1..23#0, value: "This is a file doclet.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, value: "copyright", }, tag: Copyright( CopyrightTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, text: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 21, - ), - ctxt: #0, - }, + span: 1..21#0, value: "Michael Mathews 2011", }, }, diff --git a/crates/jsdoc/tests/fixtures/fileoverviewtag.debug b/crates/jsdoc/tests/fixtures/fileoverviewtag.debug index d878da5b98d3..b0ac629056db 100644 --- a/crates/jsdoc/tests/fixtures/fileoverviewtag.debug +++ b/crates/jsdoc/tests/fixtures/fileoverviewtag.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 13, - ), - ctxt: #0, - }, + span: 1..13#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 13, - ), - ctxt: #0, - }, + span: 1..13#0, value: "fileoverview", }, tag: File( FileTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 13, - ), - ctxt: #0, - }, + span: 1..13#0, text: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 23, - ), - ctxt: #0, - }, + span: 1..23#0, value: "Overview of this file.", }, }, diff --git a/crates/jsdoc/tests/fixtures/funcExpression.debug b/crates/jsdoc/tests/fixtures/funcExpression.debug index fa1165a1c5c8..034149fda9fe 100644 --- a/crates/jsdoc/tests/fixtures/funcExpression.debug +++ b/crates/jsdoc/tests/fixtures/funcExpression.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, ty: None, name: None, }, @@ -63,49 +23,17 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 47, - ), - hi: BytePos( - 47, - ), - ctxt: #0, - }, + span: 47..47#0, description: Text { - span: Span { - lo: BytePos( - 47, - ), - hi: BytePos( - 58, - ), - ctxt: #0, - }, + span: 47..58#0, value: "document me", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 88, - ), - hi: BytePos( - 88, - ), - ctxt: #0, - }, + span: 88..88#0, description: Text { - span: Span { - lo: BytePos( - 88, - ), - hi: BytePos( - 99, - ), - ctxt: #0, - }, + span: 88..99#0, value: "document me", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/funcExpression2.debug b/crates/jsdoc/tests/fixtures/funcExpression2.debug index a1875c138729..50ff30ea7456 100644 --- a/crates/jsdoc/tests/fixtures/funcExpression2.debug +++ b/crates/jsdoc/tests/fixtures/funcExpression2.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, ty: None, name: None, }, @@ -63,49 +23,17 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 43, - ), - ctxt: #0, - }, + span: 43..43#0, description: Text { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 54, - ), - ctxt: #0, - }, + span: 43..54#0, value: "document me", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 84, - ), - hi: BytePos( - 84, - ), - ctxt: #0, - }, + span: 84..84#0, description: Text { - span: Span { - lo: BytePos( - 84, - ), - hi: BytePos( - 95, - ), - ctxt: #0, - }, + span: 84..95#0, value: "document me", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/funcExpression3.debug b/crates/jsdoc/tests/fixtures/funcExpression3.debug index e4a7528baec4..3bbfb5e4c5d8 100644 --- a/crates/jsdoc/tests/fixtures/funcExpression3.debug +++ b/crates/jsdoc/tests/fixtures/funcExpression3.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 12, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 12..12#0, description: Text { - span: Span { - lo: BytePos( - 12, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 12..12#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 12, - ), - hi: BytePos( - 17, - ), - ctxt: #0, - }, + span: 12..17#0, tag_name: Text { - span: Span { - lo: BytePos( - 12, - ), - hi: BytePos( - 17, - ), - ctxt: #0, - }, + span: 12..17#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 12, - ), - hi: BytePos( - 17, - ), - ctxt: #0, - }, + span: 12..17#0, ty: None, name: None, }, @@ -63,49 +23,17 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 61, - ), - hi: BytePos( - 61, - ), - ctxt: #0, - }, + span: 61..61#0, description: Text { - span: Span { - lo: BytePos( - 61, - ), - hi: BytePos( - 72, - ), - ctxt: #0, - }, + span: 61..72#0, value: "document me", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 110, - ), - hi: BytePos( - 110, - ), - ctxt: #0, - }, + span: 110..110#0, description: Text { - span: Span { - lo: BytePos( - 110, - ), - hi: BytePos( - 121, - ), - ctxt: #0, - }, + span: 110..121#0, value: "document me", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/functiontag.debug b/crates/jsdoc/tests/fixtures/functiontag.debug index 0052e8d6e130..e228b9bdbb91 100644 --- a/crates/jsdoc/tests/fixtures/functiontag.debug +++ b/crates/jsdoc/tests/fixtures/functiontag.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, value: "func", }, tag: Function( FunctionTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, name: None, }, ), @@ -62,61 +22,21 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 38, - ), - hi: BytePos( - 38, - ), - ctxt: #0, - }, + span: 38..38#0, description: Text { - span: Span { - lo: BytePos( - 38, - ), - hi: BytePos( - 38, - ), - ctxt: #0, - }, + span: 38..38#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 38, - ), - hi: BytePos( - 44, - ), - ctxt: #0, - }, + span: 38..44#0, tag_name: Text { - span: Span { - lo: BytePos( - 38, - ), - hi: BytePos( - 44, - ), - ctxt: #0, - }, + span: 38..44#0, value: "method", }, tag: Function( FunctionTag { - span: Span { - lo: BytePos( - 38, - ), - hi: BytePos( - 44, - ), - ctxt: #0, - }, + span: 38..44#0, name: None, }, ), diff --git a/crates/jsdoc/tests/fixtures/generators.debug b/crates/jsdoc/tests/fixtures/generators.debug index d006e35dd93a..3d7b5757e231 100644 --- a/crates/jsdoc/tests/fixtures/generators.debug +++ b/crates/jsdoc/tests/fixtures/generators.debug @@ -1,96 +1,32 @@ [ JsDoc { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 16..16#0, description: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 50, - ), - ctxt: #0, - }, + span: 16..50#0, value: "Generate unique IDs starting at 0.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 152, - ), - hi: BytePos( - 152, - ), - ctxt: #0, - }, + span: 152..152#0, description: Text { - span: Span { - lo: BytePos( - 152, - ), - hi: BytePos( - 186, - ), - ctxt: #0, - }, + span: 152..186#0, value: "Generate unique IDs starting at 1.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 305, - ), - hi: BytePos( - 305, - ), - ctxt: #0, - }, + span: 305..305#0, description: Text { - span: Span { - lo: BytePos( - 305, - ), - hi: BytePos( - 321, - ), - ctxt: #0, - }, + span: 305..321#0, value: "Generator class.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 351, - ), - hi: BytePos( - 351, - ), - ctxt: #0, - }, + span: 351..351#0, description: Text { - span: Span { - lo: BytePos( - 351, - ), - hi: BytePos( - 385, - ), - ctxt: #0, - }, + span: 351..385#0, value: "Generate unique IDs starting at 2.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/getset.debug b/crates/jsdoc/tests/fixtures/getset.debug index 05609290196a..293fd77c2b44 100644 --- a/crates/jsdoc/tests/fixtures/getset.debug +++ b/crates/jsdoc/tests/fixtures/getset.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, ty: None, name: None, }, @@ -63,82 +23,26 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 43, - ), - ctxt: #0, - }, + span: 43..43#0, description: Text { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 43, - ), - ctxt: #0, - }, + span: 43..43#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 48, - ), - ctxt: #0, - }, + span: 43..48#0, tag_name: Text { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 48, - ), - ctxt: #0, - }, + span: 43..48#0, value: "lends", }, tag: Lends( LendsTag { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 48, - ), - ctxt: #0, - }, + span: 43..48#0, name: NamePath { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 44, - ), - ctxt: #0, - }, + span: 43..44#0, components: [ Text { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 49, - ), - ctxt: #0, - }, + span: 43..49#0, value: "Person", }, ], @@ -149,119 +53,39 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 79, - ), - hi: BytePos( - 79, - ), - ctxt: #0, - }, + span: 79..79#0, description: Text { - span: Span { - lo: BytePos( - 79, - ), - hi: BytePos( - 101, - ), - ctxt: #0, - }, + span: 79..101#0, value: "Set up initial values.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 166, - ), - hi: BytePos( - 166, - ), - ctxt: #0, - }, + span: 166..166#0, description: Text { - span: Span { - lo: BytePos( - 166, - ), - hi: BytePos( - 182, - ), - ctxt: #0, - }, + span: 166..182#0, value: "Speak a message.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 295, - ), - hi: BytePos( - 295, - ), - ctxt: #0, - }, + span: 295..295#0, description: Text { - span: Span { - lo: BytePos( - 295, - ), - hi: BytePos( - 329, - ), - ctxt: #0, - }, + span: 295..329#0, value: "The name of the person.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 295, - ), - hi: BytePos( - 299, - ), - ctxt: #0, - }, + span: 295..299#0, tag_name: Text { - span: Span { - lo: BytePos( - 295, - ), - hi: BytePos( - 299, - ), - ctxt: #0, - }, + span: 295..299#0, value: "type", }, tag: Type( TypeTag { - span: Span { - lo: BytePos( - 295, - ), - hi: BytePos( - 299, - ), - ctxt: #0, - }, + span: 295..299#0, name: Text { - span: Span { - lo: BytePos( - 295, - ), - hi: BytePos( - 303, - ), - ctxt: #0, - }, + span: 295..303#0, value: "{string}", }, }, @@ -270,134 +94,46 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 444, - ), - hi: BytePos( - 444, - ), - ctxt: #0, - }, + span: 444..444#0, description: Text { - span: Span { - lo: BytePos( - 444, - ), - hi: BytePos( - 444, - ), - ctxt: #0, - }, + span: 444..444#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 444, - ), - hi: BytePos( - 448, - ), - ctxt: #0, - }, + span: 444..448#0, tag_name: Text { - span: Span { - lo: BytePos( - 444, - ), - hi: BytePos( - 448, - ), - ctxt: #0, - }, + span: 444..448#0, value: "type", }, tag: Type( TypeTag { - span: Span { - lo: BytePos( - 444, - ), - hi: BytePos( - 448, - ), - ctxt: #0, - }, + span: 444..448#0, name: Text { - span: Span { - lo: BytePos( - 444, - ), - hi: BytePos( - 452, - ), - ctxt: #0, - }, + span: 444..452#0, value: "{string}", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 444, - ), - hi: BytePos( - 449, - ), - ctxt: #0, - }, + span: 444..449#0, tag_name: Text { - span: Span { - lo: BytePos( - 444, - ), - hi: BytePos( - 449, - ), - ctxt: #0, - }, + span: 444..449#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 444, - ), - hi: BytePos( - 449, - ), - ctxt: #0, - }, + span: 444..449#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 444, - ), - hi: BytePos( - 447, - ), - ctxt: #0, - }, + span: 444..447#0, value: "val", }, ), desc: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -406,71 +142,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 583, - ), - hi: BytePos( - 583, - ), - ctxt: #0, - }, + span: 583..583#0, description: Text { - span: Span { - lo: BytePos( - 583, - ), - hi: BytePos( - 583, - ), - ctxt: #0, - }, + span: 583..583#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 583, - ), - hi: BytePos( - 587, - ), - ctxt: #0, - }, + span: 583..587#0, tag_name: Text { - span: Span { - lo: BytePos( - 583, - ), - hi: BytePos( - 587, - ), - ctxt: #0, - }, + span: 583..587#0, value: "type", }, tag: Type( TypeTag { - span: Span { - lo: BytePos( - 583, - ), - hi: BytePos( - 587, - ), - ctxt: #0, - }, + span: 583..587#0, name: Text { - span: Span { - lo: BytePos( - 583, - ), - hi: BytePos( - 591, - ), - ctxt: #0, - }, + span: 583..591#0, value: "{number}", }, }, diff --git a/crates/jsdoc/tests/fixtures/getset2.debug b/crates/jsdoc/tests/fixtures/getset2.debug index c727d64a81c3..5656911e14ff 100644 --- a/crates/jsdoc/tests/fixtures/getset2.debug +++ b/crates/jsdoc/tests/fixtures/getset2.debug @@ -1,94 +1,30 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 1..16#0, value: "Employee class.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 45, - ), - hi: BytePos( - 45, - ), - ctxt: #0, - }, + span: 45..45#0, description: Text { - span: Span { - lo: BytePos( - 45, - ), - hi: BytePos( - 61, - ), - ctxt: #0, - }, + span: 45..61#0, value: "Location.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 45, - ), - hi: BytePos( - 49, - ), - ctxt: #0, - }, + span: 45..49#0, tag_name: Text { - span: Span { - lo: BytePos( - 45, - ), - hi: BytePos( - 49, - ), - ctxt: #0, - }, + span: 45..49#0, value: "type", }, tag: Type( TypeTag { - span: Span { - lo: BytePos( - 45, - ), - hi: BytePos( - 49, - ), - ctxt: #0, - }, + span: 45..49#0, name: Text { - span: Span { - lo: BytePos( - 45, - ), - hi: BytePos( - 53, - ), - ctxt: #0, - }, + span: 45..53#0, value: "{string}", }, }, @@ -97,71 +33,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 159, - ), - hi: BytePos( - 168, - ), - ctxt: #0, - }, + span: 159..168#0, description: Text { - span: Span { - lo: BytePos( - 159, - ), - hi: BytePos( - 159, - ), - ctxt: #0, - }, + span: 159..159#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 159, - ), - hi: BytePos( - 163, - ), - ctxt: #0, - }, + span: 159..163#0, tag_name: Text { - span: Span { - lo: BytePos( - 159, - ), - hi: BytePos( - 163, - ), - ctxt: #0, - }, + span: 159..163#0, value: "type", }, tag: Type( TypeTag { - span: Span { - lo: BytePos( - 159, - ), - hi: BytePos( - 163, - ), - ctxt: #0, - }, + span: 159..163#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, diff --git a/crates/jsdoc/tests/fixtures/globaltag.debug b/crates/jsdoc/tests/fixtures/globaltag.debug index 39c24658c05d..cd5ec43151e9 100644 --- a/crates/jsdoc/tests/fixtures/globaltag.debug +++ b/crates/jsdoc/tests/fixtures/globaltag.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "global", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, extras: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 13, - ), - ctxt: #0, - }, + span: 1..13#0, value: "@constructor", }, }, @@ -73,71 +25,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 98, - ), - hi: BytePos( - 98, - ), - ctxt: #0, - }, + span: 98..98#0, description: Text { - span: Span { - lo: BytePos( - 98, - ), - hi: BytePos( - 98, - ), - ctxt: #0, - }, + span: 98..98#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 98, - ), - hi: BytePos( - 104, - ), - ctxt: #0, - }, + span: 98..104#0, tag_name: Text { - span: Span { - lo: BytePos( - 98, - ), - hi: BytePos( - 104, - ), - ctxt: #0, - }, + span: 98..104#0, value: "global", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 98, - ), - hi: BytePos( - 104, - ), - ctxt: #0, - }, + span: 98..104#0, extras: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, diff --git a/crates/jsdoc/tests/fixtures/hideconstructortag.debug b/crates/jsdoc/tests/fixtures/hideconstructortag.debug index 8778a79a945d..67eac76512fb 100644 --- a/crates/jsdoc/tests/fixtures/hideconstructortag.debug +++ b/crates/jsdoc/tests/fixtures/hideconstructortag.debug @@ -1,119 +1,39 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, value: "classdesc", }, tag: ClassDesc( JSDocClassDescTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, desc: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 19, - ), - ctxt: #0, - }, + span: 1..19#0, value: "Toaster singleton.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 19, - ), - ctxt: #0, - }, + span: 1..19#0, value: "* @hideconstructor", }, ), @@ -124,82 +44,26 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 157, - ), - hi: BytePos( - 157, - ), - ctxt: #0, - }, + span: 157..157#0, description: Text { - span: Span { - lo: BytePos( - 157, - ), - hi: BytePos( - 185, - ), - ctxt: #0, - }, + span: 157..185#0, value: "Toast an item.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 157, - ), - hi: BytePos( - 162, - ), - ctxt: #0, - }, + span: 157..162#0, tag_name: Text { - span: Span { - lo: BytePos( - 157, - ), - hi: BytePos( - 162, - ), - ctxt: #0, - }, + span: 157..162#0, value: "alias", }, tag: Alias( AliasTag { - span: Span { - lo: BytePos( - 157, - ), - hi: BytePos( - 162, - ), - ctxt: #0, - }, + span: 157..162#0, name_path: NamePath { - span: Span { - lo: BytePos( - 157, - ), - hi: BytePos( - 305, - ), - ctxt: #0, - }, + span: 157..305#0, components: [ Text { - span: Span { - lo: BytePos( - 157, - ), - hi: BytePos( - 162, - ), - ctxt: #0, - }, + span: 157..162#0, value: "toast", }, ], @@ -208,59 +72,19 @@ ), }, TagItem { - span: Span { - lo: BytePos( - 157, - ), - hi: BytePos( - 165, - ), - ctxt: #0, - }, + span: 157..165#0, tag_name: Text { - span: Span { - lo: BytePos( - 157, - ), - hi: BytePos( - 165, - ), - ctxt: #0, - }, + span: 157..165#0, value: "memberof", }, tag: MemberOf( MemberOfTag { - span: Span { - lo: BytePos( - 157, - ), - hi: BytePos( - 165, - ), - ctxt: #0, - }, + span: 157..165#0, parent_name_path: NamePath { - span: Span { - lo: BytePos( - 157, - ), - hi: BytePos( - 280, - ), - ctxt: #0, - }, + span: 157..280#0, components: [ Text { - span: Span { - lo: BytePos( - 157, - ), - hi: BytePos( - 164, - ), - ctxt: #0, - }, + span: 157..164#0, value: "Toaster", }, ], @@ -269,161 +93,57 @@ ), }, TagItem { - span: Span { - lo: BytePos( - 157, - ), - hi: BytePos( - 165, - ), - ctxt: #0, - }, + span: 157..165#0, tag_name: Text { - span: Span { - lo: BytePos( - 157, - ), - hi: BytePos( - 165, - ), - ctxt: #0, - }, + span: 157..165#0, value: "instance", }, tag: Instance( InstanceTag { - span: Span { - lo: BytePos( - 157, - ), - hi: BytePos( - 165, - ), - ctxt: #0, - }, + span: 157..165#0, }, ), }, TagItem { - span: Span { - lo: BytePos( - 157, - ), - hi: BytePos( - 162, - ), - ctxt: #0, - }, + span: 157..162#0, tag_name: Text { - span: Span { - lo: BytePos( - 157, - ), - hi: BytePos( - 162, - ), - ctxt: #0, - }, + span: 157..162#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 157, - ), - hi: BytePos( - 162, - ), - ctxt: #0, - }, + span: 157..162#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 157, - ), - hi: BytePos( - 170, - ), - ctxt: #0, - }, + span: 157..170#0, value: "{BreadyThing}", }, ), desc: Text { - span: Span { - lo: BytePos( - 157, - ), - hi: BytePos( - 182, - ), - ctxt: #0, - }, + span: 157..182#0, value: "item - The item to toast.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 157, - ), - hi: BytePos( - 163, - ), - ctxt: #0, - }, + span: 157..163#0, tag_name: Text { - span: Span { - lo: BytePos( - 157, - ), - hi: BytePos( - 163, - ), - ctxt: #0, - }, + span: 157..163#0, value: "return", }, tag: Return( ReturnTag { - span: Span { - lo: BytePos( - 157, - ), - hi: BytePos( - 163, - ), - ctxt: #0, - }, + span: 157..163#0, ty: Some( Text { - span: Span { - lo: BytePos( - 157, - ), - hi: BytePos( - 164, - ), - ctxt: #0, - }, + span: 157..164#0, value: "{Toast}", }, ), description: Text { - span: Span { - lo: BytePos( - 157, - ), - hi: BytePos( - 180, - ), - ctxt: #0, - }, + span: 157..180#0, value: "A toasted bready thing.", }, }, @@ -432,82 +152,26 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 432, - ), - hi: BytePos( - 505, - ), - ctxt: #0, - }, + span: 432..505#0, description: Text { - span: Span { - lo: BytePos( - 432, - ), - hi: BytePos( - 479, - ), - ctxt: #0, - }, + span: 432..479#0, value: "Get the Toaster instance.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 432, - ), - hi: BytePos( - 437, - ), - ctxt: #0, - }, + span: 432..437#0, tag_name: Text { - span: Span { - lo: BytePos( - 432, - ), - hi: BytePos( - 437, - ), - ctxt: #0, - }, + span: 432..437#0, value: "alias", }, tag: Alias( AliasTag { - span: Span { - lo: BytePos( - 432, - ), - hi: BytePos( - 437, - ), - ctxt: #0, - }, + span: 432..437#0, name_path: NamePath { - span: Span { - lo: BytePos( - 432, - ), - hi: BytePos( - 505, - ), - ctxt: #0, - }, + span: 432..505#0, components: [ Text { - span: Span { - lo: BytePos( - 432, - ), - hi: BytePos( - 439, - ), - ctxt: #0, - }, + span: 432..439#0, value: "Toaster", }, ], @@ -518,233 +182,81 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 812, - ), - hi: BytePos( - 812, - ), - ctxt: #0, - }, + span: 812..812#0, description: Text { - span: Span { - lo: BytePos( - 812, - ), - hi: BytePos( - 834, - ), - ctxt: #0, - }, + span: 812..834#0, value: "Waffle iron singleton.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 892, - ), - hi: BytePos( - 892, - ), - ctxt: #0, - }, + span: 892..892#0, description: Text { - span: Span { - lo: BytePos( - 892, - ), - hi: BytePos( - 929, - ), - ctxt: #0, - }, + span: 892..929#0, value: "Create the waffle iron.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 892, - ), - hi: BytePos( - 907, - ), - ctxt: #0, - }, + span: 892..907#0, tag_name: Text { - span: Span { - lo: BytePos( - 892, - ), - hi: BytePos( - 907, - ), - ctxt: #0, - }, + span: 892..907#0, value: "hideconstructor", }, tag: HideConstructor( HideConstructorTag { - span: Span { - lo: BytePos( - 892, - ), - hi: BytePos( - 907, - ), - ctxt: #0, - }, + span: 892..907#0, }, ), }, ], }, JsDoc { - span: Span { - lo: BytePos( - 1070, - ), - hi: BytePos( - 1070, - ), - ctxt: #0, - }, + span: 1070..1070#0, description: Text { - span: Span { - lo: BytePos( - 1070, - ), - hi: BytePos( - 1106, - ), - ctxt: #0, - }, + span: 1070..1106#0, value: "Cook a waffle.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1070, - ), - hi: BytePos( - 1075, - ), - ctxt: #0, - }, + span: 1070..1075#0, tag_name: Text { - span: Span { - lo: BytePos( - 1070, - ), - hi: BytePos( - 1075, - ), - ctxt: #0, - }, + span: 1070..1075#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 1070, - ), - hi: BytePos( - 1075, - ), - ctxt: #0, - }, + span: 1070..1075#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 1070, - ), - hi: BytePos( - 1078, - ), - ctxt: #0, - }, + span: 1070..1078#0, value: "{Batter}", }, ), desc: Text { - span: Span { - lo: BytePos( - 1070, - ), - hi: BytePos( - 1097, - ), - ctxt: #0, - }, + span: 1070..1097#0, value: "batter - The waffle batter.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 1070, - ), - hi: BytePos( - 1076, - ), - ctxt: #0, - }, + span: 1070..1076#0, tag_name: Text { - span: Span { - lo: BytePos( - 1070, - ), - hi: BytePos( - 1076, - ), - ctxt: #0, - }, + span: 1070..1076#0, value: "return", }, tag: Return( ReturnTag { - span: Span { - lo: BytePos( - 1070, - ), - hi: BytePos( - 1076, - ), - ctxt: #0, - }, + span: 1070..1076#0, ty: Some( Text { - span: Span { - lo: BytePos( - 1070, - ), - hi: BytePos( - 1078, - ), - ctxt: #0, - }, + span: 1070..1078#0, value: "{Waffle}", }, ), description: Text { - span: Span { - lo: BytePos( - 1070, - ), - hi: BytePos( - 1088, - ), - ctxt: #0, - }, + span: 1070..1088#0, value: "The cooked waffle.", }, }, @@ -753,85 +265,29 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 1309, - ), - hi: BytePos( - 1309, - ), - ctxt: #0, - }, + span: 1309..1309#0, description: Text { - span: Span { - lo: BytePos( - 1309, - ), - hi: BytePos( - 1351, - ), - ctxt: #0, - }, + span: 1309..1351#0, value: "Get the WaffleIron instance.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1309, - ), - hi: BytePos( - 1315, - ), - ctxt: #0, - }, + span: 1309..1315#0, tag_name: Text { - span: Span { - lo: BytePos( - 1309, - ), - hi: BytePos( - 1315, - ), - ctxt: #0, - }, + span: 1309..1315#0, value: "return", }, tag: Return( ReturnTag { - span: Span { - lo: BytePos( - 1309, - ), - hi: BytePos( - 1315, - ), - ctxt: #0, - }, + span: 1309..1315#0, ty: Some( Text { - span: Span { - lo: BytePos( - 1309, - ), - hi: BytePos( - 1321, - ), - ctxt: #0, - }, + span: 1309..1321#0, value: "{WaffleIron}", }, ), description: Text { - span: Span { - lo: BytePos( - 1309, - ), - hi: BytePos( - 1333, - ), - ctxt: #0, - }, + span: 1309..1333#0, value: "The WaffleIron instance.", }, }, diff --git a/crates/jsdoc/tests/fixtures/ignoretag.debug b/crates/jsdoc/tests/fixtures/ignoretag.debug index 29de0aadfb71..3f44c72e9bc6 100644 --- a/crates/jsdoc/tests/fixtures/ignoretag.debug +++ b/crates/jsdoc/tests/fixtures/ignoretag.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "ignore", }, tag: Ignore( IgnoreTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, }, ), }, diff --git a/crates/jsdoc/tests/fixtures/ignoretag2.debug b/crates/jsdoc/tests/fixtures/ignoretag2.debug index c0a697b888b4..ca965c551a38 100644 --- a/crates/jsdoc/tests/fixtures/ignoretag2.debug +++ b/crates/jsdoc/tests/fixtures/ignoretag2.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 30, - ), - ctxt: #0, - }, + span: 1..30#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "ignore", }, tag: Ignore( IgnoreTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, }, ), }, diff --git a/crates/jsdoc/tests/fixtures/implicitcasttag.debug b/crates/jsdoc/tests/fixtures/implicitcasttag.debug index 38fce037e4e8..439bfd94637b 100644 --- a/crates/jsdoc/tests/fixtures/implicitcasttag.debug +++ b/crates/jsdoc/tests/fixtures/implicitcasttag.debug @@ -1,118 +1,38 @@ [ JsDoc { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 20, - ), - ctxt: #0, - }, + span: 20..20#0, description: Text { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 20, - ), - ctxt: #0, - }, + span: 20..20#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 24, - ), - ctxt: #0, - }, + span: 20..24#0, tag_name: Text { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 24, - ), - ctxt: #0, - }, + span: 20..24#0, value: "type", }, tag: Type( TypeTag { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 24, - ), - ctxt: #0, - }, + span: 20..24#0, name: Text { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 28, - ), - ctxt: #0, - }, + span: 20..28#0, value: "{string}", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 32, - ), - ctxt: #0, - }, + span: 20..32#0, tag_name: Text { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 32, - ), - ctxt: #0, - }, + span: 20..32#0, value: "implicitCast", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 32, - ), - ctxt: #0, - }, + span: 20..32#0, extras: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, diff --git a/crates/jsdoc/tests/fixtures/inheritdoctag.debug b/crates/jsdoc/tests/fixtures/inheritdoctag.debug index 7970b53eeb1c..4bd323d2e6ae 100644 --- a/crates/jsdoc/tests/fixtures/inheritdoctag.debug +++ b/crates/jsdoc/tests/fixtures/inheritdoctag.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 17, - ), - ctxt: #0, - }, + span: 1..17#0, value: "Parent class.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, ty: None, name: None, }, @@ -63,157 +23,53 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 62, - ), - hi: BytePos( - 62, - ), - ctxt: #0, - }, + span: 62..62#0, description: Text { - span: Span { - lo: BytePos( - 62, - ), - hi: BytePos( - 85, - ), - ctxt: #0, - }, + span: 62..85#0, value: "Open the connection.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 62, - ), - hi: BytePos( - 69, - ), - ctxt: #0, - }, + span: 62..69#0, tag_name: Text { - span: Span { - lo: BytePos( - 62, - ), - hi: BytePos( - 69, - ), - ctxt: #0, - }, + span: 62..69#0, value: "virtual", }, tag: Abstract( AbstractTag { - span: Span { - lo: BytePos( - 62, - ), - hi: BytePos( - 69, - ), - ctxt: #0, - }, + span: 62..69#0, }, ), }, ], }, JsDoc { - span: Span { - lo: BytePos( - 150, - ), - hi: BytePos( - 150, - ), - ctxt: #0, - }, + span: 150..150#0, description: Text { - span: Span { - lo: BytePos( - 150, - ), - hi: BytePos( - 171, - ), - ctxt: #0, - }, + span: 150..171#0, value: "Close the connection.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 228, - ), - ctxt: #0, - }, + span: 228..228#0, description: Text { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 289, - ), - ctxt: #0, - }, + span: 228..289#0, value: "Read the specified number of bytes from the connection.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 236, - ), - ctxt: #0, - }, + span: 228..236#0, tag_name: Text { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 236, - ), - ctxt: #0, - }, + span: 228..236#0, value: "function", }, tag: Function( FunctionTag { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 236, - ), - ctxt: #0, - }, + span: 228..236#0, name: Some( Text { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 243, - ), - ctxt: #0, - }, + span: 228..243#0, value: "Connection#read", }, ), @@ -221,125 +77,45 @@ ), }, TagItem { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 233, - ), - ctxt: #0, - }, + span: 228..233#0, tag_name: Text { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 233, - ), - ctxt: #0, - }, + span: 228..233#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 233, - ), - ctxt: #0, - }, + span: 228..233#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 236, - ), - ctxt: #0, - }, + span: 228..236#0, value: "{number}", }, ), desc: Text { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 264, - ), - ctxt: #0, - }, + span: 228..264#0, value: "bytes - The number of bytes to read.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 234, - ), - ctxt: #0, - }, + span: 228..234#0, tag_name: Text { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 234, - ), - ctxt: #0, - }, + span: 228..234#0, value: "return", }, tag: Return( ReturnTag { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 234, - ), - ctxt: #0, - }, + span: 228..234#0, ty: Some( Text { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 236, - ), - ctxt: #0, - }, + span: 228..236#0, value: "{Buffer}", }, ), description: Text { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 253, - ), - ctxt: #0, - }, + span: 228..253#0, value: "The bytes that were read.", }, }, @@ -348,72 +124,24 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 478, - ), - hi: BytePos( - 478, - ), - ctxt: #0, - }, + span: 478..478#0, description: Text { - span: Span { - lo: BytePos( - 478, - ), - hi: BytePos( - 493, - ), - ctxt: #0, - }, + span: 478..493#0, value: "Child class.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 478, - ), - hi: BytePos( - 483, - ), - ctxt: #0, - }, + span: 478..483#0, tag_name: Text { - span: Span { - lo: BytePos( - 478, - ), - hi: BytePos( - 483, - ), - ctxt: #0, - }, + span: 478..483#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 478, - ), - hi: BytePos( - 483, - ), - ctxt: #0, - }, + span: 478..483#0, ty: Some( Text { - span: Span { - lo: BytePos( - 478, - ), - hi: BytePos( - 499, - ), - ctxt: #0, - }, + span: 478..499#0, value: "* @extends Connection", }, ), @@ -424,246 +152,86 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 557, - ), - hi: BytePos( - 557, - ), - ctxt: #0, - }, + span: 557..557#0, description: Text { - span: Span { - lo: BytePos( - 557, - ), - hi: BytePos( - 557, - ), - ctxt: #0, - }, + span: 557..557#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 557, - ), - hi: BytePos( - 567, - ), - ctxt: #0, - }, + span: 557..567#0, tag_name: Text { - span: Span { - lo: BytePos( - 557, - ), - hi: BytePos( - 567, - ), - ctxt: #0, - }, + span: 557..567#0, value: "inheritdoc", }, tag: InheritDoc( InheritDocTag { - span: Span { - lo: BytePos( - 557, - ), - hi: BytePos( - 567, - ), - ctxt: #0, - }, + span: 557..567#0, }, ), }, ], }, JsDoc { - span: Span { - lo: BytePos( - 616, - ), - hi: BytePos( - 616, - ), - ctxt: #0, - }, + span: 616..616#0, description: Text { - span: Span { - lo: BytePos( - 616, - ), - hi: BytePos( - 636, - ), - ctxt: #0, - }, + span: 616..636#0, value: "Close the socket.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 616, - ), - hi: BytePos( - 621, - ), - ctxt: #0, - }, + span: 616..621#0, tag_name: Text { - span: Span { - lo: BytePos( - 616, - ), - hi: BytePos( - 621, - ), - ctxt: #0, - }, + span: 616..621#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 616, - ), - hi: BytePos( - 621, - ), - ctxt: #0, - }, + span: 616..621#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 616, - ), - hi: BytePos( - 624, - ), - ctxt: #0, - }, + span: 616..624#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 616, - ), - hi: BytePos( - 678, - ), - ctxt: #0, - }, + span: 616..678#0, value: "message - A message explaining why the socket is being closed.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 616, - ), - hi: BytePos( - 626, - ), - ctxt: #0, - }, + span: 616..626#0, tag_name: Text { - span: Span { - lo: BytePos( - 616, - ), - hi: BytePos( - 626, - ), - ctxt: #0, - }, + span: 616..626#0, value: "inheritdoc", }, tag: InheritDoc( InheritDocTag { - span: Span { - lo: BytePos( - 616, - ), - hi: BytePos( - 626, - ), - ctxt: #0, - }, + span: 616..626#0, }, ), }, ], }, JsDoc { - span: Span { - lo: BytePos( - 783, - ), - hi: BytePos( - 783, - ), - ctxt: #0, - }, + span: 783..783#0, description: Text { - span: Span { - lo: BytePos( - 783, - ), - hi: BytePos( - 783, - ), - ctxt: #0, - }, + span: 783..783#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 783, - ), - hi: BytePos( - 793, - ), - ctxt: #0, - }, + span: 783..793#0, tag_name: Text { - span: Span { - lo: BytePos( - 783, - ), - hi: BytePos( - 793, - ), - ctxt: #0, - }, + span: 783..793#0, value: "inheritdoc", }, tag: InheritDoc( InheritDocTag { - span: Span { - lo: BytePos( - 783, - ), - hi: BytePos( - 793, - ), - ctxt: #0, - }, + span: 783..793#0, }, ), }, diff --git a/crates/jsdoc/tests/fixtures/inlinecomment.debug b/crates/jsdoc/tests/fixtures/inlinecomment.debug index 4da57bbdab2e..ae29cea4c99a 100644 --- a/crates/jsdoc/tests/fixtures/inlinecomment.debug +++ b/crates/jsdoc/tests/fixtures/inlinecomment.debug @@ -1,48 +1,16 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 17, - ), - ctxt: #0, - }, + span: 1..17#0, value: "Inline Comment 1", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 50, - ), - hi: BytePos( - 50, - ), - ctxt: #0, - }, + span: 50..50#0, description: Text { - span: Span { - lo: BytePos( - 50, - ), - hi: BytePos( - 66, - ), - ctxt: #0, - }, + span: 50..66#0, value: "Inline Comment 2", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/inlineparamcomment.debug b/crates/jsdoc/tests/fixtures/inlineparamcomment.debug index a78babe92dc3..e18aa149fc59 100644 --- a/crates/jsdoc/tests/fixtures/inlineparamcomment.debug +++ b/crates/jsdoc/tests/fixtures/inlineparamcomment.debug @@ -1,48 +1,16 @@ [ JsDoc { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 30, - ), - ctxt: #0, - }, + span: 30..30#0, description: Text { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 36, - ), - ctxt: #0, - }, + span: 30..36#0, value: "Number", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 47, - ), - hi: BytePos( - 47, - ), - ctxt: #0, - }, + span: 47..47#0, description: Text { - span: Span { - lo: BytePos( - 47, - ), - hi: BytePos( - 53, - ), - ctxt: #0, - }, + span: 47..53#0, value: "Number", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/inlineparamcomment2.debug b/crates/jsdoc/tests/fixtures/inlineparamcomment2.debug index 661f5ef63491..31519875b279 100644 --- a/crates/jsdoc/tests/fixtures/inlineparamcomment2.debug +++ b/crates/jsdoc/tests/fixtures/inlineparamcomment2.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 39, - ), - ctxt: #0, - }, + span: 30..39#0, description: Text { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 30, - ), - ctxt: #0, - }, + span: 30..30#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 34, - ), - ctxt: #0, - }, + span: 30..34#0, tag_name: Text { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 34, - ), - ctxt: #0, - }, + span: 30..34#0, value: "type", }, tag: Type( TypeTag { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 34, - ), - ctxt: #0, - }, + span: 30..34#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -73,71 +25,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 62, - ), - hi: BytePos( - 71, - ), - ctxt: #0, - }, + span: 62..71#0, description: Text { - span: Span { - lo: BytePos( - 62, - ), - hi: BytePos( - 62, - ), - ctxt: #0, - }, + span: 62..62#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 62, - ), - hi: BytePos( - 66, - ), - ctxt: #0, - }, + span: 62..66#0, tag_name: Text { - span: Span { - lo: BytePos( - 62, - ), - hi: BytePos( - 66, - ), - ctxt: #0, - }, + span: 62..66#0, value: "type", }, tag: Type( TypeTag { - span: Span { - lo: BytePos( - 62, - ), - hi: BytePos( - 66, - ), - ctxt: #0, - }, + span: 62..66#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, diff --git a/crates/jsdoc/tests/fixtures/inner.debug b/crates/jsdoc/tests/fixtures/inner.debug index 57207ae09efe..20e1656212b1 100644 --- a/crates/jsdoc/tests/fixtures/inner.debug +++ b/crates/jsdoc/tests/fixtures/inner.debug @@ -1,48 +1,16 @@ [ JsDoc { - span: Span { - lo: BytePos( - 34, - ), - hi: BytePos( - 34, - ), - ctxt: #0, - }, + span: 34..34#0, description: Text { - span: Span { - lo: BytePos( - 34, - ), - hi: BytePos( - 45, - ), - ctxt: #0, - }, + span: 34..45#0, value: "document me", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 85, - ), - hi: BytePos( - 85, - ), - ctxt: #0, - }, + span: 85..85#0, description: Text { - span: Span { - lo: BytePos( - 85, - ), - hi: BytePos( - 96, - ), - ctxt: #0, - }, + span: 85..96#0, value: "document me", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/innerscope.debug b/crates/jsdoc/tests/fixtures/innerscope.debug index 74fbf2a8528a..a8d31f542a41 100644 --- a/crates/jsdoc/tests/fixtures/innerscope.debug +++ b/crates/jsdoc/tests/fixtures/innerscope.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, ty: None, name: None, }, @@ -63,73 +23,25 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 90, - ), - hi: BytePos( - 90, - ), - ctxt: #0, - }, + span: 90..90#0, description: Text { - span: Span { - lo: BytePos( - 90, - ), - hi: BytePos( - 101, - ), - ctxt: #0, - }, + span: 90..101#0, value: "document me", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 157, - ), - hi: BytePos( - 157, - ), - ctxt: #0, - }, + span: 157..157#0, description: Text { - span: Span { - lo: BytePos( - 157, - ), - hi: BytePos( - 168, - ), - ctxt: #0, - }, + span: 157..168#0, value: "document me", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 216, - ), - hi: BytePos( - 216, - ), - ctxt: #0, - }, + span: 216..216#0, description: Text { - span: Span { - lo: BytePos( - 216, - ), - hi: BytePos( - 227, - ), - ctxt: #0, - }, + span: 216..227#0, value: "document me", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/innerscope2.debug b/crates/jsdoc/tests/fixtures/innerscope2.debug index cb4b1f22da01..d42e7979f9df 100644 --- a/crates/jsdoc/tests/fixtures/innerscope2.debug +++ b/crates/jsdoc/tests/fixtures/innerscope2.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, ty: None, name: None, }, @@ -63,73 +23,25 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 72, - ), - hi: BytePos( - 72, - ), - ctxt: #0, - }, + span: 72..72#0, description: Text { - span: Span { - lo: BytePos( - 72, - ), - hi: BytePos( - 83, - ), - ctxt: #0, - }, + span: 72..83#0, value: "document me", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 167, - ), - hi: BytePos( - 167, - ), - ctxt: #0, - }, + span: 167..167#0, description: Text { - span: Span { - lo: BytePos( - 167, - ), - hi: BytePos( - 178, - ), - ctxt: #0, - }, + span: 167..178#0, value: "document me", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 228, - ), - ctxt: #0, - }, + span: 228..228#0, description: Text { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 239, - ), - ctxt: #0, - }, + span: 228..239#0, value: "document me", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/instanceproperty.debug b/crates/jsdoc/tests/fixtures/instanceproperty.debug index 5465dc23068e..c2d45e84e920 100644 --- a/crates/jsdoc/tests/fixtures/instanceproperty.debug +++ b/crates/jsdoc/tests/fixtures/instanceproperty.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, ty: None, name: None, }, @@ -63,49 +23,17 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 34, - ), - hi: BytePos( - 34, - ), - ctxt: #0, - }, + span: 34..34#0, description: Text { - span: Span { - lo: BytePos( - 34, - ), - hi: BytePos( - 46, - ), - ctxt: #0, - }, + span: 34..46#0, value: "Set the bar.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 97, - ), - hi: BytePos( - 97, - ), - ctxt: #0, - }, + span: 97..97#0, description: Text { - span: Span { - lo: BytePos( - 97, - ), - hi: BytePos( - 105, - ), - ctxt: #0, - }, + span: 97..105#0, value: "The bar.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/interface-implements.debug b/crates/jsdoc/tests/fixtures/interface-implements.debug index 6a721f14a8f9..6bc234ef7da8 100644 --- a/crates/jsdoc/tests/fixtures/interface-implements.debug +++ b/crates/jsdoc/tests/fixtures/interface-implements.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 16..16#0, description: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 16..16#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 25, - ), - ctxt: #0, - }, + span: 16..25#0, tag_name: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 25, - ), - ctxt: #0, - }, + span: 16..25#0, value: "interface", }, tag: Interface( InterfaceTag { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 25, - ), - ctxt: #0, - }, + span: 16..25#0, name: None, }, ), @@ -62,71 +22,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 61, - ), - hi: BytePos( - 61, - ), - ctxt: #0, - }, + span: 61..61#0, description: Text { - span: Span { - lo: BytePos( - 61, - ), - hi: BytePos( - 61, - ), - ctxt: #0, - }, + span: 61..61#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 61, - ), - hi: BytePos( - 65, - ), - ctxt: #0, - }, + span: 61..65#0, tag_name: Text { - span: Span { - lo: BytePos( - 61, - ), - hi: BytePos( - 65, - ), - ctxt: #0, - }, + span: 61..65#0, value: "type", }, tag: Type( TypeTag { - span: Span { - lo: BytePos( - 61, - ), - hi: BytePos( - 65, - ), - ctxt: #0, - }, + span: 61..65#0, name: Text { - span: Span { - lo: BytePos( - 61, - ), - hi: BytePos( - 69, - ), - ctxt: #0, - }, + span: 61..69#0, value: "{string}", }, }, @@ -135,71 +47,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 121, - ), - hi: BytePos( - 121, - ), - ctxt: #0, - }, + span: 121..121#0, description: Text { - span: Span { - lo: BytePos( - 121, - ), - hi: BytePos( - 121, - ), - ctxt: #0, - }, + span: 121..121#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 121, - ), - hi: BytePos( - 125, - ), - ctxt: #0, - }, + span: 121..125#0, tag_name: Text { - span: Span { - lo: BytePos( - 121, - ), - hi: BytePos( - 125, - ), - ctxt: #0, - }, + span: 121..125#0, value: "enum", }, tag: Enum( EnumTag { - span: Span { - lo: BytePos( - 121, - ), - hi: BytePos( - 125, - ), - ctxt: #0, - }, + span: 121..125#0, ty: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -208,120 +72,40 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 189, - ), - hi: BytePos( - 189, - ), - ctxt: #0, - }, + span: 189..189#0, description: Text { - span: Span { - lo: BytePos( - 189, - ), - hi: BytePos( - 207, - ), - ctxt: #0, - }, + span: 189..207#0, value: "before each method", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 266, - ), - hi: BytePos( - 266, - ), - ctxt: #0, - }, + span: 266..266#0, description: Text { - span: Span { - lo: BytePos( - 266, - ), - hi: BytePos( - 276, - ), - ctxt: #0, - }, + span: 266..276#0, value: "it method.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 327, - ), - hi: BytePos( - 327, - ), - ctxt: #0, - }, + span: 327..327#0, description: Text { - span: Span { - lo: BytePos( - 327, - ), - hi: BytePos( - 327, - ), - ctxt: #0, - }, + span: 327..327#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 327, - ), - hi: BytePos( - 338, - ), - ctxt: #0, - }, + span: 327..338#0, tag_name: Text { - span: Span { - lo: BytePos( - 327, - ), - hi: BytePos( - 338, - ), - ctxt: #0, - }, + span: 327..338#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 327, - ), - hi: BytePos( - 338, - ), - ctxt: #0, - }, + span: 327..338#0, ty: Some( Text { - span: Span { - lo: BytePos( - 327, - ), - hi: BytePos( - 350, - ), - ctxt: #0, - }, + span: 327..350#0, value: "* @implements {ITester}", }, ), @@ -332,71 +116,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 400, - ), - hi: BytePos( - 409, - ), - ctxt: #0, - }, + span: 400..409#0, description: Text { - span: Span { - lo: BytePos( - 400, - ), - hi: BytePos( - 400, - ), - ctxt: #0, - }, + span: 400..400#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 400, - ), - hi: BytePos( - 404, - ), - ctxt: #0, - }, + span: 400..404#0, tag_name: Text { - span: Span { - lo: BytePos( - 400, - ), - hi: BytePos( - 404, - ), - ctxt: #0, - }, + span: 400..404#0, value: "type", }, tag: Type( TypeTag { - span: Span { - lo: BytePos( - 400, - ), - hi: BytePos( - 404, - ), - ctxt: #0, - }, + span: 400..404#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -405,71 +141,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 457, - ), - hi: BytePos( - 457, - ), - ctxt: #0, - }, + span: 457..457#0, description: Text { - span: Span { - lo: BytePos( - 457, - ), - hi: BytePos( - 457, - ), - ctxt: #0, - }, + span: 457..457#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 457, - ), - hi: BytePos( - 461, - ), - ctxt: #0, - }, + span: 457..461#0, tag_name: Text { - span: Span { - lo: BytePos( - 457, - ), - hi: BytePos( - 461, - ), - ctxt: #0, - }, + span: 457..461#0, value: "enum", }, tag: Enum( EnumTag { - span: Span { - lo: BytePos( - 457, - ), - hi: BytePos( - 461, - ), - ctxt: #0, - }, + span: 457..461#0, ty: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -478,109 +166,37 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 492, - ), - hi: BytePos( - 492, - ), - ctxt: #0, - }, + span: 492..492#0, description: Text { - span: Span { - lo: BytePos( - 492, - ), - hi: BytePos( - 503, - ), - ctxt: #0, - }, + span: 492..503#0, value: "keyboard up", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 561, - ), - hi: BytePos( - 561, - ), - ctxt: #0, - }, + span: 561..561#0, description: Text { - span: Span { - lo: BytePos( - 561, - ), - hi: BytePos( - 591, - ), - ctxt: #0, - }, + span: 561..591#0, value: "my tester's beforeEach method.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 690, - ), - hi: BytePos( - 690, - ), - ctxt: #0, - }, + span: 690..690#0, description: Text { - span: Span { - lo: BytePos( - 690, - ), - hi: BytePos( - 690, - ), - ctxt: #0, - }, + span: 690..690#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 690, - ), - hi: BytePos( - 699, - ), - ctxt: #0, - }, + span: 690..699#0, tag_name: Text { - span: Span { - lo: BytePos( - 690, - ), - hi: BytePos( - 699, - ), - ctxt: #0, - }, + span: 690..699#0, value: "interface", }, tag: Interface( InterfaceTag { - span: Span { - lo: BytePos( - 690, - ), - hi: BytePos( - 699, - ), - ctxt: #0, - }, + span: 690..699#0, name: None, }, ), @@ -588,96 +204,32 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 734, - ), - hi: BytePos( - 734, - ), - ctxt: #0, - }, + span: 734..734#0, description: Text { - span: Span { - lo: BytePos( - 734, - ), - hi: BytePos( - 764, - ), - ctxt: #0, - }, + span: 734..764#0, value: "Interface for doing some work.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 813, - ), - hi: BytePos( - 813, - ), - ctxt: #0, - }, + span: 813..813#0, description: Text { - span: Span { - lo: BytePos( - 813, - ), - hi: BytePos( - 813, - ), - ctxt: #0, - }, + span: 813..813#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 813, - ), - hi: BytePos( - 824, - ), - ctxt: #0, - }, + span: 813..824#0, tag_name: Text { - span: Span { - lo: BytePos( - 813, - ), - hi: BytePos( - 824, - ), - ctxt: #0, - }, + span: 813..824#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 813, - ), - hi: BytePos( - 824, - ), - ctxt: #0, - }, + span: 813..824#0, ty: Some( Text { - span: Span { - lo: BytePos( - 813, - ), - hi: BytePos( - 836, - ), - ctxt: #0, - }, + span: 813..836#0, value: "* @implements {IWorker}", }, ), @@ -688,96 +240,32 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 885, - ), - hi: BytePos( - 885, - ), - ctxt: #0, - }, + span: 885..885#0, description: Text { - span: Span { - lo: BytePos( - 885, - ), - hi: BytePos( - 898, - ), - ctxt: #0, - }, + span: 885..898#0, value: "Do some work.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 992, - ), - hi: BytePos( - 992, - ), - ctxt: #0, - }, + span: 992..992#0, description: Text { - span: Span { - lo: BytePos( - 992, - ), - hi: BytePos( - 992, - ), - ctxt: #0, - }, + span: 992..992#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 992, - ), - hi: BytePos( - 1003, - ), - ctxt: #0, - }, + span: 992..1003#0, tag_name: Text { - span: Span { - lo: BytePos( - 992, - ), - hi: BytePos( - 1003, - ), - ctxt: #0, - }, + span: 992..1003#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 992, - ), - hi: BytePos( - 1003, - ), - ctxt: #0, - }, + span: 992..1003#0, ty: Some( Text { - span: Span { - lo: BytePos( - 992, - ), - hi: BytePos( - 1015, - ), - ctxt: #0, - }, + span: 992..1015#0, value: "* @implements {IWorker}", }, ), diff --git a/crates/jsdoc/tests/fixtures/interfacetag2.debug b/crates/jsdoc/tests/fixtures/interfacetag2.debug index 16146868b46b..8170e58a936e 100644 --- a/crates/jsdoc/tests/fixtures/interfacetag2.debug +++ b/crates/jsdoc/tests/fixtures/interfacetag2.debug @@ -1,71 +1,23 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 39, - ), - ctxt: #0, - }, + span: 1..39#0, value: "Virtual doclet for an interface.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, value: "interface", }, tag: Interface( InterfaceTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, name: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 17, - ), - ctxt: #0, - }, + span: 1..17#0, value: "VirtualInterface", }, ), diff --git a/crates/jsdoc/tests/fixtures/interfacetag3.debug b/crates/jsdoc/tests/fixtures/interfacetag3.debug index 234c7928463d..a2b26d501ebb 100644 --- a/crates/jsdoc/tests/fixtures/interfacetag3.debug +++ b/crates/jsdoc/tests/fixtures/interfacetag3.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 31, - ), - ctxt: #0, - }, + span: 1..31#0, value: "My structural interface.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "record", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, extras: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, diff --git a/crates/jsdoc/tests/fixtures/kindtag.debug b/crates/jsdoc/tests/fixtures/kindtag.debug index 1bc79afeeb6e..651591f0269e 100644 --- a/crates/jsdoc/tests/fixtures/kindtag.debug +++ b/crates/jsdoc/tests/fixtures/kindtag.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, value: "kind", }, tag: Kind( KindTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "function", }, }, diff --git a/crates/jsdoc/tests/fixtures/lends.debug b/crates/jsdoc/tests/fixtures/lends.debug index 8791d364bed6..f079dfe8bff2 100644 --- a/crates/jsdoc/tests/fixtures/lends.debug +++ b/crates/jsdoc/tests/fixtures/lends.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, ty: None, name: None, }, @@ -63,82 +23,26 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 43, - ), - ctxt: #0, - }, + span: 43..43#0, description: Text { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 43, - ), - ctxt: #0, - }, + span: 43..43#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 48, - ), - ctxt: #0, - }, + span: 43..48#0, tag_name: Text { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 48, - ), - ctxt: #0, - }, + span: 43..48#0, value: "lends", }, tag: Lends( LendsTag { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 48, - ), - ctxt: #0, - }, + span: 43..48#0, name: NamePath { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 44, - ), - ctxt: #0, - }, + span: 43..44#0, components: [ Text { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 49, - ), - ctxt: #0, - }, + span: 43..49#0, value: "Person", }, ], @@ -149,73 +53,25 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 79, - ), - hi: BytePos( - 79, - ), - ctxt: #0, - }, + span: 79..79#0, description: Text { - span: Span { - lo: BytePos( - 79, - ), - hi: BytePos( - 101, - ), - ctxt: #0, - }, + span: 79..101#0, value: "Set up initial values.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 158, - ), - hi: BytePos( - 158, - ), - ctxt: #0, - }, + span: 158..158#0, description: Text { - span: Span { - lo: BytePos( - 158, - ), - hi: BytePos( - 181, - ), - ctxt: #0, - }, + span: 158..181#0, value: "The name of the person.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 239, - ), - hi: BytePos( - 239, - ), - ctxt: #0, - }, + span: 239..239#0, description: Text { - span: Span { - lo: BytePos( - 239, - ), - hi: BytePos( - 255, - ), - ctxt: #0, - }, + span: 239..255#0, value: "Speak a message.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/lends2.debug b/crates/jsdoc/tests/fixtures/lends2.debug index 69d1b8978071..818013575b62 100644 --- a/crates/jsdoc/tests/fixtures/lends2.debug +++ b/crates/jsdoc/tests/fixtures/lends2.debug @@ -1,81 +1,25 @@ [ JsDoc { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 30, - ), - ctxt: #0, - }, + span: 30..30#0, description: Text { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 30, - ), - ctxt: #0, - }, + span: 30..30#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 35, - ), - ctxt: #0, - }, + span: 30..35#0, tag_name: Text { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 35, - ), - ctxt: #0, - }, + span: 30..35#0, value: "lends", }, tag: Lends( LendsTag { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 35, - ), - ctxt: #0, - }, + span: 30..35#0, name: NamePath { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 31, - ), - ctxt: #0, - }, + span: 30..31#0, components: [ Text { - span: Span { - lo: BytePos( - 30, - ), - hi: BytePos( - 36, - ), - ctxt: #0, - }, + span: 30..36#0, value: "Person", }, ], @@ -86,71 +30,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 66, - ), - hi: BytePos( - 66, - ), - ctxt: #0, - }, + span: 66..66#0, description: Text { - span: Span { - lo: BytePos( - 66, - ), - hi: BytePos( - 85, - ), - ctxt: #0, - }, + span: 66..85#0, value: "Construct a Person.", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 66, - ), - hi: BytePos( - 76, - ), - ctxt: #0, - }, + span: 66..76#0, tag_name: Text { - span: Span { - lo: BytePos( - 66, - ), - hi: BytePos( - 76, - ), - ctxt: #0, - }, + span: 66..76#0, value: "constructs", }, tag: Constructs( ConstructsTag { - span: Span { - lo: BytePos( - 66, - ), - hi: BytePos( - 76, - ), - ctxt: #0, - }, + span: 66..76#0, name: Text { - span: Span { - lo: BytePos( - 66, - ), - hi: BytePos( - 72, - ), - ctxt: #0, - }, + span: 66..72#0, value: "Person", }, }, @@ -159,49 +55,17 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 182, - ), - hi: BytePos( - 182, - ), - ctxt: #0, - }, + span: 182..182#0, description: Text { - span: Span { - lo: BytePos( - 182, - ), - hi: BytePos( - 205, - ), - ctxt: #0, - }, + span: 182..205#0, value: "The name of the person.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 263, - ), - hi: BytePos( - 263, - ), - ctxt: #0, - }, + span: 263..263#0, description: Text { - span: Span { - lo: BytePos( - 263, - ), - hi: BytePos( - 279, - ), - ctxt: #0, - }, + span: 263..279#0, value: "Speak a message.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/lends3.debug b/crates/jsdoc/tests/fixtures/lends3.debug index 8ee5db84decf..c1f7f1546eab 100644 --- a/crates/jsdoc/tests/fixtures/lends3.debug +++ b/crates/jsdoc/tests/fixtures/lends3.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, ty: None, name: None, }, @@ -63,82 +23,26 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 43, - ), - ctxt: #0, - }, + span: 43..43#0, description: Text { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 43, - ), - ctxt: #0, - }, + span: 43..43#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 48, - ), - ctxt: #0, - }, + span: 43..48#0, tag_name: Text { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 48, - ), - ctxt: #0, - }, + span: 43..48#0, value: "lends", }, tag: Lends( LendsTag { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 48, - ), - ctxt: #0, - }, + span: 43..48#0, name: NamePath { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 49, - ), - ctxt: #0, - }, + span: 43..49#0, components: [ Text { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 49, - ), - ctxt: #0, - }, + span: 43..49#0, value: "Person", }, ], @@ -149,73 +53,25 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 91, - ), - hi: BytePos( - 91, - ), - ctxt: #0, - }, + span: 91..91#0, description: Text { - span: Span { - lo: BytePos( - 91, - ), - hi: BytePos( - 113, - ), - ctxt: #0, - }, + span: 91..113#0, value: "Set up initial values.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 170, - ), - hi: BytePos( - 170, - ), - ctxt: #0, - }, + span: 170..170#0, description: Text { - span: Span { - lo: BytePos( - 170, - ), - hi: BytePos( - 193, - ), - ctxt: #0, - }, + span: 170..193#0, value: "The name of the person.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 251, - ), - hi: BytePos( - 251, - ), - ctxt: #0, - }, + span: 251..251#0, description: Text { - span: Span { - lo: BytePos( - 251, - ), - hi: BytePos( - 267, - ), - ctxt: #0, - }, + span: 251..267#0, value: "Speak a message.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/lends4.debug b/crates/jsdoc/tests/fixtures/lends4.debug index e7b24c28cc6c..6c77354ab486 100644 --- a/crates/jsdoc/tests/fixtures/lends4.debug +++ b/crates/jsdoc/tests/fixtures/lends4.debug @@ -1,81 +1,25 @@ [ JsDoc { - span: Span { - lo: BytePos( - 62, - ), - hi: BytePos( - 72, - ), - ctxt: #0, - }, + span: 62..72#0, description: Text { - span: Span { - lo: BytePos( - 62, - ), - hi: BytePos( - 62, - ), - ctxt: #0, - }, + span: 62..62#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 62, - ), - hi: BytePos( - 67, - ), - ctxt: #0, - }, + span: 62..67#0, tag_name: Text { - span: Span { - lo: BytePos( - 62, - ), - hi: BytePos( - 67, - ), - ctxt: #0, - }, + span: 62..67#0, value: "lends", }, tag: Lends( LendsTag { - span: Span { - lo: BytePos( - 62, - ), - hi: BytePos( - 67, - ), - ctxt: #0, - }, + span: 62..67#0, name: NamePath { - span: Span { - lo: BytePos( - 62, - ), - hi: BytePos( - 72, - ), - ctxt: #0, - }, + span: 62..72#0, components: [ Text { - span: Span { - lo: BytePos( - 62, - ), - hi: BytePos( - 68, - ), - ctxt: #0, - }, + span: 62..68#0, value: "Person", }, ], @@ -86,71 +30,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 115, - ), - hi: BytePos( - 115, - ), - ctxt: #0, - }, + span: 115..115#0, description: Text { - span: Span { - lo: BytePos( - 115, - ), - hi: BytePos( - 115, - ), - ctxt: #0, - }, + span: 115..115#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 115, - ), - hi: BytePos( - 125, - ), - ctxt: #0, - }, + span: 115..125#0, tag_name: Text { - span: Span { - lo: BytePos( - 115, - ), - hi: BytePos( - 125, - ), - ctxt: #0, - }, + span: 115..125#0, value: "constructs", }, tag: Constructs( ConstructsTag { - span: Span { - lo: BytePos( - 115, - ), - hi: BytePos( - 125, - ), - ctxt: #0, - }, + span: 115..125#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -159,25 +55,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 236, - ), - hi: BytePos( - 236, - ), - ctxt: #0, - }, + span: 236..236#0, description: Text { - span: Span { - lo: BytePos( - 236, - ), - hi: BytePos( - 252, - ), - ctxt: #0, - }, + span: 236..252#0, value: "Speak a message.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/lends5.debug b/crates/jsdoc/tests/fixtures/lends5.debug index f8f494aeba9d..14cb8128edf1 100644 --- a/crates/jsdoc/tests/fixtures/lends5.debug +++ b/crates/jsdoc/tests/fixtures/lends5.debug @@ -1,71 +1,23 @@ [ JsDoc { - span: Span { - lo: BytePos( - 19, - ), - hi: BytePos( - 19, - ), - ctxt: #0, - }, + span: 19..19#0, description: Text { - span: Span { - lo: BytePos( - 19, - ), - hi: BytePos( - 19, - ), - ctxt: #0, - }, + span: 19..19#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 19, - ), - hi: BytePos( - 24, - ), - ctxt: #0, - }, + span: 19..24#0, tag_name: Text { - span: Span { - lo: BytePos( - 19, - ), - hi: BytePos( - 24, - ), - ctxt: #0, - }, + span: 19..24#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 19, - ), - hi: BytePos( - 24, - ), - ctxt: #0, - }, + span: 19..24#0, ty: Some( Text { - span: Span { - lo: BytePos( - 19, - ), - hi: BytePos( - 25, - ), - ctxt: #0, - }, + span: 19..25#0, value: "Person", }, ), @@ -76,82 +28,26 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 125, - ), - hi: BytePos( - 135, - ), - ctxt: #0, - }, + span: 125..135#0, description: Text { - span: Span { - lo: BytePos( - 125, - ), - hi: BytePos( - 125, - ), - ctxt: #0, - }, + span: 125..125#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 125, - ), - hi: BytePos( - 130, - ), - ctxt: #0, - }, + span: 125..130#0, tag_name: Text { - span: Span { - lo: BytePos( - 125, - ), - hi: BytePos( - 130, - ), - ctxt: #0, - }, + span: 125..130#0, value: "lends", }, tag: Lends( LendsTag { - span: Span { - lo: BytePos( - 125, - ), - hi: BytePos( - 130, - ), - ctxt: #0, - }, + span: 125..130#0, name: NamePath { - span: Span { - lo: BytePos( - 125, - ), - hi: BytePos( - 135, - ), - ctxt: #0, - }, + span: 125..135#0, components: [ Text { - span: Span { - lo: BytePos( - 125, - ), - hi: BytePos( - 131, - ), - ctxt: #0, - }, + span: 125..131#0, value: "Person", }, ], @@ -162,25 +58,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 166, - ), - hi: BytePos( - 166, - ), - ctxt: #0, - }, + span: 166..166#0, description: Text { - span: Span { - lo: BytePos( - 166, - ), - hi: BytePos( - 182, - ), - ctxt: #0, - }, + span: 166..182#0, value: "Speak a message.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/lends6.debug b/crates/jsdoc/tests/fixtures/lends6.debug index 5bc7c3f16b91..6bd01a9231c0 100644 --- a/crates/jsdoc/tests/fixtures/lends6.debug +++ b/crates/jsdoc/tests/fixtures/lends6.debug @@ -1,81 +1,25 @@ [ JsDoc { - span: Span { - lo: BytePos( - 61, - ), - hi: BytePos( - 71, - ), - ctxt: #0, - }, + span: 61..71#0, description: Text { - span: Span { - lo: BytePos( - 61, - ), - hi: BytePos( - 61, - ), - ctxt: #0, - }, + span: 61..61#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 61, - ), - hi: BytePos( - 66, - ), - ctxt: #0, - }, + span: 61..66#0, tag_name: Text { - span: Span { - lo: BytePos( - 61, - ), - hi: BytePos( - 66, - ), - ctxt: #0, - }, + span: 61..66#0, value: "lends", }, tag: Lends( LendsTag { - span: Span { - lo: BytePos( - 61, - ), - hi: BytePos( - 66, - ), - ctxt: #0, - }, + span: 61..66#0, name: NamePath { - span: Span { - lo: BytePos( - 61, - ), - hi: BytePos( - 71, - ), - ctxt: #0, - }, + span: 61..71#0, components: [ Text { - span: Span { - lo: BytePos( - 61, - ), - hi: BytePos( - 67, - ), - ctxt: #0, - }, + span: 61..67#0, value: "Person", }, ], @@ -86,71 +30,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 114, - ), - hi: BytePos( - 114, - ), - ctxt: #0, - }, + span: 114..114#0, description: Text { - span: Span { - lo: BytePos( - 114, - ), - hi: BytePos( - 114, - ), - ctxt: #0, - }, + span: 114..114#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 114, - ), - hi: BytePos( - 124, - ), - ctxt: #0, - }, + span: 114..124#0, tag_name: Text { - span: Span { - lo: BytePos( - 114, - ), - hi: BytePos( - 124, - ), - ctxt: #0, - }, + span: 114..124#0, value: "constructs", }, tag: Constructs( ConstructsTag { - span: Span { - lo: BytePos( - 114, - ), - hi: BytePos( - 124, - ), - ctxt: #0, - }, + span: 114..124#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -159,106 +55,34 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 235, - ), - hi: BytePos( - 235, - ), - ctxt: #0, - }, + span: 235..235#0, description: Text { - span: Span { - lo: BytePos( - 235, - ), - hi: BytePos( - 251, - ), - ctxt: #0, - }, + span: 235..251#0, value: "Speak a message.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 419, - ), - hi: BytePos( - 429, - ), - ctxt: #0, - }, + span: 419..429#0, description: Text { - span: Span { - lo: BytePos( - 419, - ), - hi: BytePos( - 419, - ), - ctxt: #0, - }, + span: 419..419#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 419, - ), - hi: BytePos( - 424, - ), - ctxt: #0, - }, + span: 419..424#0, tag_name: Text { - span: Span { - lo: BytePos( - 419, - ), - hi: BytePos( - 424, - ), - ctxt: #0, - }, + span: 419..424#0, value: "lends", }, tag: Lends( LendsTag { - span: Span { - lo: BytePos( - 419, - ), - hi: BytePos( - 424, - ), - ctxt: #0, - }, + span: 419..424#0, name: NamePath { - span: Span { - lo: BytePos( - 419, - ), - hi: BytePos( - 429, - ), - ctxt: #0, - }, + span: 419..429#0, components: [ Text { - span: Span { - lo: BytePos( - 419, - ), - hi: BytePos( - 424, - ), - ctxt: #0, - }, + span: 419..424#0, value: "Robot", }, ], @@ -269,71 +93,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 471, - ), - hi: BytePos( - 471, - ), - ctxt: #0, - }, + span: 471..471#0, description: Text { - span: Span { - lo: BytePos( - 471, - ), - hi: BytePos( - 471, - ), - ctxt: #0, - }, + span: 471..471#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 471, - ), - hi: BytePos( - 481, - ), - ctxt: #0, - }, + span: 471..481#0, tag_name: Text { - span: Span { - lo: BytePos( - 471, - ), - hi: BytePos( - 481, - ), - ctxt: #0, - }, + span: 471..481#0, value: "constructs", }, tag: Constructs( ConstructsTag { - span: Span { - lo: BytePos( - 471, - ), - hi: BytePos( - 481, - ), - ctxt: #0, - }, + span: 471..481#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -342,25 +118,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 592, - ), - hi: BytePos( - 592, - ), - ctxt: #0, - }, + span: 592..592#0, description: Text { - span: Span { - lo: BytePos( - 592, - ), - hi: BytePos( - 606, - ), - ctxt: #0, - }, + span: 592..606#0, value: "Feign emotion.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/lendsglobal.debug b/crates/jsdoc/tests/fixtures/lendsglobal.debug index ba1c1f6bd3f1..a5bc0917dafe 100644 --- a/crates/jsdoc/tests/fixtures/lendsglobal.debug +++ b/crates/jsdoc/tests/fixtures/lendsglobal.debug @@ -1,81 +1,25 @@ [ JsDoc { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 24, - ), - ctxt: #0, - }, + span: 0..24#0, description: Text { - span: Span { - lo: BytePos( - 24, - ), - hi: BytePos( - 24, - ), - ctxt: #0, - }, + span: 24..24#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 24, - ), - hi: BytePos( - 29, - ), - ctxt: #0, - }, + span: 24..29#0, tag_name: Text { - span: Span { - lo: BytePos( - 24, - ), - hi: BytePos( - 29, - ), - ctxt: #0, - }, + span: 24..29#0, value: "lends", }, tag: Lends( LendsTag { - span: Span { - lo: BytePos( - 24, - ), - hi: BytePos( - 29, - ), - ctxt: #0, - }, + span: 24..29#0, name: NamePath { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 24, - ), - ctxt: #0, - }, + span: 0..24#0, components: [ Text { - span: Span { - lo: BytePos( - 24, - ), - hi: BytePos( - 24, - ), - ctxt: #0, - }, + span: 24..24#0, value: "", }, ], @@ -86,85 +30,29 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 49, - ), - hi: BytePos( - 49, - ), - ctxt: #0, - }, + span: 49..49#0, description: Text { - span: Span { - lo: BytePos( - 49, - ), - hi: BytePos( - 60, - ), - ctxt: #0, - }, + span: 49..60#0, value: "document me", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 109, - ), - ctxt: #0, - }, + span: 0..109#0, description: Text { - span: Span { - lo: BytePos( - 109, - ), - hi: BytePos( - 109, - ), - ctxt: #0, - }, + span: 109..109#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 109, - ), - hi: BytePos( - 118, - ), - ctxt: #0, - }, + span: 109..118#0, tag_name: Text { - span: Span { - lo: BytePos( - 109, - ), - hi: BytePos( - 118, - ), - ctxt: #0, - }, + span: 109..118#0, value: "namespace", }, tag: Namespace( NamespaceTag { - span: Span { - lo: BytePos( - 109, - ), - hi: BytePos( - 118, - ), - ctxt: #0, - }, + span: 109..118#0, ty: None, name: None, }, @@ -173,25 +61,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 159, - ), - hi: BytePos( - 159, - ), - ctxt: #0, - }, + span: 159..159#0, description: Text { - span: Span { - lo: BytePos( - 159, - ), - hi: BytePos( - 170, - ), - ctxt: #0, - }, + span: 159..170#0, value: "document me", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/letkeyword.debug b/crates/jsdoc/tests/fixtures/letkeyword.debug index 0e70e03793ff..c0693eee1ca5 100644 --- a/crates/jsdoc/tests/fixtures/letkeyword.debug +++ b/crates/jsdoc/tests/fixtures/letkeyword.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 74, - ), - hi: BytePos( - 74, - ), - ctxt: #0, - }, + span: 74..74#0, description: Text { - span: Span { - lo: BytePos( - 74, - ), - hi: BytePos( - 99, - ), - ctxt: #0, - }, + span: 74..99#0, value: "My example module.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 74, - ), - hi: BytePos( - 81, - ), - ctxt: #0, - }, + span: 74..81#0, tag_name: Text { - span: Span { - lo: BytePos( - 74, - ), - hi: BytePos( - 81, - ), - ctxt: #0, - }, + span: 74..81#0, value: "exports", }, tag: Exports( ExportsTag { - span: Span { - lo: BytePos( - 74, - ), - hi: BytePos( - 81, - ), - ctxt: #0, - }, + span: 74..81#0, module_name: Text { - span: Span { - lo: BytePos( - 74, - ), - hi: BytePos( - 87, - ), - ctxt: #0, - }, + span: 74..87#0, value: "exampleModule", }, }, @@ -73,25 +25,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 171, - ), - hi: BytePos( - 171, - ), - ctxt: #0, - }, + span: 171..171#0, description: Text { - span: Span { - lo: BytePos( - 171, - ), - hi: BytePos( - 189, - ), - ctxt: #0, - }, + span: 171..189#0, value: "My example method.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/licensetag.debug b/crates/jsdoc/tests/fixtures/licensetag.debug index be2c1d764e45..aadb949f1da8 100644 --- a/crates/jsdoc/tests/fixtures/licensetag.debug +++ b/crates/jsdoc/tests/fixtures/licensetag.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, value: "license", }, tag: License( LicenseTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, identifier: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, diff --git a/crates/jsdoc/tests/fixtures/linktag.debug b/crates/jsdoc/tests/fixtures/linktag.debug index 9ae75c113f48..134a7115eda6 100644 --- a/crates/jsdoc/tests/fixtures/linktag.debug +++ b/crates/jsdoc/tests/fixtures/linktag.debug @@ -1,71 +1,23 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, value: "namespace", }, tag: Namespace( NamespaceTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 3, - ), - ctxt: #0, - }, + span: 1..3#0, value: "ns", }, ), @@ -76,119 +28,39 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 36, - ), - hi: BytePos( - 36, - ), - ctxt: #0, - }, + span: 36..36#0, description: Text { - span: Span { - lo: BytePos( - 36, - ), - hi: BytePos( - 66, - ), - ctxt: #0, - }, + span: 36..66#0, value: "Similar to [the bar function]{", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 36, - ), - hi: BytePos( - 40, - ), - ctxt: #0, - }, + span: 36..40#0, tag_name: Text { - span: Span { - lo: BytePos( - 36, - ), - hi: BytePos( - 40, - ), - ctxt: #0, - }, + span: 36..40#0, value: "link", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 36, - ), - hi: BytePos( - 40, - ), - ctxt: #0, - }, + span: 36..40#0, extras: Text { - span: Span { - lo: BytePos( - 36, - ), - hi: BytePos( - 41, - ), - ctxt: #0, - }, + span: 36..41#0, value: "bar}.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 36, - ), - hi: BytePos( - 39, - ), - ctxt: #0, - }, + span: 36..39#0, tag_name: Text { - span: Span { - lo: BytePos( - 36, - ), - hi: BytePos( - 39, - ), - ctxt: #0, - }, + span: 36..39#0, value: "see", }, tag: See( SeeTag { - span: Span { - lo: BytePos( - 36, - ), - hi: BytePos( - 39, - ), - ctxt: #0, - }, + span: 36..39#0, text: Text { - span: Span { - lo: BytePos( - 36, - ), - hi: BytePos( - 47, - ), - ctxt: #0, - }, + span: 36..47#0, value: "{@link bar}", }, }, @@ -197,71 +69,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 134, - ), - hi: BytePos( - 134, - ), - ctxt: #0, - }, + span: 134..134#0, description: Text { - span: Span { - lo: BytePos( - 134, - ), - hi: BytePos( - 134, - ), - ctxt: #0, - }, + span: 134..134#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 134, - ), - hi: BytePos( - 137, - ), - ctxt: #0, - }, + span: 134..137#0, tag_name: Text { - span: Span { - lo: BytePos( - 134, - ), - hi: BytePos( - 137, - ), - ctxt: #0, - }, + span: 134..137#0, value: "see", }, tag: See( SeeTag { - span: Span { - lo: BytePos( - 134, - ), - hi: BytePos( - 137, - ), - ctxt: #0, - }, + span: 134..137#0, text: Text { - span: Span { - lo: BytePos( - 134, - ), - hi: BytePos( - 148, - ), - ctxt: #0, - }, + span: 134..148#0, value: "{@link ns.foo}", }, }, diff --git a/crates/jsdoc/tests/fixtures/listenstag.debug b/crates/jsdoc/tests/fixtures/listenstag.debug index 9e2e3e2cf909..6116f6446a73 100644 --- a/crates/jsdoc/tests/fixtures/listenstag.debug +++ b/crates/jsdoc/tests/fixtures/listenstag.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "myModule", }, }, @@ -85,130 +29,42 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 66, - ), - ctxt: #0, - }, + span: 26..66#0, description: Text { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 54, - ), - ctxt: #0, - }, + span: 26..54#0, value: "An event (has listeners).\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 31, - ), - ctxt: #0, - }, + span: 26..31#0, tag_name: Text { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 31, - ), - ctxt: #0, - }, + span: 26..31#0, value: "event", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 31, - ), - ctxt: #0, - }, + span: 26..31#0, extras: Text { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 33, - ), - ctxt: #0, - }, + span: 26..33#0, value: "MyEvent", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 34, - ), - ctxt: #0, - }, + span: 26..34#0, tag_name: Text { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 34, - ), - ctxt: #0, - }, + span: 26..34#0, value: "memberof", }, tag: MemberOf( MemberOfTag { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 34, - ), - ctxt: #0, - }, + span: 26..34#0, parent_name_path: NamePath { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 66, - ), - ctxt: #0, - }, + span: 26..66#0, components: [ Text { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 32, - ), - ctxt: #0, - }, + span: 26..32#0, value: "module", }, ], @@ -219,167 +75,55 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 138, - ), - hi: BytePos( - 138, - ), - ctxt: #0, - }, + span: 138..138#0, description: Text { - span: Span { - lo: BytePos( - 138, - ), - hi: BytePos( - 151, - ), - ctxt: #0, - }, + span: 138..151#0, value: "A handler.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 138, - ), - hi: BytePos( - 145, - ), - ctxt: #0, - }, + span: 138..145#0, tag_name: Text { - span: Span { - lo: BytePos( - 138, - ), - hi: BytePos( - 145, - ), - ctxt: #0, - }, + span: 138..145#0, value: "listens", }, tag: Listens( ListensTag { - span: Span { - lo: BytePos( - 138, - ), - hi: BytePos( - 145, - ), - ctxt: #0, - }, + span: 138..145#0, event_name: Text { - span: Span { - lo: BytePos( - 138, - ), - hi: BytePos( - 161, - ), - ctxt: #0, - }, + span: 138..161#0, value: "module:myModule.MyEvent", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 138, - ), - hi: BytePos( - 145, - ), - ctxt: #0, - }, + span: 138..145#0, tag_name: Text { - span: Span { - lo: BytePos( - 138, - ), - hi: BytePos( - 145, - ), - ctxt: #0, - }, + span: 138..145#0, value: "listens", }, tag: Listens( ListensTag { - span: Span { - lo: BytePos( - 138, - ), - hi: BytePos( - 145, - ), - ctxt: #0, - }, + span: 138..145#0, event_name: Text { - span: Span { - lo: BytePos( - 138, - ), - hi: BytePos( - 173, - ), - ctxt: #0, - }, + span: 138..173#0, value: "module:myModule~Events.event:Event2", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 138, - ), - hi: BytePos( - 145, - ), - ctxt: #0, - }, + span: 138..145#0, tag_name: Text { - span: Span { - lo: BytePos( - 138, - ), - hi: BytePos( - 145, - ), - ctxt: #0, - }, + span: 138..145#0, value: "listens", }, tag: Listens( ListensTag { - span: Span { - lo: BytePos( - 138, - ), - hi: BytePos( - 145, - ), - ctxt: #0, - }, + span: 138..145#0, event_name: Text { - span: Span { - lo: BytePos( - 138, - ), - hi: BytePos( - 147, - ), - ctxt: #0, - }, + span: 138..147#0, value: "fakeEvent", }, }, @@ -388,71 +132,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 289, - ), - hi: BytePos( - 289, - ), - ctxt: #0, - }, + span: 289..289#0, description: Text { - span: Span { - lo: BytePos( - 289, - ), - hi: BytePos( - 308, - ), - ctxt: #0, - }, + span: 289..308#0, value: "Another handler.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 289, - ), - hi: BytePos( - 296, - ), - ctxt: #0, - }, + span: 289..296#0, tag_name: Text { - span: Span { - lo: BytePos( - 289, - ), - hi: BytePos( - 296, - ), - ctxt: #0, - }, + span: 289..296#0, value: "listens", }, tag: Listens( ListensTag { - span: Span { - lo: BytePos( - 289, - ), - hi: BytePos( - 296, - ), - ctxt: #0, - }, + span: 289..296#0, event_name: Text { - span: Span { - lo: BytePos( - 289, - ), - hi: BytePos( - 312, - ), - ctxt: #0, - }, + span: 289..312#0, value: "module:myModule.MyEvent", }, }, @@ -461,61 +157,21 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 381, - ), - ctxt: #0, - }, + span: 0..381#0, description: Text { - span: Span { - lo: BytePos( - 381, - ), - hi: BytePos( - 396, - ), - ctxt: #0, - }, + span: 381..396#0, value: "a namespace.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 381, - ), - hi: BytePos( - 390, - ), - ctxt: #0, - }, + span: 381..390#0, tag_name: Text { - span: Span { - lo: BytePos( - 381, - ), - hi: BytePos( - 390, - ), - ctxt: #0, - }, + span: 381..390#0, value: "namespace", }, tag: Namespace( NamespaceTag { - span: Span { - lo: BytePos( - 381, - ), - hi: BytePos( - 390, - ), - ctxt: #0, - }, + span: 381..390#0, ty: None, name: None, }, diff --git a/crates/jsdoc/tests/fixtures/memberoftag.debug b/crates/jsdoc/tests/fixtures/memberoftag.debug index af81a4314907..94396897b697 100644 --- a/crates/jsdoc/tests/fixtures/memberoftag.debug +++ b/crates/jsdoc/tests/fixtures/memberoftag.debug @@ -1,71 +1,23 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 18, - ), - ctxt: #0, - }, + span: 1..18#0, value: "@memberof mathlib", }, ), @@ -76,83 +28,27 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 67, - ), - ctxt: #0, - }, + span: 0..67#0, description: Text { - span: Span { - lo: BytePos( - 67, - ), - hi: BytePos( - 67, - ), - ctxt: #0, - }, + span: 67..67#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 67, - ), - hi: BytePos( - 73, - ), - ctxt: #0, - }, + span: 67..73#0, tag_name: Text { - span: Span { - lo: BytePos( - 67, - ), - hi: BytePos( - 73, - ), - ctxt: #0, - }, + span: 67..73#0, value: "member", }, tag: Member( MemberTag { - span: Span { - lo: BytePos( - 67, - ), - hi: BytePos( - 73, - ), - ctxt: #0, - }, + span: 67..73#0, ty: Text { - span: Span { - lo: BytePos( - 67, - ), - hi: BytePos( - 67, - ), - ctxt: #0, - }, + span: 67..67#0, value: "", }, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -161,61 +57,21 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 106, - ), - ctxt: #0, - }, + span: 0..106#0, description: Text { - span: Span { - lo: BytePos( - 106, - ), - hi: BytePos( - 106, - ), - ctxt: #0, - }, + span: 106..106#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 106, - ), - hi: BytePos( - 115, - ), - ctxt: #0, - }, + span: 106..115#0, tag_name: Text { - span: Span { - lo: BytePos( - 106, - ), - hi: BytePos( - 115, - ), - ctxt: #0, - }, + span: 106..115#0, value: "namespace", }, tag: Namespace( NamespaceTag { - span: Span { - lo: BytePos( - 106, - ), - hi: BytePos( - 115, - ), - ctxt: #0, - }, + span: 106..115#0, ty: None, name: None, }, diff --git a/crates/jsdoc/tests/fixtures/memberoftag2.debug b/crates/jsdoc/tests/fixtures/memberoftag2.debug index 0ed61012b990..6d59b74fcac3 100644 --- a/crates/jsdoc/tests/fixtures/memberoftag2.debug +++ b/crates/jsdoc/tests/fixtures/memberoftag2.debug @@ -1,81 +1,25 @@ [ JsDoc { - span: Span { - lo: BytePos( - 41, - ), - hi: BytePos( - 41, - ), - ctxt: #0, - }, + span: 41..41#0, description: Text { - span: Span { - lo: BytePos( - 41, - ), - hi: BytePos( - 41, - ), - ctxt: #0, - }, + span: 41..41#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 41, - ), - hi: BytePos( - 49, - ), - ctxt: #0, - }, + span: 41..49#0, tag_name: Text { - span: Span { - lo: BytePos( - 41, - ), - hi: BytePos( - 49, - ), - ctxt: #0, - }, + span: 41..49#0, value: "memberof", }, tag: MemberOf( MemberOfTag { - span: Span { - lo: BytePos( - 41, - ), - hi: BytePos( - 49, - ), - ctxt: #0, - }, + span: 41..49#0, parent_name_path: NamePath { - span: Span { - lo: BytePos( - 41, - ), - hi: BytePos( - 41, - ), - ctxt: #0, - }, + span: 41..41#0, components: [ Text { - span: Span { - lo: BytePos( - 41, - ), - hi: BytePos( - 51, - ), - ctxt: #0, - }, + span: 41..51#0, value: "Observable", }, ], @@ -86,82 +30,26 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 97, - ), - hi: BytePos( - 107, - ), - ctxt: #0, - }, + span: 97..107#0, description: Text { - span: Span { - lo: BytePos( - 97, - ), - hi: BytePos( - 97, - ), - ctxt: #0, - }, + span: 97..97#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 97, - ), - hi: BytePos( - 105, - ), - ctxt: #0, - }, + span: 97..105#0, tag_name: Text { - span: Span { - lo: BytePos( - 97, - ), - hi: BytePos( - 105, - ), - ctxt: #0, - }, + span: 97..105#0, value: "memberof", }, tag: MemberOf( MemberOfTag { - span: Span { - lo: BytePos( - 97, - ), - hi: BytePos( - 105, - ), - ctxt: #0, - }, + span: 97..105#0, parent_name_path: NamePath { - span: Span { - lo: BytePos( - 97, - ), - hi: BytePos( - 107, - ), - ctxt: #0, - }, + span: 97..107#0, components: [ Text { - span: Span { - lo: BytePos( - 97, - ), - hi: BytePos( - 107, - ), - ctxt: #0, - }, + span: 97..107#0, value: "Observable", }, ], diff --git a/crates/jsdoc/tests/fixtures/memberoftag3.debug b/crates/jsdoc/tests/fixtures/memberoftag3.debug index 660e9535636b..5bb0b53bee31 100644 --- a/crates/jsdoc/tests/fixtures/memberoftag3.debug +++ b/crates/jsdoc/tests/fixtures/memberoftag3.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 116, - ), - ctxt: #0, - }, + span: 1..116#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "@example", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, value: "terrain", }, }, @@ -85,61 +29,21 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 161, - ), - hi: BytePos( - 161, - ), - ctxt: #0, - }, + span: 161..161#0, description: Text { - span: Span { - lo: BytePos( - 161, - ), - hi: BytePos( - 161, - ), - ctxt: #0, - }, + span: 161..161#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 161, - ), - hi: BytePos( - 166, - ), - ctxt: #0, - }, + span: 161..166#0, tag_name: Text { - span: Span { - lo: BytePos( - 161, - ), - hi: BytePos( - 166, - ), - ctxt: #0, - }, + span: 161..166#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 161, - ), - hi: BytePos( - 166, - ), - ctxt: #0, - }, + span: 161..166#0, ty: None, name: None, }, @@ -148,72 +52,24 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 235, - ), - hi: BytePos( - 235, - ), - ctxt: #0, - }, + span: 235..235#0, description: Text { - span: Span { - lo: BytePos( - 235, - ), - hi: BytePos( - 235, - ), - ctxt: #0, - }, + span: 235..235#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 235, - ), - hi: BytePos( - 240, - ), - ctxt: #0, - }, + span: 235..240#0, tag_name: Text { - span: Span { - lo: BytePos( - 235, - ), - hi: BytePos( - 240, - ), - ctxt: #0, - }, + span: 235..240#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 235, - ), - hi: BytePos( - 240, - ), - ctxt: #0, - }, + span: 235..240#0, ty: Some( Text { - span: Span { - lo: BytePos( - 235, - ), - hi: BytePos( - 259, - ), - ctxt: #0, - }, + span: 235..259#0, value: "@memberof module:terrain", }, ), @@ -224,25 +80,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 323, - ), - hi: BytePos( - 323, - ), - ctxt: #0, - }, + span: 323..323#0, description: Text { - span: Span { - lo: BytePos( - 323, - ), - hi: BytePos( - 329, - ), - ctxt: #0, - }, + span: 323..329#0, value: "A leaf", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/memberoftag4.debug b/crates/jsdoc/tests/fixtures/memberoftag4.debug index efda5b5d44c8..593ee19a5681 100644 --- a/crates/jsdoc/tests/fixtures/memberoftag4.debug +++ b/crates/jsdoc/tests/fixtures/memberoftag4.debug @@ -1,71 +1,23 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 22, - ), - ctxt: #0, - }, + span: 1..22#0, value: "Namespace doStuff.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, value: "namespace", }, tag: Namespace( NamespaceTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, value: "doStuff", }, ), @@ -76,82 +28,26 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 54, - ), - hi: BytePos( - 54, - ), - ctxt: #0, - }, + span: 54..54#0, description: Text { - span: Span { - lo: BytePos( - 54, - ), - hi: BytePos( - 102, - ), - ctxt: #0, - }, + span: 54..102#0, value: "Function with the same name as its namespace.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 54, - ), - hi: BytePos( - 62, - ), - ctxt: #0, - }, + span: 54..62#0, tag_name: Text { - span: Span { - lo: BytePos( - 54, - ), - hi: BytePos( - 62, - ), - ctxt: #0, - }, + span: 54..62#0, value: "memberof", }, tag: MemberOf( MemberOfTag { - span: Span { - lo: BytePos( - 54, - ), - hi: BytePos( - 62, - ), - ctxt: #0, - }, + span: 54..62#0, parent_name_path: NamePath { - span: Span { - lo: BytePos( - 54, - ), - hi: BytePos( - 55, - ), - ctxt: #0, - }, + span: 54..55#0, components: [ Text { - span: Span { - lo: BytePos( - 54, - ), - hi: BytePos( - 61, - ), - ctxt: #0, - }, + span: 54..61#0, value: "doStuff", }, ], @@ -162,82 +58,26 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 155, - ), - hi: BytePos( - 155, - ), - ctxt: #0, - }, + span: 155..155#0, description: Text { - span: Span { - lo: BytePos( - 155, - ), - hi: BytePos( - 208, - ), - ctxt: #0, - }, + span: 155..208#0, value: "Function with a different name than the namespace.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 155, - ), - hi: BytePos( - 163, - ), - ctxt: #0, - }, + span: 155..163#0, tag_name: Text { - span: Span { - lo: BytePos( - 155, - ), - hi: BytePos( - 163, - ), - ctxt: #0, - }, + span: 155..163#0, value: "memberof", }, tag: MemberOf( MemberOfTag { - span: Span { - lo: BytePos( - 155, - ), - hi: BytePos( - 163, - ), - ctxt: #0, - }, + span: 155..163#0, parent_name_path: NamePath { - span: Span { - lo: BytePos( - 155, - ), - hi: BytePos( - 156, - ), - ctxt: #0, - }, + span: 155..156#0, components: [ Text { - span: Span { - lo: BytePos( - 155, - ), - hi: BytePos( - 162, - ), - ctxt: #0, - }, + span: 155..162#0, value: "doStuff", }, ], diff --git a/crates/jsdoc/tests/fixtures/memberoftag5.debug b/crates/jsdoc/tests/fixtures/memberoftag5.debug index 6bca1f5462c7..198802d83d20 100644 --- a/crates/jsdoc/tests/fixtures/memberoftag5.debug +++ b/crates/jsdoc/tests/fixtures/memberoftag5.debug @@ -1,71 +1,23 @@ [ JsDoc { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 16..16#0, description: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 32, - ), - ctxt: #0, - }, + span: 16..32#0, value: "Socket class.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 21, - ), - ctxt: #0, - }, + span: 16..21#0, tag_name: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 21, - ), - ctxt: #0, - }, + span: 16..21#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 21, - ), - ctxt: #0, - }, + span: 16..21#0, ty: Some( Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 42, - ), - ctxt: #0, - }, + span: 16..42#0, value: "* @memberof module:network", }, ), @@ -76,49 +28,17 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 101, - ), - hi: BytePos( - 101, - ), - ctxt: #0, - }, + span: 101..101#0, description: Text { - span: Span { - lo: BytePos( - 101, - ), - hi: BytePos( - 117, - ), - ctxt: #0, - }, + span: 101..117#0, value: "Open the socket.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 169, - ), - hi: BytePos( - 169, - ), - ctxt: #0, - }, + span: 169..169#0, description: Text { - span: Span { - lo: BytePos( - 169, - ), - hi: BytePos( - 206, - ), - ctxt: #0, - }, + span: 169..206#0, value: "Unique identifier for `Socket` class.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/memberoftagforced.debug b/crates/jsdoc/tests/fixtures/memberoftagforced.debug index d8ffb2ca3eef..738b1466ac57 100644 --- a/crates/jsdoc/tests/fixtures/memberoftagforced.debug +++ b/crates/jsdoc/tests/fixtures/memberoftagforced.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 2, - ), - hi: BytePos( - 2, - ), - ctxt: #0, - }, + span: 2..2#0, description: Text { - span: Span { - lo: BytePos( - 2, - ), - hi: BytePos( - 2, - ), - ctxt: #0, - }, + span: 2..2#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 2, - ), - hi: BytePos( - 13, - ), - ctxt: #0, - }, + span: 2..13#0, tag_name: Text { - span: Span { - lo: BytePos( - 2, - ), - hi: BytePos( - 13, - ), - ctxt: #0, - }, + span: 2..13#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 2, - ), - hi: BytePos( - 13, - ), - ctxt: #0, - }, + span: 2..13#0, ty: None, name: None, }, @@ -63,158 +23,54 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 45, - ), - hi: BytePos( - 45, - ), - ctxt: #0, - }, + span: 45..45#0, description: Text { - span: Span { - lo: BytePos( - 45, - ), - hi: BytePos( - 66, - ), - ctxt: #0, - }, + span: 45..66#0, value: "The current position.", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 45, - ), - hi: BytePos( - 49, - ), - ctxt: #0, - }, + span: 45..49#0, tag_name: Text { - span: Span { - lo: BytePos( - 45, - ), - hi: BytePos( - 49, - ), - ctxt: #0, - }, + span: 45..49#0, value: "type", }, tag: Type( TypeTag { - span: Span { - lo: BytePos( - 45, - ), - hi: BytePos( - 49, - ), - ctxt: #0, - }, + span: 45..49#0, name: Text { - span: Span { - lo: BytePos( - 45, - ), - hi: BytePos( - 53, - ), - ctxt: #0, - }, + span: 45..53#0, value: "{object}", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 45, - ), - hi: BytePos( - 53, - ), - ctxt: #0, - }, + span: 45..53#0, tag_name: Text { - span: Span { - lo: BytePos( - 45, - ), - hi: BytePos( - 53, - ), - ctxt: #0, - }, + span: 45..53#0, value: "property", }, tag: Property( PropertyTag { - span: Span { - lo: BytePos( - 45, - ), - hi: BytePos( - 53, - ), - ctxt: #0, - }, + span: 45..53#0, name_path: NamePath { - span: Span { - lo: BytePos( - 45, - ), - hi: BytePos( - 106, - ), - ctxt: #0, - }, + span: 45..106#0, components: [ Text { - span: Span { - lo: BytePos( - 45, - ), - hi: BytePos( - 45, - ), - ctxt: #0, - }, + span: 45..45#0, value: "", }, ], }, ty: Some( Text { - span: Span { - lo: BytePos( - 45, - ), - hi: BytePos( - 54, - ), - ctxt: #0, - }, + span: 45..54#0, value: "{boolean}", }, ), desc: Text { - span: Span { - lo: BytePos( - 45, - ), - hi: BytePos( - 100, - ), - ctxt: #0, - }, + span: 45..100#0, value: "needsRevalidate Does this point need to be revalidated?", }, }, @@ -223,130 +79,42 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 221, - ), - hi: BytePos( - 261, - ), - ctxt: #0, - }, + span: 221..261#0, description: Text { - span: Span { - lo: BytePos( - 221, - ), - hi: BytePos( - 251, - ), - ctxt: #0, - }, + span: 221..251#0, value: "The x coordinate of the point.", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 221, - ), - hi: BytePos( - 225, - ), - ctxt: #0, - }, + span: 221..225#0, tag_name: Text { - span: Span { - lo: BytePos( - 221, - ), - hi: BytePos( - 225, - ), - ctxt: #0, - }, + span: 221..225#0, value: "type", }, tag: Type( TypeTag { - span: Span { - lo: BytePos( - 221, - ), - hi: BytePos( - 225, - ), - ctxt: #0, - }, + span: 221..225#0, name: Text { - span: Span { - lo: BytePos( - 221, - ), - hi: BytePos( - 229, - ), - ctxt: #0, - }, + span: 221..229#0, value: "{number}", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 221, - ), - hi: BytePos( - 225, - ), - ctxt: #0, - }, + span: 221..225#0, tag_name: Text { - span: Span { - lo: BytePos( - 221, - ), - hi: BytePos( - 225, - ), - ctxt: #0, - }, + span: 221..225#0, value: "name", }, tag: Name( NameTag { - span: Span { - lo: BytePos( - 221, - ), - hi: BytePos( - 225, - ), - ctxt: #0, - }, + span: 221..225#0, name_path: NamePath { - span: Span { - lo: BytePos( - 221, - ), - hi: BytePos( - 261, - ), - ctxt: #0, - }, + span: 221..261#0, components: [ Text { - span: Span { - lo: BytePos( - 221, - ), - hi: BytePos( - 226, - ), - ctxt: #0, - }, + span: 221..226#0, value: "point", }, ], @@ -357,130 +125,42 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 385, - ), - hi: BytePos( - 463, - ), - ctxt: #0, - }, + span: 385..463#0, description: Text { - span: Span { - lo: BytePos( - 385, - ), - hi: BytePos( - 415, - ), - ctxt: #0, - }, + span: 385..415#0, value: "The y coordinate of the point.", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 385, - ), - hi: BytePos( - 389, - ), - ctxt: #0, - }, + span: 385..389#0, tag_name: Text { - span: Span { - lo: BytePos( - 385, - ), - hi: BytePos( - 389, - ), - ctxt: #0, - }, + span: 385..389#0, value: "type", }, tag: Type( TypeTag { - span: Span { - lo: BytePos( - 385, - ), - hi: BytePos( - 389, - ), - ctxt: #0, - }, + span: 385..389#0, name: Text { - span: Span { - lo: BytePos( - 385, - ), - hi: BytePos( - 393, - ), - ctxt: #0, - }, + span: 385..393#0, value: "{number}", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 385, - ), - hi: BytePos( - 389, - ), - ctxt: #0, - }, + span: 385..389#0, tag_name: Text { - span: Span { - lo: BytePos( - 385, - ), - hi: BytePos( - 389, - ), - ctxt: #0, - }, + span: 385..389#0, value: "name", }, tag: Name( NameTag { - span: Span { - lo: BytePos( - 385, - ), - hi: BytePos( - 389, - ), - ctxt: #0, - }, + span: 385..389#0, name_path: NamePath { - span: Span { - lo: BytePos( - 385, - ), - hi: BytePos( - 463, - ), - ctxt: #0, - }, + span: 385..463#0, components: [ Text { - span: Span { - lo: BytePos( - 385, - ), - hi: BytePos( - 390, - ), - ctxt: #0, - }, + span: 385..390#0, value: "point", }, ], @@ -491,130 +171,42 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 636, - ), - hi: BytePos( - 713, - ), - ctxt: #0, - }, + span: 636..713#0, description: Text { - span: Span { - lo: BytePos( - 636, - ), - hi: BytePos( - 636, - ), - ctxt: #0, - }, + span: 636..636#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 636, - ), - hi: BytePos( - 640, - ), - ctxt: #0, - }, + span: 636..640#0, tag_name: Text { - span: Span { - lo: BytePos( - 636, - ), - hi: BytePos( - 640, - ), - ctxt: #0, - }, + span: 636..640#0, value: "type", }, tag: Type( TypeTag { - span: Span { - lo: BytePos( - 636, - ), - hi: BytePos( - 640, - ), - ctxt: #0, - }, + span: 636..640#0, name: Text { - span: Span { - lo: BytePos( - 636, - ), - hi: BytePos( - 643, - ), - ctxt: #0, - }, + span: 636..643#0, value: "{Array}", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 636, - ), - hi: BytePos( - 640, - ), - ctxt: #0, - }, + span: 636..640#0, tag_name: Text { - span: Span { - lo: BytePos( - 636, - ), - hi: BytePos( - 640, - ), - ctxt: #0, - }, + span: 636..640#0, value: "name", }, tag: Name( NameTag { - span: Span { - lo: BytePos( - 636, - ), - hi: BytePos( - 640, - ), - ctxt: #0, - }, + span: 636..640#0, name_path: NamePath { - span: Span { - lo: BytePos( - 636, - ), - hi: BytePos( - 713, - ), - ctxt: #0, - }, + span: 636..713#0, components: [ Text { - span: Span { - lo: BytePos( - 636, - ), - hi: BytePos( - 639, - ), - ctxt: #0, - }, + span: 636..639#0, value: "map", }, ], @@ -625,25 +217,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 778, - ), - hi: BytePos( - 778, - ), - ctxt: #0, - }, + span: 778..778#0, description: Text { - span: Span { - lo: BytePos( - 778, - ), - hi: BytePos( - 797, - ), - ctxt: #0, - }, + span: 778..797#0, value: "The current cursor.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/membertag.debug b/crates/jsdoc/tests/fixtures/membertag.debug index 61588c0de3e5..b880e373cc9d 100644 --- a/crates/jsdoc/tests/fixtures/membertag.debug +++ b/crates/jsdoc/tests/fixtures/membertag.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 0..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "member", }, tag: Member( MemberTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -85,83 +29,27 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 24, - ), - ctxt: #0, - }, + span: 0..24#0, description: Text { - span: Span { - lo: BytePos( - 24, - ), - hi: BytePos( - 24, - ), - ctxt: #0, - }, + span: 24..24#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 24, - ), - hi: BytePos( - 27, - ), - ctxt: #0, - }, + span: 24..27#0, tag_name: Text { - span: Span { - lo: BytePos( - 24, - ), - hi: BytePos( - 27, - ), - ctxt: #0, - }, + span: 24..27#0, value: "var", }, tag: Member( MemberTag { - span: Span { - lo: BytePos( - 24, - ), - hi: BytePos( - 27, - ), - ctxt: #0, - }, + span: 24..27#0, ty: Text { - span: Span { - lo: BytePos( - 24, - ), - hi: BytePos( - 30, - ), - ctxt: #0, - }, + span: 24..30#0, value: "foobar", }, name: Text { - span: Span { - lo: BytePos( - 24, - ), - hi: BytePos( - 24, - ), - ctxt: #0, - }, + span: 24..24#0, value: "", }, }, @@ -170,83 +58,27 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 47, - ), - ctxt: #0, - }, + span: 43..47#0, description: Text { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 43, - ), - ctxt: #0, - }, + span: 43..43#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 46, - ), - ctxt: #0, - }, + span: 43..46#0, tag_name: Text { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 46, - ), - ctxt: #0, - }, + span: 43..46#0, value: "var", }, tag: Member( MemberTag { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 46, - ), - ctxt: #0, - }, + span: 43..46#0, ty: Text { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 43, - ), - ctxt: #0, - }, + span: 43..43#0, value: "", }, name: Text { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 49, - ), - ctxt: #0, - }, + span: 43..49#0, value: "string", }, }, @@ -255,83 +87,27 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 69, - ), - hi: BytePos( - 69, - ), - ctxt: #0, - }, + span: 69..69#0, description: Text { - span: Span { - lo: BytePos( - 69, - ), - hi: BytePos( - 69, - ), - ctxt: #0, - }, + span: 69..69#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 69, - ), - hi: BytePos( - 75, - ), - ctxt: #0, - }, + span: 69..75#0, tag_name: Text { - span: Span { - lo: BytePos( - 69, - ), - hi: BytePos( - 75, - ), - ctxt: #0, - }, + span: 69..75#0, value: "member", }, tag: Member( MemberTag { - span: Span { - lo: BytePos( - 69, - ), - hi: BytePos( - 75, - ), - ctxt: #0, - }, + span: 69..75#0, ty: Text { - span: Span { - lo: BytePos( - 69, - ), - hi: BytePos( - 69, - ), - ctxt: #0, - }, + span: 69..69#0, value: "", }, name: Text { - span: Span { - lo: BytePos( - 69, - ), - hi: BytePos( - 75, - ), - ctxt: #0, - }, + span: 69..75#0, value: "Object", }, }, diff --git a/crates/jsdoc/tests/fixtures/methoddefinition.debug b/crates/jsdoc/tests/fixtures/methoddefinition.debug index 089a9f4216a2..0f591eb19d5c 100644 --- a/crates/jsdoc/tests/fixtures/methoddefinition.debug +++ b/crates/jsdoc/tests/fixtures/methoddefinition.debug @@ -1,48 +1,16 @@ [ JsDoc { - span: Span { - lo: BytePos( - 18, - ), - hi: BytePos( - 18, - ), - ctxt: #0, - }, + span: 18..18#0, description: Text { - span: Span { - lo: BytePos( - 18, - ), - hi: BytePos( - 30, - ), - ctxt: #0, - }, + span: 18..30#0, value: "Document me.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 61, - ), - hi: BytePos( - 61, - ), - ctxt: #0, - }, + span: 61..61#0, description: Text { - span: Span { - lo: BytePos( - 61, - ), - hi: BytePos( - 80, - ), - ctxt: #0, - }, + span: 61..80#0, value: "Static document me.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/mixintag.debug b/crates/jsdoc/tests/fixtures/mixintag.debug index 1799549a0c60..4d0bc8ab5033 100644 --- a/crates/jsdoc/tests/fixtures/mixintag.debug +++ b/crates/jsdoc/tests/fixtures/mixintag.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 133, - ), - ctxt: #0, - }, + span: 1..133#0, value: "This provides methods used for event handling. It's not meant to\n * be used directly, except as a provider of related methods.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "mixin", }, tag: Mixin( MixinTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -73,120 +25,40 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 173, - ), - hi: BytePos( - 173, - ), - ctxt: #0, - }, + span: 173..173#0, description: Text { - span: Span { - lo: BytePos( - 173, - ), - hi: BytePos( - 189, - ), - ctxt: #0, - }, + span: 173..189#0, value: "fires something.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 228, - ), - ctxt: #0, - }, + span: 228..228#0, description: Text { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 245, - ), - ctxt: #0, - }, + span: 228..245#0, value: "handles a signal.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 280, - ), - hi: BytePos( - 280, - ), - ctxt: #0, - }, + span: 280..280#0, description: Text { - span: Span { - lo: BytePos( - 280, - ), - hi: BytePos( - 280, - ), - ctxt: #0, - }, + span: 280..280#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 280, - ), - hi: BytePos( - 291, - ), - ctxt: #0, - }, + span: 280..291#0, tag_name: Text { - span: Span { - lo: BytePos( - 280, - ), - hi: BytePos( - 291, - ), - ctxt: #0, - }, + span: 280..291#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 280, - ), - hi: BytePos( - 291, - ), - ctxt: #0, - }, + span: 280..291#0, ty: Some( Text { - span: Span { - lo: BytePos( - 280, - ), - hi: BytePos( - 297, - ), - ctxt: #0, - }, + span: 280..297#0, value: "* @mixes Eventful", }, ), diff --git a/crates/jsdoc/tests/fixtures/mixintag2.debug b/crates/jsdoc/tests/fixtures/mixintag2.debug index 241bfbb6ef7a..fb469a3e1215 100644 --- a/crates/jsdoc/tests/fixtures/mixintag2.debug +++ b/crates/jsdoc/tests/fixtures/mixintag2.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, value: "mixy", }, }, @@ -85,71 +29,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 36, - ), - hi: BytePos( - 36, - ), - ctxt: #0, - }, + span: 36..36#0, description: Text { - span: Span { - lo: BytePos( - 36, - ), - hi: BytePos( - 48, - ), - ctxt: #0, - }, + span: 36..48#0, value: "Object A.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 36, - ), - hi: BytePos( - 41, - ), - ctxt: #0, - }, + span: 36..41#0, tag_name: Text { - span: Span { - lo: BytePos( - 36, - ), - hi: BytePos( - 41, - ), - ctxt: #0, - }, + span: 36..41#0, value: "mixin", }, tag: Mixin( MixinTag { - span: Span { - lo: BytePos( - 36, - ), - hi: BytePos( - 41, - ), - ctxt: #0, - }, + span: 36..41#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -158,95 +54,31 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 91, - ), - hi: BytePos( - 91, - ), - ctxt: #0, - }, + span: 91..91#0, description: Text { - span: Span { - lo: BytePos( - 91, - ), - hi: BytePos( - 103, - ), - ctxt: #0, - }, + span: 91..103#0, value: "Some method.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 141, - ), - hi: BytePos( - 141, - ), - ctxt: #0, - }, + span: 141..141#0, description: Text { - span: Span { - lo: BytePos( - 141, - ), - hi: BytePos( - 169, - ), - ctxt: #0, - }, + span: 141..169#0, value: "Object B. Mixes Object A.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 141, - ), - hi: BytePos( - 146, - ), - ctxt: #0, - }, + span: 141..146#0, tag_name: Text { - span: Span { - lo: BytePos( - 141, - ), - hi: BytePos( - 146, - ), - ctxt: #0, - }, + span: 141..146#0, value: "mixin", }, tag: Mixin( MixinTag { - span: Span { - lo: BytePos( - 141, - ), - hi: BytePos( - 146, - ), - ctxt: #0, - }, + span: 141..146#0, name: Text { - span: Span { - lo: BytePos( - 141, - ), - hi: BytePos( - 169, - ), - ctxt: #0, - }, + span: 141..169#0, value: "* @mixes module:mixy.ObjectA", }, }, @@ -255,71 +87,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 241, - ), - hi: BytePos( - 241, - ), - ctxt: #0, - }, + span: 241..241#0, description: Text { - span: Span { - lo: BytePos( - 241, - ), - hi: BytePos( - 293, - ), - ctxt: #0, - }, + span: 241..293#0, value: "Object C. Mixes Object B and adds its own method.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 241, - ), - hi: BytePos( - 246, - ), - ctxt: #0, - }, + span: 241..246#0, tag_name: Text { - span: Span { - lo: BytePos( - 241, - ), - hi: BytePos( - 246, - ), - ctxt: #0, - }, + span: 241..246#0, value: "mixin", }, tag: Mixin( MixinTag { - span: Span { - lo: BytePos( - 241, - ), - hi: BytePos( - 246, - ), - ctxt: #0, - }, + span: 241..246#0, name: Text { - span: Span { - lo: BytePos( - 241, - ), - hi: BytePos( - 269, - ), - ctxt: #0, - }, + span: 241..269#0, value: "* @mixes module:mixy.ObjectB", }, }, @@ -328,72 +112,24 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 366, - ), - hi: BytePos( - 366, - ), - ctxt: #0, - }, + span: 366..366#0, description: Text { - span: Span { - lo: BytePos( - 366, - ), - hi: BytePos( - 451, - ), - ctxt: #0, - }, + span: 366..451#0, value: "Super-sweet method that's named in the comment, making this a virtual comment.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 366, - ), - hi: BytePos( - 374, - ), - ctxt: #0, - }, + span: 366..374#0, tag_name: Text { - span: Span { - lo: BytePos( - 366, - ), - hi: BytePos( - 374, - ), - ctxt: #0, - }, + span: 366..374#0, value: "function", }, tag: Function( FunctionTag { - span: Span { - lo: BytePos( - 366, - ), - hi: BytePos( - 374, - ), - ctxt: #0, - }, + span: 366..374#0, name: Some( Text { - span: Span { - lo: BytePos( - 366, - ), - hi: BytePos( - 396, - ), - ctxt: #0, - }, + span: 366..396#0, value: "module:mixy.ObjectC.superSweet", }, ), @@ -403,120 +139,40 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 546, - ), - hi: BytePos( - 546, - ), - ctxt: #0, - }, + span: 546..546#0, description: Text { - span: Span { - lo: BytePos( - 546, - ), - hi: BytePos( - 585, - ), - ctxt: #0, - }, + span: 546..585#0, value: "Class that mixes Object A, so it gets {", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 546, - ), - hi: BytePos( - 550, - ), - ctxt: #0, - }, + span: 546..550#0, tag_name: Text { - span: Span { - lo: BytePos( - 546, - ), - hi: BytePos( - 550, - ), - ctxt: #0, - }, + span: 546..550#0, value: "link", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 546, - ), - hi: BytePos( - 550, - ), - ctxt: #0, - }, + span: 546..550#0, extras: Text { - span: Span { - lo: BytePos( - 546, - ), - hi: BytePos( - 573, - ), - ctxt: #0, - }, + span: 546..573#0, value: "module:mixy.ClassA#method}.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 546, - ), - hi: BytePos( - 551, - ), - ctxt: #0, - }, + span: 546..551#0, tag_name: Text { - span: Span { - lo: BytePos( - 546, - ), - hi: BytePos( - 551, - ), - ctxt: #0, - }, + span: 546..551#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 546, - ), - hi: BytePos( - 551, - ), - ctxt: #0, - }, + span: 546..551#0, ty: Some( Text { - span: Span { - lo: BytePos( - 546, - ), - hi: BytePos( - 574, - ), - ctxt: #0, - }, + span: 546..574#0, value: "* @mixes module:mixy.ObjectA", }, ), @@ -527,95 +183,31 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 703, - ), - hi: BytePos( - 703, - ), - ctxt: #0, - }, + span: 703..703#0, description: Text { - span: Span { - lo: BytePos( - 703, - ), - hi: BytePos( - 714, - ), - ctxt: #0, - }, + span: 703..714#0, value: "Do a thing.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 777, - ), - hi: BytePos( - 857, - ), - ctxt: #0, - }, + span: 777..857#0, description: Text { - span: Span { - lo: BytePos( - 777, - ), - hi: BytePos( - 816, - ), - ctxt: #0, - }, + span: 777..816#0, value: "Class that mixes Object C, so it gets {", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 777, - ), - hi: BytePos( - 781, - ), - ctxt: #0, - }, + span: 777..781#0, tag_name: Text { - span: Span { - lo: BytePos( - 777, - ), - hi: BytePos( - 781, - ), - ctxt: #0, - }, + span: 777..781#0, value: "link", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 777, - ), - hi: BytePos( - 781, - ), - ctxt: #0, - }, + span: 777..781#0, extras: Text { - span: Span { - lo: BytePos( - 777, - ), - hi: BytePos( - 807, - ), - ctxt: #0, - }, + span: 777..807#0, value: "module:mixy.ClassB#method} and", }, }, diff --git a/crates/jsdoc/tests/fixtures/modifiestag.debug b/crates/jsdoc/tests/fixtures/modifiestag.debug index 43924069d8f2..59f52cc9a690 100644 --- a/crates/jsdoc/tests/fixtures/modifiestag.debug +++ b/crates/jsdoc/tests/fixtures/modifiestag.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 24, - ), - ctxt: #0, - }, + span: 1..24#0, value: "My mutator function.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "modifies", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, extras: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, value: "{(foo|bar)}", }, }, diff --git a/crates/jsdoc/tests/fixtures/moduleclasses.debug b/crates/jsdoc/tests/fixtures/moduleclasses.debug index 5077f9aca4c8..97c7a5d3759a 100644 --- a/crates/jsdoc/tests/fixtures/moduleclasses.debug +++ b/crates/jsdoc/tests/fixtures/moduleclasses.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 4, - ), - ctxt: #0, - }, + span: 1..4#0, value: "foo", }, }, @@ -85,145 +29,49 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 21, - ), - hi: BytePos( - 21, - ), - ctxt: #0, - }, + span: 21..21#0, description: Text { - span: Span { - lo: BytePos( - 21, - ), - hi: BytePos( - 31, - ), - ctxt: #0, - }, + span: 21..31#0, value: "Bar class.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 55, - ), - hi: BytePos( - 55, - ), - ctxt: #0, - }, + span: 55..55#0, description: Text { - span: Span { - lo: BytePos( - 55, - ), - hi: BytePos( - 71, - ), - ctxt: #0, - }, + span: 55..71#0, value: "Construct a Bar.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 107, - ), - hi: BytePos( - 107, - ), - ctxt: #0, - }, + span: 107..107#0, description: Text { - span: Span { - lo: BytePos( - 107, - ), - hi: BytePos( - 119, - ), - ctxt: #0, - }, + span: 107..119#0, value: "bar property", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 158, - ), - hi: BytePos( - 158, - ), - ctxt: #0, - }, + span: 158..158#0, description: Text { - span: Span { - lo: BytePos( - 158, - ), - hi: BytePos( - 168, - ), - ctxt: #0, - }, + span: 158..168#0, value: "Baz class.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 199, - ), - hi: BytePos( - 199, - ), - ctxt: #0, - }, + span: 199..199#0, description: Text { - span: Span { - lo: BytePos( - 199, - ), - hi: BytePos( - 215, - ), - ctxt: #0, - }, + span: 199..215#0, value: "Construct a Baz.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 251, - ), - hi: BytePos( - 251, - ), - ctxt: #0, - }, + span: 251..251#0, description: Text { - span: Span { - lo: BytePos( - 251, - ), - hi: BytePos( - 263, - ), - ctxt: #0, - }, + span: 251..263#0, value: "baz property", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/moduleinner.debug b/crates/jsdoc/tests/fixtures/moduleinner.debug index 67693a45e269..0dc6b1f69af0 100644 --- a/crates/jsdoc/tests/fixtures/moduleinner.debug +++ b/crates/jsdoc/tests/fixtures/moduleinner.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 3, - ), - ctxt: #0, - }, + span: 1..3#0, value: "my", }, }, @@ -85,85 +29,29 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 43, - ), - ctxt: #0, - }, + span: 43..43#0, description: Text { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 57, - ), - ctxt: #0, - }, + span: 43..57#0, value: "document fooIn", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 90, - ), - ctxt: #0, - }, + span: 0..90#0, description: Text { - span: Span { - lo: BytePos( - 90, - ), - hi: BytePos( - 90, - ), - ctxt: #0, - }, + span: 90..90#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 90, - ), - hi: BytePos( - 99, - ), - ctxt: #0, - }, + span: 90..99#0, tag_name: Text { - span: Span { - lo: BytePos( - 90, - ), - hi: BytePos( - 99, - ), - ctxt: #0, - }, + span: 90..99#0, value: "namespace", }, tag: Namespace( NamespaceTag { - span: Span { - lo: BytePos( - 90, - ), - hi: BytePos( - 99, - ), - ctxt: #0, - }, + span: 90..99#0, ty: None, name: None, }, @@ -172,85 +60,29 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 120, - ), - hi: BytePos( - 120, - ), - ctxt: #0, - }, + span: 120..120#0, description: Text { - span: Span { - lo: BytePos( - 120, - ), - hi: BytePos( - 136, - ), - ctxt: #0, - }, + span: 120..136#0, value: "document bar.Zop", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 175, - ), - hi: BytePos( - 175, - ), - ctxt: #0, - }, + span: 175..175#0, description: Text { - span: Span { - lo: BytePos( - 175, - ), - hi: BytePos( - 175, - ), - ctxt: #0, - }, + span: 175..175#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 175, - ), - hi: BytePos( - 186, - ), - ctxt: #0, - }, + span: 175..186#0, tag_name: Text { - span: Span { - lo: BytePos( - 175, - ), - hi: BytePos( - 186, - ), - ctxt: #0, - }, + span: 175..186#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 175, - ), - hi: BytePos( - 186, - ), - ctxt: #0, - }, + span: 175..186#0, ty: None, name: None, }, @@ -259,49 +91,17 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 228, - ), - ctxt: #0, - }, + span: 228..228#0, description: Text { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 255, - ), - ctxt: #0, - }, + span: 228..255#0, value: "document exports.Frotz#quaz", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 293, - ), - hi: BytePos( - 293, - ), - ctxt: #0, - }, + span: 293..293#0, description: Text { - span: Span { - lo: BytePos( - 293, - ), - hi: BytePos( - 308, - ), - ctxt: #0, - }, + span: 293..308#0, value: "document fooOut", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/moduleisconstructor.debug b/crates/jsdoc/tests/fixtures/moduleisconstructor.debug index d7a187639ed7..56395271301f 100644 --- a/crates/jsdoc/tests/fixtures/moduleisconstructor.debug +++ b/crates/jsdoc/tests/fixtures/moduleisconstructor.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 29, - ), - ctxt: #0, - }, + span: 1..29#0, value: "Describe the module here.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "config", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "mymodule", }, }, @@ -85,134 +29,46 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 66, - ), - hi: BytePos( - 66, - ), - ctxt: #0, - }, + span: 66..66#0, description: Text { - span: Span { - lo: BytePos( - 66, - ), - hi: BytePos( - 99, - ), - ctxt: #0, - }, + span: 66..99#0, value: "Create a new configuration.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 66, - ), - hi: BytePos( - 75, - ), - ctxt: #0, - }, + span: 66..75#0, tag_name: Text { - span: Span { - lo: BytePos( - 66, - ), - hi: BytePos( - 75, - ), - ctxt: #0, - }, + span: 66..75#0, value: "classdesc", }, tag: ClassDesc( JSDocClassDescTag { - span: Span { - lo: BytePos( - 66, - ), - hi: BytePos( - 75, - ), - ctxt: #0, - }, + span: 66..75#0, desc: Text { - span: Span { - lo: BytePos( - 66, - ), - hi: BytePos( - 90, - ), - ctxt: #0, - }, + span: 66..90#0, value: "Describe the class here.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 66, - ), - hi: BytePos( - 71, - ), - ctxt: #0, - }, + span: 66..71#0, tag_name: Text { - span: Span { - lo: BytePos( - 66, - ), - hi: BytePos( - 71, - ), - ctxt: #0, - }, + span: 66..71#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 66, - ), - hi: BytePos( - 71, - ), - ctxt: #0, - }, + span: 66..71#0, ty: Some( Text { - span: Span { - lo: BytePos( - 66, - ), - hi: BytePos( - 97, - ), - ctxt: #0, - }, + span: 66..97#0, value: "* @alias module:mymodule/config", }, ), name: Some( Text { - span: Span { - lo: BytePos( - 66, - ), - hi: BytePos( - 86, - ), - ctxt: #0, - }, + span: 66..86#0, value: "* @param {string} id", }, ), @@ -222,109 +78,37 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 237, - ), - hi: BytePos( - 237, - ), - ctxt: #0, - }, + span: 237..237#0, description: Text { - span: Span { - lo: BytePos( - 237, - ), - hi: BytePos( - 249, - ), - ctxt: #0, - }, + span: 237..249#0, value: "Document me.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 277, - ), - hi: BytePos( - 277, - ), - ctxt: #0, - }, + span: 277..277#0, description: Text { - span: Span { - lo: BytePos( - 277, - ), - hi: BytePos( - 308, - ), - ctxt: #0, - }, + span: 277..308#0, value: "Get the configuration ID.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 277, - ), - hi: BytePos( - 283, - ), - ctxt: #0, - }, + span: 277..283#0, tag_name: Text { - span: Span { - lo: BytePos( - 277, - ), - hi: BytePos( - 283, - ), - ctxt: #0, - }, + span: 277..283#0, value: "return", }, tag: Return( ReturnTag { - span: Span { - lo: BytePos( - 277, - ), - hi: BytePos( - 283, - ), - ctxt: #0, - }, + span: 277..283#0, ty: Some( Text { - span: Span { - lo: BytePos( - 277, - ), - hi: BytePos( - 285, - ), - ctxt: #0, - }, + span: 277..285#0, value: "{string}", }, ), description: Text { - span: Span { - lo: BytePos( - 277, - ), - hi: BytePos( - 298, - ), - ctxt: #0, - }, + span: 277..298#0, value: "The configuration ID.", }, }, diff --git a/crates/jsdoc/tests/fixtures/moduleisconstructor2.debug b/crates/jsdoc/tests/fixtures/moduleisconstructor2.debug index b60b29f13fff..752b8df905e0 100644 --- a/crates/jsdoc/tests/fixtures/moduleisconstructor2.debug +++ b/crates/jsdoc/tests/fixtures/moduleisconstructor2.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 29, - ), - ctxt: #0, - }, + span: 1..29#0, value: "Describe the module here.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "config", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "mymodule", }, }, @@ -85,110 +29,38 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 66, - ), - hi: BytePos( - 66, - ), - ctxt: #0, - }, + span: 66..66#0, description: Text { - span: Span { - lo: BytePos( - 66, - ), - hi: BytePos( - 90, - ), - ctxt: #0, - }, + span: 66..90#0, value: "Describe the class here.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 132, - ), - hi: BytePos( - 132, - ), - ctxt: #0, - }, + span: 132..132#0, description: Text { - span: Span { - lo: BytePos( - 132, - ), - hi: BytePos( - 166, - ), - ctxt: #0, - }, + span: 132..166#0, value: "Create a new configuration.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 132, - ), - hi: BytePos( - 137, - ), - ctxt: #0, - }, + span: 132..137#0, tag_name: Text { - span: Span { - lo: BytePos( - 132, - ), - hi: BytePos( - 137, - ), - ctxt: #0, - }, + span: 132..137#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 132, - ), - hi: BytePos( - 137, - ), - ctxt: #0, - }, + span: 132..137#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 132, - ), - hi: BytePos( - 140, - ), - ctxt: #0, - }, + span: 132..140#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 132, - ), - hi: BytePos( - 134, - ), - ctxt: #0, - }, + span: 132..134#0, value: "id", }, }, @@ -197,109 +69,37 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 235, - ), - hi: BytePos( - 235, - ), - ctxt: #0, - }, + span: 235..235#0, description: Text { - span: Span { - lo: BytePos( - 235, - ), - hi: BytePos( - 247, - ), - ctxt: #0, - }, + span: 235..247#0, value: "Document me.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 288, - ), - hi: BytePos( - 288, - ), - ctxt: #0, - }, + span: 288..288#0, description: Text { - span: Span { - lo: BytePos( - 288, - ), - hi: BytePos( - 327, - ), - ctxt: #0, - }, + span: 288..327#0, value: "Get the configuration ID.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 288, - ), - hi: BytePos( - 294, - ), - ctxt: #0, - }, + span: 288..294#0, tag_name: Text { - span: Span { - lo: BytePos( - 288, - ), - hi: BytePos( - 294, - ), - ctxt: #0, - }, + span: 288..294#0, value: "return", }, tag: Return( ReturnTag { - span: Span { - lo: BytePos( - 288, - ), - hi: BytePos( - 294, - ), - ctxt: #0, - }, + span: 288..294#0, ty: Some( Text { - span: Span { - lo: BytePos( - 288, - ), - hi: BytePos( - 296, - ), - ctxt: #0, - }, + span: 288..296#0, value: "{string}", }, ), description: Text { - span: Span { - lo: BytePos( - 288, - ), - hi: BytePos( - 309, - ), - ctxt: #0, - }, + span: 288..309#0, value: "The configuration ID.", }, }, diff --git a/crates/jsdoc/tests/fixtures/moduleisfunction.debug b/crates/jsdoc/tests/fixtures/moduleisfunction.debug index d59d5eaaa6f5..0e94dc0f4325 100644 --- a/crates/jsdoc/tests/fixtures/moduleisfunction.debug +++ b/crates/jsdoc/tests/fixtures/moduleisfunction.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 32, - ), - ctxt: #0, - }, + span: 1..32#0, value: "This is a module called foo.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 4, - ), - ctxt: #0, - }, + span: 1..4#0, value: "foo", }, }, @@ -85,86 +29,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 57, - ), - hi: BytePos( - 57, - ), - ctxt: #0, - }, + span: 57..57#0, description: Text { - span: Span { - lo: BytePos( - 57, - ), - hi: BytePos( - 97, - ), - ctxt: #0, - }, + span: 57..97#0, value: "The module exports a single function.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 57, - ), - hi: BytePos( - 62, - ), - ctxt: #0, - }, + span: 57..62#0, tag_name: Text { - span: Span { - lo: BytePos( - 57, - ), - hi: BytePos( - 62, - ), - ctxt: #0, - }, + span: 57..62#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 57, - ), - hi: BytePos( - 62, - ), - ctxt: #0, - }, + span: 57..62#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 57, - ), - hi: BytePos( - 65, - ), - ctxt: #0, - }, + span: 57..65#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 57, - ), - hi: BytePos( - 60, - ), - ctxt: #0, - }, + span: 57..60#0, value: "bar", }, }, diff --git a/crates/jsdoc/tests/fixtures/modules/data/mod-1.debug b/crates/jsdoc/tests/fixtures/modules/data/mod-1.debug index a7726633421b..5320d74eceb4 100644 --- a/crates/jsdoc/tests/fixtures/modules/data/mod-1.debug +++ b/crates/jsdoc/tests/fixtures/modules/data/mod-1.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 0..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, }, diff --git a/crates/jsdoc/tests/fixtures/modules/data/mod-2.debug b/crates/jsdoc/tests/fixtures/modules/data/mod-2.debug index 8cbf1dba23aa..169981a52fa1 100644 --- a/crates/jsdoc/tests/fixtures/modules/data/mod-2.debug +++ b/crates/jsdoc/tests/fixtures/modules/data/mod-2.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 13, - ), - ctxt: #0, - }, + span: 1..13#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 3, - ), - ctxt: #0, - }, + span: 1..3#0, value: "my", }, }, diff --git a/crates/jsdoc/tests/fixtures/modules/data/mod-3.debug b/crates/jsdoc/tests/fixtures/modules/data/mod-3.debug index 1f0ec163266f..9f7f9d363ed9 100644 --- a/crates/jsdoc/tests/fixtures/modules/data/mod-3.debug +++ b/crates/jsdoc/tests/fixtures/modules/data/mod-3.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 1..16#0, value: "My test module.", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 3, - ), - ctxt: #0, - }, + span: 1..3#0, value: "my", }, }, @@ -85,71 +29,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 76, - ), - hi: BytePos( - 76, - ), - ctxt: #0, - }, + span: 76..76#0, description: Text { - span: Span { - lo: BytePos( - 76, - ), - hi: BytePos( - 76, - ), - ctxt: #0, - }, + span: 76..76#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 76, - ), - hi: BytePos( - 88, - ), - ctxt: #0, - }, + span: 76..88#0, tag_name: Text { - span: Span { - lo: BytePos( - 76, - ), - hi: BytePos( - 88, - ), - ctxt: #0, - }, + span: 76..88#0, value: "undocumented", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 76, - ), - hi: BytePos( - 88, - ), - ctxt: #0, - }, + span: 76..88#0, extras: Text { - span: Span { - lo: BytePos( - 76, - ), - hi: BytePos( - 99, - ), - ctxt: #0, - }, + span: 76..99#0, value: "@alias module:my/module", }, }, @@ -158,49 +54,17 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 167, - ), - hi: BytePos( - 167, - ), - ctxt: #0, - }, + span: 167..167#0, description: Text { - span: Span { - lo: BytePos( - 167, - ), - hi: BytePos( - 187, - ), - ctxt: #0, - }, + span: 167..187#0, value: "Document a property.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 231, - ), - hi: BytePos( - 231, - ), - ctxt: #0, - }, + span: 231..231#0, description: Text { - span: Span { - lo: BytePos( - 231, - ), - hi: BytePos( - 249, - ), - ctxt: #0, - }, + span: 231..249#0, value: "Document a method.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/moduletag.debug b/crates/jsdoc/tests/fixtures/moduletag.debug index 845356f49d2d..735996cd0ed4 100644 --- a/crates/jsdoc/tests/fixtures/moduletag.debug +++ b/crates/jsdoc/tests/fixtures/moduletag.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, value: "bookshelf", }, }, @@ -85,61 +29,21 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 31, - ), - hi: BytePos( - 31, - ), - ctxt: #0, - }, + span: 31..31#0, description: Text { - span: Span { - lo: BytePos( - 31, - ), - hi: BytePos( - 31, - ), - ctxt: #0, - }, + span: 31..31#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 31, - ), - hi: BytePos( - 36, - ), - ctxt: #0, - }, + span: 31..36#0, tag_name: Text { - span: Span { - lo: BytePos( - 31, - ), - hi: BytePos( - 36, - ), - ctxt: #0, - }, + span: 31..36#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 31, - ), - hi: BytePos( - 36, - ), - ctxt: #0, - }, + span: 31..36#0, ty: None, name: None, }, @@ -148,25 +52,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 83, - ), - hi: BytePos( - 83, - ), - ctxt: #0, - }, + span: 83..83#0, description: Text { - span: Span { - lo: BytePos( - 83, - ), - hi: BytePos( - 94, - ), - ctxt: #0, - }, + span: 83..94#0, value: "document me", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/moduletag10.debug b/crates/jsdoc/tests/fixtures/moduletag10.debug index 7cfc22576594..b9707b113046 100644 --- a/crates/jsdoc/tests/fixtures/moduletag10.debug +++ b/crates/jsdoc/tests/fixtures/moduletag10.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 4, - ), - ctxt: #0, - }, + span: 1..4#0, value: "foo", }, }, diff --git a/crates/jsdoc/tests/fixtures/moduletag11.debug b/crates/jsdoc/tests/fixtures/moduletag11.debug index 078decddb7e8..a00d864fda07 100644 --- a/crates/jsdoc/tests/fixtures/moduletag11.debug +++ b/crates/jsdoc/tests/fixtures/moduletag11.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 1..16#0, value: "Test module.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 4, - ), - ctxt: #0, - }, + span: 1..4#0, value: "foo", }, }, @@ -85,73 +29,25 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 41, - ), - hi: BytePos( - 41, - ), - ctxt: #0, - }, + span: 41..41#0, description: Text { - span: Span { - lo: BytePos( - 41, - ), - hi: BytePos( - 52, - ), - ctxt: #0, - }, + span: 41..52#0, value: "Test class.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 83, - ), - hi: BytePos( - 83, - ), - ctxt: #0, - }, + span: 83..83#0, description: Text { - span: Span { - lo: BytePos( - 83, - ), - hi: BytePos( - 106, - ), - ctxt: #0, - }, + span: 83..106#0, value: "Test class constructor.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 140, - ), - hi: BytePos( - 140, - ), - ctxt: #0, - }, + span: 140..140#0, description: Text { - span: Span { - lo: BytePos( - 140, - ), - hi: BytePos( - 152, - ), - ctxt: #0, - }, + span: 140..152#0, value: "Test method.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/moduletag2.debug b/crates/jsdoc/tests/fixtures/moduletag2.debug index f97051ade980..8252202afcf4 100644 --- a/crates/jsdoc/tests/fixtures/moduletag2.debug +++ b/crates/jsdoc/tests/fixtures/moduletag2.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "color", }, }, @@ -85,49 +29,17 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 52, - ), - hi: BytePos( - 52, - ), - ctxt: #0, - }, + span: 52..52#0, description: Text { - span: Span { - lo: BytePos( - 52, - ), - hi: BytePos( - 78, - ), - ctxt: #0, - }, + span: 52..78#0, value: "Blend two colors together.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 129, - ), - hi: BytePos( - 129, - ), - ctxt: #0, - }, + span: 129..129#0, description: Text { - span: Span { - lo: BytePos( - 129, - ), - hi: BytePos( - 163, - ), - ctxt: #0, - }, + span: 129..163#0, value: "Darken a color by the given shade.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/moduletag3.debug b/crates/jsdoc/tests/fixtures/moduletag3.debug index b1bbfb2bd2c3..d08b00b5a8af 100644 --- a/crates/jsdoc/tests/fixtures/moduletag3.debug +++ b/crates/jsdoc/tests/fixtures/moduletag3.debug @@ -1,130 +1,42 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 14, - ), - ctxt: #0, - }, + span: 1..14#0, value: "Photo/manager", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 4, - ), - ctxt: #0, - }, + span: 1..4#0, value: "foo", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, value: "desc", }, tag: Description( DescriptionTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, text: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 31, - ), - ctxt: #0, - }, + span: 1..31#0, value: "Manage a collection of photos.", }, }, @@ -133,86 +45,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 72, - ), - hi: BytePos( - 72, - ), - ctxt: #0, - }, + span: 72..72#0, description: Text { - span: Span { - lo: BytePos( - 72, - ), - hi: BytePos( - 101, - ), - ctxt: #0, - }, + span: 72..101#0, value: "Construct a new Photo manager", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 72, - ), - hi: BytePos( - 83, - ), - ctxt: #0, - }, + span: 72..83#0, tag_name: Text { - span: Span { - lo: BytePos( - 72, - ), - hi: BytePos( - 83, - ), - ctxt: #0, - }, + span: 72..83#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 72, - ), - hi: BytePos( - 83, - ), - ctxt: #0, - }, + span: 72..83#0, ty: Some( Text { - span: Span { - lo: BytePos( - 72, - ), - hi: BytePos( - 96, - ), - ctxt: #0, - }, + span: 72..96#0, value: "module:foo/Photo/manager", }, ), name: Some( Text { - span: Span { - lo: BytePos( - 72, - ), - hi: BytePos( - 142, - ), - ctxt: #0, - }, + span: 72..142#0, value: "@param {String} collectionId The identifier of the managed collection.", }, ), @@ -222,72 +78,24 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 265, - ), - hi: BytePos( - 265, - ), - ctxt: #0, - }, + span: 265..265#0, description: Text { - span: Span { - lo: BytePos( - 265, - ), - hi: BytePos( - 265, - ), - ctxt: #0, - }, + span: 265..265#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 265, - ), - hi: BytePos( - 273, - ), - ctxt: #0, - }, + span: 265..273#0, tag_name: Text { - span: Span { - lo: BytePos( - 265, - ), - hi: BytePos( - 273, - ), - ctxt: #0, - }, + span: 265..273#0, value: "function", }, tag: Function( FunctionTag { - span: Span { - lo: BytePos( - 265, - ), - hi: BytePos( - 273, - ), - ctxt: #0, - }, + span: 265..273#0, name: Some( Text { - span: Span { - lo: BytePos( - 265, - ), - hi: BytePos( - 298, - ), - ctxt: #0, - }, + span: 265..298#0, value: "module:foo/Photo/manager#getPhoto", }, ), @@ -295,63 +103,23 @@ ), }, TagItem { - span: Span { - lo: BytePos( - 265, - ), - hi: BytePos( - 270, - ), - ctxt: #0, - }, + span: 265..270#0, tag_name: Text { - span: Span { - lo: BytePos( - 265, - ), - hi: BytePos( - 270, - ), - ctxt: #0, - }, + span: 265..270#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 265, - ), - hi: BytePos( - 270, - ), - ctxt: #0, - }, + span: 265..270#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 265, - ), - hi: BytePos( - 273, - ), - ctxt: #0, - }, + span: 265..273#0, value: "{String}", }, ), desc: Text { - span: Span { - lo: BytePos( - 265, - ), - hi: BytePos( - 274, - ), - ctxt: #0, - }, + span: 265..274#0, value: "photoName", }, }, diff --git a/crates/jsdoc/tests/fixtures/moduletag4.debug b/crates/jsdoc/tests/fixtures/moduletag4.debug index 448c013da259..4a2b38307330 100644 --- a/crates/jsdoc/tests/fixtures/moduletag4.debug +++ b/crates/jsdoc/tests/fixtures/moduletag4.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 2, - ), - ctxt: #0, - }, + span: 1..2#0, value: "M", }, }, @@ -85,155 +29,51 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 20, - ), - ctxt: #0, - }, + span: 20..20#0, description: Text { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 62, - ), - ctxt: #0, - }, + span: 20..62#0, value: "The differnet kind of mouse buttons.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 27, - ), - ctxt: #0, - }, + span: 20..27#0, tag_name: Text { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 27, - ), - ctxt: #0, - }, + span: 20..27#0, value: "summary", }, tag: Summary( SummaryTag { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 27, - ), - ctxt: #0, - }, + span: 20..27#0, text: Text { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 29, - ), - ctxt: #0, - }, + span: 20..29#0, value: "Blah blah", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 28, - ), - ctxt: #0, - }, + span: 20..28#0, tag_name: Text { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 28, - ), - ctxt: #0, - }, + span: 20..28#0, value: "readonly", }, tag: Readonly( ReadonlyTag { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 28, - ), - ctxt: #0, - }, + span: 20..28#0, }, ), }, TagItem { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 24, - ), - ctxt: #0, - }, + span: 20..24#0, tag_name: Text { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 24, - ), - ctxt: #0, - }, + span: 20..24#0, value: "enum", }, tag: Enum( EnumTag { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 24, - ), - ctxt: #0, - }, + span: 20..24#0, ty: Text { - span: Span { - lo: BytePos( - 20, - ), - hi: BytePos( - 29, - ), - ctxt: #0, - }, + span: 20..29#0, value: "{string} ", }, }, diff --git a/crates/jsdoc/tests/fixtures/moduletag5.debug b/crates/jsdoc/tests/fixtures/moduletag5.debug index e04afbfafa91..c01870ecfb52 100644 --- a/crates/jsdoc/tests/fixtures/moduletag5.debug +++ b/crates/jsdoc/tests/fixtures/moduletag5.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, value: "bookshelf", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, }, diff --git a/crates/jsdoc/tests/fixtures/moduletag6.debug b/crates/jsdoc/tests/fixtures/moduletag6.debug index b6ac7b4ea977..0be11e6d243c 100644 --- a/crates/jsdoc/tests/fixtures/moduletag6.debug +++ b/crates/jsdoc/tests/fixtures/moduletag6.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, value: "appname", }, }, @@ -85,71 +29,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 25, - ), - hi: BytePos( - 25, - ), - ctxt: #0, - }, + span: 25..25#0, description: Text { - span: Span { - lo: BytePos( - 25, - ), - hi: BytePos( - 56, - ), - ctxt: #0, - }, + span: 25..56#0, value: "The name of the application.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 25, - ), - hi: BytePos( - 29, - ), - ctxt: #0, - }, + span: 25..29#0, tag_name: Text { - span: Span { - lo: BytePos( - 25, - ), - hi: BytePos( - 29, - ), - ctxt: #0, - }, + span: 25..29#0, value: "type", }, tag: Type( TypeTag { - span: Span { - lo: BytePos( - 25, - ), - hi: BytePos( - 29, - ), - ctxt: #0, - }, + span: 25..29#0, name: Text { - span: Span { - lo: BytePos( - 25, - ), - hi: BytePos( - 33, - ), - ctxt: #0, - }, + span: 25..33#0, value: "{string}", }, }, diff --git a/crates/jsdoc/tests/fixtures/moduletag7.debug b/crates/jsdoc/tests/fixtures/moduletag7.debug index 9e0c62d52f14..7247d25df721 100644 --- a/crates/jsdoc/tests/fixtures/moduletag7.debug +++ b/crates/jsdoc/tests/fixtures/moduletag7.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "color", }, }, @@ -85,25 +29,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 50, - ), - hi: BytePos( - 50, - ), - ctxt: #0, - }, + span: 50..50#0, description: Text { - span: Span { - lo: BytePos( - 50, - ), - hi: BytePos( - 76, - ), - ctxt: #0, - }, + span: 50..76#0, value: "Blend two colors together.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/moduletag8.debug b/crates/jsdoc/tests/fixtures/moduletag8.debug index ee209ee16fe2..6a1e11e9e226 100644 --- a/crates/jsdoc/tests/fixtures/moduletag8.debug +++ b/crates/jsdoc/tests/fixtures/moduletag8.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "color", }, }, @@ -85,133 +29,45 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 29, - ), - ctxt: #0, - }, + span: 29..29#0, description: Text { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 52, - ), - ctxt: #0, - }, + span: 29..52#0, value: "The name of the module.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 90, - ), - hi: BytePos( - 90, - ), - ctxt: #0, - }, + span: 90..90#0, description: Text { - span: Span { - lo: BytePos( - 90, - ), - hi: BytePos( - 120, - ), - ctxt: #0, - }, + span: 90..120#0, value: "The most recent blended color.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 158, - ), - hi: BytePos( - 158, - ), - ctxt: #0, - }, + span: 158..158#0, description: Text { - span: Span { - lo: BytePos( - 158, - ), - hi: BytePos( - 184, - ), - ctxt: #0, - }, + span: 158..184#0, value: "Blend two colors together.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 322, - ), - hi: BytePos( - 322, - ), - ctxt: #0, - }, + span: 322..322#0, description: Text { - span: Span { - lo: BytePos( - 322, - ), - hi: BytePos( - 376, - ), - ctxt: #0, - }, + span: 322..376#0, value: "Get the red, green, and blue values of a color.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 322, - ), - hi: BytePos( - 330, - ), - ctxt: #0, - }, + span: 322..330#0, tag_name: Text { - span: Span { - lo: BytePos( - 322, - ), - hi: BytePos( - 330, - ), - ctxt: #0, - }, + span: 322..330#0, value: "function", }, tag: Function( FunctionTag { - span: Span { - lo: BytePos( - 322, - ), - hi: BytePos( - 330, - ), - ctxt: #0, - }, + span: 322..330#0, name: None, }, ), diff --git a/crates/jsdoc/tests/fixtures/moduletag9.debug b/crates/jsdoc/tests/fixtures/moduletag9.debug index 7cfc22576594..b9707b113046 100644 --- a/crates/jsdoc/tests/fixtures/moduletag9.debug +++ b/crates/jsdoc/tests/fixtures/moduletag9.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 4, - ), - ctxt: #0, - }, + span: 1..4#0, value: "foo", }, }, diff --git a/crates/jsdoc/tests/fixtures/namespacetag.debug b/crates/jsdoc/tests/fixtures/namespacetag.debug index 4260bd18c176..62a9190ef8df 100644 --- a/crates/jsdoc/tests/fixtures/namespacetag.debug +++ b/crates/jsdoc/tests/fixtures/namespacetag.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 0..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, value: "namespace", }, tag: Namespace( NamespaceTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, ty: None, name: None, }, @@ -63,72 +23,24 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 32, - ), - hi: BytePos( - 32, - ), - ctxt: #0, - }, + span: 32..32#0, description: Text { - span: Span { - lo: BytePos( - 32, - ), - hi: BytePos( - 32, - ), - ctxt: #0, - }, + span: 32..32#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 32, - ), - hi: BytePos( - 41, - ), - ctxt: #0, - }, + span: 32..41#0, tag_name: Text { - span: Span { - lo: BytePos( - 32, - ), - hi: BytePos( - 41, - ), - ctxt: #0, - }, + span: 32..41#0, value: "namespace", }, tag: Namespace( NamespaceTag { - span: Span { - lo: BytePos( - 32, - ), - hi: BytePos( - 41, - ), - ctxt: #0, - }, + span: 32..41#0, ty: Some( Text { - span: Span { - lo: BytePos( - 32, - ), - hi: BytePos( - 35, - ), - ctxt: #0, - }, + span: 32..35#0, value: "Foo", }, ), @@ -139,72 +51,24 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 54, - ), - hi: BytePos( - 58, - ), - ctxt: #0, - }, + span: 54..58#0, description: Text { - span: Span { - lo: BytePos( - 54, - ), - hi: BytePos( - 54, - ), - ctxt: #0, - }, + span: 54..54#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 54, - ), - hi: BytePos( - 63, - ), - ctxt: #0, - }, + span: 54..63#0, tag_name: Text { - span: Span { - lo: BytePos( - 54, - ), - hi: BytePos( - 63, - ), - ctxt: #0, - }, + span: 54..63#0, value: "namespace", }, tag: Namespace( NamespaceTag { - span: Span { - lo: BytePos( - 54, - ), - hi: BytePos( - 63, - ), - ctxt: #0, - }, + span: 54..63#0, ty: Some( Text { - span: Span { - lo: BytePos( - 54, - ), - hi: BytePos( - 64, - ), - ctxt: #0, - }, + span: 54..64#0, value: "{function}", }, ), @@ -215,61 +79,21 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 88, - ), - ctxt: #0, - }, + span: 0..88#0, description: Text { - span: Span { - lo: BytePos( - 88, - ), - hi: BytePos( - 88, - ), - ctxt: #0, - }, + span: 88..88#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 88, - ), - hi: BytePos( - 97, - ), - ctxt: #0, - }, + span: 88..97#0, tag_name: Text { - span: Span { - lo: BytePos( - 88, - ), - hi: BytePos( - 97, - ), - ctxt: #0, - }, + span: 88..97#0, value: "namespace", }, tag: Namespace( NamespaceTag { - span: Span { - lo: BytePos( - 88, - ), - hi: BytePos( - 97, - ), - ctxt: #0, - }, + span: 88..97#0, ty: None, name: None, }, @@ -278,25 +102,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 117, - ), - hi: BytePos( - 117, - ), - ctxt: #0, - }, + span: 117..117#0, description: Text { - span: Span { - lo: BytePos( - 117, - ), - hi: BytePos( - 143, - ), - ctxt: #0, - }, + span: 117..143#0, value: "Member of the namespace S.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/nametag.debug b/crates/jsdoc/tests/fixtures/nametag.debug index 6dfa6421cec8..07622c9eff15 100644 --- a/crates/jsdoc/tests/fixtures/nametag.debug +++ b/crates/jsdoc/tests/fixtures/nametag.debug @@ -1,81 +1,25 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 11, - ), - ctxt: #0, - }, + span: 1..11#0, value: "A view.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, value: "name", }, tag: Name( NameTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, name_path: NamePath { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 2, - ), - ctxt: #0, - }, + span: 1..2#0, components: [ Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, value: "View", }, ], @@ -86,82 +30,26 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 35, - ), - hi: BytePos( - 35, - ), - ctxt: #0, - }, + span: 35..35#0, description: Text { - span: Span { - lo: BytePos( - 35, - ), - hi: BytePos( - 51, - ), - ctxt: #0, - }, + span: 35..51#0, value: "A controller.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 35, - ), - hi: BytePos( - 39, - ), - ctxt: #0, - }, + span: 35..39#0, tag_name: Text { - span: Span { - lo: BytePos( - 35, - ), - hi: BytePos( - 39, - ), - ctxt: #0, - }, + span: 35..39#0, value: "name", }, tag: Name( NameTag { - span: Span { - lo: BytePos( - 35, - ), - hi: BytePos( - 39, - ), - ctxt: #0, - }, + span: 35..39#0, name_path: NamePath { - span: Span { - lo: BytePos( - 35, - ), - hi: BytePos( - 46, - ), - ctxt: #0, - }, + span: 35..46#0, components: [ Text { - span: Span { - lo: BytePos( - 35, - ), - hi: BytePos( - 45, - ), - ctxt: #0, - }, + span: 35..45#0, value: "Controller", }, ], @@ -170,38 +58,14 @@ ), }, TagItem { - span: Span { - lo: BytePos( - 35, - ), - hi: BytePos( - 40, - ), - ctxt: #0, - }, + span: 35..40#0, tag_name: Text { - span: Span { - lo: BytePos( - 35, - ), - hi: BytePos( - 40, - ), - ctxt: #0, - }, + span: 35..40#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 35, - ), - hi: BytePos( - 40, - ), - ctxt: #0, - }, + span: 35..40#0, ty: None, name: None, }, diff --git a/crates/jsdoc/tests/fixtures/noaliastag.debug b/crates/jsdoc/tests/fixtures/noaliastag.debug index f632d5e8387a..c8e5f4bcab3c 100644 --- a/crates/jsdoc/tests/fixtures/noaliastag.debug +++ b/crates/jsdoc/tests/fixtures/noaliastag.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, value: "noalias", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, extras: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, diff --git a/crates/jsdoc/tests/fixtures/nocollapsetag.debug b/crates/jsdoc/tests/fixtures/nocollapsetag.debug index 527882f9d9fa..c2d30e49b065 100644 --- a/crates/jsdoc/tests/fixtures/nocollapsetag.debug +++ b/crates/jsdoc/tests/fixtures/nocollapsetag.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 1..16#0, value: "A namespace.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "const", }, tag: Const( ConstTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, ty: None, name: None, }, @@ -63,71 +23,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 50, - ), - hi: BytePos( - 50, - ), - ctxt: #0, - }, + span: 50..50#0, description: Text { - span: Span { - lo: BytePos( - 50, - ), - hi: BytePos( - 50, - ), - ctxt: #0, - }, + span: 50..50#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 50, - ), - hi: BytePos( - 60, - ), - ctxt: #0, - }, + span: 50..60#0, tag_name: Text { - span: Span { - lo: BytePos( - 50, - ), - hi: BytePos( - 60, - ), - ctxt: #0, - }, + span: 50..60#0, value: "nocollapse", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 50, - ), - hi: BytePos( - 60, - ), - ctxt: #0, - }, + span: 50..60#0, extras: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, diff --git a/crates/jsdoc/tests/fixtures/nocompiletag.debug b/crates/jsdoc/tests/fixtures/nocompiletag.debug index 84c98db471f1..03b01e7eae1b 100644 --- a/crates/jsdoc/tests/fixtures/nocompiletag.debug +++ b/crates/jsdoc/tests/fixtures/nocompiletag.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, value: "nocompile", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, extras: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, diff --git a/crates/jsdoc/tests/fixtures/nosideeffectstag.debug b/crates/jsdoc/tests/fixtures/nosideeffectstag.debug index 5d81aaa04a80..7feb19188c5c 100644 --- a/crates/jsdoc/tests/fixtures/nosideeffectstag.debug +++ b/crates/jsdoc/tests/fixtures/nosideeffectstag.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 33, - ), - ctxt: #0, - }, + span: 1..33#0, value: "A function that does nothing.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 14, - ), - ctxt: #0, - }, + span: 1..14#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 14, - ), - ctxt: #0, - }, + span: 1..14#0, value: "nosideeffects", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 14, - ), - ctxt: #0, - }, + span: 1..14#0, extras: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, diff --git a/crates/jsdoc/tests/fixtures/numericpropertytag.debug b/crates/jsdoc/tests/fixtures/numericpropertytag.debug index aaf5da354264..7f591a7ac445 100644 --- a/crates/jsdoc/tests/fixtures/numericpropertytag.debug +++ b/crates/jsdoc/tests/fixtures/numericpropertytag.debug @@ -1,72 +1,24 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, value: "namespace", }, tag: Namespace( NamespaceTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, ty: None, name: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 37, - ), - ctxt: #0, - }, + span: 1..37#0, value: "@property {String} 1 The number one.", }, ), @@ -74,174 +26,62 @@ ), }, TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "property", }, tag: Property( PropertyTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, name_path: NamePath { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 62, - ), - ctxt: #0, - }, + span: 1..62#0, components: [ Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, ], }, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "{String}", }, ), desc: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 18, - ), - ctxt: #0, - }, + span: 1..18#0, value: "2 The number two.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "property", }, tag: Property( PropertyTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, name_path: NamePath { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 22, - ), - ctxt: #0, - }, + span: 1..22#0, components: [ Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, ], }, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "{String}", }, ), desc: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 20, - ), - ctxt: #0, - }, + span: 1..20#0, value: "3 The number three.", }, }, diff --git a/crates/jsdoc/tests/fixtures/objectlit.debug b/crates/jsdoc/tests/fixtures/objectlit.debug index d90d0399e674..29b2b6629cce 100644 --- a/crates/jsdoc/tests/fixtures/objectlit.debug +++ b/crates/jsdoc/tests/fixtures/objectlit.debug @@ -1,72 +1,24 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, value: "document me", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 38, - ), - hi: BytePos( - 38, - ), - ctxt: #0, - }, + span: 38..38#0, description: Text { - span: Span { - lo: BytePos( - 38, - ), - hi: BytePos( - 49, - ), - ctxt: #0, - }, + span: 38..49#0, value: "document me", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 83, - ), - hi: BytePos( - 83, - ), - ctxt: #0, - }, + span: 83..83#0, description: Text { - span: Span { - lo: BytePos( - 83, - ), - hi: BytePos( - 94, - ), - ctxt: #0, - }, + span: 83..94#0, value: "document me", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/objectlit2.debug b/crates/jsdoc/tests/fixtures/objectlit2.debug index 94a9ec7e9e7c..36e581298829 100644 --- a/crates/jsdoc/tests/fixtures/objectlit2.debug +++ b/crates/jsdoc/tests/fixtures/objectlit2.debug @@ -1,48 +1,16 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, value: "document me", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 57, - ), - hi: BytePos( - 57, - ), - ctxt: #0, - }, + span: 57..57#0, description: Text { - span: Span { - lo: BytePos( - 57, - ), - hi: BytePos( - 68, - ), - ctxt: #0, - }, + span: 57..68#0, value: "document me", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/objectlit3.debug b/crates/jsdoc/tests/fixtures/objectlit3.debug index 4cf67cf66fe4..cd632a337211 100644 --- a/crates/jsdoc/tests/fixtures/objectlit3.debug +++ b/crates/jsdoc/tests/fixtures/objectlit3.debug @@ -1,96 +1,32 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 38, - ), - ctxt: #0, - }, + span: 1..38#0, value: "Tokens that can appear in the stream.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 62, - ), - hi: BytePos( - 62, - ), - ctxt: #0, - }, + span: 62..62#0, description: Text { - span: Span { - lo: BytePos( - 62, - ), - hi: BytePos( - 79, - ), - ctxt: #0, - }, + span: 62..79#0, value: "Open parenthesis.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 97, - ), - hi: BytePos( - 97, - ), - ctxt: #0, - }, + span: 97..97#0, description: Text { - span: Span { - lo: BytePos( - 97, - ), - hi: BytePos( - 136, - ), - ctxt: #0, - }, + span: 97..136#0, value: "Executed before the token is processed.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 176, - ), - hi: BytePos( - 176, - ), - ctxt: #0, - }, + span: 176..176#0, description: Text { - span: Span { - lo: BytePos( - 176, - ), - hi: BytePos( - 214, - ), - ctxt: #0, - }, + span: 176..214#0, value: "Executed after the token is processed.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/overridetag.debug b/crates/jsdoc/tests/fixtures/overridetag.debug index 1bcd078ce407..8208cb90eb93 100644 --- a/crates/jsdoc/tests/fixtures/overridetag.debug +++ b/crates/jsdoc/tests/fixtures/overridetag.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 17, - ), - ctxt: #0, - }, + span: 1..17#0, value: "Parent class.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, ty: None, name: None, }, @@ -63,157 +23,53 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 62, - ), - hi: BytePos( - 62, - ), - ctxt: #0, - }, + span: 62..62#0, description: Text { - span: Span { - lo: BytePos( - 62, - ), - hi: BytePos( - 85, - ), - ctxt: #0, - }, + span: 62..85#0, value: "Open the connection.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 62, - ), - hi: BytePos( - 69, - ), - ctxt: #0, - }, + span: 62..69#0, tag_name: Text { - span: Span { - lo: BytePos( - 62, - ), - hi: BytePos( - 69, - ), - ctxt: #0, - }, + span: 62..69#0, value: "virtual", }, tag: Abstract( AbstractTag { - span: Span { - lo: BytePos( - 62, - ), - hi: BytePos( - 69, - ), - ctxt: #0, - }, + span: 62..69#0, }, ), }, ], }, JsDoc { - span: Span { - lo: BytePos( - 150, - ), - hi: BytePos( - 150, - ), - ctxt: #0, - }, + span: 150..150#0, description: Text { - span: Span { - lo: BytePos( - 150, - ), - hi: BytePos( - 171, - ), - ctxt: #0, - }, + span: 150..171#0, value: "Close the connection.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 228, - ), - ctxt: #0, - }, + span: 228..228#0, description: Text { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 289, - ), - ctxt: #0, - }, + span: 228..289#0, value: "Read the specified number of bytes from the connection.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 236, - ), - ctxt: #0, - }, + span: 228..236#0, tag_name: Text { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 236, - ), - ctxt: #0, - }, + span: 228..236#0, value: "function", }, tag: Function( FunctionTag { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 236, - ), - ctxt: #0, - }, + span: 228..236#0, name: Some( Text { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 243, - ), - ctxt: #0, - }, + span: 228..243#0, value: "Connection#read", }, ), @@ -221,125 +77,45 @@ ), }, TagItem { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 233, - ), - ctxt: #0, - }, + span: 228..233#0, tag_name: Text { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 233, - ), - ctxt: #0, - }, + span: 228..233#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 233, - ), - ctxt: #0, - }, + span: 228..233#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 236, - ), - ctxt: #0, - }, + span: 228..236#0, value: "{number}", }, ), desc: Text { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 264, - ), - ctxt: #0, - }, + span: 228..264#0, value: "bytes - The number of bytes to read.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 234, - ), - ctxt: #0, - }, + span: 228..234#0, tag_name: Text { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 234, - ), - ctxt: #0, - }, + span: 228..234#0, value: "return", }, tag: Return( ReturnTag { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 234, - ), - ctxt: #0, - }, + span: 228..234#0, ty: Some( Text { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 236, - ), - ctxt: #0, - }, + span: 228..236#0, value: "{Buffer}", }, ), description: Text { - span: Span { - lo: BytePos( - 228, - ), - hi: BytePos( - 253, - ), - ctxt: #0, - }, + span: 228..253#0, value: "The bytes that were read.", }, }, @@ -348,72 +124,24 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 478, - ), - hi: BytePos( - 478, - ), - ctxt: #0, - }, + span: 478..478#0, description: Text { - span: Span { - lo: BytePos( - 478, - ), - hi: BytePos( - 493, - ), - ctxt: #0, - }, + span: 478..493#0, value: "Child class.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 478, - ), - hi: BytePos( - 483, - ), - ctxt: #0, - }, + span: 478..483#0, tag_name: Text { - span: Span { - lo: BytePos( - 478, - ), - hi: BytePos( - 483, - ), - ctxt: #0, - }, + span: 478..483#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 478, - ), - hi: BytePos( - 483, - ), - ctxt: #0, - }, + span: 478..483#0, ty: Some( Text { - span: Span { - lo: BytePos( - 478, - ), - hi: BytePos( - 499, - ), - ctxt: #0, - }, + span: 478..499#0, value: "* @extends Connection", }, ), @@ -424,246 +152,86 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 557, - ), - hi: BytePos( - 557, - ), - ctxt: #0, - }, + span: 557..557#0, description: Text { - span: Span { - lo: BytePos( - 557, - ), - hi: BytePos( - 557, - ), - ctxt: #0, - }, + span: 557..557#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 557, - ), - hi: BytePos( - 565, - ), - ctxt: #0, - }, + span: 557..565#0, tag_name: Text { - span: Span { - lo: BytePos( - 557, - ), - hi: BytePos( - 565, - ), - ctxt: #0, - }, + span: 557..565#0, value: "override", }, tag: Override( OverrideTag { - span: Span { - lo: BytePos( - 557, - ), - hi: BytePos( - 565, - ), - ctxt: #0, - }, + span: 557..565#0, }, ), }, ], }, JsDoc { - span: Span { - lo: BytePos( - 614, - ), - hi: BytePos( - 614, - ), - ctxt: #0, - }, + span: 614..614#0, description: Text { - span: Span { - lo: BytePos( - 614, - ), - hi: BytePos( - 634, - ), - ctxt: #0, - }, + span: 614..634#0, value: "Close the socket.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 614, - ), - hi: BytePos( - 619, - ), - ctxt: #0, - }, + span: 614..619#0, tag_name: Text { - span: Span { - lo: BytePos( - 614, - ), - hi: BytePos( - 619, - ), - ctxt: #0, - }, + span: 614..619#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 614, - ), - hi: BytePos( - 619, - ), - ctxt: #0, - }, + span: 614..619#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 614, - ), - hi: BytePos( - 622, - ), - ctxt: #0, - }, + span: 614..622#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 614, - ), - hi: BytePos( - 676, - ), - ctxt: #0, - }, + span: 614..676#0, value: "message - A message explaining why the socket is being closed.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 614, - ), - hi: BytePos( - 622, - ), - ctxt: #0, - }, + span: 614..622#0, tag_name: Text { - span: Span { - lo: BytePos( - 614, - ), - hi: BytePos( - 622, - ), - ctxt: #0, - }, + span: 614..622#0, value: "override", }, tag: Override( OverrideTag { - span: Span { - lo: BytePos( - 614, - ), - hi: BytePos( - 622, - ), - ctxt: #0, - }, + span: 614..622#0, }, ), }, ], }, JsDoc { - span: Span { - lo: BytePos( - 779, - ), - hi: BytePos( - 779, - ), - ctxt: #0, - }, + span: 779..779#0, description: Text { - span: Span { - lo: BytePos( - 779, - ), - hi: BytePos( - 779, - ), - ctxt: #0, - }, + span: 779..779#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 779, - ), - hi: BytePos( - 787, - ), - ctxt: #0, - }, + span: 779..787#0, tag_name: Text { - span: Span { - lo: BytePos( - 779, - ), - hi: BytePos( - 787, - ), - ctxt: #0, - }, + span: 779..787#0, value: "override", }, tag: Override( OverrideTag { - span: Span { - lo: BytePos( - 779, - ), - hi: BytePos( - 787, - ), - ctxt: #0, - }, + span: 779..787#0, }, ), }, diff --git a/crates/jsdoc/tests/fixtures/overridetag2.debug b/crates/jsdoc/tests/fixtures/overridetag2.debug index 77cb773a92ab..f9098f68758f 100644 --- a/crates/jsdoc/tests/fixtures/overridetag2.debug +++ b/crates/jsdoc/tests/fixtures/overridetag2.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 21, - ), - ctxt: #0, - }, + span: 1..21#0, value: "Parent interface.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, value: "interface", }, tag: Interface( InterfaceTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, name: None, }, ), @@ -62,120 +22,40 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 70, - ), - hi: BytePos( - 70, - ), - ctxt: #0, - }, + span: 70..70#0, description: Text { - span: Span { - lo: BytePos( - 70, - ), - hi: BytePos( - 90, - ), - ctxt: #0, - }, + span: 70..90#0, value: "Open the connection.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 146, - ), - hi: BytePos( - 146, - ), - ctxt: #0, - }, + span: 146..146#0, description: Text { - span: Span { - lo: BytePos( - 146, - ), - hi: BytePos( - 167, - ), - ctxt: #0, - }, + span: 146..167#0, value: "Close the connection.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 224, - ), - hi: BytePos( - 224, - ), - ctxt: #0, - }, + span: 224..224#0, description: Text { - span: Span { - lo: BytePos( - 224, - ), - hi: BytePos( - 285, - ), - ctxt: #0, - }, + span: 224..285#0, value: "Read the specified number of bytes from the connection.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 224, - ), - hi: BytePos( - 232, - ), - ctxt: #0, - }, + span: 224..232#0, tag_name: Text { - span: Span { - lo: BytePos( - 224, - ), - hi: BytePos( - 232, - ), - ctxt: #0, - }, + span: 224..232#0, value: "function", }, tag: Function( FunctionTag { - span: Span { - lo: BytePos( - 224, - ), - hi: BytePos( - 232, - ), - ctxt: #0, - }, + span: 224..232#0, name: Some( Text { - span: Span { - lo: BytePos( - 224, - ), - hi: BytePos( - 239, - ), - ctxt: #0, - }, + span: 224..239#0, value: "Connection#read", }, ), @@ -183,125 +63,45 @@ ), }, TagItem { - span: Span { - lo: BytePos( - 224, - ), - hi: BytePos( - 229, - ), - ctxt: #0, - }, + span: 224..229#0, tag_name: Text { - span: Span { - lo: BytePos( - 224, - ), - hi: BytePos( - 229, - ), - ctxt: #0, - }, + span: 224..229#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 224, - ), - hi: BytePos( - 229, - ), - ctxt: #0, - }, + span: 224..229#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 224, - ), - hi: BytePos( - 232, - ), - ctxt: #0, - }, + span: 224..232#0, value: "{number}", }, ), desc: Text { - span: Span { - lo: BytePos( - 224, - ), - hi: BytePos( - 260, - ), - ctxt: #0, - }, + span: 224..260#0, value: "bytes - The number of bytes to read.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 224, - ), - hi: BytePos( - 230, - ), - ctxt: #0, - }, + span: 224..230#0, tag_name: Text { - span: Span { - lo: BytePos( - 224, - ), - hi: BytePos( - 230, - ), - ctxt: #0, - }, + span: 224..230#0, value: "return", }, tag: Return( ReturnTag { - span: Span { - lo: BytePos( - 224, - ), - hi: BytePos( - 230, - ), - ctxt: #0, - }, + span: 224..230#0, ty: Some( Text { - span: Span { - lo: BytePos( - 224, - ), - hi: BytePos( - 232, - ), - ctxt: #0, - }, + span: 224..232#0, value: "{Buffer}", }, ), description: Text { - span: Span { - lo: BytePos( - 224, - ), - hi: BytePos( - 249, - ), - ctxt: #0, - }, + span: 224..249#0, value: "The bytes that were read.", }, }, @@ -310,72 +110,24 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 474, - ), - hi: BytePos( - 474, - ), - ctxt: #0, - }, + span: 474..474#0, description: Text { - span: Span { - lo: BytePos( - 474, - ), - hi: BytePos( - 489, - ), - ctxt: #0, - }, + span: 474..489#0, value: "Child class.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 474, - ), - hi: BytePos( - 479, - ), - ctxt: #0, - }, + span: 474..479#0, tag_name: Text { - span: Span { - lo: BytePos( - 474, - ), - hi: BytePos( - 479, - ), - ctxt: #0, - }, + span: 474..479#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 474, - ), - hi: BytePos( - 479, - ), - ctxt: #0, - }, + span: 474..479#0, ty: Some( Text { - span: Span { - lo: BytePos( - 474, - ), - hi: BytePos( - 498, - ), - ctxt: #0, - }, + span: 474..498#0, value: "* @implements Connection", }, ), @@ -386,246 +138,86 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 556, - ), - hi: BytePos( - 556, - ), - ctxt: #0, - }, + span: 556..556#0, description: Text { - span: Span { - lo: BytePos( - 556, - ), - hi: BytePos( - 556, - ), - ctxt: #0, - }, + span: 556..556#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 556, - ), - hi: BytePos( - 564, - ), - ctxt: #0, - }, + span: 556..564#0, tag_name: Text { - span: Span { - lo: BytePos( - 556, - ), - hi: BytePos( - 564, - ), - ctxt: #0, - }, + span: 556..564#0, value: "override", }, tag: Override( OverrideTag { - span: Span { - lo: BytePos( - 556, - ), - hi: BytePos( - 564, - ), - ctxt: #0, - }, + span: 556..564#0, }, ), }, ], }, JsDoc { - span: Span { - lo: BytePos( - 613, - ), - hi: BytePos( - 613, - ), - ctxt: #0, - }, + span: 613..613#0, description: Text { - span: Span { - lo: BytePos( - 613, - ), - hi: BytePos( - 633, - ), - ctxt: #0, - }, + span: 613..633#0, value: "Close the socket.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 613, - ), - hi: BytePos( - 618, - ), - ctxt: #0, - }, + span: 613..618#0, tag_name: Text { - span: Span { - lo: BytePos( - 613, - ), - hi: BytePos( - 618, - ), - ctxt: #0, - }, + span: 613..618#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 613, - ), - hi: BytePos( - 618, - ), - ctxt: #0, - }, + span: 613..618#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 613, - ), - hi: BytePos( - 621, - ), - ctxt: #0, - }, + span: 613..621#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 613, - ), - hi: BytePos( - 675, - ), - ctxt: #0, - }, + span: 613..675#0, value: "message - A message explaining why the socket is being closed.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 613, - ), - hi: BytePos( - 621, - ), - ctxt: #0, - }, + span: 613..621#0, tag_name: Text { - span: Span { - lo: BytePos( - 613, - ), - hi: BytePos( - 621, - ), - ctxt: #0, - }, + span: 613..621#0, value: "override", }, tag: Override( OverrideTag { - span: Span { - lo: BytePos( - 613, - ), - hi: BytePos( - 621, - ), - ctxt: #0, - }, + span: 613..621#0, }, ), }, ], }, JsDoc { - span: Span { - lo: BytePos( - 778, - ), - hi: BytePos( - 778, - ), - ctxt: #0, - }, + span: 778..778#0, description: Text { - span: Span { - lo: BytePos( - 778, - ), - hi: BytePos( - 778, - ), - ctxt: #0, - }, + span: 778..778#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 778, - ), - hi: BytePos( - 786, - ), - ctxt: #0, - }, + span: 778..786#0, tag_name: Text { - span: Span { - lo: BytePos( - 778, - ), - hi: BytePos( - 786, - ), - ctxt: #0, - }, + span: 778..786#0, value: "override", }, tag: Override( OverrideTag { - span: Span { - lo: BytePos( - 778, - ), - hi: BytePos( - 786, - ), - ctxt: #0, - }, + span: 778..786#0, }, ), }, diff --git a/crates/jsdoc/tests/fixtures/packagetag.debug b/crates/jsdoc/tests/fixtures/packagetag.debug index 979316ddcc56..459d54ac84af 100644 --- a/crates/jsdoc/tests/fixtures/packagetag.debug +++ b/crates/jsdoc/tests/fixtures/packagetag.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 0..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 40, - ), - ctxt: #0, - }, + span: 1..40#0, value: "This function is package-private.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, value: "package", }, tag: Package( PackageTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, ty: None, }, ), diff --git a/crates/jsdoc/tests/fixtures/packagetag2.debug b/crates/jsdoc/tests/fixtures/packagetag2.debug index 3293c276a513..380289397fe1 100644 --- a/crates/jsdoc/tests/fixtures/packagetag2.debug +++ b/crates/jsdoc/tests/fixtures/packagetag2.debug @@ -1,71 +1,23 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, value: "package", }, tag: Package( PackageTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 26, - ), - ctxt: #0, - }, + span: 1..26#0, value: "{Object.}", }, ), diff --git a/crates/jsdoc/tests/fixtures/paramtag.debug b/crates/jsdoc/tests/fixtures/paramtag.debug index d0c041506579..deeaf965d5e0 100644 --- a/crates/jsdoc/tests/fixtures/paramtag.debug +++ b/crates/jsdoc/tests/fixtures/paramtag.debug @@ -1,85 +1,29 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 26, - ), - ctxt: #0, - }, + span: 1..26#0, value: "{ String | Array}", }, ), desc: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 51, - ), - ctxt: #0, - }, + span: 1..51#0, value: "targetName The name (or names) of what to find.", }, }, @@ -88,86 +32,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 127, - ), - hi: BytePos( - 127, - ), - ctxt: #0, - }, + span: 127..127#0, description: Text { - span: Span { - lo: BytePos( - 127, - ), - hi: BytePos( - 127, - ), - ctxt: #0, - }, + span: 127..127#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 127, - ), - hi: BytePos( - 132, - ), - ctxt: #0, - }, + span: 127..132#0, tag_name: Text { - span: Span { - lo: BytePos( - 127, - ), - hi: BytePos( - 132, - ), - ctxt: #0, - }, + span: 127..132#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 127, - ), - hi: BytePos( - 132, - ), - ctxt: #0, - }, + span: 127..132#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 127, - ), - hi: BytePos( - 137, - ), - ctxt: #0, - }, + span: 127..137#0, value: "{function}", }, ), desc: Text { - span: Span { - lo: BytePos( - 127, - ), - hi: BytePos( - 135, - ), - ctxt: #0, - }, + span: 127..135#0, value: "callback", }, }, @@ -176,86 +64,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 193, - ), - hi: BytePos( - 193, - ), - ctxt: #0, - }, + span: 193..193#0, description: Text { - span: Span { - lo: BytePos( - 193, - ), - hi: BytePos( - 193, - ), - ctxt: #0, - }, + span: 193..193#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 193, - ), - hi: BytePos( - 198, - ), - ctxt: #0, - }, + span: 193..198#0, tag_name: Text { - span: Span { - lo: BytePos( - 193, - ), - hi: BytePos( - 198, - ), - ctxt: #0, - }, + span: 193..198#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 193, - ), - hi: BytePos( - 198, - ), - ctxt: #0, - }, + span: 193..198#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 193, - ), - hi: BytePos( - 203, - ), - ctxt: #0, - }, + span: 193..203#0, value: "{function}", }, ), desc: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -264,99 +96,35 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 252, - ), - hi: BytePos( - 252, - ), - ctxt: #0, - }, + span: 252..252#0, description: Text { - span: Span { - lo: BytePos( - 252, - ), - hi: BytePos( - 252, - ), - ctxt: #0, - }, + span: 252..252#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 252, - ), - hi: BytePos( - 257, - ), - ctxt: #0, - }, + span: 252..257#0, tag_name: Text { - span: Span { - lo: BytePos( - 252, - ), - hi: BytePos( - 257, - ), - ctxt: #0, - }, + span: 252..257#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 252, - ), - hi: BytePos( - 257, - ), - ctxt: #0, - }, + span: 252..257#0, name: Some( Text { - span: Span { - lo: BytePos( - 252, - ), - hi: BytePos( - 255, - ), - ctxt: #0, - }, + span: 252..255#0, value: "The", }, ), ty: Some( Text { - span: Span { - lo: BytePos( - 252, - ), - hi: BytePos( - 254, - ), - ctxt: #0, - }, + span: 252..254#0, value: "id", }, ), desc: Text { - span: Span { - lo: BytePos( - 252, - ), - hi: BytePos( - 270, - ), - ctxt: #0, - }, + span: 252..270#0, value: "id of the element.", }, }, @@ -365,73 +133,25 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 324, - ), - hi: BytePos( - 324, - ), - ctxt: #0, - }, + span: 324..324#0, description: Text { - span: Span { - lo: BytePos( - 324, - ), - hi: BytePos( - 324, - ), - ctxt: #0, - }, + span: 324..324#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 324, - ), - hi: BytePos( - 329, - ), - ctxt: #0, - }, + span: 324..329#0, tag_name: Text { - span: Span { - lo: BytePos( - 324, - ), - hi: BytePos( - 329, - ), - ctxt: #0, - }, + span: 324..329#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 324, - ), - hi: BytePos( - 329, - ), - ctxt: #0, - }, + span: 324..329#0, name: None, ty: None, desc: Text { - span: Span { - lo: BytePos( - 324, - ), - hi: BytePos( - 347, - ), - ctxt: #0, - }, + span: 324..347#0, value: ". Two or more elements.", }, }, @@ -440,86 +160,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 391, - ), - hi: BytePos( - 391, - ), - ctxt: #0, - }, + span: 391..391#0, description: Text { - span: Span { - lo: BytePos( - 391, - ), - hi: BytePos( - 391, - ), - ctxt: #0, - }, + span: 391..391#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 391, - ), - hi: BytePos( - 396, - ), - ctxt: #0, - }, + span: 391..396#0, tag_name: Text { - span: Span { - lo: BytePos( - 391, - ), - hi: BytePos( - 396, - ), - ctxt: #0, - }, + span: 391..396#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 391, - ), - hi: BytePos( - 396, - ), - ctxt: #0, - }, + span: 391..396#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 391, - ), - hi: BytePos( - 400, - ), - ctxt: #0, - }, + span: 391..400#0, value: "delimiter", }, ), desc: Text { - span: Span { - lo: BytePos( - 391, - ), - hi: BytePos( - 408, - ), - ctxt: #0, - }, + span: 391..408#0, value: "What to split on.", }, }, @@ -528,73 +192,25 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 469, - ), - hi: BytePos( - 469, - ), - ctxt: #0, - }, + span: 469..469#0, description: Text { - span: Span { - lo: BytePos( - 469, - ), - hi: BytePos( - 469, - ), - ctxt: #0, - }, + span: 469..469#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 469, - ), - hi: BytePos( - 474, - ), - ctxt: #0, - }, + span: 469..474#0, tag_name: Text { - span: Span { - lo: BytePos( - 469, - ), - hi: BytePos( - 474, - ), - ctxt: #0, - }, + span: 469..474#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 469, - ), - hi: BytePos( - 474, - ), - ctxt: #0, - }, + span: 469..474#0, name: None, ty: None, desc: Text { - span: Span { - lo: BytePos( - 469, - ), - hi: BytePos( - 500, - ), - ctxt: #0, - }, + span: 469..500#0, value: "If true make the commit atomic.", }, }, @@ -603,86 +219,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 549, - ), - hi: BytePos( - 549, - ), - ctxt: #0, - }, + span: 549..549#0, description: Text { - span: Span { - lo: BytePos( - 549, - ), - hi: BytePos( - 549, - ), - ctxt: #0, - }, + span: 549..549#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 549, - ), - hi: BytePos( - 554, - ), - ctxt: #0, - }, + span: 549..554#0, tag_name: Text { - span: Span { - lo: BytePos( - 549, - ), - hi: BytePos( - 554, - ), - ctxt: #0, - }, + span: 549..554#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 549, - ), - hi: BytePos( - 554, - ), - ctxt: #0, - }, + span: 549..554#0, name: Some( Text { - span: Span { - lo: BytePos( - 549, - ), - hi: BytePos( - 554, - ), - ctxt: #0, - }, + span: 549..554#0, value: "async", }, ), ty: None, desc: Text { - span: Span { - lo: BytePos( - 549, - ), - hi: BytePos( - 583, - ), - ctxt: #0, - }, + span: 549..583#0, value: "true] - whether to be asynchronous", }, }, @@ -691,61 +251,21 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 638, - ), - hi: BytePos( - 638, - ), - ctxt: #0, - }, + span: 638..638#0, description: Text { - span: Span { - lo: BytePos( - 638, - ), - hi: BytePos( - 638, - ), - ctxt: #0, - }, + span: 638..638#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 638, - ), - hi: BytePos( - 643, - ), - ctxt: #0, - }, + span: 638..643#0, tag_name: Text { - span: Span { - lo: BytePos( - 638, - ), - hi: BytePos( - 643, - ), - ctxt: #0, - }, + span: 638..643#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 638, - ), - hi: BytePos( - 643, - ), - ctxt: #0, - }, + span: 638..643#0, ty: None, name: None, }, @@ -754,149 +274,53 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 675, - ), - hi: BytePos( - 675, - ), - ctxt: #0, - }, + span: 675..675#0, description: Text { - span: Span { - lo: BytePos( - 675, - ), - hi: BytePos( - 675, - ), - ctxt: #0, - }, + span: 675..675#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 675, - ), - hi: BytePos( - 680, - ), - ctxt: #0, - }, + span: 675..680#0, tag_name: Text { - span: Span { - lo: BytePos( - 675, - ), - hi: BytePos( - 680, - ), - ctxt: #0, - }, + span: 675..680#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 675, - ), - hi: BytePos( - 680, - ), - ctxt: #0, - }, + span: 675..680#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 675, - ), - hi: BytePos( - 683, - ), - ctxt: #0, - }, + span: 675..683#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 675, - ), - hi: BytePos( - 686, - ), - ctxt: #0, - }, + span: 675..686#0, value: "- Hostname.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 675, - ), - hi: BytePos( - 680, - ), - ctxt: #0, - }, + span: 675..680#0, tag_name: Text { - span: Span { - lo: BytePos( - 675, - ), - hi: BytePos( - 680, - ), - ctxt: #0, - }, + span: 675..680#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 675, - ), - hi: BytePos( - 680, - ), - ctxt: #0, - }, + span: 675..680#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 675, - ), - hi: BytePos( - 683, - ), - ctxt: #0, - }, + span: 675..683#0, value: "{number}", }, ), desc: Text { - span: Span { - lo: BytePos( - 675, - ), - hi: BytePos( - 689, - ), - ctxt: #0, - }, + span: 675..689#0, value: "- Port number.", }, }, diff --git a/crates/jsdoc/tests/fixtures/paramtag2.debug b/crates/jsdoc/tests/fixtures/paramtag2.debug index 8578c9f39a3e..ebb1aad2d357 100644 --- a/crates/jsdoc/tests/fixtures/paramtag2.debug +++ b/crates/jsdoc/tests/fixtures/paramtag2.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "mysocket", }, }, @@ -85,149 +29,53 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 26, - ), - ctxt: #0, - }, + span: 26..26#0, description: Text { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 26, - ), - ctxt: #0, - }, + span: 26..26#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 31, - ), - ctxt: #0, - }, + span: 26..31#0, tag_name: Text { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 31, - ), - ctxt: #0, - }, + span: 26..31#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 31, - ), - ctxt: #0, - }, + span: 26..31#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 34, - ), - ctxt: #0, - }, + span: 26..34#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 37, - ), - ctxt: #0, - }, + span: 26..37#0, value: "- Hostname.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 31, - ), - ctxt: #0, - }, + span: 26..31#0, tag_name: Text { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 31, - ), - ctxt: #0, - }, + span: 26..31#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 31, - ), - ctxt: #0, - }, + span: 26..31#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 34, - ), - ctxt: #0, - }, + span: 26..34#0, value: "{number}", }, ), desc: Text { - span: Span { - lo: BytePos( - 26, - ), - hi: BytePos( - 40, - ), - ctxt: #0, - }, + span: 26..40#0, value: "- Port number.", }, }, diff --git a/crates/jsdoc/tests/fixtures/paramtaginvalidtype.debug b/crates/jsdoc/tests/fixtures/paramtaginvalidtype.debug index 6a5344a4b42b..5b23d61e9d59 100644 --- a/crates/jsdoc/tests/fixtures/paramtaginvalidtype.debug +++ b/crates/jsdoc/tests/fixtures/paramtaginvalidtype.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, ty: None, name: None, }, @@ -63,86 +23,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 53, - ), - hi: BytePos( - 53, - ), - ctxt: #0, - }, + span: 53..53#0, description: Text { - span: Span { - lo: BytePos( - 53, - ), - hi: BytePos( - 53, - ), - ctxt: #0, - }, + span: 53..53#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 53, - ), - hi: BytePos( - 58, - ), - ctxt: #0, - }, + span: 53..58#0, tag_name: Text { - span: Span { - lo: BytePos( - 53, - ), - hi: BytePos( - 58, - ), - ctxt: #0, - }, + span: 53..58#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 53, - ), - hi: BytePos( - 58, - ), - ctxt: #0, - }, + span: 53..58#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 53, - ), - hi: BytePos( - 69, - ), - ctxt: #0, - }, + span: 53..69#0, value: "{string, number}", }, ), desc: Text { - span: Span { - lo: BytePos( - 53, - ), - hi: BytePos( - 54, - ), - ctxt: #0, - }, + span: 53..54#0, value: "a", }, }, diff --git a/crates/jsdoc/tests/fixtures/plugins.debug b/crates/jsdoc/tests/fixtures/plugins.debug index 1cb1a747f494..72f1fc840108 100644 --- a/crates/jsdoc/tests/fixtures/plugins.debug +++ b/crates/jsdoc/tests/fixtures/plugins.debug @@ -1,81 +1,25 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, value: "name", }, tag: Name( NameTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, name_path: NamePath { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 2, - ), - ctxt: #0, - }, + span: 1..2#0, components: [ Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, value: "virtual", }, ], @@ -86,71 +30,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 45, - ), - hi: BytePos( - 45, - ), - ctxt: #0, - }, + span: 45..45#0, description: Text { - span: Span { - lo: BytePos( - 45, - ), - hi: BytePos( - 45, - ), - ctxt: #0, - }, + span: 45..45#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 45, - ), - hi: BytePos( - 48, - ), - ctxt: #0, - }, + span: 45..48#0, tag_name: Text { - span: Span { - lo: BytePos( - 45, - ), - hi: BytePos( - 48, - ), - ctxt: #0, - }, + span: 45..48#0, value: "foo", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 45, - ), - hi: BytePos( - 48, - ), - ctxt: #0, - }, + span: 45..48#0, extras: Text { - span: Span { - lo: BytePos( - 45, - ), - hi: BytePos( - 48, - ), - ctxt: #0, - }, + span: 45..48#0, value: "bar", }, }, diff --git a/crates/jsdoc/tests/fixtures/polymerbehaviortag.debug b/crates/jsdoc/tests/fixtures/polymerbehaviortag.debug index a7249a40991a..85eb07ba8639 100644 --- a/crates/jsdoc/tests/fixtures/polymerbehaviortag.debug +++ b/crates/jsdoc/tests/fixtures/polymerbehaviortag.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 1..16#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 1..16#0, value: "polymerBehavior", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 1..16#0, extras: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, diff --git a/crates/jsdoc/tests/fixtures/polymertag.debug b/crates/jsdoc/tests/fixtures/polymertag.debug index 70e9a60d587c..fb053d790ad9 100644 --- a/crates/jsdoc/tests/fixtures/polymertag.debug +++ b/crates/jsdoc/tests/fixtures/polymertag.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 20, - ), - ctxt: #0, - }, + span: 1..20#0, value: "A Polymer class.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, value: "polymer", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, extras: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, diff --git a/crates/jsdoc/tests/fixtures/preservetag.debug b/crates/jsdoc/tests/fixtures/preservetag.debug index 44b662429f43..a73fb08a259c 100644 --- a/crates/jsdoc/tests/fixtures/preservetag.debug +++ b/crates/jsdoc/tests/fixtures/preservetag.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 28, - ), - ctxt: #0, - }, + span: 1..28#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "preserve", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, extras: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, diff --git a/crates/jsdoc/tests/fixtures/privatetag.debug b/crates/jsdoc/tests/fixtures/privatetag.debug index 80f6d040dc9d..923254f61502 100644 --- a/crates/jsdoc/tests/fixtures/privatetag.debug +++ b/crates/jsdoc/tests/fixtures/privatetag.debug @@ -1,71 +1,23 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 11, - ), - ctxt: #0, - }, + span: 1..11#0, value: "* @private", }, ), @@ -76,25 +28,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 56, - ), - hi: BytePos( - 56, - ), - ctxt: #0, - }, + span: 56..56#0, description: Text { - span: Span { - lo: BytePos( - 56, - ), - hi: BytePos( - 67, - ), - ctxt: #0, - }, + span: 56..67#0, value: "document me", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/privatetag2.debug b/crates/jsdoc/tests/fixtures/privatetag2.debug index 7ec162a3bf5e..b838c8bcf130 100644 --- a/crates/jsdoc/tests/fixtures/privatetag2.debug +++ b/crates/jsdoc/tests/fixtures/privatetag2.debug @@ -1,71 +1,23 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, value: "private", }, tag: Private( PrivateTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 26, - ), - ctxt: #0, - }, + span: 1..26#0, value: "{Object.}", }, ), diff --git a/crates/jsdoc/tests/fixtures/projecttag.debug b/crates/jsdoc/tests/fixtures/projecttag.debug index 4560ed26c9b9..af2a8602287f 100644 --- a/crates/jsdoc/tests/fixtures/projecttag.debug +++ b/crates/jsdoc/tests/fixtures/projecttag.debug @@ -1,214 +1,70 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 53, - ), - ctxt: #0, - }, + span: 1..53#0, value: "An automated documentation generator for JavaScript.", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, value: "project", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, extras: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "JSDoc", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, value: "version", }, tag: Version( VersionTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, value: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "3.0.0", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, value: "copyright", }, tag: Copyright( CopyrightTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, text: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 45, - ), - ctxt: #0, - }, + span: 1..45#0, value: "2011 (c) Michael Mathews ", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, value: "license", }, tag: License( LicenseTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, identifier: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 62, - ), - ctxt: #0, - }, + span: 1..62#0, value: "Apache Version 2 ", }, }, diff --git a/crates/jsdoc/tests/fixtures/propertytag.debug b/crates/jsdoc/tests/fixtures/propertytag.debug index 370e2b46fc94..a772f2a5a19e 100644 --- a/crates/jsdoc/tests/fixtures/propertytag.debug +++ b/crates/jsdoc/tests/fixtures/propertytag.debug @@ -1,72 +1,24 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, value: "namespace", }, tag: Namespace( NamespaceTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, ty: None, name: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 45, - ), - ctxt: #0, - }, + span: 1..45#0, value: "@property {String} id=abc123 The identifier.", }, ), @@ -74,261 +26,93 @@ ), }, TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "property", }, tag: Property( PropertyTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, name_path: NamePath { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 163, - ), - ctxt: #0, - }, + span: 1..163#0, components: [ Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, ], }, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "{Object}", }, ), desc: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 29, - ), - ctxt: #0, - }, + span: 1..29#0, value: "defaults The default values.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "property", }, tag: Property( PropertyTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, name_path: NamePath { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 112, - ), - ctxt: #0, - }, + span: 1..112#0, components: [ Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, ], }, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "{Number}", }, ), desc: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 45, - ), - ctxt: #0, - }, + span: 1..45#0, value: "defaults.a=1 The a property of the defaults.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "property", }, tag: Property( PropertyTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, name_path: NamePath { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 45, - ), - ctxt: #0, - }, + span: 1..45#0, components: [ Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, ], }, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "{String}", }, ), desc: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 43, - ), - ctxt: #0, - }, + span: 1..43#0, value: "defaults.b The b property of the defaults.", }, }, diff --git a/crates/jsdoc/tests/fixtures/protectedtag.debug b/crates/jsdoc/tests/fixtures/protectedtag.debug index 003bb3e53ab3..25e68edd2b8c 100644 --- a/crates/jsdoc/tests/fixtures/protectedtag.debug +++ b/crates/jsdoc/tests/fixtures/protectedtag.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 4, - ), - ctxt: #0, - }, + span: 1..4#0, value: "uid", }, }, @@ -85,61 +29,21 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 21, - ), - ctxt: #0, - }, + span: 0..21#0, description: Text { - span: Span { - lo: BytePos( - 21, - ), - hi: BytePos( - 21, - ), - ctxt: #0, - }, + span: 21..21#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 21, - ), - hi: BytePos( - 30, - ), - ctxt: #0, - }, + span: 21..30#0, tag_name: Text { - span: Span { - lo: BytePos( - 21, - ), - hi: BytePos( - 30, - ), - ctxt: #0, - }, + span: 21..30#0, value: "protected", }, tag: Protected( ProtectedTag { - span: Span { - lo: BytePos( - 21, - ), - hi: BytePos( - 30, - ), - ctxt: #0, - }, + span: 21..30#0, ty: None, }, ), @@ -147,61 +51,21 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 60, - ), - ctxt: #0, - }, + span: 0..60#0, description: Text { - span: Span { - lo: BytePos( - 60, - ), - hi: BytePos( - 60, - ), - ctxt: #0, - }, + span: 60..60#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 60, - ), - hi: BytePos( - 69, - ), - ctxt: #0, - }, + span: 60..69#0, tag_name: Text { - span: Span { - lo: BytePos( - 60, - ), - hi: BytePos( - 69, - ), - ctxt: #0, - }, + span: 60..69#0, value: "protected", }, tag: Protected( ProtectedTag { - span: Span { - lo: BytePos( - 60, - ), - hi: BytePos( - 69, - ), - ctxt: #0, - }, + span: 60..69#0, ty: None, }, ), @@ -209,73 +73,25 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 101, - ), - hi: BytePos( - 101, - ), - ctxt: #0, - }, + span: 101..101#0, description: Text { - span: Span { - lo: BytePos( - 101, - ), - hi: BytePos( - 113, - ), - ctxt: #0, - }, + span: 101..113#0, value: "Root object.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 138, - ), - hi: BytePos( - 138, - ), - ctxt: #0, - }, + span: 138..138#0, description: Text { - span: Span { - lo: BytePos( - 138, - ), - hi: BytePos( - 157, - ), - ctxt: #0, - }, + span: 138..157#0, value: "Obtain a unique ID.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 231, - ), - hi: BytePos( - 231, - ), - ctxt: #0, - }, + span: 231..231#0, description: Text { - span: Span { - lo: BytePos( - 231, - ), - hi: BytePos( - 268, - ), - ctxt: #0, - }, + span: 231..268#0, value: "Associate an object with a unique ID.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/protectedtag2.debug b/crates/jsdoc/tests/fixtures/protectedtag2.debug index 7420dffeab62..c4af7b8ffb05 100644 --- a/crates/jsdoc/tests/fixtures/protectedtag2.debug +++ b/crates/jsdoc/tests/fixtures/protectedtag2.debug @@ -1,71 +1,23 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, value: "protected", }, tag: Protected( ProtectedTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "{number}", }, ), @@ -75,61 +27,21 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 49, - ), - hi: BytePos( - 49, - ), - ctxt: #0, - }, + span: 49..49#0, description: Text { - span: Span { - lo: BytePos( - 49, - ), - hi: BytePos( - 72, - ), - ctxt: #0, - }, + span: 49..72#0, value: "Unique ID generator.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 49, - ), - hi: BytePos( - 60, - ), - ctxt: #0, - }, + span: 49..60#0, tag_name: Text { - span: Span { - lo: BytePos( - 49, - ), - hi: BytePos( - 60, - ), - ctxt: #0, - }, + span: 49..60#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 49, - ), - hi: BytePos( - 60, - ), - ctxt: #0, - }, + span: 49..60#0, ty: None, name: None, }, @@ -138,25 +50,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 125, - ), - hi: BytePos( - 125, - ), - ctxt: #0, - }, + span: 125..125#0, description: Text { - span: Span { - lo: BytePos( - 125, - ), - hi: BytePos( - 146, - ), - ctxt: #0, - }, + span: 125..146#0, value: "Generate a unique ID.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/publictag.debug b/crates/jsdoc/tests/fixtures/publictag.debug index 203927413ada..c319392e1268 100644 --- a/crates/jsdoc/tests/fixtures/publictag.debug +++ b/crates/jsdoc/tests/fixtures/publictag.debug @@ -1,71 +1,23 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 20, - ), - ctxt: #0, - }, + span: 1..20#0, value: "Public class.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, value: "* @public", }, ), diff --git a/crates/jsdoc/tests/fixtures/publictag2.debug b/crates/jsdoc/tests/fixtures/publictag2.debug index 1b59371bab86..f9ff004db70c 100644 --- a/crates/jsdoc/tests/fixtures/publictag2.debug +++ b/crates/jsdoc/tests/fixtures/publictag2.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 11, - ), - ctxt: #0, - }, + span: 1..11#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 23, - ), - ctxt: #0, - }, + span: 1..23#0, value: "Public variable.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "public", }, tag: Public( PublicTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, }, ), }, diff --git a/crates/jsdoc/tests/fixtures/quotename.debug b/crates/jsdoc/tests/fixtures/quotename.debug index 3a051c01b050..44e2ee1ee213 100644 --- a/crates/jsdoc/tests/fixtures/quotename.debug +++ b/crates/jsdoc/tests/fixtures/quotename.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 0..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, value: "namespace", }, tag: Namespace( NamespaceTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, ty: None, name: None, }, @@ -63,61 +23,21 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 35, - ), - ctxt: #0, - }, + span: 0..35#0, description: Text { - span: Span { - lo: BytePos( - 35, - ), - hi: BytePos( - 35, - ), - ctxt: #0, - }, + span: 35..35#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 35, - ), - hi: BytePos( - 44, - ), - ctxt: #0, - }, + span: 35..44#0, tag_name: Text { - span: Span { - lo: BytePos( - 35, - ), - hi: BytePos( - 44, - ), - ctxt: #0, - }, + span: 35..44#0, value: "namespace", }, tag: Namespace( NamespaceTag { - span: Span { - lo: BytePos( - 35, - ), - hi: BytePos( - 44, - ), - ctxt: #0, - }, + span: 35..44#0, ty: None, name: None, }, @@ -126,83 +46,27 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 82, - ), - hi: BytePos( - 111, - ), - ctxt: #0, - }, + span: 82..111#0, description: Text { - span: Span { - lo: BytePos( - 82, - ), - hi: BytePos( - 82, - ), - ctxt: #0, - }, + span: 82..82#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 82, - ), - hi: BytePos( - 88, - ), - ctxt: #0, - }, + span: 82..88#0, tag_name: Text { - span: Span { - lo: BytePos( - 82, - ), - hi: BytePos( - 88, - ), - ctxt: #0, - }, + span: 82..88#0, value: "member", }, tag: Member( MemberTag { - span: Span { - lo: BytePos( - 82, - ), - hi: BytePos( - 88, - ), - ctxt: #0, - }, + span: 82..88#0, ty: Text { - span: Span { - lo: BytePos( - 82, - ), - hi: BytePos( - 82, - ), - ctxt: #0, - }, + span: 82..82#0, value: "", }, name: Text { - span: Span { - lo: BytePos( - 82, - ), - hi: BytePos( - 86, - ), - ctxt: #0, - }, + span: 82..86#0, value: "type", }, }, diff --git a/crates/jsdoc/tests/fixtures/quotename2.debug b/crates/jsdoc/tests/fixtures/quotename2.debug index 1d70b95a3a9e..253f7e4f6b41 100644 --- a/crates/jsdoc/tests/fixtures/quotename2.debug +++ b/crates/jsdoc/tests/fixtures/quotename2.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 0..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, value: "namespace", }, tag: Namespace( NamespaceTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, ty: None, name: None, }, @@ -63,61 +23,21 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 41, - ), - ctxt: #0, - }, + span: 0..41#0, description: Text { - span: Span { - lo: BytePos( - 41, - ), - hi: BytePos( - 41, - ), - ctxt: #0, - }, + span: 41..41#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 41, - ), - hi: BytePos( - 50, - ), - ctxt: #0, - }, + span: 41..50#0, tag_name: Text { - span: Span { - lo: BytePos( - 41, - ), - hi: BytePos( - 50, - ), - ctxt: #0, - }, + span: 41..50#0, value: "namespace", }, tag: Namespace( NamespaceTag { - span: Span { - lo: BytePos( - 41, - ), - hi: BytePos( - 50, - ), - ctxt: #0, - }, + span: 41..50#0, ty: None, name: None, }, @@ -126,25 +46,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 101, - ), - hi: BytePos( - 101, - ), - ctxt: #0, - }, + span: 101..101#0, description: Text { - span: Span { - lo: BytePos( - 101, - ), - hi: BytePos( - 112, - ), - ctxt: #0, - }, + span: 101..112#0, value: "document me", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/readonlytag.debug b/crates/jsdoc/tests/fixtures/readonlytag.debug index a9e4083e230a..5f0b8b773446 100644 --- a/crates/jsdoc/tests/fixtures/readonlytag.debug +++ b/crates/jsdoc/tests/fixtures/readonlytag.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, ty: None, name: None, }, @@ -63,61 +23,21 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 52, - ), - hi: BytePos( - 52, - ), - ctxt: #0, - }, + span: 52..52#0, description: Text { - span: Span { - lo: BytePos( - 52, - ), - hi: BytePos( - 52, - ), - ctxt: #0, - }, + span: 52..52#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 52, - ), - hi: BytePos( - 60, - ), - ctxt: #0, - }, + span: 52..60#0, tag_name: Text { - span: Span { - lo: BytePos( - 52, - ), - hi: BytePos( - 60, - ), - ctxt: #0, - }, + span: 52..60#0, value: "readonly", }, tag: Readonly( ReadonlyTag { - span: Span { - lo: BytePos( - 52, - ), - hi: BytePos( - 60, - ), - ctxt: #0, - }, + span: 52..60#0, }, ), }, diff --git a/crates/jsdoc/tests/fixtures/requirestag.debug b/crates/jsdoc/tests/fixtures/requirestag.debug index 7e90fa3bdc64..57084995875c 100644 --- a/crates/jsdoc/tests/fixtures/requirestag.debug +++ b/crates/jsdoc/tests/fixtures/requirestag.debug @@ -1,81 +1,25 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 13, - ), - ctxt: #0, - }, + span: 1..13#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, value: "requires", }, tag: Requires( RequiresTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 1..9#0, name_path: NamePath { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 13, - ), - ctxt: #0, - }, + span: 1..13#0, components: [ Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, ], @@ -86,82 +30,26 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 60, - ), - hi: BytePos( - 87, - ), - ctxt: #0, - }, + span: 60..87#0, description: Text { - span: Span { - lo: BytePos( - 60, - ), - hi: BytePos( - 60, - ), - ctxt: #0, - }, + span: 60..60#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 60, - ), - hi: BytePos( - 68, - ), - ctxt: #0, - }, + span: 60..68#0, tag_name: Text { - span: Span { - lo: BytePos( - 60, - ), - hi: BytePos( - 68, - ), - ctxt: #0, - }, + span: 60..68#0, value: "requires", }, tag: Requires( RequiresTag { - span: Span { - lo: BytePos( - 60, - ), - hi: BytePos( - 68, - ), - ctxt: #0, - }, + span: 60..68#0, name_path: NamePath { - span: Span { - lo: BytePos( - 60, - ), - hi: BytePos( - 104, - ), - ctxt: #0, - }, + span: 60..104#0, components: [ Text { - span: Span { - lo: BytePos( - 60, - ), - hi: BytePos( - 63, - ), - ctxt: #0, - }, + span: 60..63#0, value: "foo", }, ], @@ -170,59 +58,19 @@ ), }, TagItem { - span: Span { - lo: BytePos( - 60, - ), - hi: BytePos( - 68, - ), - ctxt: #0, - }, + span: 60..68#0, tag_name: Text { - span: Span { - lo: BytePos( - 60, - ), - hi: BytePos( - 68, - ), - ctxt: #0, - }, + span: 60..68#0, value: "requires", }, tag: Requires( RequiresTag { - span: Span { - lo: BytePos( - 60, - ), - hi: BytePos( - 68, - ), - ctxt: #0, - }, + span: 60..68#0, name_path: NamePath { - span: Span { - lo: BytePos( - 60, - ), - hi: BytePos( - 87, - ), - ctxt: #0, - }, + span: 60..87#0, components: [ Text { - span: Span { - lo: BytePos( - 60, - ), - hi: BytePos( - 63, - ), - ctxt: #0, - }, + span: 60..63#0, value: "Pez", }, ], @@ -233,82 +81,26 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 148, - ), - hi: BytePos( - 148, - ), - ctxt: #0, - }, + span: 148..148#0, description: Text { - span: Span { - lo: BytePos( - 148, - ), - hi: BytePos( - 148, - ), - ctxt: #0, - }, + span: 148..148#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 148, - ), - hi: BytePos( - 156, - ), - ctxt: #0, - }, + span: 148..156#0, tag_name: Text { - span: Span { - lo: BytePos( - 148, - ), - hi: BytePos( - 156, - ), - ctxt: #0, - }, + span: 148..156#0, value: "requires", }, tag: Requires( RequiresTag { - span: Span { - lo: BytePos( - 148, - ), - hi: BytePos( - 156, - ), - ctxt: #0, - }, + span: 148..156#0, name_path: NamePath { - span: Span { - lo: BytePos( - 148, - ), - hi: BytePos( - 248, - ), - ctxt: #0, - }, + span: 148..248#0, components: [ Text { - span: Span { - lo: BytePos( - 148, - ), - hi: BytePos( - 148, - ), - ctxt: #0, - }, + span: 148..148#0, value: "", }, ], @@ -317,107 +109,35 @@ ), }, TagItem { - span: Span { - lo: BytePos( - 148, - ), - hi: BytePos( - 152, - ), - ctxt: #0, - }, + span: 148..152#0, tag_name: Text { - span: Span { - lo: BytePos( - 148, - ), - hi: BytePos( - 152, - ), - ctxt: #0, - }, + span: 148..152#0, value: "link", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 148, - ), - hi: BytePos( - 152, - ), - ctxt: #0, - }, + span: 148..152#0, extras: Text { - span: Span { - lo: BytePos( - 148, - ), - hi: BytePos( - 160, - ), - ctxt: #0, - }, + span: 148..160#0, value: "module:zest}", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 148, - ), - hi: BytePos( - 156, - ), - ctxt: #0, - }, + span: 148..156#0, tag_name: Text { - span: Span { - lo: BytePos( - 148, - ), - hi: BytePos( - 156, - ), - ctxt: #0, - }, + span: 148..156#0, value: "requires", }, tag: Requires( RequiresTag { - span: Span { - lo: BytePos( - 148, - ), - hi: BytePos( - 156, - ), - ctxt: #0, - }, + span: 148..156#0, name_path: NamePath { - span: Span { - lo: BytePos( - 148, - ), - hi: BytePos( - 215, - ), - ctxt: #0, - }, + span: 148..215#0, components: [ Text { - span: Span { - lo: BytePos( - 148, - ), - hi: BytePos( - 148, - ), - ctxt: #0, - }, + span: 148..148#0, value: "", }, ], @@ -426,107 +146,35 @@ ), }, TagItem { - span: Span { - lo: BytePos( - 148, - ), - hi: BytePos( - 157, - ), - ctxt: #0, - }, + span: 148..157#0, tag_name: Text { - span: Span { - lo: BytePos( - 148, - ), - hi: BytePos( - 157, - ), - ctxt: #0, - }, + span: 148..157#0, value: "linkplain", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 148, - ), - hi: BytePos( - 157, - ), - ctxt: #0, - }, + span: 148..157#0, extras: Text { - span: Span { - lo: BytePos( - 148, - ), - hi: BytePos( - 160, - ), - ctxt: #0, - }, + span: 148..160#0, value: "module:zing}", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 148, - ), - hi: BytePos( - 156, - ), - ctxt: #0, - }, + span: 148..156#0, tag_name: Text { - span: Span { - lo: BytePos( - 148, - ), - hi: BytePos( - 156, - ), - ctxt: #0, - }, + span: 148..156#0, value: "requires", }, tag: Requires( RequiresTag { - span: Span { - lo: BytePos( - 148, - ), - hi: BytePos( - 156, - ), - ctxt: #0, - }, + span: 148..156#0, name_path: NamePath { - span: Span { - lo: BytePos( - 148, - ), - hi: BytePos( - 177, - ), - ctxt: #0, - }, + span: 148..177#0, components: [ Text { - span: Span { - lo: BytePos( - 148, - ), - hi: BytePos( - 148, - ), - ctxt: #0, - }, + span: 148..148#0, value: "", }, ], @@ -535,48 +183,16 @@ ), }, TagItem { - span: Span { - lo: BytePos( - 148, - ), - hi: BytePos( - 158, - ), - ctxt: #0, - }, + span: 148..158#0, tag_name: Text { - span: Span { - lo: BytePos( - 148, - ), - hi: BytePos( - 158, - ), - ctxt: #0, - }, + span: 148..158#0, value: "linkstupid", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 148, - ), - hi: BytePos( - 158, - ), - ctxt: #0, - }, + span: 148..158#0, extras: Text { - span: Span { - lo: BytePos( - 148, - ), - hi: BytePos( - 163, - ), - ctxt: #0, - }, + span: 148..163#0, value: "module:pizzazz}", }, }, diff --git a/crates/jsdoc/tests/fixtures/restparams.debug b/crates/jsdoc/tests/fixtures/restparams.debug index 5c04fc5e8b95..e1f791030c6b 100644 --- a/crates/jsdoc/tests/fixtures/restparams.debug +++ b/crates/jsdoc/tests/fixtures/restparams.debug @@ -1,85 +1,29 @@ [ JsDoc { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 16..16#0, description: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 59, - ), - ctxt: #0, - }, + span: 16..59#0, value: "Set the list of users who are admins.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 21, - ), - ctxt: #0, - }, + span: 16..21#0, tag_name: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 21, - ), - ctxt: #0, - }, + span: 16..21#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 21, - ), - ctxt: #0, - }, + span: 16..21#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 22, - ), - ctxt: #0, - }, + span: 16..22#0, value: "{User}", }, ), desc: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 64, - ), - ctxt: #0, - }, + span: 16..64#0, value: "users - The users who will receive admin rights.", }, }, @@ -88,149 +32,53 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 167, - ), - hi: BytePos( - 167, - ), - ctxt: #0, - }, + span: 167..167#0, description: Text { - span: Span { - lo: BytePos( - 167, - ), - hi: BytePos( - 219, - ), - ctxt: #0, - }, + span: 167..219#0, value: "Set the list of users who can access a widget.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 167, - ), - hi: BytePos( - 172, - ), - ctxt: #0, - }, + span: 167..172#0, tag_name: Text { - span: Span { - lo: BytePos( - 167, - ), - hi: BytePos( - 172, - ), - ctxt: #0, - }, + span: 167..172#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 167, - ), - hi: BytePos( - 172, - ), - ctxt: #0, - }, + span: 167..172#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 167, - ), - hi: BytePos( - 175, - ), - ctxt: #0, - }, + span: 167..175#0, value: "{Widget}", }, ), desc: Text { - span: Span { - lo: BytePos( - 167, - ), - hi: BytePos( - 187, - ), - ctxt: #0, - }, + span: 167..187#0, value: "widget - The widget.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 167, - ), - hi: BytePos( - 172, - ), - ctxt: #0, - }, + span: 167..172#0, tag_name: Text { - span: Span { - lo: BytePos( - 167, - ), - hi: BytePos( - 172, - ), - ctxt: #0, - }, + span: 167..172#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 167, - ), - hi: BytePos( - 172, - ), - ctxt: #0, - }, + span: 167..172#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 167, - ), - hi: BytePos( - 173, - ), - ctxt: #0, - }, + span: 167..173#0, value: "{User}", }, ), desc: Text { - span: Span { - lo: BytePos( - 167, - ), - hi: BytePos( - 230, - ), - ctxt: #0, - }, + span: 167..230#0, value: "users - The users who will receive rights to access the widget.", }, }, @@ -239,86 +87,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 396, - ), - hi: BytePos( - 396, - ), - ctxt: #0, - }, + span: 396..396#0, description: Text { - span: Span { - lo: BytePos( - 396, - ), - hi: BytePos( - 441, - ), - ctxt: #0, - }, + span: 396..441#0, value: "Set the list of users who are managers.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 396, - ), - hi: BytePos( - 401, - ), - ctxt: #0, - }, + span: 396..401#0, tag_name: Text { - span: Span { - lo: BytePos( - 396, - ), - hi: BytePos( - 401, - ), - ctxt: #0, - }, + span: 396..401#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 396, - ), - hi: BytePos( - 401, - ), - ctxt: #0, - }, + span: 396..401#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 396, - ), - hi: BytePos( - 402, - ), - ctxt: #0, - }, + span: 396..402#0, value: "{User}", }, ), desc: Text { - span: Span { - lo: BytePos( - 396, - ), - hi: BytePos( - 431, - ), - ctxt: #0, - }, + span: 396..431#0, value: "users - The users who are managers.", }, }, diff --git a/crates/jsdoc/tests/fixtures/restparams2.debug b/crates/jsdoc/tests/fixtures/restparams2.debug index 4c9d553f4ba9..a3a72a306e7c 100644 --- a/crates/jsdoc/tests/fixtures/restparams2.debug +++ b/crates/jsdoc/tests/fixtures/restparams2.debug @@ -1,109 +1,37 @@ [ JsDoc { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 16..16#0, description: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 44, - ), - ctxt: #0, - }, + span: 16..44#0, value: "Class representing a widget.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 71, - ), - hi: BytePos( - 71, - ), - ctxt: #0, - }, + span: 71..71#0, description: Text { - span: Span { - lo: BytePos( - 71, - ), - hi: BytePos( - 121, - ), - ctxt: #0, - }, + span: 71..121#0, value: "Add users who can access the widget.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 71, - ), - hi: BytePos( - 76, - ), - ctxt: #0, - }, + span: 71..76#0, tag_name: Text { - span: Span { - lo: BytePos( - 71, - ), - hi: BytePos( - 76, - ), - ctxt: #0, - }, + span: 71..76#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 71, - ), - hi: BytePos( - 76, - ), - ctxt: #0, - }, + span: 71..76#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 71, - ), - hi: BytePos( - 77, - ), - ctxt: #0, - }, + span: 71..77#0, value: "{User}", }, ), desc: Text { - span: Span { - lo: BytePos( - 71, - ), - hi: BytePos( - 115, - ), - ctxt: #0, - }, + span: 71..115#0, value: "users - The users who can access the widget.", }, }, diff --git a/crates/jsdoc/tests/fixtures/returnstag.debug b/crates/jsdoc/tests/fixtures/returnstag.debug index 6b754936aad8..96bb4f5aba49 100644 --- a/crates/jsdoc/tests/fixtures/returnstag.debug +++ b/crates/jsdoc/tests/fixtures/returnstag.debug @@ -1,84 +1,28 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, value: "returns", }, tag: Return( ReturnTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 23, - ), - ctxt: #0, - }, + span: 1..23#0, value: "{string|Array}", }, ), description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 32, - ), - ctxt: #0, - }, + span: 1..32#0, value: "The names of the found item(s).", }, }, @@ -87,85 +31,29 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 108, - ), - hi: BytePos( - 108, - ), - ctxt: #0, - }, + span: 108..108#0, description: Text { - span: Span { - lo: BytePos( - 108, - ), - hi: BytePos( - 108, - ), - ctxt: #0, - }, + span: 108..108#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 108, - ), - hi: BytePos( - 115, - ), - ctxt: #0, - }, + span: 108..115#0, tag_name: Text { - span: Span { - lo: BytePos( - 108, - ), - hi: BytePos( - 115, - ), - ctxt: #0, - }, + span: 108..115#0, value: "returns", }, tag: Return( ReturnTag { - span: Span { - lo: BytePos( - 108, - ), - hi: BytePos( - 115, - ), - ctxt: #0, - }, + span: 108..115#0, ty: Some( Text { - span: Span { - lo: BytePos( - 108, - ), - hi: BytePos( - 117, - ), - ctxt: #0, - }, + span: 108..117#0, value: "{!string}", }, ), description: Text { - span: Span { - lo: BytePos( - 108, - ), - hi: BytePos( - 129, - ), - ctxt: #0, - }, + span: 108..129#0, value: "The name, if defined.", }, }, @@ -174,85 +62,29 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 184, - ), - hi: BytePos( - 184, - ), - ctxt: #0, - }, + span: 184..184#0, description: Text { - span: Span { - lo: BytePos( - 184, - ), - hi: BytePos( - 184, - ), - ctxt: #0, - }, + span: 184..184#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 184, - ), - hi: BytePos( - 190, - ), - ctxt: #0, - }, + span: 184..190#0, tag_name: Text { - span: Span { - lo: BytePos( - 184, - ), - hi: BytePos( - 190, - ), - ctxt: #0, - }, + span: 184..190#0, value: "return", }, tag: Return( ReturnTag { - span: Span { - lo: BytePos( - 184, - ), - hi: BytePos( - 190, - ), - ctxt: #0, - }, + span: 184..190#0, ty: Some( Text { - span: Span { - lo: BytePos( - 184, - ), - hi: BytePos( - 187, - ), - ctxt: #0, - }, + span: 184..187#0, value: "The", }, ), description: Text { - span: Span { - lo: BytePos( - 184, - ), - hi: BytePos( - 195, - ), - ctxt: #0, - }, + span: 184..195#0, value: "binding id.", }, }, @@ -261,85 +93,29 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 248, - ), - hi: BytePos( - 248, - ), - ctxt: #0, - }, + span: 248..248#0, description: Text { - span: Span { - lo: BytePos( - 248, - ), - hi: BytePos( - 248, - ), - ctxt: #0, - }, + span: 248..248#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 248, - ), - hi: BytePos( - 254, - ), - ctxt: #0, - }, + span: 248..254#0, tag_name: Text { - span: Span { - lo: BytePos( - 248, - ), - hi: BytePos( - 254, - ), - ctxt: #0, - }, + span: 248..254#0, value: "return", }, tag: Return( ReturnTag { - span: Span { - lo: BytePos( - 248, - ), - hi: BytePos( - 254, - ), - ctxt: #0, - }, + span: 248..254#0, ty: Some( Text { - span: Span { - lo: BytePos( - 248, - ), - hi: BytePos( - 250, - ), - ctxt: #0, - }, + span: 248..250#0, value: "An", }, ), description: Text { - span: Span { - lo: BytePos( - 248, - ), - hi: BytePos( - 284, - ), - ctxt: #0, - }, + span: 248..284#0, value: "object to be passed to {@link find}.", }, }, diff --git a/crates/jsdoc/tests/fixtures/scopetags.debug b/crates/jsdoc/tests/fixtures/scopetags.debug index 0d5c9e415cd4..89690da04f35 100644 --- a/crates/jsdoc/tests/fixtures/scopetags.debug +++ b/crates/jsdoc/tests/fixtures/scopetags.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 91, - ), - ctxt: #0, - }, + span: 1..91#0, value: "(scope tags for global objects do not override globalness hence need a container class)\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, value: "scopetags", }, }, @@ -85,183 +29,63 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 117, - ), - hi: BytePos( - 117, - ), - ctxt: #0, - }, + span: 117..117#0, description: Text { - span: Span { - lo: BytePos( - 117, - ), - hi: BytePos( - 117, - ), - ctxt: #0, - }, + span: 117..117#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 117, - ), - hi: BytePos( - 122, - ), - ctxt: #0, - }, + span: 117..122#0, tag_name: Text { - span: Span { - lo: BytePos( - 117, - ), - hi: BytePos( - 122, - ), - ctxt: #0, - }, + span: 117..122#0, value: "inner", }, tag: Inner( InnerTag { - span: Span { - lo: BytePos( - 117, - ), - hi: BytePos( - 122, - ), - ctxt: #0, - }, + span: 117..122#0, }, ), }, ], }, JsDoc { - span: Span { - lo: BytePos( - 145, - ), - hi: BytePos( - 145, - ), - ctxt: #0, - }, + span: 145..145#0, description: Text { - span: Span { - lo: BytePos( - 145, - ), - hi: BytePos( - 145, - ), - ctxt: #0, - }, + span: 145..145#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 145, - ), - hi: BytePos( - 153, - ), - ctxt: #0, - }, + span: 145..153#0, tag_name: Text { - span: Span { - lo: BytePos( - 145, - ), - hi: BytePos( - 153, - ), - ctxt: #0, - }, + span: 145..153#0, value: "instance", }, tag: Instance( InstanceTag { - span: Span { - lo: BytePos( - 145, - ), - hi: BytePos( - 153, - ), - ctxt: #0, - }, + span: 145..153#0, }, ), }, ], }, JsDoc { - span: Span { - lo: BytePos( - 179, - ), - hi: BytePos( - 179, - ), - ctxt: #0, - }, + span: 179..179#0, description: Text { - span: Span { - lo: BytePos( - 179, - ), - hi: BytePos( - 179, - ), - ctxt: #0, - }, + span: 179..179#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 179, - ), - hi: BytePos( - 185, - ), - ctxt: #0, - }, + span: 179..185#0, tag_name: Text { - span: Span { - lo: BytePos( - 179, - ), - hi: BytePos( - 185, - ), - ctxt: #0, - }, + span: 179..185#0, value: "static", }, tag: Static( StaticTag { - span: Span { - lo: BytePos( - 179, - ), - hi: BytePos( - 185, - ), - ctxt: #0, - }, + span: 179..185#0, }, ), }, diff --git a/crates/jsdoc/tests/fixtures/seetag.debug b/crates/jsdoc/tests/fixtures/seetag.debug index 90694c0e0973..c3d34f7e6e1e 100644 --- a/crates/jsdoc/tests/fixtures/seetag.debug +++ b/crates/jsdoc/tests/fixtures/seetag.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 4, - ), - ctxt: #0, - }, + span: 1..4#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 4, - ), - ctxt: #0, - }, + span: 1..4#0, value: "see", }, tag: See( SeeTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 4, - ), - ctxt: #0, - }, + span: 1..4#0, text: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, value: "{@link bar}", }, }, @@ -73,71 +25,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 48, - ), - hi: BytePos( - 48, - ), - ctxt: #0, - }, + span: 48..48#0, description: Text { - span: Span { - lo: BytePos( - 48, - ), - hi: BytePos( - 48, - ), - ctxt: #0, - }, + span: 48..48#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 48, - ), - hi: BytePos( - 51, - ), - ctxt: #0, - }, + span: 48..51#0, tag_name: Text { - span: Span { - lo: BytePos( - 48, - ), - hi: BytePos( - 51, - ), - ctxt: #0, - }, + span: 48..51#0, value: "see", }, tag: See( SeeTag { - span: Span { - lo: BytePos( - 48, - ), - hi: BytePos( - 51, - ), - ctxt: #0, - }, + span: 48..51#0, text: Text { - span: Span { - lo: BytePos( - 48, - ), - hi: BytePos( - 74, - ), - ctxt: #0, - }, + span: 48..74#0, value: "http://example.com/someref", }, }, diff --git a/crates/jsdoc/tests/fixtures/sincetag.debug b/crates/jsdoc/tests/fixtures/sincetag.debug index 19404f85156d..464bad49ea56 100644 --- a/crates/jsdoc/tests/fixtures/sincetag.debug +++ b/crates/jsdoc/tests/fixtures/sincetag.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "since", }, tag: Since( SinceTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, version: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "1.2.3", }, }, diff --git a/crates/jsdoc/tests/fixtures/specialchars.debug b/crates/jsdoc/tests/fixtures/specialchars.debug index f8d7b68fd5aa..3c6ba670d0c1 100644 --- a/crates/jsdoc/tests/fixtures/specialchars.debug +++ b/crates/jsdoc/tests/fixtures/specialchars.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 16..16#0, description: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 16..16#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 21, - ), - ctxt: #0, - }, + span: 16..21#0, tag_name: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 21, - ), - ctxt: #0, - }, + span: 16..21#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 21, - ), - ctxt: #0, - }, + span: 16..21#0, ty: None, name: None, }, @@ -63,49 +23,17 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 58, - ), - hi: BytePos( - 58, - ), - ctxt: #0, - }, + span: 58..58#0, description: Text { - span: Span { - lo: BytePos( - 58, - ), - hi: BytePos( - 70, - ), - ctxt: #0, - }, + span: 58..70#0, value: "Port number.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 110, - ), - hi: BytePos( - 110, - ), - ctxt: #0, - }, + span: 110..110#0, description: Text { - span: Span { - lo: BytePos( - 110, - ), - hi: BytePos( - 128, - ), - ctxt: #0, - }, + span: 110..128#0, value: "Open a connection.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/specialnames.debug b/crates/jsdoc/tests/fixtures/specialnames.debug index 8967d574c256..eafc30021ef6 100644 --- a/crates/jsdoc/tests/fixtures/specialnames.debug +++ b/crates/jsdoc/tests/fixtures/specialnames.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 0..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, value: "namespace", }, tag: Namespace( NamespaceTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, ty: None, name: None, }, @@ -63,85 +23,29 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 43, - ), - ctxt: #0, - }, + span: 43..43#0, description: Text { - span: Span { - lo: BytePos( - 43, - ), - hi: BytePos( - 54, - ), - ctxt: #0, - }, + span: 43..54#0, value: "document me", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 94, - ), - ctxt: #0, - }, + span: 0..94#0, description: Text { - span: Span { - lo: BytePos( - 94, - ), - hi: BytePos( - 94, - ), - ctxt: #0, - }, + span: 94..94#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 94, - ), - hi: BytePos( - 103, - ), - ctxt: #0, - }, + span: 94..103#0, tag_name: Text { - span: Span { - lo: BytePos( - 94, - ), - hi: BytePos( - 103, - ), - ctxt: #0, - }, + span: 94..103#0, value: "namespace", }, tag: Namespace( NamespaceTag { - span: Span { - lo: BytePos( - 94, - ), - hi: BytePos( - 103, - ), - ctxt: #0, - }, + span: 94..103#0, ty: None, name: None, }, @@ -150,49 +54,17 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 134, - ), - hi: BytePos( - 134, - ), - ctxt: #0, - }, + span: 134..134#0, description: Text { - span: Span { - lo: BytePos( - 134, - ), - hi: BytePos( - 145, - ), - ctxt: #0, - }, + span: 134..145#0, value: "document me", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 184, - ), - hi: BytePos( - 184, - ), - ctxt: #0, - }, + span: 184..184#0, description: Text { - span: Span { - lo: BytePos( - 184, - ), - hi: BytePos( - 195, - ), - ctxt: #0, - }, + span: 184..195#0, value: "document me", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/structtag.debug b/crates/jsdoc/tests/fixtures/structtag.debug index a2858d8ca33c..f9dfee0bede6 100644 --- a/crates/jsdoc/tests/fixtures/structtag.debug +++ b/crates/jsdoc/tests/fixtures/structtag.debug @@ -1,71 +1,23 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 17, - ), - ctxt: #0, - }, + span: 1..17#0, value: "Foo class.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, value: "* @struct", }, ), diff --git a/crates/jsdoc/tests/fixtures/summarytag.debug b/crates/jsdoc/tests/fixtures/summarytag.debug index 467f9766ce29..ba7db7ee157b 100644 --- a/crates/jsdoc/tests/fixtures/summarytag.debug +++ b/crates/jsdoc/tests/fixtures/summarytag.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 35, - ), - ctxt: #0, - }, + span: 1..35#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, value: "summary", }, tag: Summary( SummaryTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, text: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, diff --git a/crates/jsdoc/tests/fixtures/suppresstag.debug b/crates/jsdoc/tests/fixtures/suppresstag.debug index 87a73e0fc256..6e437b7193b9 100644 --- a/crates/jsdoc/tests/fixtures/suppresstag.debug +++ b/crates/jsdoc/tests/fixtures/suppresstag.debug @@ -1,71 +1,23 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 17, - ), - ctxt: #0, - }, + span: 1..17#0, value: "Foo class.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 25, - ), - ctxt: #0, - }, + span: 1..25#0, value: "* @suppress {deprecated}", }, ), diff --git a/crates/jsdoc/tests/fixtures/templatetag.debug b/crates/jsdoc/tests/fixtures/templatetag.debug index d94080fea07e..bf67cb74f9f0 100644 --- a/crates/jsdoc/tests/fixtures/templatetag.debug +++ b/crates/jsdoc/tests/fixtures/templatetag.debug @@ -1,134 +1,46 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 4, - ), - ctxt: #0, - }, + span: 1..4#0, value: "{T}", }, ), desc: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 2, - ), - ctxt: #0, - }, + span: 1..2#0, value: "t", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 14, - ), - ctxt: #0, - }, + span: 1..14#0, value: "* @template T", }, ), diff --git a/crates/jsdoc/tests/fixtures/this-and-objectlit.debug b/crates/jsdoc/tests/fixtures/this-and-objectlit.debug index 88a7101f7bee..108239dcbb48 100644 --- a/crates/jsdoc/tests/fixtures/this-and-objectlit.debug +++ b/crates/jsdoc/tests/fixtures/this-and-objectlit.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, ty: None, name: None, }, @@ -63,25 +23,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 113, - ), - hi: BytePos( - 113, - ), - ctxt: #0, - }, + span: 113..113#0, description: Text { - span: Span { - lo: BytePos( - 113, - ), - hi: BytePos( - 124, - ), - ctxt: #0, - }, + span: 113..124#0, value: "document me", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/this.debug b/crates/jsdoc/tests/fixtures/this.debug index 9d88f212574f..922cb30e918f 100644 --- a/crates/jsdoc/tests/fixtures/this.debug +++ b/crates/jsdoc/tests/fixtures/this.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, ty: None, name: None, }, @@ -63,25 +23,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 119, - ), - hi: BytePos( - 119, - ), - ctxt: #0, - }, + span: 119..119#0, description: Text { - span: Span { - lo: BytePos( - 119, - ), - hi: BytePos( - 130, - ), - ctxt: #0, - }, + span: 119..130#0, value: "document me", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/this2.debug b/crates/jsdoc/tests/fixtures/this2.debug index 1effdbd89200..98277ccab88a 100644 --- a/crates/jsdoc/tests/fixtures/this2.debug +++ b/crates/jsdoc/tests/fixtures/this2.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, ty: None, name: None, }, @@ -63,61 +23,21 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 131, - ), - hi: BytePos( - 131, - ), - ctxt: #0, - }, + span: 131..131#0, description: Text { - span: Span { - lo: BytePos( - 131, - ), - hi: BytePos( - 131, - ), - ctxt: #0, - }, + span: 131..131#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 131, - ), - hi: BytePos( - 142, - ), - ctxt: #0, - }, + span: 131..142#0, tag_name: Text { - span: Span { - lo: BytePos( - 131, - ), - hi: BytePos( - 142, - ), - ctxt: #0, - }, + span: 131..142#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 131, - ), - hi: BytePos( - 142, - ), - ctxt: #0, - }, + span: 131..142#0, ty: None, name: None, }, @@ -126,49 +46,17 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 245, - ), - hi: BytePos( - 245, - ), - ctxt: #0, - }, + span: 245..245#0, description: Text { - span: Span { - lo: BytePos( - 245, - ), - hi: BytePos( - 256, - ), - ctxt: #0, - }, + span: 245..256#0, value: "document me", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 315, - ), - hi: BytePos( - 315, - ), - ctxt: #0, - }, + span: 315..315#0, description: Text { - span: Span { - lo: BytePos( - 315, - ), - hi: BytePos( - 326, - ), - ctxt: #0, - }, + span: 315..326#0, value: "document me", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/this3.debug b/crates/jsdoc/tests/fixtures/this3.debug index 4c52c95c9ec0..42834f479a4a 100644 --- a/crates/jsdoc/tests/fixtures/this3.debug +++ b/crates/jsdoc/tests/fixtures/this3.debug @@ -1,24 +1,8 @@ [ JsDoc { - span: Span { - lo: BytePos( - 34, - ), - hi: BytePos( - 34, - ), - ctxt: #0, - }, + span: 34..34#0, description: Text { - span: Span { - lo: BytePos( - 34, - ), - hi: BytePos( - 45, - ), - ctxt: #0, - }, + span: 34..45#0, value: "document me", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/this4.debug b/crates/jsdoc/tests/fixtures/this4.debug index feece7d8ea56..51b80e61b441 100644 --- a/crates/jsdoc/tests/fixtures/this4.debug +++ b/crates/jsdoc/tests/fixtures/this4.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 16..16#0, description: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 16..16#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 21, - ), - ctxt: #0, - }, + span: 16..21#0, tag_name: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 21, - ), - ctxt: #0, - }, + span: 16..21#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 21, - ), - ctxt: #0, - }, + span: 16..21#0, ty: None, name: None, }, @@ -63,25 +23,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 94, - ), - hi: BytePos( - 94, - ), - ctxt: #0, - }, + span: 94..94#0, description: Text { - span: Span { - lo: BytePos( - 94, - ), - hi: BytePos( - 109, - ), - ctxt: #0, - }, + span: 94..109#0, value: "Render content.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/this5.debug b/crates/jsdoc/tests/fixtures/this5.debug index 8340e23470e0..7bf0a35edd46 100644 --- a/crates/jsdoc/tests/fixtures/this5.debug +++ b/crates/jsdoc/tests/fixtures/this5.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 16..16#0, description: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 16..16#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 22, - ), - ctxt: #0, - }, + span: 16..22#0, tag_name: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 22, - ), - ctxt: #0, - }, + span: 16..22#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 22, - ), - ctxt: #0, - }, + span: 16..22#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, ty: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 24, - ), - ctxt: #0, - }, + span: 16..24#0, value: "template", }, }, @@ -85,72 +29,24 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 41, - ), - hi: BytePos( - 41, - ), - ctxt: #0, - }, + span: 41..41#0, description: Text { - span: Span { - lo: BytePos( - 41, - ), - hi: BytePos( - 41, - ), - ctxt: #0, - }, + span: 41..41#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 41, - ), - hi: BytePos( - 46, - ), - ctxt: #0, - }, + span: 41..46#0, tag_name: Text { - span: Span { - lo: BytePos( - 41, - ), - hi: BytePos( - 46, - ), - ctxt: #0, - }, + span: 41..46#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 41, - ), - hi: BytePos( - 46, - ), - ctxt: #0, - }, + span: 41..46#0, ty: Some( Text { - span: Span { - lo: BytePos( - 41, - ), - hi: BytePos( - 74, - ), - ctxt: #0, - }, + span: 41..74#0, value: "* @alias module:template.Template", }, ), @@ -161,25 +57,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 145, - ), - hi: BytePos( - 145, - ), - ctxt: #0, - }, + span: 145..145#0, description: Text { - span: Span { - lo: BytePos( - 145, - ), - hi: BytePos( - 155, - ), - ctxt: #0, - }, + span: 145..155#0, value: "View file.", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/this6.debug b/crates/jsdoc/tests/fixtures/this6.debug index 6cb57dc3f410..830bb96d2856 100644 --- a/crates/jsdoc/tests/fixtures/this6.debug +++ b/crates/jsdoc/tests/fixtures/this6.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 16..16#0, description: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 16..16#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 22, - ), - ctxt: #0, - }, + span: 16..22#0, tag_name: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 22, - ), - ctxt: #0, - }, + span: 16..22#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 22, - ), - ctxt: #0, - }, + span: 16..22#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, ty: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 23, - ), - ctxt: #0, - }, + span: 16..23#0, value: "example", }, }, @@ -85,82 +29,26 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 40, - ), - hi: BytePos( - 49, - ), - ctxt: #0, - }, + span: 40..49#0, description: Text { - span: Span { - lo: BytePos( - 40, - ), - hi: BytePos( - 59, - ), - ctxt: #0, - }, + span: 40..59#0, value: "An ES6 class.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 40, - ), - hi: BytePos( - 45, - ), - ctxt: #0, - }, + span: 40..45#0, tag_name: Text { - span: Span { - lo: BytePos( - 40, - ), - hi: BytePos( - 45, - ), - ctxt: #0, - }, + span: 40..45#0, value: "alias", }, tag: Alias( AliasTag { - span: Span { - lo: BytePos( - 40, - ), - hi: BytePos( - 45, - ), - ctxt: #0, - }, + span: 40..45#0, name_path: NamePath { - span: Span { - lo: BytePos( - 40, - ), - hi: BytePos( - 49, - ), - ctxt: #0, - }, + span: 40..49#0, components: [ Text { - span: Span { - lo: BytePos( - 40, - ), - hi: BytePos( - 46, - ), - ctxt: #0, - }, + span: 40..46#0, value: "module", }, ], @@ -171,61 +59,21 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 133, - ), - ctxt: #0, - }, + span: 0..133#0, description: Text { - span: Span { - lo: BytePos( - 133, - ), - hi: BytePos( - 167, - ), - ctxt: #0, - }, + span: 133..167#0, value: "My property.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 133, - ), - hi: BytePos( - 142, - ), - ctxt: #0, - }, + span: 133..142#0, tag_name: Text { - span: Span { - lo: BytePos( - 133, - ), - hi: BytePos( - 142, - ), - ctxt: #0, - }, + span: 133..142#0, value: "protected", }, tag: Protected( ProtectedTag { - span: Span { - lo: BytePos( - 133, - ), - hi: BytePos( - 142, - ), - ctxt: #0, - }, + span: 133..142#0, ty: None, }, ), diff --git a/crates/jsdoc/tests/fixtures/thistag.debug b/crates/jsdoc/tests/fixtures/thistag.debug index 89bdbbb522f9..0b309e215aaf 100644 --- a/crates/jsdoc/tests/fixtures/thistag.debug +++ b/crates/jsdoc/tests/fixtures/thistag.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, ty: None, name: None, }, @@ -63,82 +23,26 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 76, - ), - hi: BytePos( - 76, - ), - ctxt: #0, - }, + span: 76..76#0, description: Text { - span: Span { - lo: BytePos( - 76, - ), - hi: BytePos( - 76, - ), - ctxt: #0, - }, + span: 76..76#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 76, - ), - hi: BytePos( - 80, - ), - ctxt: #0, - }, + span: 76..80#0, tag_name: Text { - span: Span { - lo: BytePos( - 76, - ), - hi: BytePos( - 80, - ), - ctxt: #0, - }, + span: 76..80#0, value: "this", }, tag: This( ThisTag { - span: Span { - lo: BytePos( - 76, - ), - hi: BytePos( - 80, - ), - ctxt: #0, - }, + span: 76..80#0, name_path: NamePath { - span: Span { - lo: BytePos( - 76, - ), - hi: BytePos( - 76, - ), - ctxt: #0, - }, + span: 76..76#0, components: [ Text { - span: Span { - lo: BytePos( - 76, - ), - hi: BytePos( - 79, - ), - ctxt: #0, - }, + span: 76..79#0, value: "Foo", }, ], @@ -149,25 +53,9 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 122, - ), - hi: BytePos( - 122, - ), - ctxt: #0, - }, + span: 122..122#0, description: Text { - span: Span { - lo: BytePos( - 122, - ), - hi: BytePos( - 133, - ), - ctxt: #0, - }, + span: 122..133#0, value: "document me", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/thistag2.debug b/crates/jsdoc/tests/fixtures/thistag2.debug index 837eb5e3cffe..bec5bc4fac22 100644 --- a/crates/jsdoc/tests/fixtures/thistag2.debug +++ b/crates/jsdoc/tests/fixtures/thistag2.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, ty: None, name: None, }, @@ -63,82 +23,26 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 76, - ), - hi: BytePos( - 81, - ), - ctxt: #0, - }, + span: 76..81#0, description: Text { - span: Span { - lo: BytePos( - 76, - ), - hi: BytePos( - 76, - ), - ctxt: #0, - }, + span: 76..76#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 76, - ), - hi: BytePos( - 80, - ), - ctxt: #0, - }, + span: 76..80#0, tag_name: Text { - span: Span { - lo: BytePos( - 76, - ), - hi: BytePos( - 80, - ), - ctxt: #0, - }, + span: 76..80#0, value: "this", }, tag: This( ThisTag { - span: Span { - lo: BytePos( - 76, - ), - hi: BytePos( - 80, - ), - ctxt: #0, - }, + span: 76..80#0, name_path: NamePath { - span: Span { - lo: BytePos( - 76, - ), - hi: BytePos( - 81, - ), - ctxt: #0, - }, + span: 76..81#0, components: [ Text { - span: Span { - lo: BytePos( - 76, - ), - hi: BytePos( - 76, - ), - ctxt: #0, - }, + span: 76..76#0, value: "", }, ], @@ -149,106 +53,34 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 124, - ), - hi: BytePos( - 124, - ), - ctxt: #0, - }, + span: 124..124#0, description: Text { - span: Span { - lo: BytePos( - 124, - ), - hi: BytePos( - 135, - ), - ctxt: #0, - }, + span: 124..135#0, value: "document me", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 168, - ), - hi: BytePos( - 179, - ), - ctxt: #0, - }, + span: 168..179#0, description: Text { - span: Span { - lo: BytePos( - 168, - ), - hi: BytePos( - 168, - ), - ctxt: #0, - }, + span: 168..168#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 168, - ), - hi: BytePos( - 172, - ), - ctxt: #0, - }, + span: 168..172#0, tag_name: Text { - span: Span { - lo: BytePos( - 168, - ), - hi: BytePos( - 172, - ), - ctxt: #0, - }, + span: 168..172#0, value: "this", }, tag: This( ThisTag { - span: Span { - lo: BytePos( - 168, - ), - hi: BytePos( - 172, - ), - ctxt: #0, - }, + span: 168..172#0, name_path: NamePath { - span: Span { - lo: BytePos( - 168, - ), - hi: BytePos( - 179, - ), - ctxt: #0, - }, + span: 168..179#0, components: [ Text { - span: Span { - lo: BytePos( - 168, - ), - hi: BytePos( - 168, - ), - ctxt: #0, - }, + span: 168..168#0, value: "", }, ], diff --git a/crates/jsdoc/tests/fixtures/todotag.debug b/crates/jsdoc/tests/fixtures/todotag.debug index 28a80c212339..761bd2fe7f21 100644 --- a/crates/jsdoc/tests/fixtures/todotag.debug +++ b/crates/jsdoc/tests/fixtures/todotag.debug @@ -1,118 +1,38 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 15, - ), - ctxt: #0, - }, + span: 1..15#0, value: "A function.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, value: "todo", }, tag: Todo( TodoTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, text: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, value: "something", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, value: "todo", }, tag: Todo( TodoTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, text: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 15, - ), - ctxt: #0, - }, + span: 1..15#0, value: "something else", }, }, diff --git a/crates/jsdoc/tests/fixtures/typedeftag.debug b/crates/jsdoc/tests/fixtures/typedeftag.debug index d61b600c7e9f..df7f3f78c459 100644 --- a/crates/jsdoc/tests/fixtures/typedeftag.debug +++ b/crates/jsdoc/tests/fixtures/typedeftag.debug @@ -1,95 +1,31 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 17, - ), - ctxt: #0, - }, + span: 1..17#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, value: "typedef", }, tag: TypeDef( TypeDefTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 18, - ), - ctxt: #0, - }, + span: 1..18#0, value: "{(string|number)}", }, ), name_path: NamePath { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 17, - ), - ctxt: #0, - }, + span: 1..17#0, components: [ Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, ], @@ -100,96 +36,32 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 52, - ), - hi: BytePos( - 52, - ), - ctxt: #0, - }, + span: 52..52#0, description: Text { - span: Span { - lo: BytePos( - 52, - ), - hi: BytePos( - 52, - ), - ctxt: #0, - }, + span: 52..52#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 52, - ), - hi: BytePos( - 59, - ), - ctxt: #0, - }, + span: 52..59#0, tag_name: Text { - span: Span { - lo: BytePos( - 52, - ), - hi: BytePos( - 59, - ), - ctxt: #0, - }, + span: 52..59#0, value: "typedef", }, tag: TypeDef( TypeDefTag { - span: Span { - lo: BytePos( - 52, - ), - hi: BytePos( - 59, - ), - ctxt: #0, - }, + span: 52..59#0, ty: Some( Text { - span: Span { - lo: BytePos( - 52, - ), - hi: BytePos( - 60, - ), - ctxt: #0, - }, + span: 52..60#0, value: "{string}", }, ), name_path: NamePath { - span: Span { - lo: BytePos( - 52, - ), - hi: BytePos( - 52, - ), - ctxt: #0, - }, + span: 52..52#0, components: [ Text { - span: Span { - lo: BytePos( - 52, - ), - hi: BytePos( - 52, - ), - ctxt: #0, - }, + span: 52..52#0, value: "", }, ], @@ -200,96 +72,32 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 93, - ), - hi: BytePos( - 105, - ), - ctxt: #0, - }, + span: 93..105#0, description: Text { - span: Span { - lo: BytePos( - 93, - ), - hi: BytePos( - 93, - ), - ctxt: #0, - }, + span: 93..93#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 93, - ), - hi: BytePos( - 100, - ), - ctxt: #0, - }, + span: 93..100#0, tag_name: Text { - span: Span { - lo: BytePos( - 93, - ), - hi: BytePos( - 100, - ), - ctxt: #0, - }, + span: 93..100#0, value: "typedef", }, tag: TypeDef( TypeDefTag { - span: Span { - lo: BytePos( - 93, - ), - hi: BytePos( - 100, - ), - ctxt: #0, - }, + span: 93..100#0, ty: Some( Text { - span: Span { - lo: BytePos( - 93, - ), - hi: BytePos( - 110, - ), - ctxt: #0, - }, + span: 93..110#0, value: "{calc.NumberLike}", }, ), name_path: NamePath { - span: Span { - lo: BytePos( - 93, - ), - hi: BytePos( - 105, - ), - ctxt: #0, - }, + span: 93..105#0, components: [ Text { - span: Span { - lo: BytePos( - 93, - ), - hi: BytePos( - 93, - ), - ctxt: #0, - }, + span: 93..93#0, value: "", }, ], @@ -300,86 +108,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 154, - ), - hi: BytePos( - 178, - ), - ctxt: #0, - }, + span: 154..178#0, description: Text { - span: Span { - lo: BytePos( - 154, - ), - hi: BytePos( - 154, - ), - ctxt: #0, - }, + span: 154..154#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 154, - ), - hi: BytePos( - 159, - ), - ctxt: #0, - }, + span: 154..159#0, tag_name: Text { - span: Span { - lo: BytePos( - 154, - ), - hi: BytePos( - 159, - ), - ctxt: #0, - }, + span: 154..159#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 154, - ), - hi: BytePos( - 159, - ), - ctxt: #0, - }, + span: 154..159#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 154, - ), - hi: BytePos( - 171, - ), - ctxt: #0, - }, + span: 154..171#0, value: "{calc.NumberLike}", }, ), desc: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, diff --git a/crates/jsdoc/tests/fixtures/typedeftag2.debug b/crates/jsdoc/tests/fixtures/typedeftag2.debug index 5d147c8ace66..30561916f5a7 100644 --- a/crates/jsdoc/tests/fixtures/typedeftag2.debug +++ b/crates/jsdoc/tests/fixtures/typedeftag2.debug @@ -1,95 +1,31 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, value: "typedef", }, tag: TypeDef( TypeDefTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 18, - ), - ctxt: #0, - }, + span: 1..18#0, value: "{(string|number)}", }, ), name_path: NamePath { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, components: [ Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, ], diff --git a/crates/jsdoc/tests/fixtures/typekind.debug b/crates/jsdoc/tests/fixtures/typekind.debug index be92a0b9205d..551b4c0ecfa3 100644 --- a/crates/jsdoc/tests/fixtures/typekind.debug +++ b/crates/jsdoc/tests/fixtures/typekind.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 27, - ), - ctxt: #0, - }, + span: 1..27#0, value: "ConnectServer} blog/server", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, }, diff --git a/crates/jsdoc/tests/fixtures/typetag.debug b/crates/jsdoc/tests/fixtures/typetag.debug index 37c1e5017440..d98fdaf5e890 100644 --- a/crates/jsdoc/tests/fixtures/typetag.debug +++ b/crates/jsdoc/tests/fixtures/typetag.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, value: "type", }, tag: Type( TypeTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 23, - ), - ctxt: #0, - }, + span: 1..23#0, value: "{string|Array}", }, }, @@ -73,71 +25,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 51, - ), - hi: BytePos( - 51, - ), - ctxt: #0, - }, + span: 51..51#0, description: Text { - span: Span { - lo: BytePos( - 51, - ), - hi: BytePos( - 51, - ), - ctxt: #0, - }, + span: 51..51#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 51, - ), - hi: BytePos( - 55, - ), - ctxt: #0, - }, + span: 51..55#0, tag_name: Text { - span: Span { - lo: BytePos( - 51, - ), - hi: BytePos( - 55, - ), - ctxt: #0, - }, + span: 51..55#0, value: "type", }, tag: Type( TypeTag { - span: Span { - lo: BytePos( - 51, - ), - hi: BytePos( - 55, - ), - ctxt: #0, - }, + span: 51..55#0, name: Text { - span: Span { - lo: BytePos( - 51, - ), - hi: BytePos( - 58, - ), - ctxt: #0, - }, + span: 51..58#0, value: "integer", }, }, @@ -146,71 +50,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 112, - ), - hi: BytePos( - 112, - ), - ctxt: #0, - }, + span: 112..112#0, description: Text { - span: Span { - lo: BytePos( - 112, - ), - hi: BytePos( - 112, - ), - ctxt: #0, - }, + span: 112..112#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 112, - ), - hi: BytePos( - 116, - ), - ctxt: #0, - }, + span: 112..116#0, tag_name: Text { - span: Span { - lo: BytePos( - 112, - ), - hi: BytePos( - 116, - ), - ctxt: #0, - }, + span: 112..116#0, value: "type", }, tag: Type( TypeTag { - span: Span { - lo: BytePos( - 112, - ), - hi: BytePos( - 116, - ), - ctxt: #0, - }, + span: 112..116#0, name: Text { - span: Span { - lo: BytePos( - 112, - ), - hi: BytePos( - 129, - ), - ctxt: #0, - }, + span: 112..129#0, value: "{!Array.}", }, }, diff --git a/crates/jsdoc/tests/fixtures/typetag2.debug b/crates/jsdoc/tests/fixtures/typetag2.debug index 4a946bc433c7..666d7629e038 100644 --- a/crates/jsdoc/tests/fixtures/typetag2.debug +++ b/crates/jsdoc/tests/fixtures/typetag2.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, value: "type", }, tag: Type( TypeTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 40, - ), - ctxt: #0, - }, + span: 1..40#0, value: "{(string|number)} A string or a number.", }, }, diff --git a/crates/jsdoc/tests/fixtures/typetaginline.debug b/crates/jsdoc/tests/fixtures/typetaginline.debug index 5e8b6a7c7308..f63e5d3afb46 100644 --- a/crates/jsdoc/tests/fixtures/typetaginline.debug +++ b/crates/jsdoc/tests/fixtures/typetaginline.debug @@ -1,94 +1,30 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 23, - ), - ctxt: #0, - }, + span: 1..23#0, value: "Inline type info only.", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 53, - ), - hi: BytePos( - 62, - ), - ctxt: #0, - }, + span: 53..62#0, description: Text { - span: Span { - lo: BytePos( - 53, - ), - hi: BytePos( - 53, - ), - ctxt: #0, - }, + span: 53..53#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 53, - ), - hi: BytePos( - 57, - ), - ctxt: #0, - }, + span: 53..57#0, tag_name: Text { - span: Span { - lo: BytePos( - 53, - ), - hi: BytePos( - 57, - ), - ctxt: #0, - }, + span: 53..57#0, value: "type", }, tag: Type( TypeTag { - span: Span { - lo: BytePos( - 53, - ), - hi: BytePos( - 57, - ), - ctxt: #0, - }, + span: 53..57#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -97,135 +33,47 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 86, - ), - hi: BytePos( - 86, - ), - ctxt: #0, - }, + span: 86..86#0, description: Text { - span: Span { - lo: BytePos( - 86, - ), - hi: BytePos( - 124, - ), - ctxt: #0, - }, + span: 86..124#0, value: "Inline type info that conflicts with `", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 86, - ), - hi: BytePos( - 91, - ), - ctxt: #0, - }, + span: 86..91#0, tag_name: Text { - span: Span { - lo: BytePos( - 86, - ), - hi: BytePos( - 91, - ), - ctxt: #0, - }, + span: 86..91#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 86, - ), - hi: BytePos( - 91, - ), - ctxt: #0, - }, + span: 86..91#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 86, - ), - hi: BytePos( - 89, - ), - ctxt: #0, - }, + span: 86..89#0, value: "tag", }, ), desc: Text { - span: Span { - lo: BytePos( - 86, - ), - hi: BytePos( - 87, - ), - ctxt: #0, - }, + span: 86..87#0, value: "*", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 86, - ), - hi: BytePos( - 91, - ), - ctxt: #0, - }, + span: 86..91#0, tag_name: Text { - span: Span { - lo: BytePos( - 86, - ), - hi: BytePos( - 91, - ), - ctxt: #0, - }, + span: 86..91#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 86, - ), - hi: BytePos( - 91, - ), - ctxt: #0, - }, + span: 86..91#0, ty: Some( Text { - span: Span { - lo: BytePos( - 86, - ), - hi: BytePos( - 137, - ), - ctxt: #0, - }, + span: 86..137#0, value: "* @param {number} candyId - The candy's identifier.", }, ), @@ -236,71 +84,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 233, - ), - hi: BytePos( - 242, - ), - ctxt: #0, - }, + span: 233..242#0, description: Text { - span: Span { - lo: BytePos( - 233, - ), - hi: BytePos( - 233, - ), - ctxt: #0, - }, + span: 233..233#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 233, - ), - hi: BytePos( - 237, - ), - ctxt: #0, - }, + span: 233..237#0, tag_name: Text { - span: Span { - lo: BytePos( - 233, - ), - hi: BytePos( - 237, - ), - ctxt: #0, - }, + span: 233..237#0, value: "type", }, tag: Type( TypeTag { - span: Span { - lo: BytePos( - 233, - ), - hi: BytePos( - 237, - ), - ctxt: #0, - }, + span: 233..237#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -309,86 +109,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 268, - ), - hi: BytePos( - 268, - ), - ctxt: #0, - }, + span: 268..268#0, description: Text { - span: Span { - lo: BytePos( - 268, - ), - hi: BytePos( - 314, - ), - ctxt: #0, - }, + span: 268..314#0, value: "Inline type info for leading param only.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 268, - ), - hi: BytePos( - 273, - ), - ctxt: #0, - }, + span: 268..273#0, tag_name: Text { - span: Span { - lo: BytePos( - 268, - ), - hi: BytePos( - 273, - ), - ctxt: #0, - }, + span: 268..273#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 268, - ), - hi: BytePos( - 273, - ), - ctxt: #0, - }, + span: 268..273#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 268, - ), - hi: BytePos( - 276, - ), - ctxt: #0, - }, + span: 268..276#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 268, - ), - hi: BytePos( - 272, - ), - ctxt: #0, - }, + span: 268..272#0, value: "item", }, }, @@ -397,71 +141,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 364, - ), - hi: BytePos( - 376, - ), - ctxt: #0, - }, + span: 364..376#0, description: Text { - span: Span { - lo: BytePos( - 364, - ), - hi: BytePos( - 364, - ), - ctxt: #0, - }, + span: 364..364#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 364, - ), - hi: BytePos( - 368, - ), - ctxt: #0, - }, + span: 364..368#0, tag_name: Text { - span: Span { - lo: BytePos( - 364, - ), - hi: BytePos( - 368, - ), - ctxt: #0, - }, + span: 364..368#0, value: "type", }, tag: Type( TypeTag { - span: Span { - lo: BytePos( - 364, - ), - hi: BytePos( - 368, - ), - ctxt: #0, - }, + span: 364..368#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -470,86 +166,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 410, - ), - hi: BytePos( - 410, - ), - ctxt: #0, - }, + span: 410..410#0, description: Text { - span: Span { - lo: BytePos( - 410, - ), - hi: BytePos( - 457, - ), - ctxt: #0, - }, + span: 410..457#0, value: "Inline type info for trailing param only.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 410, - ), - hi: BytePos( - 415, - ), - ctxt: #0, - }, + span: 410..415#0, tag_name: Text { - span: Span { - lo: BytePos( - 410, - ), - hi: BytePos( - 415, - ), - ctxt: #0, - }, + span: 410..415#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 410, - ), - hi: BytePos( - 415, - ), - ctxt: #0, - }, + span: 410..415#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 410, - ), - hi: BytePos( - 421, - ), - ctxt: #0, - }, + span: 410..421#0, value: "{Dispenser}", }, ), desc: Text { - span: Span { - lo: BytePos( - 410, - ), - hi: BytePos( - 419, - ), - ctxt: #0, - }, + span: 410..419#0, value: "dispenser", }, }, @@ -558,71 +198,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 524, - ), - hi: BytePos( - 533, - ), - ctxt: #0, - }, + span: 524..533#0, description: Text { - span: Span { - lo: BytePos( - 524, - ), - hi: BytePos( - 524, - ), - ctxt: #0, - }, + span: 524..524#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 524, - ), - hi: BytePos( - 528, - ), - ctxt: #0, - }, + span: 524..528#0, tag_name: Text { - span: Span { - lo: BytePos( - 524, - ), - hi: BytePos( - 528, - ), - ctxt: #0, - }, + span: 524..528#0, value: "type", }, tag: Type( TypeTag { - span: Span { - lo: BytePos( - 524, - ), - hi: BytePos( - 528, - ), - ctxt: #0, - }, + span: 524..528#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -631,212 +223,76 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 559, - ), - hi: BytePos( - 559, - ), - ctxt: #0, - }, + span: 559..559#0, description: Text { - span: Span { - lo: BytePos( - 559, - ), - hi: BytePos( - 603, - ), - ctxt: #0, - }, + span: 559..603#0, value: "Inline type info for inner param only.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 559, - ), - hi: BytePos( - 564, - ), - ctxt: #0, - }, + span: 559..564#0, tag_name: Text { - span: Span { - lo: BytePos( - 559, - ), - hi: BytePos( - 564, - ), - ctxt: #0, - }, + span: 559..564#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 559, - ), - hi: BytePos( - 564, - ), - ctxt: #0, - }, + span: 559..564#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 559, - ), - hi: BytePos( - 570, - ), - ctxt: #0, - }, + span: 559..570#0, value: "{Dispenser}", }, ), desc: Text { - span: Span { - lo: BytePos( - 559, - ), - hi: BytePos( - 568, - ), - ctxt: #0, - }, + span: 559..568#0, value: "dispenser", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 559, - ), - hi: BytePos( - 564, - ), - ctxt: #0, - }, + span: 559..564#0, tag_name: Text { - span: Span { - lo: BytePos( - 559, - ), - hi: BytePos( - 564, - ), - ctxt: #0, - }, + span: 559..564#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 559, - ), - hi: BytePos( - 564, - ), - ctxt: #0, - }, + span: 559..564#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 559, - ), - hi: BytePos( - 567, - ), - ctxt: #0, - }, + span: 559..567#0, value: "{number}", }, ), desc: Text { - span: Span { - lo: BytePos( - 559, - ), - hi: BytePos( - 564, - ), - ctxt: #0, - }, + span: 559..564#0, value: "shade", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 559, - ), - hi: BytePos( - 564, - ), - ctxt: #0, - }, + span: 559..564#0, tag_name: Text { - span: Span { - lo: BytePos( - 559, - ), - hi: BytePos( - 564, - ), - ctxt: #0, - }, + span: 559..564#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 559, - ), - hi: BytePos( - 564, - ), - ctxt: #0, - }, + span: 559..564#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 559, - ), - hi: BytePos( - 567, - ), - ctxt: #0, - }, + span: 559..567#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 559, - ), - hi: BytePos( - 564, - ), - ctxt: #0, - }, + span: 559..564#0, value: "brand", }, }, @@ -845,71 +301,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 720, - ), - hi: BytePos( - 728, - ), - ctxt: #0, - }, + span: 720..728#0, description: Text { - span: Span { - lo: BytePos( - 720, - ), - hi: BytePos( - 720, - ), - ctxt: #0, - }, + span: 720..720#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 720, - ), - hi: BytePos( - 724, - ), - ctxt: #0, - }, + span: 720..724#0, tag_name: Text { - span: Span { - lo: BytePos( - 720, - ), - hi: BytePos( - 724, - ), - ctxt: #0, - }, + span: 720..724#0, value: "type", }, tag: Type( TypeTag { - span: Span { - lo: BytePos( - 720, - ), - hi: BytePos( - 724, - ), - ctxt: #0, - }, + span: 720..724#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, diff --git a/crates/jsdoc/tests/fixtures/typetagwithnewline.debug b/crates/jsdoc/tests/fixtures/typetagwithnewline.debug index e84090444dbd..f2b86f9b9f4b 100644 --- a/crates/jsdoc/tests/fixtures/typetagwithnewline.debug +++ b/crates/jsdoc/tests/fixtures/typetagwithnewline.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "class", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, ty: None, name: None, }, @@ -63,71 +23,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 52, - ), - hi: BytePos( - 80, - ), - ctxt: #0, - }, + span: 52..80#0, description: Text { - span: Span { - lo: BytePos( - 52, - ), - hi: BytePos( - 52, - ), - ctxt: #0, - }, + span: 52..52#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 52, - ), - hi: BytePos( - 56, - ), - ctxt: #0, - }, + span: 52..56#0, tag_name: Text { - span: Span { - lo: BytePos( - 52, - ), - hi: BytePos( - 56, - ), - ctxt: #0, - }, + span: 52..56#0, value: "type", }, tag: Type( TypeTag { - span: Span { - lo: BytePos( - 52, - ), - hi: BytePos( - 56, - ), - ctxt: #0, - }, + span: 52..56#0, name: Text { - span: Span { - lo: BytePos( - 52, - ), - hi: BytePos( - 70, - ), - ctxt: #0, - }, + span: 52..70#0, value: "{(!Array.|", }, }, @@ -136,71 +48,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 144, - ), - hi: BytePos( - 180, - ), - ctxt: #0, - }, + span: 144..180#0, description: Text { - span: Span { - lo: BytePos( - 144, - ), - hi: BytePos( - 144, - ), - ctxt: #0, - }, + span: 144..144#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 144, - ), - hi: BytePos( - 148, - ), - ctxt: #0, - }, + span: 144..148#0, tag_name: Text { - span: Span { - lo: BytePos( - 144, - ), - hi: BytePos( - 148, - ), - ctxt: #0, - }, + span: 144..148#0, value: "type", }, tag: Type( TypeTag { - span: Span { - lo: BytePos( - 144, - ), - hi: BytePos( - 148, - ), - ctxt: #0, - }, + span: 144..148#0, name: Text { - span: Span { - lo: BytePos( - 144, - ), - hi: BytePos( - 186, - ), - ctxt: #0, - }, + span: 144..186#0, value: "(!Array.|!Array.>|", }, }, diff --git a/crates/jsdoc/tests/fixtures/undocumentedtag.debug b/crates/jsdoc/tests/fixtures/undocumentedtag.debug index dceb7d990942..c090226ea168 100644 --- a/crates/jsdoc/tests/fixtures/undocumentedtag.debug +++ b/crates/jsdoc/tests/fixtures/undocumentedtag.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 24, - ), - ctxt: #0, - }, + span: 1..24#0, value: "Undocumented doclet.\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 13, - ), - ctxt: #0, - }, + span: 1..13#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 13, - ), - ctxt: #0, - }, + span: 1..13#0, value: "undocumented", }, tag: Unknown( UnknownTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 13, - ), - ctxt: #0, - }, + span: 1..13#0, extras: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, diff --git a/crates/jsdoc/tests/fixtures/unrestrictedtag.debug b/crates/jsdoc/tests/fixtures/unrestrictedtag.debug index 06051457e58f..c0f22b0524d2 100644 --- a/crates/jsdoc/tests/fixtures/unrestrictedtag.debug +++ b/crates/jsdoc/tests/fixtures/unrestrictedtag.debug @@ -1,71 +1,23 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 1..16#0, value: "My class.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 1..16#0, value: "* @unrestricted", }, ), diff --git a/crates/jsdoc/tests/fixtures/utf8.debug b/crates/jsdoc/tests/fixtures/utf8.debug index 8115a4ef4a08..932281a0b7ac 100644 --- a/crates/jsdoc/tests/fixtures/utf8.debug +++ b/crates/jsdoc/tests/fixtures/utf8.debug @@ -1,71 +1,23 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 67, - ), - ctxt: #0, - }, + span: 1..67#0, value: "* @desc Τεκμηρίωση είναι η επικοινωνία!", }, ), diff --git a/crates/jsdoc/tests/fixtures/var.debug b/crates/jsdoc/tests/fixtures/var.debug index c7a2e7f9114c..9ba3d2535f65 100644 --- a/crates/jsdoc/tests/fixtures/var.debug +++ b/crates/jsdoc/tests/fixtures/var.debug @@ -1,72 +1,24 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, value: "document me", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 55, - ), - hi: BytePos( - 55, - ), - ctxt: #0, - }, + span: 55..55#0, description: Text { - span: Span { - lo: BytePos( - 55, - ), - hi: BytePos( - 66, - ), - ctxt: #0, - }, + span: 55..66#0, value: "document me", }, tags: [], }, JsDoc { - span: Span { - lo: BytePos( - 115, - ), - hi: BytePos( - 115, - ), - ctxt: #0, - }, + span: 115..115#0, description: Text { - span: Span { - lo: BytePos( - 115, - ), - hi: BytePos( - 126, - ), - ctxt: #0, - }, + span: 115..126#0, value: "document me", }, tags: [], diff --git a/crates/jsdoc/tests/fixtures/variations.debug b/crates/jsdoc/tests/fixtures/variations.debug index 04c470b4b155..9a04255f8104 100644 --- a/crates/jsdoc/tests/fixtures/variations.debug +++ b/crates/jsdoc/tests/fixtures/variations.debug @@ -1,71 +1,23 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, value: "namespace", }, tag: Namespace( NamespaceTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 10, - ), - ctxt: #0, - }, + span: 1..10#0, ty: Some( Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, value: "anim", }, ), @@ -76,72 +28,24 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 29, - ), - ctxt: #0, - }, + span: 29..29#0, description: Text { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 29, - ), - ctxt: #0, - }, + span: 29..29#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 35, - ), - ctxt: #0, - }, + span: 29..35#0, tag_name: Text { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 35, - ), - ctxt: #0, - }, + span: 29..35#0, value: "method", }, tag: Function( FunctionTag { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 35, - ), - ctxt: #0, - }, + span: 29..35#0, name: Some( Text { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 43, - ), - ctxt: #0, - }, + span: 29..43#0, value: "anim.fadein(1)", }, ), @@ -149,284 +53,100 @@ ), }, TagItem { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 33, - ), - ctxt: #0, - }, + span: 29..33#0, tag_name: Text { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 33, - ), - ctxt: #0, - }, + span: 29..33#0, value: "desc", }, tag: Description( DescriptionTag { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 33, - ), - ctxt: #0, - }, + span: 29..33#0, text: Text { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 81, - ), - ctxt: #0, - }, + span: 29..81#0, value: "Show the nodelist elements by fading them to opaque.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 34, - ), - ctxt: #0, - }, + span: 29..34#0, tag_name: Text { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 34, - ), - ctxt: #0, - }, + span: 29..34#0, value: "since", }, tag: Since( SinceTag { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 34, - ), - ctxt: #0, - }, + span: 29..34#0, version: Text { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 32, - ), - ctxt: #0, - }, + span: 29..32#0, value: "1.0", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 34, - ), - ctxt: #0, - }, + span: 29..34#0, tag_name: Text { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 34, - ), - ctxt: #0, - }, + span: 29..34#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 34, - ), - ctxt: #0, - }, + span: 29..34#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 37, - ), - ctxt: #0, - }, + span: 29..37#0, value: "{number}", }, ), desc: Text { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 76, - ), - ctxt: #0, - }, + span: 29..76#0, value: "[duration=400] How long the animation will run.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 34, - ), - ctxt: #0, - }, + span: 29..34#0, tag_name: Text { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 34, - ), - ctxt: #0, - }, + span: 29..34#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 34, - ), - ctxt: #0, - }, + span: 29..34#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 39, - ), - ctxt: #0, - }, + span: 29..39#0, value: "{function}", }, ), desc: Text { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 82, - ), - ctxt: #0, - }, + span: 29..82#0, value: "[callback] Called once the animation is complete.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 36, - ), - ctxt: #0, - }, + span: 29..36#0, tag_name: Text { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 36, - ), - ctxt: #0, - }, + span: 29..36#0, value: "returns", }, tag: Return( ReturnTag { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 36, - ), - ctxt: #0, - }, + span: 29..36#0, ty: Some( Text { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 35, - ), - ctxt: #0, - }, + span: 29..35#0, value: "{this}", }, ), description: Text { - span: Span { - lo: BytePos( - 29, - ), - hi: BytePos( - 29, - ), - ctxt: #0, - }, + span: 29..29#0, value: "", }, }, @@ -435,72 +155,24 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 309, - ), - ctxt: #0, - }, + span: 309..309#0, description: Text { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 309, - ), - ctxt: #0, - }, + span: 309..309#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 315, - ), - ctxt: #0, - }, + span: 309..315#0, tag_name: Text { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 315, - ), - ctxt: #0, - }, + span: 309..315#0, value: "method", }, tag: Function( FunctionTag { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 315, - ), - ctxt: #0, - }, + span: 309..315#0, name: Some( Text { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 323, - ), - ctxt: #0, - }, + span: 309..323#0, value: "anim.fadein(2)", }, ), @@ -508,347 +180,123 @@ ), }, TagItem { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 313, - ), - ctxt: #0, - }, + span: 309..313#0, tag_name: Text { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 313, - ), - ctxt: #0, - }, + span: 309..313#0, value: "desc", }, tag: Description( DescriptionTag { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 313, - ), - ctxt: #0, - }, + span: 309..313#0, text: Text { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 361, - ), - ctxt: #0, - }, + span: 309..361#0, value: "Show the nodelist elements by fading them to opaque.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 314, - ), - ctxt: #0, - }, + span: 309..314#0, tag_name: Text { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 314, - ), - ctxt: #0, - }, + span: 309..314#0, value: "since", }, tag: Since( SinceTag { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 314, - ), - ctxt: #0, - }, + span: 309..314#0, version: Text { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 314, - ), - ctxt: #0, - }, + span: 309..314#0, value: "1.4.3", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 314, - ), - ctxt: #0, - }, + span: 309..314#0, tag_name: Text { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 314, - ), - ctxt: #0, - }, + span: 309..314#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 314, - ), - ctxt: #0, - }, + span: 309..314#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 317, - ), - ctxt: #0, - }, + span: 309..317#0, value: "{number}", }, ), desc: Text { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 356, - ), - ctxt: #0, - }, + span: 309..356#0, value: "[duration=400] How long the animation will run.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 314, - ), - ctxt: #0, - }, + span: 309..314#0, tag_name: Text { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 314, - ), - ctxt: #0, - }, + span: 309..314#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 314, - ), - ctxt: #0, - }, + span: 309..314#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 317, - ), - ctxt: #0, - }, + span: 309..317#0, value: "{string}", }, ), desc: Text { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 363, - ), - ctxt: #0, - }, + span: 309..363#0, value: "[easing=swing] The easing function for the transition.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 314, - ), - ctxt: #0, - }, + span: 309..314#0, tag_name: Text { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 314, - ), - ctxt: #0, - }, + span: 309..314#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 314, - ), - ctxt: #0, - }, + span: 309..314#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 319, - ), - ctxt: #0, - }, + span: 309..319#0, value: "{function}", }, ), desc: Text { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 362, - ), - ctxt: #0, - }, + span: 309..362#0, value: "[callback] Called once the animation is complete.", }, }, ), }, TagItem { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 316, - ), - ctxt: #0, - }, + span: 309..316#0, tag_name: Text { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 316, - ), - ctxt: #0, - }, + span: 309..316#0, value: "returns", }, tag: Return( ReturnTag { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 316, - ), - ctxt: #0, - }, + span: 309..316#0, ty: Some( Text { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 315, - ), - ctxt: #0, - }, + span: 309..315#0, value: "{this}", }, ), description: Text { - span: Span { - lo: BytePos( - 309, - ), - hi: BytePos( - 309, - ), - ctxt: #0, - }, + span: 309..309#0, value: "", }, }, diff --git a/crates/jsdoc/tests/fixtures/variationtag.debug b/crates/jsdoc/tests/fixtures/variationtag.debug index 0905ad6072c4..40f331b7f21b 100644 --- a/crates/jsdoc/tests/fixtures/variationtag.debug +++ b/crates/jsdoc/tests/fixtures/variationtag.debug @@ -1,60 +1,20 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 12, - ), - ctxt: #0, - }, + span: 1..12#0, ty: None, name: None, }, @@ -63,72 +23,24 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 53, - ), - hi: BytePos( - 53, - ), - ctxt: #0, - }, + span: 53..53#0, description: Text { - span: Span { - lo: BytePos( - 53, - ), - hi: BytePos( - 53, - ), - ctxt: #0, - }, + span: 53..53#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 53, - ), - hi: BytePos( - 64, - ), - ctxt: #0, - }, + span: 53..64#0, tag_name: Text { - span: Span { - lo: BytePos( - 53, - ), - hi: BytePos( - 64, - ), - ctxt: #0, - }, + span: 53..64#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 53, - ), - hi: BytePos( - 64, - ), - ctxt: #0, - }, + span: 53..64#0, ty: Some( Text { - span: Span { - lo: BytePos( - 53, - ), - hi: BytePos( - 67, - ), - ctxt: #0, - }, + span: 53..67#0, value: "* @variation 2", }, ), @@ -139,72 +51,24 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 121, - ), - hi: BytePos( - 121, - ), - ctxt: #0, - }, + span: 121..121#0, description: Text { - span: Span { - lo: BytePos( - 121, - ), - hi: BytePos( - 121, - ), - ctxt: #0, - }, + span: 121..121#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 121, - ), - hi: BytePos( - 132, - ), - ctxt: #0, - }, + span: 121..132#0, tag_name: Text { - span: Span { - lo: BytePos( - 121, - ), - hi: BytePos( - 132, - ), - ctxt: #0, - }, + span: 121..132#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 121, - ), - hi: BytePos( - 132, - ), - ctxt: #0, - }, + span: 121..132#0, ty: Some( Text { - span: Span { - lo: BytePos( - 121, - ), - hi: BytePos( - 137, - ), - ctxt: #0, - }, + span: 121..137#0, value: "* @variation (3)", }, ), @@ -215,82 +79,26 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 192, - ), - hi: BytePos( - 196, - ), - ctxt: #0, - }, + span: 192..196#0, description: Text { - span: Span { - lo: BytePos( - 192, - ), - hi: BytePos( - 192, - ), - ctxt: #0, - }, + span: 192..192#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 192, - ), - hi: BytePos( - 200, - ), - ctxt: #0, - }, + span: 192..200#0, tag_name: Text { - span: Span { - lo: BytePos( - 192, - ), - hi: BytePos( - 200, - ), - ctxt: #0, - }, + span: 192..200#0, value: "memberof", }, tag: MemberOf( MemberOfTag { - span: Span { - lo: BytePos( - 192, - ), - hi: BytePos( - 200, - ), - ctxt: #0, - }, + span: 192..200#0, parent_name_path: NamePath { - span: Span { - lo: BytePos( - 192, - ), - hi: BytePos( - 196, - ), - ctxt: #0, - }, + span: 192..196#0, components: [ Text { - span: Span { - lo: BytePos( - 192, - ), - hi: BytePos( - 202, - ), - ctxt: #0, - }, + span: 192..202#0, value: "someObject", }, ], diff --git a/crates/jsdoc/tests/fixtures/versiontag.debug b/crates/jsdoc/tests/fixtures/versiontag.debug index b8f979bed416..55e42438ab30 100644 --- a/crates/jsdoc/tests/fixtures/versiontag.debug +++ b/crates/jsdoc/tests/fixtures/versiontag.debug @@ -1,70 +1,22 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, value: "version", }, tag: Version( VersionTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 8, - ), - ctxt: #0, - }, + span: 1..8#0, value: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 6, - ), - ctxt: #0, - }, + span: 1..6#0, value: "1.2.3", }, }, diff --git a/crates/jsdoc/tests/fixtures/virtual.debug b/crates/jsdoc/tests/fixtures/virtual.debug index 556fa960795a..49a523afa5aa 100644 --- a/crates/jsdoc/tests/fixtures/virtual.debug +++ b/crates/jsdoc/tests/fixtures/virtual.debug @@ -1,81 +1,25 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, value: "name", }, tag: Name( NameTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 5, - ), - ctxt: #0, - }, + span: 1..5#0, name_path: NamePath { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, components: [ Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 11, - ), - ctxt: #0, - }, + span: 1..11#0, value: "dimensions", }, ], diff --git a/crates/jsdoc/tests/fixtures/virtual2.debug b/crates/jsdoc/tests/fixtures/virtual2.debug index 0d341fe6055b..e19c4a797863 100644 --- a/crates/jsdoc/tests/fixtures/virtual2.debug +++ b/crates/jsdoc/tests/fixtures/virtual2.debug @@ -1,81 +1,25 @@ [ JsDoc { - span: Span { - lo: BytePos( - 28, - ), - hi: BytePos( - 38, - ), - ctxt: #0, - }, + span: 28..38#0, description: Text { - span: Span { - lo: BytePos( - 28, - ), - hi: BytePos( - 28, - ), - ctxt: #0, - }, + span: 28..28#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 28, - ), - hi: BytePos( - 33, - ), - ctxt: #0, - }, + span: 28..33#0, tag_name: Text { - span: Span { - lo: BytePos( - 28, - ), - hi: BytePos( - 33, - ), - ctxt: #0, - }, + span: 28..33#0, value: "lends", }, tag: Lends( LendsTag { - span: Span { - lo: BytePos( - 28, - ), - hi: BytePos( - 33, - ), - ctxt: #0, - }, + span: 28..33#0, name: NamePath { - span: Span { - lo: BytePos( - 28, - ), - hi: BytePos( - 38, - ), - ctxt: #0, - }, + span: 28..38#0, components: [ Text { - span: Span { - lo: BytePos( - 28, - ), - hi: BytePos( - 34, - ), - ctxt: #0, - }, + span: 28..34#0, value: "Person", }, ], @@ -86,71 +30,23 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 65, - ), - hi: BytePos( - 72, - ), - ctxt: #0, - }, + span: 65..72#0, description: Text { - span: Span { - lo: BytePos( - 65, - ), - hi: BytePos( - 65, - ), - ctxt: #0, - }, + span: 65..65#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 65, - ), - hi: BytePos( - 75, - ), - ctxt: #0, - }, + span: 65..75#0, tag_name: Text { - span: Span { - lo: BytePos( - 65, - ), - hi: BytePos( - 75, - ), - ctxt: #0, - }, + span: 65..75#0, value: "constructs", }, tag: Constructs( ConstructsTag { - span: Span { - lo: BytePos( - 65, - ), - hi: BytePos( - 75, - ), - ctxt: #0, - }, + span: 65..75#0, name: Text { - span: Span { - lo: BytePos( - 0, - ), - hi: BytePos( - 0, - ), - ctxt: #0, - }, + span: 0..0#0, value: "", }, }, @@ -159,82 +55,26 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 162, - ), - hi: BytePos( - 293, - ), - ctxt: #0, - }, + span: 162..293#0, description: Text { - span: Span { - lo: BytePos( - 162, - ), - hi: BytePos( - 195, - ), - ctxt: #0, - }, + span: 162..195#0, value: "Callback for `say`.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 162, - ), - hi: BytePos( - 170, - ), - ctxt: #0, - }, + span: 162..170#0, tag_name: Text { - span: Span { - lo: BytePos( - 162, - ), - hi: BytePos( - 170, - ), - ctxt: #0, - }, + span: 162..170#0, value: "callback", }, tag: Callback( CallbackTag { - span: Span { - lo: BytePos( - 162, - ), - hi: BytePos( - 170, - ), - ctxt: #0, - }, + span: 162..170#0, name_path: NamePath { - span: Span { - lo: BytePos( - 162, - ), - hi: BytePos( - 293, - ), - ctxt: #0, - }, + span: 162..293#0, components: [ Text { - span: Span { - lo: BytePos( - 162, - ), - hi: BytePos( - 168, - ), - ctxt: #0, - }, + span: 162..168#0, value: "Person", }, ], @@ -245,86 +85,30 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 362, - ), - hi: BytePos( - 362, - ), - ctxt: #0, - }, + span: 362..362#0, description: Text { - span: Span { - lo: BytePos( - 362, - ), - hi: BytePos( - 407, - ), - ctxt: #0, - }, + span: 362..407#0, value: "Speak a message asynchronously.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 362, - ), - hi: BytePos( - 367, - ), - ctxt: #0, - }, + span: 362..367#0, tag_name: Text { - span: Span { - lo: BytePos( - 362, - ), - hi: BytePos( - 367, - ), - ctxt: #0, - }, + span: 362..367#0, value: "param", }, tag: Parameter( ParameterTag { - span: Span { - lo: BytePos( - 362, - ), - hi: BytePos( - 367, - ), - ctxt: #0, - }, + span: 362..367#0, name: None, ty: Some( Text { - span: Span { - lo: BytePos( - 362, - ), - hi: BytePos( - 382, - ), - ctxt: #0, - }, + span: 362..382#0, value: "{Person~sayCallback}", }, ), desc: Text { - span: Span { - lo: BytePos( - 362, - ), - hi: BytePos( - 364, - ), - ctxt: #0, - }, + span: 362..364#0, value: "cb", }, }, diff --git a/crates/jsdoc/tests/fixtures/virtual3.debug b/crates/jsdoc/tests/fixtures/virtual3.debug index 0eb501c7894c..68a7974c6ebc 100644 --- a/crates/jsdoc/tests/fixtures/virtual3.debug +++ b/crates/jsdoc/tests/fixtures/virtual3.debug @@ -1,82 +1,26 @@ [ JsDoc { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 87, - ), - ctxt: #0, - }, + span: 1..87#0, description: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, tag_name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, value: "module", }, tag: Module( ModuleTag { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 7, - ), - ctxt: #0, - }, + span: 1..7#0, name: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 1, - ), - ctxt: #0, - }, + span: 1..1#0, value: "", }, ty: Text { - span: Span { - lo: BytePos( - 1, - ), - hi: BytePos( - 11, - ), - ctxt: #0, - }, + span: 1..11#0, value: "connection", }, }, @@ -85,72 +29,24 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 113, - ), - hi: BytePos( - 113, - ), - ctxt: #0, - }, + span: 113..113#0, description: Text { - span: Span { - lo: BytePos( - 113, - ), - hi: BytePos( - 113, - ), - ctxt: #0, - }, + span: 113..113#0, value: "", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 113, - ), - hi: BytePos( - 124, - ), - ctxt: #0, - }, + span: 113..124#0, tag_name: Text { - span: Span { - lo: BytePos( - 113, - ), - hi: BytePos( - 124, - ), - ctxt: #0, - }, + span: 113..124#0, value: "constructor", }, tag: Class( ClassTag { - span: Span { - lo: BytePos( - 113, - ), - hi: BytePos( - 124, - ), - ctxt: #0, - }, + span: 113..124#0, ty: Some( Text { - span: Span { - lo: BytePos( - 113, - ), - hi: BytePos( - 130, - ), - ctxt: #0, - }, + span: 113..130#0, value: "module:connection", }, ), diff --git a/crates/jsdoc/tests/fixtures/yieldstag.debug b/crates/jsdoc/tests/fixtures/yieldstag.debug index 0c33b8ae7bfc..fae0321f90b6 100644 --- a/crates/jsdoc/tests/fixtures/yieldstag.debug +++ b/crates/jsdoc/tests/fixtures/yieldstag.debug @@ -1,84 +1,28 @@ [ JsDoc { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 16, - ), - ctxt: #0, - }, + span: 16..16#0, description: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 65, - ), - ctxt: #0, - }, + span: 16..65#0, value: "Generate the Fibonacci sequence of numbers.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 22, - ), - ctxt: #0, - }, + span: 16..22#0, tag_name: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 22, - ), - ctxt: #0, - }, + span: 16..22#0, value: "yields", }, tag: Yield( YieldTag { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 22, - ), - ctxt: #0, - }, + span: 16..22#0, value: Some( Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 24, - ), - ctxt: #0, - }, + span: 16..24#0, value: "{number}", }, ), description: Text { - span: Span { - lo: BytePos( - 16, - ), - hi: BytePos( - 58, - ), - ctxt: #0, - }, + span: 16..58#0, value: "The next number in the Fibonacci sequence.", }, }, @@ -87,85 +31,29 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 163, - ), - hi: BytePos( - 163, - ), - ctxt: #0, - }, + span: 163..163#0, description: Text { - span: Span { - lo: BytePos( - 163, - ), - hi: BytePos( - 212, - ), - ctxt: #0, - }, + span: 163..212#0, value: "Generate the Fibonacci sequence of numbers.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 163, - ), - hi: BytePos( - 169, - ), - ctxt: #0, - }, + span: 163..169#0, tag_name: Text { - span: Span { - lo: BytePos( - 163, - ), - hi: BytePos( - 169, - ), - ctxt: #0, - }, + span: 163..169#0, value: "yields", }, tag: Yield( YieldTag { - span: Span { - lo: BytePos( - 163, - ), - hi: BytePos( - 169, - ), - ctxt: #0, - }, + span: 163..169#0, value: Some( Text { - span: Span { - lo: BytePos( - 163, - ), - hi: BytePos( - 166, - ), - ctxt: #0, - }, + span: 163..166#0, value: "The", }, ), description: Text { - span: Span { - lo: BytePos( - 163, - ), - hi: BytePos( - 201, - ), - ctxt: #0, - }, + span: 163..201#0, value: "next number in the Fibonacci sequence.", }, }, @@ -174,85 +62,29 @@ ], }, JsDoc { - span: Span { - lo: BytePos( - 302, - ), - hi: BytePos( - 302, - ), - ctxt: #0, - }, + span: 302..302#0, description: Text { - span: Span { - lo: BytePos( - 302, - ), - hi: BytePos( - 351, - ), - ctxt: #0, - }, + span: 302..351#0, value: "Generate the Fibonacci sequence of numbers.\n *\n *", }, tags: [ TagItem { - span: Span { - lo: BytePos( - 302, - ), - hi: BytePos( - 308, - ), - ctxt: #0, - }, + span: 302..308#0, tag_name: Text { - span: Span { - lo: BytePos( - 302, - ), - hi: BytePos( - 308, - ), - ctxt: #0, - }, + span: 302..308#0, value: "yields", }, tag: Yield( YieldTag { - span: Span { - lo: BytePos( - 302, - ), - hi: BytePos( - 308, - ), - ctxt: #0, - }, + span: 302..308#0, value: Some( Text { - span: Span { - lo: BytePos( - 302, - ), - hi: BytePos( - 310, - ), - ctxt: #0, - }, + span: 302..310#0, value: "{number}", }, ), description: Text { - span: Span { - lo: BytePos( - 302, - ), - hi: BytePos( - 302, - ), - ctxt: #0, - }, + span: 302..302#0, value: "", }, }, diff --git a/crates/swc_common/src/syntax_pos.rs b/crates/swc_common/src/syntax_pos.rs index 9bcf9199167c..0e5bbbd5043c 100644 --- a/crates/swc_common/src/syntax_pos.rs +++ b/crates/swc_common/src/syntax_pos.rs @@ -29,7 +29,7 @@ pub mod hygiene; /// able to use many of the functions on spans in `source_map` and you cannot /// assume that the length of the `span = hi - lo`; there may be space in the /// `BytePos` range between files. -#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq, Ord, PartialOrd, Serialize, Deserialize)] +#[derive(Clone, Copy, Hash, PartialEq, Eq, Ord, PartialOrd, Serialize, Deserialize)] #[cfg_attr( any(feature = "rkyv-impl"), derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize) @@ -49,6 +49,12 @@ pub struct Span { pub ctxt: SyntaxContext, } +impl std::fmt::Debug for Span { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}..{}{:?}", self.lo.0, self.hi.0, self.ctxt) + } +} + impl From<(BytePos, BytePos)> for Span { #[inline] fn from(sp: (BytePos, BytePos)) -> Self { diff --git a/crates/swc_ecma_parser/tests/shifted/empty-with-comments/input.ts.comments b/crates/swc_ecma_parser/tests/shifted/empty-with-comments/input.ts.comments index 0cd98a4ae11f..ef87a141cecc 100644 --- a/crates/swc_ecma_parser/tests/shifted/empty-with-comments/input.ts.comments +++ b/crates/swc_ecma_parser/tests/shifted/empty-with-comments/input.ts.comments @@ -6,15 +6,7 @@ SingleThreadedComments { ): [ Comment { kind: Line, - span: Span { - lo: BytePos( - 2, - ), - hi: BytePos( - 9, - ), - ctxt: #0, - }, + span: 2..9#0, text: "/ ref", }, ], diff --git a/crates/swc_ecma_parser/tests/typescript/custom/issue-236/input.ts.stdout b/crates/swc_ecma_parser/tests/typescript/custom/issue-236/input.ts.stdout deleted file mode 100644 index 30dbcdc682fd..000000000000 --- a/crates/swc_ecma_parser/tests/typescript/custom/issue-236/input.ts.stdout +++ /dev/null @@ -1,426 +0,0 @@ -Module { - span: Span { - lo: BytePos( - 0 - ), - hi: BytePos( - 171 - ), - ctxt: #0 - }, - body: [ - ModuleDecl( - ExportDecl( - Fn( - FnDecl { - ident: Ident { - sym: DirectiveIserviceIdPrefixController, - span: Span { - lo: BytePos( - 16 - ), - hi: BytePos( - 51 - ), - ctxt: #0 - }, - type_ann: None, - optional: false - }, - declare: false, - function: Function { - params: [ - Ident( - Ident { - sym: this, - span: Span { - lo: BytePos( - 52 - ), - hi: BytePos( - 56 - ), - ctxt: #0 - }, - type_ann: Some( - TsTypeAnn { - span: Span { - lo: BytePos( - 56 - ), - hi: BytePos( - 61 - ), - ctxt: #0 - }, - type_ann: TsKeywordType( - TsKeywordType { - span: Span { - lo: BytePos( - 58 - ), - hi: BytePos( - 61 - ), - ctxt: #0 - }, - kind: TsAnyKeyword - } - ) - } - ), - optional: false - } - ), - Ident( - Ident { - sym: $scope, - span: Span { - lo: BytePos( - 63 - ), - hi: BytePos( - 69 - ), - ctxt: #0 - }, - type_ann: Some( - TsTypeAnn { - span: Span { - lo: BytePos( - 69 - ), - hi: BytePos( - 85 - ), - ctxt: #0 - }, - type_ann: TsTypeRef( - TsTypeRef { - span: Span { - lo: BytePos( - 71 - ), - hi: BytePos( - 85 - ), - ctxt: #0 - }, - type_name: TsQualifiedName( - TsQualifiedName { - left: Ident( - Ident { - sym: angular, - span: Span { - lo: BytePos( - 71 - ), - hi: BytePos( - 78 - ), - ctxt: #0 - }, - type_ann: None, - optional: false - } - ), - right: Ident { - sym: IScope, - span: Span { - lo: BytePos( - 79 - ), - hi: BytePos( - 85 - ), - ctxt: #0 - }, - type_ann: None, - optional: false - } - } - ), - type_params: None - } - ) - } - ), - optional: false - } - ), - Ident( - Ident { - sym: $attrs, - span: Span { - lo: BytePos( - 87 - ), - hi: BytePos( - 93 - ), - ctxt: #0 - }, - type_ann: Some( - TsTypeAnn { - span: Span { - lo: BytePos( - 93 - ), - hi: BytePos( - 114 - ), - ctxt: #0 - }, - type_ann: TsTypeRef( - TsTypeRef { - span: Span { - lo: BytePos( - 95 - ), - hi: BytePos( - 114 - ), - ctxt: #0 - }, - type_name: TsQualifiedName( - TsQualifiedName { - left: Ident( - Ident { - sym: angular, - span: Span { - lo: BytePos( - 95 - ), - hi: BytePos( - 102 - ), - ctxt: #0 - }, - type_ann: None, - optional: false - } - ), - right: Ident { - sym: IAttributes, - span: Span { - lo: BytePos( - 103 - ), - hi: BytePos( - 114 - ), - ctxt: #0 - }, - type_ann: None, - optional: false - } - } - ), - type_params: None - } - ) - } - ), - optional: false - } - ) - ], - decorators: [], - span: Span { - lo: BytePos( - 7 - ), - hi: BytePos( - 171 - ), - ctxt: #0 - }, - body: Some( - BlockStmt { - span: Span { - lo: BytePos( - 116 - ), - hi: BytePos( - 171 - ), - ctxt: #0 - }, - stmts: [ - Expr( - Assign( - AssignExpr { - span: Span { - lo: BytePos( - 122 - ), - hi: BytePos( - 142 - ), - ctxt: #0 - }, - op: "=", - left: Pat( - Expr( - Member( - MemberExpr { - span: Span { - lo: BytePos( - 126 - ), - hi: BytePos( - 133 - ), - ctxt: #0 - }, - obj: Expr( - This( - ThisExpr { - span: Span { - lo: BytePos( - 122 - ), - hi: BytePos( - 126 - ), - ctxt: #0 - } - } - ) - ), - prop: Ident( - Ident { - sym: $scope, - span: Span { - lo: BytePos( - 127 - ), - hi: BytePos( - 133 - ), - ctxt: #0 - }, - type_ann: None, - optional: false - } - ), - computed: false - } - ) - ) - ), - right: Ident( - Ident { - sym: $scope, - span: Span { - lo: BytePos( - 136 - ), - hi: BytePos( - 142 - ), - ctxt: #0 - }, - type_ann: None, - optional: false - } - ) - } - ) - ), - Expr( - Assign( - AssignExpr { - span: Span { - lo: BytePos( - 148 - ), - hi: BytePos( - 168 - ), - ctxt: #0 - }, - op: "=", - left: Pat( - Expr( - Member( - MemberExpr { - span: Span { - lo: BytePos( - 152 - ), - hi: BytePos( - 159 - ), - ctxt: #0 - }, - obj: Expr( - This( - ThisExpr { - span: Span { - lo: BytePos( - 148 - ), - hi: BytePos( - 152 - ), - ctxt: #0 - } - } - ) - ), - prop: Ident( - Ident { - sym: $attrs, - span: Span { - lo: BytePos( - 153 - ), - hi: BytePos( - 159 - ), - ctxt: #0 - }, - type_ann: None, - optional: false - } - ), - computed: false - } - ) - ) - ), - right: Ident( - Ident { - sym: $attrs, - span: Span { - lo: BytePos( - 162 - ), - hi: BytePos( - 168 - ), - ctxt: #0 - }, - type_ann: None, - optional: false - } - ) - } - ) - ) - ] - } - ), - is_generator: false, - is_async: false, - type_params: None, - return_type: None - } - } - ) - ) - ) - ], - shebang: None -} From 82d1b8e49a242b677d6df259163469cfd1d360c7 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Sun, 17 Mar 2024 13:04:54 +0000 Subject: [PATCH 003/172] chore: Bump crates --- CHANGELOG.md | 14 +- Cargo.lock | 158 +++++++++--------- crates/binding_macros/Cargo.toml | 12 +- crates/dbg-swc/Cargo.toml | 20 +-- crates/jsdoc/Cargo.toml | 10 +- crates/swc/Cargo.toml | 52 +++--- crates/swc_bundler/Cargo.toml | 36 ++-- crates/swc_cli_impl/Cargo.toml | 4 +- crates/swc_common/Cargo.toml | 2 +- crates/swc_compiler_base/Cargo.toml | 16 +- crates/swc_core/Cargo.toml | 74 ++++---- crates/swc_css/Cargo.toml | 20 +-- crates/swc_css_ast/Cargo.toml | 4 +- crates/swc_css_codegen/Cargo.toml | 16 +- crates/swc_css_compat/Cargo.toml | 16 +- crates/swc_css_lints/Cargo.toml | 12 +- crates/swc_css_minifier/Cargo.toml | 16 +- crates/swc_css_modules/Cargo.toml | 16 +- crates/swc_css_parser/Cargo.toml | 12 +- crates/swc_css_prefixer/Cargo.toml | 16 +- crates/swc_css_utils/Cargo.toml | 8 +- crates/swc_css_visit/Cargo.toml | 6 +- crates/swc_ecma_ast/Cargo.toml | 4 +- crates/swc_ecma_codegen/Cargo.toml | 14 +- crates/swc_ecma_compat_bugfixes/Cargo.toml | 18 +- crates/swc_ecma_compat_common/Cargo.toml | 10 +- crates/swc_ecma_compat_es2015/Cargo.toml | 20 +-- crates/swc_ecma_compat_es2016/Cargo.toml | 16 +- crates/swc_ecma_compat_es2017/Cargo.toml | 16 +- crates/swc_ecma_compat_es2018/Cargo.toml | 18 +- crates/swc_ecma_compat_es2019/Cargo.toml | 16 +- crates/swc_ecma_compat_es2020/Cargo.toml | 18 +- crates/swc_ecma_compat_es2021/Cargo.toml | 12 +- crates/swc_ecma_compat_es2022/Cargo.toml | 16 +- crates/swc_ecma_compat_es3/Cargo.toml | 16 +- crates/swc_ecma_ext_transforms/Cargo.toml | 10 +- crates/swc_ecma_lints/Cargo.toml | 18 +- crates/swc_ecma_loader/Cargo.toml | 4 +- crates/swc_ecma_minifier/Cargo.toml | 26 +-- crates/swc_ecma_parser/Cargo.toml | 14 +- crates/swc_ecma_preset_env/Cargo.toml | 18 +- crates/swc_ecma_quote/Cargo.toml | 10 +- crates/swc_ecma_quote_macros/Cargo.toml | 8 +- crates/swc_ecma_testing/Cargo.toml | 4 +- crates/swc_ecma_transforms/Cargo.toml | 32 ++-- crates/swc_ecma_transforms_base/Cargo.toml | 16 +- crates/swc_ecma_transforms_classes/Cargo.toml | 12 +- crates/swc_ecma_transforms_compat/Cargo.toml | 42 ++--- crates/swc_ecma_transforms_module/Cargo.toml | 24 +-- .../Cargo.toml | 30 ++-- .../swc_ecma_transforms_proposal/Cargo.toml | 24 +-- crates/swc_ecma_transforms_react/Cargo.toml | 24 +-- crates/swc_ecma_transforms_testing/Cargo.toml | 20 +-- .../swc_ecma_transforms_typescript/Cargo.toml | 26 +-- crates/swc_ecma_usage_analyzer/Cargo.toml | 12 +- crates/swc_ecma_utils/Cargo.toml | 12 +- crates/swc_ecma_visit/Cargo.toml | 6 +- crates/swc_ecmascript/Cargo.toml | 20 +-- crates/swc_error_reporters/Cargo.toml | 4 +- crates/swc_estree_ast/Cargo.toml | 4 +- crates/swc_estree_compat/Cargo.toml | 26 +-- crates/swc_fast_graph/Cargo.toml | 4 +- crates/swc_graph_analyzer/Cargo.toml | 8 +- crates/swc_html/Cargo.toml | 12 +- crates/swc_html_ast/Cargo.toml | 4 +- crates/swc_html_codegen/Cargo.toml | 16 +- crates/swc_html_minifier/Cargo.toml | 36 ++-- crates/swc_html_parser/Cargo.toml | 14 +- crates/swc_html_utils/Cargo.toml | 4 +- crates/swc_html_visit/Cargo.toml | 6 +- crates/swc_node_bundler/Cargo.toml | 24 +-- crates/swc_node_comments/Cargo.toml | 4 +- crates/swc_plugin_proxy/Cargo.toml | 6 +- crates/swc_plugin_runner/Cargo.toml | 24 +-- crates/swc_timer/Cargo.toml | 4 +- crates/swc_xml/Cargo.toml | 10 +- crates/swc_xml_ast/Cargo.toml | 4 +- crates/swc_xml_codegen/Cargo.toml | 14 +- crates/swc_xml_parser/Cargo.toml | 12 +- crates/swc_xml_visit/Cargo.toml | 6 +- crates/testing/Cargo.toml | 6 +- 81 files changed, 700 insertions(+), 698 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a84fe1303809..872c1d28f083 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,12 @@ # Changelog +## [unreleased] + +### Refactor + + + +- **(common)** Debug-print spans more compactly ([#8746](https://github.com/swc-project/swc/issues/8746)) ([f2300da](https://github.com/swc-project/swc/commit/f2300dadbf8de9270f0e431dff61b7905fe08caa)) + ## [1.4.8] - 2024-03-14 ### Bug Fixes @@ -1404,12 +1412,6 @@ - **(common)** Mark some methods of `Input` unsafe ([#7848](https://github.com/swc-project/swc/issues/7848)) ([c657324](https://github.com/swc-project/swc/commit/c65732496e4e2aab664b7443a29f5180cba6e965)) -- **(es/helpers)** Move packages for monorepo ([#7833](https://github.com/swc-project/swc/issues/7833)) ([1ab406c](https://github.com/swc-project/swc/commit/1ab406cd7aa19ea333a8462b0cd496ceb3e39ac1)) - - - **(es/minifier)** Pre-calculate `reassigned` ([#7832](https://github.com/swc-project/swc/issues/7832)) ([65db1ba](https://github.com/swc-project/swc/commit/65db1badff3108983fcd59f933e9f87c55d62916)) - -- **(es/types)** Extract `@swc/types` as a small, reusable package ([#7834](https://github.com/swc-project/swc/issues/7834)) ([f713f1b](https://github.com/swc-project/swc/commit/f713f1b2f6783ed6d85edd6decd87daa473acea0)) - diff --git a/Cargo.lock b/Cargo.lock index daf5376fc0e5..913c72310e26 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -301,7 +301,7 @@ dependencies = [ [[package]] name = "binding_macros" -version = "0.64.21" +version = "0.64.22" dependencies = [ "anyhow", "console_error_panic_hook", @@ -1056,7 +1056,7 @@ checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] name = "dbg-swc" -version = "0.91.22" +version = "0.91.23" dependencies = [ "anyhow", "clap 3.2.25", @@ -1899,7 +1899,7 @@ dependencies = [ [[package]] name = "jsdoc" -version = "0.112.9" +version = "0.112.10" dependencies = [ "anyhow", "dashmap", @@ -3667,7 +3667,7 @@ dependencies = [ [[package]] name = "swc" -version = "0.273.21" +version = "0.273.22" dependencies = [ "ansi_term", "anyhow", @@ -3737,7 +3737,7 @@ dependencies = [ [[package]] name = "swc_bundler" -version = "0.225.16" +version = "0.225.17" dependencies = [ "anyhow", "crc", @@ -3792,7 +3792,7 @@ dependencies = [ [[package]] name = "swc_cli_impl" -version = "0.8.21" +version = "0.8.22" dependencies = [ "anyhow", "assert_cmd", @@ -3816,7 +3816,7 @@ dependencies = [ [[package]] name = "swc_common" -version = "0.33.19" +version = "0.33.20" dependencies = [ "ahash 0.8.8", "anyhow", @@ -3851,7 +3851,7 @@ dependencies = [ [[package]] name = "swc_compiler_base" -version = "0.7.17" +version = "0.7.18" dependencies = [ "anyhow", "base64", @@ -3897,7 +3897,7 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.90.22" +version = "0.90.23" dependencies = [ "anyhow", "binding_macros", @@ -3949,7 +3949,7 @@ dependencies = [ [[package]] name = "swc_css" -version = "0.157.38" +version = "0.157.39" dependencies = [ "swc_css_ast", "swc_css_codegen", @@ -3964,7 +3964,7 @@ dependencies = [ [[package]] name = "swc_css_ast" -version = "0.140.20" +version = "0.140.21" dependencies = [ "is-macro", "rkyv", @@ -3976,7 +3976,7 @@ dependencies = [ [[package]] name = "swc_css_codegen" -version = "0.151.30" +version = "0.151.31" dependencies = [ "auto_impl", "bitflags 2.4.2", @@ -4004,7 +4004,7 @@ dependencies = [ [[package]] name = "swc_css_compat" -version = "0.27.31" +version = "0.27.32" dependencies = [ "bitflags 2.4.2", "once_cell", @@ -4022,7 +4022,7 @@ dependencies = [ [[package]] name = "swc_css_lints" -version = "0.60.30" +version = "0.60.31" dependencies = [ "auto_impl", "parking_lot", @@ -4041,7 +4041,7 @@ dependencies = [ [[package]] name = "swc_css_minifier" -version = "0.116.31" +version = "0.116.32" dependencies = [ "criterion", "serde", @@ -4058,7 +4058,7 @@ dependencies = [ [[package]] name = "swc_css_modules" -version = "0.29.33" +version = "0.29.34" dependencies = [ "rustc-hash", "serde", @@ -4075,7 +4075,7 @@ dependencies = [ [[package]] name = "swc_css_parser" -version = "0.150.29" +version = "0.150.30" dependencies = [ "criterion", "lexical", @@ -4091,7 +4091,7 @@ dependencies = [ [[package]] name = "swc_css_prefixer" -version = "0.153.34" +version = "0.153.35" dependencies = [ "once_cell", "preset_env_base", @@ -4109,7 +4109,7 @@ dependencies = [ [[package]] name = "swc_css_utils" -version = "0.137.20" +version = "0.137.21" dependencies = [ "once_cell", "serde", @@ -4122,7 +4122,7 @@ dependencies = [ [[package]] name = "swc_css_visit" -version = "0.139.20" +version = "0.139.21" dependencies = [ "serde", "swc_atoms", @@ -4133,7 +4133,7 @@ dependencies = [ [[package]] name = "swc_ecma_ast" -version = "0.112.5" +version = "0.112.6" dependencies = [ "arbitrary", "bitflags 2.4.2", @@ -4153,7 +4153,7 @@ dependencies = [ [[package]] name = "swc_ecma_codegen" -version = "0.148.11" +version = "0.148.12" dependencies = [ "base64", "criterion", @@ -4187,7 +4187,7 @@ dependencies = [ [[package]] name = "swc_ecma_compat_bugfixes" -version = "0.4.16" +version = "0.4.17" dependencies = [ "swc_atoms", "swc_common", @@ -4204,7 +4204,7 @@ dependencies = [ [[package]] name = "swc_ecma_compat_common" -version = "0.4.12" +version = "0.4.13" dependencies = [ "swc_common", "swc_ecma_ast", @@ -4215,7 +4215,7 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2015" -version = "0.4.16" +version = "0.4.17" dependencies = [ "arrayvec", "indexmap 2.1.0", @@ -4241,7 +4241,7 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2016" -version = "0.4.15" +version = "0.4.16" dependencies = [ "swc_atoms", "swc_common", @@ -4258,7 +4258,7 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2017" -version = "0.4.15" +version = "0.4.16" dependencies = [ "serde", "swc_atoms", @@ -4276,7 +4276,7 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2018" -version = "0.4.15" +version = "0.4.16" dependencies = [ "serde", "swc_atoms", @@ -4295,7 +4295,7 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2019" -version = "0.4.15" +version = "0.4.16" dependencies = [ "swc_atoms", "swc_common", @@ -4311,7 +4311,7 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2020" -version = "0.4.15" +version = "0.4.16" dependencies = [ "serde", "swc_atoms", @@ -4329,7 +4329,7 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2021" -version = "0.4.15" +version = "0.4.16" dependencies = [ "swc_atoms", "swc_common", @@ -4343,7 +4343,7 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2022" -version = "0.4.15" +version = "0.4.16" dependencies = [ "swc_atoms", "swc_common", @@ -4360,7 +4360,7 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es3" -version = "0.4.15" +version = "0.4.16" dependencies = [ "swc_common", "swc_ecma_ast", @@ -4375,7 +4375,7 @@ dependencies = [ [[package]] name = "swc_ecma_ext_transforms" -version = "0.113.12" +version = "0.113.13" dependencies = [ "phf", "swc_atoms", @@ -4387,7 +4387,7 @@ dependencies = [ [[package]] name = "swc_ecma_lints" -version = "0.92.17" +version = "0.92.18" dependencies = [ "auto_impl", "dashmap", @@ -4409,7 +4409,7 @@ dependencies = [ [[package]] name = "swc_ecma_loader" -version = "0.45.22" +version = "0.45.23" dependencies = [ "anyhow", "dashmap", @@ -4430,7 +4430,7 @@ dependencies = [ [[package]] name = "swc_ecma_minifier" -version = "0.192.17" +version = "0.192.18" dependencies = [ "ansi_term", "anyhow", @@ -4471,7 +4471,7 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "0.143.9" +version = "0.143.10" dependencies = [ "criterion", "either", @@ -4498,7 +4498,7 @@ dependencies = [ [[package]] name = "swc_ecma_preset_env" -version = "0.206.16" +version = "0.206.17" dependencies = [ "anyhow", "criterion", @@ -4526,7 +4526,7 @@ dependencies = [ [[package]] name = "swc_ecma_quote" -version = "0.59.12" +version = "0.59.13" dependencies = [ "swc_atoms", "swc_common", @@ -4537,7 +4537,7 @@ dependencies = [ [[package]] name = "swc_ecma_quote_macros" -version = "0.54.12" +version = "0.54.13" dependencies = [ "anyhow", "proc-macro2", @@ -4552,7 +4552,7 @@ dependencies = [ [[package]] name = "swc_ecma_testing" -version = "0.22.21" +version = "0.22.22" dependencies = [ "anyhow", "hex", @@ -4563,7 +4563,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms" -version = "0.229.16" +version = "0.229.17" dependencies = [ "pretty_assertions", "sourcemap", @@ -4588,7 +4588,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_base" -version = "0.137.15" +version = "0.137.16" dependencies = [ "better_scoped_tls", "bitflags 2.4.2", @@ -4615,7 +4615,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_classes" -version = "0.126.15" +version = "0.126.16" dependencies = [ "swc_atoms", "swc_common", @@ -4627,7 +4627,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_compat" -version = "0.163.16" +version = "0.163.17" dependencies = [ "arrayvec", "indexmap 2.1.0", @@ -4676,7 +4676,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_module" -version = "0.180.16" +version = "0.180.17" dependencies = [ "Inflector", "anyhow", @@ -4705,7 +4705,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_optimization" -version = "0.198.16" +version = "0.198.17" dependencies = [ "dashmap", "indexmap 2.1.0", @@ -4735,7 +4735,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_proposal" -version = "0.171.16" +version = "0.171.17" dependencies = [ "either", "rustc-hash", @@ -4759,7 +4759,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_react" -version = "0.183.16" +version = "0.183.17" dependencies = [ "base64", "dashmap", @@ -4787,7 +4787,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_testing" -version = "0.140.15" +version = "0.140.16" dependencies = [ "ansi_term", "anyhow", @@ -4811,7 +4811,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_typescript" -version = "0.188.16" +version = "0.188.17" dependencies = [ "criterion", "ryu-js", @@ -4833,7 +4833,7 @@ dependencies = [ [[package]] name = "swc_ecma_usage_analyzer" -version = "0.23.12" +version = "0.23.13" dependencies = [ "indexmap 2.1.0", "rustc-hash", @@ -4848,7 +4848,7 @@ dependencies = [ [[package]] name = "swc_ecma_utils" -version = "0.127.12" +version = "0.127.13" dependencies = [ "indexmap 2.1.0", "num_cpus", @@ -4867,7 +4867,7 @@ dependencies = [ [[package]] name = "swc_ecma_visit" -version = "0.98.6" +version = "0.98.7" dependencies = [ "num-bigint", "serde", @@ -4880,7 +4880,7 @@ dependencies = [ [[package]] name = "swc_ecmascript" -version = "0.239.20" +version = "0.239.21" dependencies = [ "swc_ecma_ast", "swc_ecma_codegen", @@ -4904,7 +4904,7 @@ dependencies = [ [[package]] name = "swc_error_reporters" -version = "0.17.18" +version = "0.17.19" dependencies = [ "anyhow", "miette", @@ -4915,7 +4915,7 @@ dependencies = [ [[package]] name = "swc_estree_ast" -version = "0.23.18" +version = "0.23.19" dependencies = [ "better_scoped_tls", "serde", @@ -4926,7 +4926,7 @@ dependencies = [ [[package]] name = "swc_estree_compat" -version = "0.198.20" +version = "0.198.21" dependencies = [ "ahash 0.8.8", "anyhow", @@ -4952,7 +4952,7 @@ dependencies = [ [[package]] name = "swc_fast_graph" -version = "0.21.19" +version = "0.21.20" dependencies = [ "indexmap 2.1.0", "petgraph", @@ -4962,7 +4962,7 @@ dependencies = [ [[package]] name = "swc_graph_analyzer" -version = "0.22.21" +version = "0.22.22" dependencies = [ "auto_impl", "petgraph", @@ -4974,7 +4974,7 @@ dependencies = [ [[package]] name = "swc_html" -version = "0.137.17" +version = "0.137.18" dependencies = [ "swc_html_ast", "swc_html_codegen", @@ -4985,7 +4985,7 @@ dependencies = [ [[package]] name = "swc_html_ast" -version = "0.33.18" +version = "0.33.19" dependencies = [ "is-macro", "rkyv", @@ -4997,7 +4997,7 @@ dependencies = [ [[package]] name = "swc_html_codegen" -version = "0.42.23" +version = "0.42.24" dependencies = [ "auto_impl", "bitflags 2.4.2", @@ -5024,7 +5024,7 @@ dependencies = [ [[package]] name = "swc_html_minifier" -version = "0.134.16" +version = "0.134.17" dependencies = [ "criterion", "once_cell", @@ -5054,7 +5054,7 @@ dependencies = [ [[package]] name = "swc_html_parser" -version = "0.39.23" +version = "0.39.24" dependencies = [ "criterion", "serde", @@ -5070,7 +5070,7 @@ dependencies = [ [[package]] name = "swc_html_utils" -version = "0.18.18" +version = "0.18.19" dependencies = [ "once_cell", "serde", @@ -5081,7 +5081,7 @@ dependencies = [ [[package]] name = "swc_html_visit" -version = "0.33.18" +version = "0.33.19" dependencies = [ "serde", "swc_atoms", @@ -5109,7 +5109,7 @@ dependencies = [ [[package]] name = "swc_node_bundler" -version = "0.62.21" +version = "0.62.22" dependencies = [ "anyhow", "dashmap", @@ -5138,7 +5138,7 @@ dependencies = [ [[package]] name = "swc_node_comments" -version = "0.20.18" +version = "0.20.19" dependencies = [ "dashmap", "swc_atoms", @@ -5175,7 +5175,7 @@ dependencies = [ [[package]] name = "swc_plugin_proxy" -version = "0.41.5" +version = "0.41.6" dependencies = [ "better_scoped_tls", "rkyv", @@ -5187,7 +5187,7 @@ dependencies = [ [[package]] name = "swc_plugin_runner" -version = "0.106.12" +version = "0.106.13" dependencies = [ "anyhow", "criterion", @@ -5222,7 +5222,7 @@ version = "0.24.1" [[package]] name = "swc_timer" -version = "0.21.20" +version = "0.21.21" dependencies = [ "testing", "tracing", @@ -5258,7 +5258,7 @@ dependencies = [ [[package]] name = "swc_xml" -version = "0.13.20" +version = "0.13.21" dependencies = [ "swc_xml_ast", "swc_xml_codegen", @@ -5268,7 +5268,7 @@ dependencies = [ [[package]] name = "swc_xml_ast" -version = "0.12.18" +version = "0.12.19" dependencies = [ "is-macro", "serde", @@ -5279,7 +5279,7 @@ dependencies = [ [[package]] name = "swc_xml_codegen" -version = "0.13.20" +version = "0.13.21" dependencies = [ "auto_impl", "bitflags 2.4.2", @@ -5305,7 +5305,7 @@ dependencies = [ [[package]] name = "swc_xml_parser" -version = "0.13.20" +version = "0.13.21" dependencies = [ "serde", "serde_json", @@ -5318,7 +5318,7 @@ dependencies = [ [[package]] name = "swc_xml_visit" -version = "0.12.18" +version = "0.12.19" dependencies = [ "serde", "swc_atoms", @@ -5462,7 +5462,7 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "testing" -version = "0.35.20" +version = "0.35.21" dependencies = [ "ansi_term", "cargo_metadata 0.15.4", diff --git a/crates/binding_macros/Cargo.toml b/crates/binding_macros/Cargo.toml index 326b948f5433..3cd4ca8aee87 100644 --- a/crates/binding_macros/Cargo.toml +++ b/crates/binding_macros/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "Apache-2.0" name = "binding_macros" repository = "https://github.com/swc-project/swc.git" -version = "0.64.21" +version = "0.64.22" [lib] bench = false @@ -33,11 +33,11 @@ binding_wasm = [ [dependencies] # Common deps for the SWC imports -swc = { optional = true, version = "0.273.21", path = "../swc" } -swc_common = { optional = true, version = "0.33.19", path = "../swc_common" } -swc_ecma_ast = { optional = true, version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_transforms = { optional = true, version = "0.229.16", path = "../swc_ecma_transforms" } -swc_ecma_visit = { optional = true, version = "0.98.6", path = "../swc_ecma_visit" } +swc = { optional = true, version = "0.273.22", path = "../swc" } +swc_common = { optional = true, version = "0.33.20", path = "../swc_common" } +swc_ecma_ast = { optional = true, version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_transforms = { optional = true, version = "0.229.17", path = "../swc_ecma_transforms" } +swc_ecma_visit = { optional = true, version = "0.98.7", path = "../swc_ecma_visit" } # Optional deps for the wasm binding macro anyhow = { optional = true, version = "1.0.71" } diff --git a/crates/dbg-swc/Cargo.toml b/crates/dbg-swc/Cargo.toml index 17a1c01c5d47..5038271c50af 100644 --- a/crates/dbg-swc/Cargo.toml +++ b/crates/dbg-swc/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "Apache-2.0" name = "dbg-swc" repository = "https://github.com/kdy1/dbg-swc.git" -version = "0.91.22" +version = "0.91.23" [[bin]] bench = false @@ -26,17 +26,17 @@ tracing-subscriber = { version = "0.3.17", features = ["fmt", "env-filter"] } url = "2" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", features = [ +swc_common = { version = "0.33.20", features = [ "concurrent", "tty-emitter", ], path = "../swc_common" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_codegen = { version = "0.148.11", path = "../swc_ecma_codegen" } -swc_ecma_minifier = { version = "0.192.17", path = "../swc_ecma_minifier", features = [ +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_codegen = { version = "0.148.12", path = "../swc_ecma_codegen" } +swc_ecma_minifier = { version = "0.192.18", path = "../swc_ecma_minifier", features = [ "concurrent", ] } -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -swc_ecma_transforms_base = { version = "0.137.15", path = "../swc_ecma_transforms_base" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } -swc_error_reporters = { version = "0.17.18", path = "../swc_error_reporters" } -swc_timer = { version = "0.21.20", path = "../swc_timer" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +swc_ecma_transforms_base = { version = "0.137.16", path = "../swc_ecma_transforms_base" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } +swc_error_reporters = { version = "0.17.19", path = "../swc_error_reporters" } +swc_timer = { version = "0.21.21", path = "../swc_timer" } diff --git a/crates/jsdoc/Cargo.toml b/crates/jsdoc/Cargo.toml index 60b3ac1c9035..58f17e5095ec 100644 --- a/crates/jsdoc/Cargo.toml +++ b/crates/jsdoc/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "jsdoc" -version = "0.112.9" +version = "0.112.10" [lib] bench = false @@ -19,12 +19,12 @@ nom = "7.1.3" serde = { version = "1", features = ["derive"], optional = true } swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } +swc_common = { version = "0.33.20", path = "../swc_common" } [dev-dependencies] anyhow = "1" dashmap = "5.4.0" -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -testing = { version = "0.35.20", path = "../testing" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +testing = { version = "0.35.21", path = "../testing" } diff --git a/crates/swc/Cargo.toml b/crates/swc/Cargo.toml index 19aac537d5ef..052f87aafa7b 100644 --- a/crates/swc/Cargo.toml +++ b/crates/swc/Cargo.toml @@ -9,7 +9,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc" repository = "https://github.com/swc-project/swc.git" -version = "0.273.21" +version = "0.273.22" [lib] bench = false @@ -69,26 +69,26 @@ url = "2.4.0" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_cached = { version = "0.3.19", path = "../swc_cached" } -swc_common = { version = "0.33.19", path = "../swc_common", features = [ +swc_common = { version = "0.33.20", path = "../swc_common", features = [ "ahash", "sourcemap", "parking_lot", ] } -swc_compiler_base = { version = "0.7.17", path = "../swc_compiler_base" } +swc_compiler_base = { version = "0.7.18", path = "../swc_compiler_base" } swc_config = { version = "0.1.11", path = "../swc_config" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_codegen = { version = "0.148.11", path = "../swc_ecma_codegen" } -swc_ecma_ext_transforms = { version = "0.113.12", path = "../swc_ecma_ext_transforms" } -swc_ecma_lints = { version = "0.92.17", path = "../swc_ecma_lints" } -swc_ecma_loader = { version = "0.45.22", path = "../swc_ecma_loader", features = [ +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_codegen = { version = "0.148.12", path = "../swc_ecma_codegen" } +swc_ecma_ext_transforms = { version = "0.113.13", path = "../swc_ecma_ext_transforms" } +swc_ecma_lints = { version = "0.92.18", path = "../swc_ecma_lints" } +swc_ecma_loader = { version = "0.45.23", path = "../swc_ecma_loader", features = [ "cache", "node", "tsc", ] } -swc_ecma_minifier = { version = "0.192.17", path = "../swc_ecma_minifier" } -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -swc_ecma_preset_env = { version = "0.206.16", path = "../swc_ecma_preset_env" } -swc_ecma_transforms = { version = "0.229.16", path = "../swc_ecma_transforms", features = [ +swc_ecma_minifier = { version = "0.192.18", path = "../swc_ecma_minifier" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +swc_ecma_preset_env = { version = "0.206.17", path = "../swc_ecma_preset_env" } +swc_ecma_transforms = { version = "0.229.17", path = "../swc_ecma_transforms", features = [ "compat", "module", "optimization", @@ -96,16 +96,16 @@ swc_ecma_transforms = { version = "0.229.16", path = "../swc_ecma_transforms", f "react", "typescript", ] } -swc_ecma_transforms_base = { version = "0.137.15", path = "../swc_ecma_transforms_base" } -swc_ecma_transforms_compat = { version = "0.163.16", path = "../swc_ecma_transforms_compat" } -swc_ecma_transforms_optimization = { version = "0.198.16", path = "../swc_ecma_transforms_optimization" } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } -swc_error_reporters = { version = "0.17.18", path = "../swc_error_reporters" } -swc_node_comments = { version = "0.20.18", path = "../swc_node_comments" } -swc_plugin_proxy = { version = "0.41.5", path = "../swc_plugin_proxy", optional = true } -swc_plugin_runner = { version = "0.106.12", path = "../swc_plugin_runner", optional = true, default-features = false } -swc_timer = { version = "0.21.20", path = "../swc_timer" } +swc_ecma_transforms_base = { version = "0.137.16", path = "../swc_ecma_transforms_base" } +swc_ecma_transforms_compat = { version = "0.163.17", path = "../swc_ecma_transforms_compat" } +swc_ecma_transforms_optimization = { version = "0.198.17", path = "../swc_ecma_transforms_optimization" } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } +swc_error_reporters = { version = "0.17.19", path = "../swc_error_reporters" } +swc_node_comments = { version = "0.20.19", path = "../swc_node_comments" } +swc_plugin_proxy = { version = "0.41.6", path = "../swc_plugin_proxy", optional = true } +swc_plugin_runner = { version = "0.106.13", path = "../swc_plugin_runner", optional = true, default-features = false } +swc_timer = { version = "0.21.21", path = "../swc_timer" } swc_visit = { version = "0.5.10", path = "../swc_visit" } tokio = { version = "1", optional = true, features = ["rt", "rt-multi-thread"] } @@ -126,15 +126,15 @@ tokio = { version = "1", optional = true, features = ["rt", "rt-multi-thread"] } ansi_term = "0.12" criterion = "0.5" rayon = "1.7.0" -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast", features = [ +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast", features = [ "serde-impl", ] } -swc_ecma_lints = { version = "0.92.17", path = "../swc_ecma_lints", features = [ +swc_ecma_lints = { version = "0.92.18", path = "../swc_ecma_lints", features = [ "non_critical_lints", ] } -swc_ecma_testing = { version = "0.22.21", path = "../swc_ecma_testing" } +swc_ecma_testing = { version = "0.22.22", path = "../swc_ecma_testing" } swc_malloc = { version = "0.5.10", path = "../swc_malloc" } -testing = { version = "0.35.20", path = "../testing" } +testing = { version = "0.35.21", path = "../testing" } walkdir = "2" [[example]] diff --git a/crates/swc_bundler/Cargo.toml b/crates/swc_bundler/Cargo.toml index 5b3da40e8ac5..756a3a83eb6f 100644 --- a/crates/swc_bundler/Cargo.toml +++ b/crates/swc_bundler/Cargo.toml @@ -9,7 +9,7 @@ include = ["Cargo.toml", "build.rs", "src/**/*.rs", "src/**/*.js"] license = "Apache-2.0" name = "swc_bundler" repository = "https://github.com/swc-project/swc.git" -version = "0.225.16" +version = "0.225.17" [package.metadata.docs.rs] all-features = true @@ -38,17 +38,17 @@ relative-path = "1.2" tracing = "0.1.37" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_codegen = { version = "0.148.11", path = "../swc_ecma_codegen" } -swc_ecma_loader = { version = "0.45.22", path = "../swc_ecma_loader" } -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -swc_ecma_transforms_base = { version = "0.137.15", path = "../swc_ecma_transforms_base" } -swc_ecma_transforms_optimization = { version = "0.198.16", path = "../swc_ecma_transforms_optimization" } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } -swc_fast_graph = { version = "0.21.19", path = "../swc_fast_graph/" } -swc_graph_analyzer = { version = "0.22.21", path = "../swc_graph_analyzer/" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_codegen = { version = "0.148.12", path = "../swc_ecma_codegen" } +swc_ecma_loader = { version = "0.45.23", path = "../swc_ecma_loader" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +swc_ecma_transforms_base = { version = "0.137.16", path = "../swc_ecma_transforms_base" } +swc_ecma_transforms_optimization = { version = "0.198.17", path = "../swc_ecma_transforms_optimization" } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } +swc_fast_graph = { version = "0.21.20", path = "../swc_fast_graph/" } +swc_graph_analyzer = { version = "0.22.22", path = "../swc_graph_analyzer/" } [dev-dependencies] hex = "0.4" @@ -59,15 +59,15 @@ sha-1 = "0.10" tempfile = "3.6.0" url = "2.4.0" -swc_ecma_loader = { version = "0.45.22", path = "../swc_ecma_loader", features = [ +swc_ecma_loader = { version = "0.45.23", path = "../swc_ecma_loader", features = [ "node", "cache", ] } -swc_ecma_minifier = { version = "0.192.17", path = "../swc_ecma_minifier", features = [ +swc_ecma_minifier = { version = "0.192.18", path = "../swc_ecma_minifier", features = [ "concurrent", ] } -swc_ecma_transforms_proposal = { version = "0.171.16", path = "../swc_ecma_transforms_proposal" } -swc_ecma_transforms_react = { version = "0.183.16", path = "../swc_ecma_transforms_react" } -swc_ecma_transforms_typescript = { version = "0.188.16", path = "../swc_ecma_transforms_typescript" } +swc_ecma_transforms_proposal = { version = "0.171.17", path = "../swc_ecma_transforms_proposal" } +swc_ecma_transforms_react = { version = "0.183.17", path = "../swc_ecma_transforms_react" } +swc_ecma_transforms_typescript = { version = "0.188.17", path = "../swc_ecma_transforms_typescript" } swc_malloc = { version = "0.5.10", path = "../swc_malloc" } -testing = { version = "0.35.20", path = "../testing" } +testing = { version = "0.35.21", path = "../testing" } diff --git a/crates/swc_cli_impl/Cargo.toml b/crates/swc_cli_impl/Cargo.toml index 78d14af79b6a..d380a578f820 100644 --- a/crates/swc_cli_impl/Cargo.toml +++ b/crates/swc_cli_impl/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli_impl" repository = "https://github.com/swc-project/swc.git" -version = "0.8.21" +version = "0.8.22" [[bin]] name = "swc" @@ -40,7 +40,7 @@ tracing-futures = "0.2.5" tracing-subscriber = { version = "0.3.9", features = ["env-filter"] } walkdir = "2" -swc_core = { version = "0.90.22", features = [ +swc_core = { version = "0.90.23", features = [ "trace_macro", "common_concurrent", "base_concurrent", diff --git a/crates/swc_common/Cargo.toml b/crates/swc_common/Cargo.toml index e8d83950a31e..9e3ba5767577 100644 --- a/crates/swc_common/Cargo.toml +++ b/crates/swc_common/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_common" repository = "https://github.com/swc-project/swc.git" -version = "0.33.19" +version = "0.33.20" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_compiler_base/Cargo.toml b/crates/swc_compiler_base/Cargo.toml index 63addc3f0869..488d0e4f70a0 100644 --- a/crates/swc_compiler_base/Cargo.toml +++ b/crates/swc_compiler_base/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_compiler_base" repository = "https://github.com/swc-project/swc.git" -version = "0.7.17" +version = "0.7.18" [features] node = ["napi", "napi-derive"] @@ -21,16 +21,16 @@ serde = { version = "1.0.188", features = ["derive"] } sourcemap = "6.4" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common", features = [ +swc_common = { version = "0.33.20", path = "../swc_common", features = [ "sourcemap", ] } swc_config = { version = "0.1.11", path = "../swc_config" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_codegen = { version = "0.148.11", path = "../swc_ecma_codegen" } -swc_ecma_minifier = { version = "0.192.17", path = "../swc_ecma_minifier" } -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } -swc_timer = { version = "0.21.20", path = "../swc_timer" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_codegen = { version = "0.148.12", path = "../swc_ecma_codegen" } +swc_ecma_minifier = { version = "0.192.18", path = "../swc_ecma_minifier" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } +swc_timer = { version = "0.21.21", path = "../swc_timer" } [dependencies.napi-derive] default-features = false diff --git a/crates/swc_core/Cargo.toml b/crates/swc_core/Cargo.toml index 3c54c784fe57..3423b590b813 100644 --- a/crates/swc_core/Cargo.toml +++ b/crates/swc_core/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_core" repository = "https://github.com/swc-project/swc.git" -version = "0.90.22" +version = "0.90.23" [package.metadata.docs.rs] features = [ "allocator_node", @@ -327,50 +327,50 @@ __visit = ["__ecma", "swc_ecma_visit"] once_cell = { optional = true, version = "1.18.0" } # swc_* dependencies -binding_macros = { optional = true, version = "0.64.21", path = "../binding_macros" } -swc = { optional = true, version = "0.273.21", path = "../swc" } +binding_macros = { optional = true, version = "0.64.22", path = "../binding_macros" } +swc = { optional = true, version = "0.273.22", path = "../swc" } swc_atoms = { optional = true, version = "0.6.5", path = "../swc_atoms" } -swc_bundler = { optional = true, version = "0.225.16", path = "../swc_bundler" } +swc_bundler = { optional = true, version = "0.225.17", path = "../swc_bundler" } swc_cached = { optional = true, version = "0.3.19", path = "../swc_cached" } -swc_common = { optional = true, version = "0.33.19", path = "../swc_common" } -swc_css_ast = { optional = true, version = "0.140.20", path = "../swc_css_ast" } -swc_css_codegen = { optional = true, version = "0.151.30", path = "../swc_css_codegen" } -swc_css_compat = { optional = true, version = "0.27.31", path = "../swc_css_compat" } -swc_css_minifier = { optional = true, version = "0.116.31", path = "../swc_css_minifier" } -swc_css_modules = { optional = true, version = "0.29.33", path = "../swc_css_modules" } -swc_css_parser = { optional = true, version = "0.150.29", path = "../swc_css_parser" } -swc_css_prefixer = { optional = true, version = "0.153.34", path = "../swc_css_prefixer" } -swc_css_utils = { optional = true, version = "0.137.20", path = "../swc_css_utils/" } -swc_css_visit = { optional = true, version = "0.139.20", path = "../swc_css_visit" } -swc_ecma_ast = { optional = true, version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_codegen = { optional = true, version = "0.148.11", path = "../swc_ecma_codegen" } -swc_ecma_lints = { optional = true, version = "0.92.17", path = "../swc_ecma_lints" } -swc_ecma_loader = { optional = true, version = "0.45.22", path = "../swc_ecma_loader" } -swc_ecma_minifier = { optional = true, version = "0.192.17", path = "../swc_ecma_minifier" } -swc_ecma_parser = { optional = true, version = "0.143.9", path = "../swc_ecma_parser" } -swc_ecma_preset_env = { optional = true, version = "0.206.16", path = "../swc_ecma_preset_env" } -swc_ecma_quote_macros = { optional = true, version = "0.54.12", path = "../swc_ecma_quote_macros" } -swc_ecma_transforms_base = { optional = true, version = "0.137.15", path = "../swc_ecma_transforms_base" } -swc_ecma_transforms_compat = { optional = true, version = "0.163.16", path = "../swc_ecma_transforms_compat" } -swc_ecma_transforms_module = { optional = true, version = "0.180.16", path = "../swc_ecma_transforms_module" } -swc_ecma_transforms_optimization = { optional = true, version = "0.198.16", path = "../swc_ecma_transforms_optimization" } -swc_ecma_transforms_proposal = { optional = true, version = "0.171.16", path = "../swc_ecma_transforms_proposal" } -swc_ecma_transforms_react = { optional = true, version = "0.183.16", path = "../swc_ecma_transforms_react" } -swc_ecma_transforms_testing = { optional = true, version = "0.140.15", path = "../swc_ecma_transforms_testing" } -swc_ecma_transforms_typescript = { optional = true, version = "0.188.16", path = "../swc_ecma_transforms_typescript" } -swc_ecma_usage_analyzer = { optional = true, version = "0.23.12", path = "../swc_ecma_usage_analyzer" } -swc_ecma_utils = { optional = true, version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { optional = true, version = "0.98.6", path = "../swc_ecma_visit" } +swc_common = { optional = true, version = "0.33.20", path = "../swc_common" } +swc_css_ast = { optional = true, version = "0.140.21", path = "../swc_css_ast" } +swc_css_codegen = { optional = true, version = "0.151.31", path = "../swc_css_codegen" } +swc_css_compat = { optional = true, version = "0.27.32", path = "../swc_css_compat" } +swc_css_minifier = { optional = true, version = "0.116.32", path = "../swc_css_minifier" } +swc_css_modules = { optional = true, version = "0.29.34", path = "../swc_css_modules" } +swc_css_parser = { optional = true, version = "0.150.30", path = "../swc_css_parser" } +swc_css_prefixer = { optional = true, version = "0.153.35", path = "../swc_css_prefixer" } +swc_css_utils = { optional = true, version = "0.137.21", path = "../swc_css_utils/" } +swc_css_visit = { optional = true, version = "0.139.21", path = "../swc_css_visit" } +swc_ecma_ast = { optional = true, version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_codegen = { optional = true, version = "0.148.12", path = "../swc_ecma_codegen" } +swc_ecma_lints = { optional = true, version = "0.92.18", path = "../swc_ecma_lints" } +swc_ecma_loader = { optional = true, version = "0.45.23", path = "../swc_ecma_loader" } +swc_ecma_minifier = { optional = true, version = "0.192.18", path = "../swc_ecma_minifier" } +swc_ecma_parser = { optional = true, version = "0.143.10", path = "../swc_ecma_parser" } +swc_ecma_preset_env = { optional = true, version = "0.206.17", path = "../swc_ecma_preset_env" } +swc_ecma_quote_macros = { optional = true, version = "0.54.13", path = "../swc_ecma_quote_macros" } +swc_ecma_transforms_base = { optional = true, version = "0.137.16", path = "../swc_ecma_transforms_base" } +swc_ecma_transforms_compat = { optional = true, version = "0.163.17", path = "../swc_ecma_transforms_compat" } +swc_ecma_transforms_module = { optional = true, version = "0.180.17", path = "../swc_ecma_transforms_module" } +swc_ecma_transforms_optimization = { optional = true, version = "0.198.17", path = "../swc_ecma_transforms_optimization" } +swc_ecma_transforms_proposal = { optional = true, version = "0.171.17", path = "../swc_ecma_transforms_proposal" } +swc_ecma_transforms_react = { optional = true, version = "0.183.17", path = "../swc_ecma_transforms_react" } +swc_ecma_transforms_testing = { optional = true, version = "0.140.16", path = "../swc_ecma_transforms_testing" } +swc_ecma_transforms_typescript = { optional = true, version = "0.188.17", path = "../swc_ecma_transforms_typescript" } +swc_ecma_usage_analyzer = { optional = true, version = "0.23.13", path = "../swc_ecma_usage_analyzer" } +swc_ecma_utils = { optional = true, version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { optional = true, version = "0.98.7", path = "../swc_ecma_visit" } swc_malloc = { optional = true, version = "0.5.10", path = "../swc_malloc" } -swc_node_bundler = { optional = true, version = "0.62.21", path = "../swc_node_bundler" } +swc_node_bundler = { optional = true, version = "0.62.22", path = "../swc_node_bundler" } swc_nodejs_common = { optional = true, version = "0.0.8", path = "../swc_nodejs_common" } swc_plugin = { optional = true, version = "0.90.0", path = "../swc_plugin" } swc_plugin_macro = { optional = true, version = "0.9.16", path = "../swc_plugin_macro" } -swc_plugin_proxy = { optional = true, version = "0.41.5", path = "../swc_plugin_proxy" } +swc_plugin_proxy = { optional = true, version = "0.41.6", path = "../swc_plugin_proxy" } swc_trace_macro = { optional = true, version = "0.1.3", path = "../swc_trace_macro" } -testing = { optional = true, version = "0.35.20", path = "../testing" } +testing = { optional = true, version = "0.35.21", path = "../testing" } # TODO: eventually swc_plugin_runner needs to remove default features -swc_plugin_runner = { optional = true, version = "0.106.12", path = "../swc_plugin_runner", default-features = false } +swc_plugin_runner = { optional = true, version = "0.106.13", path = "../swc_plugin_runner", default-features = false } [build-dependencies] vergen = { version = "8.0.0", default-features = false, features = ["cargo"] } diff --git a/crates/swc_css/Cargo.toml b/crates/swc_css/Cargo.toml index d48e7fabf2f2..a083d9ea4369 100644 --- a/crates/swc_css/Cargo.toml +++ b/crates/swc_css/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_css" repository = "https://github.com/swc-project/swc.git" -version = "0.157.38" +version = "0.157.39" [package.metadata.docs.rs] all-features = true @@ -22,12 +22,12 @@ modules = ["swc_css_modules"] prefixer = ["swc_css_prefixer"] [dependencies] -swc_css_ast = { version = "0.140.20", path = "../swc_css_ast" } -swc_css_codegen = { version = "0.151.30", path = "../swc_css_codegen" } -swc_css_compat = { version = "0.27.31", path = "../swc_css_compat", optional = true } -swc_css_minifier = { version = "0.116.31", path = "../swc_css_minifier", optional = true } -swc_css_modules = { version = "0.29.33", path = "../swc_css_modules", optional = true } -swc_css_parser = { version = "0.150.29", path = "../swc_css_parser" } -swc_css_prefixer = { version = "0.153.34", path = "../swc_css_prefixer", optional = true } -swc_css_utils = { version = "0.137.20", path = "../swc_css_utils/" } -swc_css_visit = { version = "0.139.20", path = "../swc_css_visit" } +swc_css_ast = { version = "0.140.21", path = "../swc_css_ast" } +swc_css_codegen = { version = "0.151.31", path = "../swc_css_codegen" } +swc_css_compat = { version = "0.27.32", path = "../swc_css_compat", optional = true } +swc_css_minifier = { version = "0.116.32", path = "../swc_css_minifier", optional = true } +swc_css_modules = { version = "0.29.34", path = "../swc_css_modules", optional = true } +swc_css_parser = { version = "0.150.30", path = "../swc_css_parser" } +swc_css_prefixer = { version = "0.153.35", path = "../swc_css_prefixer", optional = true } +swc_css_utils = { version = "0.137.21", path = "../swc_css_utils/" } +swc_css_visit = { version = "0.139.21", path = "../swc_css_visit" } diff --git a/crates/swc_css_ast/Cargo.toml b/crates/swc_css_ast/Cargo.toml index 24376f854425..801b67acbaae 100644 --- a/crates/swc_css_ast/Cargo.toml +++ b/crates/swc_css_ast/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_css_ast" repository = "https://github.com/swc-project/swc.git" -version = "0.140.20" +version = "0.140.21" [lib] bench = false @@ -27,4 +27,4 @@ serde = { version = "1.0.127", features = ["derive"], optional = true } string_enum = { version = "0.4.2", path = "../string_enum/" } swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } +swc_common = { version = "0.33.20", path = "../swc_common" } diff --git a/crates/swc_css_codegen/Cargo.toml b/crates/swc_css_codegen/Cargo.toml index e9c915ce1dbc..319e6175e5e1 100644 --- a/crates/swc_css_codegen/Cargo.toml +++ b/crates/swc_css_codegen/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_css_codegen" repository = "https://github.com/swc-project/swc.git" -version = "0.151.30" +version = "0.151.31" [lib] bench = false @@ -19,15 +19,15 @@ rustc-hash = "1.1.0" serde = "1.0.127" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_css_ast = { version = "0.140.20", path = "../swc_css_ast" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_css_ast = { version = "0.140.21", path = "../swc_css_ast" } swc_css_codegen_macros = { version = "0.2.3", path = "../swc_css_codegen_macros" } -swc_css_utils = { version = "0.137.20", path = "../swc_css_utils" } +swc_css_utils = { version = "0.137.21", path = "../swc_css_utils" } [dev-dependencies] -swc_common = { version = "0.33.19", path = "../swc_common", features = [ +swc_common = { version = "0.33.20", path = "../swc_common", features = [ "sourcemap", ] } -swc_css_parser = { version = "0.150.29", path = "../swc_css_parser" } -swc_css_visit = { version = "0.139.20", path = "../swc_css_visit" } -testing = { version = "0.35.20", path = "../testing" } +swc_css_parser = { version = "0.150.30", path = "../swc_css_parser" } +swc_css_visit = { version = "0.139.21", path = "../swc_css_visit" } +testing = { version = "0.35.21", path = "../testing" } diff --git a/crates/swc_css_compat/Cargo.toml b/crates/swc_css_compat/Cargo.toml index ed1df041f533..5974d35966fe 100644 --- a/crates/swc_css_compat/Cargo.toml +++ b/crates/swc_css_compat/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/**/*.json", "data/**/*.json"] license = "Apache-2.0" name = "swc_css_compat" repository = "https://github.com/swc-project/swc.git" -version = "0.27.31" +version = "0.27.32" [lib] bench = false @@ -19,12 +19,12 @@ serde = { version = "1.0.118", features = ["derive"] } serde_json = "1.0.61" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_css_ast = { version = "0.140.20", path = "../swc_css_ast" } -swc_css_utils = { version = "0.137.20", path = "../swc_css_utils/" } -swc_css_visit = { version = "0.139.20", path = "../swc_css_visit" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_css_ast = { version = "0.140.21", path = "../swc_css_ast" } +swc_css_utils = { version = "0.137.21", path = "../swc_css_utils/" } +swc_css_visit = { version = "0.139.21", path = "../swc_css_visit" } [dev-dependencies] -swc_css_codegen = { version = "0.151.30", path = "../swc_css_codegen" } -swc_css_parser = { version = "0.150.29", path = "../swc_css_parser" } -testing = { version = "0.35.20", path = "../testing" } +swc_css_codegen = { version = "0.151.31", path = "../swc_css_codegen" } +swc_css_parser = { version = "0.150.30", path = "../swc_css_parser" } +testing = { version = "0.35.21", path = "../testing" } diff --git a/crates/swc_css_lints/Cargo.toml b/crates/swc_css_lints/Cargo.toml index 0e937e6e4e12..64283ec2210c 100644 --- a/crates/swc_css_lints/Cargo.toml +++ b/crates/swc_css_lints/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_css_lints" repository = "https://github.com/swc-project/swc.git" -version = "0.60.30" +version = "0.60.31" [lib] bench = false @@ -21,12 +21,12 @@ thiserror = "1.0.30" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_cached = { version = "0.3.19", path = "../swc_cached" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_css_ast = { version = "0.140.20", path = "../swc_css_ast" } -swc_css_visit = { version = "0.139.20", path = "../swc_css_visit" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_css_ast = { version = "0.140.21", path = "../swc_css_ast" } +swc_css_visit = { version = "0.139.21", path = "../swc_css_visit" } [dev-dependencies] serde_json = "1.0.79" -swc_css_parser = { version = "0.150.29", path = "../swc_css_parser" } -testing = { version = "0.35.20", path = "../testing" } +swc_css_parser = { version = "0.150.30", path = "../swc_css_parser" } +testing = { version = "0.35.21", path = "../testing" } diff --git a/crates/swc_css_minifier/Cargo.toml b/crates/swc_css_minifier/Cargo.toml index 6d25838713c1..ea375bafbb6d 100644 --- a/crates/swc_css_minifier/Cargo.toml +++ b/crates/swc_css_minifier/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_css_minifier" repository = "https://github.com/swc-project/swc.git" -version = "0.116.31" +version = "0.116.32" [lib] bench = false @@ -16,18 +16,18 @@ bench = false serde = "1.0.118" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_css_ast = { version = "0.140.20", path = "../swc_css_ast" } -swc_css_utils = { version = "0.137.20", path = "../swc_css_utils/" } -swc_css_visit = { version = "0.139.20", path = "../swc_css_visit" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_css_ast = { version = "0.140.21", path = "../swc_css_ast" } +swc_css_utils = { version = "0.137.21", path = "../swc_css_utils/" } +swc_css_visit = { version = "0.139.21", path = "../swc_css_visit" } [dev-dependencies] criterion = "0.5" -swc_css_codegen = { version = "0.151.30", path = "../swc_css_codegen" } -swc_css_parser = { version = "0.150.29", path = "../swc_css_parser" } +swc_css_codegen = { version = "0.151.31", path = "../swc_css_codegen" } +swc_css_parser = { version = "0.150.30", path = "../swc_css_parser" } swc_malloc = { version = "0.5.10", path = "../swc_malloc" } -testing = { version = "0.35.20", path = "../testing" } +testing = { version = "0.35.21", path = "../testing" } [[bench]] harness = false diff --git a/crates/swc_css_modules/Cargo.toml b/crates/swc_css_modules/Cargo.toml index d40e1b6f4df3..7d80c5c087a6 100644 --- a/crates/swc_css_modules/Cargo.toml +++ b/crates/swc_css_modules/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_css_modules" repository = "https://github.com/swc-project/swc.git" -version = "0.29.33" +version = "0.29.34" [lib] bench = false @@ -19,14 +19,14 @@ rustc-hash = "1.1.0" serde = { version = "1", features = ["derive"] } swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_css_ast = { version = "0.140.20", path = "../swc_css_ast" } -swc_css_codegen = { version = "0.151.30", path = "../swc_css_codegen" } -swc_css_parser = { version = "0.150.29", path = "../swc_css_parser" } -swc_css_visit = { version = "0.139.20", path = "../swc_css_visit" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_css_ast = { version = "0.140.21", path = "../swc_css_ast" } +swc_css_codegen = { version = "0.151.31", path = "../swc_css_codegen" } +swc_css_parser = { version = "0.150.30", path = "../swc_css_parser" } +swc_css_visit = { version = "0.139.21", path = "../swc_css_visit" } [dev-dependencies] serde_json = "1" -swc_css_compat = { version = "0.27.31", path = "../swc_css_compat" } -testing = { version = "0.35.20", path = "../testing" } +swc_css_compat = { version = "0.27.32", path = "../swc_css_compat" } +testing = { version = "0.35.21", path = "../testing" } diff --git a/crates/swc_css_parser/Cargo.toml b/crates/swc_css_parser/Cargo.toml index 1472cb94b7ac..b6f59ed2e496 100644 --- a/crates/swc_css_parser/Cargo.toml +++ b/crates/swc_css_parser/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_css_parser" repository = "https://github.com/swc-project/swc.git" -version = "0.150.29" +version = "0.150.30" [lib] bench = false @@ -20,19 +20,19 @@ lexical = "6.1.0" serde = "1.0.127" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_css_ast = { version = "0.140.20", path = "../swc_css_ast" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_css_ast = { version = "0.140.21", path = "../swc_css_ast" } [dev-dependencies] criterion = "0.5" serde_json = "1.0.66" -swc_css_ast = { version = "0.140.20", path = "../swc_css_ast", features = [ +swc_css_ast = { version = "0.140.21", path = "../swc_css_ast", features = [ "serde-impl", ] } -swc_css_visit = { version = "0.139.20", path = "../swc_css_visit" } +swc_css_visit = { version = "0.139.21", path = "../swc_css_visit" } swc_malloc = { version = "0.5.10", path = "../swc_malloc" } -testing = { version = "0.35.20", path = "../testing" } +testing = { version = "0.35.21", path = "../testing" } [[bench]] harness = false diff --git a/crates/swc_css_prefixer/Cargo.toml b/crates/swc_css_prefixer/Cargo.toml index f37fb6d971c1..b0d652036152 100644 --- a/crates/swc_css_prefixer/Cargo.toml +++ b/crates/swc_css_prefixer/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/**/*.json", "data/**/*.json"] license = "Apache-2.0" name = "swc_css_prefixer" repository = "https://github.com/swc-project/swc.git" -version = "0.153.34" +version = "0.153.35" [lib] bench = false @@ -19,12 +19,12 @@ serde_json = "1.0.61" preset_env_base = { version = "0.4.11", path = "../preset_env_base" } swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_css_ast = { version = "0.140.20", path = "../swc_css_ast" } -swc_css_utils = { version = "0.137.20", path = "../swc_css_utils/" } -swc_css_visit = { version = "0.139.20", path = "../swc_css_visit" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_css_ast = { version = "0.140.21", path = "../swc_css_ast" } +swc_css_utils = { version = "0.137.21", path = "../swc_css_utils/" } +swc_css_visit = { version = "0.139.21", path = "../swc_css_visit" } [dev-dependencies] -swc_css_codegen = { version = "0.151.30", path = "../swc_css_codegen" } -swc_css_parser = { version = "0.150.29", path = "../swc_css_parser" } -testing = { version = "0.35.20", path = "../testing" } +swc_css_codegen = { version = "0.151.31", path = "../swc_css_codegen" } +swc_css_parser = { version = "0.150.30", path = "../swc_css_parser" } +testing = { version = "0.35.21", path = "../testing" } diff --git a/crates/swc_css_utils/Cargo.toml b/crates/swc_css_utils/Cargo.toml index afd75736e814..0466d65cd9be 100644 --- a/crates/swc_css_utils/Cargo.toml +++ b/crates/swc_css_utils/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/**/*.json"] license = "Apache-2.0" name = "swc_css_utils" repository = "https://github.com/swc-project/swc.git" -version = "0.137.20" +version = "0.137.21" [lib] bench = false @@ -18,6 +18,6 @@ serde = { version = "1.0.118", features = ["derive"] } serde_json = "1.0.61" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_css_ast = { version = "0.140.20", path = "../swc_css_ast" } -swc_css_visit = { version = "0.139.20", path = "../swc_css_visit" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_css_ast = { version = "0.140.21", path = "../swc_css_ast" } +swc_css_visit = { version = "0.139.21", path = "../swc_css_visit" } diff --git a/crates/swc_css_visit/Cargo.toml b/crates/swc_css_visit/Cargo.toml index efc440baffbd..df6fc19320f0 100644 --- a/crates/swc_css_visit/Cargo.toml +++ b/crates/swc_css_visit/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_css_visit" repository = "https://github.com/swc-project/swc.git" -version = "0.139.20" +version = "0.139.21" [package.metadata.docs.rs] all-features = true @@ -23,6 +23,6 @@ path = [] serde = { version = "1", optional = true } swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_css_ast = { version = "0.140.20", path = "../swc_css_ast" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_css_ast = { version = "0.140.21", path = "../swc_css_ast" } swc_visit = { version = "0.5.10", path = "../swc_visit" } diff --git a/crates/swc_ecma_ast/Cargo.toml b/crates/swc_ecma_ast/Cargo.toml index 0ec2619a9772..6d9e56233ad9 100644 --- a/crates/swc_ecma_ast/Cargo.toml +++ b/crates/swc_ecma_ast/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_ast" repository = "https://github.com/swc-project/swc.git" -version = "0.112.5" +version = "0.112.6" [package.metadata.docs.rs] all-features = true @@ -45,7 +45,7 @@ unicode-id = "0.3" string_enum = { version = "0.4.2", path = "../string_enum" } swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } +swc_common = { version = "0.33.20", path = "../swc_common" } phf = { version = "0.11.2", features = ["macros"] } [dev-dependencies] diff --git a/crates/swc_ecma_codegen/Cargo.toml b/crates/swc_ecma_codegen/Cargo.toml index 564928605793..e9b17622c93a 100644 --- a/crates/swc_ecma_codegen/Cargo.toml +++ b/crates/swc_ecma_codegen/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_codegen" repository = "https://github.com/swc-project/swc.git" -version = "0.148.11" +version = "0.148.12" [features] # This does not enable serde for ast nodes. @@ -26,8 +26,8 @@ sourcemap = "6.4" tracing = "0.1.37" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } swc_ecma_codegen_macros = { version = "0.7.4", path = "../swc_ecma_codegen_macros" } [dev-dependencies] @@ -35,13 +35,13 @@ base64 = "0.21" criterion = "0.5" serde_json = "1" -swc_common = { version = "0.33.19", path = "../swc_common", features = [ +swc_common = { version = "0.33.20", path = "../swc_common", features = [ "sourcemap", ] } -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -swc_ecma_testing = { version = "0.22.21", path = "../swc_ecma_testing" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +swc_ecma_testing = { version = "0.22.22", path = "../swc_ecma_testing" } swc_malloc = { version = "0.5.10", path = "../swc_malloc" } -testing = { version = "0.35.20", path = "../testing" } +testing = { version = "0.35.21", path = "../testing" } [[bench]] harness = false diff --git a/crates/swc_ecma_compat_bugfixes/Cargo.toml b/crates/swc_ecma_compat_bugfixes/Cargo.toml index 205b8a40f14c..bc56f475eda9 100644 --- a/crates/swc_ecma_compat_bugfixes/Cargo.toml +++ b/crates/swc_ecma_compat_bugfixes/Cargo.toml @@ -7,20 +7,20 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_compat_bugfixes" repository = "https://github.com/swc-project/swc.git" -version = "0.4.16" +version = "0.4.17" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_compat_es2015 = { version = "0.4.16", path = "../swc_ecma_compat_es2015" } -swc_ecma_transforms_base = { version = "0.137.15", path = "../swc_ecma_transforms_base" } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_compat_es2015 = { version = "0.4.17", path = "../swc_ecma_compat_es2015" } +swc_ecma_transforms_base = { version = "0.137.16", path = "../swc_ecma_transforms_base" } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } swc_trace_macro = { version = "0.1.3", path = "../swc_trace_macro" } tracing = "0.1.37" [dev-dependencies] -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -swc_ecma_transforms_testing = { version = "0.140.15", path = "../swc_ecma_transforms_testing" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +swc_ecma_transforms_testing = { version = "0.140.16", path = "../swc_ecma_transforms_testing" } diff --git a/crates/swc_ecma_compat_common/Cargo.toml b/crates/swc_ecma_compat_common/Cargo.toml index 83698b9a064a..78b021101927 100644 --- a/crates/swc_ecma_compat_common/Cargo.toml +++ b/crates/swc_ecma_compat_common/Cargo.toml @@ -7,13 +7,13 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_compat_common" repository = "https://github.com/swc-project/swc.git" -version = "0.4.12" +version = "0.4.13" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } swc_trace_macro = { version = "0.1.3", path = "../swc_trace_macro" } diff --git a/crates/swc_ecma_compat_es2015/Cargo.toml b/crates/swc_ecma_compat_es2015/Cargo.toml index c031a1da0bd3..29b60f8de51b 100644 --- a/crates/swc_ecma_compat_es2015/Cargo.toml +++ b/crates/swc_ecma_compat_es2015/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_compat_es2015" repository = "https://github.com/swc-project/swc.git" -version = "0.4.16" +version = "0.4.17" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -22,18 +22,18 @@ smallvec = "1.8.0" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } +swc_common = { version = "0.33.20", path = "../swc_common" } swc_config = { version = "0.1.11", path = "../swc_config" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_compat_common = { version = "0.4.12", path = "../swc_ecma_compat_common" } -swc_ecma_transforms_base = { version = "0.137.15", path = "../swc_ecma_transforms_base" } -swc_ecma_transforms_classes = { version = "0.126.15", path = "../swc_ecma_transforms_classes" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_compat_common = { version = "0.4.13", path = "../swc_ecma_compat_common" } +swc_ecma_transforms_base = { version = "0.137.16", path = "../swc_ecma_transforms_base" } +swc_ecma_transforms_classes = { version = "0.126.16", path = "../swc_ecma_transforms_classes" } swc_ecma_transforms_macros = { version = "0.5.4", path = "../swc_ecma_transforms_macros" } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } swc_trace_macro = { version = "0.1.3", path = "../swc_trace_macro" } tracing = "0.1.37" [dev-dependencies] -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -swc_ecma_transforms_testing = { version = "0.140.15", path = "../swc_ecma_transforms_testing" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +swc_ecma_transforms_testing = { version = "0.140.16", path = "../swc_ecma_transforms_testing" } diff --git a/crates/swc_ecma_compat_es2016/Cargo.toml b/crates/swc_ecma_compat_es2016/Cargo.toml index 78016b5d235a..c6756056063e 100644 --- a/crates/swc_ecma_compat_es2016/Cargo.toml +++ b/crates/swc_ecma_compat_es2016/Cargo.toml @@ -7,22 +7,22 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_compat_es2016" repository = "https://github.com/swc-project/swc.git" -version = "0.4.15" +version = "0.4.16" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_transforms_base = { version = "0.137.15", path = "../swc_ecma_transforms_base" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_transforms_base = { version = "0.137.16", path = "../swc_ecma_transforms_base" } swc_ecma_transforms_macros = { version = "0.5.4", path = "../swc_ecma_transforms_macros" } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } swc_trace_macro = { version = "0.1.3", path = "../swc_trace_macro" } tracing = "0.1.37" [dev-dependencies] -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -swc_ecma_transforms_testing = { version = "0.140.15", path = "../swc_ecma_transforms_testing" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +swc_ecma_transforms_testing = { version = "0.140.16", path = "../swc_ecma_transforms_testing" } diff --git a/crates/swc_ecma_compat_es2017/Cargo.toml b/crates/swc_ecma_compat_es2017/Cargo.toml index ff12b27f1670..6101b360c63f 100644 --- a/crates/swc_ecma_compat_es2017/Cargo.toml +++ b/crates/swc_ecma_compat_es2017/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_compat_es2017" repository = "https://github.com/swc-project/swc.git" -version = "0.4.15" +version = "0.4.16" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -17,14 +17,14 @@ serde = { version = "1.0.188", features = ["derive"] } tracing = "0.1.37" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_transforms_base = { version = "0.137.15", path = "../swc_ecma_transforms_base" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_transforms_base = { version = "0.137.16", path = "../swc_ecma_transforms_base" } swc_ecma_transforms_macros = { version = "0.5.4", path = "../swc_ecma_transforms_macros" } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } swc_trace_macro = { version = "0.1.3", path = "../swc_trace_macro" } [dev-dependencies] -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -swc_ecma_transforms_testing = { version = "0.140.15", path = "../swc_ecma_transforms_testing" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +swc_ecma_transforms_testing = { version = "0.140.16", path = "../swc_ecma_transforms_testing" } diff --git a/crates/swc_ecma_compat_es2018/Cargo.toml b/crates/swc_ecma_compat_es2018/Cargo.toml index 76bf55372d43..a167b3510369 100644 --- a/crates/swc_ecma_compat_es2018/Cargo.toml +++ b/crates/swc_ecma_compat_es2018/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_compat_es2018" repository = "https://github.com/swc-project/swc.git" -version = "0.4.15" +version = "0.4.16" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -17,15 +17,15 @@ serde = { version = "1.0.188", features = ["derive"] } tracing = "0.1.37" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_compat_common = { version = "0.4.12", path = "../swc_ecma_compat_common" } -swc_ecma_transforms_base = { version = "0.137.15", path = "../swc_ecma_transforms_base" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_compat_common = { version = "0.4.13", path = "../swc_ecma_compat_common" } +swc_ecma_transforms_base = { version = "0.137.16", path = "../swc_ecma_transforms_base" } swc_ecma_transforms_macros = { version = "0.5.4", path = "../swc_ecma_transforms_macros" } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } swc_trace_macro = { version = "0.1.3", path = "../swc_trace_macro" } [dev-dependencies] -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -swc_ecma_transforms_testing = { version = "0.140.15", path = "../swc_ecma_transforms_testing" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +swc_ecma_transforms_testing = { version = "0.140.16", path = "../swc_ecma_transforms_testing" } diff --git a/crates/swc_ecma_compat_es2019/Cargo.toml b/crates/swc_ecma_compat_es2019/Cargo.toml index 1a13fd1cd41d..f6808d973b91 100644 --- a/crates/swc_ecma_compat_es2019/Cargo.toml +++ b/crates/swc_ecma_compat_es2019/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_compat_es2019" repository = "https://github.com/swc-project/swc.git" -version = "0.4.15" +version = "0.4.16" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -17,13 +17,13 @@ tracing = "0.1.37" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_transforms_base = { version = "0.137.15", path = "../swc_ecma_transforms_base" } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_transforms_base = { version = "0.137.16", path = "../swc_ecma_transforms_base" } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } swc_trace_macro = { version = "0.1.3", path = "../swc_trace_macro" } [dev-dependencies] -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -swc_ecma_transforms_testing = { version = "0.140.15", path = "../swc_ecma_transforms_testing" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +swc_ecma_transforms_testing = { version = "0.140.16", path = "../swc_ecma_transforms_testing" } diff --git a/crates/swc_ecma_compat_es2020/Cargo.toml b/crates/swc_ecma_compat_es2020/Cargo.toml index 1aebae57c87c..466b7cefd456 100644 --- a/crates/swc_ecma_compat_es2020/Cargo.toml +++ b/crates/swc_ecma_compat_es2020/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_compat_es2020" repository = "https://github.com/swc-project/swc.git" -version = "0.4.15" +version = "0.4.16" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -15,15 +15,15 @@ version = "0.4.15" [dependencies] serde = { version = "1.0.188", features = ["derive"] } swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_compat_es2022 = { version = "0.4.15", path = "../swc_ecma_compat_es2022" } -swc_ecma_transforms_base = { version = "0.137.15", path = "../swc_ecma_transforms_base" } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_compat_es2022 = { version = "0.4.16", path = "../swc_ecma_compat_es2022" } +swc_ecma_transforms_base = { version = "0.137.16", path = "../swc_ecma_transforms_base" } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } swc_trace_macro = { version = "0.1.3", path = "../swc_trace_macro" } tracing = "0.1.37" [dev-dependencies] -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -swc_ecma_transforms_testing = { version = "0.140.15", path = "../swc_ecma_transforms_testing" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +swc_ecma_transforms_testing = { version = "0.140.16", path = "../swc_ecma_transforms_testing" } diff --git a/crates/swc_ecma_compat_es2021/Cargo.toml b/crates/swc_ecma_compat_es2021/Cargo.toml index aa36b6fc4f78..001e6d41c354 100644 --- a/crates/swc_ecma_compat_es2021/Cargo.toml +++ b/crates/swc_ecma_compat_es2021/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_compat_es2021" repository = "https://github.com/swc-project/swc.git" -version = "0.4.15" +version = "0.4.16" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -16,9 +16,9 @@ version = "0.4.15" tracing = "0.1.37" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_transforms_base = { version = "0.137.15", path = "../swc_ecma_transforms_base" } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_transforms_base = { version = "0.137.16", path = "../swc_ecma_transforms_base" } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } swc_trace_macro = { version = "0.1.3", path = "../swc_trace_macro" } diff --git a/crates/swc_ecma_compat_es2022/Cargo.toml b/crates/swc_ecma_compat_es2022/Cargo.toml index 2f92e744478c..9f7faa980781 100644 --- a/crates/swc_ecma_compat_es2022/Cargo.toml +++ b/crates/swc_ecma_compat_es2022/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_compat_es2022" repository = "https://github.com/swc-project/swc.git" -version = "0.4.15" +version = "0.4.16" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -17,12 +17,12 @@ tracing = "0.1.37" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_compat_common = { version = "0.4.12", path = "../swc_ecma_compat_common" } -swc_ecma_transforms_base = { version = "0.137.15", path = "../swc_ecma_transforms_base" } -swc_ecma_transforms_classes = { version = "0.126.15", path = "../swc_ecma_transforms_classes" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_compat_common = { version = "0.4.13", path = "../swc_ecma_compat_common" } +swc_ecma_transforms_base = { version = "0.137.16", path = "../swc_ecma_transforms_base" } +swc_ecma_transforms_classes = { version = "0.126.16", path = "../swc_ecma_transforms_classes" } swc_ecma_transforms_macros = { version = "0.5.4", path = "../swc_ecma_transforms_macros" } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } swc_trace_macro = { version = "0.1.3", path = "../swc_trace_macro" } diff --git a/crates/swc_ecma_compat_es3/Cargo.toml b/crates/swc_ecma_compat_es3/Cargo.toml index 5d550365c143..157ab93f534b 100644 --- a/crates/swc_ecma_compat_es3/Cargo.toml +++ b/crates/swc_ecma_compat_es3/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_compat_es3" repository = "https://github.com/swc-project/swc.git" -version = "0.4.15" +version = "0.4.16" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -15,13 +15,13 @@ version = "0.4.15" [dependencies] tracing = "0.1.37" -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_transforms_base = { version = "0.137.15", path = "../swc_ecma_transforms_base" } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_transforms_base = { version = "0.137.16", path = "../swc_ecma_transforms_base" } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } swc_trace_macro = { version = "0.1.3", path = "../swc_trace_macro" } [dev-dependencies] -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -swc_ecma_transforms_testing = { version = "0.140.15", path = "../swc_ecma_transforms_testing" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +swc_ecma_transforms_testing = { version = "0.140.16", path = "../swc_ecma_transforms_testing" } diff --git a/crates/swc_ecma_ext_transforms/Cargo.toml b/crates/swc_ecma_ext_transforms/Cargo.toml index b3ecbc2a26bf..82e57b5c0b8b 100644 --- a/crates/swc_ecma_ext_transforms/Cargo.toml +++ b/crates/swc_ecma_ext_transforms/Cargo.toml @@ -5,7 +5,7 @@ documentation = "https://rustdoc.swc.rs/swc_ecma_ext_transforms/" edition = "2021" license = "Apache-2.0" name = "swc_ecma_ext_transforms" -version = "0.113.12" +version = "0.113.13" [lib] bench = false @@ -14,7 +14,7 @@ bench = false phf = { version = "0.11", features = ["macros"] } swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } diff --git a/crates/swc_ecma_lints/Cargo.toml b/crates/swc_ecma_lints/Cargo.toml index a85768d9cb80..8328abe7418e 100644 --- a/crates/swc_ecma_lints/Cargo.toml +++ b/crates/swc_ecma_lints/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_lints" repository = "https://github.com/swc-project/swc.git" -version = "0.92.17" +version = "0.92.18" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] @@ -21,21 +21,21 @@ regex = "1" serde = { version = "1.0.133", features = ["derive"] } swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common", features = [ +swc_common = { version = "0.33.20", path = "../swc_common", features = [ "concurrent", ] } swc_config = { version = "0.1.11", path = "../swc_config" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast", features = [ +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast", features = [ "serde", ] } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } [dev-dependencies] -swc_ecma_codegen = { version = "0.148.11", path = "../swc_ecma_codegen" } -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -swc_ecma_transforms_base = { version = "0.137.15", path = "../swc_ecma_transforms_base" } -testing = { version = "0.35.20", path = "../testing" } +swc_ecma_codegen = { version = "0.148.12", path = "../swc_ecma_codegen" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +swc_ecma_transforms_base = { version = "0.137.16", path = "../swc_ecma_transforms_base" } +testing = { version = "0.35.21", path = "../testing" } [features] non_critical_lints = [] diff --git a/crates/swc_ecma_loader/Cargo.toml b/crates/swc_ecma_loader/Cargo.toml index 184d45d64d91..1a45cafc7c4f 100644 --- a/crates/swc_ecma_loader/Cargo.toml +++ b/crates/swc_ecma_loader/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_loader" repository = "https://github.com/swc-project/swc.git" -version = "0.45.22" +version = "0.45.23" [package.metadata.docs.rs] all-features = true @@ -38,7 +38,7 @@ tracing = "0.1.37" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_cached = { version = "0.3.19", optional = true, path = "../swc_cached" } -swc_common = { version = "0.33.19", path = "../swc_common" } +swc_common = { version = "0.33.20", path = "../swc_common" } [dev-dependencies] lazy_static = "1.4.0" diff --git a/crates/swc_ecma_minifier/Cargo.toml b/crates/swc_ecma_minifier/Cargo.toml index da9bd87d5e06..6d9fd1e69750 100644 --- a/crates/swc_ecma_minifier/Cargo.toml +++ b/crates/swc_ecma_minifier/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/lists/*.json"] license = "Apache-2.0" name = "swc_ecma_minifier" repository = "https://github.com/swc-project/swc.git" -version = "0.192.17" +version = "0.192.18" [package.metadata.docs.rs] all-features = true @@ -51,21 +51,21 @@ serde_json = "1.0.61" tracing = "0.1.37" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } +swc_common = { version = "0.33.20", path = "../swc_common" } swc_config = { version = "0.1.11", path = "../swc_config", features = [ "sourcemap", ] } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast", features = [ +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast", features = [ "serde", ] } -swc_ecma_codegen = { version = "0.148.11", path = "../swc_ecma_codegen" } -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -swc_ecma_transforms_base = { version = "0.137.15", path = "../swc_ecma_transforms_base" } -swc_ecma_transforms_optimization = { version = "0.198.16", path = "../swc_ecma_transforms_optimization" } -swc_ecma_usage_analyzer = { version = "0.23.12", path = "../swc_ecma_usage_analyzer" } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } -swc_timer = { version = "0.21.20", path = "../swc_timer" } +swc_ecma_codegen = { version = "0.148.12", path = "../swc_ecma_codegen" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +swc_ecma_transforms_base = { version = "0.137.16", path = "../swc_ecma_transforms_base" } +swc_ecma_transforms_optimization = { version = "0.198.17", path = "../swc_ecma_transforms_optimization" } +swc_ecma_usage_analyzer = { version = "0.23.13", path = "../swc_ecma_usage_analyzer" } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } +swc_timer = { version = "0.21.21", path = "../swc_timer" } [dev-dependencies] ansi_term = "0.12.1" @@ -74,9 +74,9 @@ criterion = "0.5.1" pretty_assertions = "1.3" walkdir = "2" -swc_ecma_testing = { version = "0.22.21", path = "../swc_ecma_testing" } +swc_ecma_testing = { version = "0.22.22", path = "../swc_ecma_testing" } swc_malloc = { version = "0.5.10", path = "../swc_malloc" } -testing = { version = "0.35.20", path = "../testing" } +testing = { version = "0.35.21", path = "../testing" } [[bench]] harness = false diff --git a/crates/swc_ecma_parser/Cargo.toml b/crates/swc_ecma_parser/Cargo.toml index 47fd1e665f33..1bf91c00aca8 100644 --- a/crates/swc_ecma_parser/Cargo.toml +++ b/crates/swc_ecma_parser/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "examples/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_parser" repository = "https://github.com/swc-project/swc.git" -version = "0.143.9" +version = "0.143.10" [package.metadata.docs.rs] all-features = true @@ -36,9 +36,9 @@ typed-arena = "2.0.1" new_debug_unreachable = "1.0.4" phf = { version = "0.11.2", features = ["macros"] } swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit", optional = true } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit", optional = true } [target.'cfg(not(any(target_arch = "wasm32", target_arch = "arm")))'.dependencies] stacker = { version = "0.1.15", optional = true } @@ -49,12 +49,12 @@ pretty_assertions = "1.3" serde_json = "1" walkdir = "2" -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast", features = [ +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast", features = [ "serde-impl", ] } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } swc_malloc = { version = "0.5.10", path = "../swc_malloc" } -testing = { version = "0.35.20", path = "../testing" } +testing = { version = "0.35.21", path = "../testing" } [[example]] name = "lexer" diff --git a/crates/swc_ecma_preset_env/Cargo.toml b/crates/swc_ecma_preset_env/Cargo.toml index 5a27c8e0402f..ddfb5024ea16 100644 --- a/crates/swc_ecma_preset_env/Cargo.toml +++ b/crates/swc_ecma_preset_env/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" include = ["Cargo.toml", "src/**/*.rs", "src/**/*.json", "data/**/*.json"] license = "Apache-2.0" name = "swc_ecma_preset_env" -version = "0.206.16" +version = "0.206.17" [lib] bench = false @@ -30,22 +30,22 @@ preset_env_base = { version = "0.4.11", path = "../preset_env_base" } rustc-hash = "1.1.0" string_enum = { version = "0.4.2", path = "../string_enum" } swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_transforms = { version = "0.229.16", path = "../swc_ecma_transforms", features = [ +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_transforms = { version = "0.229.17", path = "../swc_ecma_transforms", features = [ "compat", "proposal", ] } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } [dev-dependencies] criterion = "0.5" pretty_assertions = "1.3" -swc_ecma_codegen = { version = "0.148.11", path = "../swc_ecma_codegen" } -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -testing = { version = "0.35.20", path = "../testing" } +swc_ecma_codegen = { version = "0.148.12", path = "../swc_ecma_codegen" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +testing = { version = "0.35.21", path = "../testing" } [[bench]] harness = false diff --git a/crates/swc_ecma_quote/Cargo.toml b/crates/swc_ecma_quote/Cargo.toml index d3583340edd8..564742a59c0a 100644 --- a/crates/swc_ecma_quote/Cargo.toml +++ b/crates/swc_ecma_quote/Cargo.toml @@ -6,16 +6,16 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_quote" repository = "https://github.com/swc-project/swc.git" -version = "0.59.12" +version = "0.59.13" [lib] bench = false [dependencies] swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_quote_macros = { version = "0.54.12", path = "../swc_ecma_quote_macros" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_quote_macros = { version = "0.54.13", path = "../swc_ecma_quote_macros" } [dev-dependencies] -testing = { version = "0.35.20", path = "../testing" } +testing = { version = "0.35.21", path = "../testing" } diff --git a/crates/swc_ecma_quote_macros/Cargo.toml b/crates/swc_ecma_quote_macros/Cargo.toml index 5918a764d71e..544b310002fb 100644 --- a/crates/swc_ecma_quote_macros/Cargo.toml +++ b/crates/swc_ecma_quote_macros/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_quote_macros" repository = "https://github.com/swc-project/swc.git" -version = "0.54.12" +version = "0.54.13" [lib] bench = false @@ -19,7 +19,7 @@ quote = "1" syn = "2" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } swc_macros_common = { version = "0.3.9", path = "../swc_macros_common" } diff --git a/crates/swc_ecma_testing/Cargo.toml b/crates/swc_ecma_testing/Cargo.toml index 413b89a95500..2c5be32c03bb 100644 --- a/crates/swc_ecma_testing/Cargo.toml +++ b/crates/swc_ecma_testing/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_testing" repository = "https://github.com/swc-project/swc.git" -version = "0.22.21" +version = "0.22.22" [lib] bench = false @@ -17,4 +17,4 @@ hex = "0.4" sha2 = "0.10" tracing = "0.1.37" -testing = { version = "0.35.20", path = "../testing" } +testing = { version = "0.35.21", path = "../testing" } diff --git a/crates/swc_ecma_transforms/Cargo.toml b/crates/swc_ecma_transforms/Cargo.toml index 0e5bd1c87c96..6b04a093befe 100644 --- a/crates/swc_ecma_transforms/Cargo.toml +++ b/crates/swc_ecma_transforms/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms" repository = "https://github.com/swc-project/swc.git" -version = "0.229.16" +version = "0.229.17" [package.metadata.docs.rs] all-features = true @@ -32,24 +32,24 @@ typescript = ["swc_ecma_transforms_typescript"] [dependencies] swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_transforms_base = { version = "0.137.15", path = "../swc_ecma_transforms_base" } -swc_ecma_transforms_compat = { version = "0.163.16", path = "../swc_ecma_transforms_compat", optional = true } -swc_ecma_transforms_module = { version = "0.180.16", path = "../swc_ecma_transforms_module", optional = true } -swc_ecma_transforms_optimization = { version = "0.198.16", path = "../swc_ecma_transforms_optimization", optional = true } -swc_ecma_transforms_proposal = { version = "0.171.16", path = "../swc_ecma_transforms_proposal", optional = true } -swc_ecma_transforms_react = { version = "0.183.16", path = "../swc_ecma_transforms_react", optional = true } -swc_ecma_transforms_typescript = { version = "0.188.16", path = "../swc_ecma_transforms_typescript", optional = true } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_transforms_base = { version = "0.137.16", path = "../swc_ecma_transforms_base" } +swc_ecma_transforms_compat = { version = "0.163.17", path = "../swc_ecma_transforms_compat", optional = true } +swc_ecma_transforms_module = { version = "0.180.17", path = "../swc_ecma_transforms_module", optional = true } +swc_ecma_transforms_optimization = { version = "0.198.17", path = "../swc_ecma_transforms_optimization", optional = true } +swc_ecma_transforms_proposal = { version = "0.171.17", path = "../swc_ecma_transforms_proposal", optional = true } +swc_ecma_transforms_react = { version = "0.183.17", path = "../swc_ecma_transforms_react", optional = true } +swc_ecma_transforms_typescript = { version = "0.188.17", path = "../swc_ecma_transforms_typescript", optional = true } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } [dev-dependencies] pretty_assertions = "1.3" sourcemap = "6.4" tempfile = "3" -swc_ecma_codegen = { version = "0.148.11", path = "../swc_ecma_codegen" } -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -swc_ecma_transforms_testing = { version = "0.140.15", path = "../swc_ecma_transforms_testing" } -testing = { version = "0.35.20", path = "../testing" } +swc_ecma_codegen = { version = "0.148.12", path = "../swc_ecma_codegen" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +swc_ecma_transforms_testing = { version = "0.140.16", path = "../swc_ecma_transforms_testing" } +testing = { version = "0.35.21", path = "../testing" } diff --git a/crates/swc_ecma_transforms_base/Cargo.toml b/crates/swc_ecma_transforms_base/Cargo.toml index 04f54c61eed4..49211fbe803a 100644 --- a/crates/swc_ecma_transforms_base/Cargo.toml +++ b/crates/swc_ecma_transforms_base/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/**/*.js"] license = "Apache-2.0" name = "swc_ecma_transforms_base" repository = "https://github.com/swc-project/swc.git" -version = "0.137.15" +version = "0.137.16" [lib] bench = false @@ -29,20 +29,20 @@ smallvec = "1.8.0" tracing = "0.1.37" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } [dev-dependencies] criterion = "0.5" rayon = "1" -swc_ecma_codegen = { version = "0.148.11", path = "../swc_ecma_codegen" } +swc_ecma_codegen = { version = "0.148.12", path = "../swc_ecma_codegen" } swc_ecma_transforms_macros = { version = "0.5.4", path = "../swc_ecma_transforms_macros" } swc_malloc = { version = "0.5.10", path = "../swc_malloc" } -testing = { version = "0.35.20", path = "../testing" } +testing = { version = "0.35.21", path = "../testing" } [[bench]] harness = false diff --git a/crates/swc_ecma_transforms_classes/Cargo.toml b/crates/swc_ecma_transforms_classes/Cargo.toml index cbc206beeaef..c84ad49fa8d8 100644 --- a/crates/swc_ecma_transforms_classes/Cargo.toml +++ b/crates/swc_ecma_transforms_classes/Cargo.toml @@ -6,15 +6,15 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_transforms_classes" repository = "https://github.com/swc-project/swc.git" -version = "0.126.15" +version = "0.126.16" [lib] bench = false [dependencies] swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_transforms_base = { version = "0.137.15", path = "../swc_ecma_transforms_base" } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_transforms_base = { version = "0.137.16", path = "../swc_ecma_transforms_base" } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } diff --git a/crates/swc_ecma_transforms_compat/Cargo.toml b/crates/swc_ecma_transforms_compat/Cargo.toml index edf884db6eee..197eae3010d6 100644 --- a/crates/swc_ecma_transforms_compat/Cargo.toml +++ b/crates/swc_ecma_transforms_compat/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_compat" repository = "https://github.com/swc-project/swc.git" -version = "0.163.16" +version = "0.163.17" [lib] bench = false @@ -30,30 +30,30 @@ smallvec = "1.8.0" tracing = "0.1.37" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } +swc_common = { version = "0.33.20", path = "../swc_common" } swc_config = { version = "0.1.11", path = "../swc_config" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_compat_bugfixes = { version = "0.4.16", path = "../swc_ecma_compat_bugfixes" } -swc_ecma_compat_common = { version = "0.4.12", path = "../swc_ecma_compat_common" } -swc_ecma_compat_es2015 = { version = "0.4.16", path = "../swc_ecma_compat_es2015" } -swc_ecma_compat_es2016 = { version = "0.4.15", path = "../swc_ecma_compat_es2016" } -swc_ecma_compat_es2017 = { version = "0.4.15", path = "../swc_ecma_compat_es2017" } -swc_ecma_compat_es2018 = { version = "0.4.15", path = "../swc_ecma_compat_es2018" } -swc_ecma_compat_es2019 = { version = "0.4.15", path = "../swc_ecma_compat_es2019" } -swc_ecma_compat_es2020 = { version = "0.4.15", path = "../swc_ecma_compat_es2020" } -swc_ecma_compat_es2021 = { version = "0.4.15", path = "../swc_ecma_compat_es2021" } -swc_ecma_compat_es2022 = { version = "0.4.15", path = "../swc_ecma_compat_es2022" } -swc_ecma_compat_es3 = { version = "0.4.15", path = "../swc_ecma_compat_es3" } -swc_ecma_transforms_base = { version = "0.137.15", path = "../swc_ecma_transforms_base" } -swc_ecma_transforms_classes = { version = "0.126.15", path = "../swc_ecma_transforms_classes" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_compat_bugfixes = { version = "0.4.17", path = "../swc_ecma_compat_bugfixes" } +swc_ecma_compat_common = { version = "0.4.13", path = "../swc_ecma_compat_common" } +swc_ecma_compat_es2015 = { version = "0.4.17", path = "../swc_ecma_compat_es2015" } +swc_ecma_compat_es2016 = { version = "0.4.16", path = "../swc_ecma_compat_es2016" } +swc_ecma_compat_es2017 = { version = "0.4.16", path = "../swc_ecma_compat_es2017" } +swc_ecma_compat_es2018 = { version = "0.4.16", path = "../swc_ecma_compat_es2018" } +swc_ecma_compat_es2019 = { version = "0.4.16", path = "../swc_ecma_compat_es2019" } +swc_ecma_compat_es2020 = { version = "0.4.16", path = "../swc_ecma_compat_es2020" } +swc_ecma_compat_es2021 = { version = "0.4.16", path = "../swc_ecma_compat_es2021" } +swc_ecma_compat_es2022 = { version = "0.4.16", path = "../swc_ecma_compat_es2022" } +swc_ecma_compat_es3 = { version = "0.4.16", path = "../swc_ecma_compat_es3" } +swc_ecma_transforms_base = { version = "0.137.16", path = "../swc_ecma_transforms_base" } +swc_ecma_transforms_classes = { version = "0.126.16", path = "../swc_ecma_transforms_classes" } swc_ecma_transforms_macros = { version = "0.5.4", path = "../swc_ecma_transforms_macros" } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } swc_trace_macro = { version = "0.1.3", path = "../swc_trace_macro" } [dev-dependencies] serde_json = "1.0.66" -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -swc_ecma_transforms_testing = { version = "0.140.15", path = "../swc_ecma_transforms_testing" } -testing = { version = "0.35.20", path = "../testing" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +swc_ecma_transforms_testing = { version = "0.140.16", path = "../swc_ecma_transforms_testing" } +testing = { version = "0.35.21", path = "../testing" } diff --git a/crates/swc_ecma_transforms_module/Cargo.toml b/crates/swc_ecma_transforms_module/Cargo.toml index 39952a0da31a..93c14957a9dc 100644 --- a/crates/swc_ecma_transforms_module/Cargo.toml +++ b/crates/swc_ecma_transforms_module/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_module" repository = "https://github.com/swc-project/swc.git" -version = "0.180.16" +version = "0.180.17" [lib] bench = false @@ -26,24 +26,24 @@ tracing = "0.1.37" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_cached = { version = "0.3.19", path = "../swc_cached" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_loader = { version = "0.45.22", path = "../swc_ecma_loader", features = [ +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_loader = { version = "0.45.23", path = "../swc_ecma_loader", features = [ "node", ] } -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -swc_ecma_transforms_base = { version = "0.137.15", path = "../swc_ecma_transforms_base" } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +swc_ecma_transforms_base = { version = "0.137.16", path = "../swc_ecma_transforms_base" } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } [dev-dependencies] indexmap = { version = "2.0.0", features = ["serde"] } serde_json = "1" -swc_ecma_loader = { version = "0.45.22", path = "../swc_ecma_loader", features = [ +swc_ecma_loader = { version = "0.45.23", path = "../swc_ecma_loader", features = [ "node", "tsc", ] } -swc_ecma_transforms_compat = { version = "0.163.16", path = "../swc_ecma_transforms_compat" } -swc_ecma_transforms_testing = { version = "0.140.15", path = "../swc_ecma_transforms_testing" } -testing = { version = "0.35.20", path = "../testing/" } +swc_ecma_transforms_compat = { version = "0.163.17", path = "../swc_ecma_transforms_compat" } +swc_ecma_transforms_testing = { version = "0.140.16", path = "../swc_ecma_transforms_testing" } +testing = { version = "0.35.21", path = "../testing/" } diff --git a/crates/swc_ecma_transforms_optimization/Cargo.toml b/crates/swc_ecma_transforms_optimization/Cargo.toml index 3f402c71a499..1d6fd1ec8219 100644 --- a/crates/swc_ecma_transforms_optimization/Cargo.toml +++ b/crates/swc_ecma_transforms_optimization/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_optimization" repository = "https://github.com/swc-project/swc.git" -version = "0.198.16" +version = "0.198.17" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] @@ -32,20 +32,20 @@ serde_json = "1.0.61" tracing = "0.1.37" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -swc_ecma_transforms_base = { version = "0.137.15", path = "../swc_ecma_transforms_base" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +swc_ecma_transforms_base = { version = "0.137.16", path = "../swc_ecma_transforms_base" } swc_ecma_transforms_macros = { version = "0.5.4", path = "../swc_ecma_transforms_macros" } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } -swc_fast_graph = { version = "0.21.19", path = "../swc_fast_graph" } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } +swc_fast_graph = { version = "0.21.20", path = "../swc_fast_graph" } [dev-dependencies] -swc_ecma_transforms_compat = { version = "0.163.16", path = "../swc_ecma_transforms_compat" } -swc_ecma_transforms_module = { version = "0.180.16", path = "../swc_ecma_transforms_module" } -swc_ecma_transforms_proposal = { version = "0.171.16", path = "../swc_ecma_transforms_proposal" } -swc_ecma_transforms_react = { version = "0.183.16", path = "../swc_ecma_transforms_react" } -swc_ecma_transforms_testing = { version = "0.140.15", path = "../swc_ecma_transforms_testing" } -swc_ecma_transforms_typescript = { version = "0.188.16", path = "../swc_ecma_transforms_typescript" } -testing = { version = "0.35.20", path = "../testing" } +swc_ecma_transforms_compat = { version = "0.163.17", path = "../swc_ecma_transforms_compat" } +swc_ecma_transforms_module = { version = "0.180.17", path = "../swc_ecma_transforms_module" } +swc_ecma_transforms_proposal = { version = "0.171.17", path = "../swc_ecma_transforms_proposal" } +swc_ecma_transforms_react = { version = "0.183.17", path = "../swc_ecma_transforms_react" } +swc_ecma_transforms_testing = { version = "0.140.16", path = "../swc_ecma_transforms_testing" } +swc_ecma_transforms_typescript = { version = "0.188.17", path = "../swc_ecma_transforms_typescript" } +testing = { version = "0.35.21", path = "../testing" } diff --git a/crates/swc_ecma_transforms_proposal/Cargo.toml b/crates/swc_ecma_transforms_proposal/Cargo.toml index 7c2d363b438d..830d58fab155 100644 --- a/crates/swc_ecma_transforms_proposal/Cargo.toml +++ b/crates/swc_ecma_transforms_proposal/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_proposal" repository = "https://github.com/swc-project/swc.git" -version = "0.171.16" +version = "0.171.17" [lib] bench = false @@ -23,19 +23,19 @@ serde = { version = "1.0.118", features = ["derive"] } smallvec = "1.8.0" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_loader = { version = "0.45.22", path = "../swc_ecma_loader", optional = true } -swc_ecma_transforms_base = { version = "0.137.15", path = "../swc_ecma_transforms_base" } -swc_ecma_transforms_classes = { version = "0.126.15", path = "../swc_ecma_transforms_classes" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_loader = { version = "0.45.23", path = "../swc_ecma_loader", optional = true } +swc_ecma_transforms_base = { version = "0.137.16", path = "../swc_ecma_transforms_base" } +swc_ecma_transforms_classes = { version = "0.126.16", path = "../swc_ecma_transforms_classes" } swc_ecma_transforms_macros = { version = "0.5.4", path = "../swc_ecma_transforms_macros" } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } [dev-dependencies] serde_json = "1.0.66" -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -swc_ecma_transforms_compat = { version = "0.163.16", path = "../swc_ecma_transforms_compat" } -swc_ecma_transforms_testing = { version = "0.140.15", path = "../swc_ecma_transforms_testing" } -testing = { version = "0.35.20", path = "../testing" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +swc_ecma_transforms_compat = { version = "0.163.17", path = "../swc_ecma_transforms_compat" } +swc_ecma_transforms_testing = { version = "0.140.16", path = "../swc_ecma_transforms_testing" } +testing = { version = "0.35.21", path = "../testing" } diff --git a/crates/swc_ecma_transforms_react/Cargo.toml b/crates/swc_ecma_transforms_react/Cargo.toml index df083bd8f492..2e59b669c012 100644 --- a/crates/swc_ecma_transforms_react/Cargo.toml +++ b/crates/swc_ecma_transforms_react/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_react" repository = "https://github.com/swc-project/swc.git" -version = "0.183.16" +version = "0.183.17" [lib] bench = false @@ -28,18 +28,18 @@ sha-1 = "=0.10.0" string_enum = { version = "0.4.2", path = "../string_enum" } swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } +swc_common = { version = "0.33.20", path = "../swc_common" } swc_config = { version = "0.1.11", path = "../swc_config" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -swc_ecma_transforms_base = { version = "0.137.15", path = "../swc_ecma_transforms_base" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +swc_ecma_transforms_base = { version = "0.137.16", path = "../swc_ecma_transforms_base" } swc_ecma_transforms_macros = { version = "0.5.4", path = "../swc_ecma_transforms_macros" } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } [dev-dependencies] -swc_ecma_codegen = { version = "0.148.11", path = "../swc_ecma_codegen/" } -swc_ecma_transforms_compat = { version = "0.163.16", path = "../swc_ecma_transforms_compat/" } -swc_ecma_transforms_module = { version = "0.180.16", path = "../swc_ecma_transforms_module" } -swc_ecma_transforms_testing = { version = "0.140.15", path = "../swc_ecma_transforms_testing" } -testing = { version = "0.35.20", path = "../testing" } +swc_ecma_codegen = { version = "0.148.12", path = "../swc_ecma_codegen/" } +swc_ecma_transforms_compat = { version = "0.163.17", path = "../swc_ecma_transforms_compat/" } +swc_ecma_transforms_module = { version = "0.180.17", path = "../swc_ecma_transforms_module" } +swc_ecma_transforms_testing = { version = "0.140.16", path = "../swc_ecma_transforms_testing" } +testing = { version = "0.35.21", path = "../testing" } diff --git a/crates/swc_ecma_transforms_testing/Cargo.toml b/crates/swc_ecma_transforms_testing/Cargo.toml index 3df9b42e4e75..aae9320a374e 100644 --- a/crates/swc_ecma_transforms_testing/Cargo.toml +++ b/crates/swc_ecma_transforms_testing/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_transforms_testing" repository = "https://github.com/swc-project/swc.git" -version = "0.140.15" +version = "0.140.16" [lib] bench = false @@ -22,14 +22,14 @@ sha2 = "0.10.8" sourcemap = "6.4" tempfile = "3.6.0" -swc_common = { version = "0.33.19", path = "../swc_common", features = [ +swc_common = { version = "0.33.20", path = "../swc_common", features = [ "sourcemap", ] } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_codegen = { version = "0.148.11", path = "../swc_ecma_codegen" } -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -swc_ecma_testing = { version = "0.22.21", path = "../swc_ecma_testing" } -swc_ecma_transforms_base = { version = "0.137.15", path = "../swc_ecma_transforms_base" } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } -testing = { version = "0.35.20", path = "../testing" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_codegen = { version = "0.148.12", path = "../swc_ecma_codegen" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +swc_ecma_testing = { version = "0.22.22", path = "../swc_ecma_testing" } +swc_ecma_transforms_base = { version = "0.137.16", path = "../swc_ecma_transforms_base" } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } +testing = { version = "0.35.21", path = "../testing" } diff --git a/crates/swc_ecma_transforms_typescript/Cargo.toml b/crates/swc_ecma_transforms_typescript/Cargo.toml index 56c8105fd08b..e05b013fc960 100644 --- a/crates/swc_ecma_transforms_typescript/Cargo.toml +++ b/crates/swc_ecma_transforms_typescript/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_typescript" repository = "https://github.com/swc-project/swc.git" -version = "0.188.16" +version = "0.188.17" [lib] bench = false @@ -17,22 +17,22 @@ serde = { version = "1.0.118", features = ["derive"] } ryu-js = "1.0.0" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_transforms_base = { version = "0.137.15", path = "../swc_ecma_transforms_base" } -swc_ecma_transforms_react = { version = "0.183.16", path = "../swc_ecma_transforms_react" } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_transforms_base = { version = "0.137.16", path = "../swc_ecma_transforms_base" } +swc_ecma_transforms_react = { version = "0.183.17", path = "../swc_ecma_transforms_react" } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } [dev-dependencies] criterion = "0.5" -swc_ecma_codegen = { version = "0.148.11", path = "../swc_ecma_codegen" } -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -swc_ecma_transforms_compat = { version = "0.163.16", path = "../swc_ecma_transforms_compat" } -swc_ecma_transforms_proposal = { version = "0.171.16", path = "../swc_ecma_transforms_proposal" } -swc_ecma_transforms_testing = { version = "0.140.15", path = "../swc_ecma_transforms_testing" } -testing = { version = "0.35.20", path = "../testing" } +swc_ecma_codegen = { version = "0.148.12", path = "../swc_ecma_codegen" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +swc_ecma_transforms_compat = { version = "0.163.17", path = "../swc_ecma_transforms_compat" } +swc_ecma_transforms_proposal = { version = "0.171.17", path = "../swc_ecma_transforms_proposal" } +swc_ecma_transforms_testing = { version = "0.140.16", path = "../swc_ecma_transforms_testing" } +testing = { version = "0.35.21", path = "../testing" } [[bench]] harness = false diff --git a/crates/swc_ecma_usage_analyzer/Cargo.toml b/crates/swc_ecma_usage_analyzer/Cargo.toml index 9490e9d1018f..694cce9dc057 100644 --- a/crates/swc_ecma_usage_analyzer/Cargo.toml +++ b/crates/swc_ecma_usage_analyzer/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_usage_analyzer" repository = "https://github.com/swc-project/swc.git" -version = "0.23.12" +version = "0.23.13" [package.metadata.docs.rs] all-features = true @@ -27,8 +27,8 @@ rustc-hash = "1.1.0" tracing = "0.1.37" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } -swc_timer = { version = "0.21.20", path = "../swc_timer" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } +swc_timer = { version = "0.21.21", path = "../swc_timer" } diff --git a/crates/swc_ecma_utils/Cargo.toml b/crates/swc_ecma_utils/Cargo.toml index 2d8ec6ba5ae6..3d8f92c3c406 100644 --- a/crates/swc_ecma_utils/Cargo.toml +++ b/crates/swc_ecma_utils/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_utils" repository = "https://github.com/swc-project/swc.git" -version = "0.127.12" +version = "0.127.13" [package.metadata.docs.rs] all-features = true @@ -29,10 +29,10 @@ tracing = "0.1.37" unicode-id = "0.3" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } [dev-dependencies] -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -testing = { version = "0.35.20", path = "../testing" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +testing = { version = "0.35.21", path = "../testing" } diff --git a/crates/swc_ecma_visit/Cargo.toml b/crates/swc_ecma_visit/Cargo.toml index e683e1d8a32c..05f5af11b4e6 100644 --- a/crates/swc_ecma_visit/Cargo.toml +++ b/crates/swc_ecma_visit/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_visit" repository = "https://github.com/swc-project/swc.git" -version = "0.98.6" +version = "0.98.7" [package.metadata.docs.rs] all-features = true @@ -26,6 +26,6 @@ serde = { version = "1", optional = true } tracing = "0.1.37" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } swc_visit = { version = "0.5.10", path = "../swc_visit" } diff --git a/crates/swc_ecmascript/Cargo.toml b/crates/swc_ecmascript/Cargo.toml index 817a3c7e2db9..666541bffdd4 100644 --- a/crates/swc_ecmascript/Cargo.toml +++ b/crates/swc_ecmascript/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecmascript" repository = "https://github.com/swc-project/swc.git" -version = "0.239.20" +version = "0.239.21" [package.metadata.docs.rs] all-features = true @@ -38,14 +38,14 @@ react = ["swc_ecma_transforms/react"] typescript = ["typescript-parser", "swc_ecma_transforms/typescript"] [dependencies] -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_codegen = { version = "0.148.11", path = "../swc_ecma_codegen", optional = true } -swc_ecma_minifier = { version = "0.192.17", path = "../swc_ecma_minifier", optional = true } -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser", optional = true, default-features = false } -swc_ecma_preset_env = { version = "0.206.16", path = "../swc_ecma_preset_env", optional = true } -swc_ecma_quote = { version = "0.59.12", path = "../swc_ecma_quote", optional = true } -swc_ecma_transforms = { version = "0.229.16", path = "../swc_ecma_transforms", optional = true } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils", optional = true } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit", optional = true } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_codegen = { version = "0.148.12", path = "../swc_ecma_codegen", optional = true } +swc_ecma_minifier = { version = "0.192.18", path = "../swc_ecma_minifier", optional = true } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser", optional = true, default-features = false } +swc_ecma_preset_env = { version = "0.206.17", path = "../swc_ecma_preset_env", optional = true } +swc_ecma_quote = { version = "0.59.13", path = "../swc_ecma_quote", optional = true } +swc_ecma_transforms = { version = "0.229.17", path = "../swc_ecma_transforms", optional = true } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils", optional = true } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit", optional = true } [dev-dependencies] diff --git a/crates/swc_error_reporters/Cargo.toml b/crates/swc_error_reporters/Cargo.toml index 610ce5245bd7..29c47aad6fee 100644 --- a/crates/swc_error_reporters/Cargo.toml +++ b/crates/swc_error_reporters/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_error_reporters" repository = "https://github.com/swc-project/swc.git" -version = "0.17.18" +version = "0.17.19" [lib] bench = false @@ -17,6 +17,6 @@ miette = { version = "4.2.1", features = ["fancy"] } once_cell = "1" parking_lot = "0.12.1" -swc_common = { version = "0.33.19", path = "../swc_common", features = [ +swc_common = { version = "0.33.20", path = "../swc_common", features = [ "concurrent", ] } diff --git a/crates/swc_estree_ast/Cargo.toml b/crates/swc_estree_ast/Cargo.toml index 27dac94391e1..21c900b28a3d 100644 --- a/crates/swc_estree_ast/Cargo.toml +++ b/crates/swc_estree_ast/Cargo.toml @@ -9,7 +9,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_estree_ast" repository = "https://github.com/swc-project/swc.git" -version = "0.23.18" +version = "0.23.19" [package.metadata.docs.rs] all-features = true @@ -27,4 +27,4 @@ serde_json = "1" better_scoped_tls = { version = "0.1.1", path = "../better_scoped_tls" } swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } +swc_common = { version = "0.33.20", path = "../swc_common" } diff --git a/crates/swc_estree_compat/Cargo.toml b/crates/swc_estree_compat/Cargo.toml index f9c68fb51831..68a010f68cca 100644 --- a/crates/swc_estree_compat/Cargo.toml +++ b/crates/swc_estree_compat/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_estree_compat" repository = "https://github.com/swc-project/swc.git" -version = "0.198.20" +version = "0.198.21" [package.metadata.docs.rs] all-features = true @@ -24,27 +24,27 @@ serde = { version = "1", features = ["derive"] } serde_json = "1.0.62" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common", features = [ +swc_common = { version = "0.33.20", path = "../swc_common", features = [ "concurrent", "sourcemap", "tty-emitter", ] } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } -swc_estree_ast = { version = "0.23.18", path = "../swc_estree_ast" } -swc_node_comments = { version = "0.20.18", path = "../swc_node_comments/" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } +swc_estree_ast = { version = "0.23.19", path = "../swc_estree_ast" } +swc_node_comments = { version = "0.20.19", path = "../swc_node_comments/" } [dev-dependencies] criterion = "0.5" pretty_assertions = "1.3" -swc = { version = "0.273.21", path = "../swc" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -swc_ecma_transforms = { version = "0.229.16", path = "../swc_ecma_transforms/" } -testing = { version = "0.35.20", path = "../testing" } +swc = { version = "0.273.22", path = "../swc" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +swc_ecma_transforms = { version = "0.229.17", path = "../swc_ecma_transforms/" } +testing = { version = "0.35.21", path = "../testing" } walkdir = "2" [[bench]] diff --git a/crates/swc_fast_graph/Cargo.toml b/crates/swc_fast_graph/Cargo.toml index dfee8a252a61..4d13f0caba7a 100644 --- a/crates/swc_fast_graph/Cargo.toml +++ b/crates/swc_fast_graph/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_fast_graph" repository = "https://github.com/swc-project/swc.git" -version = "0.21.19" +version = "0.21.20" [lib] bench = false @@ -16,4 +16,4 @@ indexmap = "2.0.0" petgraph = "0.6" rustc-hash = "1.1.0" -swc_common = { version = "0.33.19", path = "../swc_common" } +swc_common = { version = "0.33.20", path = "../swc_common" } diff --git a/crates/swc_graph_analyzer/Cargo.toml b/crates/swc_graph_analyzer/Cargo.toml index 14003599caf7..00999286cb4c 100644 --- a/crates/swc_graph_analyzer/Cargo.toml +++ b/crates/swc_graph_analyzer/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_graph_analyzer" repository = "https://github.com/swc-project/swc.git" -version = "0.22.21" +version = "0.22.22" [lib] bench = false @@ -14,9 +14,9 @@ bench = false [dependencies] auto_impl = "1.1.0" petgraph = "0.6.0" -swc_common = {version = "0.33.19", path = "../swc_common/"} -swc_fast_graph = {version = "0.21.19", path = "../swc_fast_graph/"} +swc_common = {version = "0.33.20", path = "../swc_common/"} +swc_fast_graph = {version = "0.21.20", path = "../swc_fast_graph/"} tracing = "0.1.37" [dev-dependencies] -testing = {version = "0.35.20", path = "../testing"} +testing = {version = "0.35.21", path = "../testing"} diff --git a/crates/swc_html/Cargo.toml b/crates/swc_html/Cargo.toml index c9fe97b7c68d..7aa45d7fc43d 100644 --- a/crates/swc_html/Cargo.toml +++ b/crates/swc_html/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_html" repository = "https://github.com/swc-project/swc.git" -version = "0.137.17" +version = "0.137.18" [package.metadata.docs.rs] all-features = true @@ -19,8 +19,8 @@ bench = false minifier = ["swc_html_minifier"] [dependencies] -swc_html_ast = {version = "0.33.18", path = "../swc_html_ast"} -swc_html_codegen = {version = "0.42.23", path = "../swc_html_codegen"} -swc_html_minifier = {version = "0.134.16", path = "../swc_html_minifier", optional = true} -swc_html_parser = {version = "0.39.23", path = "../swc_html_parser"} -swc_html_visit = {version = "0.33.18", path = "../swc_html_visit"} +swc_html_ast = {version = "0.33.19", path = "../swc_html_ast"} +swc_html_codegen = {version = "0.42.24", path = "../swc_html_codegen"} +swc_html_minifier = {version = "0.134.17", path = "../swc_html_minifier", optional = true} +swc_html_parser = {version = "0.39.24", path = "../swc_html_parser"} +swc_html_visit = {version = "0.33.19", path = "../swc_html_visit"} diff --git a/crates/swc_html_ast/Cargo.toml b/crates/swc_html_ast/Cargo.toml index aee562c1b03a..ff6197325897 100644 --- a/crates/swc_html_ast/Cargo.toml +++ b/crates/swc_html_ast/Cargo.toml @@ -9,7 +9,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_html_ast" repository = "https://github.com/swc-project/swc.git" -version = "0.33.18" +version = "0.33.19" [lib] bench = false @@ -29,4 +29,4 @@ serde = { version = "1.0.127", features = ["derive"], optional = true } string_enum = { version = "0.4.2", path = "../string_enum/" } swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } +swc_common = { version = "0.33.20", path = "../swc_common" } diff --git a/crates/swc_html_codegen/Cargo.toml b/crates/swc_html_codegen/Cargo.toml index a42d82fc944a..4cec8114a21f 100644 --- a/crates/swc_html_codegen/Cargo.toml +++ b/crates/swc_html_codegen/Cargo.toml @@ -10,7 +10,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_html_codegen" repository = "https://github.com/swc-project/swc.git" -version = "0.42.23" +version = "0.42.24" [lib] bench = false @@ -21,15 +21,15 @@ bitflags = "2.3.2" rustc-hash = "1.1.0" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_html_ast = { version = "0.33.18", path = "../swc_html_ast" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_html_ast = { version = "0.33.19", path = "../swc_html_ast" } swc_html_codegen_macros = { version = "0.2.3", path = "../swc_html_codegen_macros" } -swc_html_utils = { version = "0.18.18", path = "../swc_html_utils" } +swc_html_utils = { version = "0.18.19", path = "../swc_html_utils" } [dev-dependencies] -swc_common = { version = "0.33.19", path = "../swc_common", features = [ +swc_common = { version = "0.33.20", path = "../swc_common", features = [ "sourcemap", ] } -swc_html_parser = { version = "0.39.23", path = "../swc_html_parser" } -swc_html_visit = { version = "0.33.18", path = "../swc_html_visit" } -testing = { version = "0.35.20", path = "../testing" } +swc_html_parser = { version = "0.39.24", path = "../swc_html_parser" } +swc_html_visit = { version = "0.33.19", path = "../swc_html_visit" } +testing = { version = "0.35.21", path = "../testing" } diff --git a/crates/swc_html_minifier/Cargo.toml b/crates/swc_html_minifier/Cargo.toml index ec2e733d96fd..5f0fd3d3ca2e 100644 --- a/crates/swc_html_minifier/Cargo.toml +++ b/crates/swc_html_minifier/Cargo.toml @@ -10,7 +10,7 @@ include = ["Cargo.toml", "src/**/*.rs", "data/**/*.json"] license = "Apache-2.0" name = "swc_html_minifier" repository = "https://github.com/swc-project/swc.git" -version = "0.134.16" +version = "0.134.17" [lib] bench = false @@ -22,32 +22,32 @@ serde_json = "1.0.61" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_cached = { version = "0.3.19", path = "../swc_cached" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_css_ast = { version = "0.140.20", path = "../swc_css_ast" } -swc_css_codegen = { version = "0.151.30", path = "../swc_css_codegen" } -swc_css_minifier = { version = "0.116.31", path = "../swc_css_minifier" } -swc_css_parser = { version = "0.150.29", path = "../swc_css_parser" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_codegen = { version = "0.148.11", path = "../swc_ecma_codegen", features = [ +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_css_ast = { version = "0.140.21", path = "../swc_css_ast" } +swc_css_codegen = { version = "0.151.31", path = "../swc_css_codegen" } +swc_css_minifier = { version = "0.116.32", path = "../swc_css_minifier" } +swc_css_parser = { version = "0.150.30", path = "../swc_css_parser" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_codegen = { version = "0.148.12", path = "../swc_ecma_codegen", features = [ "serde-impl", ] } -swc_ecma_minifier = { version = "0.192.17", path = "../swc_ecma_minifier", features = [ +swc_ecma_minifier = { version = "0.192.18", path = "../swc_ecma_minifier", features = [ "extra-serde", ] } -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -swc_ecma_transforms_base = { version = "0.137.15", path = "../swc_ecma_transforms_base" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } -swc_html_ast = { version = "0.33.18", path = "../swc_html_ast" } -swc_html_codegen = { version = "0.42.23", path = "../swc_html_codegen" } -swc_html_parser = { version = "0.39.23", path = "../swc_html_parser" } -swc_html_utils = { version = "0.18.18", path = "../swc_html_utils" } -swc_html_visit = { version = "0.33.18", path = "../swc_html_visit" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +swc_ecma_transforms_base = { version = "0.137.16", path = "../swc_ecma_transforms_base" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } +swc_html_ast = { version = "0.33.19", path = "../swc_html_ast" } +swc_html_codegen = { version = "0.42.24", path = "../swc_html_codegen" } +swc_html_parser = { version = "0.39.24", path = "../swc_html_parser" } +swc_html_utils = { version = "0.18.19", path = "../swc_html_utils" } +swc_html_visit = { version = "0.33.19", path = "../swc_html_visit" } [dev-dependencies] criterion = "0.5" swc_malloc = { version = "0.5.10", path = "../swc_malloc" } -testing = { version = "0.35.20", path = "../testing" } +testing = { version = "0.35.21", path = "../testing" } [[bench]] harness = false diff --git a/crates/swc_html_parser/Cargo.toml b/crates/swc_html_parser/Cargo.toml index 62f1a79c963a..bdd742194e65 100644 --- a/crates/swc_html_parser/Cargo.toml +++ b/crates/swc_html_parser/Cargo.toml @@ -10,7 +10,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/**/*.json"] license = "Apache-2.0" name = "swc_html_parser" repository = "https://github.com/swc-project/swc.git" -version = "0.39.23" +version = "0.39.24" [lib] bench = false @@ -20,21 +20,21 @@ debug = [] [dependencies] swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_html_ast = { version = "0.33.18", path = "../swc_html_ast" } -swc_html_utils = { version = "0.18.18", path = "../swc_html_utils" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_html_ast = { version = "0.33.19", path = "../swc_html_ast" } +swc_html_utils = { version = "0.18.19", path = "../swc_html_utils" } [dev-dependencies] criterion = "0.5" serde = "1.0.127" serde_json = "1.0.66" -swc_html_ast = { version = "0.33.18", path = "../swc_html_ast", features = [ +swc_html_ast = { version = "0.33.19", path = "../swc_html_ast", features = [ "serde-impl", ] } -swc_html_visit = { version = "0.33.18", path = "../swc_html_visit" } +swc_html_visit = { version = "0.33.19", path = "../swc_html_visit" } swc_malloc = { version = "0.5.10", path = "../swc_malloc" } -testing = { version = "0.35.20", path = "../testing" } +testing = { version = "0.35.21", path = "../testing" } [[bench]] harness = false diff --git a/crates/swc_html_utils/Cargo.toml b/crates/swc_html_utils/Cargo.toml index e626c43fb596..e64a3208bb16 100644 --- a/crates/swc_html_utils/Cargo.toml +++ b/crates/swc_html_utils/Cargo.toml @@ -10,7 +10,7 @@ include = ["Cargo.toml", "src/**/*.rs", "data/**/*.json"] license = "Apache-2.0" name = "swc_html_utils" repository = "https://github.com/swc-project/swc.git" -version = "0.18.18" +version = "0.18.19" [lib] bench = false @@ -21,4 +21,4 @@ serde = { version = "1.0.118", features = ["derive"] } serde_json = "1.0.61" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } +swc_common = { version = "0.33.20", path = "../swc_common" } diff --git a/crates/swc_html_visit/Cargo.toml b/crates/swc_html_visit/Cargo.toml index 7573071cc17a..3bd78588d988 100644 --- a/crates/swc_html_visit/Cargo.toml +++ b/crates/swc_html_visit/Cargo.toml @@ -9,7 +9,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_html_visit" repository = "https://github.com/swc-project/swc.git" -version = "0.33.18" +version = "0.33.19" [package.metadata.docs.rs] all-features = true @@ -26,6 +26,6 @@ path = [] serde = { version = "1", optional = true } swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_html_ast = { version = "0.33.18", path = "../swc_html_ast" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_html_ast = { version = "0.33.19", path = "../swc_html_ast" } swc_visit = { version = "0.5.10", path = "../swc_visit" } diff --git a/crates/swc_node_bundler/Cargo.toml b/crates/swc_node_bundler/Cargo.toml index 77700f87049e..33770d95ca6e 100644 --- a/crates/swc_node_bundler/Cargo.toml +++ b/crates/swc_node_bundler/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_node_bundler" repository = "https://github.com/swc-project/swc.git" -version = "0.62.21" +version = "0.62.22" [lib] bench = false @@ -29,24 +29,24 @@ serde_json = "1" tracing = "0.1.37" string_enum = { version = "0.4.2", path = "../string_enum" } -swc = { version = "0.273.21", path = "../swc" } +swc = { version = "0.273.22", path = "../swc" } swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_bundler = { version = "0.225.16", path = "../swc_bundler", features = [ +swc_bundler = { version = "0.225.17", path = "../swc_bundler", features = [ "concurrent", ] } -swc_common = { version = "0.33.19", path = "../swc_common", features = [ +swc_common = { version = "0.33.20", path = "../swc_common", features = [ "concurrent", ] } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } -swc_ecma_codegen = { version = "0.148.11", path = "../swc_ecma_codegen" } -swc_ecma_loader = { version = "0.45.22", path = "../swc_ecma_loader" } -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -swc_ecma_transforms = { version = "0.229.16", path = "../swc_ecma_transforms" } -swc_ecma_utils = { version = "0.127.12", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } +swc_ecma_codegen = { version = "0.148.12", path = "../swc_ecma_codegen" } +swc_ecma_loader = { version = "0.45.23", path = "../swc_ecma_loader" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +swc_ecma_transforms = { version = "0.229.17", path = "../swc_ecma_transforms" } +swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } swc_malloc = { version = "0.5.10", path = "../swc_malloc" } [dev-dependencies] pretty_assertions = "1.3" -testing = { version = "0.35.20", path = "../testing" } +testing = { version = "0.35.21", path = "../testing" } diff --git a/crates/swc_node_comments/Cargo.toml b/crates/swc_node_comments/Cargo.toml index 7d9d25b1c0f2..5b742f9c2eba 100644 --- a/crates/swc_node_comments/Cargo.toml +++ b/crates/swc_node_comments/Cargo.toml @@ -9,7 +9,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_node_comments" repository = "https://github.com/swc-project/swc.git" -version = "0.20.18" +version = "0.20.19" [lib] bench = false @@ -18,4 +18,4 @@ bench = false dashmap = "5.4.0" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } +swc_common = { version = "0.33.20", path = "../swc_common" } diff --git a/crates/swc_plugin_proxy/Cargo.toml b/crates/swc_plugin_proxy/Cargo.toml index cc7bb66f33e3..66c3c50cccce 100644 --- a/crates/swc_plugin_proxy/Cargo.toml +++ b/crates/swc_plugin_proxy/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_plugin_proxy" repository = "https://github.com/swc-project/swc.git" -version = "0.41.5" +version = "0.41.6" [lib] bench = false @@ -29,6 +29,6 @@ rkyv = { package = "rkyv", version = "=0.7.42", optional = true, features = [ tracing = "0.1.37" better_scoped_tls = { version = "0.1.1", path = "../better_scoped_tls" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } swc_trace_macro = { version = "0.1.3", path = "../swc_trace_macro" } diff --git a/crates/swc_plugin_runner/Cargo.toml b/crates/swc_plugin_runner/Cargo.toml index a3a14785cad7..793dce7d6c8e 100644 --- a/crates/swc_plugin_runner/Cargo.toml +++ b/crates/swc_plugin_runner/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_plugin_runner" repository = "https://github.com/swc-project/swc.git" -version = "0.106.12" +version = "0.106.13" [lib] bench = false @@ -58,12 +58,12 @@ tracing = "0.1.37" wasmer = { version = "4.2.5", default-features = false } wasmer-wasix = { version = "0.18.0", default-features = false } -swc_common = { version = "0.33.19", path = "../swc_common", features = [ +swc_common = { version = "0.33.20", path = "../swc_common", features = [ "concurrent", ] } -swc_css_ast = { version = "0.140.20", path = "../swc_css_ast", optional = true } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast", optional = true } -swc_plugin_proxy = { version = "0.41.5", path = "../swc_plugin_proxy" } +swc_css_ast = { version = "0.140.21", path = "../swc_css_ast", optional = true } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast", optional = true } +swc_plugin_proxy = { version = "0.41.6", path = "../swc_plugin_proxy" } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] wasmer-cache = { version = "4.0.0", optional = true } @@ -73,18 +73,18 @@ wasmer-compiler-cranelift = { version = "4.0.0", default-features = false } criterion = "0.5" swc_atoms = { version = "0.6.5", path = '../swc_atoms' } -swc_css_ast = { version = "0.140.20", path = "../swc_css_ast", features = [ +swc_css_ast = { version = "0.140.21", path = "../swc_css_ast", features = [ "rkyv-impl", ] } -swc_css_parser = { version = "0.150.29", path = "../swc_css_parser" } -swc_ecma_ast = { version = "0.112.5", path = "../swc_ecma_ast", features = [ +swc_css_parser = { version = "0.150.30", path = "../swc_css_parser" } +swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast", features = [ "rkyv-impl", ] } -swc_ecma_loader = { version = "0.45.22", path = "../swc_ecma_loader" } -swc_ecma_parser = { version = "0.143.9", path = "../swc_ecma_parser" } -swc_ecma_visit = { version = "0.98.6", path = "../swc_ecma_visit" } +swc_ecma_loader = { version = "0.45.23", path = "../swc_ecma_loader" } +swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } +swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } swc_malloc = { version = "0.5.10", path = "../swc_malloc" } -testing = { version = "0.35.20", path = "../testing" } +testing = { version = "0.35.21", path = "../testing" } tokio = { version = "1", features = ["rt"] } [[bench]] diff --git a/crates/swc_timer/Cargo.toml b/crates/swc_timer/Cargo.toml index f9b2fb98e40a..535cca178439 100644 --- a/crates/swc_timer/Cargo.toml +++ b/crates/swc_timer/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_timer" repository = "https://github.com/swc-project/swc.git" -version = "0.21.20" +version = "0.21.21" [lib] bench = false @@ -15,4 +15,4 @@ bench = false tracing = "0.1.37" [dev-dependencies] -testing = {version = "0.35.20", path = "../testing"} +testing = {version = "0.35.21", path = "../testing"} diff --git a/crates/swc_xml/Cargo.toml b/crates/swc_xml/Cargo.toml index 356c4c39eb9a..43527c9405ec 100644 --- a/crates/swc_xml/Cargo.toml +++ b/crates/swc_xml/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_xml" repository = "https://github.com/swc-project/swc.git" -version = "0.13.20" +version = "0.13.21" [package.metadata.docs.rs] all-features = true @@ -16,7 +16,7 @@ rustdoc-args = ["--cfg", "docsrs"] bench = false [dependencies] -swc_xml_ast = {version = "0.12.18", path = "../swc_xml_ast"} -swc_xml_codegen = {version = "0.13.20", path = "../swc_xml_codegen"} -swc_xml_parser = {version = "0.13.20", path = "../swc_xml_parser"} -swc_xml_visit = {version = "0.12.18", path = "../swc_xml_visit"} +swc_xml_ast = {version = "0.12.19", path = "../swc_xml_ast"} +swc_xml_codegen = {version = "0.13.21", path = "../swc_xml_codegen"} +swc_xml_parser = {version = "0.13.21", path = "../swc_xml_parser"} +swc_xml_visit = {version = "0.12.19", path = "../swc_xml_visit"} diff --git a/crates/swc_xml_ast/Cargo.toml b/crates/swc_xml_ast/Cargo.toml index a10c3f818df8..a6108061ccd5 100644 --- a/crates/swc_xml_ast/Cargo.toml +++ b/crates/swc_xml_ast/Cargo.toml @@ -9,7 +9,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_xml_ast" repository = "https://github.com/swc-project/swc.git" -version = "0.12.18" +version = "0.12.19" [lib] bench = false @@ -23,4 +23,4 @@ serde = { version = "1.0.127", features = ["derive"], optional = true } string_enum = { version = "0.4.2", path = "../string_enum/" } swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } +swc_common = { version = "0.33.20", path = "../swc_common" } diff --git a/crates/swc_xml_codegen/Cargo.toml b/crates/swc_xml_codegen/Cargo.toml index dc5f0bbdf73e..2f586ddbf9c1 100644 --- a/crates/swc_xml_codegen/Cargo.toml +++ b/crates/swc_xml_codegen/Cargo.toml @@ -10,7 +10,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_xml_codegen" repository = "https://github.com/swc-project/swc.git" -version = "0.13.20" +version = "0.13.21" [lib] bench = false @@ -21,14 +21,14 @@ bitflags = "2.3.2" rustc-hash = "1.1.0" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_xml_ast = { version = "0.12.18", path = "../swc_xml_ast" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_xml_ast = { version = "0.12.19", path = "../swc_xml_ast" } swc_xml_codegen_macros = { version = "0.1.3", path = "../swc_xml_codegen_macros" } [dev-dependencies] -swc_common = { version = "0.33.19", path = "../swc_common", features = [ +swc_common = { version = "0.33.20", path = "../swc_common", features = [ "sourcemap", ] } -swc_xml_parser = { version = "0.13.20", path = "../swc_xml_parser" } -swc_xml_visit = { version = "0.12.18", path = "../swc_xml_visit" } -testing = { version = "0.35.20", path = "../testing" } +swc_xml_parser = { version = "0.13.21", path = "../swc_xml_parser" } +swc_xml_visit = { version = "0.12.19", path = "../swc_xml_visit" } +testing = { version = "0.35.21", path = "../testing" } diff --git a/crates/swc_xml_parser/Cargo.toml b/crates/swc_xml_parser/Cargo.toml index fe3c1dfe7698..f01e4ca46375 100644 --- a/crates/swc_xml_parser/Cargo.toml +++ b/crates/swc_xml_parser/Cargo.toml @@ -10,7 +10,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/**/*.json"] license = "Apache-2.0" name = "swc_xml_parser" repository = "https://github.com/swc-project/swc.git" -version = "0.13.20" +version = "0.13.21" [lib] bench = false @@ -20,15 +20,15 @@ debug = [] [dependencies] swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } -swc_xml_ast = { version = "0.12.18", path = "../swc_xml_ast" } +swc_common = { version = "0.33.20", path = "../swc_common" } +swc_xml_ast = { version = "0.12.19", path = "../swc_xml_ast" } [dev-dependencies] serde = "1.0.127" serde_json = "1.0.66" -swc_xml_ast = { version = "0.12.18", path = "../swc_xml_ast", features = [ +swc_xml_ast = { version = "0.12.19", path = "../swc_xml_ast", features = [ "serde-impl", ] } -swc_xml_visit = { version = "0.12.18", path = "../swc_xml_visit" } -testing = { version = "0.35.20", path = "../testing" } +swc_xml_visit = { version = "0.12.19", path = "../swc_xml_visit" } +testing = { version = "0.35.21", path = "../testing" } diff --git a/crates/swc_xml_visit/Cargo.toml b/crates/swc_xml_visit/Cargo.toml index 5f020145047e..bc4fa12a456d 100644 --- a/crates/swc_xml_visit/Cargo.toml +++ b/crates/swc_xml_visit/Cargo.toml @@ -9,7 +9,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_xml_visit" repository = "https://github.com/swc-project/swc.git" -version = "0.12.18" +version = "0.12.19" [package.metadata.docs.rs] all-features = true @@ -26,6 +26,6 @@ path = [] serde = { version = "1", optional = true } swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.19", path = "../swc_common" } +swc_common = { version = "0.33.20", path = "../swc_common" } swc_visit = { version = "0.5.10", path = "../swc_visit" } -swc_xml_ast = { version = "0.12.18", path = "../swc_xml_ast" } +swc_xml_ast = { version = "0.12.19", path = "../swc_xml_ast" } diff --git a/crates/testing/Cargo.toml b/crates/testing/Cargo.toml index 8a0de1a9f2d6..953f52b80daf 100644 --- a/crates/testing/Cargo.toml +++ b/crates/testing/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "testing" repository = "https://github.com/swc-project/swc.git" -version = "0.35.20" +version = "0.35.21" [lib] bench = false @@ -23,8 +23,8 @@ serde_json = "1" tracing = "0.1.37" tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } -swc_common = { version = "0.33.19", path = "../swc_common", features = [ +swc_common = { version = "0.33.20", path = "../swc_common", features = [ "tty-emitter", ] } -swc_error_reporters = { version = "0.17.18", path = "../swc_error_reporters" } +swc_error_reporters = { version = "0.17.19", path = "../swc_error_reporters" } testing_macros = { version = "0.2.12", path = "../testing_macros" } From 5f2ea762a1d02fc1f9b3f940366bca29302d54b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Mon, 18 Mar 2024 10:45:42 +0900 Subject: [PATCH 004/172] chore: Publish `@swc/types@v0.1.6` --- packages/types/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/types/package.json b/packages/types/package.json index e4a4ee2bdae3..e5be686ccf29 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,7 +1,7 @@ { "name": "@swc/types", "packageManager": "yarn@4.0.2", - "version": "0.1.5", + "version": "0.1.6", "description": "Typings for the swc project.", "sideEffects": false, "scripts": { From 4c83dcc37058495ceeecd3ae225ed95df7cf0b6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Mon, 18 Mar 2024 10:46:12 +0900 Subject: [PATCH 005/172] chore: Publish `@swc/helpers@v0.5.7` --- packages/helpers/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/helpers/package.json b/packages/helpers/package.json index 9656cbdd6c69..dc17e85d2658 100644 --- a/packages/helpers/package.json +++ b/packages/helpers/package.json @@ -1,7 +1,7 @@ { "name": "@swc/helpers", "packageManager": "yarn@4.0.2", - "version": "0.5.6", + "version": "0.5.7", "description": "External helpers for the swc project.", "module": "esm/index.js", "main": "cjs/index.cjs", From e2c6db5226e9b34442ab65e02d5bbc3fa9aca65c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Mon, 18 Mar 2024 14:38:31 +0900 Subject: [PATCH 006/172] fix(es/module): Fix interop of `jsc.paths` with symlinks (#8757) **Related issue:** - Closes #8667 --- .../2-cjs/input/src/command/restore.ts | 2 +- .../2-cjs/output/src/command/restore.ts | 2 +- .../2-esm/input/src/command/restore.ts | 2 +- .../2-esm/output/src/command/restore.ts | 2 +- crates/swc_cli_impl/tests/issues.rs | 65 ++++++++++++++++++- crates/swc_ecma_transforms_module/src/path.rs | 6 +- 6 files changed, 71 insertions(+), 8 deletions(-) diff --git a/crates/swc/tests/fixture/deno/paths/issue-2753/2-cjs/input/src/command/restore.ts b/crates/swc/tests/fixture/deno/paths/issue-2753/2-cjs/input/src/command/restore.ts index 8e2af4f0ca71..c45b7ddd4adc 100644 --- a/crates/swc/tests/fixture/deno/paths/issue-2753/2-cjs/input/src/command/restore.ts +++ b/crates/swc/tests/fixture/deno/paths/issue-2753/2-cjs/input/src/command/restore.ts @@ -1 +1 @@ -import { module } from "@src/config"; +import { module } from "@src/conf"; diff --git a/crates/swc/tests/fixture/deno/paths/issue-2753/2-cjs/output/src/command/restore.ts b/crates/swc/tests/fixture/deno/paths/issue-2753/2-cjs/output/src/command/restore.ts index 7793058058c0..dc435deacdc0 100644 --- a/crates/swc/tests/fixture/deno/paths/issue-2753/2-cjs/output/src/command/restore.ts +++ b/crates/swc/tests/fixture/deno/paths/issue-2753/2-cjs/output/src/command/restore.ts @@ -2,4 +2,4 @@ Object.defineProperty(exports, "__esModule", { value: true }); -const _config = require("../config"); +const _conf = require("../conf"); diff --git a/crates/swc/tests/fixture/deno/paths/issue-2753/2-esm/input/src/command/restore.ts b/crates/swc/tests/fixture/deno/paths/issue-2753/2-esm/input/src/command/restore.ts index 8e2af4f0ca71..c45b7ddd4adc 100644 --- a/crates/swc/tests/fixture/deno/paths/issue-2753/2-esm/input/src/command/restore.ts +++ b/crates/swc/tests/fixture/deno/paths/issue-2753/2-esm/input/src/command/restore.ts @@ -1 +1 @@ -import { module } from "@src/config"; +import { module } from "@src/conf"; diff --git a/crates/swc/tests/fixture/deno/paths/issue-2753/2-esm/output/src/command/restore.ts b/crates/swc/tests/fixture/deno/paths/issue-2753/2-esm/output/src/command/restore.ts index cc2bb795da7a..adb86c022798 100644 --- a/crates/swc/tests/fixture/deno/paths/issue-2753/2-esm/output/src/command/restore.ts +++ b/crates/swc/tests/fixture/deno/paths/issue-2753/2-esm/output/src/command/restore.ts @@ -1 +1 @@ -import { module } from "../config"; +import { module } from "../conf"; diff --git a/crates/swc_cli_impl/tests/issues.rs b/crates/swc_cli_impl/tests/issues.rs index 29b7d4220221..5d29cd012456 100644 --- a/crates/swc_cli_impl/tests/issues.rs +++ b/crates/swc_cli_impl/tests/issues.rs @@ -1,5 +1,5 @@ use std::{ - fs::{self, create_dir_all}, + fs::{self, create_dir_all, hard_link}, path::Path, process::{Command, Stdio}, }; @@ -81,6 +81,69 @@ fn issue_8495_1() -> Result<()> { Ok(()) } +#[test] +fn issue_8667_1() -> Result<()> { + let output_base = TempDir::new()?; + let bin_dir = output_base.path().join("bazel-out/arch/bin"); + let sandbox = output_base.path().join("sandbox/123"); + + let pwd = Path::new("tests/fixture-manual/8265").canonicalize()?; + + create_dir_all(bin_dir.join("src/modules/moduleA"))?; + create_dir_all(bin_dir.join("src/modules/moduleB"))?; + create_dir_all(sandbox.join("src/modules/moduleA"))?; + create_dir_all(sandbox.join("src/modules/moduleB"))?; + + // hard links from BINDIR into src + hard_link(pwd.join(".swcrc"), bin_dir.join(".swcrc"))?; + hard_link(pwd.join("src/index.ts"), bin_dir.join("src/index.ts"))?; + hard_link( + pwd.join("src/modules/moduleA/index.ts"), + bin_dir.join("src/modules/moduleA/index.ts"), + )?; + hard_link( + pwd.join("src/modules/moduleB/index.ts"), + bin_dir.join("src/modules/moduleB/index.ts"), + )?; + + // soft links from sandbox into bazel-bin + symlink(&bin_dir.join(".swcrc"), &sandbox.join(".swcrc")); + symlink(&bin_dir.join("src/index.ts"), &sandbox.join("src/index.ts")); + symlink( + &bin_dir.join("src/modules/moduleA/index.ts"), + &sandbox.join("src/modules/moduleA/index.ts"), + ); + symlink( + &bin_dir.join("src/modules/moduleB/index.ts"), + &sandbox.join("src/modules/moduleB/index.ts"), + ); + + // + print_ls_alr(&sandbox); + + let mut cmd = cli()?; + cmd.current_dir(&sandbox) + .arg("compile") + .arg("--source-maps") + .arg("false") + .arg("--config-file") + .arg(".swcrc") + .arg("--out-file") + .arg(bin_dir.join("src/index.js")) + .arg("src/index.ts"); + + cmd.assert().success(); + + let content = fs::read_to_string(bin_dir.join("src/index.js"))?; + assert!( + content.contains("require(\"./modules/moduleA\")"), + "{}", + content + ); + + Ok(()) +} + /// ln -s $a $b fn symlink(a: &Path, b: &Path) { #[cfg(unix)] diff --git a/crates/swc_ecma_transforms_module/src/path.rs b/crates/swc_ecma_transforms_module/src/path.rs index 057f09f73031..06ee744f46a7 100644 --- a/crates/swc_ecma_transforms_module/src/path.rs +++ b/crates/swc_ecma_transforms_module/src/path.rs @@ -1,8 +1,8 @@ use std::{ borrow::Cow, env::current_dir, - fs::read_link, - io::{self}, + fs::canonicalize, + io, path::{Component, Path, PathBuf}, sync::Arc, }; @@ -245,7 +245,7 @@ where // // https://github.com/swc-project/swc/issues/8265 if let FileName::Real(resolved) = &target.filename { - if let Ok(orig) = read_link(resolved) { + if let Ok(orig) = canonicalize(resolved) { target.filename = FileName::Real(orig); } } From 8263c6fafe9d56106973647c792430bbf292b46f Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Mon, 18 Mar 2024 05:40:18 +0000 Subject: [PATCH 007/172] chore: Bump crates --- CHANGELOG.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 872c1d28f083..175acac5c875 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Changelog ## [unreleased] +### Bug Fixes + + + +- **(es/module)** Fix interop of `jsc.paths` with symlinks ([#8757](https://github.com/swc-project/swc/issues/8757)) ([e2c6db5](https://github.com/swc-project/swc/commit/e2c6db5226e9b34442ab65e02d5bbc3fa9aca65c)) + ### Refactor @@ -1391,9 +1397,6 @@ - **(es)** Fix default value of `jsc.minify.format.comments` ([#7853](https://github.com/swc-project/swc/issues/7853)) ([64e51d3](https://github.com/swc-project/swc/commit/64e51d3a28052734d2eaf9992bc8ba578dd5630b)) -- **(es/minifier)** Don't inline properties if the var is not `fn-local` ([#7839](https://github.com/swc-project/swc/issues/7839)) ([7fe01e6](https://github.com/swc-project/swc/commit/7fe01e64dd9917d375a4f1cf9661ffaca822c5b3)) - - - **(es/minifier)** Don't remove exports ([#7856](https://github.com/swc-project/swc/issues/7856)) ([ae8cd94](https://github.com/swc-project/swc/commit/ae8cd9430dd1ec0d857ac7f87ffa4b76258be92c)) @@ -1411,7 +1414,4 @@ - **(common)** Mark some methods of `Input` unsafe ([#7848](https://github.com/swc-project/swc/issues/7848)) ([c657324](https://github.com/swc-project/swc/commit/c65732496e4e2aab664b7443a29f5180cba6e965)) - -- **(es/minifier)** Pre-calculate `reassigned` ([#7832](https://github.com/swc-project/swc/issues/7832)) ([65db1ba](https://github.com/swc-project/swc/commit/65db1badff3108983fcd59f933e9f87c55d62916)) - From 7c896e5902a1e4b1fb23f3027008f651a029ba09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Mon, 18 Mar 2024 15:23:54 +0900 Subject: [PATCH 008/172] chore: Provide a script to update all SWC crates (#8759) --- README.md | 8 ++++++++ scripts/update-all-swc-crates.sh | 15 +++++++++++++++ 2 files changed, 23 insertions(+) create mode 100755 scripts/update-all-swc-crates.sh diff --git a/README.md b/README.md index d9283d18bb65..b432b1058b10 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,14 @@ for rust users. MSRV of crates is currently nightly, but we will support stable rustc again in the future. +To update all SWC crates you use, you can run `curl https://github.com/raw/swc-project/swc/main/scripts/update-all-swc-crates.sh | bash -s`. This script will update all dependencies to the latest version and run `cargo build` to ensure that everything works. +Note that you need + +- `jq` +- `cargo upgrade` + +command to run the script. + --- If you are using SWC from JavaScript, please refer to [docs on the website](https://swc.rs/docs/installation/). diff --git a/scripts/update-all-swc-crates.sh b/scripts/update-all-swc-crates.sh new file mode 100755 index 000000000000..1daeef2aa414 --- /dev/null +++ b/scripts/update-all-swc-crates.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +set -eu + +echo "Listing all swc crates" + +crates=$(cargo metadata --format-version=1 | jq '.packages .[] | select(.repository == "https://github.com/swc-project/swc.git") | .name') + +command="cargo upgrade --incompatible --recursive false" +for crate in $crates; do + command="$command -p $crate" +done + +echo "Running: $command" +eval $command \ No newline at end of file From 32ed69227a844af3b72e9e681d58b4b7ea1c90f0 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Mon, 18 Mar 2024 06:25:49 +0000 Subject: [PATCH 009/172] chore: Bump crates --- CHANGELOG.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 175acac5c875..a5778c413f95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1402,12 +1402,6 @@ - **(es/module)** Make `jsc.paths` work for a nest.js app ([#7852](https://github.com/swc-project/swc/issues/7852)) ([d33a973](https://github.com/swc-project/swc/commit/d33a97303ceeee4069321ef21027ff99fe973a79)) -### Features - - - -- **(css/ast)** Support `@scope` at-rule ([#7837](https://github.com/swc-project/swc/issues/7837)) ([a34f359](https://github.com/swc-project/swc/commit/a34f3592b3fd2731b63a5c58c5022e12a403850b)) - ### Refactor From 2d6de94936bec269b6a926a1f461179a97b9ac83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Mon, 18 Mar 2024 23:39:31 +0900 Subject: [PATCH 010/172] fix(es/parser): Fix parsing of TypeScript type instantiation (#8758) **Related issue:** - Closes #8735 --- .../fixture/issues-8xxx/8735/input/.swcrc | 19 + .../fixture/issues-8xxx/8735/input/input.tsx | 5 + .../fixture/issues-8xxx/8735/output/input.tsx | 4 + crates/swc_ecma_parser/src/parser/expr.rs | 4 +- .../tests/typescript/issue-8735/1/input.ts | 5 + .../typescript/issue-8735/1/input.ts.json | 371 ++++++++++++++++++ .../tests/typescript/issue-8735/2/input.tsx | 5 + .../typescript/issue-8735/2/input.tsx.json | 371 ++++++++++++++++++ 8 files changed, 782 insertions(+), 2 deletions(-) create mode 100644 crates/swc/tests/fixture/issues-8xxx/8735/input/.swcrc create mode 100644 crates/swc/tests/fixture/issues-8xxx/8735/input/input.tsx create mode 100644 crates/swc/tests/fixture/issues-8xxx/8735/output/input.tsx create mode 100644 crates/swc_ecma_parser/tests/typescript/issue-8735/1/input.ts create mode 100644 crates/swc_ecma_parser/tests/typescript/issue-8735/1/input.ts.json create mode 100644 crates/swc_ecma_parser/tests/typescript/issue-8735/2/input.tsx create mode 100644 crates/swc_ecma_parser/tests/typescript/issue-8735/2/input.tsx.json diff --git a/crates/swc/tests/fixture/issues-8xxx/8735/input/.swcrc b/crates/swc/tests/fixture/issues-8xxx/8735/input/.swcrc new file mode 100644 index 000000000000..65f433d6c2c3 --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8735/input/.swcrc @@ -0,0 +1,19 @@ +{ + "jsc": { + "parser": { + "syntax": "typescript", + "tsx": true + }, + "target": "es5", + "loose": false, + "minify": { + "compress": false, + "mangle": false + } + }, + "module": { + "type": "es6" + }, + "minify": false, + "isModule": true +} \ No newline at end of file diff --git a/crates/swc/tests/fixture/issues-8xxx/8735/input/input.tsx b/crates/swc/tests/fixture/issues-8xxx/8735/input/input.tsx new file mode 100644 index 000000000000..a68c40716e6f --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8735/input/input.tsx @@ -0,0 +1,5 @@ +function getFirstElement(array: T[]): T | null { + return array.length > 0 ? array[0] : null; +} + +let myFunction = getFirstElement as any; diff --git a/crates/swc/tests/fixture/issues-8xxx/8735/output/input.tsx b/crates/swc/tests/fixture/issues-8xxx/8735/output/input.tsx new file mode 100644 index 000000000000..4b12ddc03e08 --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8735/output/input.tsx @@ -0,0 +1,4 @@ +function getFirstElement(array) { + return array.length > 0 ? array[0] : null; +} +var myFunction = getFirstElement; diff --git a/crates/swc_ecma_parser/src/parser/expr.rs b/crates/swc_ecma_parser/src/parser/expr.rs index cbbffbef53a0..705b1e23f4e2 100644 --- a/crates/swc_ecma_parser/src/parser/expr.rs +++ b/crates/swc_ecma_parser/src/parser/expr.rs @@ -1226,7 +1226,7 @@ impl Parser { ) .map(|expr| (Box::new(Expr::TaggedTpl(expr)), true)) .map(Some) - } else if is!(p, '=') { + } else if is_one_of!(p, '=', "as") { Ok(Some(( Box::new(Expr::TsInstantiation(TsInstantiation { span: span!(p, start), @@ -1236,7 +1236,7 @@ impl Parser { }, type_args, })), - true, + false, ))) } else if no_call { unexpected!(p, "`") diff --git a/crates/swc_ecma_parser/tests/typescript/issue-8735/1/input.ts b/crates/swc_ecma_parser/tests/typescript/issue-8735/1/input.ts new file mode 100644 index 000000000000..a68c40716e6f --- /dev/null +++ b/crates/swc_ecma_parser/tests/typescript/issue-8735/1/input.ts @@ -0,0 +1,5 @@ +function getFirstElement(array: T[]): T | null { + return array.length > 0 ? array[0] : null; +} + +let myFunction = getFirstElement as any; diff --git a/crates/swc_ecma_parser/tests/typescript/issue-8735/1/input.ts.json b/crates/swc_ecma_parser/tests/typescript/issue-8735/1/input.ts.json new file mode 100644 index 000000000000..44d43e2a9f2f --- /dev/null +++ b/crates/swc_ecma_parser/tests/typescript/issue-8735/1/input.ts.json @@ -0,0 +1,371 @@ +{ + "type": "Script", + "span": { + "start": 1, + "end": 151, + "ctxt": 0 + }, + "body": [ + { + "type": "FunctionDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 10, + "end": 25, + "ctxt": 0 + }, + "value": "getFirstElement", + "optional": false + }, + "declare": false, + "params": [ + { + "type": "Parameter", + "span": { + "start": 29, + "end": 39, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 29, + "end": 39, + "ctxt": 0 + }, + "value": "array", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 34, + "end": 39, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsArrayType", + "span": { + "start": 36, + "end": 39, + "ctxt": 0 + }, + "elemType": { + "type": "TsTypeReference", + "span": { + "start": 36, + "end": 37, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 36, + "end": 37, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + } + } + } + } + ], + "decorators": [], + "span": { + "start": 1, + "end": 101, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 51, + "end": 101, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ReturnStatement", + "span": { + "start": 57, + "end": 99, + "ctxt": 0 + }, + "argument": { + "type": "ConditionalExpression", + "span": { + "start": 64, + "end": 98, + "ctxt": 0 + }, + "test": { + "type": "BinaryExpression", + "span": { + "start": 64, + "end": 80, + "ctxt": 0 + }, + "operator": ">", + "left": { + "type": "MemberExpression", + "span": { + "start": 64, + "end": 76, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 64, + "end": 69, + "ctxt": 0 + }, + "value": "array", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 70, + "end": 76, + "ctxt": 0 + }, + "value": "length", + "optional": false + } + }, + "right": { + "type": "NumericLiteral", + "span": { + "start": 79, + "end": 80, + "ctxt": 0 + }, + "value": 0.0, + "raw": "0" + } + }, + "consequent": { + "type": "MemberExpression", + "span": { + "start": 83, + "end": 91, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 83, + "end": 88, + "ctxt": 0 + }, + "value": "array", + "optional": false + }, + "property": { + "type": "Computed", + "span": { + "start": 88, + "end": 91, + "ctxt": 0 + }, + "expression": { + "type": "NumericLiteral", + "span": { + "start": 89, + "end": 90, + "ctxt": 0 + }, + "value": 0.0, + "raw": "0" + } + } + }, + "alternate": { + "type": "NullLiteral", + "span": { + "start": 94, + "end": 98, + "ctxt": 0 + } + } + } + } + ] + }, + "generator": false, + "async": false, + "typeParameters": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 25, + "end": 28, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 26, + "end": 27, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 26, + "end": 27, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "in": false, + "out": false, + "const": false, + "constraint": null, + "default": null + } + ] + }, + "returnType": { + "type": "TsTypeAnnotation", + "span": { + "start": 40, + "end": 50, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsUnionType", + "span": { + "start": 42, + "end": 50, + "ctxt": 0 + }, + "types": [ + { + "type": "TsTypeReference", + "span": { + "start": 42, + "end": 43, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 42, + "end": 43, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + }, + { + "type": "TsKeywordType", + "span": { + "start": 46, + "end": 50, + "ctxt": 0 + }, + "kind": "null" + } + ] + } + } + }, + { + "type": "VariableDeclaration", + "span": { + "start": 103, + "end": 151, + "ctxt": 0 + }, + "kind": "let", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 107, + "end": 150, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 107, + "end": 117, + "ctxt": 0 + }, + "value": "myFunction", + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "TsAsExpression", + "span": { + "start": 120, + "end": 150, + "ctxt": 0 + }, + "expression": { + "type": "TsInstantiation", + "span": { + "start": 120, + "end": 143, + "ctxt": 0 + }, + "expression": { + "type": "Identifier", + "span": { + "start": 120, + "end": 135, + "ctxt": 0 + }, + "value": "getFirstElement", + "optional": false + }, + "typeArguments": { + "type": "TsTypeParameterInstantiation", + "span": { + "start": 135, + "end": 143, + "ctxt": 0 + }, + "params": [ + { + "type": "TsKeywordType", + "span": { + "start": 136, + "end": 142, + "ctxt": 0 + }, + "kind": "number" + } + ] + } + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 147, + "end": 150, + "ctxt": 0 + }, + "kind": "any" + } + }, + "definite": false + } + ] + } + ], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/typescript/issue-8735/2/input.tsx b/crates/swc_ecma_parser/tests/typescript/issue-8735/2/input.tsx new file mode 100644 index 000000000000..a68c40716e6f --- /dev/null +++ b/crates/swc_ecma_parser/tests/typescript/issue-8735/2/input.tsx @@ -0,0 +1,5 @@ +function getFirstElement(array: T[]): T | null { + return array.length > 0 ? array[0] : null; +} + +let myFunction = getFirstElement as any; diff --git a/crates/swc_ecma_parser/tests/typescript/issue-8735/2/input.tsx.json b/crates/swc_ecma_parser/tests/typescript/issue-8735/2/input.tsx.json new file mode 100644 index 000000000000..44d43e2a9f2f --- /dev/null +++ b/crates/swc_ecma_parser/tests/typescript/issue-8735/2/input.tsx.json @@ -0,0 +1,371 @@ +{ + "type": "Script", + "span": { + "start": 1, + "end": 151, + "ctxt": 0 + }, + "body": [ + { + "type": "FunctionDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 10, + "end": 25, + "ctxt": 0 + }, + "value": "getFirstElement", + "optional": false + }, + "declare": false, + "params": [ + { + "type": "Parameter", + "span": { + "start": 29, + "end": 39, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 29, + "end": 39, + "ctxt": 0 + }, + "value": "array", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 34, + "end": 39, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsArrayType", + "span": { + "start": 36, + "end": 39, + "ctxt": 0 + }, + "elemType": { + "type": "TsTypeReference", + "span": { + "start": 36, + "end": 37, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 36, + "end": 37, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + } + } + } + } + ], + "decorators": [], + "span": { + "start": 1, + "end": 101, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 51, + "end": 101, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ReturnStatement", + "span": { + "start": 57, + "end": 99, + "ctxt": 0 + }, + "argument": { + "type": "ConditionalExpression", + "span": { + "start": 64, + "end": 98, + "ctxt": 0 + }, + "test": { + "type": "BinaryExpression", + "span": { + "start": 64, + "end": 80, + "ctxt": 0 + }, + "operator": ">", + "left": { + "type": "MemberExpression", + "span": { + "start": 64, + "end": 76, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 64, + "end": 69, + "ctxt": 0 + }, + "value": "array", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 70, + "end": 76, + "ctxt": 0 + }, + "value": "length", + "optional": false + } + }, + "right": { + "type": "NumericLiteral", + "span": { + "start": 79, + "end": 80, + "ctxt": 0 + }, + "value": 0.0, + "raw": "0" + } + }, + "consequent": { + "type": "MemberExpression", + "span": { + "start": 83, + "end": 91, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 83, + "end": 88, + "ctxt": 0 + }, + "value": "array", + "optional": false + }, + "property": { + "type": "Computed", + "span": { + "start": 88, + "end": 91, + "ctxt": 0 + }, + "expression": { + "type": "NumericLiteral", + "span": { + "start": 89, + "end": 90, + "ctxt": 0 + }, + "value": 0.0, + "raw": "0" + } + } + }, + "alternate": { + "type": "NullLiteral", + "span": { + "start": 94, + "end": 98, + "ctxt": 0 + } + } + } + } + ] + }, + "generator": false, + "async": false, + "typeParameters": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 25, + "end": 28, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 26, + "end": 27, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 26, + "end": 27, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "in": false, + "out": false, + "const": false, + "constraint": null, + "default": null + } + ] + }, + "returnType": { + "type": "TsTypeAnnotation", + "span": { + "start": 40, + "end": 50, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsUnionType", + "span": { + "start": 42, + "end": 50, + "ctxt": 0 + }, + "types": [ + { + "type": "TsTypeReference", + "span": { + "start": 42, + "end": 43, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 42, + "end": 43, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + }, + { + "type": "TsKeywordType", + "span": { + "start": 46, + "end": 50, + "ctxt": 0 + }, + "kind": "null" + } + ] + } + } + }, + { + "type": "VariableDeclaration", + "span": { + "start": 103, + "end": 151, + "ctxt": 0 + }, + "kind": "let", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 107, + "end": 150, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 107, + "end": 117, + "ctxt": 0 + }, + "value": "myFunction", + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "TsAsExpression", + "span": { + "start": 120, + "end": 150, + "ctxt": 0 + }, + "expression": { + "type": "TsInstantiation", + "span": { + "start": 120, + "end": 143, + "ctxt": 0 + }, + "expression": { + "type": "Identifier", + "span": { + "start": 120, + "end": 135, + "ctxt": 0 + }, + "value": "getFirstElement", + "optional": false + }, + "typeArguments": { + "type": "TsTypeParameterInstantiation", + "span": { + "start": 135, + "end": 143, + "ctxt": 0 + }, + "params": [ + { + "type": "TsKeywordType", + "span": { + "start": 136, + "end": 142, + "ctxt": 0 + }, + "kind": "number" + } + ] + } + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 147, + "end": 150, + "ctxt": 0 + }, + "kind": "any" + } + }, + "definite": false + } + ] + } + ], + "interpreter": null +} From 2067677e49dd235ac6ddcfb162a4cc3f25b21cbf Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Mon, 18 Mar 2024 14:41:15 +0000 Subject: [PATCH 011/172] chore: Bump crates --- CHANGELOG.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5778c413f95..1cbc04ac36b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ - **(es/module)** Fix interop of `jsc.paths` with symlinks ([#8757](https://github.com/swc-project/swc/issues/8757)) ([e2c6db5](https://github.com/swc-project/swc/commit/e2c6db5226e9b34442ab65e02d5bbc3fa9aca65c)) + +- **(es/parser)** Fix parsing of TypeScript type instantiation ([#8758](https://github.com/swc-project/swc/issues/8758)) ([2d6de94](https://github.com/swc-project/swc/commit/2d6de94936bec269b6a926a1f461179a97b9ac83)) + ### Refactor @@ -1402,10 +1405,4 @@ - **(es/module)** Make `jsc.paths` work for a nest.js app ([#7852](https://github.com/swc-project/swc/issues/7852)) ([d33a973](https://github.com/swc-project/swc/commit/d33a97303ceeee4069321ef21027ff99fe973a79)) -### Refactor - - - -- **(common)** Mark some methods of `Input` unsafe ([#7848](https://github.com/swc-project/swc/issues/7848)) ([c657324](https://github.com/swc-project/swc/commit/c65732496e4e2aab664b7443a29f5180cba6e965)) - From c9c971a79236f0e5c713f4341ea71591e979ea21 Mon Sep 17 00:00:00 2001 From: pshu Date: Tue, 19 Mar 2024 13:39:06 +0800 Subject: [PATCH 012/172] feat(es/lints): Detect duplicate bindings in export defaults (#8760) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description:** add DefaultDecl's FnExpr and ClassExpr's ident to bindings. because all of them should be treated as hoisted Fn/Class Declare ```txt × the name `x` is defined multiple times ╭─[examples/all.js:1:1] 1 │ export default class x{} · ┬ · ╰── previous definition of `x` here 2 │ 3 │ let x = 1; · ┬ · ╰── `x` redefined here 4 │ let t = function x(){}; ╰──── ``` **Related issue:** - Closes #8755 --- .../module/export-default-class-expr/input.js | 2 ++ .../output.swc-stderr | 10 ++++++ .../module/export-default-fn-expr/input.js | 2 ++ .../export-default-fn-expr/output.swc-stderr | 10 ++++++ .../multipleDefaultExports03.1.normal.js | 14 +++++++++ .../multipleDefaultExports03.2.minified.js | 14 +++++++++ .../src/rules/duplicate_bindings.rs | 31 +++++++++++++++++++ .../export_default_class_expr/1/input.js | 2 ++ .../export/export_default_fn_expr/1/input.js | 2 ++ .../export/export_default_fn_expr/2/input.ts | 2 ++ 10 files changed, 89 insertions(+) create mode 100644 crates/swc/tests/errors/lints/duplicate-bindings/module/export-default-class-expr/input.js create mode 100644 crates/swc/tests/errors/lints/duplicate-bindings/module/export-default-class-expr/output.swc-stderr create mode 100644 crates/swc/tests/errors/lints/duplicate-bindings/module/export-default-fn-expr/input.js create mode 100644 crates/swc/tests/errors/lints/duplicate-bindings/module/export-default-fn-expr/output.swc-stderr create mode 100644 crates/swc_ecma_lints/tests/pass/export/export_default_class_expr/1/input.js create mode 100644 crates/swc_ecma_lints/tests/pass/export/export_default_fn_expr/1/input.js create mode 100644 crates/swc_ecma_lints/tests/pass/export/export_default_fn_expr/2/input.ts diff --git a/crates/swc/tests/errors/lints/duplicate-bindings/module/export-default-class-expr/input.js b/crates/swc/tests/errors/lints/duplicate-bindings/module/export-default-class-expr/input.js new file mode 100644 index 000000000000..ccdfd1922466 --- /dev/null +++ b/crates/swc/tests/errors/lints/duplicate-bindings/module/export-default-class-expr/input.js @@ -0,0 +1,2 @@ +export default class Foo{} +let Foo = 1; // error diff --git a/crates/swc/tests/errors/lints/duplicate-bindings/module/export-default-class-expr/output.swc-stderr b/crates/swc/tests/errors/lints/duplicate-bindings/module/export-default-class-expr/output.swc-stderr new file mode 100644 index 000000000000..41cf007ebfb0 --- /dev/null +++ b/crates/swc/tests/errors/lints/duplicate-bindings/module/export-default-class-expr/output.swc-stderr @@ -0,0 +1,10 @@ + + x the name `Foo` is defined multiple times + ,-[1:1] + 1 | export default class Foo{} + : ^|^ + : `-- previous definition of `Foo` here + 2 | let Foo = 1; // error + : ^|^ + : `-- `Foo` redefined here + `---- diff --git a/crates/swc/tests/errors/lints/duplicate-bindings/module/export-default-fn-expr/input.js b/crates/swc/tests/errors/lints/duplicate-bindings/module/export-default-fn-expr/input.js new file mode 100644 index 000000000000..bcf118c3d3cc --- /dev/null +++ b/crates/swc/tests/errors/lints/duplicate-bindings/module/export-default-fn-expr/input.js @@ -0,0 +1,2 @@ +export default function foo(){} +let foo = 1; // error \ No newline at end of file diff --git a/crates/swc/tests/errors/lints/duplicate-bindings/module/export-default-fn-expr/output.swc-stderr b/crates/swc/tests/errors/lints/duplicate-bindings/module/export-default-fn-expr/output.swc-stderr new file mode 100644 index 000000000000..163efffaa472 --- /dev/null +++ b/crates/swc/tests/errors/lints/duplicate-bindings/module/export-default-fn-expr/output.swc-stderr @@ -0,0 +1,10 @@ + + x the name `foo` is defined multiple times + ,-[1:1] + 1 | export default function foo(){} + : ^|^ + : `-- previous definition of `foo` here + 2 | let foo = 1; // error + : ^|^ + : `-- `foo` redefined here + `---- diff --git a/crates/swc/tests/tsc-references/multipleDefaultExports03.1.normal.js b/crates/swc/tests/tsc-references/multipleDefaultExports03.1.normal.js index 395b14189709..2507ae4bb976 100644 --- a/crates/swc/tests/tsc-references/multipleDefaultExports03.1.normal.js +++ b/crates/swc/tests/tsc-references/multipleDefaultExports03.1.normal.js @@ -1,5 +1,19 @@ //// [multipleDefaultExports03.ts] //! +//! x the name `C` is defined multiple times +//! ,-[1:1] +//! 1 | +//! 2 | export default class C { +//! : | +//! : `-- previous definition of `C` here +//! 3 | } +//! 4 | +//! 5 | export default class C { +//! : | +//! : `-- `C` redefined here +//! 6 | } +//! `---- +//! //! x the name `default` is exported multiple times //! ,-[1:1] //! 1 | diff --git a/crates/swc/tests/tsc-references/multipleDefaultExports03.2.minified.js b/crates/swc/tests/tsc-references/multipleDefaultExports03.2.minified.js index 395b14189709..2507ae4bb976 100644 --- a/crates/swc/tests/tsc-references/multipleDefaultExports03.2.minified.js +++ b/crates/swc/tests/tsc-references/multipleDefaultExports03.2.minified.js @@ -1,5 +1,19 @@ //// [multipleDefaultExports03.ts] //! +//! x the name `C` is defined multiple times +//! ,-[1:1] +//! 1 | +//! 2 | export default class C { +//! : | +//! : `-- previous definition of `C` here +//! 3 | } +//! 4 | +//! 5 | export default class C { +//! : | +//! : `-- `C` redefined here +//! 6 | } +//! `---- +//! //! x the name `default` is exported multiple times //! ,-[1:1] //! 1 | diff --git a/crates/swc_ecma_lints/src/rules/duplicate_bindings.rs b/crates/swc_ecma_lints/src/rules/duplicate_bindings.rs index c96cad81031d..1f196773bef8 100644 --- a/crates/swc_ecma_lints/src/rules/duplicate_bindings.rs +++ b/crates/swc_ecma_lints/src/rules/duplicate_bindings.rs @@ -239,6 +239,37 @@ impl Visit for DuplicateBindings { s.visit_children_with(self); } + fn visit_export_default_decl(&mut self, e: &ExportDefaultDecl) { + // export default function foo() {} should be treated as hoisted + match &e.decl { + DefaultDecl::Class(ClassExpr { + ident: Some(ident), .. + }) => self.add( + ident.sym.clone(), + BindingInfo { + span: ident.span, + unique: true, + is_function: false, + }, + ), + DefaultDecl::Fn(FnExpr { + ident: Some(ident), + function: f, + .. + }) if f.body.is_some() => self.add( + ident.sym.clone(), + BindingInfo { + span: ident.span, + unique: self.lexical_function, + is_function: true, + }, + ), + _ => {} + } + + e.visit_children_with(self); + } + fn visit_import_default_specifier(&mut self, s: &ImportDefaultSpecifier) { s.visit_children_with(self); diff --git a/crates/swc_ecma_lints/tests/pass/export/export_default_class_expr/1/input.js b/crates/swc_ecma_lints/tests/pass/export/export_default_class_expr/1/input.js new file mode 100644 index 000000000000..99caf09c769f --- /dev/null +++ b/crates/swc_ecma_lints/tests/pass/export/export_default_class_expr/1/input.js @@ -0,0 +1,2 @@ +export default class Foo{}; +let bar = function Foo(){}; \ No newline at end of file diff --git a/crates/swc_ecma_lints/tests/pass/export/export_default_fn_expr/1/input.js b/crates/swc_ecma_lints/tests/pass/export/export_default_fn_expr/1/input.js new file mode 100644 index 000000000000..8023e014448b --- /dev/null +++ b/crates/swc_ecma_lints/tests/pass/export/export_default_fn_expr/1/input.js @@ -0,0 +1,2 @@ +export default function foo(){}; +let bar = function foo(){}; \ No newline at end of file diff --git a/crates/swc_ecma_lints/tests/pass/export/export_default_fn_expr/2/input.ts b/crates/swc_ecma_lints/tests/pass/export/export_default_fn_expr/2/input.ts new file mode 100644 index 000000000000..7b86de46a398 --- /dev/null +++ b/crates/swc_ecma_lints/tests/pass/export/export_default_fn_expr/2/input.ts @@ -0,0 +1,2 @@ +export default function foo(); +let foo = 1; \ No newline at end of file From 6fba5f7c9761f88b100cc9b3530682e4de1342e6 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 19 Mar 2024 05:41:00 +0000 Subject: [PATCH 013/172] chore: Bump crates --- CHANGELOG.md | 9 ++++++--- Cargo.lock | 4 ++-- crates/swc_core/Cargo.toml | 2 +- crates/swc_ecma_lints/Cargo.toml | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cbc04ac36b1..ba9be465b136 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,12 @@ - **(es/parser)** Fix parsing of TypeScript type instantiation ([#8758](https://github.com/swc-project/swc/issues/8758)) ([2d6de94](https://github.com/swc-project/swc/commit/2d6de94936bec269b6a926a1f461179a97b9ac83)) +### Features + + + +- **(es/lints)** Detect duplicate bindings in export defaults ([#8760](https://github.com/swc-project/swc/issues/8760)) ([c9c971a](https://github.com/swc-project/swc/commit/c9c971a79236f0e5c713f4341ea71591e979ea21)) + ### Refactor @@ -1397,9 +1403,6 @@ -- **(es)** Fix default value of `jsc.minify.format.comments` ([#7853](https://github.com/swc-project/swc/issues/7853)) ([64e51d3](https://github.com/swc-project/swc/commit/64e51d3a28052734d2eaf9992bc8ba578dd5630b)) - - - **(es/minifier)** Don't remove exports ([#7856](https://github.com/swc-project/swc/issues/7856)) ([ae8cd94](https://github.com/swc-project/swc/commit/ae8cd9430dd1ec0d857ac7f87ffa4b76258be92c)) diff --git a/Cargo.lock b/Cargo.lock index 913c72310e26..5d7f3a4c423c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3897,7 +3897,7 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.90.23" +version = "0.90.24" dependencies = [ "anyhow", "binding_macros", @@ -4387,7 +4387,7 @@ dependencies = [ [[package]] name = "swc_ecma_lints" -version = "0.92.18" +version = "0.92.19" dependencies = [ "auto_impl", "dashmap", diff --git a/crates/swc_core/Cargo.toml b/crates/swc_core/Cargo.toml index 3423b590b813..ff75267b6d1d 100644 --- a/crates/swc_core/Cargo.toml +++ b/crates/swc_core/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_core" repository = "https://github.com/swc-project/swc.git" -version = "0.90.23" +version = "0.90.24" [package.metadata.docs.rs] features = [ "allocator_node", diff --git a/crates/swc_ecma_lints/Cargo.toml b/crates/swc_ecma_lints/Cargo.toml index 8328abe7418e..34005ef24cb1 100644 --- a/crates/swc_ecma_lints/Cargo.toml +++ b/crates/swc_ecma_lints/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_lints" repository = "https://github.com/swc-project/swc.git" -version = "0.92.18" +version = "0.92.19" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] From 9f98a7026df50a548011baf6d075d00bdd77a85a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Wed, 20 Mar 2024 11:35:24 +0900 Subject: [PATCH 014/172] fix(es/minifier): Abort eval on `valueOf` or `toString` (#8763) **Related issue:** - Closes #8704 - Closes #8705 --- .../fixture/issues-8xxx/8705/input/.swcrc | 64 +++++++++++++++++++ .../tests/fixture/issues-8xxx/8705/input/1.js | 1 + .../fixture/issues-8xxx/8705/output/1.js | 3 + .../tests/fixture/issues/8704/config.json | 47 ++++++++++++++ .../tests/fixture/issues/8704/input.js | 1 + .../tests/fixture/issues/8704/output.js | 3 + .../tests/fixture/issues/8705/config.json | 47 ++++++++++++++ .../tests/fixture/issues/8705/input.js | 1 + .../tests/fixture/issues/8705/output.js | 3 + .../src/simplify/expr/tests.rs | 4 -- crates/swc_ecma_utils/src/lib.rs | 3 +- 11 files changed, 171 insertions(+), 6 deletions(-) create mode 100644 crates/swc/tests/fixture/issues-8xxx/8705/input/.swcrc create mode 100644 crates/swc/tests/fixture/issues-8xxx/8705/input/1.js create mode 100644 crates/swc/tests/fixture/issues-8xxx/8705/output/1.js create mode 100644 crates/swc_ecma_minifier/tests/fixture/issues/8704/config.json create mode 100644 crates/swc_ecma_minifier/tests/fixture/issues/8704/input.js create mode 100644 crates/swc_ecma_minifier/tests/fixture/issues/8704/output.js create mode 100644 crates/swc_ecma_minifier/tests/fixture/issues/8705/config.json create mode 100644 crates/swc_ecma_minifier/tests/fixture/issues/8705/input.js create mode 100644 crates/swc_ecma_minifier/tests/fixture/issues/8705/output.js diff --git a/crates/swc/tests/fixture/issues-8xxx/8705/input/.swcrc b/crates/swc/tests/fixture/issues-8xxx/8705/input/.swcrc new file mode 100644 index 000000000000..a35cd5524970 --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8705/input/.swcrc @@ -0,0 +1,64 @@ +{ + "jsc": { + "parser": { + "syntax": "ecmascript", + "jsx": false + }, + "target": "es2022", + "loose": false, + "minify": { + "compress": { + "arguments": false, + "arrows": true, + "booleans": true, + "booleans_as_integers": false, + "collapse_vars": true, + "comparisons": true, + "computed_props": true, + "conditionals": true, + "dead_code": true, + "directives": true, + "drop_console": false, + "drop_debugger": true, + "evaluate": true, + "expression": false, + "hoist_funs": false, + "hoist_props": true, + "hoist_vars": false, + "if_return": true, + "join_vars": true, + "keep_classnames": false, + "keep_fargs": true, + "keep_fnames": false, + "keep_infinity": false, + "loops": true, + "negate_iife": true, + "properties": true, + "reduce_funcs": false, + "reduce_vars": false, + "side_effects": true, + "switches": true, + "typeofs": true, + "unsafe": false, + "unsafe_arrows": false, + "unsafe_comps": false, + "unsafe_Function": false, + "unsafe_math": false, + "unsafe_symbols": false, + "unsafe_methods": false, + "unsafe_proto": false, + "unsafe_regexp": false, + "unsafe_undefined": false, + "unused": true, + "const_to_let": true, + "pristine_globals": true + }, + "mangle": false + } + }, + "module": { + "type": "es6" + }, + "minify": false, + "isModule": true +} \ No newline at end of file diff --git a/crates/swc/tests/fixture/issues-8xxx/8705/input/1.js b/crates/swc/tests/fixture/issues-8xxx/8705/input/1.js new file mode 100644 index 000000000000..332255e2219f --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8705/input/1.js @@ -0,0 +1 @@ +console.log(Math.pow({ valueOf() { return 42 } }, 1)) diff --git a/crates/swc/tests/fixture/issues-8xxx/8705/output/1.js b/crates/swc/tests/fixture/issues-8xxx/8705/output/1.js new file mode 100644 index 000000000000..8e81820cd976 --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8705/output/1.js @@ -0,0 +1,3 @@ +console.log(Math.pow({ + valueOf: ()=>42 +}, 1)); diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/8704/config.json b/crates/swc_ecma_minifier/tests/fixture/issues/8704/config.json new file mode 100644 index 000000000000..7e144b291fa7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/8704/config.json @@ -0,0 +1,47 @@ +{ + "defaults": true, + "arguments": false, + "arrows": true, + "booleans": true, + "booleans_as_integers": false, + "collapse_vars": true, + "comparisons": true, + "computed_props": true, + "conditionals": true, + "dead_code": true, + "directives": true, + "drop_console": false, + "drop_debugger": true, + "evaluate": true, + "expression": false, + "hoist_funs": false, + "hoist_props": true, + "hoist_vars": false, + "if_return": true, + "join_vars": true, + "keep_classnames": false, + "keep_fargs": true, + "keep_fnames": false, + "keep_infinity": false, + "loops": true, + "negate_iife": true, + "properties": true, + "reduce_funcs": false, + "reduce_vars": false, + "side_effects": true, + "switches": true, + "typeofs": true, + "unsafe": false, + "unsafe_arrows": false, + "unsafe_comps": false, + "unsafe_Function": false, + "unsafe_math": false, + "unsafe_symbols": false, + "unsafe_methods": false, + "unsafe_proto": false, + "unsafe_regexp": false, + "unsafe_undefined": false, + "unused": true, + "const_to_let": true, + "pristine_globals": true +} diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/8704/input.js b/crates/swc_ecma_minifier/tests/fixture/issues/8704/input.js new file mode 100644 index 000000000000..8cedf7ef50b3 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/8704/input.js @@ -0,0 +1 @@ +console.log({ toString() { return 'swc' } } + '') diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/8704/output.js b/crates/swc_ecma_minifier/tests/fixture/issues/8704/output.js new file mode 100644 index 000000000000..d3c34ee65f73 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/8704/output.js @@ -0,0 +1,3 @@ +console.log({ + toString: ()=>'swc' +} + ''); diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/8705/config.json b/crates/swc_ecma_minifier/tests/fixture/issues/8705/config.json new file mode 100644 index 000000000000..7e144b291fa7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/8705/config.json @@ -0,0 +1,47 @@ +{ + "defaults": true, + "arguments": false, + "arrows": true, + "booleans": true, + "booleans_as_integers": false, + "collapse_vars": true, + "comparisons": true, + "computed_props": true, + "conditionals": true, + "dead_code": true, + "directives": true, + "drop_console": false, + "drop_debugger": true, + "evaluate": true, + "expression": false, + "hoist_funs": false, + "hoist_props": true, + "hoist_vars": false, + "if_return": true, + "join_vars": true, + "keep_classnames": false, + "keep_fargs": true, + "keep_fnames": false, + "keep_infinity": false, + "loops": true, + "negate_iife": true, + "properties": true, + "reduce_funcs": false, + "reduce_vars": false, + "side_effects": true, + "switches": true, + "typeofs": true, + "unsafe": false, + "unsafe_arrows": false, + "unsafe_comps": false, + "unsafe_Function": false, + "unsafe_math": false, + "unsafe_symbols": false, + "unsafe_methods": false, + "unsafe_proto": false, + "unsafe_regexp": false, + "unsafe_undefined": false, + "unused": true, + "const_to_let": true, + "pristine_globals": true +} diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/8705/input.js b/crates/swc_ecma_minifier/tests/fixture/issues/8705/input.js new file mode 100644 index 000000000000..332255e2219f --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/8705/input.js @@ -0,0 +1 @@ +console.log(Math.pow({ valueOf() { return 42 } }, 1)) diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/8705/output.js b/crates/swc_ecma_minifier/tests/fixture/issues/8705/output.js new file mode 100644 index 000000000000..8e81820cd976 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/8705/output.js @@ -0,0 +1,3 @@ +console.log(Math.pow({ + valueOf: ()=>42 +}, 1)); diff --git a/crates/swc_ecma_transforms_optimization/src/simplify/expr/tests.rs b/crates/swc_ecma_transforms_optimization/src/simplify/expr/tests.rs index 472c4b3506bd..9b4b388a6c01 100644 --- a/crates/swc_ecma_transforms_optimization/src/simplify/expr/tests.rs +++ b/crates/swc_ecma_transforms_optimization/src/simplify/expr/tests.rs @@ -661,10 +661,6 @@ fn test_folding_mix_types_early() { fn test_folding_add1() { fold("x = null + true", "x=1"); fold_same("x = a + true"); - fold("x = '' + {}", "x = \"[object Object]\""); - fold("x = [] + {}", "x = \"[object Object]\""); - fold("x = {} + []", "x = \"[object Object]\""); - fold("x = {} + ''", "x = \"[object Object]\""); } #[test] diff --git a/crates/swc_ecma_utils/src/lib.rs b/crates/swc_ecma_utils/src/lib.rs index 2963edaca181..ac372cd97600 100644 --- a/crates/swc_ecma_utils/src/lib.rs +++ b/crates/swc_ecma_utils/src/lib.rs @@ -935,7 +935,7 @@ pub trait ExprExt { } } - Expr::Tpl(..) | Expr::Object(ObjectLit { .. }) | Expr::Array(ArrayLit { .. }) => { + Expr::Tpl(..) => { return ( Pure, num_from_str(&match self.as_pure_string(ctx) { @@ -1058,7 +1058,6 @@ pub trait ExprExt { } Known(buf.into()) } - Expr::Object(ObjectLit { .. }) => Known(Cow::Borrowed("[object Object]")), _ => Unknown, } } From df977a0bbdf81ab01175c3424e967702f1e2aeaf Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Wed, 20 Mar 2024 02:37:04 +0000 Subject: [PATCH 015/172] chore: Bump crates --- CHANGELOG.md | 3 +++ Cargo.lock | 2 +- crates/swc_ecma_utils/Cargo.toml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba9be465b136..e0bb1aa44cf5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ +- **(es/minifier)** Abort eval on `valueOf` or `toString` ([#8763](https://github.com/swc-project/swc/issues/8763)) ([9f98a70](https://github.com/swc-project/swc/commit/9f98a7026df50a548011baf6d075d00bdd77a85a)) + + - **(es/module)** Fix interop of `jsc.paths` with symlinks ([#8757](https://github.com/swc-project/swc/issues/8757)) ([e2c6db5](https://github.com/swc-project/swc/commit/e2c6db5226e9b34442ab65e02d5bbc3fa9aca65c)) diff --git a/Cargo.lock b/Cargo.lock index 5d7f3a4c423c..166b59932239 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4848,7 +4848,7 @@ dependencies = [ [[package]] name = "swc_ecma_utils" -version = "0.127.13" +version = "0.127.14" dependencies = [ "indexmap 2.1.0", "num_cpus", diff --git a/crates/swc_ecma_utils/Cargo.toml b/crates/swc_ecma_utils/Cargo.toml index 3d8f92c3c406..9ab34436795c 100644 --- a/crates/swc_ecma_utils/Cargo.toml +++ b/crates/swc_ecma_utils/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_utils" repository = "https://github.com/swc-project/swc.git" -version = "0.127.13" +version = "0.127.14" [package.metadata.docs.rs] all-features = true From 45c11f6e4afe2a3b1829cbe21333ab759f9ac28e Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Thu, 21 Mar 2024 00:07:23 +0000 Subject: [PATCH 016/172] chore: Publish 1.4.9-nightly-20240321.1 --- bindings/Cargo.lock | 190 +++++++++++----------- bindings/binding_core_node/Cargo.toml | 2 +- bindings/binding_core_wasm/Cargo.toml | 4 +- bindings/binding_minifier_node/Cargo.toml | 6 +- bindings/binding_minifier_wasm/Cargo.toml | 4 +- bindings/swc_cli/Cargo.toml | 4 +- package.json | 2 +- packages/minifier/package.json | 2 +- 8 files changed, 107 insertions(+), 107 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index cad441e5bc30..cfe82d07ebaa 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -223,7 +223,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.4.9-nightly-20240316.1" +version = "1.4.9-nightly-20240321.1" dependencies = [ "anyhow", "getrandom", @@ -236,9 +236,9 @@ dependencies = [ [[package]] name = "binding_macros" -version = "0.64.21" +version = "0.64.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eafb79d33c5a86e79be2a61e4e61b964ba7f088cc71ccc1cf592bdd1e4ce8f6f" +checksum = "bfd8f34cab921542b9dcddd34d65e5ee3953d16d07a643509494ad2d7946cb1a" dependencies = [ "anyhow", "console_error_panic_hook", @@ -283,7 +283,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.4.9-nightly-20240316.1" +version = "1.4.9-nightly-20240321.1" dependencies = [ "anyhow", "getrandom", @@ -2926,9 +2926,9 @@ dependencies = [ [[package]] name = "swc" -version = "0.273.21" +version = "0.273.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271c22c41d6232166f69dd16264f44ab7217a5b3ee6c6c428991dae86e577c11" +checksum = "48a68d147a2270bbe2164ee4060d0176590a1035f54d82f7252d16a15e4154a9" dependencies = [ "anyhow", "base64", @@ -2993,9 +2993,9 @@ dependencies = [ [[package]] name = "swc_bundler" -version = "0.225.16" +version = "0.225.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c48267139ec36f4250360c80a400c4efe3a9d82e69c74406a4760bb0f94297" +checksum = "f145a1a7293edce9efa80fe4f92a2cbd821c31d5c3123d04182fc1928613d978" dependencies = [ "anyhow", "crc", @@ -3039,7 +3039,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.201" +version = "0.91.202" dependencies = [ "anyhow", "swc_cli_impl", @@ -3047,9 +3047,9 @@ dependencies = [ [[package]] name = "swc_cli_impl" -version = "0.8.21" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "264ba0adccc8721359ed240c004f8744846f5431a50d0c8f7717defbd02547c9" +checksum = "682e3bd75c5c9c6430197680cbeadc86b4728fa514adcf5fb0d6d515119d6b24" dependencies = [ "anyhow", "atty", @@ -3071,9 +3071,9 @@ dependencies = [ [[package]] name = "swc_common" -version = "0.33.19" +version = "0.33.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc30ce6695b841f0a9ae01a9ca10ac3922cff559a6253c756a203c4332c62945" +checksum = "317d2fcdbb1bc9ecfd0bfc67468d675a5159a6fd1863abf41c8c5b7b7adcab03" dependencies = [ "ahash 0.8.8", "anyhow", @@ -3102,9 +3102,9 @@ dependencies = [ [[package]] name = "swc_compiler_base" -version = "0.7.17" +version = "0.7.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da889eaa8f6d019f3b391eebfb395990a0b58b4f4e86f76689f2a14fd8de2239" +checksum = "e14edecfac835e77c88017d016c48dba60e82632ee94eb9565f516ebc7072e6a" dependencies = [ "anyhow", "base64", @@ -3154,9 +3154,9 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.90.22" +version = "0.90.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd79fcc3d20ab7b74794d4155ac12639760e8ec96fed7413624db61f3185e62" +checksum = "354892a17af24956c9ae5479c2bd0a2f9c344aab79e6f2fbd01b7b8eb4e46c2e" dependencies = [ "binding_macros", "swc", @@ -3181,9 +3181,9 @@ dependencies = [ [[package]] name = "swc_ecma_ast" -version = "0.112.5" +version = "0.112.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "032f528398358da8ff2fe795755602b4a81ffc93430b9830c0e1d5f198d8f48d" +checksum = "70656acd47c91918635f1e8589963428cb3170975b71d786c79fb7a25605f687" dependencies = [ "bitflags 2.3.3", "bytecheck", @@ -3201,9 +3201,9 @@ dependencies = [ [[package]] name = "swc_ecma_codegen" -version = "0.148.11" +version = "0.148.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d469ef5ec86a90fb2fa3bff474847fc4d16fd98e34254b834aaf2484bfe472" +checksum = "2afcce205914b8451880fc5ef63dae9bac3dc7b71917921ede64f8e7fd8447a1" dependencies = [ "memchr", "num-bigint", @@ -3232,9 +3232,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_bugfixes" -version = "0.4.16" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a491b350c33afc7b043f065f060dcfbfe112e40765b3253e03c33d86149fcc" +checksum = "8731bec087336f7ed1cd4d4c082a6f7b7b9072ac5fc6f6379b6f98520a0e8303" dependencies = [ "swc_atoms", "swc_common", @@ -3249,9 +3249,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_common" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30fd7f4e35d1a8e9edc495fdd843993103cf7b230bbd2ee960d402c5ca8e3c7" +checksum = "1b06844b66a86b8f3bad66888500fd8fe1e4ac09612c5ae0946ca3f77b81f6b0" dependencies = [ "swc_common", "swc_ecma_ast", @@ -3262,9 +3262,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2015" -version = "0.4.16" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34bd915d417c1dd95811ae7a16588969ccb598e65721f235781396aac158fb33" +checksum = "7646243203205d2409a891b998d4d30b7a4563a57429da1cbeabd03f18e506b2" dependencies = [ "arrayvec", "indexmap 2.1.0", @@ -3288,9 +3288,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2016" -version = "0.4.15" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63ca0be7e941e2c6cfcc66e1821d05511c7fa5bed01da2037ab65c0aa3a508bf" +checksum = "c75e868ae64fe2625c8aae1f929bae734500ae336d37731f6d4bdf66b8e3b8d3" dependencies = [ "swc_atoms", "swc_common", @@ -3305,9 +3305,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2017" -version = "0.4.15" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a85af431e6b334fbd5d83bebb3fdaaf9f94882c8a3fdb91bb4e5100319109a3" +checksum = "d9335b27e554e21db7cd541bcee1b5a58b5994439d1a2cb1c9188a3a557548d3" dependencies = [ "serde", "swc_atoms", @@ -3323,9 +3323,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2018" -version = "0.4.15" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829e6bf821dbe4381d41b51b062b31f0a97c8d80c98b41060e4c80245d260cb5" +checksum = "66be32a60872762335524766f0afca4900699e1fc7ab14d87567e0e9b3d95cc2" dependencies = [ "serde", "swc_atoms", @@ -3342,9 +3342,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2019" -version = "0.4.15" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa7a7fd53ffa313ed1d03fa913ddb3db42e2e36609a4d062a2c4cfbfae68d9ac" +checksum = "6a984708b06d662df1c10c2fc06bf98562c6ea3bb93c0e4d5491ee8e61c08e00" dependencies = [ "swc_atoms", "swc_common", @@ -3358,9 +3358,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2020" -version = "0.4.15" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b56f42e0fbeabe54dd963a5f2ae861c5375e50084e0b9bd18520e9ee9308b13" +checksum = "c8b310227bbafd12dbe717c1969bf5095e9b6aff563cea3e9ff6e46371971293" dependencies = [ "serde", "swc_atoms", @@ -3376,9 +3376,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2021" -version = "0.4.15" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44df74b9fe6604faa8ae7b95fadfa1a783ee0e782caa35992f841a87b3943ee1" +checksum = "ab566642dff583a16b7b188cf9effc6ae603ea2172769f7a3e7fc1aaf41b67b3" dependencies = [ "swc_atoms", "swc_common", @@ -3392,9 +3392,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2022" -version = "0.4.15" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12e9090383b12124af70f1f4853e6b1108bfc70b7199282e8577d85a058bd23c" +checksum = "62fcfa41b83014ee338c219c446e4ac7f66620706d871b1234d68f990a26225b" dependencies = [ "swc_atoms", "swc_common", @@ -3411,9 +3411,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es3" -version = "0.4.15" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34f8eb567e43cd7d5f0816281eac57c505b5da2afe9e73b7e460fe074b924c32" +checksum = "3678f2454374d8aefe0997fa32089dd2c3f06d20ecaa0d1fa30c0d3e9871c79b" dependencies = [ "swc_common", "swc_ecma_ast", @@ -3426,9 +3426,9 @@ dependencies = [ [[package]] name = "swc_ecma_ext_transforms" -version = "0.113.12" +version = "0.113.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78c06ae715d8b8137b9c9b2abc6728d699a7b252ed290bfa8a9a14b5af009f1" +checksum = "71d02e315207f4c6fd0a1a475039b2874392e46a04d1a297c9c66ef0082d9fce" dependencies = [ "phf", "swc_atoms", @@ -3440,9 +3440,9 @@ dependencies = [ [[package]] name = "swc_ecma_lints" -version = "0.92.17" +version = "0.92.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41f1bda71bedf2b63f44d0ac3d9830d717491a4d826e70493778efd0fba0af1" +checksum = "12d3615603b9719f33180080ccada04d0cb6a077d90c958a71d746c7b015c040" dependencies = [ "auto_impl", "dashmap", @@ -3460,9 +3460,9 @@ dependencies = [ [[package]] name = "swc_ecma_loader" -version = "0.45.22" +version = "0.45.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5a8e2dfe2062f4c33413639ea1f5c2bd331ce30142b1405cbe025037008b95a" +checksum = "6732100aba9bec438fcff857ab8db5e5d3b64b42a522aec7c388d8c98a36d22a" dependencies = [ "anyhow", "dashmap", @@ -3482,9 +3482,9 @@ dependencies = [ [[package]] name = "swc_ecma_minifier" -version = "0.192.17" +version = "0.192.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e390390abcdb1800f6106f7da5b462f5b84db6b4dbf8e46ea3c79cc74947709f" +checksum = "624b38cf23679ab41ca0e47c37f49617275cb15ad7bbaa66a307c42e67ebc1d5" dependencies = [ "arrayvec", "indexmap 2.1.0", @@ -3516,9 +3516,9 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "0.143.9" +version = "0.143.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5166745785657b26ff7722fc32fafd77a79b655602f8628da9c79cede921da74" +checksum = "4b919bb9ae5e1c8c54fb109f7e94b4a00185bd255c1238ba823e8102601e2133" dependencies = [ "either", "new_debug_unreachable", @@ -3538,9 +3538,9 @@ dependencies = [ [[package]] name = "swc_ecma_preset_env" -version = "0.206.16" +version = "0.206.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7f79092196efdf7c1a714976a39b684ef2d32d9c4e782d0ddc7a35f5785518" +checksum = "3e30d4cf2d63c2094d22a2778537353ea817f91c42c2e3bafc88cbe064b1f681" dependencies = [ "anyhow", "dashmap", @@ -3563,9 +3563,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms" -version = "0.229.16" +version = "0.229.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adf8082fa0c3fea4dd28caf11aff67ac778a299a596ecdd5950f24902594e7bc" +checksum = "52b22e7877d623332da5f2a93c204e808091ab2da1c060f794eaea66506fb530" dependencies = [ "swc_atoms", "swc_common", @@ -3583,9 +3583,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_base" -version = "0.137.15" +version = "0.137.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4867f24a241877838b03304ce42006f8347aec8ed5a0a3e794aa9350fc1a5362" +checksum = "69e9a23d6af398b6efd17bbdad2cfa580102f6c560611f85c63b48f76ffe8f0c" dependencies = [ "better_scoped_tls", "bitflags 2.3.3", @@ -3607,9 +3607,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_classes" -version = "0.126.15" +version = "0.126.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1a07bf4a67a816277896fa5841812ff9f74c26f5640d93e70e471a41d168194" +checksum = "47af84e64f0216f110839f5552a615d07ed74b45757927f29482700966ab4e97" dependencies = [ "swc_atoms", "swc_common", @@ -3621,9 +3621,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_compat" -version = "0.163.16" +version = "0.163.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1bc9b8f21a57c5ff07a98c02f152d5888efbac616126bc7d977dfd23cad2d30" +checksum = "895101f18b39009b8d27f231222e6459a0e71151ba0b3ddf934373bf657602b2" dependencies = [ "arrayvec", "indexmap 2.1.0", @@ -3670,9 +3670,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_module" -version = "0.180.16" +version = "0.180.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6437d14baad04975867acf2f6aabc3e628c4c3122403287e2ca2659f0d4e92e8" +checksum = "82c53f9d5e7384e840f78d096f0ed2e8cfd38486adafb282ef8550420cd44890" dependencies = [ "Inflector", "anyhow", @@ -3697,9 +3697,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_optimization" -version = "0.198.16" +version = "0.198.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a8eb51e53c81afd3563b763fae5ed9e5aaf7fbfaf113ba4fe8bf0b152a71b8a" +checksum = "86789174146707d78c086cee25868624bdfef924bb535ea3fc42f53fa426d4c0" dependencies = [ "dashmap", "indexmap 2.1.0", @@ -3722,9 +3722,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_proposal" -version = "0.171.16" +version = "0.171.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd56ca4bd886a0b53a77697220780e9f83468885de6b86175558165c3233717" +checksum = "278fec72878ab88f63cf797b33091045d29789dfe13c4051ab7ea6731c4b7ffd" dependencies = [ "either", "rustc-hash", @@ -3742,9 +3742,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_react" -version = "0.183.16" +version = "0.183.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f9649010c5a8d2648c82d8ec1aef90869eb40429d3c107df09b10452be762b3" +checksum = "762dad12edcdca424213354518ce60bc3f03a026f8e1990b11459311cef04c91" dependencies = [ "base64", "dashmap", @@ -3767,9 +3767,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_typescript" -version = "0.188.16" +version = "0.188.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64b474891d125eca576e741735acbf54751292c6384efe1e0f32e1e996d9541" +checksum = "6d6824fcd8d32ab2e90745a408f71548bd081bf4522d32617745ac1ea243de9c" dependencies = [ "ryu-js", "serde", @@ -3784,9 +3784,9 @@ dependencies = [ [[package]] name = "swc_ecma_usage_analyzer" -version = "0.23.12" +version = "0.23.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f913be2dca4c6f3536dc7645359507692cd66158f25b46b475a3ea76e6e4a9ae" +checksum = "21ccc0ff427471b70e48f265854a2e0843ef8429c729009898bea993f300fa77" dependencies = [ "indexmap 2.1.0", "rustc-hash", @@ -3801,9 +3801,9 @@ dependencies = [ [[package]] name = "swc_ecma_utils" -version = "0.127.12" +version = "0.127.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20e64596696563ec040297fa5bed9e7b041138664f8c61ad48cfd88d2fd79c3b" +checksum = "fc9c6ad70038b770d844fdfc20fd970d66ccebb1edc91804c8a9adaa689d4e39" dependencies = [ "indexmap 2.1.0", "num_cpus", @@ -3820,9 +3820,9 @@ dependencies = [ [[package]] name = "swc_ecma_visit" -version = "0.98.6" +version = "0.98.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "889fc0ec3a9b55377e53e3d4ce06678247b635d7136c1e5d3a2c26578e16cd22" +checksum = "93692bdcdbb63db8f5e10fea5d202b5487cb27eb443aec424f4335c88f9864af" dependencies = [ "num-bigint", "serde", @@ -3846,9 +3846,9 @@ dependencies = [ [[package]] name = "swc_error_reporters" -version = "0.17.18" +version = "0.17.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df568fdbcfab1bfc9f9df62113da46cf82626ad2e67e1812bf3b76ca3d800f92" +checksum = "3329e73f159a3d38d4cd5f606a0918eeff39f5bbdbdafd9b6fecb290d2e9a32d" dependencies = [ "anyhow", "miette", @@ -3859,9 +3859,9 @@ dependencies = [ [[package]] name = "swc_fast_graph" -version = "0.21.19" +version = "0.21.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "740f846d9450f3dd20b5fbea1db70e4c774493dd10d8bde54c2d2d5fc8ac824d" +checksum = "aa43c68166a88e233f241976dc3291c30471385fd1019d1fa5660ac503520110" dependencies = [ "indexmap 2.1.0", "petgraph", @@ -3871,9 +3871,9 @@ dependencies = [ [[package]] name = "swc_graph_analyzer" -version = "0.22.21" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be3df7f9506c34242a9802ce1406126bbd21a232a99b8782b50ec8e9270352cd" +checksum = "02b66d0e18899b3a69eca103e5b4af2f0c837427aa07a60be1c4ceb4346ea245" dependencies = [ "auto_impl", "petgraph", @@ -3905,9 +3905,9 @@ dependencies = [ [[package]] name = "swc_node_bundler" -version = "0.62.21" +version = "0.62.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8802094bec91ac7ed0169c40524d8a1eb4d5f02dc53632ac221bc7a1f108199" +checksum = "07079b2e78876248949d98f2c177a641c5f7c21eaf73b482d72f6ecbfc80fd88" dependencies = [ "anyhow", "dashmap", @@ -3934,9 +3934,9 @@ dependencies = [ [[package]] name = "swc_node_comments" -version = "0.20.18" +version = "0.20.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2dcee90f0a9702a4a0c4b11aa811d8e8fa09fbaeb5d5431d5736d20b3f7688b" +checksum = "fd75c635e4b54961c1c8dc693bb16eb70497eb8a2564f303089a9a66e81ed7ae" dependencies = [ "dashmap", "swc_atoms", @@ -3959,9 +3959,9 @@ dependencies = [ [[package]] name = "swc_plugin_proxy" -version = "0.41.5" +version = "0.41.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5488302a4e79ae658b6bacd691385e88836276c81dc7abde31d67f0f2ae7425" +checksum = "012e5996e3fe64805342b6e31a79d826402bbe4eed35be6a9366e54e41f5d75d" dependencies = [ "better_scoped_tls", "rkyv", @@ -3973,9 +3973,9 @@ dependencies = [ [[package]] name = "swc_plugin_runner" -version = "0.106.12" +version = "0.106.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc260043f8a6aca969b390f612c047f09e670603a0e23a0ca21757e95aa9d73" +checksum = "e3fe0f8743615139eed21376c94d8201be331040c8999e9a7c86a43d0ca2ff8b" dependencies = [ "anyhow", "enumset", @@ -3996,9 +3996,9 @@ dependencies = [ [[package]] name = "swc_timer" -version = "0.21.20" +version = "0.21.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b589033a4387ea540b2e9c3e84e45b1e831e7b16dc301f27d4c9cd492099cdee" +checksum = "e75ce0373fd1b75a021073d796201d5af15106857fc0a801e31379e9e04891e9" dependencies = [ "tracing", ] diff --git a/bindings/binding_core_node/Cargo.toml b/bindings/binding_core_node/Cargo.toml index 8f57fb64afe1..3caa36cec713 100644 --- a/bindings/binding_core_node/Cargo.toml +++ b/bindings/binding_core_node/Cargo.toml @@ -51,7 +51,7 @@ tracing-chrome = "0.5.0" tracing-futures = "0.2.5" tracing-subscriber = { version = "0.3.9", features = ["env-filter"] } -swc_core = { version = "0.90.22", features = [ +swc_core = { version = "0.90.24", features = [ "allocator_node", "ecma_ast", "ecma_codegen", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index fcf2f4d05dc6..d204b2c05f3a 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.9-nightly-20240316.1" +version = "1.4.9-nightly-20240321.1" [lib] bench = false @@ -35,7 +35,7 @@ anyhow = "1.0.66" getrandom = { version = "0.2.10", features = ["js"] } serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" -swc_core = { version = "0.90.22", features = [ +swc_core = { version = "0.90.24", features = [ "ecma_ast_serde", "ecma_codegen", "binding_macro_wasm", diff --git a/bindings/binding_minifier_node/Cargo.toml b/bindings/binding_minifier_node/Cargo.toml index 931fb0c27ee5..c61cfaabe8e4 100644 --- a/bindings/binding_minifier_node/Cargo.toml +++ b/bindings/binding_minifier_node/Cargo.toml @@ -35,9 +35,9 @@ tracing-chrome = "0.5.0" tracing-futures = "0.2.5" tracing-subscriber = { version = "0.3.9", features = ["env-filter"] } -swc_compiler_base = { version = "0.7.17", features = ["node"] } +swc_compiler_base = { version = "0.7.18", features = ["node"] } swc_config = "0.1.11" -swc_core = { version = "0.90.22", features = [ +swc_core = { version = "0.90.24", features = [ "allocator_node", "common_concurrent", "common_sourcemap", @@ -49,6 +49,6 @@ swc_core = { version = "0.90.22", features = [ "ecma_transforms", "ecma_visit", ] } -swc_error_reporters = "0.17.18" +swc_error_reporters = "0.17.19" swc_malloc = "0.5.10" swc_nodejs_common = "0.0.8" diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 8dc5118e6eef..29b95dbafe0b 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.9-nightly-20240316.1" +version = "1.4.9-nightly-20240321.1" [lib] bench = false @@ -35,7 +35,7 @@ anyhow = "1.0.66" getrandom = { version = "0.2.10", features = ["js"] } serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" -swc_core = { version = "0.90.22", features = [ +swc_core = { version = "0.90.24", features = [ "ecma_ast_serde", "ecma_codegen", "binding_macro_wasm", diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index e96c27158dc2..0b7f42757c43 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.201" +version = "0.91.202" [[bin]] bench = false @@ -19,4 +19,4 @@ plugin = ["swc_cli_impl/plugin"] [dependencies] anyhow = "1.0.66" -swc_cli_impl = "0.8.21" +swc_cli_impl = "0.8.22" diff --git a/package.json b/package.json index 947d25f38805..b4e096786dc3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.4.9-nightly-20240316.1", + "version": "1.4.9-nightly-20240321.1", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/package.json b/packages/minifier/package.json index d03abeb132eb..1deb88854e9a 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.4.9-nightly-20240316.1", + "version": "1.4.9-nightly-20240321.1", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", From ad932f0921411364b801b32f60eaf98f8629e812 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Thu, 21 Mar 2024 11:02:43 +0900 Subject: [PATCH 017/172] chore: Improve update script --- scripts/update-all-swc-crates.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-all-swc-crates.sh b/scripts/update-all-swc-crates.sh index 1daeef2aa414..32fe55be1fae 100755 --- a/scripts/update-all-swc-crates.sh +++ b/scripts/update-all-swc-crates.sh @@ -4,7 +4,7 @@ set -eu echo "Listing all swc crates" -crates=$(cargo metadata --format-version=1 | jq '.packages .[] | select(.repository == "https://github.com/swc-project/swc.git") | .name') +crates=$(cargo metadata --format-version=1 | jq '.packages .[] | select(.repository == "https://github.com/swc-project/swc.git" or .repository == "https://github.com/swc-project/plugins.git") | .name') command="cargo upgrade --incompatible --recursive false" for crate in $crates; do From f62097ca01a2ffdf852161d2fb040acd57e70081 Mon Sep 17 00:00:00 2001 From: pshu Date: Fri, 22 Mar 2024 15:02:08 +0800 Subject: [PATCH 018/172] fix(es/utils): Mark `ident` of default fn/class as binding (#8764) --- crates/swc_ecma_utils/src/lib.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/crates/swc_ecma_utils/src/lib.rs b/crates/swc_ecma_utils/src/lib.rs index ac372cd97600..27c7a82c89e8 100644 --- a/crates/swc_ecma_utils/src/lib.rs +++ b/crates/swc_ecma_utils/src/lib.rs @@ -2797,6 +2797,24 @@ where self.is_pat_decl = old; } + fn visit_export_default_decl(&mut self, e: &ExportDefaultDecl) { + match &e.decl { + DefaultDecl::Class(ClassExpr { + ident: Some(ident), .. + }) => { + self.add(ident); + } + DefaultDecl::Fn(FnExpr { + ident: Some(ident), + function: f, + }) if f.body.is_some() => { + self.add(ident); + } + _ => {} + } + e.visit_children_with(self); + } + fn visit_fn_decl(&mut self, node: &FnDecl) { node.visit_children_with(self); @@ -3253,6 +3271,12 @@ mod test { run_collect_decls("const [ a, b = 1, [c], ...d ] = [];", &["a", "b", "c", "d"]); } + #[test] + fn test_collect_export_default_expr() { + run_collect_decls("export default function foo(){}", &["foo"]); + run_collect_decls("export default class Foo{}", &["Foo"]); + } + fn run_collect_decls(text: &str, expected_names: &[&str]) { let module = parse_module(text); let decls: AHashSet = collect_decls(&module); From 44209386ca180ee81370295aaebed16bdad0c583 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Fri, 22 Mar 2024 07:03:51 +0000 Subject: [PATCH 019/172] chore: Bump crates --- CHANGELOG.md | 14 +++----------- Cargo.lock | 4 ++-- crates/swc_core/Cargo.toml | 2 +- crates/swc_ecma_utils/Cargo.toml | 2 +- 4 files changed, 7 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e0bb1aa44cf5..7b2022522deb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,9 @@ - **(es/parser)** Fix parsing of TypeScript type instantiation ([#8758](https://github.com/swc-project/swc/issues/8758)) ([2d6de94](https://github.com/swc-project/swc/commit/2d6de94936bec269b6a926a1f461179a97b9ac83)) + +- **(es/utils)** Mark `ident` of default fn/class as binding ([#8764](https://github.com/swc-project/swc/issues/8764)) ([f62097c](https://github.com/swc-project/swc/commit/f62097ca01a2ffdf852161d2fb040acd57e70081)) + ### Features @@ -1400,15 +1403,4 @@ - **(es/module)** Don't resolve as `node_modules` from `TscResolver` ([#7866](https://github.com/swc-project/swc/issues/7866)) ([11ebae1](https://github.com/swc-project/swc/commit/11ebae1bdd2fbd05d908fa560b81b830dddb3c56)) -## [1.3.79] - 2023-08-25 - -### Bug Fixes - - - -- **(es/minifier)** Don't remove exports ([#7856](https://github.com/swc-project/swc/issues/7856)) ([ae8cd94](https://github.com/swc-project/swc/commit/ae8cd9430dd1ec0d857ac7f87ffa4b76258be92c)) - - -- **(es/module)** Make `jsc.paths` work for a nest.js app ([#7852](https://github.com/swc-project/swc/issues/7852)) ([d33a973](https://github.com/swc-project/swc/commit/d33a97303ceeee4069321ef21027ff99fe973a79)) - diff --git a/Cargo.lock b/Cargo.lock index 166b59932239..4b253be0954a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3897,7 +3897,7 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.90.24" +version = "0.90.25" dependencies = [ "anyhow", "binding_macros", @@ -4848,7 +4848,7 @@ dependencies = [ [[package]] name = "swc_ecma_utils" -version = "0.127.14" +version = "0.127.15" dependencies = [ "indexmap 2.1.0", "num_cpus", diff --git a/crates/swc_core/Cargo.toml b/crates/swc_core/Cargo.toml index ff75267b6d1d..c38120e0902c 100644 --- a/crates/swc_core/Cargo.toml +++ b/crates/swc_core/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_core" repository = "https://github.com/swc-project/swc.git" -version = "0.90.24" +version = "0.90.25" [package.metadata.docs.rs] features = [ "allocator_node", diff --git a/crates/swc_ecma_utils/Cargo.toml b/crates/swc_ecma_utils/Cargo.toml index 9ab34436795c..d1e1d990d9d6 100644 --- a/crates/swc_ecma_utils/Cargo.toml +++ b/crates/swc_ecma_utils/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_utils" repository = "https://github.com/swc-project/swc.git" -version = "0.127.14" +version = "0.127.15" [package.metadata.docs.rs] all-features = true From f8681c9299813580849dc39240d29441b6038192 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Mon, 25 Mar 2024 13:18:49 +0900 Subject: [PATCH 020/172] chore(deps): Update `sourcemap` to `v8.0.0` (#8771) **Related issue:** - https://github.com/getsentry/rust-sourcemap/pull/77 --- Cargo.lock | 39 +++++++++++++++++-- crates/swc/Cargo.toml | 2 +- .../deno/deno-10014/case1/output/index.map | 1 + .../issues-1xxx/1309/case1/output/index.map | 1 + .../issues-1xxx/1581/case2/output/index.map | 1 + .../fixture/issues-2xxx/2423/output/index.map | 1 + .../issues-3xxx/3715/1/output/index.map | 1 + .../issues-3xxx/3715/2/output/index.map | 1 + .../fixture/issues-3xxx/3716/output/index.map | 1 + .../fixture/issues-3xxx/3782/output/index.map | 1 + .../issues-4xxx/4006/1/output/index.map | 1 + .../issues-4xxx/4120/1/output/index.map | 1 + .../issues-4xxx/4316/1/output/index.ts | 2 +- .../issues-4xxx/4870/1/output/index.map | 1 + .../issues-4xxx/4870/2/output/index.map | 1 + .../fixture/issues-4xxx/4876/output/index.map | 1 + .../fixture/issues-5xxx/5272/1/output/a.map | 1 + .../issues-5xxx/5272/1/output/a.spec.map | 1 + .../fixture/issues-5xxx/5644/output/index.map | 1 + .../issues-6xxx/6244/1/output/index.map | 1 + .../fixture/jest/issue-7506/output/index.map | 1 + .../fixture/jest/issue-7506/output/util.map | 1 + .../fixture/jest/sourcemap-1/output/index.ts | 2 +- .../next.js/39878/output/box-model.map | 1 + .../fixture/sourcemap/001/output/index.map | 1 + .../fixture/sourcemap/002/output/index.map | 1 + .../fixture/sourcemap/003/output/index.map | 1 + .../fixture/sourcemap/004/output/index.map | 1 + .../fixture/sourcemap/005/output/index.map | 1 + .../fixture/sourcemap/006/output/index.map | 1 + .../fixture/sourcemap/007/output/index.map | 1 + .../fixture/sourcemap/008/output/index.map | 1 + .../fixture/sourcemap/009/output/index.map | 1 + .../fixture/sourcemap/010/output/index.map | 1 + .../011/output/CommentControlller.map | 1 + .../sourcemap/012/output/CommentService.map | 1 + .../sourcemap/013/output/PistController.map | 1 + .../sourcemap/014/output/UserController.map | 1 + .../fixture/sourcemap/015/output/index.map | 1 + .../sourcemap/issue-2185/output/index.map | 1 + .../sourcemap/issue-2666/output/index.map | 1 + .../sourcemap/issue-3180/1/output/index.map | 1 + .../sourcemap/issue-3733/1/output/index.map | 1 + .../sourcemap/issue-3733/2/output/index.map | 1 + .../issue-3854/1-true/output/index.map | 1 + .../issue-3854/2-inline/output/index.ts | 2 +- .../issue-6552/input-map/output/index.map | 1 + .../issue-6552/no-map/output/index.map | 1 + .../issue-7475/1-with-preamble/output.map | 1 + .../issue-7475/2-no-preamble/output.map | 1 + .../minify/issue-7475/issue-8372/1/output.map | 1 + .../minify/issue-7475/issue-8372/2/output.map | 1 + crates/swc_cli_impl/Cargo.toml | 2 +- crates/swc_common/Cargo.toml | 2 +- crates/swc_common/src/source_map.rs | 4 +- crates/swc_compiler_base/Cargo.toml | 2 +- crates/swc_config/Cargo.toml | 4 +- crates/swc_config/src/source_map.rs | 14 +++++-- crates/swc_ecma_codegen/Cargo.toml | 2 +- crates/swc_ecma_transforms/Cargo.toml | 2 +- crates/swc_ecma_transforms_testing/Cargo.toml | 2 +- 61 files changed, 107 insertions(+), 21 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4b253be0954a..5cc04a13bc43 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -283,6 +283,15 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +[[package]] +name = "base64-simd" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "781dd20c3aff0bd194fe7d2a977dd92f21c173891f3a03b677359e5fa457e5d5" +dependencies = [ + "simd-abstraction", +] + [[package]] name = "better_scoped_tls" version = "0.1.1" @@ -2516,6 +2525,12 @@ version = "6.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" +[[package]] +name = "outref" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f222829ae9293e33a9f5e9f440c6760a3d450a64affe1846486b140db81c1f4" + [[package]] name = "overload" version = "0.1.1" @@ -3453,6 +3468,15 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" +[[package]] +name = "simd-abstraction" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cadb29c57caadc51ff8346233b5cec1d240b68ce55cf1afc764818791876987" +dependencies = [ + "outref", +] + [[package]] name = "simdutf8" version = "0.1.4" @@ -3525,17 +3549,20 @@ dependencies = [ [[package]] name = "sourcemap" -version = "6.4.1" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4cbf65ca7dc576cf50e21f8d0712d96d4fcfd797389744b7b222a85cdf5bd90" +checksum = "cf0b8c0d9d32f81aa0ab2b68ab634d9bbce287423606656fddb456ac8601aec3" dependencies = [ + "base64-simd", + "bitvec", "data-encoding", "debugid", "if_chain", + "rustc-hash", "rustc_version 0.2.3", "serde", "serde_json", - "unicode-id", + "unicode-id-start", "url", ] @@ -5867,6 +5894,12 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1b6def86329695390197b82c1e244a54a131ceb66c996f2088a3876e2ae083f" +[[package]] +name = "unicode-id-start" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8f73150333cb58412db36f2aca8f2875b013049705cc77b94ded70a1ab1f5da" + [[package]] name = "unicode-ident" version = "1.0.12" diff --git a/crates/swc/Cargo.toml b/crates/swc/Cargo.toml index 052f87aafa7b..dca2ba6f231b 100644 --- a/crates/swc/Cargo.toml +++ b/crates/swc/Cargo.toml @@ -63,7 +63,7 @@ regex = "1" rustc-hash = "1.1.0" serde = { version = "1", features = ["derive"] } serde_json = "1" -sourcemap = "6.4" +sourcemap = "8.0" tracing = "0.1.37" url = "2.4.0" diff --git a/crates/swc/tests/fixture/deno/deno-10014/case1/output/index.map b/crates/swc/tests/fixture/deno/deno-10014/case1/output/index.map index 394597a61f7e..72dc01b32496 100644 --- a/crates/swc/tests/fixture/deno/deno-10014/case1/output/index.map +++ b/crates/swc/tests/fixture/deno/deno-10014/case1/output/index.map @@ -6,6 +6,7 @@ "x", "Error" ], + "rangeMappings": ";;;;;;;;;;;", "sources": [ "../../input/index.ts" ], diff --git a/crates/swc/tests/fixture/issues-1xxx/1309/case1/output/index.map b/crates/swc/tests/fixture/issues-1xxx/1309/case1/output/index.map index b0d722730d91..8e725e195c2d 100644 --- a/crates/swc/tests/fixture/issues-1xxx/1309/case1/output/index.map +++ b/crates/swc/tests/fixture/issues-1xxx/1309/case1/output/index.map @@ -3,6 +3,7 @@ "names": [ "foo" ], + "rangeMappings": ";;;;;;;;;;", "sources": [ "../../input/index.ts" ], diff --git a/crates/swc/tests/fixture/issues-1xxx/1581/case2/output/index.map b/crates/swc/tests/fixture/issues-1xxx/1581/case2/output/index.map index e8171ddaf875..66cccc24132c 100644 --- a/crates/swc/tests/fixture/issues-1xxx/1581/case2/output/index.map +++ b/crates/swc/tests/fixture/issues-1xxx/1581/case2/output/index.map @@ -3,6 +3,7 @@ "names": [ "foo" ], + "rangeMappings": ";;", "sources": [ "../../input/index.js" ], diff --git a/crates/swc/tests/fixture/issues-2xxx/2423/output/index.map b/crates/swc/tests/fixture/issues-2xxx/2423/output/index.map index f36709498258..3174a524bf2d 100644 --- a/crates/swc/tests/fixture/issues-2xxx/2423/output/index.map +++ b/crates/swc/tests/fixture/issues-2xxx/2423/output/index.map @@ -7,6 +7,7 @@ "console", "log" ], + "rangeMappings": ";;;;;;;;", "sources": [ "../../input/index.ts" ], diff --git a/crates/swc/tests/fixture/issues-3xxx/3715/1/output/index.map b/crates/swc/tests/fixture/issues-3xxx/3715/1/output/index.map index ab3e059c3274..ebaa594ae11f 100644 --- a/crates/swc/tests/fixture/issues-3xxx/3715/1/output/index.map +++ b/crates/swc/tests/fixture/issues-3xxx/3715/1/output/index.map @@ -3,6 +3,7 @@ "names": [ "a" ], + "rangeMappings": "", "sources": [ "../../input/index.js" ], diff --git a/crates/swc/tests/fixture/issues-3xxx/3715/2/output/index.map b/crates/swc/tests/fixture/issues-3xxx/3715/2/output/index.map index ab3e059c3274..ebaa594ae11f 100644 --- a/crates/swc/tests/fixture/issues-3xxx/3715/2/output/index.map +++ b/crates/swc/tests/fixture/issues-3xxx/3715/2/output/index.map @@ -3,6 +3,7 @@ "names": [ "a" ], + "rangeMappings": "", "sources": [ "../../input/index.js" ], diff --git a/crates/swc/tests/fixture/issues-3xxx/3716/output/index.map b/crates/swc/tests/fixture/issues-3xxx/3716/output/index.map index 22c0b84748f2..ed70053fb9de 100644 --- a/crates/swc/tests/fixture/issues-3xxx/3716/output/index.map +++ b/crates/swc/tests/fixture/issues-3xxx/3716/output/index.map @@ -3,6 +3,7 @@ "names": [ "a" ], + "rangeMappings": ";;;", "sources": [ "../../input/index.js" ], diff --git a/crates/swc/tests/fixture/issues-3xxx/3782/output/index.map b/crates/swc/tests/fixture/issues-3xxx/3782/output/index.map index 97228edc76ba..019e3aa0f377 100644 --- a/crates/swc/tests/fixture/issues-3xxx/3782/output/index.map +++ b/crates/swc/tests/fixture/issues-3xxx/3782/output/index.map @@ -8,6 +8,7 @@ "resolve", "setTimeout" ], + "rangeMappings": ";;;;;;;;;;;;;;;;;;;;;;", "sources": [ "../../input/index.ts" ], diff --git a/crates/swc/tests/fixture/issues-4xxx/4006/1/output/index.map b/crates/swc/tests/fixture/issues-4xxx/4006/1/output/index.map index 5d2a2e92bd75..c55d4ee7ce3c 100644 --- a/crates/swc/tests/fixture/issues-4xxx/4006/1/output/index.map +++ b/crates/swc/tests/fixture/issues-4xxx/4006/1/output/index.map @@ -15,6 +15,7 @@ "customElements", "define" ], + "rangeMappings": ";;;;;;;;;;;;;;;;;;;;;;", "sources": [ "../../input/index.ts" ], diff --git a/crates/swc/tests/fixture/issues-4xxx/4120/1/output/index.map b/crates/swc/tests/fixture/issues-4xxx/4120/1/output/index.map index b6e84b399502..a4534bc85291 100644 --- a/crates/swc/tests/fixture/issues-4xxx/4120/1/output/index.map +++ b/crates/swc/tests/fixture/issues-4xxx/4120/1/output/index.map @@ -4,6 +4,7 @@ "a", "b" ], + "rangeMappings": "", "sources": [ "../../input/index.js" ], diff --git a/crates/swc/tests/fixture/issues-4xxx/4316/1/output/index.ts b/crates/swc/tests/fixture/issues-4xxx/4316/1/output/index.ts index fb866926e3fe..0cb041cc1c69 100644 --- a/crates/swc/tests/fixture/issues-4xxx/4316/1/output/index.ts +++ b/crates/swc/tests/fixture/issues-4xxx/4316/1/output/index.ts @@ -8,4 +8,4 @@ define([ }); }); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9 +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJyYW5nZU1hcHBpbmdzIjoiIiwibWFwcGluZ3MiOiIifQ== diff --git a/crates/swc/tests/fixture/issues-4xxx/4870/1/output/index.map b/crates/swc/tests/fixture/issues-4xxx/4870/1/output/index.map index 6d3947d9ea00..c219bbd924b4 100644 --- a/crates/swc/tests/fixture/issues-4xxx/4870/1/output/index.map +++ b/crates/swc/tests/fixture/issues-4xxx/4870/1/output/index.map @@ -3,6 +3,7 @@ "names": [ "test" ], + "rangeMappings": ";;;;", "sources": [ "../../input/index.js" ], diff --git a/crates/swc/tests/fixture/issues-4xxx/4870/2/output/index.map b/crates/swc/tests/fixture/issues-4xxx/4870/2/output/index.map index c58ca444454a..8ba3ec26f68a 100644 --- a/crates/swc/tests/fixture/issues-4xxx/4870/2/output/index.map +++ b/crates/swc/tests/fixture/issues-4xxx/4870/2/output/index.map @@ -3,6 +3,7 @@ "names": [ "test" ], + "rangeMappings": ";;;;;", "sources": [ "../../input/index.js" ], diff --git a/crates/swc/tests/fixture/issues-4xxx/4876/output/index.map b/crates/swc/tests/fixture/issues-4xxx/4876/output/index.map index 2aa719bcca9b..84e4f3bae458 100644 --- a/crates/swc/tests/fixture/issues-4xxx/4876/output/index.map +++ b/crates/swc/tests/fixture/issues-4xxx/4876/output/index.map @@ -4,6 +4,7 @@ "console", "log" ], + "rangeMappings": ";;;;;;;;", "sources": [ "../../input/index.js" ], diff --git a/crates/swc/tests/fixture/issues-5xxx/5272/1/output/a.map b/crates/swc/tests/fixture/issues-5xxx/5272/1/output/a.map index 75ce485e2335..d452d3a9e3b6 100644 --- a/crates/swc/tests/fixture/issues-5xxx/5272/1/output/a.map +++ b/crates/swc/tests/fixture/issues-5xxx/5272/1/output/a.map @@ -6,6 +6,7 @@ "foo", "Base" ], + "rangeMappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", "sources": [ "../../input/source/a/a.ts" ], diff --git a/crates/swc/tests/fixture/issues-5xxx/5272/1/output/a.spec.map b/crates/swc/tests/fixture/issues-5xxx/5272/1/output/a.spec.map index 0326470833b5..1d67d593964f 100644 --- a/crates/swc/tests/fixture/issues-5xxx/5272/1/output/a.spec.map +++ b/crates/swc/tests/fixture/issues-5xxx/5272/1/output/a.spec.map @@ -10,6 +10,7 @@ "toBe", "foo" ], + "rangeMappings": ";;;;;;;;;;", "sources": [ "../../input/source/a/a.spec.ts" ], diff --git a/crates/swc/tests/fixture/issues-5xxx/5644/output/index.map b/crates/swc/tests/fixture/issues-5xxx/5644/output/index.map index 8207fc5813c5..104960ee34cf 100644 --- a/crates/swc/tests/fixture/issues-5xxx/5644/output/index.map +++ b/crates/swc/tests/fixture/issues-5xxx/5644/output/index.map @@ -1,6 +1,7 @@ { "mappings": ";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA", "names": [], + "rangeMappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;", "sources": [ "../../input/index.ts" ], diff --git a/crates/swc/tests/fixture/issues-6xxx/6244/1/output/index.map b/crates/swc/tests/fixture/issues-6xxx/6244/1/output/index.map index 2274a6ad92d1..0f35981cf0d6 100644 --- a/crates/swc/tests/fixture/issues-6xxx/6244/1/output/index.map +++ b/crates/swc/tests/fixture/issues-6xxx/6244/1/output/index.map @@ -7,6 +7,7 @@ "document", "getElementById" ], + "rangeMappings": ";;;;", "sources": [ "../../input/index.tsx" ], diff --git a/crates/swc/tests/fixture/jest/issue-7506/output/index.map b/crates/swc/tests/fixture/jest/issue-7506/output/index.map index 9f1880e626c8..7539c5a26dcc 100644 --- a/crates/swc/tests/fixture/jest/issue-7506/output/index.map +++ b/crates/swc/tests/fixture/jest/issue-7506/output/index.map @@ -9,6 +9,7 @@ "expect", "toContain" ], + "rangeMappings": ";;;;;;;;;;;;;;;;", "sources": [ "../../input/index.ts" ], diff --git a/crates/swc/tests/fixture/jest/issue-7506/output/util.map b/crates/swc/tests/fixture/jest/issue-7506/output/util.map index 3fa1a81f01a7..5132e15df636 100644 --- a/crates/swc/tests/fixture/jest/issue-7506/output/util.map +++ b/crates/swc/tests/fixture/jest/issue-7506/output/util.map @@ -7,6 +7,7 @@ "stack", "split" ], + "rangeMappings": ";;;;;;;;;;;;;;;", "sources": [ "../../input/util.ts" ], diff --git a/crates/swc/tests/fixture/jest/sourcemap-1/output/index.ts b/crates/swc/tests/fixture/jest/sourcemap-1/output/index.ts index 8cf83d2eb23d..b6bcf5cd1196 100644 --- a/crates/swc/tests/fixture/jest/sourcemap-1/output/index.ts +++ b/crates/swc/tests/fixture/jest/sourcemap-1/output/index.ts @@ -13,4 +13,4 @@ const Button = (0, _linaria.css)` color: red; `; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2lucHV0L2luZGV4LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gXCJsaW5hcmlhXCI7XG5cbmV4cG9ydCBjb25zdCBCdXR0b24gPSBjc3NgXG4gICAgY29sb3I6IHJlZDtcbmA7XG4iXSwibmFtZXMiOlsiQnV0dG9uIiwiY3NzIl0sIm1hcHBpbmdzIjoiOzs7OytCQUVhQTs7O2VBQUFBOzs7eUJBRk87QUFFYixNQUFNQSxTQUFTQyxJQUFBQSxZQUFHLENBQUEsQ0FBQzs7QUFFMUIsQ0FBQyJ9 +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2lucHV0L2luZGV4LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gXCJsaW5hcmlhXCI7XG5cbmV4cG9ydCBjb25zdCBCdXR0b24gPSBjc3NgXG4gICAgY29sb3I6IHJlZDtcbmA7XG4iXSwibmFtZXMiOlsiQnV0dG9uIiwiY3NzIl0sInJhbmdlTWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7IiwibWFwcGluZ3MiOiI7Ozs7K0JBRWFBOzs7ZUFBQUE7Ozt5QkFGTztBQUViLE1BQU1BLFNBQVNDLElBQUFBLFlBQUcsQ0FBQSxDQUFDOztBQUUxQixDQUFDIn0= diff --git a/crates/swc/tests/fixture/next.js/39878/output/box-model.map b/crates/swc/tests/fixture/next.js/39878/output/box-model.map index acde54d863cb..f31818a6d340 100644 --- a/crates/swc/tests/fixture/next.js/39878/output/box-model.map +++ b/crates/swc/tests/fixture/next.js/39878/output/box-model.map @@ -42,6 +42,7 @@ "prop", "get" ], + "rangeMappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", "sources": [ "../../input/box-model.ts" ], diff --git a/crates/swc/tests/fixture/sourcemap/001/output/index.map b/crates/swc/tests/fixture/sourcemap/001/output/index.map index d60ce7857d9a..4cf4cb6eefd0 100644 --- a/crates/swc/tests/fixture/sourcemap/001/output/index.map +++ b/crates/swc/tests/fixture/sourcemap/001/output/index.map @@ -4,6 +4,7 @@ "foo", "arr" ], + "rangeMappings": ";;;;;;;;;;;;", "sources": [ "../../input/index.ts" ], diff --git a/crates/swc/tests/fixture/sourcemap/002/output/index.map b/crates/swc/tests/fixture/sourcemap/002/output/index.map index 7a50f234ccde..1b78e4a80062 100644 --- a/crates/swc/tests/fixture/sourcemap/002/output/index.map +++ b/crates/swc/tests/fixture/sourcemap/002/output/index.map @@ -8,6 +8,7 @@ "getStaticProps", "props" ], + "rangeMappings": ";;;;;;;;;;;;;;;;;;;;;;;;", "sources": [ "../../input/index.js" ], diff --git a/crates/swc/tests/fixture/sourcemap/003/output/index.map b/crates/swc/tests/fixture/sourcemap/003/output/index.map index c0259cf305dd..01907d2cef11 100644 --- a/crates/swc/tests/fixture/sourcemap/003/output/index.map +++ b/crates/swc/tests/fixture/sourcemap/003/output/index.map @@ -8,6 +8,7 @@ "getStaticProps", "props" ], + "rangeMappings": "", "sources": [ "../../input/index.js" ], diff --git a/crates/swc/tests/fixture/sourcemap/004/output/index.map b/crates/swc/tests/fixture/sourcemap/004/output/index.map index cae29ad182b5..6b566a2361e1 100644 --- a/crates/swc/tests/fixture/sourcemap/004/output/index.map +++ b/crates/swc/tests/fixture/sourcemap/004/output/index.map @@ -25,6 +25,7 @@ "s", "_N_E" ], + "rangeMappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", "sources": [ "../../input/index.js" ], diff --git a/crates/swc/tests/fixture/sourcemap/005/output/index.map b/crates/swc/tests/fixture/sourcemap/005/output/index.map index 536703582009..908fe73b6f4e 100644 --- a/crates/swc/tests/fixture/sourcemap/005/output/index.map +++ b/crates/swc/tests/fixture/sourcemap/005/output/index.map @@ -27,6 +27,7 @@ "isSharp", "toBeLessThan" ], + "rangeMappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", "sources": [ "../../input/index.js" ], diff --git a/crates/swc/tests/fixture/sourcemap/006/output/index.map b/crates/swc/tests/fixture/sourcemap/006/output/index.map index 023a3a584827..65e28d26da90 100644 --- a/crates/swc/tests/fixture/sourcemap/006/output/index.map +++ b/crates/swc/tests/fixture/sourcemap/006/output/index.map @@ -27,6 +27,7 @@ "isSharp", "toBeLessThan" ], + "rangeMappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", "sources": [ "../../input/index.js" ], diff --git a/crates/swc/tests/fixture/sourcemap/007/output/index.map b/crates/swc/tests/fixture/sourcemap/007/output/index.map index 019766c92368..f95314669b97 100644 --- a/crates/swc/tests/fixture/sourcemap/007/output/index.map +++ b/crates/swc/tests/fixture/sourcemap/007/output/index.map @@ -6,6 +6,7 @@ "console", "log" ], + "rangeMappings": ";;;;;;;", "sources": [ "../../input/index.js" ], diff --git a/crates/swc/tests/fixture/sourcemap/008/output/index.map b/crates/swc/tests/fixture/sourcemap/008/output/index.map index c1e1b9db58f8..ada416969eb2 100644 --- a/crates/swc/tests/fixture/sourcemap/008/output/index.map +++ b/crates/swc/tests/fixture/sourcemap/008/output/index.map @@ -6,6 +6,7 @@ "expect", "toBe" ], + "rangeMappings": ";;;;;;;;;;;;;;;;", "sources": [ "../../input/index.js" ], diff --git a/crates/swc/tests/fixture/sourcemap/009/output/index.map b/crates/swc/tests/fixture/sourcemap/009/output/index.map index fba0993ae643..56f6ce17049a 100644 --- a/crates/swc/tests/fixture/sourcemap/009/output/index.map +++ b/crates/swc/tests/fixture/sourcemap/009/output/index.map @@ -6,6 +6,7 @@ "Error", "stack" ], + "rangeMappings": ";;;;;;", "sources": [ "../../input/index.js" ], diff --git a/crates/swc/tests/fixture/sourcemap/010/output/index.map b/crates/swc/tests/fixture/sourcemap/010/output/index.map index 6b19f1872752..fcbef2d775fe 100644 --- a/crates/swc/tests/fixture/sourcemap/010/output/index.map +++ b/crates/swc/tests/fixture/sourcemap/010/output/index.map @@ -1,6 +1,7 @@ { "mappings": "AAAA,cAAc,iBAAiB;AAC/B,cAAc,wBAAwB;AAEtC,cAAc,WAAW;AACzB,cAAc,eAAe", "names": [], + "rangeMappings": ";;;", "sources": [ "../../input/index.ts" ], diff --git a/crates/swc/tests/fixture/sourcemap/011/output/CommentControlller.map b/crates/swc/tests/fixture/sourcemap/011/output/CommentControlller.map index 809e15a57ca2..702d72d17147 100644 --- a/crates/swc/tests/fixture/sourcemap/011/output/CommentControlller.map +++ b/crates/swc/tests/fixture/sourcemap/011/output/CommentControlller.map @@ -29,6 +29,7 @@ "deleteComment", "delete" ], + "rangeMappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", "sources": [ "../../input/CommentControlller.ts" ], diff --git a/crates/swc/tests/fixture/sourcemap/012/output/CommentService.map b/crates/swc/tests/fixture/sourcemap/012/output/CommentService.map index 94da3a2c847d..6b1c6b7bf2eb 100644 --- a/crates/swc/tests/fixture/sourcemap/012/output/CommentService.map +++ b/crates/swc/tests/fixture/sourcemap/012/output/CommentService.map @@ -51,6 +51,7 @@ "$pull", "name" ], + "rangeMappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", "sources": [ "../../input/CommentService.ts" ], diff --git a/crates/swc/tests/fixture/sourcemap/013/output/PistController.map b/crates/swc/tests/fixture/sourcemap/013/output/PistController.map index 14f26a1d4763..0cb3859285b4 100644 --- a/crates/swc/tests/fixture/sourcemap/013/output/PistController.map +++ b/crates/swc/tests/fixture/sourcemap/013/output/PistController.map @@ -48,6 +48,7 @@ "createPostComment", "createCommentDto" ], + "rangeMappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", "sources": [ "../../input/PistController.ts" ], diff --git a/crates/swc/tests/fixture/sourcemap/014/output/UserController.map b/crates/swc/tests/fixture/sourcemap/014/output/UserController.map index 835902b0886c..2e01e73481b2 100644 --- a/crates/swc/tests/fixture/sourcemap/014/output/UserController.map +++ b/crates/swc/tests/fixture/sourcemap/014/output/UserController.map @@ -31,6 +31,7 @@ "user", "id" ], + "rangeMappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", "sources": [ "../../input/UserController.ts" ], diff --git a/crates/swc/tests/fixture/sourcemap/015/output/index.map b/crates/swc/tests/fixture/sourcemap/015/output/index.map index c1e1b9db58f8..ada416969eb2 100644 --- a/crates/swc/tests/fixture/sourcemap/015/output/index.map +++ b/crates/swc/tests/fixture/sourcemap/015/output/index.map @@ -6,6 +6,7 @@ "expect", "toBe" ], + "rangeMappings": ";;;;;;;;;;;;;;;;", "sources": [ "../../input/index.js" ], diff --git a/crates/swc/tests/fixture/sourcemap/issue-2185/output/index.map b/crates/swc/tests/fixture/sourcemap/issue-2185/output/index.map index 4155550cfb24..fa708c4d88b5 100644 --- a/crates/swc/tests/fixture/sourcemap/issue-2185/output/index.map +++ b/crates/swc/tests/fixture/sourcemap/issue-2185/output/index.map @@ -7,6 +7,7 @@ "toBe", "str" ], + "rangeMappings": ";;;;;;;;;;;;;", "sources": [ "../../input/index.js" ], diff --git a/crates/swc/tests/fixture/sourcemap/issue-2666/output/index.map b/crates/swc/tests/fixture/sourcemap/issue-2666/output/index.map index a5c1adc50c75..873f5c48d188 100644 --- a/crates/swc/tests/fixture/sourcemap/issue-2666/output/index.map +++ b/crates/swc/tests/fixture/sourcemap/issue-2666/output/index.map @@ -5,6 +5,7 @@ "Symbol", "for" ], + "rangeMappings": ";;", "sources": [ "../../input/index.js" ], diff --git a/crates/swc/tests/fixture/sourcemap/issue-3180/1/output/index.map b/crates/swc/tests/fixture/sourcemap/issue-3180/1/output/index.map index 25b0b6079f38..dc260b4d64e6 100644 --- a/crates/swc/tests/fixture/sourcemap/issue-3180/1/output/index.map +++ b/crates/swc/tests/fixture/sourcemap/issue-3180/1/output/index.map @@ -1,6 +1,7 @@ { "mappings": "AAAA,cAAc,iBAAiB;AAC/B,cAAc,wBAAwB;AACtC,cAAc,eAAe;AAC7B,cAAc,WAAW;AACzB,cAAc,eAAe", "names": [], + "rangeMappings": ";;;;", "sources": [ "../../input/index.ts" ], diff --git a/crates/swc/tests/fixture/sourcemap/issue-3733/1/output/index.map b/crates/swc/tests/fixture/sourcemap/issue-3733/1/output/index.map index 1263b4f89e2b..3098eb2b8ab2 100644 --- a/crates/swc/tests/fixture/sourcemap/issue-3733/1/output/index.map +++ b/crates/swc/tests/fixture/sourcemap/issue-3733/1/output/index.map @@ -3,6 +3,7 @@ "names": [ "a" ], + "rangeMappings": "", "sources": [ "../../input/index.js" ], diff --git a/crates/swc/tests/fixture/sourcemap/issue-3733/2/output/index.map b/crates/swc/tests/fixture/sourcemap/issue-3733/2/output/index.map index b39e5434767b..3547a8681aae 100644 --- a/crates/swc/tests/fixture/sourcemap/issue-3733/2/output/index.map +++ b/crates/swc/tests/fixture/sourcemap/issue-3733/2/output/index.map @@ -3,6 +3,7 @@ "names": [ "a" ], + "rangeMappings": "", "sources": [ "../../input/index.js" ], diff --git a/crates/swc/tests/fixture/sourcemap/issue-3854/1-true/output/index.map b/crates/swc/tests/fixture/sourcemap/issue-3854/1-true/output/index.map index 97e258e8721f..8362b895b04c 100644 --- a/crates/swc/tests/fixture/sourcemap/issue-3854/1-true/output/index.map +++ b/crates/swc/tests/fixture/sourcemap/issue-3854/1-true/output/index.map @@ -45,6 +45,7 @@ "variant", "constructor" ], + "rangeMappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", "sources": [ "../../input/index.ts" ], diff --git a/crates/swc/tests/fixture/sourcemap/issue-3854/2-inline/output/index.ts b/crates/swc/tests/fixture/sourcemap/issue-3854/2-inline/output/index.ts index b4d8af0afd26..80201cbe0468 100644 --- a/crates/swc/tests/fixture/sourcemap/issue-3854/2-inline/output/index.ts +++ b/crates/swc/tests/fixture/sourcemap/issue-3854/2-inline/output/index.ts @@ -334,4 +334,4 @@ class ArticleSourcesBuilder extends _AbstractBuilders.AbstractBuilder { } } -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2lucHV0L2luZGV4LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEFic3RyYWN0QnVpbGRlciwgQWJzdHJhY3RTZXFCdWlsZGVyIH0gZnJvbSBcIi4vQWJzdHJhY3RCdWlsZGVyc1wiO1xuaW1wb3J0IHsgaGFzaCwgbWFwQnVpbGRBcmcsIG1hcEJ1aWxkQXJncyB9IGZyb20gXCIuL0J1aWxkZXIudXRpbHNcIjtcbmltcG9ydCB7IGltYWdlIH0gZnJvbSBcIi4vRWxlbWVudEJ1aWxkZXJcIjtcblxuaW1wb3J0IHR5cGUge1xuICAgIEJvZHksXG4gICAgQm9keVN0YWdlLFxuICAgIFRydXN0Qm94LFxuICAgIFJpY2hUZXh0LFxuICAgIE9wZW5lcixcbiAgICBCb2R5SGVhZGVyLFxuICAgIFN0YWdlLFxuICAgIEFydGljbGVTb3VyY2UsXG4gICAgQXJ0aWNsZVNvdXJjZXMsXG59IGZyb20gXCJAcGFwZXIvbW9kZWxzXCI7XG5pbXBvcnQgdHlwZSB7XG4gICAgQnVpbGRBcmcsXG4gICAgQnVpbGRBcmdzLFxuICAgIENyZWF0ZUJ1aWxkZXIsXG4gICAgU2VxRWxlbWVudCxcbiAgICBTZXFOZXh0RWxlbWVudENvbnZlcnRlcixcbn0gZnJvbSBcIi4vdHlwZXNcIjtcblxuLyoqXG4gKiBAZGVwcmVjYXRlZCB1c2Uge0J1aWxkZXIuYm9keS5ub2RlLmltZygpfVxuICovXG5leHBvcnQgKiBmcm9tIFwiLi9Cb2R5Tm9kZXNCdWlsZGVyXCI7XG5leHBvcnQgKiBhcyBub2RlIGZyb20gXCIuL0JvZHlOb2Rlc0J1aWxkZXJcIjtcblxuZXhwb3J0IGNvbnN0IGNyZWF0ZTogQ3JlYXRlQnVpbGRlcjxCb2R5QnVpbGRlcj4gPSAoKSA9PiBuZXcgQm9keUJ1aWxkZXIoKTtcbmV4cG9ydCBjb25zdCB0cnVzdEJveDogQ3JlYXRlQnVpbGRlcjxUcnVzdEJveEJ1aWxkZXI+ID0gKCkgPT5cbiAgICBuZXcgVHJ1c3RCb3hCdWlsZGVyKCk7XG5leHBvcnQgY29uc3Qgb3BlbmVyOiBDcmVhdGVCdWlsZGVyPE9wZW5lckJ1aWxkZXI+ID0gKCkgPT4gbmV3IE9wZW5lckJ1aWxkZXIoKTtcbmV4cG9ydCBjb25zdCBzdGFnZTogQ3JlYXRlQnVpbGRlcjxCb2R5U3RhZ2VCdWlsZGVyPiA9ICgpID0+XG4gICAgbmV3IEJvZHlTdGFnZUJ1aWxkZXIoKTtcbmV4cG9ydCBjb25zdCBoZWFkZXI6IENyZWF0ZUJ1aWxkZXI8Qm9keUhlYWRlckJ1aWxkZXI+ID0gKCkgPT5cbiAgICBuZXcgQm9keUhlYWRlckJ1aWxkZXIoKTtcbmV4cG9ydCBjb25zdCBzb3VyY2U6IENyZWF0ZUJ1aWxkZXI8XG4gICAgQXJ0aWNsZVNvdXJjZUJ1aWxkZXIsXG4gICAgQnVpbGRBcmdzPFJpY2hUZXh0Lk5vZGU+XG4+ID0gKG5vZGVzOiBCdWlsZEFyZ3M8UmljaFRleHQuTm9kZT4gPSBbXSkgPT5cbiAgICBuZXcgQXJ0aWNsZVNvdXJjZUJ1aWxkZXIoLi4ubm9kZXMpO1xuZXhwb3J0IGNvbnN0IHNvdXJjZXM6IENyZWF0ZUJ1aWxkZXI8QXJ0aWNsZVNvdXJjZXNCdWlsZGVyPiA9ICgpID0+XG4gICAgbmV3IEFydGljbGVTb3VyY2VzQnVpbGRlcigpO1xuXG5leHBvcnQgY29uc3Qgc2VxID0ge1xuICAgIHN0YWdlOiAoKCkgPT5cbiAgICAgICAgbmV3IEJvZHlTdGFnZVNlcUJ1aWxkZXIoKSkgYXMgQ3JlYXRlQnVpbGRlcjxCb2R5U3RhZ2VTZXFCdWlsZGVyPixcbiAgICBzb3VyY2U6ICgoKSA9PlxuICAgICAgICBuZXcgQXJ0aWNsZVNvdXJjZVNlcUJ1aWxkZXIoKSkgYXMgQ3JlYXRlQnVpbGRlcjxBcnRpY2xlU291cmNlU2VxQnVpbGRlcj4sXG59IGFzIGNvbnN0O1xuXG5jbGFzcyBCb2R5QnVpbGRlciBleHRlbmRzIEFic3RyYWN0QnVpbGRlcjxCb2R5PiB7XG4gICAgI3N0YWdlczogQm9keVN0YWdlW10gPSBbXTtcbiAgICAjdHJ1c3RCb3g/OiBUcnVzdEJveCA9IHVuZGVmaW5lZDtcbiAgICAjZGlzY2xhaW1lcj86IFJpY2hUZXh0Lk5vZGVbXSA9IHVuZGVmaW5lZDtcbiAgICAjYXJ0aWNsZVNvdXJjZXM/OiBBcnRpY2xlU291cmNlcyA9IHVuZGVmaW5lZDtcblxuICAgIHN0YWdlcyguLi5zdGFnZXM6IEJ1aWxkQXJnczxCb2R5U3RhZ2U+KTogdGhpcyB7XG4gICAgICAgIHRoaXMuI3N0YWdlcyA9IHN0YWdlcy5tYXAobWFwQnVpbGRBcmcpO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICB0cnVzdEJveCh0cnVzdEJveD86IEJ1aWxkQXJnPFRydXN0Qm94Pik6IHRoaXMge1xuICAgICAgICB0aGlzLiN0cnVzdEJveCA9IG1hcEJ1aWxkQXJnKHRydXN0Qm94KTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgZGlzY2xhaW1lcihkaXNjbGFpbWVyPzogQnVpbGRBcmdzPFJpY2hUZXh0Lk5vZGU+KTogdGhpcyB7XG4gICAgICAgIHRoaXMuI2Rpc2NsYWltZXIgPSBkaXNjbGFpbWVyPy5tYXAobWFwQnVpbGRBcmcpO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBhcnRpY2xlU291cmNlcyhhcnRpY2xlU291cmNlcz86IEJ1aWxkQXJnPEFydGljbGVTb3VyY2VzPik6IHRoaXMge1xuICAgICAgICB0aGlzLiNhcnRpY2xlU291cmNlcyA9IG1hcEJ1aWxkQXJnKGFydGljbGVTb3VyY2VzKTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgYnVpbGQoKTogQm9keSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBzdGFnZXM6IHRoaXMuI3N0YWdlcyxcbiAgICAgICAgICAgIHRydXN0Qm94OiB0aGlzLiN0cnVzdEJveCxcbiAgICAgICAgICAgIGRpc2NsYWltZXI6IHRoaXMuI2Rpc2NsYWltZXIsXG4gICAgICAgICAgICBhcnRpY2xlU291cmNlczogdGhpcy4jYXJ0aWNsZVNvdXJjZXMsXG4gICAgICAgIH07XG4gICAgfVxufVxuXG5jbGFzcyBUcnVzdEJveEJ1aWxkZXIgZXh0ZW5kcyBBYnN0cmFjdEJ1aWxkZXI8VHJ1c3RCb3g+IHtcbiAgICAjbm9kZXM6IFJpY2hUZXh0Lk5vZGVbXSA9IFtdO1xuICAgICNoaWRkZW46IFJpY2hUZXh0Lk5vZGVbXSA9IFtdO1xuXG4gICAgbm9kZXMobm9kZXM6IEJ1aWxkQXJnczxSaWNoVGV4dC5Ob2RlPik6IHRoaXMge1xuICAgICAgICB0aGlzLiNub2RlcyA9IG5vZGVzLm1hcChtYXBCdWlsZEFyZyk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIGhpZGRlbihoaWRkZW46IEJ1aWxkQXJnczxSaWNoVGV4dC5Ob2RlPik6IHRoaXMge1xuICAgICAgICB0aGlzLiNoaWRkZW4gPSBoaWRkZW4ubWFwKG1hcEJ1aWxkQXJnKTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgYnVpbGQoKTogVHJ1c3RCb3gge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgbm9kZXM6IHRoaXMuI25vZGVzLFxuICAgICAgICAgICAgaGlkZGVuOiB0aGlzLiNoaWRkZW4sXG4gICAgICAgIH07XG4gICAgfVxufVxuXG5jbGFzcyBPcGVuZXJCdWlsZGVyIGV4dGVuZHMgQWJzdHJhY3RCdWlsZGVyPE9wZW5lcj4ge1xuICAgICNlbGVtZW50OiBPcGVuZXJbXCJlbGVtZW50XCJdID0gaW1hZ2UoKS5idWlsZCgpO1xuXG4gICAgZWxlbWVudChlbGVtZW50OiBCdWlsZEFyZzxPcGVuZXJbXCJlbGVtZW50XCJdPik6IHRoaXMge1xuICAgICAgICB0aGlzLiNlbGVtZW50ID0gbWFwQnVpbGRBcmcoZWxlbWVudCk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIGJ1aWxkKCk6IE9wZW5lciB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBlbGVtZW50OiB0aGlzLiNlbGVtZW50LFxuICAgICAgICB9O1xuICAgIH1cbn1cblxuY2xhc3MgQm9keVN0YWdlU2VxQnVpbGRlciBleHRlbmRzIEFic3RyYWN0U2VxQnVpbGRlcjxCb2R5U3RhZ2U+IHtcbiAgICAjbm9kZXM6IFNlcUVsZW1lbnQ8UmljaFRleHQuTm9kZVtdPiA9IFtdO1xuICAgICNoZWFkZXI/OiBTZXFFbGVtZW50PEJvZHlIZWFkZXI+ID0gdW5kZWZpbmVkO1xuICAgICNjb21wYW5pb25zOiBTZXFFbGVtZW50PFN0YWdlLkNvbXBhbmlvbkl0ZW1bXT4gPSBbXTtcbiAgICAjY29tbWVyY2lhbHNFbmRPZlN0YWdlOiBTZXFFbGVtZW50PFJpY2hUZXh0Lk5vZGVbXT4gPSBbXTtcblxuICAgIG5vZGVzKG5vZGVzOiBTZXFFbGVtZW50PEJ1aWxkQXJnczxSaWNoVGV4dC5Ob2RlPj4pOiB0aGlzIHtcbiAgICAgICAgdGhpcy4jbm9kZXMgPSBub2Rlcy5tYXAobWFwQnVpbGRBcmdzKTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgaGVhZGVyKGhlYWRlcj86IFNlcUVsZW1lbnQ8QnVpbGRBcmc8Qm9keUhlYWRlcj4+KTogdGhpcyB7XG4gICAgICAgIHRoaXMuI2hlYWRlciA9IG1hcEJ1aWxkQXJncyhoZWFkZXIgPz8gW10pO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBjb21wYW5pb25zKGNvbXBhbmlvbnM6IFNlcUVsZW1lbnQ8QnVpbGRBcmdzPFN0YWdlLkNvbXBhbmlvbkl0ZW0+Pik6IHRoaXMge1xuICAgICAgICB0aGlzLiNjb21wYW5pb25zID0gY29tcGFuaW9ucy5tYXAobWFwQnVpbGRBcmdzKTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgY29tbWVyY2lhbHNFbmRPZlN0YWdlKFxuICAgICAgICBjb21tZXJjaWFsc0VuZE9mU3RhZ2U6IFNlcUVsZW1lbnQ8QnVpbGRBcmdzPFJpY2hUZXh0Lk5vZGU+PlxuICAgICk6IHRoaXMge1xuICAgICAgICB0aGlzLiNjb21tZXJjaWFsc0VuZE9mU3RhZ2UgPSBjb21tZXJjaWFsc0VuZE9mU3RhZ2UubWFwKG1hcEJ1aWxkQXJncyk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIGJ1aWxkTGlzdEl0ZW0oc2VxTmV4dEVsZW1lbnQ6IFNlcU5leHRFbGVtZW50Q29udmVydGVyKTogQm9keVN0YWdlIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGlkOiBoYXNoKFxuICAgICAgICAgICAgICAgIFwiYm9keVN0YWdlXCIsXG4gICAgICAgICAgICAgICAgdGhpcy4jbm9kZXMsXG4gICAgICAgICAgICAgICAgdGhpcy4jY29tcGFuaW9ucyxcbiAgICAgICAgICAgICAgICB0aGlzLiNjb21tZXJjaWFsc0VuZE9mU3RhZ2UsXG4gICAgICAgICAgICAgICAgdGhpcy4jaGVhZGVyXG4gICAgICAgICAgICApLFxuICAgICAgICAgICAgbm9kZXM6IHNlcU5leHRFbGVtZW50LmFycmF5KHRoaXMuI25vZGVzKSxcbiAgICAgICAgICAgIGhlYWRlcjogc2VxTmV4dEVsZW1lbnQubWF5YmUodGhpcy4jaGVhZGVyKSxcbiAgICAgICAgICAgIGNvbXBhbmlvbnM6IHNlcU5leHRFbGVtZW50LmFycmF5KHRoaXMuI2NvbXBhbmlvbnMpLFxuICAgICAgICAgICAgY29tbWVyY2lhbHNFbmRPZlN0YWdlOiBzZXFOZXh0RWxlbWVudC5hcnJheShcbiAgICAgICAgICAgICAgICB0aGlzLiNjb21tZXJjaWFsc0VuZE9mU3RhZ2VcbiAgICAgICAgICAgICksXG4gICAgICAgIH07XG4gICAgfVxufVxuXG5jbGFzcyBCb2R5U3RhZ2VCdWlsZGVyIGV4dGVuZHMgQWJzdHJhY3RCdWlsZGVyPEJvZHlTdGFnZT4ge1xuICAgICNzZXFCdWlsZGVyOiBCb2R5U3RhZ2VTZXFCdWlsZGVyID0gbmV3IEJvZHlTdGFnZVNlcUJ1aWxkZXIoKTtcblxuICAgIG5vZGVzKG5vZGVzOiBCdWlsZEFyZ3M8UmljaFRleHQuTm9kZT4pOiB0aGlzIHtcbiAgICAgICAgdGhpcy4jc2VxQnVpbGRlci5ub2Rlcyhbbm9kZXNdKTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgaGVhZGVyKGhlYWRlcj86IEJ1aWxkQXJnPEJvZHlIZWFkZXI+KTogdGhpcyB7XG4gICAgICAgIGlmIChoZWFkZXIpIHtcbiAgICAgICAgICAgIHRoaXMuI3NlcUJ1aWxkZXIuaGVhZGVyKFtoZWFkZXJdKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBjb21wYW5pb25zKGNvbXBhbmlvbnM6IEJ1aWxkQXJnczxTdGFnZS5Db21wYW5pb25JdGVtPik6IHRoaXMge1xuICAgICAgICB0aGlzLiNzZXFCdWlsZGVyLmNvbXBhbmlvbnMoW2NvbXBhbmlvbnNdKTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgY29tbWVyY2lhbHNFbmRPZlN0YWdlKFxuICAgICAgICBjb21tZXJjaWFsc0VuZE9mU3RhZ2U6IEJ1aWxkQXJnczxSaWNoVGV4dC5Ob2RlPlxuICAgICk6IHRoaXMge1xuICAgICAgICB0aGlzLiNzZXFCdWlsZGVyLmNvbW1lcmNpYWxzRW5kT2ZTdGFnZShbY29tbWVyY2lhbHNFbmRPZlN0YWdlXSk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIGJ1aWxkKCk6IEJvZHlTdGFnZSB7XG4gICAgICAgIHJldHVybiB0aGlzLiNzZXFCdWlsZGVyLmJ1aWxkKCk7XG4gICAgfVxufVxuXG5jbGFzcyBCb2R5SGVhZGVyQnVpbGRlciBleHRlbmRzIEFic3RyYWN0QnVpbGRlcjxCb2R5SGVhZGVyPiB7XG4gICAgI3ZhcmlhbnQ6IEJvZHlIZWFkZXJbXCJ2YXJpYW50XCJdID0gXCJmdWxsXCI7XG4gICAgI29wZW5lcj86IE9wZW5lciA9IHVuZGVmaW5lZDtcblxuICAgIHZhcmlhbnQodmFyaWFudDogQm9keUhlYWRlcltcInZhcmlhbnRcIl0pOiB0aGlzIHtcbiAgICAgICAgdGhpcy4jdmFyaWFudCA9IHZhcmlhbnQ7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIG9wZW5lcihvcGVuZXI6IEJ1aWxkQXJnPE9wZW5lcj4pOiB0aGlzIHtcbiAgICAgICAgdGhpcy4jb3BlbmVyID0gbWFwQnVpbGRBcmcob3BlbmVyKTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgYnVpbGQoKTogQm9keUhlYWRlciB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB2YXJpYW50OiB0aGlzLiN2YXJpYW50LFxuICAgICAgICAgICAgb3BlbmVyOiB0aGlzLiNvcGVuZXIsXG4gICAgICAgIH07XG4gICAgfVxufVxuXG5jbGFzcyBBcnRpY2xlU291cmNlU2VxQnVpbGRlciBleHRlbmRzIEFic3RyYWN0U2VxQnVpbGRlcjxBcnRpY2xlU291cmNlPiB7XG4gICAgI25vZGVzOiBTZXFFbGVtZW50PFJpY2hUZXh0Lk5vZGVbXT4gPSBbXTtcblxuICAgIG5vZGVzKG5vZGVzOiBTZXFFbGVtZW50PEJ1aWxkQXJnczxSaWNoVGV4dC5Ob2RlPj4pOiB0aGlzIHtcbiAgICAgICAgdGhpcy4jbm9kZXMgPSBub2Rlcy5tYXAobWFwQnVpbGRBcmdzKTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgYnVpbGRMaXN0SXRlbShzZXFOZXh0RWxlbWVudDogU2VxTmV4dEVsZW1lbnRDb252ZXJ0ZXIpOiBBcnRpY2xlU291cmNlIHtcbiAgICAgICAgY29uc3QgaWQgPSBoYXNoKFwiYXJ0aWNsZS1zb3VyY2VcIiwgdGhpcy4jbm9kZXMpO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgaWQsXG4gICAgICAgICAgICBub2Rlczogc2VxTmV4dEVsZW1lbnQuYXJyYXkodGhpcy4jbm9kZXMpLFxuICAgICAgICB9O1xuICAgIH1cbn1cblxuY2xhc3MgQXJ0aWNsZVNvdXJjZUJ1aWxkZXIgZXh0ZW5kcyBBYnN0cmFjdEJ1aWxkZXI8QXJ0aWNsZVNvdXJjZT4ge1xuICAgICNzZXFCdWlsZGVyOiBBcnRpY2xlU291cmNlU2VxQnVpbGRlciA9IG5ldyBBcnRpY2xlU291cmNlU2VxQnVpbGRlcigpO1xuXG4gICAgY29uc3RydWN0b3IoLi4ubm9kZXM6IEJ1aWxkQXJnczxSaWNoVGV4dC5Ob2RlPikge1xuICAgICAgICBzdXBlcigpO1xuICAgICAgICB0aGlzLm5vZGVzKC4uLm5vZGVzKTtcbiAgICB9XG5cbiAgICBub2RlcyguLi5ub2RlczogQnVpbGRBcmdzPFJpY2hUZXh0Lk5vZGU+KTogdGhpcyB7XG4gICAgICAgIHRoaXMuI3NlcUJ1aWxkZXIubm9kZXMoW25vZGVzXSk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIGJ1aWxkKCk6IEFydGljbGVTb3VyY2Uge1xuICAgICAgICByZXR1cm4gdGhpcy4jc2VxQnVpbGRlci5idWlsZCgpO1xuICAgIH1cbn1cblxuY2xhc3MgQXJ0aWNsZVNvdXJjZXNCdWlsZGVyIGV4dGVuZHMgQWJzdHJhY3RCdWlsZGVyPEFydGljbGVTb3VyY2VzPiB7XG4gICAgI25vZGVzOiBBcnRpY2xlU291cmNlW10gPSBbXTtcbiAgICAjaGlkZGVuOiBBcnRpY2xlU291cmNlW10gPSBbXTtcblxuICAgIG5vZGVzKC4uLm5vZGVzOiBCdWlsZEFyZ3M8QXJ0aWNsZVNvdXJjZT4pOiB0aGlzIHtcbiAgICAgICAgdGhpcy4jbm9kZXMgPSBub2Rlcy5tYXAobWFwQnVpbGRBcmcpO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBoaWRkZW4oLi4uaGlkZGVuOiBCdWlsZEFyZ3M8QXJ0aWNsZVNvdXJjZT4pOiB0aGlzIHtcbiAgICAgICAgdGhpcy4jaGlkZGVuID0gaGlkZGVuLm1hcChtYXBCdWlsZEFyZyk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIGJ1aWxkKCk6IEFydGljbGVTb3VyY2VzIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIG5vZGVzOiB0aGlzLiNub2RlcyxcbiAgICAgICAgICAgIGhpZGRlbjogdGhpcy4jaGlkZGVuLFxuICAgICAgICB9O1xuICAgIH1cbn1cbiJdLCJuYW1lcyI6WyJjcmVhdGUiLCJoZWFkZXIiLCJub2RlIiwib3BlbmVyIiwic2VxIiwic291cmNlIiwic291cmNlcyIsInN0YWdlIiwidHJ1c3RCb3giLCJCb2R5QnVpbGRlciIsIlRydXN0Qm94QnVpbGRlciIsIk9wZW5lckJ1aWxkZXIiLCJCb2R5U3RhZ2VCdWlsZGVyIiwiQm9keUhlYWRlckJ1aWxkZXIiLCJub2RlcyIsIkFydGljbGVTb3VyY2VCdWlsZGVyIiwiQXJ0aWNsZVNvdXJjZXNCdWlsZGVyIiwiQm9keVN0YWdlU2VxQnVpbGRlciIsIkFydGljbGVTb3VyY2VTZXFCdWlsZGVyIiwiQWJzdHJhY3RCdWlsZGVyIiwic3RhZ2VzIiwibWFwIiwibWFwQnVpbGRBcmciLCJkaXNjbGFpbWVyIiwiYXJ0aWNsZVNvdXJjZXMiLCJidWlsZCIsInVuZGVmaW5lZCIsImhpZGRlbiIsImVsZW1lbnQiLCJpbWFnZSIsIkFic3RyYWN0U2VxQnVpbGRlciIsIm1hcEJ1aWxkQXJncyIsImNvbXBhbmlvbnMiLCJjb21tZXJjaWFsc0VuZE9mU3RhZ2UiLCJidWlsZExpc3RJdGVtIiwic2VxTmV4dEVsZW1lbnQiLCJpZCIsImhhc2giLCJhcnJheSIsIm1heWJlIiwic2VxQnVpbGRlciIsInZhcmlhbnQiLCJjb25zdHJ1Y3RvciJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7SUE2QmFBLE1BQU07ZUFBTkE7O0lBTUFDLE1BQU07ZUFBTkE7O0lBUkRDLElBQUk7OztJQUtIQyxNQUFNO2VBQU5BOztJQWFBQyxHQUFHO2VBQUhBOztJQVJBQyxNQUFNO2VBQU5BOztJQUtBQyxPQUFPO2VBQVBBOztJQVRBQyxLQUFLO2VBQUxBOztJQUhBQyxRQUFRO2VBQVJBOzs7Ozs7OztrQ0E5QnVDOzhCQUNKO2dDQUMxQjsyRkF3QlI7QUFHUCxNQUFNUixTQUFxQyxJQUFNLElBQUlTO0FBQ3JELE1BQU1ELFdBQTJDLElBQ3BELElBQUlFO0FBQ0QsTUFBTVAsU0FBdUMsSUFBTSxJQUFJUTtBQUN2RCxNQUFNSixRQUF5QyxJQUNsRCxJQUFJSztBQUNELE1BQU1YLFNBQTJDLElBQ3BELElBQUlZO0FBQ0QsTUFBTVIsU0FHVCxDQUFDUyxRQUFrQyxFQUFFLEdBQ3JDLElBQUlDLHdCQUF3QkQ7QUFDekIsTUFBTVIsVUFBZ0QsSUFDekQsSUFBSVU7QUFFRCxNQUFNWixNQUFNO0lBQ2ZHLE9BQVEsSUFDSixJQUFJVTtJQUNSWixRQUFTLElBQ0wsSUFBSWE7QUFDWjtJQUdJLHVDQUNBLHlDQUNBLDJDQUNBO0FBSkosTUFBTVQsb0JBQW9CVSxpQ0FBZTtJQU1yQ0MsT0FBTyxHQUFHQSxNQUE0QixFQUFRO3lDQUNwQ0EsU0FBU0EsT0FBT0MsR0FBRyxDQUFDQyx5QkFBVztRQUNyQyxPQUFPLElBQUk7SUFDZjtJQUVBZCxTQUFTQSxRQUE2QixFQUFRO3lDQUNwQ0EsV0FBV2MsSUFBQUEseUJBQVcsRUFBQ2Q7UUFDN0IsT0FBTyxJQUFJO0lBQ2Y7SUFFQWUsV0FBV0EsVUFBcUMsRUFBUTt5Q0FDOUNBLGFBQWFBLFlBQVlGLElBQUlDLHlCQUFXO1FBQzlDLE9BQU8sSUFBSTtJQUNmO0lBRUFFLGVBQWVBLGNBQXlDLEVBQVE7eUNBQ3REQSxpQkFBaUJGLElBQUFBLHlCQUFXLEVBQUNFO1FBQ25DLE9BQU8sSUFBSTtJQUNmO0lBRUFDLFFBQWM7UUFDVixPQUFPO1lBQ0hMLE1BQU0sNkJBQUUsSUFBSSxFQUFFQTtZQUNkWixRQUFRLDZCQUFFLElBQUksRUFBRUE7WUFDaEJlLFVBQVUsNkJBQUUsSUFBSSxFQUFFQTtZQUNsQkMsY0FBYyw2QkFBRSxJQUFJLEVBQUVBO1FBQzFCO0lBQ0o7OztRQWhDQSxrQ0FBQTs7bUJBQXVCLEVBQUU7O1FBQ3pCLGtDQUFBOzttQkFBdUJFOztRQUN2QixrQ0FBQTs7bUJBQWdDQTs7UUFDaEMsa0NBQUE7O21CQUFtQ0E7OztBQThCdkM7SUFHSSxzQ0FDQTtBQUZKLE1BQU1oQix3QkFBd0JTLGlDQUFlO0lBSXpDTCxNQUFNQSxLQUErQixFQUFRO3lDQUNuQ0EsUUFBUUEsTUFBTU8sR0FBRyxDQUFDQyx5QkFBVztRQUNuQyxPQUFPLElBQUk7SUFDZjtJQUVBSyxPQUFPQSxNQUFnQyxFQUFRO3lDQUNyQ0EsU0FBU0EsT0FBT04sR0FBRyxDQUFDQyx5QkFBVztRQUNyQyxPQUFPLElBQUk7SUFDZjtJQUVBRyxRQUFrQjtRQUNkLE9BQU87WUFDSFgsS0FBSyw2QkFBRSxJQUFJLEVBQUVBO1lBQ2JhLE1BQU0sNkJBQUUsSUFBSSxFQUFFQTtRQUNsQjtJQUNKOzs7UUFsQkEsa0NBQUE7O21CQUEwQixFQUFFOztRQUM1QixrQ0FBQTs7bUJBQTJCLEVBQUU7OztBQWtCakM7SUFHSTtBQURKLE1BQU1oQixzQkFBc0JRLGlDQUFlO0lBR3ZDUyxRQUFRQSxPQUFvQyxFQUFRO3lDQUMxQ0EsVUFBVU4sSUFBQUEseUJBQVcsRUFBQ007UUFDNUIsT0FBTyxJQUFJO0lBQ2Y7SUFFQUgsUUFBZ0I7UUFDWixPQUFPO1lBQ0hHLE9BQU8sNkJBQUUsSUFBSSxFQUFFQTtRQUNuQjtJQUNKOzs7UUFYQSxrQ0FBQTs7bUJBQThCQyxJQUFBQSxxQkFBSyxJQUFHSixLQUFLOzs7QUFZL0M7SUFHSSx1Q0FDQSx1Q0FDQSwyQ0FDQTtBQUpKLE1BQU1SLDRCQUE0QmEsb0NBQWtCO0lBTWhEaEIsTUFBTUEsS0FBMkMsRUFBUTt5Q0FDL0NBLFNBQVFBLE1BQU1PLEdBQUcsQ0FBQ1UsMEJBQVk7UUFDcEMsT0FBTyxJQUFJO0lBQ2Y7SUFFQTlCLE9BQU9BLE1BQXlDLEVBQVE7eUNBQzlDQSxTQUFTOEIsSUFBQUEsMEJBQVksRUFBQzlCLFVBQVUsRUFBRTtRQUN4QyxPQUFPLElBQUk7SUFDZjtJQUVBK0IsV0FBV0EsVUFBc0QsRUFBUTt5Q0FDL0RBLGFBQWFBLFdBQVdYLEdBQUcsQ0FBQ1UsMEJBQVk7UUFDOUMsT0FBTyxJQUFJO0lBQ2Y7SUFFQUUsc0JBQ0lBLHFCQUEyRCxFQUN2RDt5Q0FDRUEsd0JBQXdCQSxzQkFBc0JaLEdBQUcsQ0FBQ1UsMEJBQVk7UUFDcEUsT0FBTyxJQUFJO0lBQ2Y7SUFFQUcsY0FBY0MsY0FBdUMsRUFBYTtRQUM5RCxPQUFPO1lBQ0hDLElBQUlDLElBQUFBLGtCQUFJLEVBQ0osd0NBQ0EsSUFBSSxFQUFFdkIscUNBQ04sSUFBSSxFQUFFa0IseUNBQ04sSUFBSSxFQUFFQyxvREFDTixJQUFJLEVBQUVoQztZQUVWYSxPQUFPcUIsZUFBZUcsS0FBSyw0QkFBQyxJQUFJLEVBQUV4QjtZQUNsQ2IsUUFBUWtDLGVBQWVJLEtBQUssNEJBQUMsSUFBSSxFQUFFdEM7WUFDbkMrQixZQUFZRyxlQUFlRyxLQUFLLDRCQUFDLElBQUksRUFBRU47WUFDdkNDLHVCQUF1QkUsZUFBZUcsS0FBSyw0QkFDdkMsSUFBSSxFQUFFTDtRQUVkO0lBQ0o7OztRQTNDQSxrQ0FBQTs7bUJBQXNDLEVBQUU7O1FBQ3hDLGtDQUFBOzttQkFBbUNQOztRQUNuQyxrQ0FBQTs7bUJBQWlELEVBQUU7O1FBQ25ELGtDQUFBOzttQkFBc0QsRUFBRTs7O0FBeUM1RDtJQUdJO0FBREosTUFBTWQseUJBQXlCTyxpQ0FBZTtJQUcxQ0wsTUFBTUEsS0FBK0IsRUFBUTtRQUN6QywyQkFBQSxJQUFJLEVBQUUwQixhQUFXMUIsS0FBSyxDQUFDO1lBQUNBO1NBQU07UUFDOUIsT0FBTyxJQUFJO0lBQ2Y7SUFFQWIsT0FBT0EsTUFBNkIsRUFBUTtRQUN4QyxJQUFJQSxRQUFRO1lBQ1IsMkJBQUEsSUFBSSxFQUFFdUMsYUFBV3ZDLE1BQU0sQ0FBQztnQkFBQ0E7YUFBTztRQUNwQztRQUNBLE9BQU8sSUFBSTtJQUNmO0lBRUErQixXQUFXQSxVQUEwQyxFQUFRO1FBQ3pELDJCQUFBLElBQUksRUFBRVEsYUFBV1IsVUFBVSxDQUFDO1lBQUNBO1NBQVc7UUFDeEMsT0FBTyxJQUFJO0lBQ2Y7SUFFQUMsc0JBQ0lBLHFCQUErQyxFQUMzQztRQUNKLDJCQUFBLElBQUksRUFBRU8sYUFBV1AscUJBQXFCLENBQUM7WUFBQ0E7U0FBc0I7UUFDOUQsT0FBTyxJQUFJO0lBQ2Y7SUFFQVIsUUFBbUI7UUFDZixPQUFPLDJCQUFBLElBQUksRUFBRWUsYUFBV2YsS0FBSztJQUNqQzs7O1FBNUJBLGtDQUFBOzttQkFBbUMsSUFBSVI7OztBQTZCM0M7SUFHSSx3Q0FDQTtBQUZKLE1BQU1KLDBCQUEwQk0saUNBQWU7SUFJM0NzQixRQUFRQSxPQUE4QixFQUFRO3lDQUNwQ0EsVUFBVUE7UUFDaEIsT0FBTyxJQUFJO0lBQ2Y7SUFFQXRDLE9BQU9BLE1BQXdCLEVBQVE7eUNBQzdCQSxTQUFTbUIsSUFBQUEseUJBQVcsRUFBQ25CO1FBQzNCLE9BQU8sSUFBSTtJQUNmO0lBRUFzQixRQUFvQjtRQUNoQixPQUFPO1lBQ0hnQixPQUFPLDZCQUFFLElBQUksRUFBRUE7WUFDZnRDLE1BQU0sNkJBQUUsSUFBSSxFQUFFQTtRQUNsQjtJQUNKOzs7UUFsQkEsa0NBQUE7O21CQUFrQzs7UUFDbEMsa0NBQUE7O21CQUFtQnVCOzs7QUFrQnZCO0lBR0k7QUFESixNQUFNUixnQ0FBZ0NZLG9DQUFrQjtJQUdwRGhCLE1BQU1BLEtBQTJDLEVBQVE7eUNBQy9DQSxTQUFRQSxNQUFNTyxHQUFHLENBQUNVLDBCQUFZO1FBQ3BDLE9BQU8sSUFBSTtJQUNmO0lBRUFHLGNBQWNDLGNBQXVDLEVBQWlCO1FBQ2xFLE1BQU1DLEtBQUtDLElBQUFBLGtCQUFJLEVBQUMsNkNBQWtCLElBQUksRUFBRXZCO1FBQ3hDLE9BQU87WUFDSHNCO1lBQ0F0QixPQUFPcUIsZUFBZUcsS0FBSyw0QkFBQyxJQUFJLEVBQUV4QjtRQUN0QztJQUNKOzs7UUFiQSxrQ0FBQTs7bUJBQXNDLEVBQUU7OztBQWM1QztJQUdJO0FBREosTUFBTUMsNkJBQTZCSSxpQ0FBZTtJQVE5Q0wsTUFBTSxHQUFHQSxLQUErQixFQUFRO1FBQzVDLDJCQUFBLElBQUksRUFBRTBCLGNBQVcxQixLQUFLLENBQUM7WUFBQ0E7U0FBTTtRQUM5QixPQUFPLElBQUk7SUFDZjtJQUVBVyxRQUF1QjtRQUNuQixPQUFPLDJCQUFBLElBQUksRUFBRWUsY0FBV2YsS0FBSztJQUNqQztJQVpBaUIsWUFBWSxHQUFHNUIsS0FBK0IsQ0FBRTtRQUM1QyxLQUFLO1FBSFQsa0NBQUE7O21CQUF1QyxJQUFJSTs7UUFJdkMsSUFBSSxDQUFDSixLQUFLLElBQUlBO0lBQ2xCO0FBVUo7SUFHSSx1Q0FDQTtBQUZKLE1BQU1FLDhCQUE4QkcsaUNBQWU7SUFJL0NMLE1BQU0sR0FBR0EsS0FBK0IsRUFBUTt5Q0FDdENBLFNBQVFBLE1BQU1PLEdBQUcsQ0FBQ0MseUJBQVc7UUFDbkMsT0FBTyxJQUFJO0lBQ2Y7SUFFQUssT0FBTyxHQUFHQSxNQUFnQyxFQUFRO3lDQUN4Q0EsVUFBU0EsT0FBT04sR0FBRyxDQUFDQyx5QkFBVztRQUNyQyxPQUFPLElBQUk7SUFDZjtJQUVBRyxRQUF3QjtRQUNwQixPQUFPO1lBQ0hYLEtBQUssNkJBQUUsSUFBSSxFQUFFQTtZQUNiYSxNQUFNLDZCQUFFLElBQUksRUFBRUE7UUFDbEI7SUFDSjs7O1FBbEJBLGtDQUFBOzttQkFBMEIsRUFBRTs7UUFDNUIsa0NBQUE7O21CQUEyQixFQUFFOzs7QUFrQmpDIn0= +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2lucHV0L2luZGV4LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEFic3RyYWN0QnVpbGRlciwgQWJzdHJhY3RTZXFCdWlsZGVyIH0gZnJvbSBcIi4vQWJzdHJhY3RCdWlsZGVyc1wiO1xuaW1wb3J0IHsgaGFzaCwgbWFwQnVpbGRBcmcsIG1hcEJ1aWxkQXJncyB9IGZyb20gXCIuL0J1aWxkZXIudXRpbHNcIjtcbmltcG9ydCB7IGltYWdlIH0gZnJvbSBcIi4vRWxlbWVudEJ1aWxkZXJcIjtcblxuaW1wb3J0IHR5cGUge1xuICAgIEJvZHksXG4gICAgQm9keVN0YWdlLFxuICAgIFRydXN0Qm94LFxuICAgIFJpY2hUZXh0LFxuICAgIE9wZW5lcixcbiAgICBCb2R5SGVhZGVyLFxuICAgIFN0YWdlLFxuICAgIEFydGljbGVTb3VyY2UsXG4gICAgQXJ0aWNsZVNvdXJjZXMsXG59IGZyb20gXCJAcGFwZXIvbW9kZWxzXCI7XG5pbXBvcnQgdHlwZSB7XG4gICAgQnVpbGRBcmcsXG4gICAgQnVpbGRBcmdzLFxuICAgIENyZWF0ZUJ1aWxkZXIsXG4gICAgU2VxRWxlbWVudCxcbiAgICBTZXFOZXh0RWxlbWVudENvbnZlcnRlcixcbn0gZnJvbSBcIi4vdHlwZXNcIjtcblxuLyoqXG4gKiBAZGVwcmVjYXRlZCB1c2Uge0J1aWxkZXIuYm9keS5ub2RlLmltZygpfVxuICovXG5leHBvcnQgKiBmcm9tIFwiLi9Cb2R5Tm9kZXNCdWlsZGVyXCI7XG5leHBvcnQgKiBhcyBub2RlIGZyb20gXCIuL0JvZHlOb2Rlc0J1aWxkZXJcIjtcblxuZXhwb3J0IGNvbnN0IGNyZWF0ZTogQ3JlYXRlQnVpbGRlcjxCb2R5QnVpbGRlcj4gPSAoKSA9PiBuZXcgQm9keUJ1aWxkZXIoKTtcbmV4cG9ydCBjb25zdCB0cnVzdEJveDogQ3JlYXRlQnVpbGRlcjxUcnVzdEJveEJ1aWxkZXI+ID0gKCkgPT5cbiAgICBuZXcgVHJ1c3RCb3hCdWlsZGVyKCk7XG5leHBvcnQgY29uc3Qgb3BlbmVyOiBDcmVhdGVCdWlsZGVyPE9wZW5lckJ1aWxkZXI+ID0gKCkgPT4gbmV3IE9wZW5lckJ1aWxkZXIoKTtcbmV4cG9ydCBjb25zdCBzdGFnZTogQ3JlYXRlQnVpbGRlcjxCb2R5U3RhZ2VCdWlsZGVyPiA9ICgpID0+XG4gICAgbmV3IEJvZHlTdGFnZUJ1aWxkZXIoKTtcbmV4cG9ydCBjb25zdCBoZWFkZXI6IENyZWF0ZUJ1aWxkZXI8Qm9keUhlYWRlckJ1aWxkZXI+ID0gKCkgPT5cbiAgICBuZXcgQm9keUhlYWRlckJ1aWxkZXIoKTtcbmV4cG9ydCBjb25zdCBzb3VyY2U6IENyZWF0ZUJ1aWxkZXI8XG4gICAgQXJ0aWNsZVNvdXJjZUJ1aWxkZXIsXG4gICAgQnVpbGRBcmdzPFJpY2hUZXh0Lk5vZGU+XG4+ID0gKG5vZGVzOiBCdWlsZEFyZ3M8UmljaFRleHQuTm9kZT4gPSBbXSkgPT5cbiAgICBuZXcgQXJ0aWNsZVNvdXJjZUJ1aWxkZXIoLi4ubm9kZXMpO1xuZXhwb3J0IGNvbnN0IHNvdXJjZXM6IENyZWF0ZUJ1aWxkZXI8QXJ0aWNsZVNvdXJjZXNCdWlsZGVyPiA9ICgpID0+XG4gICAgbmV3IEFydGljbGVTb3VyY2VzQnVpbGRlcigpO1xuXG5leHBvcnQgY29uc3Qgc2VxID0ge1xuICAgIHN0YWdlOiAoKCkgPT5cbiAgICAgICAgbmV3IEJvZHlTdGFnZVNlcUJ1aWxkZXIoKSkgYXMgQ3JlYXRlQnVpbGRlcjxCb2R5U3RhZ2VTZXFCdWlsZGVyPixcbiAgICBzb3VyY2U6ICgoKSA9PlxuICAgICAgICBuZXcgQXJ0aWNsZVNvdXJjZVNlcUJ1aWxkZXIoKSkgYXMgQ3JlYXRlQnVpbGRlcjxBcnRpY2xlU291cmNlU2VxQnVpbGRlcj4sXG59IGFzIGNvbnN0O1xuXG5jbGFzcyBCb2R5QnVpbGRlciBleHRlbmRzIEFic3RyYWN0QnVpbGRlcjxCb2R5PiB7XG4gICAgI3N0YWdlczogQm9keVN0YWdlW10gPSBbXTtcbiAgICAjdHJ1c3RCb3g/OiBUcnVzdEJveCA9IHVuZGVmaW5lZDtcbiAgICAjZGlzY2xhaW1lcj86IFJpY2hUZXh0Lk5vZGVbXSA9IHVuZGVmaW5lZDtcbiAgICAjYXJ0aWNsZVNvdXJjZXM/OiBBcnRpY2xlU291cmNlcyA9IHVuZGVmaW5lZDtcblxuICAgIHN0YWdlcyguLi5zdGFnZXM6IEJ1aWxkQXJnczxCb2R5U3RhZ2U+KTogdGhpcyB7XG4gICAgICAgIHRoaXMuI3N0YWdlcyA9IHN0YWdlcy5tYXAobWFwQnVpbGRBcmcpO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICB0cnVzdEJveCh0cnVzdEJveD86IEJ1aWxkQXJnPFRydXN0Qm94Pik6IHRoaXMge1xuICAgICAgICB0aGlzLiN0cnVzdEJveCA9IG1hcEJ1aWxkQXJnKHRydXN0Qm94KTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgZGlzY2xhaW1lcihkaXNjbGFpbWVyPzogQnVpbGRBcmdzPFJpY2hUZXh0Lk5vZGU+KTogdGhpcyB7XG4gICAgICAgIHRoaXMuI2Rpc2NsYWltZXIgPSBkaXNjbGFpbWVyPy5tYXAobWFwQnVpbGRBcmcpO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBhcnRpY2xlU291cmNlcyhhcnRpY2xlU291cmNlcz86IEJ1aWxkQXJnPEFydGljbGVTb3VyY2VzPik6IHRoaXMge1xuICAgICAgICB0aGlzLiNhcnRpY2xlU291cmNlcyA9IG1hcEJ1aWxkQXJnKGFydGljbGVTb3VyY2VzKTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgYnVpbGQoKTogQm9keSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBzdGFnZXM6IHRoaXMuI3N0YWdlcyxcbiAgICAgICAgICAgIHRydXN0Qm94OiB0aGlzLiN0cnVzdEJveCxcbiAgICAgICAgICAgIGRpc2NsYWltZXI6IHRoaXMuI2Rpc2NsYWltZXIsXG4gICAgICAgICAgICBhcnRpY2xlU291cmNlczogdGhpcy4jYXJ0aWNsZVNvdXJjZXMsXG4gICAgICAgIH07XG4gICAgfVxufVxuXG5jbGFzcyBUcnVzdEJveEJ1aWxkZXIgZXh0ZW5kcyBBYnN0cmFjdEJ1aWxkZXI8VHJ1c3RCb3g+IHtcbiAgICAjbm9kZXM6IFJpY2hUZXh0Lk5vZGVbXSA9IFtdO1xuICAgICNoaWRkZW46IFJpY2hUZXh0Lk5vZGVbXSA9IFtdO1xuXG4gICAgbm9kZXMobm9kZXM6IEJ1aWxkQXJnczxSaWNoVGV4dC5Ob2RlPik6IHRoaXMge1xuICAgICAgICB0aGlzLiNub2RlcyA9IG5vZGVzLm1hcChtYXBCdWlsZEFyZyk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIGhpZGRlbihoaWRkZW46IEJ1aWxkQXJnczxSaWNoVGV4dC5Ob2RlPik6IHRoaXMge1xuICAgICAgICB0aGlzLiNoaWRkZW4gPSBoaWRkZW4ubWFwKG1hcEJ1aWxkQXJnKTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgYnVpbGQoKTogVHJ1c3RCb3gge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgbm9kZXM6IHRoaXMuI25vZGVzLFxuICAgICAgICAgICAgaGlkZGVuOiB0aGlzLiNoaWRkZW4sXG4gICAgICAgIH07XG4gICAgfVxufVxuXG5jbGFzcyBPcGVuZXJCdWlsZGVyIGV4dGVuZHMgQWJzdHJhY3RCdWlsZGVyPE9wZW5lcj4ge1xuICAgICNlbGVtZW50OiBPcGVuZXJbXCJlbGVtZW50XCJdID0gaW1hZ2UoKS5idWlsZCgpO1xuXG4gICAgZWxlbWVudChlbGVtZW50OiBCdWlsZEFyZzxPcGVuZXJbXCJlbGVtZW50XCJdPik6IHRoaXMge1xuICAgICAgICB0aGlzLiNlbGVtZW50ID0gbWFwQnVpbGRBcmcoZWxlbWVudCk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIGJ1aWxkKCk6IE9wZW5lciB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBlbGVtZW50OiB0aGlzLiNlbGVtZW50LFxuICAgICAgICB9O1xuICAgIH1cbn1cblxuY2xhc3MgQm9keVN0YWdlU2VxQnVpbGRlciBleHRlbmRzIEFic3RyYWN0U2VxQnVpbGRlcjxCb2R5U3RhZ2U+IHtcbiAgICAjbm9kZXM6IFNlcUVsZW1lbnQ8UmljaFRleHQuTm9kZVtdPiA9IFtdO1xuICAgICNoZWFkZXI/OiBTZXFFbGVtZW50PEJvZHlIZWFkZXI+ID0gdW5kZWZpbmVkO1xuICAgICNjb21wYW5pb25zOiBTZXFFbGVtZW50PFN0YWdlLkNvbXBhbmlvbkl0ZW1bXT4gPSBbXTtcbiAgICAjY29tbWVyY2lhbHNFbmRPZlN0YWdlOiBTZXFFbGVtZW50PFJpY2hUZXh0Lk5vZGVbXT4gPSBbXTtcblxuICAgIG5vZGVzKG5vZGVzOiBTZXFFbGVtZW50PEJ1aWxkQXJnczxSaWNoVGV4dC5Ob2RlPj4pOiB0aGlzIHtcbiAgICAgICAgdGhpcy4jbm9kZXMgPSBub2Rlcy5tYXAobWFwQnVpbGRBcmdzKTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgaGVhZGVyKGhlYWRlcj86IFNlcUVsZW1lbnQ8QnVpbGRBcmc8Qm9keUhlYWRlcj4+KTogdGhpcyB7XG4gICAgICAgIHRoaXMuI2hlYWRlciA9IG1hcEJ1aWxkQXJncyhoZWFkZXIgPz8gW10pO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBjb21wYW5pb25zKGNvbXBhbmlvbnM6IFNlcUVsZW1lbnQ8QnVpbGRBcmdzPFN0YWdlLkNvbXBhbmlvbkl0ZW0+Pik6IHRoaXMge1xuICAgICAgICB0aGlzLiNjb21wYW5pb25zID0gY29tcGFuaW9ucy5tYXAobWFwQnVpbGRBcmdzKTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgY29tbWVyY2lhbHNFbmRPZlN0YWdlKFxuICAgICAgICBjb21tZXJjaWFsc0VuZE9mU3RhZ2U6IFNlcUVsZW1lbnQ8QnVpbGRBcmdzPFJpY2hUZXh0Lk5vZGU+PlxuICAgICk6IHRoaXMge1xuICAgICAgICB0aGlzLiNjb21tZXJjaWFsc0VuZE9mU3RhZ2UgPSBjb21tZXJjaWFsc0VuZE9mU3RhZ2UubWFwKG1hcEJ1aWxkQXJncyk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIGJ1aWxkTGlzdEl0ZW0oc2VxTmV4dEVsZW1lbnQ6IFNlcU5leHRFbGVtZW50Q29udmVydGVyKTogQm9keVN0YWdlIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGlkOiBoYXNoKFxuICAgICAgICAgICAgICAgIFwiYm9keVN0YWdlXCIsXG4gICAgICAgICAgICAgICAgdGhpcy4jbm9kZXMsXG4gICAgICAgICAgICAgICAgdGhpcy4jY29tcGFuaW9ucyxcbiAgICAgICAgICAgICAgICB0aGlzLiNjb21tZXJjaWFsc0VuZE9mU3RhZ2UsXG4gICAgICAgICAgICAgICAgdGhpcy4jaGVhZGVyXG4gICAgICAgICAgICApLFxuICAgICAgICAgICAgbm9kZXM6IHNlcU5leHRFbGVtZW50LmFycmF5KHRoaXMuI25vZGVzKSxcbiAgICAgICAgICAgIGhlYWRlcjogc2VxTmV4dEVsZW1lbnQubWF5YmUodGhpcy4jaGVhZGVyKSxcbiAgICAgICAgICAgIGNvbXBhbmlvbnM6IHNlcU5leHRFbGVtZW50LmFycmF5KHRoaXMuI2NvbXBhbmlvbnMpLFxuICAgICAgICAgICAgY29tbWVyY2lhbHNFbmRPZlN0YWdlOiBzZXFOZXh0RWxlbWVudC5hcnJheShcbiAgICAgICAgICAgICAgICB0aGlzLiNjb21tZXJjaWFsc0VuZE9mU3RhZ2VcbiAgICAgICAgICAgICksXG4gICAgICAgIH07XG4gICAgfVxufVxuXG5jbGFzcyBCb2R5U3RhZ2VCdWlsZGVyIGV4dGVuZHMgQWJzdHJhY3RCdWlsZGVyPEJvZHlTdGFnZT4ge1xuICAgICNzZXFCdWlsZGVyOiBCb2R5U3RhZ2VTZXFCdWlsZGVyID0gbmV3IEJvZHlTdGFnZVNlcUJ1aWxkZXIoKTtcblxuICAgIG5vZGVzKG5vZGVzOiBCdWlsZEFyZ3M8UmljaFRleHQuTm9kZT4pOiB0aGlzIHtcbiAgICAgICAgdGhpcy4jc2VxQnVpbGRlci5ub2Rlcyhbbm9kZXNdKTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgaGVhZGVyKGhlYWRlcj86IEJ1aWxkQXJnPEJvZHlIZWFkZXI+KTogdGhpcyB7XG4gICAgICAgIGlmIChoZWFkZXIpIHtcbiAgICAgICAgICAgIHRoaXMuI3NlcUJ1aWxkZXIuaGVhZGVyKFtoZWFkZXJdKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBjb21wYW5pb25zKGNvbXBhbmlvbnM6IEJ1aWxkQXJnczxTdGFnZS5Db21wYW5pb25JdGVtPik6IHRoaXMge1xuICAgICAgICB0aGlzLiNzZXFCdWlsZGVyLmNvbXBhbmlvbnMoW2NvbXBhbmlvbnNdKTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgY29tbWVyY2lhbHNFbmRPZlN0YWdlKFxuICAgICAgICBjb21tZXJjaWFsc0VuZE9mU3RhZ2U6IEJ1aWxkQXJnczxSaWNoVGV4dC5Ob2RlPlxuICAgICk6IHRoaXMge1xuICAgICAgICB0aGlzLiNzZXFCdWlsZGVyLmNvbW1lcmNpYWxzRW5kT2ZTdGFnZShbY29tbWVyY2lhbHNFbmRPZlN0YWdlXSk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIGJ1aWxkKCk6IEJvZHlTdGFnZSB7XG4gICAgICAgIHJldHVybiB0aGlzLiNzZXFCdWlsZGVyLmJ1aWxkKCk7XG4gICAgfVxufVxuXG5jbGFzcyBCb2R5SGVhZGVyQnVpbGRlciBleHRlbmRzIEFic3RyYWN0QnVpbGRlcjxCb2R5SGVhZGVyPiB7XG4gICAgI3ZhcmlhbnQ6IEJvZHlIZWFkZXJbXCJ2YXJpYW50XCJdID0gXCJmdWxsXCI7XG4gICAgI29wZW5lcj86IE9wZW5lciA9IHVuZGVmaW5lZDtcblxuICAgIHZhcmlhbnQodmFyaWFudDogQm9keUhlYWRlcltcInZhcmlhbnRcIl0pOiB0aGlzIHtcbiAgICAgICAgdGhpcy4jdmFyaWFudCA9IHZhcmlhbnQ7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIG9wZW5lcihvcGVuZXI6IEJ1aWxkQXJnPE9wZW5lcj4pOiB0aGlzIHtcbiAgICAgICAgdGhpcy4jb3BlbmVyID0gbWFwQnVpbGRBcmcob3BlbmVyKTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgYnVpbGQoKTogQm9keUhlYWRlciB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB2YXJpYW50OiB0aGlzLiN2YXJpYW50LFxuICAgICAgICAgICAgb3BlbmVyOiB0aGlzLiNvcGVuZXIsXG4gICAgICAgIH07XG4gICAgfVxufVxuXG5jbGFzcyBBcnRpY2xlU291cmNlU2VxQnVpbGRlciBleHRlbmRzIEFic3RyYWN0U2VxQnVpbGRlcjxBcnRpY2xlU291cmNlPiB7XG4gICAgI25vZGVzOiBTZXFFbGVtZW50PFJpY2hUZXh0Lk5vZGVbXT4gPSBbXTtcblxuICAgIG5vZGVzKG5vZGVzOiBTZXFFbGVtZW50PEJ1aWxkQXJnczxSaWNoVGV4dC5Ob2RlPj4pOiB0aGlzIHtcbiAgICAgICAgdGhpcy4jbm9kZXMgPSBub2Rlcy5tYXAobWFwQnVpbGRBcmdzKTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgYnVpbGRMaXN0SXRlbShzZXFOZXh0RWxlbWVudDogU2VxTmV4dEVsZW1lbnRDb252ZXJ0ZXIpOiBBcnRpY2xlU291cmNlIHtcbiAgICAgICAgY29uc3QgaWQgPSBoYXNoKFwiYXJ0aWNsZS1zb3VyY2VcIiwgdGhpcy4jbm9kZXMpO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgaWQsXG4gICAgICAgICAgICBub2Rlczogc2VxTmV4dEVsZW1lbnQuYXJyYXkodGhpcy4jbm9kZXMpLFxuICAgICAgICB9O1xuICAgIH1cbn1cblxuY2xhc3MgQXJ0aWNsZVNvdXJjZUJ1aWxkZXIgZXh0ZW5kcyBBYnN0cmFjdEJ1aWxkZXI8QXJ0aWNsZVNvdXJjZT4ge1xuICAgICNzZXFCdWlsZGVyOiBBcnRpY2xlU291cmNlU2VxQnVpbGRlciA9IG5ldyBBcnRpY2xlU291cmNlU2VxQnVpbGRlcigpO1xuXG4gICAgY29uc3RydWN0b3IoLi4ubm9kZXM6IEJ1aWxkQXJnczxSaWNoVGV4dC5Ob2RlPikge1xuICAgICAgICBzdXBlcigpO1xuICAgICAgICB0aGlzLm5vZGVzKC4uLm5vZGVzKTtcbiAgICB9XG5cbiAgICBub2RlcyguLi5ub2RlczogQnVpbGRBcmdzPFJpY2hUZXh0Lk5vZGU+KTogdGhpcyB7XG4gICAgICAgIHRoaXMuI3NlcUJ1aWxkZXIubm9kZXMoW25vZGVzXSk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIGJ1aWxkKCk6IEFydGljbGVTb3VyY2Uge1xuICAgICAgICByZXR1cm4gdGhpcy4jc2VxQnVpbGRlci5idWlsZCgpO1xuICAgIH1cbn1cblxuY2xhc3MgQXJ0aWNsZVNvdXJjZXNCdWlsZGVyIGV4dGVuZHMgQWJzdHJhY3RCdWlsZGVyPEFydGljbGVTb3VyY2VzPiB7XG4gICAgI25vZGVzOiBBcnRpY2xlU291cmNlW10gPSBbXTtcbiAgICAjaGlkZGVuOiBBcnRpY2xlU291cmNlW10gPSBbXTtcblxuICAgIG5vZGVzKC4uLm5vZGVzOiBCdWlsZEFyZ3M8QXJ0aWNsZVNvdXJjZT4pOiB0aGlzIHtcbiAgICAgICAgdGhpcy4jbm9kZXMgPSBub2Rlcy5tYXAobWFwQnVpbGRBcmcpO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBoaWRkZW4oLi4uaGlkZGVuOiBCdWlsZEFyZ3M8QXJ0aWNsZVNvdXJjZT4pOiB0aGlzIHtcbiAgICAgICAgdGhpcy4jaGlkZGVuID0gaGlkZGVuLm1hcChtYXBCdWlsZEFyZyk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIGJ1aWxkKCk6IEFydGljbGVTb3VyY2VzIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIG5vZGVzOiB0aGlzLiNub2RlcyxcbiAgICAgICAgICAgIGhpZGRlbjogdGhpcy4jaGlkZGVuLFxuICAgICAgICB9O1xuICAgIH1cbn1cbiJdLCJuYW1lcyI6WyJjcmVhdGUiLCJoZWFkZXIiLCJub2RlIiwib3BlbmVyIiwic2VxIiwic291cmNlIiwic291cmNlcyIsInN0YWdlIiwidHJ1c3RCb3giLCJCb2R5QnVpbGRlciIsIlRydXN0Qm94QnVpbGRlciIsIk9wZW5lckJ1aWxkZXIiLCJCb2R5U3RhZ2VCdWlsZGVyIiwiQm9keUhlYWRlckJ1aWxkZXIiLCJub2RlcyIsIkFydGljbGVTb3VyY2VCdWlsZGVyIiwiQXJ0aWNsZVNvdXJjZXNCdWlsZGVyIiwiQm9keVN0YWdlU2VxQnVpbGRlciIsIkFydGljbGVTb3VyY2VTZXFCdWlsZGVyIiwiQWJzdHJhY3RCdWlsZGVyIiwic3RhZ2VzIiwibWFwIiwibWFwQnVpbGRBcmciLCJkaXNjbGFpbWVyIiwiYXJ0aWNsZVNvdXJjZXMiLCJidWlsZCIsInVuZGVmaW5lZCIsImhpZGRlbiIsImVsZW1lbnQiLCJpbWFnZSIsIkFic3RyYWN0U2VxQnVpbGRlciIsIm1hcEJ1aWxkQXJncyIsImNvbXBhbmlvbnMiLCJjb21tZXJjaWFsc0VuZE9mU3RhZ2UiLCJidWlsZExpc3RJdGVtIiwic2VxTmV4dEVsZW1lbnQiLCJpZCIsImhhc2giLCJhcnJheSIsIm1heWJlIiwic2VxQnVpbGRlciIsInZhcmlhbnQiLCJjb25zdHJ1Y3RvciJdLCJyYW5nZU1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztJQTZCYUEsTUFBTTtlQUFOQTs7SUFNQUMsTUFBTTtlQUFOQTs7SUFSREMsSUFBSTs7O0lBS0hDLE1BQU07ZUFBTkE7O0lBYUFDLEdBQUc7ZUFBSEE7O0lBUkFDLE1BQU07ZUFBTkE7O0lBS0FDLE9BQU87ZUFBUEE7O0lBVEFDLEtBQUs7ZUFBTEE7O0lBSEFDLFFBQVE7ZUFBUkE7Ozs7Ozs7O2tDQTlCdUM7OEJBQ0o7Z0NBQzFCOzJGQXdCUjtBQUdQLE1BQU1SLFNBQXFDLElBQU0sSUFBSVM7QUFDckQsTUFBTUQsV0FBMkMsSUFDcEQsSUFBSUU7QUFDRCxNQUFNUCxTQUF1QyxJQUFNLElBQUlRO0FBQ3ZELE1BQU1KLFFBQXlDLElBQ2xELElBQUlLO0FBQ0QsTUFBTVgsU0FBMkMsSUFDcEQsSUFBSVk7QUFDRCxNQUFNUixTQUdULENBQUNTLFFBQWtDLEVBQUUsR0FDckMsSUFBSUMsd0JBQXdCRDtBQUN6QixNQUFNUixVQUFnRCxJQUN6RCxJQUFJVTtBQUVELE1BQU1aLE1BQU07SUFDZkcsT0FBUSxJQUNKLElBQUlVO0lBQ1JaLFFBQVMsSUFDTCxJQUFJYTtBQUNaO0lBR0ksdUNBQ0EseUNBQ0EsMkNBQ0E7QUFKSixNQUFNVCxvQkFBb0JVLGlDQUFlO0lBTXJDQyxPQUFPLEdBQUdBLE1BQTRCLEVBQVE7eUNBQ3BDQSxTQUFTQSxPQUFPQyxHQUFHLENBQUNDLHlCQUFXO1FBQ3JDLE9BQU8sSUFBSTtJQUNmO0lBRUFkLFNBQVNBLFFBQTZCLEVBQVE7eUNBQ3BDQSxXQUFXYyxJQUFBQSx5QkFBVyxFQUFDZDtRQUM3QixPQUFPLElBQUk7SUFDZjtJQUVBZSxXQUFXQSxVQUFxQyxFQUFRO3lDQUM5Q0EsYUFBYUEsWUFBWUYsSUFBSUMseUJBQVc7UUFDOUMsT0FBTyxJQUFJO0lBQ2Y7SUFFQUUsZUFBZUEsY0FBeUMsRUFBUTt5Q0FDdERBLGlCQUFpQkYsSUFBQUEseUJBQVcsRUFBQ0U7UUFDbkMsT0FBTyxJQUFJO0lBQ2Y7SUFFQUMsUUFBYztRQUNWLE9BQU87WUFDSEwsTUFBTSw2QkFBRSxJQUFJLEVBQUVBO1lBQ2RaLFFBQVEsNkJBQUUsSUFBSSxFQUFFQTtZQUNoQmUsVUFBVSw2QkFBRSxJQUFJLEVBQUVBO1lBQ2xCQyxjQUFjLDZCQUFFLElBQUksRUFBRUE7UUFDMUI7SUFDSjs7O1FBaENBLGtDQUFBOzttQkFBdUIsRUFBRTs7UUFDekIsa0NBQUE7O21CQUF1QkU7O1FBQ3ZCLGtDQUFBOzttQkFBZ0NBOztRQUNoQyxrQ0FBQTs7bUJBQW1DQTs7O0FBOEJ2QztJQUdJLHNDQUNBO0FBRkosTUFBTWhCLHdCQUF3QlMsaUNBQWU7SUFJekNMLE1BQU1BLEtBQStCLEVBQVE7eUNBQ25DQSxRQUFRQSxNQUFNTyxHQUFHLENBQUNDLHlCQUFXO1FBQ25DLE9BQU8sSUFBSTtJQUNmO0lBRUFLLE9BQU9BLE1BQWdDLEVBQVE7eUNBQ3JDQSxTQUFTQSxPQUFPTixHQUFHLENBQUNDLHlCQUFXO1FBQ3JDLE9BQU8sSUFBSTtJQUNmO0lBRUFHLFFBQWtCO1FBQ2QsT0FBTztZQUNIWCxLQUFLLDZCQUFFLElBQUksRUFBRUE7WUFDYmEsTUFBTSw2QkFBRSxJQUFJLEVBQUVBO1FBQ2xCO0lBQ0o7OztRQWxCQSxrQ0FBQTs7bUJBQTBCLEVBQUU7O1FBQzVCLGtDQUFBOzttQkFBMkIsRUFBRTs7O0FBa0JqQztJQUdJO0FBREosTUFBTWhCLHNCQUFzQlEsaUNBQWU7SUFHdkNTLFFBQVFBLE9BQW9DLEVBQVE7eUNBQzFDQSxVQUFVTixJQUFBQSx5QkFBVyxFQUFDTTtRQUM1QixPQUFPLElBQUk7SUFDZjtJQUVBSCxRQUFnQjtRQUNaLE9BQU87WUFDSEcsT0FBTyw2QkFBRSxJQUFJLEVBQUVBO1FBQ25CO0lBQ0o7OztRQVhBLGtDQUFBOzttQkFBOEJDLElBQUFBLHFCQUFLLElBQUdKLEtBQUs7OztBQVkvQztJQUdJLHVDQUNBLHVDQUNBLDJDQUNBO0FBSkosTUFBTVIsNEJBQTRCYSxvQ0FBa0I7SUFNaERoQixNQUFNQSxLQUEyQyxFQUFRO3lDQUMvQ0EsU0FBUUEsTUFBTU8sR0FBRyxDQUFDVSwwQkFBWTtRQUNwQyxPQUFPLElBQUk7SUFDZjtJQUVBOUIsT0FBT0EsTUFBeUMsRUFBUTt5Q0FDOUNBLFNBQVM4QixJQUFBQSwwQkFBWSxFQUFDOUIsVUFBVSxFQUFFO1FBQ3hDLE9BQU8sSUFBSTtJQUNmO0lBRUErQixXQUFXQSxVQUFzRCxFQUFRO3lDQUMvREEsYUFBYUEsV0FBV1gsR0FBRyxDQUFDVSwwQkFBWTtRQUM5QyxPQUFPLElBQUk7SUFDZjtJQUVBRSxzQkFDSUEscUJBQTJELEVBQ3ZEO3lDQUNFQSx3QkFBd0JBLHNCQUFzQlosR0FBRyxDQUFDVSwwQkFBWTtRQUNwRSxPQUFPLElBQUk7SUFDZjtJQUVBRyxjQUFjQyxjQUF1QyxFQUFhO1FBQzlELE9BQU87WUFDSEMsSUFBSUMsSUFBQUEsa0JBQUksRUFDSix3Q0FDQSxJQUFJLEVBQUV2QixxQ0FDTixJQUFJLEVBQUVrQix5Q0FDTixJQUFJLEVBQUVDLG9EQUNOLElBQUksRUFBRWhDO1lBRVZhLE9BQU9xQixlQUFlRyxLQUFLLDRCQUFDLElBQUksRUFBRXhCO1lBQ2xDYixRQUFRa0MsZUFBZUksS0FBSyw0QkFBQyxJQUFJLEVBQUV0QztZQUNuQytCLFlBQVlHLGVBQWVHLEtBQUssNEJBQUMsSUFBSSxFQUFFTjtZQUN2Q0MsdUJBQXVCRSxlQUFlRyxLQUFLLDRCQUN2QyxJQUFJLEVBQUVMO1FBRWQ7SUFDSjs7O1FBM0NBLGtDQUFBOzttQkFBc0MsRUFBRTs7UUFDeEMsa0NBQUE7O21CQUFtQ1A7O1FBQ25DLGtDQUFBOzttQkFBaUQsRUFBRTs7UUFDbkQsa0NBQUE7O21CQUFzRCxFQUFFOzs7QUF5QzVEO0lBR0k7QUFESixNQUFNZCx5QkFBeUJPLGlDQUFlO0lBRzFDTCxNQUFNQSxLQUErQixFQUFRO1FBQ3pDLDJCQUFBLElBQUksRUFBRTBCLGFBQVcxQixLQUFLLENBQUM7WUFBQ0E7U0FBTTtRQUM5QixPQUFPLElBQUk7SUFDZjtJQUVBYixPQUFPQSxNQUE2QixFQUFRO1FBQ3hDLElBQUlBLFFBQVE7WUFDUiwyQkFBQSxJQUFJLEVBQUV1QyxhQUFXdkMsTUFBTSxDQUFDO2dCQUFDQTthQUFPO1FBQ3BDO1FBQ0EsT0FBTyxJQUFJO0lBQ2Y7SUFFQStCLFdBQVdBLFVBQTBDLEVBQVE7UUFDekQsMkJBQUEsSUFBSSxFQUFFUSxhQUFXUixVQUFVLENBQUM7WUFBQ0E7U0FBVztRQUN4QyxPQUFPLElBQUk7SUFDZjtJQUVBQyxzQkFDSUEscUJBQStDLEVBQzNDO1FBQ0osMkJBQUEsSUFBSSxFQUFFTyxhQUFXUCxxQkFBcUIsQ0FBQztZQUFDQTtTQUFzQjtRQUM5RCxPQUFPLElBQUk7SUFDZjtJQUVBUixRQUFtQjtRQUNmLE9BQU8sMkJBQUEsSUFBSSxFQUFFZSxhQUFXZixLQUFLO0lBQ2pDOzs7UUE1QkEsa0NBQUE7O21CQUFtQyxJQUFJUjs7O0FBNkIzQztJQUdJLHdDQUNBO0FBRkosTUFBTUosMEJBQTBCTSxpQ0FBZTtJQUkzQ3NCLFFBQVFBLE9BQThCLEVBQVE7eUNBQ3BDQSxVQUFVQTtRQUNoQixPQUFPLElBQUk7SUFDZjtJQUVBdEMsT0FBT0EsTUFBd0IsRUFBUTt5Q0FDN0JBLFNBQVNtQixJQUFBQSx5QkFBVyxFQUFDbkI7UUFDM0IsT0FBTyxJQUFJO0lBQ2Y7SUFFQXNCLFFBQW9CO1FBQ2hCLE9BQU87WUFDSGdCLE9BQU8sNkJBQUUsSUFBSSxFQUFFQTtZQUNmdEMsTUFBTSw2QkFBRSxJQUFJLEVBQUVBO1FBQ2xCO0lBQ0o7OztRQWxCQSxrQ0FBQTs7bUJBQWtDOztRQUNsQyxrQ0FBQTs7bUJBQW1CdUI7OztBQWtCdkI7SUFHSTtBQURKLE1BQU1SLGdDQUFnQ1ksb0NBQWtCO0lBR3BEaEIsTUFBTUEsS0FBMkMsRUFBUTt5Q0FDL0NBLFNBQVFBLE1BQU1PLEdBQUcsQ0FBQ1UsMEJBQVk7UUFDcEMsT0FBTyxJQUFJO0lBQ2Y7SUFFQUcsY0FBY0MsY0FBdUMsRUFBaUI7UUFDbEUsTUFBTUMsS0FBS0MsSUFBQUEsa0JBQUksRUFBQyw2Q0FBa0IsSUFBSSxFQUFFdkI7UUFDeEMsT0FBTztZQUNIc0I7WUFDQXRCLE9BQU9xQixlQUFlRyxLQUFLLDRCQUFDLElBQUksRUFBRXhCO1FBQ3RDO0lBQ0o7OztRQWJBLGtDQUFBOzttQkFBc0MsRUFBRTs7O0FBYzVDO0lBR0k7QUFESixNQUFNQyw2QkFBNkJJLGlDQUFlO0lBUTlDTCxNQUFNLEdBQUdBLEtBQStCLEVBQVE7UUFDNUMsMkJBQUEsSUFBSSxFQUFFMEIsY0FBVzFCLEtBQUssQ0FBQztZQUFDQTtTQUFNO1FBQzlCLE9BQU8sSUFBSTtJQUNmO0lBRUFXLFFBQXVCO1FBQ25CLE9BQU8sMkJBQUEsSUFBSSxFQUFFZSxjQUFXZixLQUFLO0lBQ2pDO0lBWkFpQixZQUFZLEdBQUc1QixLQUErQixDQUFFO1FBQzVDLEtBQUs7UUFIVCxrQ0FBQTs7bUJBQXVDLElBQUlJOztRQUl2QyxJQUFJLENBQUNKLEtBQUssSUFBSUE7SUFDbEI7QUFVSjtJQUdJLHVDQUNBO0FBRkosTUFBTUUsOEJBQThCRyxpQ0FBZTtJQUkvQ0wsTUFBTSxHQUFHQSxLQUErQixFQUFRO3lDQUN0Q0EsU0FBUUEsTUFBTU8sR0FBRyxDQUFDQyx5QkFBVztRQUNuQyxPQUFPLElBQUk7SUFDZjtJQUVBSyxPQUFPLEdBQUdBLE1BQWdDLEVBQVE7eUNBQ3hDQSxVQUFTQSxPQUFPTixHQUFHLENBQUNDLHlCQUFXO1FBQ3JDLE9BQU8sSUFBSTtJQUNmO0lBRUFHLFFBQXdCO1FBQ3BCLE9BQU87WUFDSFgsS0FBSyw2QkFBRSxJQUFJLEVBQUVBO1lBQ2JhLE1BQU0sNkJBQUUsSUFBSSxFQUFFQTtRQUNsQjtJQUNKOzs7UUFsQkEsa0NBQUE7O21CQUEwQixFQUFFOztRQUM1QixrQ0FBQTs7bUJBQTJCLEVBQUU7OztBQWtCakMifQ== diff --git a/crates/swc/tests/fixture/sourcemap/issue-6552/input-map/output/index.map b/crates/swc/tests/fixture/sourcemap/issue-6552/input-map/output/index.map index ea5484f60e58..d2d9c2082610 100644 --- a/crates/swc/tests/fixture/sourcemap/issue-6552/input-map/output/index.map +++ b/crates/swc/tests/fixture/sourcemap/issue-6552/input-map/output/index.map @@ -7,6 +7,7 @@ "message", "bbb" ], + "rangeMappings": "", "sources": [ "../../input/index.js" ], diff --git a/crates/swc/tests/fixture/sourcemap/issue-6552/no-map/output/index.map b/crates/swc/tests/fixture/sourcemap/issue-6552/no-map/output/index.map index 3c2e1f7124ed..556bb97b091a 100644 --- a/crates/swc/tests/fixture/sourcemap/issue-6552/no-map/output/index.map +++ b/crates/swc/tests/fixture/sourcemap/issue-6552/no-map/output/index.map @@ -7,6 +7,7 @@ "message", "bbb" ], + "rangeMappings": "", "sources": [ "../../input/index.js" ], diff --git a/crates/swc/tests/minify/issue-7475/1-with-preamble/output.map b/crates/swc/tests/minify/issue-7475/1-with-preamble/output.map index c2db5abfaf91..9deaaa52e72b 100644 --- a/crates/swc/tests/minify/issue-7475/1-with-preamble/output.map +++ b/crates/swc/tests/minify/issue-7475/1-with-preamble/output.map @@ -5,6 +5,7 @@ "console", "log" ], + "rangeMappings": ";", "sources": [ "$DIR/tests/minify/issue-7475/1-with-preamble/input.js" ], diff --git a/crates/swc/tests/minify/issue-7475/2-no-preamble/output.map b/crates/swc/tests/minify/issue-7475/2-no-preamble/output.map index db25a7dc8d2c..696c780d7d9c 100644 --- a/crates/swc/tests/minify/issue-7475/2-no-preamble/output.map +++ b/crates/swc/tests/minify/issue-7475/2-no-preamble/output.map @@ -5,6 +5,7 @@ "console", "log" ], + "rangeMappings": "", "sources": [ "$DIR/tests/minify/issue-7475/2-no-preamble/input.js" ], diff --git a/crates/swc/tests/minify/issue-7475/issue-8372/1/output.map b/crates/swc/tests/minify/issue-7475/issue-8372/1/output.map index 345aa72c2aac..e22874c87e65 100644 --- a/crates/swc/tests/minify/issue-7475/issue-8372/1/output.map +++ b/crates/swc/tests/minify/issue-7475/issue-8372/1/output.map @@ -6,6 +6,7 @@ "aób", "a" ], + "rangeMappings": "", "sources": [ "input-preprocess.js" ], diff --git a/crates/swc/tests/minify/issue-7475/issue-8372/2/output.map b/crates/swc/tests/minify/issue-7475/issue-8372/2/output.map index 9a47e00da8e2..f98b6a6a6e0c 100644 --- a/crates/swc/tests/minify/issue-7475/issue-8372/2/output.map +++ b/crates/swc/tests/minify/issue-7475/issue-8372/2/output.map @@ -6,6 +6,7 @@ "console", "log" ], + "rangeMappings": "", "sources": [ "$DIR/tests/minify/issue-7475/issue-8372/2/input.js" ], diff --git a/crates/swc_cli_impl/Cargo.toml b/crates/swc_cli_impl/Cargo.toml index d380a578f820..ac3633217f0e 100644 --- a/crates/swc_cli_impl/Cargo.toml +++ b/crates/swc_cli_impl/Cargo.toml @@ -33,7 +33,7 @@ rayon = "1" relative-path = "1.6.1" serde = { version = "1", features = ["derive"] } serde_json = { version = "1", features = ["unbounded_depth"] } -sourcemap = "6.4.1" +sourcemap = "8.0.0" tracing = "0.1.37" tracing-chrome = "0.5.0" tracing-futures = "0.2.5" diff --git a/crates/swc_common/Cargo.toml b/crates/swc_common/Cargo.toml index 9e3ba5767577..c1e3c1279583 100644 --- a/crates/swc_common/Cargo.toml +++ b/crates/swc_common/Cargo.toml @@ -56,7 +56,7 @@ rkyv = { version = "=0.7.42", optional = true, features = [ rustc-hash = "1.1.0" serde = { version = "1.0.119", features = ["derive"] } siphasher = "0.3.9" -sourcemap = { version = "6", optional = true } +sourcemap = { version = "8", optional = true } termcolor = { version = "1.0", optional = true } tracing = "0.1.37" unicode-width = "0.1.4" diff --git a/crates/swc_common/src/source_map.rs b/crates/swc_common/src/source_map.rs index 5912a888141b..beccf76aca52 100644 --- a/crates/swc_common/src/source_map.rs +++ b/crates/swc_common/src/source_map.rs @@ -1258,7 +1258,7 @@ impl SourceMap { } if pos == BytePos(u32::MAX) { - builder.add_raw(lc.line, lc.col, 0, 0, Some(src_id), None); + builder.add_raw(lc.line, lc.col, 0, 0, Some(src_id), None, false); continue; } @@ -1352,7 +1352,7 @@ impl SourceMap { .or_else(|| config.name_for_bytepos(pos)) .map(|name| builder.add_name(name)); - builder.add_raw(lc.line, lc.col, line, col, Some(src_id), name_idx); + builder.add_raw(lc.line, lc.col, line, col, Some(src_id), name_idx, false); prev_dst_line = lc.line; } diff --git a/crates/swc_compiler_base/Cargo.toml b/crates/swc_compiler_base/Cargo.toml index 488d0e4f70a0..7f18cd669c73 100644 --- a/crates/swc_compiler_base/Cargo.toml +++ b/crates/swc_compiler_base/Cargo.toml @@ -18,7 +18,7 @@ base64 = "0.21.0" once_cell = "1" pathdiff = "0.2.0" serde = { version = "1.0.188", features = ["derive"] } -sourcemap = "6.4" +sourcemap = "8.0" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_common = { version = "0.33.20", path = "../swc_common", features = [ diff --git a/crates/swc_config/Cargo.toml b/crates/swc_config/Cargo.toml index fdc941fca71e..cccbaf50a883 100644 --- a/crates/swc_config/Cargo.toml +++ b/crates/swc_config/Cargo.toml @@ -11,9 +11,9 @@ version = "0.1.11" [dependencies] anyhow = "1" indexmap = "2.0.0" -serde = { version = "1", features = ["derive"] } +serde = { version = "1", features = ["derive", "rc"] } serde_json = "1" -sourcemap = { version = "6.4", optional = true } +sourcemap = { version = "8.0", optional = true } swc_cached = { version = "0.3.19", path = "../swc_cached" } swc_config_macro = { version = "0.1.3", path = "../swc_config_macro" } diff --git a/crates/swc_config/src/source_map.rs b/crates/swc_config/src/source_map.rs index 824924510d0e..85de6215294d 100644 --- a/crates/swc_config/src/source_map.rs +++ b/crates/swc_config/src/source_map.rs @@ -1,3 +1,5 @@ +use std::sync::Arc; + use anyhow::{bail, Context, Result}; use serde::{Deserialize, Serialize}; use sourcemap::{vlq::parse_vlq_segment, RawToken, SourceMap}; @@ -9,17 +11,19 @@ pub enum SourceMapContent { #[serde(rename_all = "camelCase")] Parsed { #[serde(default)] - sources: Vec, + sources: Vec>, #[serde(default)] - names: Vec, + names: Vec>, #[serde(default)] mappings: String, #[serde(default)] - file: Option, + range_mappings: String, + #[serde(default)] + file: Option>, #[serde(default)] source_root: Option, #[serde(default)] - sources_content: Option>>, + sources_content: Option>>>, }, } @@ -33,6 +37,7 @@ impl SourceMapContent { sources, names, mappings, + range_mappings: _, file, source_root, sources_content, @@ -99,6 +104,7 @@ impl SourceMapContent { src_col, src_id: src, name_id: name, + is_range: false, }); } } diff --git a/crates/swc_ecma_codegen/Cargo.toml b/crates/swc_ecma_codegen/Cargo.toml index e9b17622c93a..b7b3fbf6e01c 100644 --- a/crates/swc_ecma_codegen/Cargo.toml +++ b/crates/swc_ecma_codegen/Cargo.toml @@ -22,7 +22,7 @@ num-bigint = { version = "0.4", features = ["serde"] } once_cell = "1.18.0" rustc-hash = "1.1.0" serde = "1.0.127" -sourcemap = "6.4" +sourcemap = "8.0" tracing = "0.1.37" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } diff --git a/crates/swc_ecma_transforms/Cargo.toml b/crates/swc_ecma_transforms/Cargo.toml index 6b04a093befe..777a0d3a1001 100644 --- a/crates/swc_ecma_transforms/Cargo.toml +++ b/crates/swc_ecma_transforms/Cargo.toml @@ -46,7 +46,7 @@ swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_vis [dev-dependencies] pretty_assertions = "1.3" -sourcemap = "6.4" +sourcemap = "8.0" tempfile = "3" swc_ecma_codegen = { version = "0.148.12", path = "../swc_ecma_codegen" } diff --git a/crates/swc_ecma_transforms_testing/Cargo.toml b/crates/swc_ecma_transforms_testing/Cargo.toml index aae9320a374e..df24a195ab50 100644 --- a/crates/swc_ecma_transforms_testing/Cargo.toml +++ b/crates/swc_ecma_transforms_testing/Cargo.toml @@ -19,7 +19,7 @@ hex = "0.4.3" serde = "1" serde_json = "1" sha2 = "0.10.8" -sourcemap = "6.4" +sourcemap = "8.0" tempfile = "3.6.0" swc_common = { version = "0.33.20", path = "../swc_common", features = [ From dbf930a2c9bbbc3abfd0cc419ca851d447ba0aaa Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Mon, 25 Mar 2024 04:20:57 +0000 Subject: [PATCH 021/172] chore: Bump crates --- CHANGELOG.md | 6 ++++++ Cargo.lock | 16 ++++++++-------- crates/swc/Cargo.toml | 2 +- crates/swc_cli_impl/Cargo.toml | 2 +- crates/swc_common/Cargo.toml | 2 +- crates/swc_compiler_base/Cargo.toml | 2 +- crates/swc_config/Cargo.toml | 2 +- crates/swc_ecma_codegen/Cargo.toml | 2 +- crates/swc_ecma_transforms/Cargo.toml | 2 +- crates/swc_ecma_transforms_testing/Cargo.toml | 2 +- 10 files changed, 22 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b2022522deb..17fd30751ded 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,12 @@ - **(es/lints)** Detect duplicate bindings in export defaults ([#8760](https://github.com/swc-project/swc/issues/8760)) ([c9c971a](https://github.com/swc-project/swc/commit/c9c971a79236f0e5c713f4341ea71591e979ea21)) +### Miscellaneous Tasks + + + +- **(deps)** Update `sourcemap` to `v8.0.0` ([#8771](https://github.com/swc-project/swc/issues/8771)) ([f8681c9](https://github.com/swc-project/swc/commit/f8681c9299813580849dc39240d29441b6038192)) + ### Refactor diff --git a/Cargo.lock b/Cargo.lock index 5cc04a13bc43..0a61dc78c067 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3694,7 +3694,7 @@ dependencies = [ [[package]] name = "swc" -version = "0.273.22" +version = "0.273.23" dependencies = [ "ansi_term", "anyhow", @@ -3819,7 +3819,7 @@ dependencies = [ [[package]] name = "swc_cli_impl" -version = "0.8.22" +version = "0.8.23" dependencies = [ "anyhow", "assert_cmd", @@ -3843,7 +3843,7 @@ dependencies = [ [[package]] name = "swc_common" -version = "0.33.20" +version = "0.33.21" dependencies = [ "ahash 0.8.8", "anyhow", @@ -3878,7 +3878,7 @@ dependencies = [ [[package]] name = "swc_compiler_base" -version = "0.7.18" +version = "0.7.19" dependencies = [ "anyhow", "base64", @@ -3901,7 +3901,7 @@ dependencies = [ [[package]] name = "swc_config" -version = "0.1.11" +version = "0.1.12" dependencies = [ "anyhow", "indexmap 2.1.0", @@ -4180,7 +4180,7 @@ dependencies = [ [[package]] name = "swc_ecma_codegen" -version = "0.148.12" +version = "0.148.13" dependencies = [ "base64", "criterion", @@ -4590,7 +4590,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms" -version = "0.229.17" +version = "0.229.18" dependencies = [ "pretty_assertions", "sourcemap", @@ -4814,7 +4814,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_testing" -version = "0.140.16" +version = "0.140.17" dependencies = [ "ansi_term", "anyhow", diff --git a/crates/swc/Cargo.toml b/crates/swc/Cargo.toml index dca2ba6f231b..8f86c89a448b 100644 --- a/crates/swc/Cargo.toml +++ b/crates/swc/Cargo.toml @@ -9,7 +9,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc" repository = "https://github.com/swc-project/swc.git" -version = "0.273.22" +version = "0.273.23" [lib] bench = false diff --git a/crates/swc_cli_impl/Cargo.toml b/crates/swc_cli_impl/Cargo.toml index ac3633217f0e..576017129764 100644 --- a/crates/swc_cli_impl/Cargo.toml +++ b/crates/swc_cli_impl/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli_impl" repository = "https://github.com/swc-project/swc.git" -version = "0.8.22" +version = "0.8.23" [[bin]] name = "swc" diff --git a/crates/swc_common/Cargo.toml b/crates/swc_common/Cargo.toml index c1e3c1279583..00ecd6f34211 100644 --- a/crates/swc_common/Cargo.toml +++ b/crates/swc_common/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_common" repository = "https://github.com/swc-project/swc.git" -version = "0.33.20" +version = "0.33.21" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_compiler_base/Cargo.toml b/crates/swc_compiler_base/Cargo.toml index 7f18cd669c73..f2876b0ed798 100644 --- a/crates/swc_compiler_base/Cargo.toml +++ b/crates/swc_compiler_base/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_compiler_base" repository = "https://github.com/swc-project/swc.git" -version = "0.7.18" +version = "0.7.19" [features] node = ["napi", "napi-derive"] diff --git a/crates/swc_config/Cargo.toml b/crates/swc_config/Cargo.toml index cccbaf50a883..6eb4c12b479b 100644 --- a/crates/swc_config/Cargo.toml +++ b/crates/swc_config/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_config" repository = "https://github.com/swc-project/swc.git" -version = "0.1.11" +version = "0.1.12" [dependencies] anyhow = "1" diff --git a/crates/swc_ecma_codegen/Cargo.toml b/crates/swc_ecma_codegen/Cargo.toml index b7b3fbf6e01c..77e8fcd422be 100644 --- a/crates/swc_ecma_codegen/Cargo.toml +++ b/crates/swc_ecma_codegen/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_codegen" repository = "https://github.com/swc-project/swc.git" -version = "0.148.12" +version = "0.148.13" [features] # This does not enable serde for ast nodes. diff --git a/crates/swc_ecma_transforms/Cargo.toml b/crates/swc_ecma_transforms/Cargo.toml index 777a0d3a1001..144b38b0cc55 100644 --- a/crates/swc_ecma_transforms/Cargo.toml +++ b/crates/swc_ecma_transforms/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms" repository = "https://github.com/swc-project/swc.git" -version = "0.229.17" +version = "0.229.18" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_ecma_transforms_testing/Cargo.toml b/crates/swc_ecma_transforms_testing/Cargo.toml index df24a195ab50..b886e87caf18 100644 --- a/crates/swc_ecma_transforms_testing/Cargo.toml +++ b/crates/swc_ecma_transforms_testing/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_transforms_testing" repository = "https://github.com/swc-project/swc.git" -version = "0.140.16" +version = "0.140.17" [lib] bench = false From a05b2ee27b3270ba08cbfb369b72e579969cbaca Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 26 Mar 2024 00:08:47 +0000 Subject: [PATCH 022/172] chore: Publish 1.4.9-nightly-20240326.1 --- bindings/Cargo.lock | 85 ++++++++++++++++++----- bindings/binding_core_node/Cargo.toml | 2 +- bindings/binding_core_wasm/Cargo.toml | 4 +- bindings/binding_minifier_node/Cargo.toml | 6 +- bindings/binding_minifier_wasm/Cargo.toml | 4 +- bindings/swc_cli/Cargo.toml | 4 +- package.json | 2 +- packages/minifier/package.json | 2 +- 8 files changed, 79 insertions(+), 30 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index cfe82d07ebaa..b62e1b1a97ca 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -182,6 +182,15 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" +[[package]] +name = "base64-simd" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "781dd20c3aff0bd194fe7d2a977dd92f21c173891f3a03b677359e5fa457e5d5" +dependencies = [ + "simd-abstraction", +] + [[package]] name = "better_scoped_tls" version = "0.1.1" @@ -223,7 +232,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.4.9-nightly-20240321.1" +version = "1.4.9-nightly-20240326.1" dependencies = [ "anyhow", "getrandom", @@ -268,7 +277,7 @@ dependencies = [ "path-clean 0.1.0", "serde", "serde_json", - "sourcemap", + "sourcemap 6.4.1", "swc_compiler_base", "swc_config", "swc_core", @@ -283,7 +292,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.4.9-nightly-20240321.1" +version = "1.4.9-nightly-20240326.1" dependencies = [ "anyhow", "getrandom", @@ -1942,6 +1951,12 @@ version = "6.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac" +[[package]] +name = "outref" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f222829ae9293e33a9f5e9f440c6760a3d450a64affe1846486b140db81c1f4" + [[package]] name = "overload" version = "0.1.1" @@ -2714,6 +2729,15 @@ dependencies = [ "memmap2 0.6.2", ] +[[package]] +name = "simd-abstraction" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cadb29c57caadc51ff8346233b5cec1d240b68ce55cf1afc764818791876987" +dependencies = [ + "outref", +] + [[package]] name = "simdutf8" version = "0.1.4" @@ -2790,6 +2814,25 @@ dependencies = [ "url", ] +[[package]] +name = "sourcemap" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf0b8c0d9d32f81aa0ab2b68ab634d9bbce287423606656fddb456ac8601aec3" +dependencies = [ + "base64-simd", + "bitvec", + "data-encoding", + "debugid", + "if_chain", + "rustc-hash", + "rustc_version 0.2.3", + "serde", + "serde_json", + "unicode-id-start", + "url", +] + [[package]] name = "spin" version = "0.9.8" @@ -2946,7 +2989,7 @@ dependencies = [ "rustc-hash", "serde", "serde_json", - "sourcemap", + "sourcemap 6.4.1", "swc_atoms", "swc_cached", "swc_common", @@ -3039,7 +3082,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.202" +version = "0.91.203" dependencies = [ "anyhow", "swc_cli_impl", @@ -3047,9 +3090,9 @@ dependencies = [ [[package]] name = "swc_cli_impl" -version = "0.8.22" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "682e3bd75c5c9c6430197680cbeadc86b4728fa514adcf5fb0d6d515119d6b24" +checksum = "412a1c24bbf4ccb6b3e255933e6d1173d1a7dc20cac3d9c19aeee2fc31e0dff0" dependencies = [ "anyhow", "atty", @@ -3060,7 +3103,7 @@ dependencies = [ "relative-path", "serde", "serde_json", - "sourcemap", + "sourcemap 8.0.0", "swc_core", "tracing", "tracing-chrome", @@ -3091,7 +3134,7 @@ dependencies = [ "rustc-hash", "serde", "siphasher", - "sourcemap", + "sourcemap 6.4.1", "swc_atoms", "swc_eq_ignore_macros", "swc_visit", @@ -3102,9 +3145,9 @@ dependencies = [ [[package]] name = "swc_compiler_base" -version = "0.7.18" +version = "0.7.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14edecfac835e77c88017d016c48dba60e82632ee94eb9565f516ebc7072e6a" +checksum = "66405c58d5241ae020b0522a08bdc284da52b13742a58e3023e09cc2e0fb9e8c" dependencies = [ "anyhow", "base64", @@ -3113,7 +3156,7 @@ dependencies = [ "once_cell", "pathdiff", "serde", - "sourcemap", + "sourcemap 8.0.0", "swc_atoms", "swc_common", "swc_config", @@ -3127,15 +3170,15 @@ dependencies = [ [[package]] name = "swc_config" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce837c5eae1cb200a310940de989fd9b3d12ed62d7752bc69b39ef8aa775ec04" +checksum = "ada712ac5e28a301683c8af957e8a56deca675cbc376473dd207a527b989efb5" dependencies = [ "anyhow", "indexmap 2.1.0", "serde", "serde_json", - "sourcemap", + "sourcemap 8.0.0", "swc_cached", "swc_config_macro", ] @@ -3154,9 +3197,9 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.90.24" +version = "0.90.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "354892a17af24956c9ae5479c2bd0a2f9c344aab79e6f2fbd01b7b8eb4e46c2e" +checksum = "568ba911553909fbe9d98d4b61c352a086e68e2754912e2bddf9624ebe92a074" dependencies = [ "binding_macros", "swc", @@ -3210,7 +3253,7 @@ dependencies = [ "once_cell", "rustc-hash", "serde", - "sourcemap", + "sourcemap 6.4.1", "swc_atoms", "swc_common", "swc_ecma_ast", @@ -4460,6 +4503,12 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d70b6494226b36008c8366c288d77190b3fad2eb4c10533139c1c1f461127f1a" +[[package]] +name = "unicode-id-start" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8f73150333cb58412db36f2aca8f2875b013049705cc77b94ded70a1ab1f5da" + [[package]] name = "unicode-ident" version = "1.0.8" diff --git a/bindings/binding_core_node/Cargo.toml b/bindings/binding_core_node/Cargo.toml index 3caa36cec713..d33663510f0e 100644 --- a/bindings/binding_core_node/Cargo.toml +++ b/bindings/binding_core_node/Cargo.toml @@ -51,7 +51,7 @@ tracing-chrome = "0.5.0" tracing-futures = "0.2.5" tracing-subscriber = { version = "0.3.9", features = ["env-filter"] } -swc_core = { version = "0.90.24", features = [ +swc_core = { version = "0.90.25", features = [ "allocator_node", "ecma_ast", "ecma_codegen", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index d204b2c05f3a..527b18b49d9b 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.9-nightly-20240321.1" +version = "1.4.9-nightly-20240326.1" [lib] bench = false @@ -35,7 +35,7 @@ anyhow = "1.0.66" getrandom = { version = "0.2.10", features = ["js"] } serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" -swc_core = { version = "0.90.24", features = [ +swc_core = { version = "0.90.25", features = [ "ecma_ast_serde", "ecma_codegen", "binding_macro_wasm", diff --git a/bindings/binding_minifier_node/Cargo.toml b/bindings/binding_minifier_node/Cargo.toml index c61cfaabe8e4..320afc66876b 100644 --- a/bindings/binding_minifier_node/Cargo.toml +++ b/bindings/binding_minifier_node/Cargo.toml @@ -35,9 +35,9 @@ tracing-chrome = "0.5.0" tracing-futures = "0.2.5" tracing-subscriber = { version = "0.3.9", features = ["env-filter"] } -swc_compiler_base = { version = "0.7.18", features = ["node"] } -swc_config = "0.1.11" -swc_core = { version = "0.90.24", features = [ +swc_compiler_base = { version = "0.7.19", features = ["node"] } +swc_config = "0.1.12" +swc_core = { version = "0.90.25", features = [ "allocator_node", "common_concurrent", "common_sourcemap", diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 29b95dbafe0b..14cb2a10bf7e 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.9-nightly-20240321.1" +version = "1.4.9-nightly-20240326.1" [lib] bench = false @@ -35,7 +35,7 @@ anyhow = "1.0.66" getrandom = { version = "0.2.10", features = ["js"] } serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" -swc_core = { version = "0.90.24", features = [ +swc_core = { version = "0.90.25", features = [ "ecma_ast_serde", "ecma_codegen", "binding_macro_wasm", diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 0b7f42757c43..6babaf397194 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.202" +version = "0.91.203" [[bin]] bench = false @@ -19,4 +19,4 @@ plugin = ["swc_cli_impl/plugin"] [dependencies] anyhow = "1.0.66" -swc_cli_impl = "0.8.22" +swc_cli_impl = "0.8.23" diff --git a/package.json b/package.json index b4e096786dc3..57b676622b79 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.4.9-nightly-20240321.1", + "version": "1.4.9-nightly-20240326.1", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 1deb88854e9a..14ff149e39f6 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.4.9-nightly-20240321.1", + "version": "1.4.9-nightly-20240326.1", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", From 2920a88cf772092b63a16d2913704e4e5ebed754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Tue, 26 Mar 2024 10:55:18 +0900 Subject: [PATCH 023/172] build(bindings/node): Update `sourcemap` (#8777) --- bindings/Cargo.lock | 2 +- bindings/binding_minifier_node/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index b62e1b1a97ca..6f48cefc798d 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -277,7 +277,7 @@ dependencies = [ "path-clean 0.1.0", "serde", "serde_json", - "sourcemap 6.4.1", + "sourcemap 8.0.0", "swc_compiler_base", "swc_config", "swc_core", diff --git a/bindings/binding_minifier_node/Cargo.toml b/bindings/binding_minifier_node/Cargo.toml index 320afc66876b..c398f27bb458 100644 --- a/bindings/binding_minifier_node/Cargo.toml +++ b/bindings/binding_minifier_node/Cargo.toml @@ -29,7 +29,7 @@ node_macro_deps = { path = "../node_macro_deps" } path-clean = "0.1" serde = { version = "1", features = ["derive"] } serde_json = { version = "1", features = ["unbounded_depth"] } -sourcemap = "6.0.0" +sourcemap = "8.0.0" tracing = { version = "0.1.37", features = ["release_max_level_info"] } tracing-chrome = "0.5.0" tracing-futures = "0.2.5" From 2377e005181a838e87325338a0068379a867b9cd Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 26 Mar 2024 01:56:57 +0000 Subject: [PATCH 024/172] chore: Bump crates --- CHANGELOG.md | 9 ++++++--- Cargo.lock | 2 +- crates/dbg-swc/Cargo.toml | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17fd30751ded..837594547e28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,12 @@ - **(common)** Debug-print spans more compactly ([#8746](https://github.com/swc-project/swc/issues/8746)) ([f2300da](https://github.com/swc-project/swc/commit/f2300dadbf8de9270f0e431dff61b7905fe08caa)) +### Build + + + +- **(bindings/node)** Update `sourcemap` ([#8777](https://github.com/swc-project/swc/issues/8777)) ([2920a88](https://github.com/swc-project/swc/commit/2920a88cf772092b63a16d2913704e4e5ebed754)) + ## [1.4.8] - 2024-03-14 ### Bug Fixes @@ -1404,9 +1410,6 @@ -- **(es/module)** Fix logic for exact matches in `jsc.paths` ([#7860](https://github.com/swc-project/swc/issues/7860)) ([52a1ee7](https://github.com/swc-project/swc/commit/52a1ee78da87da760f9923cd8cdb420da855417f)) - - - **(es/module)** Don't resolve as `node_modules` from `TscResolver` ([#7866](https://github.com/swc-project/swc/issues/7866)) ([11ebae1](https://github.com/swc-project/swc/commit/11ebae1bdd2fbd05d908fa560b81b830dddb3c56)) diff --git a/Cargo.lock b/Cargo.lock index 0a61dc78c067..04d0cdfbd283 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1065,7 +1065,7 @@ checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] name = "dbg-swc" -version = "0.91.23" +version = "0.91.24" dependencies = [ "anyhow", "clap 3.2.25", diff --git a/crates/dbg-swc/Cargo.toml b/crates/dbg-swc/Cargo.toml index 5038271c50af..745ccda66604 100644 --- a/crates/dbg-swc/Cargo.toml +++ b/crates/dbg-swc/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "Apache-2.0" name = "dbg-swc" repository = "https://github.com/kdy1/dbg-swc.git" -version = "0.91.23" +version = "0.91.24" [[bin]] bench = false From eec697f4585fdd1864ed387c02834e9b92ecb7a5 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 26 Mar 2024 02:27:03 +0000 Subject: [PATCH 025/172] chore: Publish 1.4.9-nightly-20240326.2 --- bindings/Cargo.lock | 6 +++--- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- package.json | 2 +- packages/minifier/package.json | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 6f48cefc798d..59dab10da72d 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -232,7 +232,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.4.9-nightly-20240326.1" +version = "1.4.9-nightly-20240326.2" dependencies = [ "anyhow", "getrandom", @@ -292,7 +292,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.4.9-nightly-20240326.1" +version = "1.4.9-nightly-20240326.2" dependencies = [ "anyhow", "getrandom", @@ -3082,7 +3082,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.203" +version = "0.91.204" dependencies = [ "anyhow", "swc_cli_impl", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 527b18b49d9b..7f71c4a4adfe 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.9-nightly-20240326.1" +version = "1.4.9-nightly-20240326.2" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 14cb2a10bf7e..51c75962138b 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.9-nightly-20240326.1" +version = "1.4.9-nightly-20240326.2" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 6babaf397194..f4ccae48ea5c 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.203" +version = "0.91.204" [[bin]] bench = false diff --git a/package.json b/package.json index 57b676622b79..6e3b8aa3d710 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.4.9-nightly-20240326.1", + "version": "1.4.9-nightly-20240326.2", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 14ff149e39f6..88164b6d2c90 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.4.9-nightly-20240326.1", + "version": "1.4.9-nightly-20240326.2", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", From e7bca101424ed3a3195ca6f45fd4993318cf105d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Tue, 26 Mar 2024 12:54:35 +0900 Subject: [PATCH 026/172] fix(es/minifier): Fix tpl-to-string conversion (#8778) **Related issue:** - Closes #8773 --- .../fixture/issues-8xxx/8773/input/.swcrc | 71 +++++++++++++++++++ .../tests/fixture/issues-8xxx/8773/input/1.js | 1 + .../fixture/issues-8xxx/8773/output/1.js | 1 + .../src/compress/pure/strings.rs | 1 + 4 files changed, 74 insertions(+) create mode 100644 crates/swc/tests/fixture/issues-8xxx/8773/input/.swcrc create mode 100644 crates/swc/tests/fixture/issues-8xxx/8773/input/1.js create mode 100644 crates/swc/tests/fixture/issues-8xxx/8773/output/1.js diff --git a/crates/swc/tests/fixture/issues-8xxx/8773/input/.swcrc b/crates/swc/tests/fixture/issues-8xxx/8773/input/.swcrc new file mode 100644 index 000000000000..f00898d24bff --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8773/input/.swcrc @@ -0,0 +1,71 @@ +{ + "jsc": { + "parser": { + "syntax": "ecmascript", + "jsx": false + }, + "target": "es2022", + "loose": false, + "minify": { + "compress": { + "arguments": false, + "arrows": true, + "booleans": true, + "booleans_as_integers": false, + "collapse_vars": true, + "comparisons": true, + "computed_props": true, + "conditionals": true, + "dead_code": true, + "directives": true, + "drop_console": false, + "drop_debugger": true, + "evaluate": true, + "expression": false, + "hoist_funs": false, + "hoist_props": true, + "hoist_vars": false, + "if_return": true, + "join_vars": true, + "keep_classnames": false, + "keep_fargs": true, + "keep_fnames": false, + "keep_infinity": false, + "loops": true, + "negate_iife": true, + "properties": true, + "reduce_funcs": false, + "reduce_vars": false, + "side_effects": true, + "switches": true, + "typeofs": true, + "unsafe": false, + "unsafe_arrows": false, + "unsafe_comps": false, + "unsafe_Function": false, + "unsafe_math": false, + "unsafe_symbols": false, + "unsafe_methods": false, + "unsafe_proto": false, + "unsafe_regexp": false, + "unsafe_undefined": false, + "unused": true, + "const_to_let": true, + "pristine_globals": true + }, + "mangle": { + "toplevel": false, + "keep_classnames": false, + "keep_fnames": false, + "keep_private_props": false, + "ie8": false, + "safari10": false + } + } + }, + "module": { + "type": "es6" + }, + "minify": true, + "isModule": true +} \ No newline at end of file diff --git a/crates/swc/tests/fixture/issues-8xxx/8773/input/1.js b/crates/swc/tests/fixture/issues-8xxx/8773/input/1.js new file mode 100644 index 000000000000..dd0fe2c2c0c5 --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8773/input/1.js @@ -0,0 +1 @@ +const t = "\\\\"; console.log(`${t}`) \ No newline at end of file diff --git a/crates/swc/tests/fixture/issues-8xxx/8773/output/1.js b/crates/swc/tests/fixture/issues-8xxx/8773/output/1.js new file mode 100644 index 000000000000..4b1171496d06 --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8773/output/1.js @@ -0,0 +1 @@ +console.log("\\\\"); diff --git a/crates/swc_ecma_minifier/src/compress/pure/strings.rs b/crates/swc_ecma_minifier/src/compress/pure/strings.rs index 169cc27552ac..8e177d66fcaa 100644 --- a/crates/swc_ecma_minifier/src/compress/pure/strings.rs +++ b/crates/swc_ecma_minifier/src/compress/pure/strings.rs @@ -191,6 +191,7 @@ impl Pure<'_> { Expr::Tpl(t) if t.quasis.len() == 1 && t.exprs.is_empty() => { if let Some(value) = &t.quasis[0].cooked { if value.chars().all(|c| match c { + '\\' => false, '\u{0020}'..='\u{007e}' => true, '\n' | '\r' => self.config.force_str_for_tpl, _ => false, From cd06af3ef784eccba90fed07c74c1cff6751b3dc Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 26 Mar 2024 03:56:14 +0000 Subject: [PATCH 027/172] chore: Bump crates --- CHANGELOG.md | 11 +++-------- Cargo.lock | 4 ++-- crates/swc_core/Cargo.toml | 2 +- crates/swc_ecma_minifier/Cargo.toml | 2 +- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 837594547e28..a678323550cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ - **(es/minifier)** Abort eval on `valueOf` or `toString` ([#8763](https://github.com/swc-project/swc/issues/8763)) ([9f98a70](https://github.com/swc-project/swc/commit/9f98a7026df50a548011baf6d075d00bdd77a85a)) +- **(es/minifier)** Fix tpl-to-string conversion ([#8778](https://github.com/swc-project/swc/issues/8778)) ([e7bca10](https://github.com/swc-project/swc/commit/e7bca101424ed3a3195ca6f45fd4993318cf105d)) + + - **(es/module)** Fix interop of `jsc.paths` with symlinks ([#8757](https://github.com/swc-project/swc/issues/8757)) ([e2c6db5](https://github.com/swc-project/swc/commit/e2c6db5226e9b34442ab65e02d5bbc3fa9aca65c)) @@ -1404,12 +1407,4 @@ - **(es/minifier)** Remove `mutated` and `mutation_by_call_count` ([#7890](https://github.com/swc-project/swc/issues/7890)) ([8db968a](https://github.com/swc-project/swc/commit/8db968a25d508a0d28d15d556ad121951f39ae0d)) -## [1.3.80] - 2023-08-25 - -### Bug Fixes - - - -- **(es/module)** Don't resolve as `node_modules` from `TscResolver` ([#7866](https://github.com/swc-project/swc/issues/7866)) ([11ebae1](https://github.com/swc-project/swc/commit/11ebae1bdd2fbd05d908fa560b81b830dddb3c56)) - diff --git a/Cargo.lock b/Cargo.lock index 04d0cdfbd283..140d22ce7e48 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3924,7 +3924,7 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.90.25" +version = "0.90.26" dependencies = [ "anyhow", "binding_macros", @@ -4457,7 +4457,7 @@ dependencies = [ [[package]] name = "swc_ecma_minifier" -version = "0.192.18" +version = "0.192.19" dependencies = [ "ansi_term", "anyhow", diff --git a/crates/swc_core/Cargo.toml b/crates/swc_core/Cargo.toml index c38120e0902c..923410d6e895 100644 --- a/crates/swc_core/Cargo.toml +++ b/crates/swc_core/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_core" repository = "https://github.com/swc-project/swc.git" -version = "0.90.25" +version = "0.90.26" [package.metadata.docs.rs] features = [ "allocator_node", diff --git a/crates/swc_ecma_minifier/Cargo.toml b/crates/swc_ecma_minifier/Cargo.toml index 6d9fd1e69750..0b49917ac1ca 100644 --- a/crates/swc_ecma_minifier/Cargo.toml +++ b/crates/swc_ecma_minifier/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/lists/*.json"] license = "Apache-2.0" name = "swc_ecma_minifier" repository = "https://github.com/swc-project/swc.git" -version = "0.192.18" +version = "0.192.19" [package.metadata.docs.rs] all-features = true From 53fd09cbd7f559ea65dbcbf8c77eea1fcf67b691 Mon Sep 17 00:00:00 2001 From: magic-akari Date: Tue, 26 Mar 2024 12:20:44 +0800 Subject: [PATCH 028/172] fix(es/parser): Parse `await using` in for head (#8775) **Related issue:** - Closes #8774 --- .../fixture/issues-8xxx/8774/input/.swcrc | 20 +++ .../fixture/issues-8xxx/8774/input/index.js | 21 +++ .../fixture/issues-8xxx/8774/output/index.js | 53 +++++++ ...onsInForAwaitOf(target=es2015).1.normal.js | 62 +++++++-- ...sInForAwaitOf(target=es2015).2.minified.js | 12 +- ...onsInForAwaitOf(target=es2017).1.normal.js | 32 +++-- ...sInForAwaitOf(target=es2017).2.minified.js | 10 +- ...onsInForAwaitOf(target=es2022).1.normal.js | 32 +++-- ...sInForAwaitOf(target=es2022).2.minified.js | 10 +- ...ationsInForAwaitOf(target=es5).1.normal.js | 131 ++++++++++++++++-- ...ionsInForAwaitOf(target=es5).2.minified.js | 14 +- ...onsInForAwaitOf(target=esnext).1.normal.js | 32 +++-- ...sInForAwaitOf(target=esnext).2.minified.js | 10 +- ...ationsInForOf.1(target=es2015).1.normal.js | 42 ++++-- ...ionsInForOf.1(target=es2015).2.minified.js | 12 +- ...ationsInForOf.1(target=es2017).1.normal.js | 33 +++-- ...ionsInForOf.1(target=es2017).2.minified.js | 11 +- ...ationsInForOf.1(target=es2022).1.normal.js | 33 +++-- ...ionsInForOf.1(target=es2022).2.minified.js | 11 +- ...larationsInForOf.1(target=es5).1.normal.js | 53 +++++-- ...rationsInForOf.1(target=es5).2.minified.js | 14 +- ...ationsInForOf.1(target=esnext).1.normal.js | 33 +++-- ...ionsInForOf.1(target=esnext).2.minified.js | 11 +- crates/swc_ecma_parser/src/parser/stmt.rs | 38 +++-- .../tests/strip_correctness.rs | 2 + 25 files changed, 532 insertions(+), 200 deletions(-) create mode 100644 crates/swc/tests/fixture/issues-8xxx/8774/input/.swcrc create mode 100644 crates/swc/tests/fixture/issues-8xxx/8774/input/index.js create mode 100644 crates/swc/tests/fixture/issues-8xxx/8774/output/index.js diff --git a/crates/swc/tests/fixture/issues-8xxx/8774/input/.swcrc b/crates/swc/tests/fixture/issues-8xxx/8774/input/.swcrc new file mode 100644 index 000000000000..eb9185951de6 --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8774/input/.swcrc @@ -0,0 +1,20 @@ +{ + "jsc": { + "parser": { + "explicitResourceManagement": true, + "syntax": "ecmascript", + "jsx": true, + }, + "target": "es2022", + "loose": false, + "minify": { + "compress": false, + "mangle": false + } + }, + "module": { + "type": "es6" + }, + "minify": false, + "isModule": true +} \ No newline at end of file diff --git a/crates/swc/tests/fixture/issues-8xxx/8774/input/index.js b/crates/swc/tests/fixture/issues-8xxx/8774/input/index.js new file mode 100644 index 000000000000..9a7c9ac452f0 --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8774/input/index.js @@ -0,0 +1,21 @@ +const logClean = function () { + return { + [Symbol.dispose]() { + console.log("clean in sync"); + }, + [Symbol.asyncDispose]() { + console.log("clean in async"); + }, + }; +}; + +async function foo() { + using a = logClean(); + await using b = logClean(); + for (using a of [logClean(), logClean()]) { + } + for (await using a of [logClean(), logClean()]) { + } +} + +foo(); diff --git a/crates/swc/tests/fixture/issues-8xxx/8774/output/index.js b/crates/swc/tests/fixture/issues-8xxx/8774/output/index.js new file mode 100644 index 000000000000..15e70fb63153 --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8774/output/index.js @@ -0,0 +1,53 @@ +import { _ as _dispose } from "@swc/helpers/_/_dispose"; +import { _ as _using } from "@swc/helpers/_/_using"; +const logClean = function() { + return { + [Symbol.dispose] () { + console.log("clean in sync"); + }, + [Symbol.asyncDispose] () { + console.log("clean in async"); + } + }; +}; +async function foo() { + try { + var _stack = []; + var a = _using(_stack, logClean()); + var b = _using(_stack, logClean(), true); + for (const a of [ + logClean(), + logClean() + ]){ + try { + var _stack1 = []; + {} + } catch (_) { + var _error = _; + var _hasError = true; + } finally{ + _dispose(_stack1, _error, _hasError); + } + } + for (const a of [ + logClean(), + logClean() + ]){ + try { + var _stack2 = []; + {} + } catch (_) { + var _error1 = _; + var _hasError1 = true; + } finally{ + _dispose(_stack2, _error1, _hasError1); + } + } + } catch (_) { + var _error2 = _; + var _hasError2 = true; + } finally{ + await _dispose(_stack, _error2, _hasError2); + } +} +foo(); diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2015).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2015).1.normal.js index dfc5e46c1048..1566d75ea6f5 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2015).1.normal.js @@ -1,10 +1,54 @@ //// [awaitUsingDeclarationsInForAwaitOf.ts] -//! -//! x Expected ';', got 'd1' -//! ,-[1:1] -//! 1 | async function main() { -//! 2 | for await (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) { -//! : ^^ -//! 3 | } -//! 4 | } -//! `---- +import { _ as _async_iterator } from "@swc/helpers/_/_async_iterator"; +import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator"; +import { _ as _dispose } from "@swc/helpers/_/_dispose"; +function main() { + return _main.apply(this, arguments); +} +function _main() { + _main = _async_to_generator(function*() { + { + var _iteratorAbruptCompletion = false, _didIteratorError = false, _iteratorError; + try { + for(var _iterator = _async_iterator([ + { + [Symbol.asyncDispose] () { + return _async_to_generator(function*() {})(); + } + }, + { + [Symbol.dispose] () {} + }, + null, + undefined + ]), _step; _iteratorAbruptCompletion = !(_step = yield _iterator.next()).done; _iteratorAbruptCompletion = false){ + let _value = _step.value; + const d1 = _value; + try { + var _stack = []; + {} + } catch (_) { + var _error = _; + var _hasError = true; + } finally{ + _dispose(_stack, _error, _hasError); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally{ + try { + if (_iteratorAbruptCompletion && _iterator.return != null) { + yield _iterator.return(); + } + } finally{ + if (_didIteratorError) { + throw _iteratorError; + } + } + } + } + }); + return _main.apply(this, arguments); +} diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2015).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2015).2.minified.js index dfc5e46c1048..aecf0b6155f3 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2015).2.minified.js @@ -1,10 +1,4 @@ //// [awaitUsingDeclarationsInForAwaitOf.ts] -//! -//! x Expected ';', got 'd1' -//! ,-[1:1] -//! 1 | async function main() { -//! 2 | for await (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) { -//! : ^^ -//! 3 | } -//! 4 | } -//! `---- +import "@swc/helpers/_/_async_iterator"; +import "@swc/helpers/_/_async_to_generator"; +import "@swc/helpers/_/_dispose"; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2017).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2017).1.normal.js index dfc5e46c1048..34268ec9e78b 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2017).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2017).1.normal.js @@ -1,10 +1,24 @@ //// [awaitUsingDeclarationsInForAwaitOf.ts] -//! -//! x Expected ';', got 'd1' -//! ,-[1:1] -//! 1 | async function main() { -//! 2 | for await (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) { -//! : ^^ -//! 3 | } -//! 4 | } -//! `---- +import { _ as _dispose } from "@swc/helpers/_/_dispose"; +async function main() { + for await (const d1 of [ + { + async [Symbol.asyncDispose] () {} + }, + { + [Symbol.dispose] () {} + }, + null, + undefined + ]){ + try { + var _stack = []; + {} + } catch (_) { + var _error = _; + var _hasError = true; + } finally{ + _dispose(_stack, _error, _hasError); + } + } +} diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2017).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2017).2.minified.js index dfc5e46c1048..0c372bedeea7 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2017).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2017).2.minified.js @@ -1,10 +1,2 @@ //// [awaitUsingDeclarationsInForAwaitOf.ts] -//! -//! x Expected ';', got 'd1' -//! ,-[1:1] -//! 1 | async function main() { -//! 2 | for await (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) { -//! : ^^ -//! 3 | } -//! 4 | } -//! `---- +import "@swc/helpers/_/_dispose"; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2022).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2022).1.normal.js index dfc5e46c1048..34268ec9e78b 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2022).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2022).1.normal.js @@ -1,10 +1,24 @@ //// [awaitUsingDeclarationsInForAwaitOf.ts] -//! -//! x Expected ';', got 'd1' -//! ,-[1:1] -//! 1 | async function main() { -//! 2 | for await (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) { -//! : ^^ -//! 3 | } -//! 4 | } -//! `---- +import { _ as _dispose } from "@swc/helpers/_/_dispose"; +async function main() { + for await (const d1 of [ + { + async [Symbol.asyncDispose] () {} + }, + { + [Symbol.dispose] () {} + }, + null, + undefined + ]){ + try { + var _stack = []; + {} + } catch (_) { + var _error = _; + var _hasError = true; + } finally{ + _dispose(_stack, _error, _hasError); + } + } +} diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2022).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2022).2.minified.js index dfc5e46c1048..0c372bedeea7 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2022).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2022).2.minified.js @@ -1,10 +1,2 @@ //// [awaitUsingDeclarationsInForAwaitOf.ts] -//! -//! x Expected ';', got 'd1' -//! ,-[1:1] -//! 1 | async function main() { -//! 2 | for await (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) { -//! : ^^ -//! 3 | } -//! 4 | } -//! `---- +import "@swc/helpers/_/_dispose"; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es5).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es5).1.normal.js index dfc5e46c1048..9f4cd0d7b43a 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es5).1.normal.js @@ -1,10 +1,123 @@ //// [awaitUsingDeclarationsInForAwaitOf.ts] -//! -//! x Expected ';', got 'd1' -//! ,-[1:1] -//! 1 | async function main() { -//! 2 | for await (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) { -//! : ^^ -//! 3 | } -//! 4 | } -//! `---- +import { _ as _async_iterator } from "@swc/helpers/_/_async_iterator"; +import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator"; +import { _ as _define_property } from "@swc/helpers/_/_define_property"; +import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator"; +import { _ as _dispose } from "@swc/helpers/_/_dispose"; +function main() { + return _main.apply(this, arguments); +} +function _main() { + _main = _async_to_generator(function() { + var _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, d1, _stack, _error, _hasError, err; + return _ts_generator(this, function(_state) { + switch(_state.label){ + case 0: + _iteratorAbruptCompletion = false, _didIteratorError = false; + _state.label = 1; + case 1: + _state.trys.push([ + 1, + 6, + 7, + 12 + ]); + _iterator = _async_iterator([ + _define_property({}, Symbol.asyncDispose, function() { + return _async_to_generator(function() { + return _ts_generator(this, function(_state) { + return [ + 2 + ]; + }); + })(); + }), + _define_property({}, Symbol.dispose, function() {}), + null, + undefined + ]); + _state.label = 2; + case 2: + return [ + 4, + _iterator.next() + ]; + case 3: + if (!(_iteratorAbruptCompletion = !(_step = _state.sent()).done)) return [ + 3, + 5 + ]; + _value = _step.value; + d1 = _value; + try { + _stack = []; + {} + } catch (_) { + _error = _; + _hasError = true; + } finally{ + _dispose(_stack, _error, _hasError); + } + _state.label = 4; + case 4: + _iteratorAbruptCompletion = false; + return [ + 3, + 2 + ]; + case 5: + return [ + 3, + 12 + ]; + case 6: + err = _state.sent(); + _didIteratorError = true; + _iteratorError = err; + return [ + 3, + 12 + ]; + case 7: + _state.trys.push([ + 7, + , + 10, + 11 + ]); + if (!(_iteratorAbruptCompletion && _iterator.return != null)) return [ + 3, + 9 + ]; + return [ + 4, + _iterator.return() + ]; + case 8: + _state.sent(); + _state.label = 9; + case 9: + return [ + 3, + 11 + ]; + case 10: + if (_didIteratorError) { + throw _iteratorError; + } + return [ + 7 + ]; + case 11: + return [ + 7 + ]; + case 12: + return [ + 2 + ]; + } + }); + }); + return _main.apply(this, arguments); +} diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es5).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es5).2.minified.js index dfc5e46c1048..3bf70bce4f95 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es5).2.minified.js @@ -1,10 +1,6 @@ //// [awaitUsingDeclarationsInForAwaitOf.ts] -//! -//! x Expected ';', got 'd1' -//! ,-[1:1] -//! 1 | async function main() { -//! 2 | for await (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) { -//! : ^^ -//! 3 | } -//! 4 | } -//! `---- +import "@swc/helpers/_/_async_iterator"; +import "@swc/helpers/_/_async_to_generator"; +import "@swc/helpers/_/_define_property"; +import "@swc/helpers/_/_ts_generator"; +import "@swc/helpers/_/_dispose"; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=esnext).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=esnext).1.normal.js index dfc5e46c1048..34268ec9e78b 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=esnext).1.normal.js @@ -1,10 +1,24 @@ //// [awaitUsingDeclarationsInForAwaitOf.ts] -//! -//! x Expected ';', got 'd1' -//! ,-[1:1] -//! 1 | async function main() { -//! 2 | for await (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) { -//! : ^^ -//! 3 | } -//! 4 | } -//! `---- +import { _ as _dispose } from "@swc/helpers/_/_dispose"; +async function main() { + for await (const d1 of [ + { + async [Symbol.asyncDispose] () {} + }, + { + [Symbol.dispose] () {} + }, + null, + undefined + ]){ + try { + var _stack = []; + {} + } catch (_) { + var _error = _; + var _hasError = true; + } finally{ + _dispose(_stack, _error, _hasError); + } + } +} diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=esnext).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=esnext).2.minified.js index dfc5e46c1048..0c372bedeea7 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=esnext).2.minified.js @@ -1,10 +1,2 @@ //// [awaitUsingDeclarationsInForAwaitOf.ts] -//! -//! x Expected ';', got 'd1' -//! ,-[1:1] -//! 1 | async function main() { -//! 2 | for await (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) { -//! : ^^ -//! 3 | } -//! 4 | } -//! `---- +import "@swc/helpers/_/_dispose"; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2015).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2015).1.normal.js index 6fef9708f9b9..6f241e475a63 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2015).1.normal.js @@ -1,11 +1,33 @@ //// [awaitUsingDeclarationsInForOf.1.ts] -//! -//! x Expected ';', got 'd1' -//! ,-[1:1] -//! 1 | -//! 2 | async function main() { -//! 3 | for (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) { -//! : ^^ -//! 4 | } -//! 5 | } -//! `---- +import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator"; +import { _ as _dispose } from "@swc/helpers/_/_dispose"; +function main() { + return _main.apply(this, arguments); +} +function _main() { + _main = _async_to_generator(function*() { + for (const d1 of [ + { + [Symbol.asyncDispose] () { + return _async_to_generator(function*() {})(); + } + }, + { + [Symbol.dispose] () {} + }, + null, + undefined + ]){ + try { + var _stack = []; + {} + } catch (_) { + var _error = _; + var _hasError = true; + } finally{ + _dispose(_stack, _error, _hasError); + } + } + }); + return _main.apply(this, arguments); +} diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2015).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2015).2.minified.js index 6fef9708f9b9..e56fa25f934b 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2015).2.minified.js @@ -1,11 +1,3 @@ //// [awaitUsingDeclarationsInForOf.1.ts] -//! -//! x Expected ';', got 'd1' -//! ,-[1:1] -//! 1 | -//! 2 | async function main() { -//! 3 | for (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) { -//! : ^^ -//! 4 | } -//! 5 | } -//! `---- +import "@swc/helpers/_/_async_to_generator"; +import "@swc/helpers/_/_dispose"; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2017).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2017).1.normal.js index 6fef9708f9b9..a9415bf9b803 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2017).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2017).1.normal.js @@ -1,11 +1,24 @@ //// [awaitUsingDeclarationsInForOf.1.ts] -//! -//! x Expected ';', got 'd1' -//! ,-[1:1] -//! 1 | -//! 2 | async function main() { -//! 3 | for (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) { -//! : ^^ -//! 4 | } -//! 5 | } -//! `---- +import { _ as _dispose } from "@swc/helpers/_/_dispose"; +async function main() { + for (const d1 of [ + { + async [Symbol.asyncDispose] () {} + }, + { + [Symbol.dispose] () {} + }, + null, + undefined + ]){ + try { + var _stack = []; + {} + } catch (_) { + var _error = _; + var _hasError = true; + } finally{ + _dispose(_stack, _error, _hasError); + } + } +} diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2017).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2017).2.minified.js index 6fef9708f9b9..627c0b7e321e 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2017).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2017).2.minified.js @@ -1,11 +1,2 @@ //// [awaitUsingDeclarationsInForOf.1.ts] -//! -//! x Expected ';', got 'd1' -//! ,-[1:1] -//! 1 | -//! 2 | async function main() { -//! 3 | for (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) { -//! : ^^ -//! 4 | } -//! 5 | } -//! `---- +import "@swc/helpers/_/_dispose"; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2022).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2022).1.normal.js index 6fef9708f9b9..a9415bf9b803 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2022).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2022).1.normal.js @@ -1,11 +1,24 @@ //// [awaitUsingDeclarationsInForOf.1.ts] -//! -//! x Expected ';', got 'd1' -//! ,-[1:1] -//! 1 | -//! 2 | async function main() { -//! 3 | for (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) { -//! : ^^ -//! 4 | } -//! 5 | } -//! `---- +import { _ as _dispose } from "@swc/helpers/_/_dispose"; +async function main() { + for (const d1 of [ + { + async [Symbol.asyncDispose] () {} + }, + { + [Symbol.dispose] () {} + }, + null, + undefined + ]){ + try { + var _stack = []; + {} + } catch (_) { + var _error = _; + var _hasError = true; + } finally{ + _dispose(_stack, _error, _hasError); + } + } +} diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2022).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2022).2.minified.js index 6fef9708f9b9..627c0b7e321e 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2022).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2022).2.minified.js @@ -1,11 +1,2 @@ //// [awaitUsingDeclarationsInForOf.1.ts] -//! -//! x Expected ';', got 'd1' -//! ,-[1:1] -//! 1 | -//! 2 | async function main() { -//! 3 | for (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) { -//! : ^^ -//! 4 | } -//! 5 | } -//! `---- +import "@swc/helpers/_/_dispose"; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es5).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es5).1.normal.js index 6fef9708f9b9..f23474fd18fd 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es5).1.normal.js @@ -1,11 +1,44 @@ //// [awaitUsingDeclarationsInForOf.1.ts] -//! -//! x Expected ';', got 'd1' -//! ,-[1:1] -//! 1 | -//! 2 | async function main() { -//! 3 | for (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) { -//! : ^^ -//! 4 | } -//! 5 | } -//! `---- +import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator"; +import { _ as _define_property } from "@swc/helpers/_/_define_property"; +import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator"; +import { _ as _dispose } from "@swc/helpers/_/_dispose"; +function main() { + return _main.apply(this, arguments); +} +function _main() { + _main = _async_to_generator(function() { + var _i, _iter, d1, _stack, _error, _hasError; + return _ts_generator(this, function(_state) { + for(_i = 0, _iter = [ + _define_property({}, Symbol.asyncDispose, function() { + return _async_to_generator(function() { + return _ts_generator(this, function(_state) { + return [ + 2 + ]; + }); + })(); + }), + _define_property({}, Symbol.dispose, function() {}), + null, + undefined + ]; _i < _iter.length; _i++){ + d1 = _iter[_i]; + try { + _stack = []; + {} + } catch (_) { + _error = _; + _hasError = true; + } finally{ + _dispose(_stack, _error, _hasError); + } + } + return [ + 2 + ]; + }); + }); + return _main.apply(this, arguments); +} diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es5).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es5).2.minified.js index 6fef9708f9b9..abedd580b287 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es5).2.minified.js @@ -1,11 +1,5 @@ //// [awaitUsingDeclarationsInForOf.1.ts] -//! -//! x Expected ';', got 'd1' -//! ,-[1:1] -//! 1 | -//! 2 | async function main() { -//! 3 | for (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) { -//! : ^^ -//! 4 | } -//! 5 | } -//! `---- +import "@swc/helpers/_/_async_to_generator"; +import "@swc/helpers/_/_define_property"; +import "@swc/helpers/_/_ts_generator"; +import "@swc/helpers/_/_dispose"; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=esnext).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=esnext).1.normal.js index 6fef9708f9b9..a9415bf9b803 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=esnext).1.normal.js @@ -1,11 +1,24 @@ //// [awaitUsingDeclarationsInForOf.1.ts] -//! -//! x Expected ';', got 'd1' -//! ,-[1:1] -//! 1 | -//! 2 | async function main() { -//! 3 | for (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) { -//! : ^^ -//! 4 | } -//! 5 | } -//! `---- +import { _ as _dispose } from "@swc/helpers/_/_dispose"; +async function main() { + for (const d1 of [ + { + async [Symbol.asyncDispose] () {} + }, + { + [Symbol.dispose] () {} + }, + null, + undefined + ]){ + try { + var _stack = []; + {} + } catch (_) { + var _error = _; + var _hasError = true; + } finally{ + _dispose(_stack, _error, _hasError); + } + } +} diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=esnext).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=esnext).2.minified.js index 6fef9708f9b9..627c0b7e321e 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=esnext).2.minified.js @@ -1,11 +1,2 @@ //// [awaitUsingDeclarationsInForOf.1.ts] -//! -//! x Expected ';', got 'd1' -//! ,-[1:1] -//! 1 | -//! 2 | async function main() { -//! 3 | for (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) { -//! : ^^ -//! 4 | } -//! 5 | } -//! `---- +import "@swc/helpers/_/_dispose"; diff --git a/crates/swc_ecma_parser/src/parser/stmt.rs b/crates/swc_ecma_parser/src/parser/stmt.rs index 0564527bf210..f414f795f746 100644 --- a/crates/swc_ecma_parser/src/parser/stmt.rs +++ b/crates/swc_ecma_parser/src/parser/stmt.rs @@ -1286,15 +1286,33 @@ impl<'a, I: Tokens> Parser { let start = cur_pos!(self); let init = self.include_in_expr(false).parse_for_head_prefix()?; - let is_using_decl = self.input.syntax().explicit_resource_management() - && match *init { - _ if init.is_ident_ref_to("using") => { - is!(self, BindingIdent) - && !is!(self, "of") - && (peeked_is!(self, "of") || peeked_is!(self, "in")) - } - _ => false, - }; + let mut is_using_decl = false; + let mut is_await_using_decl = false; + + if self.input.syntax().explicit_resource_management() { + // using foo + let mut maybe_using_decl = init.is_ident_ref_to("using"); + let mut maybe_await_using_decl = false; + + // await using foo + if !maybe_using_decl + && init + .as_await_expr() + .filter(|e| e.arg.is_ident_ref_to("using")) + .is_some() + { + maybe_using_decl = true; + maybe_await_using_decl = true; + } + + if maybe_using_decl + && !is!(self, "of") + && (peeked_is!(self, "of") || peeked_is!(self, "in")) + { + is_using_decl = maybe_using_decl; + is_await_using_decl = maybe_await_using_decl; + } + } if is_using_decl { let name = self.parse_binding_ident()?; @@ -1307,7 +1325,7 @@ impl<'a, I: Tokens> Parser { let pat = Box::new(UsingDecl { span: span!(self, start), - is_await: false, + is_await: is_await_using_decl, decls: vec![decl], }); diff --git a/crates/swc_ecma_transforms_typescript/tests/strip_correctness.rs b/crates/swc_ecma_transforms_typescript/tests/strip_correctness.rs index 01d7d5317659..4a6dcfc8e297 100644 --- a/crates/swc_ecma_transforms_typescript/tests/strip_correctness.rs +++ b/crates/swc_ecma_transforms_typescript/tests/strip_correctness.rs @@ -48,6 +48,8 @@ fn identity(entry: PathBuf) { "constEnum4.ts", "decoratorOnClassMethod11.ts", "elementAccessChain.3.ts", + "awaitUsingDeclarationsInForAwaitOf.ts", + "awaitUsingDeclarationsInForOf.1.ts", "usingDeclarationsInForOf.1.ts", "usingDeclarationsInForAwaitOf.ts", "tsxReactEmitNesting.tsx", From 0aafd62ccd17610fb2733660d6a679783a3159fa Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 26 Mar 2024 04:22:17 +0000 Subject: [PATCH 029/172] chore: Bump crates --- CHANGELOG.md | 3 +++ Cargo.lock | 2 +- crates/swc_ecma_parser/Cargo.toml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a678323550cf..aa893133186e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,9 @@ - **(es/parser)** Fix parsing of TypeScript type instantiation ([#8758](https://github.com/swc-project/swc/issues/8758)) ([2d6de94](https://github.com/swc-project/swc/commit/2d6de94936bec269b6a926a1f461179a97b9ac83)) +- **(es/parser)** Parse `await using` in for head ([#8775](https://github.com/swc-project/swc/issues/8775)) ([53fd09c](https://github.com/swc-project/swc/commit/53fd09cbd7f559ea65dbcbf8c77eea1fcf67b691)) + + - **(es/utils)** Mark `ident` of default fn/class as binding ([#8764](https://github.com/swc-project/swc/issues/8764)) ([f62097c](https://github.com/swc-project/swc/commit/f62097ca01a2ffdf852161d2fb040acd57e70081)) ### Features diff --git a/Cargo.lock b/Cargo.lock index 140d22ce7e48..82426148b213 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4498,7 +4498,7 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "0.143.10" +version = "0.143.11" dependencies = [ "criterion", "either", diff --git a/crates/swc_ecma_parser/Cargo.toml b/crates/swc_ecma_parser/Cargo.toml index 1bf91c00aca8..c8884c16ceb8 100644 --- a/crates/swc_ecma_parser/Cargo.toml +++ b/crates/swc_ecma_parser/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "examples/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_parser" repository = "https://github.com/swc-project/swc.git" -version = "0.143.10" +version = "0.143.11" [package.metadata.docs.rs] all-features = true From 34c0b5c8385d38cfea790753c4fd9b3f8dda6a96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 26 Mar 2024 14:41:54 +0900 Subject: [PATCH 030/172] chore: Publish `1.4.9` with `swc_core` `v0.90.26` --- bindings/Cargo.lock | 10 +++++----- bindings/binding_core_node/Cargo.toml | 2 +- bindings/binding_core_wasm/Cargo.toml | 4 ++-- bindings/binding_minifier_node/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 4 ++-- bindings/swc_cli/Cargo.toml | 2 +- package.json | 2 +- packages/minifier/package.json | 2 +- .../minifier/scripts/npm/darwin-arm64/package.json | 2 +- packages/minifier/scripts/npm/darwin-x64/package.json | 2 +- .../scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-gnu/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-musl/package.json | 2 +- .../minifier/scripts/npm/linux-x64-gnu/package.json | 2 +- .../minifier/scripts/npm/linux-x64-musl/package.json | 2 +- .../minifier/scripts/npm/win32-arm64-msvc/package.json | 2 +- .../minifier/scripts/npm/win32-ia32-msvc/package.json | 2 +- .../minifier/scripts/npm/win32-x64-msvc/package.json | 2 +- 18 files changed, 24 insertions(+), 24 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 59dab10da72d..bac8c3fc0629 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -232,7 +232,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.4.9-nightly-20240326.2" +version = "1.4.9" dependencies = [ "anyhow", "getrandom", @@ -292,7 +292,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.4.9-nightly-20240326.2" +version = "1.4.9" dependencies = [ "anyhow", "getrandom", @@ -3082,7 +3082,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.204" +version = "0.91.205" dependencies = [ "anyhow", "swc_cli_impl", @@ -3197,9 +3197,9 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.90.25" +version = "0.90.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "568ba911553909fbe9d98d4b61c352a086e68e2754912e2bddf9624ebe92a074" +checksum = "1e18fa3e847ec83b97c27226233f683b62c03a10e24f44d139465fa876a5774a" dependencies = [ "binding_macros", "swc", diff --git a/bindings/binding_core_node/Cargo.toml b/bindings/binding_core_node/Cargo.toml index d33663510f0e..9b0dcc068ac8 100644 --- a/bindings/binding_core_node/Cargo.toml +++ b/bindings/binding_core_node/Cargo.toml @@ -51,7 +51,7 @@ tracing-chrome = "0.5.0" tracing-futures = "0.2.5" tracing-subscriber = { version = "0.3.9", features = ["env-filter"] } -swc_core = { version = "0.90.25", features = [ +swc_core = { version = "0.90.26", features = [ "allocator_node", "ecma_ast", "ecma_codegen", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 7f71c4a4adfe..6327136e4182 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.9-nightly-20240326.2" +version = "1.4.9" [lib] bench = false @@ -35,7 +35,7 @@ anyhow = "1.0.66" getrandom = { version = "0.2.10", features = ["js"] } serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" -swc_core = { version = "0.90.25", features = [ +swc_core = { version = "0.90.26", features = [ "ecma_ast_serde", "ecma_codegen", "binding_macro_wasm", diff --git a/bindings/binding_minifier_node/Cargo.toml b/bindings/binding_minifier_node/Cargo.toml index c398f27bb458..f5ec24798f74 100644 --- a/bindings/binding_minifier_node/Cargo.toml +++ b/bindings/binding_minifier_node/Cargo.toml @@ -37,7 +37,7 @@ tracing-subscriber = { version = "0.3.9", features = ["env-filter"] } swc_compiler_base = { version = "0.7.19", features = ["node"] } swc_config = "0.1.12" -swc_core = { version = "0.90.25", features = [ +swc_core = { version = "0.90.26", features = [ "allocator_node", "common_concurrent", "common_sourcemap", diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 51c75962138b..145db91087ea 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.9-nightly-20240326.2" +version = "1.4.9" [lib] bench = false @@ -35,7 +35,7 @@ anyhow = "1.0.66" getrandom = { version = "0.2.10", features = ["js"] } serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" -swc_core = { version = "0.90.25", features = [ +swc_core = { version = "0.90.26", features = [ "ecma_ast_serde", "ecma_codegen", "binding_macro_wasm", diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index f4ccae48ea5c..42ea6811a0dc 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.204" +version = "0.91.205" [[bin]] bench = false diff --git a/package.json b/package.json index 6e3b8aa3d710..4471d00a8799 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.4.9-nightly-20240326.2", + "version": "1.4.9", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 88164b6d2c90..facd45b4ed8a 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.4.9-nightly-20240326.2", + "version": "1.4.9", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index edb752437850..547ebfd98987 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.4.8", + "version": "1.4.9", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index 6518a5d89809..876f9852976d 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.4.8", + "version": "1.4.9", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index 6a9b3e8b9401..0899036225ac 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.4.8", + "version": "1.4.9", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index d5d94630608d..1d0d37da73c2 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.4.8", + "version": "1.4.9", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index c16f93182074..fd195021ebee 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.4.8", + "version": "1.4.9", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index 8cdbaf2a7da0..5e0668ba789d 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.4.8", + "version": "1.4.9", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index fd3639061c78..6ade921ae4f6 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.4.8", + "version": "1.4.9", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index 0805c049aed1..02f66e212cf8 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.4.8", + "version": "1.4.9", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index 789bfb5e98d2..ba7ccf4a7ee7 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.4.8", + "version": "1.4.9", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index 890598e3c506..4c7b0c5715a1 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.4.8", + "version": "1.4.9", "os": [ "win32" ], From 7b6ba82e3d4c85c4a17ced8099dbc3ef8fc6a1ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 26 Mar 2024 14:41:56 +0900 Subject: [PATCH 031/172] chore: Update changelog --- CHANGELOG.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa893133186e..44e7f9890f9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ # Changelog -## [unreleased] +## [1.4.9] - 2024-03-26 ### Bug Fixes @@ -1389,9 +1389,6 @@ - **(es/preset-env)** Update data ([#7882](https://github.com/swc-project/swc/issues/7882)) ([a97d8b4](https://github.com/swc-project/swc/commit/a97d8b42b1f85c1f76ffadcabf6e9c85f0458d8d)) - -- **(swc-info)** Add a CLI to help issue reporting ([#7871](https://github.com/swc-project/swc/issues/7871)) ([d6952ea](https://github.com/swc-project/swc/commit/d6952ea687beb5b9aff1eae26076fa98ac94818b)) - ### Miscellaneous Tasks From c4b905225d6172507b11010da22e702e3a7ff50d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 26 Mar 2024 14:44:30 +0900 Subject: [PATCH 032/172] chore: Fix publish script --- scripts/publish.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/publish.sh b/scripts/publish.sh index aa8990568483..5930affb4553 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -13,7 +13,7 @@ yarn echo "Publishing $version with swc_core $swc_core_version" # Update swc_core -(cd ./bindings && cargo upgrade -p swc_core --recursive false) +(cd ./bindings && ../scripts/update-all-swc-crates.sh || true) # Update version From 9ef3397252dfc0d5397d7010096f0c616ad1e823 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 26 Mar 2024 14:44:42 +0900 Subject: [PATCH 033/172] chore: Publish `1.4.10` with `swc_core` `v0.90.26` --- bindings/Cargo.lock | 6 +++--- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- package.json | 2 +- packages/minifier/package.json | 2 +- packages/minifier/scripts/npm/darwin-arm64/package.json | 2 +- packages/minifier/scripts/npm/darwin-x64/package.json | 2 +- .../minifier/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- packages/minifier/scripts/npm/linux-arm64-gnu/package.json | 2 +- packages/minifier/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-musl/package.json | 2 +- packages/minifier/scripts/npm/win32-arm64-msvc/package.json | 2 +- packages/minifier/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/minifier/scripts/npm/win32-x64-msvc/package.json | 2 +- 16 files changed, 18 insertions(+), 18 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index bac8c3fc0629..5bf68f865cf7 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -232,7 +232,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.4.9" +version = "1.4.10" dependencies = [ "anyhow", "getrandom", @@ -292,7 +292,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.4.9" +version = "1.4.10" dependencies = [ "anyhow", "getrandom", @@ -3082,7 +3082,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.205" +version = "0.91.206" dependencies = [ "anyhow", "swc_cli_impl", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 6327136e4182..fbf0c6f272f5 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.9" +version = "1.4.10" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 145db91087ea..639e41ac6b01 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.9" +version = "1.4.10" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 42ea6811a0dc..21d979b931f7 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.205" +version = "0.91.206" [[bin]] bench = false diff --git a/package.json b/package.json index 4471d00a8799..13a2814f2f88 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.4.9", + "version": "1.4.10", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/package.json b/packages/minifier/package.json index facd45b4ed8a..330a958171fc 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.4.9", + "version": "1.4.10", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index 547ebfd98987..5acd4996d89a 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.4.9", + "version": "1.4.10", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index 876f9852976d..c8a17c543c30 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.4.9", + "version": "1.4.10", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index 0899036225ac..dde1e360afbf 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.4.9", + "version": "1.4.10", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index 1d0d37da73c2..681e5ccf12e3 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.4.9", + "version": "1.4.10", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index fd195021ebee..b181dd4b15fb 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.4.9", + "version": "1.4.10", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index 5e0668ba789d..6431aebccb01 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.4.9", + "version": "1.4.10", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index 6ade921ae4f6..2fd06507b696 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.4.9", + "version": "1.4.10", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index 02f66e212cf8..10749b77e7ae 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.4.9", + "version": "1.4.10", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index ba7ccf4a7ee7..5b14519da154 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.4.9", + "version": "1.4.10", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index 4c7b0c5715a1..ea87934f6336 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.4.9", + "version": "1.4.10", "os": [ "win32" ], From e507a18f7dfc4172b98781537a22c423e134a783 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 26 Mar 2024 14:44:43 +0900 Subject: [PATCH 034/172] chore: Update changelog --- CHANGELOG.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44e7f9890f9f..2179cf03a4f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1374,16 +1374,10 @@ - **(es/module)** Don't create absolute paths for `jsc.paths` on Windows ([#7892](https://github.com/swc-project/swc/issues/7892)) ([5fbc251](https://github.com/swc-project/swc/commit/5fbc251db1cc1f7973ba780a6c4fc1cdce5ef40d)) - -- **(swc-info)** Use correct path while getting local package versions ([#7872](https://github.com/swc-project/swc/issues/7872)) ([67afaf1](https://github.com/swc-project/swc/commit/67afaf1f2db087518ac990c71de896c8e5e2a051)) - ### Features -- **(es)** Add an option to disable builtin transforms ([#7873](https://github.com/swc-project/swc/issues/7873)) ([71d01ec](https://github.com/swc-project/swc/commit/71d01ec12772c2854a47947deceb6d1cab141289)) - - - **(es/ast)** Support import attributes proposal ([#7868](https://github.com/swc-project/swc/issues/7868)) ([4d3fcb8](https://github.com/swc-project/swc/commit/4d3fcb86e4843cf323a471537cc1ab3a26d054b1)) From 2b8aa63bd0a3aa8e976ce12ca44b972a5c76cff5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 26 Mar 2024 14:46:44 +0900 Subject: [PATCH 035/172] chore: Fix update script --- scripts/update-all-swc-crates.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/update-all-swc-crates.sh b/scripts/update-all-swc-crates.sh index 32fe55be1fae..0307f4e1367d 100755 --- a/scripts/update-all-swc-crates.sh +++ b/scripts/update-all-swc-crates.sh @@ -6,6 +6,14 @@ echo "Listing all swc crates" crates=$(cargo metadata --format-version=1 | jq '.packages .[] | select(.repository == "https://github.com/swc-project/swc.git" or .repository == "https://github.com/swc-project/plugins.git") | .name') +command="cargo update" +for crate in $crates; do + command="$command -p $crate" +done + +echo "Running: $command" +eval $command + command="cargo upgrade --incompatible --recursive false" for crate in $crates; do command="$command -p $crate" From 4936c3772239214b229e88ace3ead6239befab1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 26 Mar 2024 14:47:03 +0900 Subject: [PATCH 036/172] chore: Publish `1.4.11` with `swc_core` `v0.90.26` --- bindings/Cargo.lock | 64 +++++++------------ bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- package.json | 2 +- packages/minifier/package.json | 2 +- .../scripts/npm/darwin-arm64/package.json | 2 +- .../scripts/npm/darwin-x64/package.json | 2 +- .../npm/linux-arm-gnueabihf/package.json | 2 +- .../scripts/npm/linux-arm64-gnu/package.json | 2 +- .../scripts/npm/linux-arm64-musl/package.json | 2 +- .../scripts/npm/linux-x64-gnu/package.json | 2 +- .../scripts/npm/linux-x64-musl/package.json | 2 +- .../scripts/npm/win32-arm64-msvc/package.json | 2 +- .../scripts/npm/win32-ia32-msvc/package.json | 2 +- .../scripts/npm/win32-x64-msvc/package.json | 2 +- 16 files changed, 39 insertions(+), 55 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 5bf68f865cf7..4560c833d62b 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -232,7 +232,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.4.10" +version = "1.4.11" dependencies = [ "anyhow", "getrandom", @@ -277,7 +277,7 @@ dependencies = [ "path-clean 0.1.0", "serde", "serde_json", - "sourcemap 8.0.0", + "sourcemap", "swc_compiler_base", "swc_config", "swc_core", @@ -292,7 +292,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.4.10" +version = "1.4.11" dependencies = [ "anyhow", "getrandom", @@ -2798,22 +2798,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "sourcemap" -version = "6.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4cbf65ca7dc576cf50e21f8d0712d96d4fcfd797389744b7b222a85cdf5bd90" -dependencies = [ - "data-encoding", - "debugid", - "if_chain", - "rustc_version 0.2.3", - "serde", - "serde_json", - "unicode-id", - "url", -] - [[package]] name = "sourcemap" version = "8.0.0" @@ -2969,9 +2953,9 @@ dependencies = [ [[package]] name = "swc" -version = "0.273.22" +version = "0.273.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48a68d147a2270bbe2164ee4060d0176590a1035f54d82f7252d16a15e4154a9" +checksum = "1a3c87ffee4d9ed775e1c0f4f3865feee7c72f2b62ab58ae7a02c70dc5d7cd11" dependencies = [ "anyhow", "base64", @@ -2989,7 +2973,7 @@ dependencies = [ "rustc-hash", "serde", "serde_json", - "sourcemap 6.4.1", + "sourcemap", "swc_atoms", "swc_cached", "swc_common", @@ -3082,7 +3066,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.206" +version = "0.91.207" dependencies = [ "anyhow", "swc_cli_impl", @@ -3103,7 +3087,7 @@ dependencies = [ "relative-path", "serde", "serde_json", - "sourcemap 8.0.0", + "sourcemap", "swc_core", "tracing", "tracing-chrome", @@ -3114,9 +3098,9 @@ dependencies = [ [[package]] name = "swc_common" -version = "0.33.20" +version = "0.33.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317d2fcdbb1bc9ecfd0bfc67468d675a5159a6fd1863abf41c8c5b7b7adcab03" +checksum = "89598a0dfe7311750e6fad8464cafcec8ee010c649c2e04531b25e32362fdec7" dependencies = [ "ahash 0.8.8", "anyhow", @@ -3134,7 +3118,7 @@ dependencies = [ "rustc-hash", "serde", "siphasher", - "sourcemap 6.4.1", + "sourcemap", "swc_atoms", "swc_eq_ignore_macros", "swc_visit", @@ -3156,7 +3140,7 @@ dependencies = [ "once_cell", "pathdiff", "serde", - "sourcemap 8.0.0", + "sourcemap", "swc_atoms", "swc_common", "swc_config", @@ -3178,7 +3162,7 @@ dependencies = [ "indexmap 2.1.0", "serde", "serde_json", - "sourcemap 8.0.0", + "sourcemap", "swc_cached", "swc_config_macro", ] @@ -3244,16 +3228,16 @@ dependencies = [ [[package]] name = "swc_ecma_codegen" -version = "0.148.12" +version = "0.148.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2afcce205914b8451880fc5ef63dae9bac3dc7b71917921ede64f8e7fd8447a1" +checksum = "c9ae864cb69934f8753b9cbbad803a0ee1b0759f5b87c219db0a12e8d03fa86a" dependencies = [ "memchr", "num-bigint", "once_cell", "rustc-hash", "serde", - "sourcemap 6.4.1", + "sourcemap", "swc_atoms", "swc_common", "swc_ecma_ast", @@ -3525,9 +3509,9 @@ dependencies = [ [[package]] name = "swc_ecma_minifier" -version = "0.192.18" +version = "0.192.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624b38cf23679ab41ca0e47c37f49617275cb15ad7bbaa66a307c42e67ebc1d5" +checksum = "e3acd953ba8fd935428003d015cc119ddb31a510537bf2ef06294c52bacffa67" dependencies = [ "arrayvec", "indexmap 2.1.0", @@ -3559,9 +3543,9 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "0.143.10" +version = "0.143.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b919bb9ae5e1c8c54fb109f7e94b4a00185bd255c1238ba823e8102601e2133" +checksum = "192482230498a24c2e7c9c580ba334a80dc43b3899366e54aa548f8d7b0f12cd" dependencies = [ "either", "new_debug_unreachable", @@ -3606,9 +3590,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms" -version = "0.229.17" +version = "0.229.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52b22e7877d623332da5f2a93c204e808091ab2da1c060f794eaea66506fb530" +checksum = "8eb90c2d122976f3e32bf41a2bf710f01e51ef34ef50108992b185cc1cc53e28" dependencies = [ "swc_atoms", "swc_common", @@ -3844,9 +3828,9 @@ dependencies = [ [[package]] name = "swc_ecma_utils" -version = "0.127.14" +version = "0.127.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc9c6ad70038b770d844fdfc20fd970d66ccebb1edc91804c8a9adaa689d4e39" +checksum = "68f83263f449935d33f86b8ab17c88a13bc175a87a742752ebcc94be2006ab25" dependencies = [ "indexmap 2.1.0", "num_cpus", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index fbf0c6f272f5..67a97fee437b 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.10" +version = "1.4.11" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 639e41ac6b01..860f69983097 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.10" +version = "1.4.11" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 21d979b931f7..b8a37d795b93 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.206" +version = "0.91.207" [[bin]] bench = false diff --git a/package.json b/package.json index 13a2814f2f88..286223136c5b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.4.10", + "version": "1.4.11", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 330a958171fc..7eb0bc4b852f 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.4.10", + "version": "1.4.11", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index 5acd4996d89a..9863249b5334 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.4.10", + "version": "1.4.11", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index c8a17c543c30..a28e705414dc 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.4.10", + "version": "1.4.11", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index dde1e360afbf..a0e7817ee67b 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.4.10", + "version": "1.4.11", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index 681e5ccf12e3..b01320193f7d 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.4.10", + "version": "1.4.11", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index b181dd4b15fb..c9ff86965747 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.4.10", + "version": "1.4.11", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index 6431aebccb01..64405650115c 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.4.10", + "version": "1.4.11", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index 2fd06507b696..8869a9d20d9c 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.4.10", + "version": "1.4.11", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index 10749b77e7ae..5da275fae18f 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.4.10", + "version": "1.4.11", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index 5b14519da154..99051871af61 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.4.10", + "version": "1.4.11", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index ea87934f6336..d8b4c9961839 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.4.10", + "version": "1.4.11", "os": [ "win32" ], From 5a619ebf0ade7e9c16720c691ebc1e5ec950a520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 26 Mar 2024 14:47:04 +0900 Subject: [PATCH 037/172] chore: Update changelog --- CHANGELOG.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2179cf03a4f6..5885f450c8a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1360,9 +1360,6 @@ - **(es/codegen)** Fix placing of comments of yield arguments ([#7858](https://github.com/swc-project/swc/issues/7858)) ([122d14c](https://github.com/swc-project/swc/commit/122d14c0d306d7c437f1ef0f6f375634ff5d7d1a)) -- **(es/compat)** Apply transforms for explicit resource management ([#7881](https://github.com/swc-project/swc/issues/7881)) ([3180e68](https://github.com/swc-project/swc/commit/3180e68bf27fb95ff00bd24677ae7e96b3aa6c62)) - - - **(es/compat)** Make `SwitchCase` handler of `block-scoping` stateless ([#7888](https://github.com/swc-project/swc/issues/7888)) ([4b33d41](https://github.com/swc-project/swc/commit/4b33d41fabf841dfc31c6f44d94e4651239ab667)) From 4961bb055df9925da97279819d2fdf740b4b3d92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Thu, 28 Mar 2024 11:42:07 +0900 Subject: [PATCH 038/172] fix(es/module): Fix `jsc.paths` with `resolveFully` (#8784) **Related issue:** - Closes #8782 --- .../fixture/issues-7xxx/7829/1/input/.swcrc | 3 ++- .../fixture/issues-7xxx/7829/1/output/1.js | 2 +- .../fixture/issues-7xxx/7829/2/input/.swcrc | 3 ++- .../issues-7xxx/7898/1/output/index.ts | 2 +- .../fixture/issues-8xxx/8782/input/.swcrc | 23 +++++++++++++++++++ .../8782/input/libs/common/main.js | 1 + .../issues-8xxx/8782/input/libs/math/index.js | 9 ++++++++ .../8782/input/libs/math/src/foo.js | 5 ++++ .../8782/input/projects/api/main.ts | 6 +++++ .../8782/input/projects/api/models.js | 3 +++ .../8782/output/libs/common/main.js | 1 + .../8782/output/libs/math/index.js | 6 +++++ .../8782/output/libs/math/src/foo.js | 4 ++++ .../8782/output/projects/api/main.ts | 5 ++++ .../8782/output/projects/api/models.js | 3 +++ crates/swc_ecma_loader/src/resolvers/tsc.rs | 19 ++++++--------- crates/swc_ecma_loader/tests/tsc_resolver.rs | 2 +- .../tests/path_node.rs | 2 +- .../tests/paths/issue-7417/output/index.ts | 2 +- .../__tests__/transform/issue_4730_test.mjs | 1 + 20 files changed, 83 insertions(+), 19 deletions(-) create mode 100644 crates/swc/tests/fixture/issues-8xxx/8782/input/.swcrc create mode 100644 crates/swc/tests/fixture/issues-8xxx/8782/input/libs/common/main.js create mode 100644 crates/swc/tests/fixture/issues-8xxx/8782/input/libs/math/index.js create mode 100644 crates/swc/tests/fixture/issues-8xxx/8782/input/libs/math/src/foo.js create mode 100644 crates/swc/tests/fixture/issues-8xxx/8782/input/projects/api/main.ts create mode 100644 crates/swc/tests/fixture/issues-8xxx/8782/input/projects/api/models.js create mode 100644 crates/swc/tests/fixture/issues-8xxx/8782/output/libs/common/main.js create mode 100644 crates/swc/tests/fixture/issues-8xxx/8782/output/libs/math/index.js create mode 100644 crates/swc/tests/fixture/issues-8xxx/8782/output/libs/math/src/foo.js create mode 100644 crates/swc/tests/fixture/issues-8xxx/8782/output/projects/api/main.ts create mode 100644 crates/swc/tests/fixture/issues-8xxx/8782/output/projects/api/models.js diff --git a/crates/swc/tests/fixture/issues-7xxx/7829/1/input/.swcrc b/crates/swc/tests/fixture/issues-7xxx/7829/1/input/.swcrc index d4cbce916e3b..ba1eaadb2de1 100644 --- a/crates/swc/tests/fixture/issues-7xxx/7829/1/input/.swcrc +++ b/crates/swc/tests/fixture/issues-7xxx/7829/1/input/.swcrc @@ -1,6 +1,7 @@ { "module": { - "type": "es6" + "type": "es6", + "resolveFully": true }, "jsc": { "baseUrl": ".", diff --git a/crates/swc/tests/fixture/issues-7xxx/7829/1/output/1.js b/crates/swc/tests/fixture/issues-7xxx/7829/1/output/1.js index f11774c35786..f8527ad825f5 100644 --- a/crates/swc/tests/fixture/issues-7xxx/7829/1/output/1.js +++ b/crates/swc/tests/fixture/issues-7xxx/7829/1/output/1.js @@ -1,2 +1,2 @@ -import { fn } from "./libs/pkg/src/index.ts"; +import { fn } from "./libs/pkg/src/index.js"; console.log(fn); diff --git a/crates/swc/tests/fixture/issues-7xxx/7829/2/input/.swcrc b/crates/swc/tests/fixture/issues-7xxx/7829/2/input/.swcrc index a7f2c9c9cadc..5e0a285b2b5a 100644 --- a/crates/swc/tests/fixture/issues-7xxx/7829/2/input/.swcrc +++ b/crates/swc/tests/fixture/issues-7xxx/7829/2/input/.swcrc @@ -1,6 +1,7 @@ { "module": { - "type": "es6" + "type": "es6", + "resolveFully": true }, "jsc": { "baseUrl": ".", diff --git a/crates/swc/tests/fixture/issues-7xxx/7898/1/output/index.ts b/crates/swc/tests/fixture/issues-7xxx/7898/1/output/index.ts index e080b6248a43..5ac4603ec675 100644 --- a/crates/swc/tests/fixture/issues-7xxx/7898/1/output/index.ts +++ b/crates/swc/tests/fixture/issues-7xxx/7898/1/output/index.ts @@ -2,5 +2,5 @@ Object.defineProperty(exports, "__esModule", { value: true }); -const _a = require("./packages/a/src/index.ts"); +const _a = require("./packages/a/src/index.js"); console.log(`${(0, _a.displayA)()}`); diff --git a/crates/swc/tests/fixture/issues-8xxx/8782/input/.swcrc b/crates/swc/tests/fixture/issues-8xxx/8782/input/.swcrc new file mode 100644 index 000000000000..b5fe835cdee5 --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8782/input/.swcrc @@ -0,0 +1,23 @@ +{ + "$schema": "https://json.schemastore.org/swcrc", + "isModule": true, + "jsc": { + "target": "es2022", + "keepClassNames": true, + "loose": false, + "baseUrl": ".", + "paths": { + "@foo/math": ["libs/math/index.js"], + "@foo/math/*": ["libs/math/*"], + "@foo/common": ["libs/common/main.js"] + }, + "parser": { + "syntax": "typescript" + } + }, + "minify": false, + "module": { + "type": "es6", + "resolveFully": true + } +} diff --git a/crates/swc/tests/fixture/issues-8xxx/8782/input/libs/common/main.js b/crates/swc/tests/fixture/issues-8xxx/8782/input/libs/common/main.js new file mode 100644 index 000000000000..6454def9fa4c --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8782/input/libs/common/main.js @@ -0,0 +1 @@ +export const commonStuff = 'common string'; diff --git a/crates/swc/tests/fixture/issues-8xxx/8782/input/libs/math/index.js b/crates/swc/tests/fixture/issues-8xxx/8782/input/libs/math/index.js new file mode 100644 index 000000000000..acbaf9c00d48 --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8782/input/libs/math/index.js @@ -0,0 +1,9 @@ +import { models } from "../../projects/api/models.js"; + +console.log(models); + +export { foo } from "./src/foo.js"; + +export const sum = function(a, b) { + return a + b; +}; diff --git a/crates/swc/tests/fixture/issues-8xxx/8782/input/libs/math/src/foo.js b/crates/swc/tests/fixture/issues-8xxx/8782/input/libs/math/src/foo.js new file mode 100644 index 000000000000..ad5d062e4015 --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8782/input/libs/math/src/foo.js @@ -0,0 +1,5 @@ +// import { commonStuff } from '../../common/index.js'; +import { commonStuff } from '@foo/common'; +console.log(commonStuff) + +export const foo = 'foo'; diff --git a/crates/swc/tests/fixture/issues-8xxx/8782/input/projects/api/main.ts b/crates/swc/tests/fixture/issues-8xxx/8782/input/projects/api/main.ts new file mode 100644 index 000000000000..b1e98e081909 --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8782/input/projects/api/main.ts @@ -0,0 +1,6 @@ +import { sum } from "@foo/math"; +// import { foo } from "@foo/math/src/foo"; +import { foo } from "@foo/math/src/foo.js"; +console.log(foo); + +console.log(sum(1, 2)); diff --git a/crates/swc/tests/fixture/issues-8xxx/8782/input/projects/api/models.js b/crates/swc/tests/fixture/issues-8xxx/8782/input/projects/api/models.js new file mode 100644 index 000000000000..c4987de551a8 --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8782/input/projects/api/models.js @@ -0,0 +1,3 @@ +export const models = { + foo: 'foo' +} diff --git a/crates/swc/tests/fixture/issues-8xxx/8782/output/libs/common/main.js b/crates/swc/tests/fixture/issues-8xxx/8782/output/libs/common/main.js new file mode 100644 index 000000000000..6454def9fa4c --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8782/output/libs/common/main.js @@ -0,0 +1 @@ +export const commonStuff = 'common string'; diff --git a/crates/swc/tests/fixture/issues-8xxx/8782/output/libs/math/index.js b/crates/swc/tests/fixture/issues-8xxx/8782/output/libs/math/index.js new file mode 100644 index 000000000000..dfe8dba5cd39 --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8782/output/libs/math/index.js @@ -0,0 +1,6 @@ +import { models } from "../../projects/api/models.js"; +console.log(models); +export { foo } from "./src/foo.js"; +export const sum = function(a, b) { + return a + b; +}; diff --git a/crates/swc/tests/fixture/issues-8xxx/8782/output/libs/math/src/foo.js b/crates/swc/tests/fixture/issues-8xxx/8782/output/libs/math/src/foo.js new file mode 100644 index 000000000000..576185a3f257 --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8782/output/libs/math/src/foo.js @@ -0,0 +1,4 @@ +// import { commonStuff } from '../../common/index.js'; +import { commonStuff } from "../../common/main.js"; +console.log(commonStuff); +export const foo = 'foo'; diff --git a/crates/swc/tests/fixture/issues-8xxx/8782/output/projects/api/main.ts b/crates/swc/tests/fixture/issues-8xxx/8782/output/projects/api/main.ts new file mode 100644 index 000000000000..e3ca8bf4737f --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8782/output/projects/api/main.ts @@ -0,0 +1,5 @@ +import { sum } from "../../libs/math/index.js"; +// import { foo } from "@foo/math/src/foo"; +import { foo } from "../../libs/math/src/foo.js"; +console.log(foo); +console.log(sum(1, 2)); diff --git a/crates/swc/tests/fixture/issues-8xxx/8782/output/projects/api/models.js b/crates/swc/tests/fixture/issues-8xxx/8782/output/projects/api/models.js new file mode 100644 index 000000000000..1c5d906f61ae --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8782/output/projects/api/models.js @@ -0,0 +1,3 @@ +export const models = { + foo: 'foo' +}; diff --git a/crates/swc_ecma_loader/src/resolvers/tsc.rs b/crates/swc_ecma_loader/src/resolvers/tsc.rs index aaf0c035630d..293b7e578fd7 100644 --- a/crates/swc_ecma_loader/src/resolvers/tsc.rs +++ b/crates/swc_ecma_loader/src/resolvers/tsc.rs @@ -289,7 +289,10 @@ where let slug = to[0] .split([std::path::MAIN_SEPARATOR, '/']) .last() - .map(|v| v.into()); + .filter(|&slug| slug != "index.ts" && slug != "index.tsx") + .map(|v| v.split_once('.').map(|v| v.0).unwrap_or(v)) + .map(From::from); + if tp.is_absolute() { return Ok(Resolution { filename: FileName::Real(tp.into()), @@ -297,18 +300,10 @@ where }); } - if let Ok(res) = self.resolve(&self.base_url_filename, &format!("./{}", &to[0])) + if let Ok(res) = self + .invoke_inner_resolver(&self.base_url_filename, &format!("./{}", &to[0])) { - return Ok(Resolution { - slug: match &res.filename { - FileName::Real(p) => p - .file_stem() - .filter(|&s| s != "index") - .map(|v| v.to_string_lossy().into()), - _ => None, - }, - ..res - }); + return Ok(Resolution { slug, ..res }); } return Ok(Resolution { diff --git a/crates/swc_ecma_loader/tests/tsc_resolver.rs b/crates/swc_ecma_loader/tests/tsc_resolver.rs index a8cebfa6a926..b806707ce1f8 100644 --- a/crates/swc_ecma_loader/tests/tsc_resolver.rs +++ b/crates/swc_ecma_loader/tests/tsc_resolver.rs @@ -41,7 +41,7 @@ fn exact() { resolved, Resolution { filename: FileName::Custom("success".into()), - slug: None + slug: Some("jquery".into()) } ); } diff --git a/crates/swc_ecma_transforms_module/tests/path_node.rs b/crates/swc_ecma_transforms_module/tests/path_node.rs index 62c3e6298db7..10fcf48cf06b 100644 --- a/crates/swc_ecma_transforms_module/tests/path_node.rs +++ b/crates/swc_ecma_transforms_module/tests/path_node.rs @@ -99,7 +99,7 @@ fn paths_resolver(base_dir: &Path, rules: Vec<(String, Vec)>) -> JscPath ), swc_ecma_transforms_module::path::Config { base_dir: Some(base_dir), - resolve_fully: false, + resolve_fully: true, }, ) } diff --git a/crates/swc_ecma_transforms_module/tests/paths/issue-7417/output/index.ts b/crates/swc_ecma_transforms_module/tests/paths/issue-7417/output/index.ts index d2b5aa4bb414..bd56226a5a2e 100644 --- a/crates/swc_ecma_transforms_module/tests/paths/issue-7417/output/index.ts +++ b/crates/swc_ecma_transforms_module/tests/paths/issue-7417/output/index.ts @@ -1,4 +1,4 @@ -import o from "."; +import o from "./index.js"; export default function bar() { console.log(o); } diff --git a/node-swc/__tests__/transform/issue_4730_test.mjs b/node-swc/__tests__/transform/issue_4730_test.mjs index 825e6cb0cab2..a9c6e20ef43f 100644 --- a/node-swc/__tests__/transform/issue_4730_test.mjs +++ b/node-swc/__tests__/transform/issue_4730_test.mjs @@ -30,6 +30,7 @@ it("should work", async () => { }, module: { type: "commonjs", + resolveFully: true, }, }); expect(code).toMatchInlineSnapshot(` From 85c3c3a3b14d6a5431f95e06183c0a29dc904f90 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Thu, 28 Mar 2024 02:43:49 +0000 Subject: [PATCH 039/172] chore: Bump crates --- CHANGELOG.md | 11 ++++++++--- Cargo.lock | 2 +- crates/swc_ecma_loader/Cargo.toml | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5885f450c8a0..e8c70a371904 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,12 @@ # Changelog +## [unreleased] + +### Bug Fixes + + + +- **(es/module)** Fix `jsc.paths` with `resolveFully` ([#8784](https://github.com/swc-project/swc/issues/8784)) ([4961bb0](https://github.com/swc-project/swc/commit/4961bb055df9925da97279819d2fdf740b4b3d92)) + ## [1.4.9] - 2024-03-26 ### Bug Fixes @@ -1357,9 +1365,6 @@ -- **(es/codegen)** Fix placing of comments of yield arguments ([#7858](https://github.com/swc-project/swc/issues/7858)) ([122d14c](https://github.com/swc-project/swc/commit/122d14c0d306d7c437f1ef0f6f375634ff5d7d1a)) - - - **(es/compat)** Make `SwitchCase` handler of `block-scoping` stateless ([#7888](https://github.com/swc-project/swc/issues/7888)) ([4b33d41](https://github.com/swc-project/swc/commit/4b33d41fabf841dfc31c6f44d94e4651239ab667)) diff --git a/Cargo.lock b/Cargo.lock index 82426148b213..a0b53deb723c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4436,7 +4436,7 @@ dependencies = [ [[package]] name = "swc_ecma_loader" -version = "0.45.23" +version = "0.45.24" dependencies = [ "anyhow", "dashmap", diff --git a/crates/swc_ecma_loader/Cargo.toml b/crates/swc_ecma_loader/Cargo.toml index 1a45cafc7c4f..9c902b177ec6 100644 --- a/crates/swc_ecma_loader/Cargo.toml +++ b/crates/swc_ecma_loader/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_loader" repository = "https://github.com/swc-project/swc.git" -version = "0.45.23" +version = "0.45.24" [package.metadata.docs.rs] all-features = true From ecd878c53134fc9f24644a1f0aad6c8f735160c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Thu, 28 Mar 2024 12:47:59 +0900 Subject: [PATCH 040/172] chore: Fix crate update script --- scripts/update-all-swc-crates.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/update-all-swc-crates.sh b/scripts/update-all-swc-crates.sh index 0307f4e1367d..6de4b0203b4f 100755 --- a/scripts/update-all-swc-crates.sh +++ b/scripts/update-all-swc-crates.sh @@ -4,18 +4,22 @@ set -eu echo "Listing all swc crates" -crates=$(cargo metadata --format-version=1 | jq '.packages .[] | select(.repository == "https://github.com/swc-project/swc.git" or .repository == "https://github.com/swc-project/plugins.git") | .name') +swc_crates=$(cargo metadata --format-version=1 | jq '.packages .[] | select(.repository == "https://github.com/swc-project/swc.git" or .repository == "https://github.com/swc-project/plugins.git") | .name' -r) command="cargo update" -for crate in $crates; do +for crate in $swc_crates; do command="$command -p $crate" done echo "Running: $command" eval $command +all_direct_deps=$(cargo metadata --format-version 1 | jq -r '.packages[] | select(.source == null) | .dependencies .[] .name' -r) + +direct_swc_deps=$(comm -12 <(echo "$swc_crates" | sort) <(echo "$all_direct_deps" | sort)) + command="cargo upgrade --incompatible --recursive false" -for crate in $crates; do +for crate in $direct_swc_deps; do command="$command -p $crate" done From 00647ce227cab159e2bc4abb89b851671148d65b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Thu, 28 Mar 2024 15:27:11 +0900 Subject: [PATCH 041/172] chore: Publish crates --- CHANGELOG.md | 3 --- Cargo.lock | 2 +- crates/swc_ecma_transforms_testing/Cargo.toml | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8c70a371904..da8590edfb76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1380,9 +1380,6 @@ -- **(es/ast)** Support import attributes proposal ([#7868](https://github.com/swc-project/swc/issues/7868)) ([4d3fcb8](https://github.com/swc-project/swc/commit/4d3fcb86e4843cf323a471537cc1ab3a26d054b1)) - - - **(es/preset-env)** Update data ([#7882](https://github.com/swc-project/swc/issues/7882)) ([a97d8b4](https://github.com/swc-project/swc/commit/a97d8b42b1f85c1f76ffadcabf6e9c85f0458d8d)) ### Miscellaneous Tasks diff --git a/Cargo.lock b/Cargo.lock index a0b53deb723c..06c509fdc419 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4814,7 +4814,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_testing" -version = "0.140.17" +version = "0.140.18" dependencies = [ "ansi_term", "anyhow", diff --git a/crates/swc_ecma_transforms_testing/Cargo.toml b/crates/swc_ecma_transforms_testing/Cargo.toml index b886e87caf18..83a8c86284ab 100644 --- a/crates/swc_ecma_transforms_testing/Cargo.toml +++ b/crates/swc_ecma_transforms_testing/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_transforms_testing" repository = "https://github.com/swc-project/swc.git" -version = "0.140.17" +version = "0.140.18" [lib] bench = false From b798632a829eca950ede021d3e2db57f8649523c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Thu, 28 Mar 2024 15:29:59 +0900 Subject: [PATCH 042/172] chore: Use ` --all-features` from update script --- scripts/update-all-swc-crates.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/update-all-swc-crates.sh b/scripts/update-all-swc-crates.sh index 6de4b0203b4f..4f0e7c99d2e4 100755 --- a/scripts/update-all-swc-crates.sh +++ b/scripts/update-all-swc-crates.sh @@ -4,7 +4,7 @@ set -eu echo "Listing all swc crates" -swc_crates=$(cargo metadata --format-version=1 | jq '.packages .[] | select(.repository == "https://github.com/swc-project/swc.git" or .repository == "https://github.com/swc-project/plugins.git") | .name' -r) +swc_crates=$(cargo metadata --format-version=1 --all-features | jq '.packages .[] | select(.repository == "https://github.com/swc-project/swc.git" or .repository == "https://github.com/swc-project/plugins.git") | .name' -r) command="cargo update" for crate in $swc_crates; do @@ -14,7 +14,7 @@ done echo "Running: $command" eval $command -all_direct_deps=$(cargo metadata --format-version 1 | jq -r '.packages[] | select(.source == null) | .dependencies .[] .name' -r) +all_direct_deps=$(cargo metadata --format-version=1 --all-features | jq -r '.packages[] | select(.source == null) | .dependencies .[] .name' -r) direct_swc_deps=$(comm -12 <(echo "$swc_crates" | sort) <(echo "$all_direct_deps" | sort)) From 263ce6e22bd4dbba0323099f256fb062b8e644a2 Mon Sep 17 00:00:00 2001 From: sschen86 Date: Thu, 28 Mar 2024 15:44:55 +0800 Subject: [PATCH 043/172] fix(es/helpers): Fix metadata of decorators being `undefined` (#8768) --- packages/helpers/esm/_apply_decs_2203_r.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/helpers/esm/_apply_decs_2203_r.js b/packages/helpers/esm/_apply_decs_2203_r.js index ed6427d095c3..9de17faf6ceb 100644 --- a/packages/helpers/esm/_apply_decs_2203_r.js +++ b/packages/helpers/esm/_apply_decs_2203_r.js @@ -47,7 +47,7 @@ export function _apply_decs_2203_r(targetClass, memberDecs, classDecs, parentCla kindStr = "field"; } - var ctx = { kind: kindStr, name: isPrivate ? "#" + name : name, static: isStatic, private: isPrivate }; + var ctx = { kind: kindStr, name: isPrivate ? "#" + name : name, static: isStatic, private: isPrivate, metadata: metadata }; var decoratorFinishedRef = { v: false }; From 9ee0be09b140bc942c321ae14fe38415a6eb3d2a Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Thu, 28 Mar 2024 07:46:33 +0000 Subject: [PATCH 044/172] chore: Bump crates --- CHANGELOG.md | 12 +++--------- Cargo.lock | 2 +- crates/dbg-swc/Cargo.toml | 2 +- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index da8590edfb76..2c591bbe49fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ +- **(es/helpers)** Fix metadata of decorators being `undefined` ([#8768](https://github.com/swc-project/swc/issues/8768)) ([263ce6e](https://github.com/swc-project/swc/commit/263ce6e22bd4dbba0323099f256fb062b8e644a2)) + + - **(es/module)** Fix `jsc.paths` with `resolveFully` ([#8784](https://github.com/swc-project/swc/issues/8784)) ([4961bb0](https://github.com/swc-project/swc/commit/4961bb055df9925da97279819d2fdf740b4b3d92)) ## [1.4.9] - 2024-03-26 @@ -1368,20 +1371,11 @@ - **(es/compat)** Make `SwitchCase` handler of `block-scoping` stateless ([#7888](https://github.com/swc-project/swc/issues/7888)) ([4b33d41](https://github.com/swc-project/swc/commit/4b33d41fabf841dfc31c6f44d94e4651239ab667)) -- **(es/dep-graph)** Analyze import type children ([#7883](https://github.com/swc-project/swc/issues/7883)) ([057bd5f](https://github.com/swc-project/swc/commit/057bd5f3efe55077a5a8e7f627e80175c8af2bd0)) - - - **(es/minifier)** Report `is_fn_local` even if var is hoisted ([#7876](https://github.com/swc-project/swc/issues/7876)) ([87a47bf](https://github.com/swc-project/swc/commit/87a47bfb2c602f2ce7eb33f78612197e290518b8)) - **(es/module)** Don't create absolute paths for `jsc.paths` on Windows ([#7892](https://github.com/swc-project/swc/issues/7892)) ([5fbc251](https://github.com/swc-project/swc/commit/5fbc251db1cc1f7973ba780a6c4fc1cdce5ef40d)) -### Features - - - -- **(es/preset-env)** Update data ([#7882](https://github.com/swc-project/swc/issues/7882)) ([a97d8b4](https://github.com/swc-project/swc/commit/a97d8b42b1f85c1f76ffadcabf6e9c85f0458d8d)) - ### Miscellaneous Tasks diff --git a/Cargo.lock b/Cargo.lock index 06c509fdc419..bd784e537546 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1065,7 +1065,7 @@ checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] name = "dbg-swc" -version = "0.91.24" +version = "0.91.25" dependencies = [ "anyhow", "clap 3.2.25", diff --git a/crates/dbg-swc/Cargo.toml b/crates/dbg-swc/Cargo.toml index 745ccda66604..32249f83bd9d 100644 --- a/crates/dbg-swc/Cargo.toml +++ b/crates/dbg-swc/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "Apache-2.0" name = "dbg-swc" repository = "https://github.com/kdy1/dbg-swc.git" -version = "0.91.24" +version = "0.91.25" [[bin]] bench = false From 10ece99e0f28ccd6cfe0942e36d913721dbd3961 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Thu, 28 Mar 2024 16:50:04 +0900 Subject: [PATCH 045/172] chore: Publish `@swc/helpers@v0.5.8` --- packages/helpers/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/helpers/package.json b/packages/helpers/package.json index dc17e85d2658..6eb9f666531f 100644 --- a/packages/helpers/package.json +++ b/packages/helpers/package.json @@ -1,7 +1,7 @@ { "name": "@swc/helpers", "packageManager": "yarn@4.0.2", - "version": "0.5.7", + "version": "0.5.8", "description": "External helpers for the swc project.", "module": "esm/index.js", "main": "cjs/index.cjs", From acaaa5d594e9bdf8ea742b8bafbd4f9b975040be Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Sun, 31 Mar 2024 00:08:11 +0000 Subject: [PATCH 046/172] chore: Publish 1.4.12-nightly-20240331.1 --- bindings/Cargo.lock | 6 +++--- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- package.json | 2 +- packages/minifier/package.json | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 4560c833d62b..d2d84ed4f730 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -232,7 +232,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.4.11" +version = "1.4.12-nightly-20240331.1" dependencies = [ "anyhow", "getrandom", @@ -292,7 +292,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.4.11" +version = "1.4.12-nightly-20240331.1" dependencies = [ "anyhow", "getrandom", @@ -3066,7 +3066,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.207" +version = "0.91.208" dependencies = [ "anyhow", "swc_cli_impl", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 67a97fee437b..846614f0eb14 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.11" +version = "1.4.12-nightly-20240331.1" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 860f69983097..99f0119431ad 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.11" +version = "1.4.12-nightly-20240331.1" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index b8a37d795b93..eafe9af5184a 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.207" +version = "0.91.208" [[bin]] bench = false diff --git a/package.json b/package.json index 286223136c5b..e5e1b336101e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.4.11", + "version": "1.4.12-nightly-20240331.1", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 7eb0bc4b852f..9da780232ba4 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.4.11", + "version": "1.4.12-nightly-20240331.1", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", From 8eac0bec49f4f260a261d87f174ed2913c4bee63 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Mon, 1 Apr 2024 00:07:47 +0000 Subject: [PATCH 047/172] chore: Publish 1.4.12-nightly-20240401.1 --- bindings/Cargo.lock | 6 +++--- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- package.json | 2 +- packages/minifier/package.json | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index d2d84ed4f730..f2c29643fc75 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -232,7 +232,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.4.12-nightly-20240331.1" +version = "1.4.12-nightly-20240401.1" dependencies = [ "anyhow", "getrandom", @@ -292,7 +292,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.4.12-nightly-20240331.1" +version = "1.4.12-nightly-20240401.1" dependencies = [ "anyhow", "getrandom", @@ -3066,7 +3066,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.208" +version = "0.91.209" dependencies = [ "anyhow", "swc_cli_impl", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 846614f0eb14..e83a2b568873 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.12-nightly-20240331.1" +version = "1.4.12-nightly-20240401.1" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 99f0119431ad..ac450bdb8e60 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.12-nightly-20240331.1" +version = "1.4.12-nightly-20240401.1" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index eafe9af5184a..1144d97ee0fa 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.208" +version = "0.91.209" [[bin]] bench = false diff --git a/package.json b/package.json index e5e1b336101e..9cb02cafbfe0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.4.12-nightly-20240331.1", + "version": "1.4.12-nightly-20240401.1", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 9da780232ba4..a28a770a76fd 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.4.12-nightly-20240331.1", + "version": "1.4.12-nightly-20240401.1", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", From 37f0a7994bdf7d90c30a00f70c6dde97b4d89c8f Mon Sep 17 00:00:00 2001 From: Paolo Barbolini Date: Mon, 1 Apr 2024 03:34:46 +0200 Subject: [PATCH 048/172] chore(es/transforms): Add `repository` field to `swc_ecma_ext_transforms` (#8793) --- crates/swc_ecma_ext_transforms/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/swc_ecma_ext_transforms/Cargo.toml b/crates/swc_ecma_ext_transforms/Cargo.toml index 82e57b5c0b8b..bc858cf1bdff 100644 --- a/crates/swc_ecma_ext_transforms/Cargo.toml +++ b/crates/swc_ecma_ext_transforms/Cargo.toml @@ -5,6 +5,7 @@ documentation = "https://rustdoc.swc.rs/swc_ecma_ext_transforms/" edition = "2021" license = "Apache-2.0" name = "swc_ecma_ext_transforms" +repository = "https://github.com/swc-project/swc.git" version = "0.113.13" [lib] From 25d6092e7abacf72a8cd85adc0a8fcf748203f1c Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Mon, 1 Apr 2024 01:36:30 +0000 Subject: [PATCH 049/172] chore: Bump crates --- CHANGELOG.md | 15 ++++++--------- Cargo.lock | 4 ++-- crates/swc_core/Cargo.toml | 2 +- crates/swc_ecma_ext_transforms/Cargo.toml | 2 +- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c591bbe49fc..4961035e0506 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,12 @@ - **(es/module)** Fix `jsc.paths` with `resolveFully` ([#8784](https://github.com/swc-project/swc/issues/8784)) ([4961bb0](https://github.com/swc-project/swc/commit/4961bb055df9925da97279819d2fdf740b4b3d92)) +### Miscellaneous Tasks + + + +- **(es/transforms)** Add `repository` field to `swc_ecma_ext_transforms` ([#8793](https://github.com/swc-project/swc/issues/8793)) ([37f0a79](https://github.com/swc-project/swc/commit/37f0a7994bdf7d90c30a00f70c6dde97b4d89c8f)) + ## [1.4.9] - 2024-03-26 ### Bug Fixes @@ -1368,9 +1374,6 @@ -- **(es/compat)** Make `SwitchCase` handler of `block-scoping` stateless ([#7888](https://github.com/swc-project/swc/issues/7888)) ([4b33d41](https://github.com/swc-project/swc/commit/4b33d41fabf841dfc31c6f44d94e4651239ab667)) - - - **(es/minifier)** Report `is_fn_local` even if var is hoisted ([#7876](https://github.com/swc-project/swc/issues/7876)) ([87a47bf](https://github.com/swc-project/swc/commit/87a47bfb2c602f2ce7eb33f78612197e290518b8)) @@ -1382,12 +1385,6 @@ - **(deps)** Update `memchr` ([#7891](https://github.com/swc-project/swc/issues/7891)) ([01cbd6e](https://github.com/swc-project/swc/commit/01cbd6edbd37c95ece7ca20ad2f6c85d6c1b6e35)) -### Performance - - - -- **(es/transforms)** Remove wrong parallelism ([#7889](https://github.com/swc-project/swc/issues/7889)) ([a505012](https://github.com/swc-project/swc/commit/a50501255d2a91f2bbc1ce9767689dc4fad540cc)) - ### Refactor diff --git a/Cargo.lock b/Cargo.lock index bd784e537546..bc7379d6b3b4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3924,7 +3924,7 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.90.26" +version = "0.90.27" dependencies = [ "anyhow", "binding_macros", @@ -4402,7 +4402,7 @@ dependencies = [ [[package]] name = "swc_ecma_ext_transforms" -version = "0.113.13" +version = "0.113.14" dependencies = [ "phf", "swc_atoms", diff --git a/crates/swc_core/Cargo.toml b/crates/swc_core/Cargo.toml index 923410d6e895..3394f003abea 100644 --- a/crates/swc_core/Cargo.toml +++ b/crates/swc_core/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_core" repository = "https://github.com/swc-project/swc.git" -version = "0.90.26" +version = "0.90.27" [package.metadata.docs.rs] features = [ "allocator_node", diff --git a/crates/swc_ecma_ext_transforms/Cargo.toml b/crates/swc_ecma_ext_transforms/Cargo.toml index bc858cf1bdff..6e72e4abd765 100644 --- a/crates/swc_ecma_ext_transforms/Cargo.toml +++ b/crates/swc_ecma_ext_transforms/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_ext_transforms" repository = "https://github.com/swc-project/swc.git" -version = "0.113.13" +version = "0.113.14" [lib] bench = false From 6f780ca749a611f54aa4deb628e532fd0a12228f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Mon, 1 Apr 2024 11:01:23 +0900 Subject: [PATCH 050/172] perf(es/parser): Use faster unicode crate (#8785) --- Cargo.lock | 2 +- crates/swc_ecma_ast/Cargo.toml | 9 ++++----- crates/swc_ecma_ast/src/ident.rs | 5 ++--- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bc7379d6b3b4..55ad632ce116 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4175,7 +4175,7 @@ dependencies = [ "string_enum", "swc_atoms", "swc_common", - "unicode-id", + "unicode-id-start", ] [[package]] diff --git a/crates/swc_ecma_ast/Cargo.toml b/crates/swc_ecma_ast/Cargo.toml index 6d9e56233ad9..d0d6ce0e9af0 100644 --- a/crates/swc_ecma_ast/Cargo.toml +++ b/crates/swc_ecma_ast/Cargo.toml @@ -35,18 +35,17 @@ bitflags = "2.3.2" bytecheck = { version = "0.6.10", optional = true } is-macro = "0.3.0" num-bigint = { version = "0.4", features = ["serde"] } +phf = { version = "0.11.2", features = ["macros"] } rkyv = { package = "rkyv", version = "=0.7.42", optional = true, features = [ "strict", "validation", ] } scoped-tls = "1.0.1" serde = { version = "1.0.133", features = ["derive"], optional = true } -unicode-id = "0.3" - string_enum = { version = "0.4.2", path = "../string_enum" } -swc_atoms = { version = "0.6.5", path = "../swc_atoms" } -swc_common = { version = "0.33.20", path = "../swc_common" } -phf = { version = "0.11.2", features = ["macros"] } +swc_atoms = { version = "0.6.5", path = "../swc_atoms" } +swc_common = { version = "0.33.20", path = "../swc_common" } +unicode-id-start = "1.1.2" [dev-dependencies] serde_json = "1" diff --git a/crates/swc_ecma_ast/src/ident.rs b/crates/swc_ecma_ast/src/ident.rs index d3809cf56bff..e5bded9fa04b 100644 --- a/crates/swc_ecma_ast/src/ident.rs +++ b/crates/swc_ecma_ast/src/ident.rs @@ -9,7 +9,6 @@ use swc_atoms::{js_word, Atom}; use swc_common::{ ast_node, util::take::Take, BytePos, EqIgnoreSpan, Span, Spanned, SyntaxContext, DUMMY_SP, }; -use unicode_id::UnicodeID; use crate::{typescript::TsTypeAnn, Expr}; @@ -230,7 +229,7 @@ impl Ident { return ASCII_START.0[c as usize]; } - UnicodeID::is_id_start(c) + unicode_id_start::is_id_start_unicode(c) } /// Returns true if `c` is a valid character for an identifier part after @@ -250,7 +249,7 @@ impl Ident { return ASCII_CONTINUE.0[c as usize]; } - UnicodeID::is_id_continue(c) || c == '\u{200c}' || c == '\u{200d}' + unicode_id_start::is_id_continue_unicode(c) } /// Alternative for `toIdentifier` of babel. From 35264c5ce57a9280eaf9800cd04599156c7bf6e2 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Mon, 1 Apr 2024 02:03:01 +0000 Subject: [PATCH 051/172] chore: Bump crates --- CHANGELOG.md | 9 ++++++--- Cargo.lock | 2 +- crates/swc_ecma_parser/Cargo.toml | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4961035e0506..be71270011b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,12 @@ - **(es/transforms)** Add `repository` field to `swc_ecma_ext_transforms` ([#8793](https://github.com/swc-project/swc/issues/8793)) ([37f0a79](https://github.com/swc-project/swc/commit/37f0a7994bdf7d90c30a00f70c6dde97b4d89c8f)) +### Performance + + + +- **(es/parser)** Use faster unicode crate ([#8785](https://github.com/swc-project/swc/issues/8785)) ([6f780ca](https://github.com/swc-project/swc/commit/6f780ca749a611f54aa4deb628e532fd0a12228f)) + ## [1.4.9] - 2024-03-26 ### Bug Fixes @@ -1374,9 +1380,6 @@ -- **(es/minifier)** Report `is_fn_local` even if var is hoisted ([#7876](https://github.com/swc-project/swc/issues/7876)) ([87a47bf](https://github.com/swc-project/swc/commit/87a47bfb2c602f2ce7eb33f78612197e290518b8)) - - - **(es/module)** Don't create absolute paths for `jsc.paths` on Windows ([#7892](https://github.com/swc-project/swc/issues/7892)) ([5fbc251](https://github.com/swc-project/swc/commit/5fbc251db1cc1f7973ba780a6c4fc1cdce5ef40d)) ### Miscellaneous Tasks diff --git a/Cargo.lock b/Cargo.lock index 55ad632ce116..a3d1bb44365c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4498,7 +4498,7 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "0.143.11" +version = "0.143.12" dependencies = [ "criterion", "either", diff --git a/crates/swc_ecma_parser/Cargo.toml b/crates/swc_ecma_parser/Cargo.toml index c8884c16ceb8..2b65fec5ce20 100644 --- a/crates/swc_ecma_parser/Cargo.toml +++ b/crates/swc_ecma_parser/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "examples/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_parser" repository = "https://github.com/swc-project/swc.git" -version = "0.143.11" +version = "0.143.12" [package.metadata.docs.rs] all-features = true From 95c822e7c43470e4c972bef00d97e7e0de02e0b0 Mon Sep 17 00:00:00 2001 From: XiaoPi <530257315@qq.com> Date: Mon, 1 Apr 2024 10:27:38 +0800 Subject: [PATCH 052/172] fix(es/parser): Tweak msg of `SyntaxError::UsingDeclNotEnabled` (#8791) --- crates/swc_ecma_parser/src/error.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/swc_ecma_parser/src/error.rs b/crates/swc_ecma_parser/src/error.rs index c61d04b0ab73..1715555dd478 100644 --- a/crates/swc_ecma_parser/src/error.rs +++ b/crates/swc_ecma_parser/src/error.rs @@ -540,9 +540,9 @@ impl SyntaxError { SyntaxError::UsingDeclNotAllowedForForInLoop => { "Using declaration is not allowed in for-in loop".into() } - SyntaxError::UsingDeclNotEnabled => { - "Using declaration is not enabled. Set jsc.parser.usingDecl to true".into() - } + SyntaxError::UsingDeclNotEnabled => "Using declaration is not enabled. Set \ + jsc.parser.explicitResourceManagement to true" + .into(), SyntaxError::InvalidNameInUsingDecl => { "Using declaration only allows identifiers".into() } From 504ddb9eebe09862b6dd408e91bf50727764e955 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Mon, 1 Apr 2024 02:29:17 +0000 Subject: [PATCH 053/172] chore: Bump crates --- CHANGELOG.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be71270011b2..3cbb5914020a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ - **(es/module)** Fix `jsc.paths` with `resolveFully` ([#8784](https://github.com/swc-project/swc/issues/8784)) ([4961bb0](https://github.com/swc-project/swc/commit/4961bb055df9925da97279819d2fdf740b4b3d92)) + +- **(es/parser)** Tweak msg of `SyntaxError::UsingDeclNotEnabled` ([#8791](https://github.com/swc-project/swc/issues/8791)) ([95c822e](https://github.com/swc-project/swc/commit/95c822e7c43470e4c972bef00d97e7e0de02e0b0)) + ### Miscellaneous Tasks @@ -1382,12 +1385,6 @@ - **(es/module)** Don't create absolute paths for `jsc.paths` on Windows ([#7892](https://github.com/swc-project/swc/issues/7892)) ([5fbc251](https://github.com/swc-project/swc/commit/5fbc251db1cc1f7973ba780a6c4fc1cdce5ef40d)) -### Miscellaneous Tasks - - - -- **(deps)** Update `memchr` ([#7891](https://github.com/swc-project/swc/issues/7891)) ([01cbd6e](https://github.com/swc-project/swc/commit/01cbd6edbd37c95ece7ca20ad2f6c85d6c1b6e35)) - ### Refactor From 571d29781a90f4def4811ae46fa4a5f966e461e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Mon, 1 Apr 2024 14:26:18 +0900 Subject: [PATCH 054/172] feat(plugin/runner): Improve error message for Wasm plugin crashes (#8794) **Related issue:** - Closes #4333 --- crates/swc_plugin_runner/src/transform_executor.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/crates/swc_plugin_runner/src/transform_executor.rs b/crates/swc_plugin_runner/src/transform_executor.rs index a4e681e5717c..ae8d3a5c9bc3 100644 --- a/crates/swc_plugin_runner/src/transform_executor.rs +++ b/crates/swc_plugin_runner/src/transform_executor.rs @@ -1,6 +1,6 @@ use std::{env, sync::Arc}; -use anyhow::{anyhow, Error}; +use anyhow::{anyhow, Context, Error}; use parking_lot::Mutex; #[cfg(feature = "__rkyv")] use swc_common::plugin::serialized::{PluginError, PluginSerializedBytes}; @@ -389,6 +389,13 @@ impl TransformExecutor { ) -> Result { let mut transform_state = self.setup_plugin_env_exports()?; transform_state.is_transform_schema_compatible()?; - transform_state.run(program, self.unresolved_mark, should_enable_comments_proxy) + transform_state + .run(program, self.unresolved_mark, should_enable_comments_proxy) + .context( + "failed to run Wasm plugin transform. Please ensure the version of `swc_core` \ + used by the plugin is compatible with the host runtime. See https://swc.rs/docs/plugin/selecting-swc-core\ + for compatibility information. If you are an author of the plugin, please update \ + `swc_core` to the compatible version.", + ) } } From 56e03a19602b36a7ebac9ccc899065101bb385af Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Mon, 1 Apr 2024 05:27:57 +0000 Subject: [PATCH 055/172] chore: Bump crates --- CHANGELOG.md | 12 ++++++------ Cargo.lock | 2 +- crates/swc_plugin_runner/Cargo.toml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cbb5914020a..68a9b1661de6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,12 @@ - **(es/parser)** Tweak msg of `SyntaxError::UsingDeclNotEnabled` ([#8791](https://github.com/swc-project/swc/issues/8791)) ([95c822e](https://github.com/swc-project/swc/commit/95c822e7c43470e4c972bef00d97e7e0de02e0b0)) +### Features + + + +- **(plugin/runner)** Improve error message for Wasm plugin crashes ([#8794](https://github.com/swc-project/swc/issues/8794)) ([571d297](https://github.com/swc-project/swc/commit/571d29781a90f4def4811ae46fa4a5f966e461e6)) + ### Miscellaneous Tasks @@ -1385,10 +1391,4 @@ - **(es/module)** Don't create absolute paths for `jsc.paths` on Windows ([#7892](https://github.com/swc-project/swc/issues/7892)) ([5fbc251](https://github.com/swc-project/swc/commit/5fbc251db1cc1f7973ba780a6c4fc1cdce5ef40d)) -### Refactor - - - -- **(es/minifier)** Remove `mutated` and `mutation_by_call_count` ([#7890](https://github.com/swc-project/swc/issues/7890)) ([8db968a](https://github.com/swc-project/swc/commit/8db968a25d508a0d28d15d556ad121951f39ae0d)) - diff --git a/Cargo.lock b/Cargo.lock index a3d1bb44365c..2653ee65ed46 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5214,7 +5214,7 @@ dependencies = [ [[package]] name = "swc_plugin_runner" -version = "0.106.13" +version = "0.106.14" dependencies = [ "anyhow", "criterion", diff --git a/crates/swc_plugin_runner/Cargo.toml b/crates/swc_plugin_runner/Cargo.toml index 793dce7d6c8e..e11a8f55700b 100644 --- a/crates/swc_plugin_runner/Cargo.toml +++ b/crates/swc_plugin_runner/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_plugin_runner" repository = "https://github.com/swc-project/swc.git" -version = "0.106.13" +version = "0.106.14" [lib] bench = false From 7ad004e1899d98ee8da49909163455b3b622686d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Homol=C3=ADk?= Date: Tue, 2 Apr 2024 08:37:45 +0200 Subject: [PATCH 056/172] fix(es/bugfixes): Fix fn transform in nameless fns (#8796) **Description:** This pull request fixes `bugfix/transform-safari-id-destructuring-collision-in-function-expression` module. Previously the transform ignored code inside of function which did not have specified identifier. Now the visitor should go through the content of the nameless functions. **Related issue:** - Closes #8788 --- ...turing_collision_in_function_expression.rs | 51 ++++++++++++++++++- .../in_nameless_fn.js | 5 ++ .../in_nameless_fn_multiple.js | 26 ++++++++++ 3 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 crates/swc_ecma_compat_bugfixes/tests/__swc_snapshots__/src/safari_id_destructuring_collision_in_function_expression.rs/in_nameless_fn.js create mode 100644 crates/swc_ecma_compat_bugfixes/tests/__swc_snapshots__/src/safari_id_destructuring_collision_in_function_expression.rs/in_nameless_fn_multiple.js diff --git a/crates/swc_ecma_compat_bugfixes/src/safari_id_destructuring_collision_in_function_expression.rs b/crates/swc_ecma_compat_bugfixes/src/safari_id_destructuring_collision_in_function_expression.rs index 89c6f35cb714..e649fa2989cc 100644 --- a/crates/swc_ecma_compat_bugfixes/src/safari_id_destructuring_collision_in_function_expression.rs +++ b/crates/swc_ecma_compat_bugfixes/src/safari_id_destructuring_collision_in_function_expression.rs @@ -44,10 +44,10 @@ impl VisitMut for SafariIdDestructuringCollisionInFunctionExpression { } fn visit_mut_fn_expr(&mut self, n: &mut FnExpr) { + let old_in_body = self.in_body; if let Some(ident) = &n.ident { let old_span = self.destructured_id_span.take(); let old_fn_expr_name = self.fn_expr_name.clone(); - let old_in_body = self.in_body; self.fn_expr_name = ident.sym.clone(); self.in_body = false; @@ -71,10 +71,15 @@ impl VisitMut for SafariIdDestructuringCollisionInFunctionExpression { n.function.visit_mut_children_with(&mut rename(&rename_map)); } - self.in_body = old_in_body; self.fn_expr_name = old_fn_expr_name; self.destructured_id_span = old_span; + } else { + self.in_body = false; + n.function.params.visit_mut_children_with(self); + self.in_body = true; + n.function.body.visit_mut_children_with(self); } + self.in_body = old_in_body; } fn visit_mut_ident(&mut self, ident: &mut Ident) { @@ -179,4 +184,46 @@ mod tests { } " ); + + test!( + Syntax::default(), + |_| tr(), + in_nameless_fn, + "(function () { + (function a(a) {a}); + }); + " + ); + + test!( + Syntax::default(), + |_| tr(), + in_nameless_fn_multiple, + "// nameless iife + var x = function() { + // not transformed + var b = function a(a) { + return a; + }; + }(); + // nameless iife + var x = function x() { + var b = function a(_a) { + return _a; + }; + }(); + // nameless function + (function() { + // not transformed + var b = function a(a) { + return a; + }; + }); + // named function + (function x() { + var b = function a(_a) { + return _a; + }; + });" + ); } diff --git a/crates/swc_ecma_compat_bugfixes/tests/__swc_snapshots__/src/safari_id_destructuring_collision_in_function_expression.rs/in_nameless_fn.js b/crates/swc_ecma_compat_bugfixes/tests/__swc_snapshots__/src/safari_id_destructuring_collision_in_function_expression.rs/in_nameless_fn.js new file mode 100644 index 000000000000..5ebdc45b8b95 --- /dev/null +++ b/crates/swc_ecma_compat_bugfixes/tests/__swc_snapshots__/src/safari_id_destructuring_collision_in_function_expression.rs/in_nameless_fn.js @@ -0,0 +1,5 @@ +(function () { + (function a(_a) { + _a; + }); +}); diff --git a/crates/swc_ecma_compat_bugfixes/tests/__swc_snapshots__/src/safari_id_destructuring_collision_in_function_expression.rs/in_nameless_fn_multiple.js b/crates/swc_ecma_compat_bugfixes/tests/__swc_snapshots__/src/safari_id_destructuring_collision_in_function_expression.rs/in_nameless_fn_multiple.js new file mode 100644 index 000000000000..302831f3afba --- /dev/null +++ b/crates/swc_ecma_compat_bugfixes/tests/__swc_snapshots__/src/safari_id_destructuring_collision_in_function_expression.rs/in_nameless_fn_multiple.js @@ -0,0 +1,26 @@ +// nameless iife +var x = function() { + // not transformed + var b = function a(_a) { + return _a; + }; +}(); +// nameless iife +var x = function x() { + var b = function a(_a) { + return _a; + }; +}(); +// nameless function +(function() { + // not transformed + var b = function a(_a1) { + return _a1; + }; +}); +// named function +(function x() { + var b = function a(_a) { + return _a; + }; +}); From a15455271af4ca0d3a28543002acb3a6ff4c9385 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 2 Apr 2024 06:39:51 +0000 Subject: [PATCH 057/172] chore: Bump crates --- CHANGELOG.md | 11 +++-------- Cargo.lock | 2 +- crates/swc_ecma_compat_bugfixes/Cargo.toml | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68a9b1661de6..54ad13f7953e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ +- **(es/bugfixes)** Fix fn transform in nameless fns ([#8796](https://github.com/swc-project/swc/issues/8796)) ([7ad004e](https://github.com/swc-project/swc/commit/7ad004e1899d98ee8da49909163455b3b622686d)) + + - **(es/helpers)** Fix metadata of decorators being `undefined` ([#8768](https://github.com/swc-project/swc/issues/8768)) ([263ce6e](https://github.com/swc-project/swc/commit/263ce6e22bd4dbba0323099f256fb062b8e644a2)) @@ -1383,12 +1386,4 @@ - **(es/resolver)** Correctly resolve global value ([#7893](https://github.com/swc-project/swc/issues/7893)) ([2db10e9](https://github.com/swc-project/swc/commit/2db10e9fd1913b69cb088aaded2d587872e9f2bb)) -## [1.3.81] - 2023-08-30 - -### Bug Fixes - - - -- **(es/module)** Don't create absolute paths for `jsc.paths` on Windows ([#7892](https://github.com/swc-project/swc/issues/7892)) ([5fbc251](https://github.com/swc-project/swc/commit/5fbc251db1cc1f7973ba780a6c4fc1cdce5ef40d)) - diff --git a/Cargo.lock b/Cargo.lock index 2653ee65ed46..b76b83493735 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4214,7 +4214,7 @@ dependencies = [ [[package]] name = "swc_ecma_compat_bugfixes" -version = "0.4.17" +version = "0.4.18" dependencies = [ "swc_atoms", "swc_common", diff --git a/crates/swc_ecma_compat_bugfixes/Cargo.toml b/crates/swc_ecma_compat_bugfixes/Cargo.toml index bc56f475eda9..9e2c8e9c0f67 100644 --- a/crates/swc_ecma_compat_bugfixes/Cargo.toml +++ b/crates/swc_ecma_compat_bugfixes/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_compat_bugfixes" repository = "https://github.com/swc-project/swc.git" -version = "0.4.17" +version = "0.4.18" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] From 0745624cb71e12b18b06d9ee106066d8b585c4c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Tue, 2 Apr 2024 16:30:26 +0900 Subject: [PATCH 058/172] perf(atoms): Update `hstr` (#8799) **Description:** **Related issue:** - https://github.com/dudykr/ddbase/pull/27 - https://github.com/dudykr/ddbase/pull/29 --- Cargo.lock | 17 ++++++++++++++--- crates/swc_atoms/Cargo.toml | 2 +- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b76b83493735..5fde45311e40 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1655,15 +1655,16 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hstr" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17fafeca18cf0927e23ea44d7a5189c10536279dfe9094e0dfa953053fbb5377" +checksum = "b0f5356d62012374578cd3a5c013d6586de3efbca3b53379fc1edfbb95c9db14" dependencies = [ + "hashbrown 0.14.3", "new_debug_unreachable", "once_cell", "phf", "rustc-hash", - "smallvec", + "triomphe", ] [[package]] @@ -5855,6 +5856,16 @@ dependencies = [ "tracing-log", ] +[[package]] +name = "triomphe" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "859eb650cfee7434994602c3a68b25d77ad9e68c8a6cd491616ef86661382eb3" +dependencies = [ + "serde", + "stable_deref_trait", +] + [[package]] name = "try-lock" version = "0.2.5" diff --git a/crates/swc_atoms/Cargo.toml b/crates/swc_atoms/Cargo.toml index 973d7e37c222..e40046d8657c 100644 --- a/crates/swc_atoms/Cargo.toml +++ b/crates/swc_atoms/Cargo.toml @@ -18,7 +18,7 @@ rkyv-impl = ["__rkyv", "rkyv", "bytecheck"] [dependencies] # bytecheck version should be in sync with rkyv version. Do not bump individually. bytecheck = { version = "0.6.10", optional = true } -hstr = "0.2.7" +hstr = "0.2.8" once_cell = "1" rkyv = { package = "rkyv", version = "=0.7.42", optional = true, features = [ "strict", From 34e12a2da71f79aac48201a3d697f21f5743a9dd Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 2 Apr 2024 07:32:06 +0000 Subject: [PATCH 059/172] chore: Bump crates --- CHANGELOG.md | 3 +++ Cargo.lock | 2 +- crates/swc_atoms/Cargo.toml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54ad13f7953e..7b4cbcb484b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,9 @@ +- **(atoms)** Update `hstr` ([#8799](https://github.com/swc-project/swc/issues/8799)) ([0745624](https://github.com/swc-project/swc/commit/0745624cb71e12b18b06d9ee106066d8b585c4c6)) + + - **(es/parser)** Use faster unicode crate ([#8785](https://github.com/swc-project/swc/issues/8785)) ([6f780ca](https://github.com/swc-project/swc/commit/6f780ca749a611f54aa4deb628e532fd0a12228f)) ## [1.4.9] - 2024-03-26 diff --git a/Cargo.lock b/Cargo.lock index 5fde45311e40..b7671d30c458 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3753,7 +3753,7 @@ dependencies = [ [[package]] name = "swc_atoms" -version = "0.6.5" +version = "0.6.6" dependencies = [ "bytecheck", "hstr", diff --git a/crates/swc_atoms/Cargo.toml b/crates/swc_atoms/Cargo.toml index e40046d8657c..6d9dd6e6722e 100644 --- a/crates/swc_atoms/Cargo.toml +++ b/crates/swc_atoms/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_atoms" repository = "https://github.com/swc-project/swc.git" -version = "0.6.5" +version = "0.6.6" [lib] bench = false From 4f9ab8151dad9984c81c72eb10c2afe5313a7591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Wed, 3 Apr 2024 11:33:25 +0900 Subject: [PATCH 060/172] fix(common): Fix source index for `inputSourceMap` (#8800) **Related issue:** - Closes #8789 --- crates/swc_common/src/source_map.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/swc_common/src/source_map.rs b/crates/swc_common/src/source_map.rs index beccf76aca52..d1a951dfae9b 100644 --- a/crates/swc_common/src/source_map.rs +++ b/crates/swc_common/src/source_map.rs @@ -1225,7 +1225,7 @@ impl SourceMap { if let Some(orig) = orig { for src in orig.sources() { let id = builder.add_source(src); - src_id = id + 1; + src_id = id; builder.set_source_contents(id, orig.get_source_contents(id)); } From 2091a062596bb1c5c8193c046d66fc9da0461a6d Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Wed, 3 Apr 2024 02:35:12 +0000 Subject: [PATCH 061/172] chore: Bump crates --- CHANGELOG.md | 6 +++--- Cargo.lock | 2 +- crates/swc_common/Cargo.toml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b4cbcb484b4..9584a150811c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ +- **(common)** Fix source index for `inputSourceMap` ([#8800](https://github.com/swc-project/swc/issues/8800)) ([4f9ab81](https://github.com/swc-project/swc/commit/4f9ab8151dad9984c81c72eb10c2afe5313a7591)) + + - **(es/bugfixes)** Fix fn transform in nameless fns ([#8796](https://github.com/swc-project/swc/issues/8796)) ([7ad004e](https://github.com/swc-project/swc/commit/7ad004e1899d98ee8da49909163455b3b622686d)) @@ -1386,7 +1389,4 @@ - **(es/module)** Make `jsc.paths` fully resolve TypeScript files ([#7901](https://github.com/swc-project/swc/issues/7901)) ([c714dd2](https://github.com/swc-project/swc/commit/c714dd20dedfab60ac75de613d13c0f3af60a6c7)) - -- **(es/resolver)** Correctly resolve global value ([#7893](https://github.com/swc-project/swc/issues/7893)) ([2db10e9](https://github.com/swc-project/swc/commit/2db10e9fd1913b69cb088aaded2d587872e9f2bb)) - diff --git a/Cargo.lock b/Cargo.lock index b7671d30c458..5a72b6f3b841 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3844,7 +3844,7 @@ dependencies = [ [[package]] name = "swc_common" -version = "0.33.21" +version = "0.33.22" dependencies = [ "ahash 0.8.8", "anyhow", diff --git a/crates/swc_common/Cargo.toml b/crates/swc_common/Cargo.toml index 00ecd6f34211..e16a24b769ad 100644 --- a/crates/swc_common/Cargo.toml +++ b/crates/swc_common/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_common" repository = "https://github.com/swc-project/swc.git" -version = "0.33.21" +version = "0.33.22" [package.metadata.docs.rs] all-features = true From 9ffcd1823c0abdc741f654b8e1e330cdc06769a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Wed, 3 Apr 2024 12:01:13 +0900 Subject: [PATCH 062/172] fix(es): Change default value of `inputSourceMap` to `true` (#8801) **Related issue:** - Closes #8795 --- crates/swc/src/config/mod.rs | 2 +- .../fixture/sourcemap/issue-6552/input-map/output/index.map | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/swc/src/config/mod.rs b/crates/swc/src/config/mod.rs index c1a3b21cbe6b..02cc37dee70e 100644 --- a/crates/swc/src/config/mod.rs +++ b/crates/swc/src/config/mod.rs @@ -205,7 +205,7 @@ pub enum InputSourceMap { impl Default for InputSourceMap { fn default() -> Self { - InputSourceMap::Bool(false) + InputSourceMap::Bool(true) } } diff --git a/crates/swc/tests/fixture/sourcemap/issue-6552/input-map/output/index.map b/crates/swc/tests/fixture/sourcemap/issue-6552/input-map/output/index.map index d2d9c2082610..d8445f1a4e54 100644 --- a/crates/swc/tests/fixture/sourcemap/issue-6552/input-map/output/index.map +++ b/crates/swc/tests/fixture/sourcemap/issue-6552/input-map/output/index.map @@ -1,5 +1,5 @@ { - "mappings": "aAAA,IAAMA,IAAM,cACZC,QAAQC,KAAK,CAAC,AAAC,KAAY,OAARC,UACnB,IAAMC,IAAM", + "mappings": "aAAA,IAAMA,IAAM,cACZC,QAAQC,KAAR,CAAe,KAAY,OAARC,UAEnB,IAAMC,IAAM", "names": [ "xxx", "console", @@ -9,10 +9,10 @@ ], "rangeMappings": "", "sources": [ - "../../input/index.js" + "unknown" ], "sourcesContent": [ - "const xxx = ', something';\nconsole.error(`❌ ${message}`);\nconst bbb = '';\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJ4eHgiLCJjb25zb2xlIiwiZXJyb3IiLCJtZXNzYWdlIiwiYmJiIl0sInNvdXJjZXMiOlsidW5rbm93biJdLCJzb3VyY2VzQ29udGVudCI6WyJjb25zdCB4eHggPSAnLCBzb21ldGhpbmcnXG5jb25zb2xlLmVycm9yKGDinYwgJHttZXNzYWdlfWApO1xuXG5jb25zdCBiYmIgPSAnJ1xuIl0sIm1hcHBpbmdzIjoiQUFBQSxNQUFNQSxHQUFHLEdBQUcsYUFBWjtBQUNBQyxPQUFPLENBQUNDLEtBQVIsQ0FBZSxLQUFJQyxPQUFRLEVBQTNCO0FBRUEsTUFBTUMsR0FBRyxHQUFHLEVBQVoifQ==\n" + "const xxx = ', something'\nconsole.error(`❌ ${message}`);\n\nconst bbb = ''\n" ], "version": 3 } From 9e2825428284dae5729e4c79e66719577c8b1160 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Wed, 3 Apr 2024 03:03:01 +0000 Subject: [PATCH 063/172] chore: Bump crates --- CHANGELOG.md | 6 +++--- Cargo.lock | 2 +- crates/swc/Cargo.toml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9584a150811c..f8efb8d9d44b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ - **(common)** Fix source index for `inputSourceMap` ([#8800](https://github.com/swc-project/swc/issues/8800)) ([4f9ab81](https://github.com/swc-project/swc/commit/4f9ab8151dad9984c81c72eb10c2afe5313a7591)) +- **(es)** Change default value of `inputSourceMap` to `true` ([#8801](https://github.com/swc-project/swc/issues/8801)) ([9ffcd18](https://github.com/swc-project/swc/commit/9ffcd1823c0abdc741f654b8e1e330cdc06769a1)) + + - **(es/bugfixes)** Fix fn transform in nameless fns ([#8796](https://github.com/swc-project/swc/issues/8796)) ([7ad004e](https://github.com/swc-project/swc/commit/7ad004e1899d98ee8da49909163455b3b622686d)) @@ -1386,7 +1389,4 @@ - **(common)** Fix logic for excluding `FileName` from source maps ([#7900](https://github.com/swc-project/swc/issues/7900)) ([aa64955](https://github.com/swc-project/swc/commit/aa6495519b9271cb21d380c0c5a35fe79d31ee14)) - -- **(es/module)** Make `jsc.paths` fully resolve TypeScript files ([#7901](https://github.com/swc-project/swc/issues/7901)) ([c714dd2](https://github.com/swc-project/swc/commit/c714dd20dedfab60ac75de613d13c0f3af60a6c7)) - diff --git a/Cargo.lock b/Cargo.lock index 5a72b6f3b841..97222394916d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3695,7 +3695,7 @@ dependencies = [ [[package]] name = "swc" -version = "0.273.23" +version = "0.273.24" dependencies = [ "ansi_term", "anyhow", diff --git a/crates/swc/Cargo.toml b/crates/swc/Cargo.toml index 8f86c89a448b..307c5bc890b2 100644 --- a/crates/swc/Cargo.toml +++ b/crates/swc/Cargo.toml @@ -9,7 +9,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc" repository = "https://github.com/swc-project/swc.git" -version = "0.273.23" +version = "0.273.24" [lib] bench = false From 207582ff254a66a9dd4613de6d3cb43c19957b68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Thu, 4 Apr 2024 15:07:49 +0900 Subject: [PATCH 064/172] chore(deps): Update dependencies (#8810) --- Cargo.lock | 172 ++++++++++-------- crates/binding_macros/Cargo.toml | 4 +- crates/dbg-swc/Cargo.toml | 6 +- crates/jsdoc/Cargo.toml | 2 +- crates/preset_env_base/Cargo.toml | 6 +- crates/swc/Cargo.toml | 6 +- crates/swc_bundler/Cargo.toml | 8 +- crates/swc_cached/Cargo.toml | 8 +- crates/swc_cli_impl/Cargo.toml | 6 +- crates/swc_common/Cargo.toml | 10 +- crates/swc_compiler_base/Cargo.toml | 4 +- crates/swc_core/Cargo.toml | 4 +- crates/swc_css_ast/Cargo.toml | 4 +- crates/swc_css_codegen/Cargo.toml | 6 +- crates/swc_css_compat/Cargo.toml | 8 +- crates/swc_css_lints/Cargo.toml | 6 +- crates/swc_css_minifier/Cargo.toml | 2 +- crates/swc_css_parser/Cargo.toml | 4 +- crates/swc_css_prefixer/Cargo.toml | 6 +- crates/swc_css_utils/Cargo.toml | 6 +- crates/swc_ecma_ast/Cargo.toml | 6 +- crates/swc_ecma_codegen/Cargo.toml | 6 +- crates/swc_ecma_compat_bugfixes/Cargo.toml | 2 +- crates/swc_ecma_compat_es2015/Cargo.toml | 14 +- crates/swc_ecma_compat_es2016/Cargo.toml | 2 +- crates/swc_ecma_compat_es2017/Cargo.toml | 4 +- crates/swc_ecma_compat_es2018/Cargo.toml | 4 +- crates/swc_ecma_compat_es2019/Cargo.toml | 2 +- crates/swc_ecma_compat_es2020/Cargo.toml | 4 +- crates/swc_ecma_compat_es2021/Cargo.toml | 2 +- crates/swc_ecma_compat_es2022/Cargo.toml | 2 +- crates/swc_ecma_compat_es3/Cargo.toml | 2 +- crates/swc_ecma_lints/Cargo.toml | 6 +- crates/swc_ecma_loader/Cargo.toml | 10 +- crates/swc_ecma_minifier/Cargo.toml | 8 +- crates/swc_ecma_parser/Cargo.toml | 4 +- crates/swc_ecma_preset_env/Cargo.toml | 6 +- crates/swc_ecma_testing/Cargo.toml | 2 +- crates/swc_ecma_transforms_base/Cargo.toml | 6 +- crates/swc_ecma_transforms_compat/Cargo.toml | 8 +- crates/swc_ecma_transforms_module/Cargo.toml | 10 +- .../Cargo.toml | 8 +- .../swc_ecma_transforms_proposal/Cargo.toml | 6 +- crates/swc_ecma_transforms_react/Cargo.toml | 6 +- .../swc_ecma_transforms_typescript/Cargo.toml | 2 +- crates/swc_ecma_usage_analyzer/Cargo.toml | 8 +- crates/swc_ecma_utils/Cargo.toml | 4 +- crates/swc_ecma_visit/Cargo.toml | 2 +- crates/swc_estree_compat/Cargo.toml | 2 +- crates/swc_graph_analyzer/Cargo.toml | 26 +-- crates/swc_html_ast/Cargo.toml | 4 +- crates/swc_html_codegen/Cargo.toml | 4 +- crates/swc_html_minifier/Cargo.toml | 6 +- crates/swc_html_parser/Cargo.toml | 4 +- crates/swc_html_utils/Cargo.toml | 6 +- crates/swc_node_bundler/Cargo.toml | 8 +- crates/swc_node_comments/Cargo.toml | 2 +- crates/swc_nodejs_common/Cargo.toml | 4 +- crates/swc_plugin/Cargo.toml | 2 +- crates/swc_plugin_proxy/Cargo.toml | 2 +- crates/swc_plugin_runner/Cargo.toml | 10 +- crates/swc_timer/Cargo.toml | 18 +- crates/swc_visit/Cargo.toml | 2 +- crates/swc_xml_ast/Cargo.toml | 4 +- crates/swc_xml_codegen/Cargo.toml | 4 +- crates/swc_xml_parser/Cargo.toml | 4 +- crates/testing/Cargo.toml | 6 +- crates/testing_macros/Cargo.toml | 2 +- xtask/Cargo.toml | 18 +- 69 files changed, 289 insertions(+), 273 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 97222394916d..a03496caef62 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -148,9 +148,9 @@ checksum = "70033777eb8b5124a81a1889416543dddef2de240019b674c81285a2635a7e1e" [[package]] name = "anyhow" -version = "1.0.79" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" [[package]] name = "arbitrary" @@ -210,7 +210,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -221,7 +221,7 @@ checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -246,14 +246,13 @@ dependencies = [ [[package]] name = "auto_impl" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fee3da8ef1276b0bee5dd1c7258010d8fffd31801447323115a25560e1327b89" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ - "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.55", ] [[package]] @@ -335,9 +334,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "bitvec" @@ -619,7 +618,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -966,7 +965,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30d2b3721e861707777e3195b0158f950ae6dc4a27e4d02ff9f67e3eb3de199e" dependencies = [ "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -1019,7 +1018,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -1041,7 +1040,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core 0.20.3", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -1129,7 +1128,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -1211,9 +1210,9 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "either" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" [[package]] name = "encode_unicode" @@ -1268,7 +1267,7 @@ dependencies = [ "darling 0.20.3", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -1363,7 +1362,7 @@ version = "0.1.7" dependencies = [ "proc-macro2", "swc_macros_common", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -1434,7 +1433,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -1541,16 +1540,16 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf760ebf69878d9fd8f110c89703d90ce35095324d1f1edcb595c63945ee757" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "ignore", "walkdir", ] [[package]] name = "h2" -version = "0.3.24" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", @@ -1718,7 +1717,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.5", + "socket2 0.4.10", "tokio", "tower-service", "tracing", @@ -1854,7 +1853,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -1894,9 +1893,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" @@ -2246,7 +2245,7 @@ version = "2.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fc1cb00cde484640da9f01a124edbb013576a6ae9843b23857c940936b76d91" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "ctor", "napi-derive", "napi-sys", @@ -2266,7 +2265,7 @@ dependencies = [ "napi-derive-backend", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -2281,7 +2280,7 @@ dependencies = [ "quote", "regex", "semver 1.0.21", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -2482,7 +2481,7 @@ version = "0.10.62" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8cde4d2d9200ad5909f8dac647e29482e07c3a35de8a13fce7c9c7747ad9f671" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "cfg-if", "foreign-types", "libc", @@ -2499,7 +2498,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -2659,7 +2658,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -2697,7 +2696,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -2853,9 +2852,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ "unicode-ident", ] @@ -3071,9 +3070,9 @@ checksum = "e3a8614ee435691de62bcffcf4a66d91b3594bf1428a5722e79103249a095690" [[package]] name = "reqwest" -version = "0.11.23" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ "base64", "bytes", @@ -3093,9 +3092,11 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", + "sync_wrapper", "system-configuration", "tokio", "tokio-native-tls", @@ -3186,13 +3187,22 @@ version = "0.38.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "errno", "libc", "linux-raw-sys 0.4.13", "windows-sys 0.52.0", ] +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64", +] + [[package]] name = "rustversion" version = "1.0.14" @@ -3214,9 +3224,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" [[package]] name = "ryu-js" @@ -3315,9 +3325,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] @@ -3345,20 +3355,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] name = "serde_json" -version = "1.0.111" +version = "1.0.115" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" +checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" dependencies = [ "itoa", "ryu", @@ -3613,7 +3623,7 @@ checksum = "9cf483ea7e0e3a03d1b91687895814425149ad77facd3e2b6839dde26da98454" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -3656,7 +3666,7 @@ dependencies = [ "quote", "serde", "swc_macros_common", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -3920,7 +3930,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -4007,7 +4017,7 @@ name = "swc_css_codegen" version = "0.151.31" dependencies = [ "auto_impl", - "bitflags 2.4.2", + "bitflags 2.5.0", "rustc-hash", "serde", "swc_atoms", @@ -4027,14 +4037,14 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] name = "swc_css_compat" version = "0.27.32" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "once_cell", "serde", "serde_json", @@ -4164,7 +4174,7 @@ name = "swc_ecma_ast" version = "0.112.6" dependencies = [ "arbitrary", - "bitflags 2.4.2", + "bitflags 2.5.0", "bytecheck", "is-macro", "num-bigint", @@ -4210,7 +4220,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -4575,7 +4585,7 @@ dependencies = [ "swc_ecma_ast", "swc_ecma_parser", "swc_macros_common", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -4619,7 +4629,7 @@ name = "swc_ecma_transforms_base" version = "0.137.16" dependencies = [ "better_scoped_tls", - "bitflags 2.4.2", + "bitflags 2.5.0", "criterion", "indexmap 2.1.0", "once_cell", @@ -4699,7 +4709,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -4708,7 +4718,7 @@ version = "0.180.17" dependencies = [ "Inflector", "anyhow", - "bitflags 2.4.2", + "bitflags 2.5.0", "indexmap 2.1.0", "is-macro", "path-clean 0.1.0", @@ -4927,7 +4937,7 @@ version = "0.1.3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -5028,7 +5038,7 @@ name = "swc_html_codegen" version = "0.42.24" dependencies = [ "auto_impl", - "bitflags 2.4.2", + "bitflags 2.5.0", "rustc-hash", "swc_atoms", "swc_common", @@ -5047,7 +5057,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -5124,7 +5134,7 @@ version = "0.3.9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -5198,7 +5208,7 @@ version = "0.9.16" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -5262,7 +5272,7 @@ version = "0.1.3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -5281,7 +5291,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -5310,7 +5320,7 @@ name = "swc_xml_codegen" version = "0.13.21" dependencies = [ "auto_impl", - "bitflags 2.4.2", + "bitflags 2.5.0", "rustc-hash", "swc_atoms", "swc_common", @@ -5328,7 +5338,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -5368,15 +5378,21 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "002a1b3dbf967edfafc32655d0f377ab0bb7b994aa1d32c8cc7e9b8bf3ebb8f0" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + [[package]] name = "system-configuration" version = "0.5.1" @@ -5518,7 +5534,7 @@ dependencies = [ "quote", "regex", "relative-path", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -5558,7 +5574,7 @@ checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -5681,7 +5697,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -5793,7 +5809,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -6245,7 +6261,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", "wasm-bindgen-shared", ] @@ -6279,7 +6295,7 @@ checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -6940,7 +6956,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] diff --git a/crates/binding_macros/Cargo.toml b/crates/binding_macros/Cargo.toml index 3cd4ca8aee87..d867dacbb856 100644 --- a/crates/binding_macros/Cargo.toml +++ b/crates/binding_macros/Cargo.toml @@ -40,10 +40,10 @@ swc_ecma_transforms = { optional = true, version = "0.229.17", path = "../swc_ec swc_ecma_visit = { optional = true, version = "0.98.7", path = "../swc_ecma_visit" } # Optional deps for the wasm binding macro -anyhow = { optional = true, version = "1.0.71" } +anyhow = { optional = true, version = "1.0.81" } console_error_panic_hook = { optional = true, version = "0.1.7" } js-sys = { optional = true, version = "0.3.59" } -once_cell = { optional = true, version = "1.18.0" } +once_cell = { optional = true, version = "1.19.0" } serde = { optional = true, version = "1", features = ["derive"] } serde-wasm-bindgen = { optional = true, version = "0.4.5" } wasm-bindgen = { optional = true, version = "0.2.91", features = [ diff --git a/crates/dbg-swc/Cargo.toml b/crates/dbg-swc/Cargo.toml index 32249f83bd9d..f2525d10a096 100644 --- a/crates/dbg-swc/Cargo.toml +++ b/crates/dbg-swc/Cargo.toml @@ -12,7 +12,7 @@ bench = false name = "dbg-swc" [dependencies] -anyhow = "1.0.71" +anyhow = "1.0.81" clap = { version = "3", features = ["derive"] } dialoguer = "0.10.2" flate2 = "1.0" @@ -21,8 +21,8 @@ serde = "1" serde_json = "1" sha1 = "0.10.5" tempfile = "3.6.0" -tracing = "0.1.37" -tracing-subscriber = { version = "0.3.17", features = ["fmt", "env-filter"] } +tracing = "0.1.40" +tracing-subscriber = { version = "0.3.18", features = ["fmt", "env-filter"] } url = "2" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } diff --git a/crates/jsdoc/Cargo.toml b/crates/jsdoc/Cargo.toml index 58f17e5095ec..3670a9034c6c 100644 --- a/crates/jsdoc/Cargo.toml +++ b/crates/jsdoc/Cargo.toml @@ -23,7 +23,7 @@ swc_common = { version = "0.33.20", path = "../swc_common" } [dev-dependencies] anyhow = "1" -dashmap = "5.4.0" +dashmap = "5.5.3" swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } diff --git a/crates/preset_env_base/Cargo.toml b/crates/preset_env_base/Cargo.toml index 7eb81430af98..1c12183aebd8 100644 --- a/crates/preset_env_base/Cargo.toml +++ b/crates/preset_env_base/Cargo.toml @@ -14,11 +14,11 @@ bench = false ahash = "0.8.8" anyhow = "1" browserslist-rs = "0.15.0" -dashmap = "5.4.0" -once_cell = "1.18.0" +dashmap = "5.5.3" +once_cell = "1.19.0" semver = { version = "1.0.17", features = ["serde"] } serde = { version = "1", features = ["derive"] } st-map = "0.2.0" -tracing = { version = "0.1.37" } +tracing = { version = "0.1.40" } from_variant = { version = "0.1.7", path = "../from_variant" } diff --git a/crates/swc/Cargo.toml b/crates/swc/Cargo.toml index 307c5bc890b2..5fb859bcd9d3 100644 --- a/crates/swc/Cargo.toml +++ b/crates/swc/Cargo.toml @@ -51,12 +51,12 @@ plugin_transform_host_native = [ [dependencies] anyhow = "1" base64 = "0.21.0" -dashmap = "5.4.0" +dashmap = "5.5.3" either = "1" indexmap = { version = "2.0.0", features = ["serde"] } jsonc-parser = { version = "0.21.0", features = ["serde"] } lru = "0.10.0" -once_cell = "1.18.0" +once_cell = "1.19.0" parking_lot = "0.12.1" pathdiff = "0.2.0" regex = "1" @@ -64,7 +64,7 @@ rustc-hash = "1.1.0" serde = { version = "1", features = ["derive"] } serde_json = "1" sourcemap = "8.0" -tracing = "0.1.37" +tracing = "0.1.40" url = "2.4.0" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } diff --git a/crates/swc_bundler/Cargo.toml b/crates/swc_bundler/Cargo.toml index 756a3a83eb6f..445e9ba34476 100644 --- a/crates/swc_bundler/Cargo.toml +++ b/crates/swc_bundler/Cargo.toml @@ -26,16 +26,16 @@ default = [] [dependencies] anyhow = "1" crc = "2.1.0" -dashmap = { version = "5.4.0", optional = true } +dashmap = { version = "5.5.3", optional = true } indexmap = "2.0.0" -is-macro = "0.3.0" -once_cell = "1.18.0" +is-macro = "0.3.5" +once_cell = "1.19.0" parking_lot = "0.12.1" petgraph = "0.6" radix_fmt = "1" rayon = { version = "1", optional = true } relative-path = "1.2" -tracing = "0.1.37" +tracing = "0.1.40" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_common = { version = "0.33.20", path = "../swc_common" } diff --git a/crates/swc_cached/Cargo.toml b/crates/swc_cached/Cargo.toml index 9f379a1d0577..b6036054059e 100644 --- a/crates/swc_cached/Cargo.toml +++ b/crates/swc_cached/Cargo.toml @@ -14,8 +14,8 @@ bench = false [dependencies] ahash = "0.8.8" -anyhow = "1.0.71" -dashmap = "5.4.0" -once_cell = "1.18.0" +anyhow = "1.0.81" +dashmap = "5.5.3" +once_cell = "1.19.0" regex = "1.5.4" -serde = "1.0.136" +serde = "1.0.197" diff --git a/crates/swc_cli_impl/Cargo.toml b/crates/swc_cli_impl/Cargo.toml index 576017129764..44e4ac254db5 100644 --- a/crates/swc_cli_impl/Cargo.toml +++ b/crates/swc_cli_impl/Cargo.toml @@ -24,7 +24,7 @@ plugin = [ ] [dependencies] -anyhow = "1.0.66" +anyhow = "1.0.81" atty = "0.2.14" clap = { version = "3.2.25", features = ["derive", "wrap_help"] } glob = "0.3.0" @@ -34,10 +34,10 @@ relative-path = "1.6.1" serde = { version = "1", features = ["derive"] } serde_json = { version = "1", features = ["unbounded_depth"] } sourcemap = "8.0.0" -tracing = "0.1.37" +tracing = "0.1.40" tracing-chrome = "0.5.0" tracing-futures = "0.2.5" -tracing-subscriber = { version = "0.3.9", features = ["env-filter"] } +tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } walkdir = "2" swc_core = { version = "0.90.23", features = [ diff --git a/crates/swc_common/Cargo.toml b/crates/swc_common/Cargo.toml index e16a24b769ad..9ca175e3a680 100644 --- a/crates/swc_common/Cargo.toml +++ b/crates/swc_common/Cargo.toml @@ -38,27 +38,27 @@ rkyv-impl = ["__rkyv", "rkyv", "swc_atoms/rkyv-impl", "bytecheck"] [dependencies] ahash = { version = "0.8.8", optional = true } -anyhow = { version = "1.0.71", optional = true } +anyhow = { version = "1.0.81", optional = true } arbitrary = { version = "1", optional = true, features = ["derive"] } atty = { version = "0.2", optional = true } # bytecheck version should be in sync with rkyv version. Do not bump individually. bytecheck = { version = "0.6.10", optional = true } cfg-if = "1.0.0" -either = "1.5" +either = "1.10" new_debug_unreachable = "1.0.4" num-bigint = "0.4" -once_cell = "1.18.0" +once_cell = "1.19.0" parking_lot = { version = "0.12.1", optional = true } rkyv = { version = "=0.7.42", optional = true, features = [ "strict", "validation", ] } rustc-hash = "1.1.0" -serde = { version = "1.0.119", features = ["derive"] } +serde = { version = "1.0.197", features = ["derive"] } siphasher = "0.3.9" sourcemap = { version = "8", optional = true } termcolor = { version = "1.0", optional = true } -tracing = "0.1.37" +tracing = "0.1.40" unicode-width = "0.1.4" url = "2.4.0" diff --git a/crates/swc_compiler_base/Cargo.toml b/crates/swc_compiler_base/Cargo.toml index f2876b0ed798..8520bbf36650 100644 --- a/crates/swc_compiler_base/Cargo.toml +++ b/crates/swc_compiler_base/Cargo.toml @@ -13,11 +13,11 @@ version = "0.7.19" node = ["napi", "napi-derive"] [dependencies] -anyhow = "1.0.75" +anyhow = "1.0.81" base64 = "0.21.0" once_cell = "1" pathdiff = "0.2.0" -serde = { version = "1.0.188", features = ["derive"] } +serde = { version = "1.0.197", features = ["derive"] } sourcemap = "8.0" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } diff --git a/crates/swc_core/Cargo.toml b/crates/swc_core/Cargo.toml index 3394f003abea..949250f89428 100644 --- a/crates/swc_core/Cargo.toml +++ b/crates/swc_core/Cargo.toml @@ -324,7 +324,7 @@ __visit = ["__ecma", "swc_ecma_visit"] [dependencies] # 3rd party dependencies -once_cell = { optional = true, version = "1.18.0" } +once_cell = { optional = true, version = "1.19.0" } # swc_* dependencies binding_macros = { optional = true, version = "0.64.22", path = "../binding_macros" } @@ -376,4 +376,4 @@ swc_plugin_runner = { optional = true, version = "0.106.13", path = "../swc_plug vergen = { version = "8.0.0", default-features = false, features = ["cargo"] } [dev-dependencies] -anyhow = "1.0.71" +anyhow = "1.0.81" diff --git a/crates/swc_css_ast/Cargo.toml b/crates/swc_css_ast/Cargo.toml index 801b67acbaae..ddc5f45d825b 100644 --- a/crates/swc_css_ast/Cargo.toml +++ b/crates/swc_css_ast/Cargo.toml @@ -18,12 +18,12 @@ rkyv-impl = ["__rkyv", "rkyv", "swc_atoms/rkyv-impl", "swc_common/rkyv-impl"] serde-impl = ["serde"] [dependencies] -is-macro = "0.3.0" +is-macro = "0.3.5" rkyv = { version = "=0.7.42", optional = true, features = [ "strict", "validation", ] } -serde = { version = "1.0.127", features = ["derive"], optional = true } +serde = { version = "1.0.197", features = ["derive"], optional = true } string_enum = { version = "0.4.2", path = "../string_enum/" } swc_atoms = { version = "0.6.5", path = "../swc_atoms" } diff --git a/crates/swc_css_codegen/Cargo.toml b/crates/swc_css_codegen/Cargo.toml index 319e6175e5e1..b427fa4e3088 100644 --- a/crates/swc_css_codegen/Cargo.toml +++ b/crates/swc_css_codegen/Cargo.toml @@ -13,10 +13,10 @@ version = "0.151.31" bench = false [dependencies] -auto_impl = "1.1.0" -bitflags = "2.3.2" +auto_impl = "1.2.0" +bitflags = "2.5.0" rustc-hash = "1.1.0" -serde = "1.0.127" +serde = "1.0.197" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_common = { version = "0.33.20", path = "../swc_common" } diff --git a/crates/swc_css_compat/Cargo.toml b/crates/swc_css_compat/Cargo.toml index 5974d35966fe..2179d9937a02 100644 --- a/crates/swc_css_compat/Cargo.toml +++ b/crates/swc_css_compat/Cargo.toml @@ -13,10 +13,10 @@ version = "0.27.32" bench = false [dependencies] -bitflags = "2.3.2" -once_cell = "1.18.0" -serde = { version = "1.0.118", features = ["derive"] } -serde_json = "1.0.61" +bitflags = "2.5.0" +once_cell = "1.19.0" +serde = { version = "1.0.197", features = ["derive"] } +serde_json = "1.0.115" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_common = { version = "0.33.20", path = "../swc_common" } diff --git a/crates/swc_css_lints/Cargo.toml b/crates/swc_css_lints/Cargo.toml index 64283ec2210c..d7706db8e6b1 100644 --- a/crates/swc_css_lints/Cargo.toml +++ b/crates/swc_css_lints/Cargo.toml @@ -13,10 +13,10 @@ version = "0.60.31" bench = false [dependencies] -auto_impl = "1.1.0" +auto_impl = "1.2.0" parking_lot = "0.12.1" rayon = "1.7.0" -serde = { version = "1.0.133", features = ["derive"] } +serde = { version = "1.0.197", features = ["derive"] } thiserror = "1.0.30" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } @@ -26,7 +26,7 @@ swc_css_ast = { version = "0.140.21", path = "../swc_css_ast" } swc_css_visit = { version = "0.139.21", path = "../swc_css_visit" } [dev-dependencies] -serde_json = "1.0.79" +serde_json = "1.0.115" swc_css_parser = { version = "0.150.30", path = "../swc_css_parser" } testing = { version = "0.35.21", path = "../testing" } diff --git a/crates/swc_css_minifier/Cargo.toml b/crates/swc_css_minifier/Cargo.toml index ea375bafbb6d..46088f009646 100644 --- a/crates/swc_css_minifier/Cargo.toml +++ b/crates/swc_css_minifier/Cargo.toml @@ -13,7 +13,7 @@ version = "0.116.32" bench = false [dependencies] -serde = "1.0.118" +serde = "1.0.197" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_common = { version = "0.33.20", path = "../swc_common" } diff --git a/crates/swc_css_parser/Cargo.toml b/crates/swc_css_parser/Cargo.toml index b6f59ed2e496..db6a55a3338b 100644 --- a/crates/swc_css_parser/Cargo.toml +++ b/crates/swc_css_parser/Cargo.toml @@ -17,7 +17,7 @@ debug = [] [dependencies] lexical = "6.1.0" -serde = "1.0.127" +serde = "1.0.197" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_common = { version = "0.33.20", path = "../swc_common" } @@ -25,7 +25,7 @@ swc_css_ast = { version = "0.140.21", path = "../swc_css_ast" } [dev-dependencies] criterion = "0.5" -serde_json = "1.0.66" +serde_json = "1.0.115" swc_css_ast = { version = "0.140.21", path = "../swc_css_ast", features = [ "serde-impl", diff --git a/crates/swc_css_prefixer/Cargo.toml b/crates/swc_css_prefixer/Cargo.toml index b0d652036152..e787bc1af363 100644 --- a/crates/swc_css_prefixer/Cargo.toml +++ b/crates/swc_css_prefixer/Cargo.toml @@ -13,9 +13,9 @@ version = "0.153.35" bench = false [dependencies] -once_cell = "1.18.0" -serde = { version = "1.0.118", features = ["derive"] } -serde_json = "1.0.61" +once_cell = "1.19.0" +serde = { version = "1.0.197", features = ["derive"] } +serde_json = "1.0.115" preset_env_base = { version = "0.4.11", path = "../preset_env_base" } swc_atoms = { version = "0.6.5", path = "../swc_atoms" } diff --git a/crates/swc_css_utils/Cargo.toml b/crates/swc_css_utils/Cargo.toml index 0466d65cd9be..e8aab70958b8 100644 --- a/crates/swc_css_utils/Cargo.toml +++ b/crates/swc_css_utils/Cargo.toml @@ -13,9 +13,9 @@ version = "0.137.21" bench = false [dependencies] -once_cell = "1.18.0" -serde = { version = "1.0.118", features = ["derive"] } -serde_json = "1.0.61" +once_cell = "1.19.0" +serde = { version = "1.0.197", features = ["derive"] } +serde_json = "1.0.115" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_common = { version = "0.33.20", path = "../swc_common" } diff --git a/crates/swc_ecma_ast/Cargo.toml b/crates/swc_ecma_ast/Cargo.toml index d0d6ce0e9af0..e14271cfa873 100644 --- a/crates/swc_ecma_ast/Cargo.toml +++ b/crates/swc_ecma_ast/Cargo.toml @@ -30,10 +30,10 @@ serde-impl = ["serde"] [dependencies] arbitrary = { version = "1", optional = true, features = ["derive"] } -bitflags = "2.3.2" +bitflags = "2.5.0" # bytecheck version should be in sync with rkyv version. Do not bump individually. bytecheck = { version = "0.6.10", optional = true } -is-macro = "0.3.0" +is-macro = "0.3.5" num-bigint = { version = "0.4", features = ["serde"] } phf = { version = "0.11.2", features = ["macros"] } rkyv = { package = "rkyv", version = "=0.7.42", optional = true, features = [ @@ -41,7 +41,7 @@ rkyv = { package = "rkyv", version = "=0.7.42", optional = true, features = [ "validation", ] } scoped-tls = "1.0.1" -serde = { version = "1.0.133", features = ["derive"], optional = true } +serde = { version = "1.0.197", features = ["derive"], optional = true } string_enum = { version = "0.4.2", path = "../string_enum" } swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_common = { version = "0.33.20", path = "../swc_common" } diff --git a/crates/swc_ecma_codegen/Cargo.toml b/crates/swc_ecma_codegen/Cargo.toml index 77e8fcd422be..91ea93df794c 100644 --- a/crates/swc_ecma_codegen/Cargo.toml +++ b/crates/swc_ecma_codegen/Cargo.toml @@ -19,11 +19,11 @@ bench = false [dependencies] memchr = "2.6.1" num-bigint = { version = "0.4", features = ["serde"] } -once_cell = "1.18.0" +once_cell = "1.19.0" rustc-hash = "1.1.0" -serde = "1.0.127" +serde = "1.0.197" sourcemap = "8.0" -tracing = "0.1.37" +tracing = "0.1.40" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_common = { version = "0.33.20", path = "../swc_common" } diff --git a/crates/swc_ecma_compat_bugfixes/Cargo.toml b/crates/swc_ecma_compat_bugfixes/Cargo.toml index 9e2c8e9c0f67..a7b6b41becb8 100644 --- a/crates/swc_ecma_compat_bugfixes/Cargo.toml +++ b/crates/swc_ecma_compat_bugfixes/Cargo.toml @@ -19,7 +19,7 @@ swc_ecma_transforms_base = { version = "0.137.16", path = "../swc_ecma_transform swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } swc_trace_macro = { version = "0.1.3", path = "../swc_trace_macro" } -tracing = "0.1.37" +tracing = "0.1.40" [dev-dependencies] swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } diff --git a/crates/swc_ecma_compat_es2015/Cargo.toml b/crates/swc_ecma_compat_es2015/Cargo.toml index 29b60f8de51b..d45a56981862 100644 --- a/crates/swc_ecma_compat_es2015/Cargo.toml +++ b/crates/swc_ecma_compat_es2015/Cargo.toml @@ -13,26 +13,26 @@ version = "0.4.17" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -arrayvec = "0.7.4" +arrayvec = "0.7.4" indexmap = "2.0.0" -is-macro = "0.3.0" -serde = "1.0.188" -serde_derive = "1.0.188" +is-macro = "0.3.5" +serde = "1.0.197" +serde_derive = "1.0.197" smallvec = "1.8.0" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_common = { version = "0.33.20", path = "../swc_common" } -swc_config = { version = "0.1.11", path = "../swc_config" } +swc_config = { version = "0.1.11", path = "../swc_config" } swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } -swc_ecma_compat_common = { version = "0.4.13", path = "../swc_ecma_compat_common" } +swc_ecma_compat_common = { version = "0.4.13", path = "../swc_ecma_compat_common" } swc_ecma_transforms_base = { version = "0.137.16", path = "../swc_ecma_transforms_base" } swc_ecma_transforms_classes = { version = "0.126.16", path = "../swc_ecma_transforms_classes" } swc_ecma_transforms_macros = { version = "0.5.4", path = "../swc_ecma_transforms_macros" } swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } swc_trace_macro = { version = "0.1.3", path = "../swc_trace_macro" } -tracing = "0.1.37" +tracing = "0.1.40" [dev-dependencies] swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } diff --git a/crates/swc_ecma_compat_es2016/Cargo.toml b/crates/swc_ecma_compat_es2016/Cargo.toml index c6756056063e..f6ff2820bbc0 100644 --- a/crates/swc_ecma_compat_es2016/Cargo.toml +++ b/crates/swc_ecma_compat_es2016/Cargo.toml @@ -21,7 +21,7 @@ swc_ecma_transforms_macros = { version = "0.5.4", path = "../swc_ecma_transforms swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } swc_trace_macro = { version = "0.1.3", path = "../swc_trace_macro" } -tracing = "0.1.37" +tracing = "0.1.40" [dev-dependencies] swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } diff --git a/crates/swc_ecma_compat_es2017/Cargo.toml b/crates/swc_ecma_compat_es2017/Cargo.toml index 6101b360c63f..26151e4e261e 100644 --- a/crates/swc_ecma_compat_es2017/Cargo.toml +++ b/crates/swc_ecma_compat_es2017/Cargo.toml @@ -13,8 +13,8 @@ version = "0.4.16" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -serde = { version = "1.0.188", features = ["derive"] } -tracing = "0.1.37" +serde = { version = "1.0.197", features = ["derive"] } +tracing = "0.1.40" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_common = { version = "0.33.20", path = "../swc_common" } diff --git a/crates/swc_ecma_compat_es2018/Cargo.toml b/crates/swc_ecma_compat_es2018/Cargo.toml index a167b3510369..1073bd6f7b92 100644 --- a/crates/swc_ecma_compat_es2018/Cargo.toml +++ b/crates/swc_ecma_compat_es2018/Cargo.toml @@ -13,8 +13,8 @@ version = "0.4.16" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -serde = { version = "1.0.188", features = ["derive"] } -tracing = "0.1.37" +serde = { version = "1.0.197", features = ["derive"] } +tracing = "0.1.40" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_common = { version = "0.33.20", path = "../swc_common" } diff --git a/crates/swc_ecma_compat_es2019/Cargo.toml b/crates/swc_ecma_compat_es2019/Cargo.toml index f6808d973b91..136e8aa4771d 100644 --- a/crates/swc_ecma_compat_es2019/Cargo.toml +++ b/crates/swc_ecma_compat_es2019/Cargo.toml @@ -13,7 +13,7 @@ version = "0.4.16" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -tracing = "0.1.37" +tracing = "0.1.40" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } diff --git a/crates/swc_ecma_compat_es2020/Cargo.toml b/crates/swc_ecma_compat_es2020/Cargo.toml index 466b7cefd456..d8c6fdc94c38 100644 --- a/crates/swc_ecma_compat_es2020/Cargo.toml +++ b/crates/swc_ecma_compat_es2020/Cargo.toml @@ -13,7 +13,7 @@ version = "0.4.16" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -serde = { version = "1.0.188", features = ["derive"] } +serde = { version = "1.0.197", features = ["derive"] } swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_common = { version = "0.33.20", path = "../swc_common" } swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } @@ -22,7 +22,7 @@ swc_ecma_transforms_base = { version = "0.137.16", path = "../swc_ecma_transform swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" } swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } swc_trace_macro = { version = "0.1.3", path = "../swc_trace_macro" } -tracing = "0.1.37" +tracing = "0.1.40" [dev-dependencies] swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } diff --git a/crates/swc_ecma_compat_es2021/Cargo.toml b/crates/swc_ecma_compat_es2021/Cargo.toml index 001e6d41c354..9fd749a7e804 100644 --- a/crates/swc_ecma_compat_es2021/Cargo.toml +++ b/crates/swc_ecma_compat_es2021/Cargo.toml @@ -13,7 +13,7 @@ version = "0.4.16" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -tracing = "0.1.37" +tracing = "0.1.40" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_common = { version = "0.33.20", path = "../swc_common" } diff --git a/crates/swc_ecma_compat_es2022/Cargo.toml b/crates/swc_ecma_compat_es2022/Cargo.toml index 9f7faa980781..91197c14b010 100644 --- a/crates/swc_ecma_compat_es2022/Cargo.toml +++ b/crates/swc_ecma_compat_es2022/Cargo.toml @@ -13,7 +13,7 @@ version = "0.4.16" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -tracing = "0.1.37" +tracing = "0.1.40" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } diff --git a/crates/swc_ecma_compat_es3/Cargo.toml b/crates/swc_ecma_compat_es3/Cargo.toml index 157ab93f534b..9cb0aac9c217 100644 --- a/crates/swc_ecma_compat_es3/Cargo.toml +++ b/crates/swc_ecma_compat_es3/Cargo.toml @@ -13,7 +13,7 @@ version = "0.4.16" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -tracing = "0.1.37" +tracing = "0.1.40" swc_common = { version = "0.33.20", path = "../swc_common" } swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } diff --git a/crates/swc_ecma_lints/Cargo.toml b/crates/swc_ecma_lints/Cargo.toml index 34005ef24cb1..23785cebc762 100644 --- a/crates/swc_ecma_lints/Cargo.toml +++ b/crates/swc_ecma_lints/Cargo.toml @@ -13,12 +13,12 @@ version = "0.92.19" bench = false [dependencies] -auto_impl = "1.1.0" -dashmap = "5.4.0" +auto_impl = "1.2.0" +dashmap = "5.5.3" parking_lot = "0.12.1" rayon = "1.7.0" regex = "1" -serde = { version = "1.0.133", features = ["derive"] } +serde = { version = "1.0.197", features = ["derive"] } swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_common = { version = "0.33.20", path = "../swc_common", features = [ diff --git a/crates/swc_ecma_loader/Cargo.toml b/crates/swc_ecma_loader/Cargo.toml index 9c902b177ec6..892e491413ee 100644 --- a/crates/swc_ecma_loader/Cargo.toml +++ b/crates/swc_ecma_loader/Cargo.toml @@ -25,16 +25,16 @@ node = ["normpath", "serde_json", "dashmap", "once_cell", "path-clean"] tsc = ["dashmap", "once_cell", "swc_cached"] [dependencies] -anyhow = "1.0.71" -dashmap = { version = "5.4.0", optional = true } +anyhow = "1.0.81" +dashmap = { version = "5.5.3", optional = true } lru = { version = "0.10.0", optional = true } -once_cell = { version = "1.18.0", optional = true } +once_cell = { version = "1.19.0", optional = true } parking_lot = { version = "0.12.1", optional = true } path-clean = { version = "=0.1.0", optional = true } pathdiff = "0.2.1" serde = { version = "1", features = ["derive"] } -serde_json = { version = "1.0.64", optional = true } -tracing = "0.1.37" +serde_json = { version = "1.0.115", optional = true } +tracing = "0.1.40" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_cached = { version = "0.3.19", optional = true, path = "../swc_cached" } diff --git a/crates/swc_ecma_minifier/Cargo.toml b/crates/swc_ecma_minifier/Cargo.toml index 0b49917ac1ca..b9136bd94407 100644 --- a/crates/swc_ecma_minifier/Cargo.toml +++ b/crates/swc_ecma_minifier/Cargo.toml @@ -38,7 +38,7 @@ backtrace = { version = "0.3.61", optional = true } indexmap = "2.0.0" num-bigint = "0.4.3" num_cpus = "1.13.1" -once_cell = "1.18.0" +once_cell = "1.19.0" parking_lot = "0.12.1" pretty_assertions = { version = "1.3", optional = true } radix_fmt = "=1.0.0" @@ -46,9 +46,9 @@ rayon = { version = "1.7.0", optional = true } regex = "1.5.3" rustc-hash = "1.1.0" ryu-js = "1.0.0" -serde = { version = "1.0.118", features = ["derive"] } -serde_json = "1.0.61" -tracing = "0.1.37" +serde = { version = "1.0.197", features = ["derive"] } +serde_json = "1.0.115" +tracing = "0.1.40" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_common = { version = "0.33.20", path = "../swc_common" } diff --git a/crates/swc_ecma_parser/Cargo.toml b/crates/swc_ecma_parser/Cargo.toml index 2b65fec5ce20..8f9a4040eadf 100644 --- a/crates/swc_ecma_parser/Cargo.toml +++ b/crates/swc_ecma_parser/Cargo.toml @@ -24,13 +24,13 @@ typescript = [] verify = ["swc_ecma_visit"] [dependencies] -either = { version = "1.4" } +either = { version = "1.10" } num-bigint = "0.4" num-traits = "0.2.15" serde = { version = "1", features = ["derive"] } smallvec = "1.8.0" smartstring = "1" -tracing = "0.1.37" +tracing = "0.1.40" typed-arena = "2.0.1" new_debug_unreachable = "1.0.4" diff --git a/crates/swc_ecma_preset_env/Cargo.toml b/crates/swc_ecma_preset_env/Cargo.toml index ddfb5024ea16..bcb8150c02d6 100644 --- a/crates/swc_ecma_preset_env/Cargo.toml +++ b/crates/swc_ecma_preset_env/Cargo.toml @@ -2,11 +2,11 @@ authors = ["강동윤 "] description = "preset-env for the swc" documentation = "https://rustdoc.swc.rs/swc_ecma_preset_env/" -repository = "https://github.com/swc-project/swc" edition = "2021" include = ["Cargo.toml", "src/**/*.rs", "src/**/*.json", "data/**/*.json"] license = "Apache-2.0" name = "swc_ecma_preset_env" +repository = "https://github.com/swc-project/swc" version = "0.206.17" [lib] @@ -18,9 +18,9 @@ serde-impl = ["serde"] [dependencies] anyhow = "1" -dashmap = "5.4.0" +dashmap = "5.5.3" indexmap = "2.0.0" -once_cell = "1.18.0" +once_cell = "1.19.0" semver = { version = "1.0.17", features = ["serde"] } serde = { version = "1", features = ["derive"], optional = true } serde_json = "1" diff --git a/crates/swc_ecma_testing/Cargo.toml b/crates/swc_ecma_testing/Cargo.toml index 2c5be32c03bb..7bca189ad0b2 100644 --- a/crates/swc_ecma_testing/Cargo.toml +++ b/crates/swc_ecma_testing/Cargo.toml @@ -15,6 +15,6 @@ bench = false anyhow = "1" hex = "0.4" sha2 = "0.10" -tracing = "0.1.37" +tracing = "0.1.40" testing = { version = "0.35.21", path = "../testing" } diff --git a/crates/swc_ecma_transforms_base/Cargo.toml b/crates/swc_ecma_transforms_base/Cargo.toml index 49211fbe803a..91094b2d91cb 100644 --- a/crates/swc_ecma_transforms_base/Cargo.toml +++ b/crates/swc_ecma_transforms_base/Cargo.toml @@ -18,15 +18,15 @@ concurrent-renamer = ["rayon"] [dependencies] better_scoped_tls = { version = "0.1.1", path = "../better_scoped_tls" } -bitflags = "2.3.2" +bitflags = "2.5.0" indexmap = "2.0.0" -once_cell = "1.18.0" +once_cell = "1.19.0" phf = { version = "0.11", features = ["macros"] } rayon = { version = "1", optional = true } rustc-hash = "1.1.0" serde = { version = "1", features = ["derive"] } smallvec = "1.8.0" -tracing = "0.1.37" +tracing = "0.1.40" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_common = { version = "0.33.20", path = "../swc_common" } diff --git a/crates/swc_ecma_transforms_compat/Cargo.toml b/crates/swc_ecma_transforms_compat/Cargo.toml index 197eae3010d6..b0e456f17f08 100644 --- a/crates/swc_ecma_transforms_compat/Cargo.toml +++ b/crates/swc_ecma_transforms_compat/Cargo.toml @@ -22,12 +22,12 @@ concurrent = [ [dependencies] arrayvec = "0.7.2" indexmap = "2.0.0" -is-macro = "0.3.0" +is-macro = "0.3.5" num-bigint = "0.4" rayon = { version = "1.7.0", optional = true } -serde = { version = "1.0.118", features = ["derive"] } +serde = { version = "1.0.197", features = ["derive"] } smallvec = "1.8.0" -tracing = "0.1.37" +tracing = "0.1.40" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_common = { version = "0.33.20", path = "../swc_common" } @@ -52,7 +52,7 @@ swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } swc_trace_macro = { version = "0.1.3", path = "../swc_trace_macro" } [dev-dependencies] -serde_json = "1.0.66" +serde_json = "1.0.115" swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } swc_ecma_transforms_testing = { version = "0.140.16", path = "../swc_ecma_transforms_testing" } diff --git a/crates/swc_ecma_transforms_module/Cargo.toml b/crates/swc_ecma_transforms_module/Cargo.toml index 93c14957a9dc..39a1c691be33 100644 --- a/crates/swc_ecma_transforms_module/Cargo.toml +++ b/crates/swc_ecma_transforms_module/Cargo.toml @@ -14,15 +14,15 @@ bench = false [dependencies] Inflector = "0.11.4" -anyhow = "1.0.71" -bitflags = "2.3.2" +anyhow = "1.0.81" +bitflags = "2.5.0" indexmap = "2.0.0" -is-macro = "0.3.0" +is-macro = "0.3.5" path-clean = "0.1.0" pathdiff = "0.2.0" regex = "1" -serde = { version = "1.0.118", features = ["derive"] } -tracing = "0.1.37" +serde = { version = "1.0.197", features = ["derive"] } +tracing = "0.1.40" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_cached = { version = "0.3.19", path = "../swc_cached" } diff --git a/crates/swc_ecma_transforms_optimization/Cargo.toml b/crates/swc_ecma_transforms_optimization/Cargo.toml index 1d6fd1ec8219..df78d7caa113 100644 --- a/crates/swc_ecma_transforms_optimization/Cargo.toml +++ b/crates/swc_ecma_transforms_optimization/Cargo.toml @@ -22,14 +22,14 @@ concurrent = [ debug = [] [dependencies] -dashmap = "5.4.0" +dashmap = "5.5.3" indexmap = "2.0.0" -once_cell = "1.18.0" +once_cell = "1.19.0" petgraph = "0.6" rayon = { version = "1.7.0", optional = true } rustc-hash = "1.1.0" -serde_json = "1.0.61" -tracing = "0.1.37" +serde_json = "1.0.115" +tracing = "0.1.40" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_common = { version = "0.33.20", path = "../swc_common" } diff --git a/crates/swc_ecma_transforms_proposal/Cargo.toml b/crates/swc_ecma_transforms_proposal/Cargo.toml index 830d58fab155..25eb0f05ce68 100644 --- a/crates/swc_ecma_transforms_proposal/Cargo.toml +++ b/crates/swc_ecma_transforms_proposal/Cargo.toml @@ -17,9 +17,9 @@ default = [] multi-module = ["swc_ecma_loader"] [dependencies] -either = "1.6.1" +either = "1.10.0" rustc-hash = "1" -serde = { version = "1.0.118", features = ["derive"] } +serde = { version = "1.0.197", features = ["derive"] } smallvec = "1.8.0" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } @@ -33,7 +33,7 @@ swc_ecma_utils = { version = "0.127.13", path = "../swc_ecma_utils" swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } [dev-dependencies] -serde_json = "1.0.66" +serde_json = "1.0.115" swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } swc_ecma_transforms_compat = { version = "0.163.17", path = "../swc_ecma_transforms_compat" } diff --git a/crates/swc_ecma_transforms_react/Cargo.toml b/crates/swc_ecma_transforms_react/Cargo.toml index 2e59b669c012..0c4b9b89daf4 100644 --- a/crates/swc_ecma_transforms_react/Cargo.toml +++ b/crates/swc_ecma_transforms_react/Cargo.toml @@ -19,11 +19,11 @@ serde-impl = ["serde"] [dependencies] base64 = "0.21.0" -dashmap = "5.4.0" +dashmap = "5.5.3" indexmap = "2.0.0" -once_cell = "1.18.0" +once_cell = "1.19.0" rayon = { version = "1.7.0", optional = true } -serde = { version = "1.0.118", features = ["derive"], optional = true } +serde = { version = "1.0.197", features = ["derive"], optional = true } sha-1 = "=0.10.0" string_enum = { version = "0.4.2", path = "../string_enum" } diff --git a/crates/swc_ecma_transforms_typescript/Cargo.toml b/crates/swc_ecma_transforms_typescript/Cargo.toml index e05b013fc960..4c6ef1a3bf00 100644 --- a/crates/swc_ecma_transforms_typescript/Cargo.toml +++ b/crates/swc_ecma_transforms_typescript/Cargo.toml @@ -13,7 +13,7 @@ version = "0.188.17" bench = false [dependencies] -serde = { version = "1.0.118", features = ["derive"] } +serde = { version = "1.0.197", features = ["derive"] } ryu-js = "1.0.0" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } diff --git a/crates/swc_ecma_usage_analyzer/Cargo.toml b/crates/swc_ecma_usage_analyzer/Cargo.toml index 694cce9dc057..52a694da0f15 100644 --- a/crates/swc_ecma_usage_analyzer/Cargo.toml +++ b/crates/swc_ecma_usage_analyzer/Cargo.toml @@ -9,9 +9,9 @@ name = "swc_ecma_usage_analyzer" repository = "https://github.com/swc-project/swc.git" version = "0.23.13" - [package.metadata.docs.rs] - all-features = true - rustdoc-args = ["--cfg", "docsrs"] + [package.metadata.docs.rs] + all-features = true + rustdoc-args = ["--cfg", "docsrs"] [lib] bench = false @@ -24,7 +24,7 @@ trace-ast = [] [dependencies] indexmap = "2.0.0" rustc-hash = "1.1.0" -tracing = "0.1.37" +tracing = "0.1.40" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_common = { version = "0.33.20", path = "../swc_common" } diff --git a/crates/swc_ecma_utils/Cargo.toml b/crates/swc_ecma_utils/Cargo.toml index d1e1d990d9d6..335f3ba68ac2 100644 --- a/crates/swc_ecma_utils/Cargo.toml +++ b/crates/swc_ecma_utils/Cargo.toml @@ -22,10 +22,10 @@ concurrent = ["swc_common/concurrent", "rayon"] [dependencies] indexmap = "2.0.0" num_cpus = "1.13.1" -once_cell = "1.18.0" +once_cell = "1.19.0" rayon = { version = "1.7.0", optional = true } rustc-hash = "1.1.0" -tracing = "0.1.37" +tracing = "0.1.40" unicode-id = "0.3" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } diff --git a/crates/swc_ecma_visit/Cargo.toml b/crates/swc_ecma_visit/Cargo.toml index 05f5af11b4e6..fccfdbd91c4b 100644 --- a/crates/swc_ecma_visit/Cargo.toml +++ b/crates/swc_ecma_visit/Cargo.toml @@ -23,7 +23,7 @@ path = [] [dependencies] num-bigint = { version = "0.4", features = ["serde"] } serde = { version = "1", optional = true } -tracing = "0.1.37" +tracing = "0.1.40" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_common = { version = "0.33.20", path = "../swc_common" } diff --git a/crates/swc_estree_compat/Cargo.toml b/crates/swc_estree_compat/Cargo.toml index 68a010f68cca..e8ed34175f0d 100644 --- a/crates/swc_estree_compat/Cargo.toml +++ b/crates/swc_estree_compat/Cargo.toml @@ -21,7 +21,7 @@ anyhow = "1" copyless = "0.1.5" rayon = "1.7.0" serde = { version = "1", features = ["derive"] } -serde_json = "1.0.62" +serde_json = "1.0.115" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_common = { version = "0.33.20", path = "../swc_common", features = [ diff --git a/crates/swc_graph_analyzer/Cargo.toml b/crates/swc_graph_analyzer/Cargo.toml index 00999286cb4c..3a59f47c2c50 100644 --- a/crates/swc_graph_analyzer/Cargo.toml +++ b/crates/swc_graph_analyzer/Cargo.toml @@ -1,22 +1,22 @@ [package] -authors = ["강동윤 "] +authors = ["강동윤 "] description = "Graph analyzer" -edition = "2021" -include = ["Cargo.toml", "src/**/*.rs"] -license = "Apache-2.0" -name = "swc_graph_analyzer" -repository = "https://github.com/swc-project/swc.git" -version = "0.22.22" +edition = "2021" +include = ["Cargo.toml", "src/**/*.rs"] +license = "Apache-2.0" +name = "swc_graph_analyzer" +repository = "https://github.com/swc-project/swc.git" +version = "0.22.22" [lib] bench = false [dependencies] -auto_impl = "1.1.0" -petgraph = "0.6.0" -swc_common = {version = "0.33.20", path = "../swc_common/"} -swc_fast_graph = {version = "0.21.20", path = "../swc_fast_graph/"} -tracing = "0.1.37" +auto_impl = "1.2.0" +petgraph = "0.6.0" +swc_common = { version = "0.33.20", path = "../swc_common/" } +swc_fast_graph = { version = "0.21.20", path = "../swc_fast_graph/" } +tracing = "0.1.40" [dev-dependencies] -testing = {version = "0.35.21", path = "../testing"} +testing = { version = "0.35.21", path = "../testing" } diff --git a/crates/swc_html_ast/Cargo.toml b/crates/swc_html_ast/Cargo.toml index ff6197325897..176c10ce4457 100644 --- a/crates/swc_html_ast/Cargo.toml +++ b/crates/swc_html_ast/Cargo.toml @@ -20,12 +20,12 @@ rkyv-impl = ["__rkyv", "rkyv", "swc_atoms/rkyv-impl", "swc_common/rkyv-impl"] serde-impl = ["serde"] [dependencies] -is-macro = "0.3.0" +is-macro = "0.3.5" rkyv = { version = "=0.7.42", optional = true, features = [ "strict", "validation", ] } -serde = { version = "1.0.127", features = ["derive"], optional = true } +serde = { version = "1.0.197", features = ["derive"], optional = true } string_enum = { version = "0.4.2", path = "../string_enum/" } swc_atoms = { version = "0.6.5", path = "../swc_atoms" } diff --git a/crates/swc_html_codegen/Cargo.toml b/crates/swc_html_codegen/Cargo.toml index 4cec8114a21f..50362ac99c59 100644 --- a/crates/swc_html_codegen/Cargo.toml +++ b/crates/swc_html_codegen/Cargo.toml @@ -16,8 +16,8 @@ version = "0.42.24" bench = false [dependencies] -auto_impl = "1.1.0" -bitflags = "2.3.2" +auto_impl = "1.2.0" +bitflags = "2.5.0" rustc-hash = "1.1.0" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } diff --git a/crates/swc_html_minifier/Cargo.toml b/crates/swc_html_minifier/Cargo.toml index 5f0fd3d3ca2e..b5e8532392c3 100644 --- a/crates/swc_html_minifier/Cargo.toml +++ b/crates/swc_html_minifier/Cargo.toml @@ -16,9 +16,9 @@ version = "0.134.17" bench = false [dependencies] -once_cell = "1.18.0" -serde = { version = "1.0.118", features = ["derive"] } -serde_json = "1.0.61" +once_cell = "1.19.0" +serde = { version = "1.0.197", features = ["derive"] } +serde_json = "1.0.115" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_cached = { version = "0.3.19", path = "../swc_cached" } diff --git a/crates/swc_html_parser/Cargo.toml b/crates/swc_html_parser/Cargo.toml index bdd742194e65..0c0391d6c068 100644 --- a/crates/swc_html_parser/Cargo.toml +++ b/crates/swc_html_parser/Cargo.toml @@ -26,8 +26,8 @@ swc_html_utils = { version = "0.18.19", path = "../swc_html_utils" } [dev-dependencies] criterion = "0.5" -serde = "1.0.127" -serde_json = "1.0.66" +serde = "1.0.197" +serde_json = "1.0.115" swc_html_ast = { version = "0.33.19", path = "../swc_html_ast", features = [ "serde-impl", diff --git a/crates/swc_html_utils/Cargo.toml b/crates/swc_html_utils/Cargo.toml index e64a3208bb16..98cfbe39a702 100644 --- a/crates/swc_html_utils/Cargo.toml +++ b/crates/swc_html_utils/Cargo.toml @@ -16,9 +16,9 @@ version = "0.18.19" bench = false [dependencies] -once_cell = "1.18.0" -serde = { version = "1.0.118", features = ["derive"] } -serde_json = "1.0.61" +once_cell = "1.19.0" +serde = { version = "1.0.197", features = ["derive"] } +serde_json = "1.0.115" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_common = { version = "0.33.20", path = "../swc_common" } diff --git a/crates/swc_node_bundler/Cargo.toml b/crates/swc_node_bundler/Cargo.toml index 33770d95ca6e..317a61a68698 100644 --- a/crates/swc_node_bundler/Cargo.toml +++ b/crates/swc_node_bundler/Cargo.toml @@ -20,13 +20,13 @@ swc_v2 = ["serde-impl"] [dependencies] anyhow = "1" -dashmap = "5.4.0" -is-macro = "0.3.0" -once_cell = "1.18.0" +dashmap = "5.5.3" +is-macro = "0.3.5" +once_cell = "1.19.0" regex = "1" serde = { version = "1", features = ["derive"], optional = true } serde_json = "1" -tracing = "0.1.37" +tracing = "0.1.40" string_enum = { version = "0.4.2", path = "../string_enum" } swc = { version = "0.273.22", path = "../swc" } diff --git a/crates/swc_node_comments/Cargo.toml b/crates/swc_node_comments/Cargo.toml index 5b742f9c2eba..44c64331cc91 100644 --- a/crates/swc_node_comments/Cargo.toml +++ b/crates/swc_node_comments/Cargo.toml @@ -15,7 +15,7 @@ version = "0.20.19" bench = false [dependencies] -dashmap = "5.4.0" +dashmap = "5.5.3" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_common = { version = "0.33.20", path = "../swc_common" } diff --git a/crates/swc_nodejs_common/Cargo.toml b/crates/swc_nodejs_common/Cargo.toml index d402e5b14547..2dd0f05ce162 100644 --- a/crates/swc_nodejs_common/Cargo.toml +++ b/crates/swc_nodejs_common/Cargo.toml @@ -19,5 +19,5 @@ napi = { version = "2", default-features = false, features = [ ] } serde = { version = "1", features = ["derive"] } serde_json = { version = "1", features = ["unbounded_depth"] } -tracing = { version = "0.1.37" } -tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } +tracing = { version = "0.1.40" } +tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } diff --git a/crates/swc_plugin/Cargo.toml b/crates/swc_plugin/Cargo.toml index f7cebf161923..b891c2e5a6ea 100644 --- a/crates/swc_plugin/Cargo.toml +++ b/crates/swc_plugin/Cargo.toml @@ -16,4 +16,4 @@ version = "0.90.0" bench = false [dependencies] -once_cell = "1.18.0" +once_cell = "1.19.0" diff --git a/crates/swc_plugin_proxy/Cargo.toml b/crates/swc_plugin_proxy/Cargo.toml index 66c3c50cccce..0bada6078556 100644 --- a/crates/swc_plugin_proxy/Cargo.toml +++ b/crates/swc_plugin_proxy/Cargo.toml @@ -26,7 +26,7 @@ rkyv = { package = "rkyv", version = "=0.7.42", optional = true, features = [ "strict", "validation", ] } -tracing = "0.1.37" +tracing = "0.1.40" better_scoped_tls = { version = "0.1.1", path = "../better_scoped_tls" } swc_common = { version = "0.33.20", path = "../swc_common" } diff --git a/crates/swc_plugin_runner/Cargo.toml b/crates/swc_plugin_runner/Cargo.toml index e11a8f55700b..5acadbeff944 100644 --- a/crates/swc_plugin_runner/Cargo.toml +++ b/crates/swc_plugin_runner/Cargo.toml @@ -46,15 +46,15 @@ __rkyv = [] rkyv-impl = ["__rkyv", "swc_common/plugin-rt", "swc_plugin_proxy/plugin-rt"] [dependencies] -anyhow = "1.0.71" +anyhow = "1.0.81" enumset = "1.1.2" futures = { version = "0.3" } -once_cell = "1.18.0" +once_cell = "1.19.0" parking_lot = "0.12.1" -serde = { version = "1.0.126", features = ["derive"] } -serde_json = "1.0.64" +serde = { version = "1.0.197", features = ["derive"] } +serde_json = "1.0.115" tokio = { version = "1", default-features = false, optional = true } -tracing = "0.1.37" +tracing = "0.1.40" wasmer = { version = "4.2.5", default-features = false } wasmer-wasix = { version = "0.18.0", default-features = false } diff --git a/crates/swc_timer/Cargo.toml b/crates/swc_timer/Cargo.toml index 535cca178439..14b9b6f18774 100644 --- a/crates/swc_timer/Cargo.toml +++ b/crates/swc_timer/Cargo.toml @@ -1,18 +1,18 @@ [package] -authors = ["강동윤 "] -description = "Timings for swc" +authors = ["강동윤 "] +description = "Timings for swc" documentation = "https://rustdoc.swc.rs/swc_timer/" -edition = "2021" -license = "Apache-2.0" -name = "swc_timer" -repository = "https://github.com/swc-project/swc.git" -version = "0.21.21" +edition = "2021" +license = "Apache-2.0" +name = "swc_timer" +repository = "https://github.com/swc-project/swc.git" +version = "0.21.21" [lib] bench = false [dependencies] -tracing = "0.1.37" +tracing = "0.1.40" [dev-dependencies] -testing = {version = "0.35.21", path = "../testing"} +testing = { version = "0.35.21", path = "../testing" } diff --git a/crates/swc_visit/Cargo.toml b/crates/swc_visit/Cargo.toml index 3358f0874424..770c7f74f83d 100644 --- a/crates/swc_visit/Cargo.toml +++ b/crates/swc_visit/Cargo.toml @@ -14,6 +14,6 @@ bench = false path = [] [dependencies] -either = "1.5.3" +either = "1.10.0" swc_visit_macros = { version = "0.5.11", path = "../swc_visit_macros" } diff --git a/crates/swc_xml_ast/Cargo.toml b/crates/swc_xml_ast/Cargo.toml index a6108061ccd5..c8d620e7a1fd 100644 --- a/crates/swc_xml_ast/Cargo.toml +++ b/crates/swc_xml_ast/Cargo.toml @@ -18,8 +18,8 @@ bench = false serde-impl = ["serde"] [dependencies] -is-macro = "0.3.0" -serde = { version = "1.0.127", features = ["derive"], optional = true } +is-macro = "0.3.5" +serde = { version = "1.0.197", features = ["derive"], optional = true } string_enum = { version = "0.4.2", path = "../string_enum/" } swc_atoms = { version = "0.6.5", path = "../swc_atoms" } diff --git a/crates/swc_xml_codegen/Cargo.toml b/crates/swc_xml_codegen/Cargo.toml index 2f586ddbf9c1..e7fa302dbf6b 100644 --- a/crates/swc_xml_codegen/Cargo.toml +++ b/crates/swc_xml_codegen/Cargo.toml @@ -16,8 +16,8 @@ version = "0.13.21" bench = false [dependencies] -auto_impl = "1.1.0" -bitflags = "2.3.2" +auto_impl = "1.2.0" +bitflags = "2.5.0" rustc-hash = "1.1.0" swc_atoms = { version = "0.6.5", path = "../swc_atoms" } diff --git a/crates/swc_xml_parser/Cargo.toml b/crates/swc_xml_parser/Cargo.toml index f01e4ca46375..c27007b45ba3 100644 --- a/crates/swc_xml_parser/Cargo.toml +++ b/crates/swc_xml_parser/Cargo.toml @@ -24,8 +24,8 @@ swc_common = { version = "0.33.20", path = "../swc_common" } swc_xml_ast = { version = "0.12.19", path = "../swc_xml_ast" } [dev-dependencies] -serde = "1.0.127" -serde_json = "1.0.66" +serde = "1.0.197" +serde_json = "1.0.115" swc_xml_ast = { version = "0.12.19", path = "../swc_xml_ast", features = [ "serde-impl", diff --git a/crates/testing/Cargo.toml b/crates/testing/Cargo.toml index 953f52b80daf..d1248e993f3a 100644 --- a/crates/testing/Cargo.toml +++ b/crates/testing/Cargo.toml @@ -15,13 +15,13 @@ bench = false ansi_term = "0.12.1" cargo_metadata = "0.15.4" difference = "2" -once_cell = "1.18.0" +once_cell = "1.19.0" pretty_assertions = "1.3" regex = "1" serde = "1" serde_json = "1" -tracing = "0.1.37" -tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } +tracing = "0.1.40" +tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } swc_common = { version = "0.33.20", path = "../swc_common", features = [ "tty-emitter", diff --git a/crates/testing_macros/Cargo.toml b/crates/testing_macros/Cargo.toml index b15244ad41a4..ba0788dfaf10 100644 --- a/crates/testing_macros/Cargo.toml +++ b/crates/testing_macros/Cargo.toml @@ -19,7 +19,7 @@ proc-macro = true [dependencies] anyhow = "1" glob = "0.3" -once_cell = "1.18.0" +once_cell = "1.19.0" proc-macro2 = "1.0.24" quote = "1" regex = "1" diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml index 28879251764b..de220f824964 100644 --- a/xtask/Cargo.toml +++ b/xtask/Cargo.toml @@ -11,13 +11,13 @@ version = "0.1.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -anyhow = "1.0.75" +anyhow = "1.0.81" cargo_metadata = "0.18.0" -chrono = "0.4.31" -clap = { version = "4.4.6", features = ["derive"] } -semver = "1.0.20" -serde = "1.0.188" -serde_derive = "1.0.188" -serde_json = "1.0.107" -toml = "0.8.2" -walkdir = "2.4.0" +chrono = "0.4.31" +clap = { version = "4.4.6", features = ["derive"] } +semver = "1.0.20" +serde = "1.0.197" +serde_derive = "1.0.197" +serde_json = "1.0.115" +toml = "0.8.2" +walkdir = "2.4.0" From d1eb7b81367f100394449595b510856645fcecb6 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Thu, 4 Apr 2024 06:12:30 +0000 Subject: [PATCH 065/172] chore: Bump crates --- CHANGELOG.md | 11 +-- Cargo.lock | 90 +++++++++---------- crates/binding_macros/Cargo.toml | 2 +- crates/dbg-swc/Cargo.toml | 2 +- crates/preset_env_base/Cargo.toml | 2 +- crates/swc_bundler/Cargo.toml | 2 +- crates/swc_cached/Cargo.toml | 2 +- crates/swc_cli_impl/Cargo.toml | 2 +- crates/swc_compiler_base/Cargo.toml | 2 +- crates/swc_css_ast/Cargo.toml | 2 +- crates/swc_css_codegen/Cargo.toml | 2 +- crates/swc_css_compat/Cargo.toml | 2 +- crates/swc_css_lints/Cargo.toml | 2 +- crates/swc_css_minifier/Cargo.toml | 2 +- crates/swc_css_parser/Cargo.toml | 2 +- crates/swc_css_prefixer/Cargo.toml | 2 +- crates/swc_css_utils/Cargo.toml | 2 +- crates/swc_ecma_ast/Cargo.toml | 2 +- crates/swc_ecma_codegen/Cargo.toml | 2 +- crates/swc_ecma_compat_es2015/Cargo.toml | 2 +- crates/swc_ecma_compat_es2017/Cargo.toml | 2 +- crates/swc_ecma_compat_es2018/Cargo.toml | 2 +- crates/swc_ecma_compat_es2020/Cargo.toml | 2 +- crates/swc_ecma_lints/Cargo.toml | 2 +- crates/swc_ecma_loader/Cargo.toml | 2 +- crates/swc_ecma_minifier/Cargo.toml | 2 +- crates/swc_ecma_preset_env/Cargo.toml | 2 +- crates/swc_ecma_transforms_base/Cargo.toml | 2 +- crates/swc_ecma_transforms_compat/Cargo.toml | 2 +- crates/swc_ecma_transforms_module/Cargo.toml | 2 +- .../Cargo.toml | 2 +- .../swc_ecma_transforms_proposal/Cargo.toml | 2 +- crates/swc_ecma_transforms_react/Cargo.toml | 2 +- .../swc_ecma_transforms_typescript/Cargo.toml | 2 +- crates/swc_ecma_utils/Cargo.toml | 2 +- crates/swc_estree_compat/Cargo.toml | 2 +- crates/swc_html_ast/Cargo.toml | 2 +- crates/swc_html_minifier/Cargo.toml | 2 +- crates/swc_html_parser/Cargo.toml | 2 +- crates/swc_html_utils/Cargo.toml | 2 +- crates/swc_node_bundler/Cargo.toml | 2 +- crates/swc_plugin/Cargo.toml | 2 +- crates/swc_visit/Cargo.toml | 2 +- crates/swc_xml_ast/Cargo.toml | 2 +- crates/swc_xml_parser/Cargo.toml | 2 +- crates/testing/Cargo.toml | 2 +- crates/testing_macros/Cargo.toml | 2 +- 47 files changed, 93 insertions(+), 98 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8efb8d9d44b..e7950e00b979 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,9 @@ +- **(deps)** Update dependencies ([#8810](https://github.com/swc-project/swc/issues/8810)) ([207582f](https://github.com/swc-project/swc/commit/207582ff254a66a9dd4613de6d3cb43c19957b68)) + + - **(es/transforms)** Add `repository` field to `swc_ecma_ext_transforms` ([#8793](https://github.com/swc-project/swc/issues/8793)) ([37f0a79](https://github.com/swc-project/swc/commit/37f0a7994bdf7d90c30a00f70c6dde97b4d89c8f)) ### Performance @@ -1381,12 +1384,4 @@ - **(es/codegen)** Add an option to print `assert` for import attributes ([#7914](https://github.com/swc-project/swc/issues/7914)) ([ee75756](https://github.com/swc-project/swc/commit/ee7575695de6dad140457ffb8bb8f0ac80c4dcdc)) -## [1.3.82] - 2023-09-01 - -### Bug Fixes - - - -- **(common)** Fix logic for excluding `FileName` from source maps ([#7900](https://github.com/swc-project/swc/issues/7900)) ([aa64955](https://github.com/swc-project/swc/commit/aa6495519b9271cb21d380c0c5a35fe79d31ee14)) - diff --git a/Cargo.lock b/Cargo.lock index a03496caef62..58f9ec49e236 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -309,7 +309,7 @@ dependencies = [ [[package]] name = "binding_macros" -version = "0.64.22" +version = "0.64.23" dependencies = [ "anyhow", "console_error_panic_hook", @@ -1064,7 +1064,7 @@ checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] name = "dbg-swc" -version = "0.91.25" +version = "0.91.26" dependencies = [ "anyhow", "clap 3.2.25", @@ -2792,7 +2792,7 @@ dependencies = [ [[package]] name = "preset_env_base" -version = "0.4.11" +version = "0.4.12" dependencies = [ "ahash 0.8.8", "anyhow", @@ -3775,7 +3775,7 @@ dependencies = [ [[package]] name = "swc_bundler" -version = "0.225.17" +version = "0.225.18" dependencies = [ "anyhow", "crc", @@ -3818,7 +3818,7 @@ dependencies = [ [[package]] name = "swc_cached" -version = "0.3.19" +version = "0.3.20" dependencies = [ "ahash 0.8.8", "anyhow", @@ -3830,7 +3830,7 @@ dependencies = [ [[package]] name = "swc_cli_impl" -version = "0.8.23" +version = "0.8.24" dependencies = [ "anyhow", "assert_cmd", @@ -3889,7 +3889,7 @@ dependencies = [ [[package]] name = "swc_compiler_base" -version = "0.7.19" +version = "0.7.20" dependencies = [ "anyhow", "base64", @@ -4002,7 +4002,7 @@ dependencies = [ [[package]] name = "swc_css_ast" -version = "0.140.21" +version = "0.140.22" dependencies = [ "is-macro", "rkyv", @@ -4014,7 +4014,7 @@ dependencies = [ [[package]] name = "swc_css_codegen" -version = "0.151.31" +version = "0.151.32" dependencies = [ "auto_impl", "bitflags 2.5.0", @@ -4042,7 +4042,7 @@ dependencies = [ [[package]] name = "swc_css_compat" -version = "0.27.32" +version = "0.27.33" dependencies = [ "bitflags 2.5.0", "once_cell", @@ -4060,7 +4060,7 @@ dependencies = [ [[package]] name = "swc_css_lints" -version = "0.60.31" +version = "0.60.32" dependencies = [ "auto_impl", "parking_lot", @@ -4079,7 +4079,7 @@ dependencies = [ [[package]] name = "swc_css_minifier" -version = "0.116.32" +version = "0.116.33" dependencies = [ "criterion", "serde", @@ -4113,7 +4113,7 @@ dependencies = [ [[package]] name = "swc_css_parser" -version = "0.150.30" +version = "0.150.31" dependencies = [ "criterion", "lexical", @@ -4129,7 +4129,7 @@ dependencies = [ [[package]] name = "swc_css_prefixer" -version = "0.153.35" +version = "0.153.36" dependencies = [ "once_cell", "preset_env_base", @@ -4147,7 +4147,7 @@ dependencies = [ [[package]] name = "swc_css_utils" -version = "0.137.21" +version = "0.137.22" dependencies = [ "once_cell", "serde", @@ -4171,7 +4171,7 @@ dependencies = [ [[package]] name = "swc_ecma_ast" -version = "0.112.6" +version = "0.112.7" dependencies = [ "arbitrary", "bitflags 2.5.0", @@ -4191,7 +4191,7 @@ dependencies = [ [[package]] name = "swc_ecma_codegen" -version = "0.148.13" +version = "0.148.14" dependencies = [ "base64", "criterion", @@ -4253,7 +4253,7 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2015" -version = "0.4.17" +version = "0.4.18" dependencies = [ "arrayvec", "indexmap 2.1.0", @@ -4296,7 +4296,7 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2017" -version = "0.4.16" +version = "0.4.17" dependencies = [ "serde", "swc_atoms", @@ -4314,7 +4314,7 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2018" -version = "0.4.16" +version = "0.4.17" dependencies = [ "serde", "swc_atoms", @@ -4349,7 +4349,7 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2020" -version = "0.4.16" +version = "0.4.17" dependencies = [ "serde", "swc_atoms", @@ -4425,7 +4425,7 @@ dependencies = [ [[package]] name = "swc_ecma_lints" -version = "0.92.19" +version = "0.92.20" dependencies = [ "auto_impl", "dashmap", @@ -4447,7 +4447,7 @@ dependencies = [ [[package]] name = "swc_ecma_loader" -version = "0.45.24" +version = "0.45.25" dependencies = [ "anyhow", "dashmap", @@ -4468,7 +4468,7 @@ dependencies = [ [[package]] name = "swc_ecma_minifier" -version = "0.192.19" +version = "0.192.20" dependencies = [ "ansi_term", "anyhow", @@ -4536,7 +4536,7 @@ dependencies = [ [[package]] name = "swc_ecma_preset_env" -version = "0.206.17" +version = "0.206.18" dependencies = [ "anyhow", "criterion", @@ -4626,7 +4626,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_base" -version = "0.137.16" +version = "0.137.17" dependencies = [ "better_scoped_tls", "bitflags 2.5.0", @@ -4665,7 +4665,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_compat" -version = "0.163.17" +version = "0.163.18" dependencies = [ "arrayvec", "indexmap 2.1.0", @@ -4714,7 +4714,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_module" -version = "0.180.17" +version = "0.180.18" dependencies = [ "Inflector", "anyhow", @@ -4743,7 +4743,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_optimization" -version = "0.198.17" +version = "0.198.18" dependencies = [ "dashmap", "indexmap 2.1.0", @@ -4773,7 +4773,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_proposal" -version = "0.171.17" +version = "0.171.18" dependencies = [ "either", "rustc-hash", @@ -4797,7 +4797,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_react" -version = "0.183.17" +version = "0.183.18" dependencies = [ "base64", "dashmap", @@ -4849,7 +4849,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_typescript" -version = "0.188.17" +version = "0.188.18" dependencies = [ "criterion", "ryu-js", @@ -4886,7 +4886,7 @@ dependencies = [ [[package]] name = "swc_ecma_utils" -version = "0.127.15" +version = "0.127.16" dependencies = [ "indexmap 2.1.0", "num_cpus", @@ -4964,7 +4964,7 @@ dependencies = [ [[package]] name = "swc_estree_compat" -version = "0.198.21" +version = "0.198.22" dependencies = [ "ahash 0.8.8", "anyhow", @@ -5023,7 +5023,7 @@ dependencies = [ [[package]] name = "swc_html_ast" -version = "0.33.19" +version = "0.33.20" dependencies = [ "is-macro", "rkyv", @@ -5062,7 +5062,7 @@ dependencies = [ [[package]] name = "swc_html_minifier" -version = "0.134.17" +version = "0.134.18" dependencies = [ "criterion", "once_cell", @@ -5092,7 +5092,7 @@ dependencies = [ [[package]] name = "swc_html_parser" -version = "0.39.24" +version = "0.39.25" dependencies = [ "criterion", "serde", @@ -5108,7 +5108,7 @@ dependencies = [ [[package]] name = "swc_html_utils" -version = "0.18.19" +version = "0.18.20" dependencies = [ "once_cell", "serde", @@ -5147,7 +5147,7 @@ dependencies = [ [[package]] name = "swc_node_bundler" -version = "0.62.22" +version = "0.62.23" dependencies = [ "anyhow", "dashmap", @@ -5197,7 +5197,7 @@ dependencies = [ [[package]] name = "swc_plugin" -version = "0.90.0" +version = "0.90.1" dependencies = [ "once_cell", ] @@ -5277,7 +5277,7 @@ dependencies = [ [[package]] name = "swc_visit" -version = "0.5.10" +version = "0.5.11" dependencies = [ "either", "swc_visit_macros", @@ -5306,7 +5306,7 @@ dependencies = [ [[package]] name = "swc_xml_ast" -version = "0.12.19" +version = "0.12.20" dependencies = [ "is-macro", "serde", @@ -5343,7 +5343,7 @@ dependencies = [ [[package]] name = "swc_xml_parser" -version = "0.13.21" +version = "0.13.22" dependencies = [ "serde", "serde_json", @@ -5506,7 +5506,7 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "testing" -version = "0.35.21" +version = "0.35.22" dependencies = [ "ansi_term", "cargo_metadata 0.15.4", @@ -5525,7 +5525,7 @@ dependencies = [ [[package]] name = "testing_macros" -version = "0.2.12" +version = "0.2.13" dependencies = [ "anyhow", "glob", diff --git a/crates/binding_macros/Cargo.toml b/crates/binding_macros/Cargo.toml index d867dacbb856..64094603c8c2 100644 --- a/crates/binding_macros/Cargo.toml +++ b/crates/binding_macros/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "Apache-2.0" name = "binding_macros" repository = "https://github.com/swc-project/swc.git" -version = "0.64.22" +version = "0.64.23" [lib] bench = false diff --git a/crates/dbg-swc/Cargo.toml b/crates/dbg-swc/Cargo.toml index f2525d10a096..4379e9ba5aa8 100644 --- a/crates/dbg-swc/Cargo.toml +++ b/crates/dbg-swc/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "Apache-2.0" name = "dbg-swc" repository = "https://github.com/kdy1/dbg-swc.git" -version = "0.91.25" +version = "0.91.26" [[bin]] bench = false diff --git a/crates/preset_env_base/Cargo.toml b/crates/preset_env_base/Cargo.toml index 1c12183aebd8..ac57e6d9d04a 100644 --- a/crates/preset_env_base/Cargo.toml +++ b/crates/preset_env_base/Cargo.toml @@ -5,7 +5,7 @@ documentation = "https://rustdoc.swc.rs/preset_env_base/" edition = "2021" license = "Apache-2.0" name = "preset_env_base" -version = "0.4.11" +version = "0.4.12" [lib] bench = false diff --git a/crates/swc_bundler/Cargo.toml b/crates/swc_bundler/Cargo.toml index 445e9ba34476..1ca5e292776f 100644 --- a/crates/swc_bundler/Cargo.toml +++ b/crates/swc_bundler/Cargo.toml @@ -9,7 +9,7 @@ include = ["Cargo.toml", "build.rs", "src/**/*.rs", "src/**/*.js"] license = "Apache-2.0" name = "swc_bundler" repository = "https://github.com/swc-project/swc.git" -version = "0.225.17" +version = "0.225.18" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_cached/Cargo.toml b/crates/swc_cached/Cargo.toml index b6036054059e..1585dda30670 100644 --- a/crates/swc_cached/Cargo.toml +++ b/crates/swc_cached/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cached" repository = "https://github.com/swc-project/swc.git" -version = "0.3.19" +version = "0.3.20" [lib] bench = false diff --git a/crates/swc_cli_impl/Cargo.toml b/crates/swc_cli_impl/Cargo.toml index 44e4ac254db5..fdc6d92f2959 100644 --- a/crates/swc_cli_impl/Cargo.toml +++ b/crates/swc_cli_impl/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli_impl" repository = "https://github.com/swc-project/swc.git" -version = "0.8.23" +version = "0.8.24" [[bin]] name = "swc" diff --git a/crates/swc_compiler_base/Cargo.toml b/crates/swc_compiler_base/Cargo.toml index 8520bbf36650..e1a6a4d02bfd 100644 --- a/crates/swc_compiler_base/Cargo.toml +++ b/crates/swc_compiler_base/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_compiler_base" repository = "https://github.com/swc-project/swc.git" -version = "0.7.19" +version = "0.7.20" [features] node = ["napi", "napi-derive"] diff --git a/crates/swc_css_ast/Cargo.toml b/crates/swc_css_ast/Cargo.toml index ddc5f45d825b..88df62d23290 100644 --- a/crates/swc_css_ast/Cargo.toml +++ b/crates/swc_css_ast/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_css_ast" repository = "https://github.com/swc-project/swc.git" -version = "0.140.21" +version = "0.140.22" [lib] bench = false diff --git a/crates/swc_css_codegen/Cargo.toml b/crates/swc_css_codegen/Cargo.toml index b427fa4e3088..a5ecc28de68d 100644 --- a/crates/swc_css_codegen/Cargo.toml +++ b/crates/swc_css_codegen/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_css_codegen" repository = "https://github.com/swc-project/swc.git" -version = "0.151.31" +version = "0.151.32" [lib] bench = false diff --git a/crates/swc_css_compat/Cargo.toml b/crates/swc_css_compat/Cargo.toml index 2179d9937a02..eeec71b154b6 100644 --- a/crates/swc_css_compat/Cargo.toml +++ b/crates/swc_css_compat/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/**/*.json", "data/**/*.json"] license = "Apache-2.0" name = "swc_css_compat" repository = "https://github.com/swc-project/swc.git" -version = "0.27.32" +version = "0.27.33" [lib] bench = false diff --git a/crates/swc_css_lints/Cargo.toml b/crates/swc_css_lints/Cargo.toml index d7706db8e6b1..0f48cf30bb01 100644 --- a/crates/swc_css_lints/Cargo.toml +++ b/crates/swc_css_lints/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_css_lints" repository = "https://github.com/swc-project/swc.git" -version = "0.60.31" +version = "0.60.32" [lib] bench = false diff --git a/crates/swc_css_minifier/Cargo.toml b/crates/swc_css_minifier/Cargo.toml index 46088f009646..4d89ec112ed1 100644 --- a/crates/swc_css_minifier/Cargo.toml +++ b/crates/swc_css_minifier/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_css_minifier" repository = "https://github.com/swc-project/swc.git" -version = "0.116.32" +version = "0.116.33" [lib] bench = false diff --git a/crates/swc_css_parser/Cargo.toml b/crates/swc_css_parser/Cargo.toml index db6a55a3338b..8e09f2a04aa0 100644 --- a/crates/swc_css_parser/Cargo.toml +++ b/crates/swc_css_parser/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_css_parser" repository = "https://github.com/swc-project/swc.git" -version = "0.150.30" +version = "0.150.31" [lib] bench = false diff --git a/crates/swc_css_prefixer/Cargo.toml b/crates/swc_css_prefixer/Cargo.toml index e787bc1af363..08a35b68f2b7 100644 --- a/crates/swc_css_prefixer/Cargo.toml +++ b/crates/swc_css_prefixer/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/**/*.json", "data/**/*.json"] license = "Apache-2.0" name = "swc_css_prefixer" repository = "https://github.com/swc-project/swc.git" -version = "0.153.35" +version = "0.153.36" [lib] bench = false diff --git a/crates/swc_css_utils/Cargo.toml b/crates/swc_css_utils/Cargo.toml index e8aab70958b8..7d86a4facf39 100644 --- a/crates/swc_css_utils/Cargo.toml +++ b/crates/swc_css_utils/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/**/*.json"] license = "Apache-2.0" name = "swc_css_utils" repository = "https://github.com/swc-project/swc.git" -version = "0.137.21" +version = "0.137.22" [lib] bench = false diff --git a/crates/swc_ecma_ast/Cargo.toml b/crates/swc_ecma_ast/Cargo.toml index e14271cfa873..b797db447bfc 100644 --- a/crates/swc_ecma_ast/Cargo.toml +++ b/crates/swc_ecma_ast/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_ast" repository = "https://github.com/swc-project/swc.git" -version = "0.112.6" +version = "0.112.7" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_ecma_codegen/Cargo.toml b/crates/swc_ecma_codegen/Cargo.toml index 91ea93df794c..7caedbfa54e1 100644 --- a/crates/swc_ecma_codegen/Cargo.toml +++ b/crates/swc_ecma_codegen/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_codegen" repository = "https://github.com/swc-project/swc.git" -version = "0.148.13" +version = "0.148.14" [features] # This does not enable serde for ast nodes. diff --git a/crates/swc_ecma_compat_es2015/Cargo.toml b/crates/swc_ecma_compat_es2015/Cargo.toml index d45a56981862..d7a791a4c2e4 100644 --- a/crates/swc_ecma_compat_es2015/Cargo.toml +++ b/crates/swc_ecma_compat_es2015/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_compat_es2015" repository = "https://github.com/swc-project/swc.git" -version = "0.4.17" +version = "0.4.18" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/swc_ecma_compat_es2017/Cargo.toml b/crates/swc_ecma_compat_es2017/Cargo.toml index 26151e4e261e..399e3cbcb8a6 100644 --- a/crates/swc_ecma_compat_es2017/Cargo.toml +++ b/crates/swc_ecma_compat_es2017/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_compat_es2017" repository = "https://github.com/swc-project/swc.git" -version = "0.4.16" +version = "0.4.17" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/swc_ecma_compat_es2018/Cargo.toml b/crates/swc_ecma_compat_es2018/Cargo.toml index 1073bd6f7b92..2a6d2f54c7f2 100644 --- a/crates/swc_ecma_compat_es2018/Cargo.toml +++ b/crates/swc_ecma_compat_es2018/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_compat_es2018" repository = "https://github.com/swc-project/swc.git" -version = "0.4.16" +version = "0.4.17" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/swc_ecma_compat_es2020/Cargo.toml b/crates/swc_ecma_compat_es2020/Cargo.toml index d8c6fdc94c38..0080a19746f9 100644 --- a/crates/swc_ecma_compat_es2020/Cargo.toml +++ b/crates/swc_ecma_compat_es2020/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_compat_es2020" repository = "https://github.com/swc-project/swc.git" -version = "0.4.16" +version = "0.4.17" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/swc_ecma_lints/Cargo.toml b/crates/swc_ecma_lints/Cargo.toml index 23785cebc762..54931d850850 100644 --- a/crates/swc_ecma_lints/Cargo.toml +++ b/crates/swc_ecma_lints/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_lints" repository = "https://github.com/swc-project/swc.git" -version = "0.92.19" +version = "0.92.20" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] diff --git a/crates/swc_ecma_loader/Cargo.toml b/crates/swc_ecma_loader/Cargo.toml index 892e491413ee..b8932567921a 100644 --- a/crates/swc_ecma_loader/Cargo.toml +++ b/crates/swc_ecma_loader/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_loader" repository = "https://github.com/swc-project/swc.git" -version = "0.45.24" +version = "0.45.25" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_ecma_minifier/Cargo.toml b/crates/swc_ecma_minifier/Cargo.toml index b9136bd94407..4f12c3112340 100644 --- a/crates/swc_ecma_minifier/Cargo.toml +++ b/crates/swc_ecma_minifier/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/lists/*.json"] license = "Apache-2.0" name = "swc_ecma_minifier" repository = "https://github.com/swc-project/swc.git" -version = "0.192.19" +version = "0.192.20" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_ecma_preset_env/Cargo.toml b/crates/swc_ecma_preset_env/Cargo.toml index bcb8150c02d6..a438f387e987 100644 --- a/crates/swc_ecma_preset_env/Cargo.toml +++ b/crates/swc_ecma_preset_env/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/**/*.json", "data/**/*.json"] license = "Apache-2.0" name = "swc_ecma_preset_env" repository = "https://github.com/swc-project/swc" -version = "0.206.17" +version = "0.206.18" [lib] bench = false diff --git a/crates/swc_ecma_transforms_base/Cargo.toml b/crates/swc_ecma_transforms_base/Cargo.toml index 91094b2d91cb..2e45d76c5598 100644 --- a/crates/swc_ecma_transforms_base/Cargo.toml +++ b/crates/swc_ecma_transforms_base/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/**/*.js"] license = "Apache-2.0" name = "swc_ecma_transforms_base" repository = "https://github.com/swc-project/swc.git" -version = "0.137.16" +version = "0.137.17" [lib] bench = false diff --git a/crates/swc_ecma_transforms_compat/Cargo.toml b/crates/swc_ecma_transforms_compat/Cargo.toml index b0e456f17f08..4346bf3ab8ec 100644 --- a/crates/swc_ecma_transforms_compat/Cargo.toml +++ b/crates/swc_ecma_transforms_compat/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_compat" repository = "https://github.com/swc-project/swc.git" -version = "0.163.17" +version = "0.163.18" [lib] bench = false diff --git a/crates/swc_ecma_transforms_module/Cargo.toml b/crates/swc_ecma_transforms_module/Cargo.toml index 39a1c691be33..05215eff3f75 100644 --- a/crates/swc_ecma_transforms_module/Cargo.toml +++ b/crates/swc_ecma_transforms_module/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_module" repository = "https://github.com/swc-project/swc.git" -version = "0.180.17" +version = "0.180.18" [lib] bench = false diff --git a/crates/swc_ecma_transforms_optimization/Cargo.toml b/crates/swc_ecma_transforms_optimization/Cargo.toml index df78d7caa113..24c81f80acd6 100644 --- a/crates/swc_ecma_transforms_optimization/Cargo.toml +++ b/crates/swc_ecma_transforms_optimization/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_optimization" repository = "https://github.com/swc-project/swc.git" -version = "0.198.17" +version = "0.198.18" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] diff --git a/crates/swc_ecma_transforms_proposal/Cargo.toml b/crates/swc_ecma_transforms_proposal/Cargo.toml index 25eb0f05ce68..67b2aa37e063 100644 --- a/crates/swc_ecma_transforms_proposal/Cargo.toml +++ b/crates/swc_ecma_transforms_proposal/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_proposal" repository = "https://github.com/swc-project/swc.git" -version = "0.171.17" +version = "0.171.18" [lib] bench = false diff --git a/crates/swc_ecma_transforms_react/Cargo.toml b/crates/swc_ecma_transforms_react/Cargo.toml index 0c4b9b89daf4..3327692aa1d3 100644 --- a/crates/swc_ecma_transforms_react/Cargo.toml +++ b/crates/swc_ecma_transforms_react/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_react" repository = "https://github.com/swc-project/swc.git" -version = "0.183.17" +version = "0.183.18" [lib] bench = false diff --git a/crates/swc_ecma_transforms_typescript/Cargo.toml b/crates/swc_ecma_transforms_typescript/Cargo.toml index 4c6ef1a3bf00..9ae4bc63a42e 100644 --- a/crates/swc_ecma_transforms_typescript/Cargo.toml +++ b/crates/swc_ecma_transforms_typescript/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_typescript" repository = "https://github.com/swc-project/swc.git" -version = "0.188.17" +version = "0.188.18" [lib] bench = false diff --git a/crates/swc_ecma_utils/Cargo.toml b/crates/swc_ecma_utils/Cargo.toml index 335f3ba68ac2..91bd38a35928 100644 --- a/crates/swc_ecma_utils/Cargo.toml +++ b/crates/swc_ecma_utils/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_utils" repository = "https://github.com/swc-project/swc.git" -version = "0.127.15" +version = "0.127.16" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_estree_compat/Cargo.toml b/crates/swc_estree_compat/Cargo.toml index e8ed34175f0d..297e1c243660 100644 --- a/crates/swc_estree_compat/Cargo.toml +++ b/crates/swc_estree_compat/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_estree_compat" repository = "https://github.com/swc-project/swc.git" -version = "0.198.21" +version = "0.198.22" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_html_ast/Cargo.toml b/crates/swc_html_ast/Cargo.toml index 176c10ce4457..d4d44ff477ad 100644 --- a/crates/swc_html_ast/Cargo.toml +++ b/crates/swc_html_ast/Cargo.toml @@ -9,7 +9,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_html_ast" repository = "https://github.com/swc-project/swc.git" -version = "0.33.19" +version = "0.33.20" [lib] bench = false diff --git a/crates/swc_html_minifier/Cargo.toml b/crates/swc_html_minifier/Cargo.toml index b5e8532392c3..cc1f8289e891 100644 --- a/crates/swc_html_minifier/Cargo.toml +++ b/crates/swc_html_minifier/Cargo.toml @@ -10,7 +10,7 @@ include = ["Cargo.toml", "src/**/*.rs", "data/**/*.json"] license = "Apache-2.0" name = "swc_html_minifier" repository = "https://github.com/swc-project/swc.git" -version = "0.134.17" +version = "0.134.18" [lib] bench = false diff --git a/crates/swc_html_parser/Cargo.toml b/crates/swc_html_parser/Cargo.toml index 0c0391d6c068..9cfe52c7c07b 100644 --- a/crates/swc_html_parser/Cargo.toml +++ b/crates/swc_html_parser/Cargo.toml @@ -10,7 +10,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/**/*.json"] license = "Apache-2.0" name = "swc_html_parser" repository = "https://github.com/swc-project/swc.git" -version = "0.39.24" +version = "0.39.25" [lib] bench = false diff --git a/crates/swc_html_utils/Cargo.toml b/crates/swc_html_utils/Cargo.toml index 98cfbe39a702..30e73b50d462 100644 --- a/crates/swc_html_utils/Cargo.toml +++ b/crates/swc_html_utils/Cargo.toml @@ -10,7 +10,7 @@ include = ["Cargo.toml", "src/**/*.rs", "data/**/*.json"] license = "Apache-2.0" name = "swc_html_utils" repository = "https://github.com/swc-project/swc.git" -version = "0.18.19" +version = "0.18.20" [lib] bench = false diff --git a/crates/swc_node_bundler/Cargo.toml b/crates/swc_node_bundler/Cargo.toml index 317a61a68698..eada2ced258f 100644 --- a/crates/swc_node_bundler/Cargo.toml +++ b/crates/swc_node_bundler/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_node_bundler" repository = "https://github.com/swc-project/swc.git" -version = "0.62.22" +version = "0.62.23" [lib] bench = false diff --git a/crates/swc_plugin/Cargo.toml b/crates/swc_plugin/Cargo.toml index b891c2e5a6ea..69255ec49171 100644 --- a/crates/swc_plugin/Cargo.toml +++ b/crates/swc_plugin/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" license = "Apache-2.0" name = "swc_plugin" repository = "https://github.com/swc-project/swc.git" -version = "0.90.0" +version = "0.90.1" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_visit/Cargo.toml b/crates/swc_visit/Cargo.toml index 770c7f74f83d..8c2d3f416fd1 100644 --- a/crates/swc_visit/Cargo.toml +++ b/crates/swc_visit/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_visit" repository = "https://github.com/swc-project/swc.git" -version = "0.5.10" +version = "0.5.11" [lib] bench = false diff --git a/crates/swc_xml_ast/Cargo.toml b/crates/swc_xml_ast/Cargo.toml index c8d620e7a1fd..16beff61ee43 100644 --- a/crates/swc_xml_ast/Cargo.toml +++ b/crates/swc_xml_ast/Cargo.toml @@ -9,7 +9,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_xml_ast" repository = "https://github.com/swc-project/swc.git" -version = "0.12.19" +version = "0.12.20" [lib] bench = false diff --git a/crates/swc_xml_parser/Cargo.toml b/crates/swc_xml_parser/Cargo.toml index c27007b45ba3..bb2f9ec3995a 100644 --- a/crates/swc_xml_parser/Cargo.toml +++ b/crates/swc_xml_parser/Cargo.toml @@ -10,7 +10,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/**/*.json"] license = "Apache-2.0" name = "swc_xml_parser" repository = "https://github.com/swc-project/swc.git" -version = "0.13.21" +version = "0.13.22" [lib] bench = false diff --git a/crates/testing/Cargo.toml b/crates/testing/Cargo.toml index d1248e993f3a..2147dafc7a9e 100644 --- a/crates/testing/Cargo.toml +++ b/crates/testing/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "testing" repository = "https://github.com/swc-project/swc.git" -version = "0.35.21" +version = "0.35.22" [lib] bench = false diff --git a/crates/testing_macros/Cargo.toml b/crates/testing_macros/Cargo.toml index ba0788dfaf10..e722cf43669e 100644 --- a/crates/testing_macros/Cargo.toml +++ b/crates/testing_macros/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "testing_macros" repository = "https://github.com/swc-project/swc.git" -version = "0.2.12" +version = "0.2.13" [features] # Skip generating fixtures so the editor becomes faster again From 730ded2a26f63f0069dea0d3bc207bb31f344444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Thu, 4 Apr 2024 15:24:31 +0900 Subject: [PATCH 066/172] fix(es/minifier): Abort fn inliner if there's a spread arg (#8809) **Description:** **Related issue:** - Closes #8806 --- .../src/compress/optimize/iife.rs | 4 ++ .../tests/fixture/issues/8806/config.json | 48 +++++++++++++++++++ .../tests/fixture/issues/8806/input.js | 8 ++++ .../tests/fixture/issues/8806/output.js | 9 ++++ 4 files changed, 69 insertions(+) create mode 100644 crates/swc_ecma_minifier/tests/fixture/issues/8806/config.json create mode 100644 crates/swc_ecma_minifier/tests/fixture/issues/8806/input.js create mode 100644 crates/swc_ecma_minifier/tests/fixture/issues/8806/output.js diff --git a/crates/swc_ecma_minifier/src/compress/optimize/iife.rs b/crates/swc_ecma_minifier/src/compress/optimize/iife.rs index 702952b45828..6d8200c5d52f 100644 --- a/crates/swc_ecma_minifier/src/compress/optimize/iife.rs +++ b/crates/swc_ecma_minifier/src/compress/optimize/iife.rs @@ -835,6 +835,10 @@ impl Optimizer<'_> { return None; } + if args.iter().any(|arg| arg.spread.is_some()) { + return None; + } + if self.vars.inline_with_multi_replacer(body) { self.changed = true; } diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/8806/config.json b/crates/swc_ecma_minifier/tests/fixture/issues/8806/config.json new file mode 100644 index 000000000000..91c951a76c9d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/8806/config.json @@ -0,0 +1,48 @@ +{ + "defaults": true, + "arguments": false, + "arrows": true, + "booleans": true, + "booleans_as_integers": false, + "collapse_vars": true, + "comparisons": true, + "computed_props": true, + "conditionals": true, + "dead_code": true, + "directives": true, + "drop_console": false, + "drop_debugger": true, + "evaluate": true, + "expression": false, + "hoist_funs": false, + "hoist_props": true, + "hoist_vars": false, + "if_return": true, + "join_vars": true, + "keep_classnames": false, + "keep_fargs": true, + "keep_fnames": false, + "keep_infinity": false, + "loops": true, + "negate_iife": true, + "properties": true, + "reduce_funcs": false, + "reduce_vars": false, + "side_effects": true, + "switches": true, + "typeofs": true, + "unsafe": false, + "unsafe_arrows": false, + "unsafe_comps": false, + "unsafe_Function": false, + "unsafe_math": false, + "unsafe_symbols": false, + "unsafe_methods": false, + "unsafe_proto": false, + "unsafe_regexp": false, + "unsafe_undefined": false, + "unused": true, + "const_to_let": true, + "pristine_globals": true, + "passes": 2 +} diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/8806/input.js b/crates/swc_ecma_minifier/tests/fixture/issues/8806/input.js new file mode 100644 index 000000000000..0c78cf9a8e46 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/8806/input.js @@ -0,0 +1,8 @@ + +function logTheNine() { + ((theThree, theNine) => { + console.log(theNine) + })(...[3, 9]); +} + +logTheNine(); diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/8806/output.js b/crates/swc_ecma_minifier/tests/fixture/issues/8806/output.js new file mode 100644 index 000000000000..40a257d077fa --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/8806/output.js @@ -0,0 +1,9 @@ +function logTheNine() { + ((theThree, theNine)=>{ + console.log(theNine); + })(...[ + 3, + 9 + ]); +} +logTheNine(); From ff5f69f7e015ff85bedc4d1c7410a7068fbb330f Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Thu, 4 Apr 2024 06:26:02 +0000 Subject: [PATCH 067/172] chore: Bump crates --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7950e00b979..3e053a775c23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,9 @@ - **(es/helpers)** Fix metadata of decorators being `undefined` ([#8768](https://github.com/swc-project/swc/issues/8768)) ([263ce6e](https://github.com/swc-project/swc/commit/263ce6e22bd4dbba0323099f256fb062b8e644a2)) +- **(es/minifier)** Abort fn inliner if there's a spread arg ([#8809](https://github.com/swc-project/swc/issues/8809)) ([730ded2](https://github.com/swc-project/swc/commit/730ded2a26f63f0069dea0d3bc207bb31f344444)) + + - **(es/module)** Fix `jsc.paths` with `resolveFully` ([#8784](https://github.com/swc-project/swc/issues/8784)) ([4961bb0](https://github.com/swc-project/swc/commit/4961bb055df9925da97279819d2fdf740b4b3d92)) From 47714c52ce08b0e94617d17c11c8e8994c62dbaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Thu, 4 Apr 2024 15:56:29 +0900 Subject: [PATCH 068/172] feat(es/minifier): Evaluate spread of arrays (#8811) **Related issue:** - Closes #8808 --- .../callWithSpread4.2.minified.js | 6 +-- .../callWithSpreadES6.2.minified.js | 6 +-- .../src/compress/pure/misc.rs | 50 ++++++++++++++++++- .../src/compress/pure/mod.rs | 2 + .../tests/fixture/issues/8806/output.js | 7 +-- 5 files changed, 54 insertions(+), 17 deletions(-) diff --git a/crates/swc/tests/tsc-references/callWithSpread4.2.minified.js b/crates/swc/tests/tsc-references/callWithSpread4.2.minified.js index 968e5458a050..b2ed6035dc01 100644 --- a/crates/swc/tests/tsc-references/callWithSpread4.2.minified.js +++ b/crates/swc/tests/tsc-references/callWithSpread4.2.minified.js @@ -1,6 +1,2 @@ //// [callWithSpread4.ts] -pli(reads, ...gun, tr, fun, ...gz, writes), test(...anys), pli(...[ - reads, - writes, - writes -]); +pli(reads, ...gun, tr, fun, ...gz, writes), test(...anys), pli(reads, writes, writes); diff --git a/crates/swc/tests/tsc-references/callWithSpreadES6.2.minified.js b/crates/swc/tests/tsc-references/callWithSpreadES6.2.minified.js index 38a0705a17aa..35fc4c5f8f1f 100644 --- a/crates/swc/tests/tsc-references/callWithSpreadES6.2.minified.js +++ b/crates/swc/tests/tsc-references/callWithSpreadES6.2.minified.js @@ -4,8 +4,4 @@ var a, obj, xa; ...a ], [ ...a -], obj.foo(1, 2, "abc"), obj.foo(1, 2, ...a), obj.foo(1, 2, ...a, "abc"), obj.foo(1, 2, "abc"), obj.foo(1, 2, ...a), obj.foo(1, 2, ...a, "abc"), xa[1].foo(1, 2, "abc"), xa[1].foo(1, 2, ...a), xa[1].foo(1, 2, ...a, "abc"), xa[1].foo(...[ - 1, - 2, - "abc" -]); +], obj.foo(1, 2, "abc"), obj.foo(1, 2, ...a), obj.foo(1, 2, ...a, "abc"), obj.foo(1, 2, "abc"), obj.foo(1, 2, ...a), obj.foo(1, 2, ...a, "abc"), xa[1].foo(1, 2, "abc"), xa[1].foo(1, 2, ...a), xa[1].foo(1, 2, ...a, "abc"), xa[1].foo(1, 2, "abc"); diff --git a/crates/swc_ecma_minifier/src/compress/pure/misc.rs b/crates/swc_ecma_minifier/src/compress/pure/misc.rs index dea9485d66bb..33fa6915a43e 100644 --- a/crates/swc_ecma_minifier/src/compress/pure/misc.rs +++ b/crates/swc_ecma_minifier/src/compress/pure/misc.rs @@ -7,7 +7,7 @@ use swc_ecma_ast::*; use swc_ecma_transforms_optimization::debug_assert_valid; use swc_ecma_usage_analyzer::util::is_global_var_with_pure_property_access; use swc_ecma_utils::{ - ExprExt, ExprFactory, IdentUsageFinder, Type, + undefined, ExprExt, ExprFactory, IdentUsageFinder, Type, Value::{self, Known}, }; @@ -57,6 +57,54 @@ fn can_compress_new_regexp(args: Option<&[ExprOrSpread]>) -> bool { } impl Pure<'_> { + /// `foo(...[1, 2])`` => `foo(1, 2)` + pub(super) fn eval_spread_array(&mut self, args: &mut Vec) { + if args + .iter() + .all(|arg| arg.spread.is_none() || !arg.expr.is_array()) + { + return; + } + + let mut new_args = vec![]; + for arg in args.take() { + match arg { + ExprOrSpread { + spread: Some(spread), + expr, + } => match *expr { + Expr::Array(ArrayLit { elems, .. }) => { + for elem in elems { + match elem { + Some(ExprOrSpread { expr, spread }) => { + new_args.push(ExprOrSpread { spread, expr }); + } + None => { + new_args.push(ExprOrSpread { + spread: None, + expr: undefined(DUMMY_SP), + }); + } + } + } + } + _ => { + new_args.push(ExprOrSpread { + spread: Some(spread), + expr, + }); + } + }, + arg => new_args.push(arg), + } + } + + self.changed = true; + report_change!("Compressing spread array"); + + *args = new_args; + } + pub(super) fn remove_invalid(&mut self, e: &mut Expr) { match e { Expr::Seq(seq) => { diff --git a/crates/swc_ecma_minifier/src/compress/pure/mod.rs b/crates/swc_ecma_minifier/src/compress/pure/mod.rs index 9c46f6835151..587d381f152f 100644 --- a/crates/swc_ecma_minifier/src/compress/pure/mod.rs +++ b/crates/swc_ecma_minifier/src/compress/pure/mod.rs @@ -300,6 +300,8 @@ impl VisitMut for Pure<'_> { e.args.visit_mut_with(self); + self.eval_spread_array(&mut e.args); + self.drop_arguments_of_symbol_call(e); } diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/8806/output.js b/crates/swc_ecma_minifier/tests/fixture/issues/8806/output.js index 40a257d077fa..f1e4f71b4bfa 100644 --- a/crates/swc_ecma_minifier/tests/fixture/issues/8806/output.js +++ b/crates/swc_ecma_minifier/tests/fixture/issues/8806/output.js @@ -1,9 +1,4 @@ function logTheNine() { - ((theThree, theNine)=>{ - console.log(theNine); - })(...[ - 3, - 9 - ]); + console.log(9); } logTheNine(); From dc25df1b56408c6dc854b96fc18b247e2fe9076e Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Thu, 4 Apr 2024 06:58:05 +0000 Subject: [PATCH 069/172] chore: Bump crates --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e053a775c23..e02a5d84a1f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,9 @@ +- **(es/minifier)** Evaluate spread of arrays ([#8811](https://github.com/swc-project/swc/issues/8811)) ([47714c5](https://github.com/swc-project/swc/commit/47714c52ce08b0e94617d17c11c8e8994c62dbaa)) + + - **(plugin/runner)** Improve error message for Wasm plugin crashes ([#8794](https://github.com/swc-project/swc/issues/8794)) ([571d297](https://github.com/swc-project/swc/commit/571d29781a90f4def4811ae46fa4a5f966e461e6)) ### Miscellaneous Tasks @@ -1376,9 +1379,6 @@ - **(css/modules)** Aggregate class names when composes is chained. ([#7917](https://github.com/swc-project/swc/issues/7917)) ([0db25a2](https://github.com/swc-project/swc/commit/0db25a252cf35e4b64b38bde9f34a2f33eb2f662)) -- **(es/module)** Revert #7901 ([#7906](https://github.com/swc-project/swc/issues/7906)) ([85d6e9b](https://github.com/swc-project/swc/commit/85d6e9be07af7bb788594b21a986636657d86f03)) - - - **(es/module)** Fix `jsc.paths` for projects using pnpm ([#7918](https://github.com/swc-project/swc/issues/7918)) ([a86e9f3](https://github.com/swc-project/swc/commit/a86e9f3bb5bd490ebf0b18fe7349a2b0fbc0c45f)) ### Features From c3b750dc85ab58650da459e251f805d7556419ec Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Thu, 4 Apr 2024 08:41:32 +0000 Subject: [PATCH 070/172] chore: Publish 1.4.12-nightly-20240404.1 --- bindings/Cargo.lock | 55 +++++++++++------------ bindings/binding_core_node/Cargo.toml | 2 +- bindings/binding_core_wasm/Cargo.toml | 4 +- bindings/binding_minifier_node/Cargo.toml | 4 +- bindings/binding_minifier_wasm/Cargo.toml | 4 +- bindings/swc_cli/Cargo.toml | 4 +- package.json | 2 +- packages/minifier/package.json | 2 +- 8 files changed, 38 insertions(+), 39 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index f2c29643fc75..315d1c81381c 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -84,9 +84,9 @@ checksum = "70033777eb8b5124a81a1889416543dddef2de240019b674c81285a2635a7e1e" [[package]] name = "anyhow" -version = "1.0.75" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" [[package]] name = "arrayref" @@ -232,7 +232,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.4.12-nightly-20240401.1" +version = "1.4.12-nightly-20240404.1" dependencies = [ "anyhow", "getrandom", @@ -292,7 +292,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.4.12-nightly-20240401.1" +version = "1.4.12-nightly-20240404.1" dependencies = [ "anyhow", "getrandom", @@ -2604,9 +2604,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] @@ -2634,9 +2634,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", @@ -3066,7 +3066,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.209" +version = "0.91.210" dependencies = [ "anyhow", "swc_cli_impl", @@ -3074,9 +3074,9 @@ dependencies = [ [[package]] name = "swc_cli_impl" -version = "0.8.23" +version = "0.8.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "412a1c24bbf4ccb6b3e255933e6d1173d1a7dc20cac3d9c19aeee2fc31e0dff0" +checksum = "36c43755da9950dda43d534ddfdc710c9f7f4a01228dc9599bb0fe6dffdd6865" dependencies = [ "anyhow", "atty", @@ -3129,9 +3129,9 @@ dependencies = [ [[package]] name = "swc_compiler_base" -version = "0.7.19" +version = "0.7.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66405c58d5241ae020b0522a08bdc284da52b13742a58e3023e09cc2e0fb9e8c" +checksum = "8d7a0a78d52886c01786246fad54aa614cc145154d18607ddda72a180d1cb56c" dependencies = [ "anyhow", "base64", @@ -3181,9 +3181,9 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.90.26" +version = "0.90.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e18fa3e847ec83b97c27226233f683b62c03a10e24f44d139465fa876a5774a" +checksum = "10e6117b0d6a33de0df45da99f17752d7846ffb871d0336cce11cab8f7b8eb6c" dependencies = [ "binding_macros", "swc", @@ -4372,11 +4372,10 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "log", "pin-project-lite", "tracing-attributes", @@ -4385,13 +4384,13 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.23" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] @@ -4407,9 +4406,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -4427,20 +4426,20 @@ dependencies = [ [[package]] name = "tracing-log" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" dependencies = [ - "lazy_static", "log", + "once_cell", "tracing-core", ] [[package]] name = "tracing-subscriber" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ "matchers", "nu-ansi-term", diff --git a/bindings/binding_core_node/Cargo.toml b/bindings/binding_core_node/Cargo.toml index 9b0dcc068ac8..ba97845bffe9 100644 --- a/bindings/binding_core_node/Cargo.toml +++ b/bindings/binding_core_node/Cargo.toml @@ -51,7 +51,7 @@ tracing-chrome = "0.5.0" tracing-futures = "0.2.5" tracing-subscriber = { version = "0.3.9", features = ["env-filter"] } -swc_core = { version = "0.90.26", features = [ +swc_core = { version = "0.90.27", features = [ "allocator_node", "ecma_ast", "ecma_codegen", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index e83a2b568873..718f69cadb9d 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.12-nightly-20240401.1" +version = "1.4.12-nightly-20240404.1" [lib] bench = false @@ -35,7 +35,7 @@ anyhow = "1.0.66" getrandom = { version = "0.2.10", features = ["js"] } serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" -swc_core = { version = "0.90.26", features = [ +swc_core = { version = "0.90.27", features = [ "ecma_ast_serde", "ecma_codegen", "binding_macro_wasm", diff --git a/bindings/binding_minifier_node/Cargo.toml b/bindings/binding_minifier_node/Cargo.toml index f5ec24798f74..0b5785435b18 100644 --- a/bindings/binding_minifier_node/Cargo.toml +++ b/bindings/binding_minifier_node/Cargo.toml @@ -35,9 +35,9 @@ tracing-chrome = "0.5.0" tracing-futures = "0.2.5" tracing-subscriber = { version = "0.3.9", features = ["env-filter"] } -swc_compiler_base = { version = "0.7.19", features = ["node"] } +swc_compiler_base = { version = "0.7.20", features = ["node"] } swc_config = "0.1.12" -swc_core = { version = "0.90.26", features = [ +swc_core = { version = "0.90.27", features = [ "allocator_node", "common_concurrent", "common_sourcemap", diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index ac450bdb8e60..ac61f7893191 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.12-nightly-20240401.1" +version = "1.4.12-nightly-20240404.1" [lib] bench = false @@ -35,7 +35,7 @@ anyhow = "1.0.66" getrandom = { version = "0.2.10", features = ["js"] } serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" -swc_core = { version = "0.90.26", features = [ +swc_core = { version = "0.90.27", features = [ "ecma_ast_serde", "ecma_codegen", "binding_macro_wasm", diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 1144d97ee0fa..a20554f729ac 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.209" +version = "0.91.210" [[bin]] bench = false @@ -19,4 +19,4 @@ plugin = ["swc_cli_impl/plugin"] [dependencies] anyhow = "1.0.66" -swc_cli_impl = "0.8.23" +swc_cli_impl = "0.8.24" diff --git a/package.json b/package.json index 9cb02cafbfe0..e1fb43b761da 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.4.12-nightly-20240401.1", + "version": "1.4.12-nightly-20240404.1", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/package.json b/packages/minifier/package.json index a28a770a76fd..ef250152a846 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.4.12-nightly-20240401.1", + "version": "1.4.12-nightly-20240404.1", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", From 0a76e16f6d3adeeec8e880295d6efdd18dfbdb4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Thu, 4 Apr 2024 17:42:52 +0900 Subject: [PATCH 071/172] chore: Publish `1.4.12` with `swc_core` `v0.90.27` --- bindings/Cargo.lock | 272 ++++++++---------- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- package.json | 2 +- packages/minifier/package.json | 2 +- .../scripts/npm/darwin-arm64/package.json | 2 +- .../scripts/npm/darwin-x64/package.json | 2 +- .../npm/linux-arm-gnueabihf/package.json | 2 +- .../scripts/npm/linux-arm64-gnu/package.json | 2 +- .../scripts/npm/linux-arm64-musl/package.json | 2 +- .../scripts/npm/linux-x64-gnu/package.json | 2 +- .../scripts/npm/linux-x64-musl/package.json | 2 +- .../scripts/npm/win32-arm64-msvc/package.json | 2 +- .../scripts/npm/win32-ia32-msvc/package.json | 2 +- .../scripts/npm/win32-x64-msvc/package.json | 2 +- 16 files changed, 127 insertions(+), 175 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 315d1c81381c..a48143c89db7 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -145,14 +145,13 @@ dependencies = [ [[package]] name = "auto_impl" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fee3da8ef1276b0bee5dd1c7258010d8fffd31801447323115a25560e1327b89" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ - "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] @@ -232,7 +231,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.4.12-nightly-20240404.1" +version = "1.4.12" dependencies = [ "anyhow", "getrandom", @@ -245,9 +244,9 @@ dependencies = [ [[package]] name = "binding_macros" -version = "0.64.22" +version = "0.64.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfd8f34cab921542b9dcddd34d65e5ee3953d16d07a643509494ad2d7946cb1a" +checksum = "61a30675e0f0406190035d0acdf826e65eb8b91e3d27464d83ede9570ee4ea33" dependencies = [ "anyhow", "console_error_panic_hook", @@ -292,7 +291,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.4.12-nightly-20240404.1" +version = "1.4.12" dependencies = [ "anyhow", "getrandom", @@ -311,9 +310,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.3" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "bitvec" @@ -436,7 +435,7 @@ dependencies = [ "android-tzdata", "iana-time-zone", "num-traits", - "windows-targets 0.48.0", + "windows-targets", ] [[package]] @@ -851,12 +850,12 @@ dependencies = [ [[package]] name = "dashmap" -version = "5.4.0" +version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907076dfda823b0b36d2a1bb5f90c96660a5bbcd7729e10727f07858f22c4edc" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", - "hashbrown 0.12.3", + "hashbrown 0.14.3", "lock_api", "once_cell", "parking_lot_core", @@ -942,9 +941,9 @@ dependencies = [ [[package]] name = "either" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" [[package]] name = "enum-iterator" @@ -1338,15 +1337,16 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hstr" -version = "0.2.5" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1f8f73ec6174bb83c7a1239dce719901936ede000e343b189f242db15146d47" +checksum = "b0f5356d62012374578cd3a5c013d6586de3efbca3b53379fc1edfbb95c9db14" dependencies = [ + "hashbrown 0.14.3", "new_debug_unreachable", "once_cell", "phf", "rustc-hash", - "smallvec", + "triomphe", ] [[package]] @@ -1457,12 +1457,11 @@ dependencies = [ [[package]] name = "is-macro" -version = "0.3.0" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4467ed1321b310c2625c5aa6c1b1ffc5de4d9e42668cf697a08fb033ee8265e" +checksum = "59a85abdc13717906baccb5a1e435556ce0df215f242892f721dff62bf25288f" dependencies = [ "Inflector", - "pmutil", "proc-macro2", "quote", "syn 2.0.48", @@ -1582,9 +1581,9 @@ checksum = "9b085a4f2cde5781fc4b1717f2e86c62f5cda49de7ba99a7c2eae02b61c9064c" [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -1767,7 +1766,7 @@ version = "2.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69b29acdc6cc5c918c3eabd51d241b1c6dfa8914f3552fcfd76e1d7536934581" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.5.0", "ctor", "napi-derive", "napi-sys", @@ -1981,15 +1980,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.7" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.16", + "redox_syscall 0.4.1", "smallvec", - "windows-sys 0.45.0", + "windows-targets", ] [[package]] @@ -2358,6 +2357,15 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "regalloc2" version = "0.5.1" @@ -2645,9 +2653,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.115" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" dependencies = [ "itoa", "ryu", @@ -2953,9 +2961,9 @@ dependencies = [ [[package]] name = "swc" -version = "0.273.23" +version = "0.273.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a3c87ffee4d9ed775e1c0f4f3865feee7c72f2b62ab58ae7a02c70dc5d7cd11" +checksum = "d6012330faebbde05f69bc4ca9b9104edeba68ba5475eef13172802859a601ab" dependencies = [ "anyhow", "base64", @@ -3006,9 +3014,9 @@ dependencies = [ [[package]] name = "swc_atoms" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d538eaaa6f085161d088a04cf0a3a5a52c5a7f2b3bd9b83f73f058b0ed357c0" +checksum = "04d9d1941a7d24fc503efa29c53f88dd61e6a15cc371947a75cca3b48d564b5b" dependencies = [ "bytecheck", "hstr", @@ -3020,9 +3028,9 @@ dependencies = [ [[package]] name = "swc_bundler" -version = "0.225.17" +version = "0.225.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f145a1a7293edce9efa80fe4f92a2cbd821c31d5c3123d04182fc1928613d978" +checksum = "0f158dd00ce1431cdc7a39f01c5e35bd5a10f1455768c97b59c314c43feecf76" dependencies = [ "anyhow", "crc", @@ -3052,9 +3060,9 @@ dependencies = [ [[package]] name = "swc_cached" -version = "0.3.19" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630c761c74ac8021490b78578cc2223aa4a568241e26505c27bf0e4fd4ad8ec2" +checksum = "83406221c501860fce9c27444f44125eafe9e598b8b81be7563d7036784cd05c" dependencies = [ "ahash 0.8.8", "anyhow", @@ -3066,7 +3074,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.210" +version = "0.91.211" dependencies = [ "anyhow", "swc_cli_impl", @@ -3098,9 +3106,9 @@ dependencies = [ [[package]] name = "swc_common" -version = "0.33.21" +version = "0.33.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89598a0dfe7311750e6fad8464cafcec8ee010c649c2e04531b25e32362fdec7" +checksum = "a8f91d53367db183e55ecaa090c9a2b6e62ddbd1258aa2ac6c6925772eec9e2b" dependencies = [ "ahash 0.8.8", "anyhow", @@ -3208,11 +3216,11 @@ dependencies = [ [[package]] name = "swc_ecma_ast" -version = "0.112.6" +version = "0.112.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70656acd47c91918635f1e8589963428cb3170975b71d786c79fb7a25605f687" +checksum = "6bcd97ee367b48444f90416ea56e71d761600f816bcae9df4f99293d1fa36bd5" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.5.0", "bytecheck", "is-macro", "num-bigint", @@ -3223,14 +3231,14 @@ dependencies = [ "string_enum", "swc_atoms", "swc_common", - "unicode-id", + "unicode-id-start", ] [[package]] name = "swc_ecma_codegen" -version = "0.148.13" +version = "0.148.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9ae864cb69934f8753b9cbbad803a0ee1b0759f5b87c219db0a12e8d03fa86a" +checksum = "a1e318142ff1297c1d3d8f230b4f3eda8454d1420341fb098a9d9edbc373ef3c" dependencies = [ "memchr", "num-bigint", @@ -3259,9 +3267,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_bugfixes" -version = "0.4.17" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8731bec087336f7ed1cd4d4c082a6f7b7b9072ac5fc6f6379b6f98520a0e8303" +checksum = "4f5396aca4707f5bb34bee83160864209a45b7117ea76932daedcb9109541f40" dependencies = [ "swc_atoms", "swc_common", @@ -3289,9 +3297,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2015" -version = "0.4.17" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7646243203205d2409a891b998d4d30b7a4563a57429da1cbeabd03f18e506b2" +checksum = "5e836affd437de66b1f20ed857308bb3c25d4e20631d05595790a963076a9c0a" dependencies = [ "arrayvec", "indexmap 2.1.0", @@ -3332,9 +3340,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2017" -version = "0.4.16" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9335b27e554e21db7cd541bcee1b5a58b5994439d1a2cb1c9188a3a557548d3" +checksum = "7a4b59b144c818b639e741b0538fb70cd08500e03b3f399e3aef7b774dac1cf1" dependencies = [ "serde", "swc_atoms", @@ -3350,9 +3358,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2018" -version = "0.4.16" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66be32a60872762335524766f0afca4900699e1fc7ab14d87567e0e9b3d95cc2" +checksum = "cced4ec764d3bda35ef5451a260dc747e5ce1f179372aa09ff77bb57c42cfb0c" dependencies = [ "serde", "swc_atoms", @@ -3385,9 +3393,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2020" -version = "0.4.16" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8b310227bbafd12dbe717c1969bf5095e9b6aff563cea3e9ff6e46371971293" +checksum = "7d4b23ada85bf580f4e1639e54ab237c566a7c319c6e2d1f8010ae5323d0d1ba" dependencies = [ "serde", "swc_atoms", @@ -3467,9 +3475,9 @@ dependencies = [ [[package]] name = "swc_ecma_lints" -version = "0.92.19" +version = "0.92.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12d3615603b9719f33180080ccada04d0cb6a077d90c958a71d746c7b015c040" +checksum = "2d38a464421a91150511530b93321fa3f888cade9ad05080bf228fd72421c747" dependencies = [ "auto_impl", "dashmap", @@ -3487,9 +3495,9 @@ dependencies = [ [[package]] name = "swc_ecma_loader" -version = "0.45.23" +version = "0.45.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6732100aba9bec438fcff857ab8db5e5d3b64b42a522aec7c388d8c98a36d22a" +checksum = "ea397a556585ffd78cda6ef420f6fd0ad54320778930eeb876f02041f58bb017" dependencies = [ "anyhow", "dashmap", @@ -3509,9 +3517,9 @@ dependencies = [ [[package]] name = "swc_ecma_minifier" -version = "0.192.19" +version = "0.192.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3acd953ba8fd935428003d015cc119ddb31a510537bf2ef06294c52bacffa67" +checksum = "2025b1b4fb4bff8502378ecf37fe63726e6dfbd0ee3429abcda341edebcfb06a" dependencies = [ "arrayvec", "indexmap 2.1.0", @@ -3543,9 +3551,9 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "0.143.11" +version = "0.143.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "192482230498a24c2e7c9c580ba334a80dc43b3899366e54aa548f8d7b0f12cd" +checksum = "b6fc7ab256f83a9491b37a510dd1cba9d81bb306faf3cff1dacdbc897fa4869f" dependencies = [ "either", "new_debug_unreachable", @@ -3610,12 +3618,12 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_base" -version = "0.137.16" +version = "0.137.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69e9a23d6af398b6efd17bbdad2cfa580102f6c560611f85c63b48f76ffe8f0c" +checksum = "66b5818db80d8d9fcbc1d3453f1d246a7f56ea708ba136717a84a8caf0977afd" dependencies = [ "better_scoped_tls", - "bitflags 2.3.3", + "bitflags 2.5.0", "indexmap 2.1.0", "once_cell", "phf", @@ -3648,9 +3656,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_compat" -version = "0.163.17" +version = "0.163.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "895101f18b39009b8d27f231222e6459a0e71151ba0b3ddf934373bf657602b2" +checksum = "27a864b81fc36e2933f60015fc6df62e244339acde78e06e4640ec5656584f82" dependencies = [ "arrayvec", "indexmap 2.1.0", @@ -3697,13 +3705,13 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_module" -version = "0.180.17" +version = "0.180.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82c53f9d5e7384e840f78d096f0ed2e8cfd38486adafb282ef8550420cd44890" +checksum = "175fa941dc78c7423fd3a895ff7004f6547bb026dce537f990585fa5ce6242e5" dependencies = [ "Inflector", "anyhow", - "bitflags 2.3.3", + "bitflags 2.5.0", "indexmap 2.1.0", "is-macro", "path-clean 0.1.0", @@ -3724,9 +3732,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_optimization" -version = "0.198.17" +version = "0.198.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86789174146707d78c086cee25868624bdfef924bb535ea3fc42f53fa426d4c0" +checksum = "aa1a53995a9199fa11343506646d0cdce69e612a5dad47897169cf4fdf8b7fcb" dependencies = [ "dashmap", "indexmap 2.1.0", @@ -3749,9 +3757,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_proposal" -version = "0.171.17" +version = "0.171.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "278fec72878ab88f63cf797b33091045d29789dfe13c4051ab7ea6731c4b7ffd" +checksum = "755b89f804230b840519d49444fba3133d494ae7d9d6f7aec7b250d62dba7256" dependencies = [ "either", "rustc-hash", @@ -3769,9 +3777,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_react" -version = "0.183.17" +version = "0.183.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "762dad12edcdca424213354518ce60bc3f03a026f8e1990b11459311cef04c91" +checksum = "1b7b7de90ff41560bf021acda3fb16fb0f4f5885aeb44b6b7e638b563124d087" dependencies = [ "base64", "dashmap", @@ -3794,9 +3802,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_typescript" -version = "0.188.17" +version = "0.188.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d6824fcd8d32ab2e90745a408f71548bd081bf4522d32617745ac1ea243de9c" +checksum = "845c3ad4949c2317076e929e42c78dd43868f6c6f820911353731a5bb859e78c" dependencies = [ "ryu-js", "serde", @@ -3828,9 +3836,9 @@ dependencies = [ [[package]] name = "swc_ecma_utils" -version = "0.127.15" +version = "0.127.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f83263f449935d33f86b8ab17c88a13bc175a87a742752ebcc94be2006ab25" +checksum = "b693d3fd413b76be123d2ce899a9788db8f85ca6127a1b1d743ed9cb8a68fdcc" dependencies = [ "indexmap 2.1.0", "num_cpus", @@ -3932,9 +3940,9 @@ dependencies = [ [[package]] name = "swc_node_bundler" -version = "0.62.22" +version = "0.62.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07079b2e78876248949d98f2c177a641c5f7c21eaf73b482d72f6ecbfc80fd88" +checksum = "9965af26b4a60d9d138a91375abd4e6692de6a74a1ca150f568503ca34db022a" dependencies = [ "anyhow", "dashmap", @@ -4000,9 +4008,9 @@ dependencies = [ [[package]] name = "swc_plugin_runner" -version = "0.106.13" +version = "0.106.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3fe0f8743615139eed21376c94d8201be331040c8999e9a7c86a43d0ca2ff8b" +checksum = "e8761bc153a97c9d292eeb950fa14eb85ba9f62b95c1189344f59e47a7f76209" dependencies = [ "anyhow", "enumset", @@ -4043,9 +4051,9 @@ dependencies = [ [[package]] name = "swc_visit" -version = "0.5.10" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f5b3e8d1269a7cb95358fed3412645d9c15aa0eb1f4ca003a25a38ef2f30f1b" +checksum = "c6af31bfc7b5b7405eb0cfb5158a40f12e827af9db74ce93b0cf8b838ee1c100" dependencies = [ "either", "swc_visit_macros", @@ -4453,6 +4461,16 @@ dependencies = [ "tracing-log", ] +[[package]] +name = "triomphe" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "859eb650cfee7434994602c3a68b25d77ad9e68c8a6cd491616ef86661382eb3" +dependencies = [ + "serde", + "stable_deref_trait", +] + [[package]] name = "typed-arena" version = "2.0.2" @@ -5209,7 +5227,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.0", + "windows-targets", ] [[package]] @@ -5225,37 +5243,13 @@ dependencies = [ "windows_x86_64_msvc 0.33.0", ] -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", -] - [[package]] name = "windows-sys" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", -] - -[[package]] -name = "windows-targets" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows-targets", ] [[package]] @@ -5264,21 +5258,15 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_gnullvm", "windows_aarch64_msvc 0.48.0", "windows_i686_gnu 0.48.0", "windows_i686_msvc 0.48.0", "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_gnullvm", "windows_x86_64_msvc 0.48.0", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.48.0" @@ -5291,12 +5279,6 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd761fd3eb9ab8cc1ed81e56e567f02dd82c4c837e48ac3b2181b9ffc5060807" -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - [[package]] name = "windows_aarch64_msvc" version = "0.48.0" @@ -5309,12 +5291,6 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cab0cf703a96bab2dc0c02c0fa748491294bf9b7feb27e1f4f96340f208ada0e" -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - [[package]] name = "windows_i686_gnu" version = "0.48.0" @@ -5327,12 +5303,6 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8cfdbe89cc9ad7ce618ba34abc34bbb6c36d99e96cae2245b7943cd75ee773d0" -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - [[package]] name = "windows_i686_msvc" version = "0.48.0" @@ -5345,24 +5315,12 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4dd9b0c0e9ece7bb22e84d70d01b71c6d6248b81a3c60d11869451b4cb24784" -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - [[package]] name = "windows_x86_64_gnu" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - [[package]] name = "windows_x86_64_gnullvm" version = "0.48.0" @@ -5375,12 +5333,6 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - [[package]] name = "windows_x86_64_msvc" version = "0.48.0" diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 718f69cadb9d..c59337ba0da1 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.12-nightly-20240404.1" +version = "1.4.12" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index ac61f7893191..9900f008fa1a 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.12-nightly-20240404.1" +version = "1.4.12" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index a20554f729ac..ca4f0711dcaa 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.210" +version = "0.91.211" [[bin]] bench = false diff --git a/package.json b/package.json index e1fb43b761da..9bd83eaf858f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.4.12-nightly-20240404.1", + "version": "1.4.12", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/package.json b/packages/minifier/package.json index ef250152a846..d79d5704ba09 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.4.12-nightly-20240404.1", + "version": "1.4.12", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index 9863249b5334..c34037301890 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.4.11", + "version": "1.4.12", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index a28e705414dc..164fc729fe94 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.4.11", + "version": "1.4.12", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index a0e7817ee67b..4f189e35e558 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.4.11", + "version": "1.4.12", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index b01320193f7d..9081e3176daf 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.4.11", + "version": "1.4.12", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index c9ff86965747..5cd5ec07d862 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.4.11", + "version": "1.4.12", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index 64405650115c..6c987d58692e 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.4.11", + "version": "1.4.12", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index 8869a9d20d9c..57712412bb05 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.4.11", + "version": "1.4.12", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index 5da275fae18f..3f91d06b69ad 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.4.11", + "version": "1.4.12", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index 99051871af61..4d3962dd0e11 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.4.11", + "version": "1.4.12", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index d8b4c9961839..13e06f48a866 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.4.11", + "version": "1.4.12", "os": [ "win32" ], From c7f14ec4467d57d37920d7338cd5a84d96e98997 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Thu, 4 Apr 2024 17:42:54 +0900 Subject: [PATCH 072/172] chore: Update changelog --- CHANGELOG.md | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e02a5d84a1f5..8176e5b6781e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ # Changelog -## [unreleased] +## [1.4.12] - 2024-04-04 ### Bug Fixes @@ -1376,15 +1376,6 @@ -- **(css/modules)** Aggregate class names when composes is chained. ([#7917](https://github.com/swc-project/swc/issues/7917)) ([0db25a2](https://github.com/swc-project/swc/commit/0db25a252cf35e4b64b38bde9f34a2f33eb2f662)) - - - **(es/module)** Fix `jsc.paths` for projects using pnpm ([#7918](https://github.com/swc-project/swc/issues/7918)) ([a86e9f3](https://github.com/swc-project/swc/commit/a86e9f3bb5bd490ebf0b18fe7349a2b0fbc0c45f)) -### Features - - - -- **(es/codegen)** Add an option to print `assert` for import attributes ([#7914](https://github.com/swc-project/swc/issues/7914)) ([ee75756](https://github.com/swc-project/swc/commit/ee7575695de6dad140457ffb8bb8f0ac80c4dcdc)) - From 974f5c759c7736ab521d18c8e7bd88210691a2ab Mon Sep 17 00:00:00 2001 From: David Sherret Date: Thu, 4 Apr 2024 19:17:28 -0400 Subject: [PATCH 073/172] fix(es/transforms): Fix capacity overflow with decorators (#8815) **Description:** Fixes an incorrect capacity (found while investigating a segfault). More details: https://github.com/denoland/deno/pull/23187#issuecomment-2036266885 --- .../src/decorator_2022_03.rs | 79 ++++++++++++------- crates/swc_ecma_utils/src/lib.rs | 19 +++-- 2 files changed, 62 insertions(+), 36 deletions(-) diff --git a/crates/swc_ecma_transforms_proposal/src/decorator_2022_03.rs b/crates/swc_ecma_transforms_proposal/src/decorator_2022_03.rs index 649c1ec2e097..4adc3f41e8d9 100644 --- a/crates/swc_ecma_transforms_proposal/src/decorator_2022_03.rs +++ b/crates/swc_ecma_transforms_proposal/src/decorator_2022_03.rs @@ -1,4 +1,5 @@ use std::{ + collections::VecDeque, iter::once, mem::{take, transmute}, }; @@ -9,9 +10,9 @@ use swc_common::{util::take::Take, Spanned, SyntaxContext, DUMMY_SP}; use swc_ecma_ast::*; use swc_ecma_transforms_base::{helper, helper_expr}; use swc_ecma_utils::{ - alias_ident_for, constructor::inject_after_super, default_constructor, prepend_stmt, - private_ident, prop_name_to_expr_value, quote_ident, replace_ident, ExprFactory, IdentExt, - IdentRenamer, + alias_ident_for, constructor::inject_after_super, default_constructor, + is_maybe_branch_directive, prepend_stmt, private_ident, prop_name_to_expr_value, quote_ident, + replace_ident, ExprFactory, IdentExt, IdentRenamer, }; use swc_ecma_visit::{as_folder, noop_visit_mut_type, Fold, VisitMut, VisitMutWith}; @@ -1699,40 +1700,60 @@ impl VisitMut for Decorator202203 { let old_extra_lets = self.extra_lets.take(); let old_extra_vars = self.extra_vars.take(); - let mut new = Vec::with_capacity(n.len()); + struct Insert { + index: usize, + item: Stmt, + } - for mut n in n.take() { + let mut inserts = VecDeque::new(); + + for (index, n) in n.iter_mut().enumerate() { n.visit_mut_with(self); - if !self.extra_lets.is_empty() { - new.push(Stmt::Decl(Decl::Var(Box::new(VarDecl { - span: DUMMY_SP, - kind: VarDeclKind::Let, - decls: self.extra_lets.take(), - declare: false, - })))) - } if !self.pre_class_inits.is_empty() { - new.push(Stmt::Expr(ExprStmt { - span: DUMMY_SP, - expr: Expr::from_exprs(self.pre_class_inits.take()), - })) + inserts.push_back(Insert { + index, + item: Stmt::Expr(ExprStmt { + span: DUMMY_SP, + expr: Expr::from_exprs(self.pre_class_inits.take()), + }), + }); + } + if !self.extra_lets.is_empty() { + inserts.push_back(Insert { + index, + item: Stmt::Decl(Decl::Var(Box::new(VarDecl { + span: DUMMY_SP, + kind: VarDeclKind::Let, + decls: self.extra_lets.take(), + declare: false, + }))), + }); } - new.push(n.take()); } - if !self.extra_vars.is_empty() { - prepend_stmt( - &mut new, - VarDecl { - span: DUMMY_SP, - kind: VarDeclKind::Var, - decls: self.extra_vars.take(), - declare: false, - } - .into(), - ); + let capacity = n.len() + inserts.len() + 1; + let mut new = Vec::with_capacity(capacity); + for (index, item) in n.take().into_iter().enumerate() { + if !self.extra_vars.is_empty() && !is_maybe_branch_directive(&item) { + new.push( + VarDecl { + span: DUMMY_SP, + kind: VarDeclKind::Var, + decls: self.extra_vars.take(), + declare: false, + } + .into(), + ); + } + + while inserts.front().map(|v| v.index == index).unwrap_or(false) { + new.push(inserts.pop_front().unwrap().item); + } + new.push(item); } + new.extend(inserts.into_iter().map(|v| v.item)); + debug_assert!(new.len() <= capacity, "len: {} / {}", new.len(), capacity); *n = new; self.extra_vars = old_extra_vars; diff --git a/crates/swc_ecma_utils/src/lib.rs b/crates/swc_ecma_utils/src/lib.rs index 27c7a82c89e8..0db4830d7c0d 100644 --- a/crates/swc_ecma_utils/src/lib.rs +++ b/crates/swc_ecma_utils/src/lib.rs @@ -2253,19 +2253,24 @@ pub fn opt_chain_test( pub fn prepend_stmt(stmts: &mut Vec, stmt: T) { let idx = stmts .iter() - .position(|item| match item.as_stmt() { - Some(&Stmt::Expr(ExprStmt { ref expr, .. })) - if matches!(&**expr, Expr::Lit(Lit::Str(..))) => - { - false - } - _ => true, + .position(|item| { + item.as_stmt() + .map(|s| !is_maybe_branch_directive(s)) + .unwrap_or(true) }) .unwrap_or(stmts.len()); stmts.insert(idx, stmt); } +/// If the stmt is maybe a directive like `"use strict";` +pub fn is_maybe_branch_directive(stmt: &Stmt) -> bool { + match stmt { + Stmt::Expr(ExprStmt { ref expr, .. }) if matches!(&**expr, Expr::Lit(Lit::Str(..))) => true, + _ => false, + } +} + /// inject `stmts` after directives pub fn prepend_stmts( to: &mut Vec, From 2a7a6e9522f6de8c5c0eb3e4e6bff38deed58ac4 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Thu, 4 Apr 2024 23:19:09 +0000 Subject: [PATCH 074/172] chore: Bump crates --- CHANGELOG.md | 16 ++++++++-------- Cargo.lock | 4 ++-- crates/swc_ecma_transforms_proposal/Cargo.toml | 2 +- crates/swc_ecma_utils/Cargo.toml | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8176e5b6781e..cb5a528f77b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,12 @@ # Changelog +## [unreleased] + +### Bug Fixes + + + +- **(es/transforms)** Fix capacity overflow with decorators ([#8815](https://github.com/swc-project/swc/issues/8815)) ([974f5c7](https://github.com/swc-project/swc/commit/974f5c759c7736ab521d18c8e7bd88210691a2ab)) + ## [1.4.12] - 2024-04-04 ### Bug Fixes @@ -1370,12 +1378,4 @@ - **(es/compat)** Visit assign expr in generator ([#7932](https://github.com/swc-project/swc/issues/7932)) ([97068e1](https://github.com/swc-project/swc/commit/97068e12d16803012a4859114702577def024a36)) -## [1.3.83] - 2023-09-07 - -### Bug Fixes - - - -- **(es/module)** Fix `jsc.paths` for projects using pnpm ([#7918](https://github.com/swc-project/swc/issues/7918)) ([a86e9f3](https://github.com/swc-project/swc/commit/a86e9f3bb5bd490ebf0b18fe7349a2b0fbc0c45f)) - diff --git a/Cargo.lock b/Cargo.lock index 58f9ec49e236..76350e6dcb27 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4773,7 +4773,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_proposal" -version = "0.171.18" +version = "0.171.19" dependencies = [ "either", "rustc-hash", @@ -4886,7 +4886,7 @@ dependencies = [ [[package]] name = "swc_ecma_utils" -version = "0.127.16" +version = "0.127.17" dependencies = [ "indexmap 2.1.0", "num_cpus", diff --git a/crates/swc_ecma_transforms_proposal/Cargo.toml b/crates/swc_ecma_transforms_proposal/Cargo.toml index 67b2aa37e063..2552b93fe4a7 100644 --- a/crates/swc_ecma_transforms_proposal/Cargo.toml +++ b/crates/swc_ecma_transforms_proposal/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_proposal" repository = "https://github.com/swc-project/swc.git" -version = "0.171.18" +version = "0.171.19" [lib] bench = false diff --git a/crates/swc_ecma_utils/Cargo.toml b/crates/swc_ecma_utils/Cargo.toml index 91bd38a35928..078b3dea143f 100644 --- a/crates/swc_ecma_utils/Cargo.toml +++ b/crates/swc_ecma_utils/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_utils" repository = "https://github.com/swc-project/swc.git" -version = "0.127.16" +version = "0.127.17" [package.metadata.docs.rs] all-features = true From 811308c3526003608e61c559f43408f6065ff9ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Fri, 5 Apr 2024 09:02:51 +0900 Subject: [PATCH 075/172] fix(es/minifier): Respect `top_retain` for top-level functions (#8814) --- crates/swc_ecma_minifier/src/compress/optimize/unused.rs | 8 ++++++++ crates/swc_ecma_minifier/tests/TODO.txt | 1 - .../drop_unused/drop_toplevel_all_retain/output.js | 4 +--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/crates/swc_ecma_minifier/src/compress/optimize/unused.rs b/crates/swc_ecma_minifier/src/compress/optimize/unused.rs index 79ebff51d8f3..eaa2b047f2da 100644 --- a/crates/swc_ecma_minifier/src/compress/optimize/unused.rs +++ b/crates/swc_ecma_minifier/src/compress/optimize/unused.rs @@ -511,6 +511,14 @@ impl Optimizer<'_> { return; } + if !self.may_remove_ident(ident) { + log_abort!( + "unused: Preserving function `{}` because it's top-level", + ident.sym + ); + return; + } + // If it is not used, drop it. if self .data diff --git a/crates/swc_ecma_minifier/tests/TODO.txt b/crates/swc_ecma_minifier/tests/TODO.txt index cec001dfbdf4..4896a84541ec 100644 --- a/crates/swc_ecma_minifier/tests/TODO.txt +++ b/crates/swc_ecma_minifier/tests/TODO.txt @@ -88,7 +88,6 @@ drop_unused/delete_assign_1/input.js drop_unused/delete_assign_2/input.js drop_unused/double_assign_1/input.js drop_unused/double_assign_2/input.js -drop_unused/drop_toplevel_all_retain/input.js drop_unused/drop_toplevel_funcs/input.js drop_unused/drop_toplevel_funcs_retain/input.js drop_unused/drop_toplevel_keep_assign/input.js diff --git a/crates/swc_ecma_minifier/tests/terser/compress/drop_unused/drop_toplevel_all_retain/output.js b/crates/swc_ecma_minifier/tests/terser/compress/drop_unused/drop_toplevel_all_retain/output.js index 888671e8b76a..b2374bce8bb2 100644 --- a/crates/swc_ecma_minifier/tests/terser/compress/drop_unused/drop_toplevel_all_retain/output.js +++ b/crates/swc_ecma_minifier/tests/terser/compress/drop_unused/drop_toplevel_all_retain/output.js @@ -1,8 +1,6 @@ var a; function f(d) { - return function () { - 2; - }; + return function() {}; } a = 2; console.log(3); From 1871a76534e40eb05057781f5f0d2f75f4dcf4e2 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Fri, 5 Apr 2024 00:04:37 +0000 Subject: [PATCH 076/172] chore: Bump crates --- CHANGELOG.md | 3 +++ Cargo.lock | 4 ++-- crates/swc_core/Cargo.toml | 2 +- crates/swc_ecma_minifier/Cargo.toml | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb5a528f77b1..de30f33aec1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ +- **(es/minifier)** Respect `top_retain` for top-level functions ([#8814](https://github.com/swc-project/swc/issues/8814)) ([811308c](https://github.com/swc-project/swc/commit/811308c3526003608e61c559f43408f6065ff9ee)) + + - **(es/transforms)** Fix capacity overflow with decorators ([#8815](https://github.com/swc-project/swc/issues/8815)) ([974f5c7](https://github.com/swc-project/swc/commit/974f5c759c7736ab521d18c8e7bd88210691a2ab)) ## [1.4.12] - 2024-04-04 diff --git a/Cargo.lock b/Cargo.lock index 76350e6dcb27..76d4e2c5e9b1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3935,7 +3935,7 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.90.27" +version = "0.90.28" dependencies = [ "anyhow", "binding_macros", @@ -4468,7 +4468,7 @@ dependencies = [ [[package]] name = "swc_ecma_minifier" -version = "0.192.20" +version = "0.192.21" dependencies = [ "ansi_term", "anyhow", diff --git a/crates/swc_core/Cargo.toml b/crates/swc_core/Cargo.toml index 949250f89428..b4781e340dfa 100644 --- a/crates/swc_core/Cargo.toml +++ b/crates/swc_core/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_core" repository = "https://github.com/swc-project/swc.git" -version = "0.90.27" +version = "0.90.28" [package.metadata.docs.rs] features = [ "allocator_node", diff --git a/crates/swc_ecma_minifier/Cargo.toml b/crates/swc_ecma_minifier/Cargo.toml index 4f12c3112340..c09c4bd867af 100644 --- a/crates/swc_ecma_minifier/Cargo.toml +++ b/crates/swc_ecma_minifier/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/lists/*.json"] license = "Apache-2.0" name = "swc_ecma_minifier" repository = "https://github.com/swc-project/swc.git" -version = "0.192.20" +version = "0.192.21" [package.metadata.docs.rs] all-features = true From 2d4eb9684376b9f9a9241746f5f90582ab1a0439 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Sat, 6 Apr 2024 00:08:53 +0000 Subject: [PATCH 077/172] chore: Publish 1.4.13-nightly-20240406.1 --- bindings/Cargo.lock | 10 +++++----- bindings/binding_core_node/Cargo.toml | 2 +- bindings/binding_core_wasm/Cargo.toml | 4 ++-- bindings/binding_minifier_node/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 4 ++-- bindings/swc_cli/Cargo.toml | 2 +- package.json | 2 +- packages/minifier/package.json | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index a48143c89db7..30ebcfa6105d 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -231,7 +231,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.4.12" +version = "1.4.13-nightly-20240406.1" dependencies = [ "anyhow", "getrandom", @@ -291,7 +291,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.4.12" +version = "1.4.13-nightly-20240406.1" dependencies = [ "anyhow", "getrandom", @@ -3074,7 +3074,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.211" +version = "0.91.212" dependencies = [ "anyhow", "swc_cli_impl", @@ -3189,9 +3189,9 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.90.27" +version = "0.90.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10e6117b0d6a33de0df45da99f17752d7846ffb871d0336cce11cab8f7b8eb6c" +checksum = "6957703336e4e9a20d4fcef3d065e1f31906c52470992f5bf4281e6fe1342dde" dependencies = [ "binding_macros", "swc", diff --git a/bindings/binding_core_node/Cargo.toml b/bindings/binding_core_node/Cargo.toml index ba97845bffe9..0a1ca776e325 100644 --- a/bindings/binding_core_node/Cargo.toml +++ b/bindings/binding_core_node/Cargo.toml @@ -51,7 +51,7 @@ tracing-chrome = "0.5.0" tracing-futures = "0.2.5" tracing-subscriber = { version = "0.3.9", features = ["env-filter"] } -swc_core = { version = "0.90.27", features = [ +swc_core = { version = "0.90.28", features = [ "allocator_node", "ecma_ast", "ecma_codegen", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index c59337ba0da1..02afd0c0a81f 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.12" +version = "1.4.13-nightly-20240406.1" [lib] bench = false @@ -35,7 +35,7 @@ anyhow = "1.0.66" getrandom = { version = "0.2.10", features = ["js"] } serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" -swc_core = { version = "0.90.27", features = [ +swc_core = { version = "0.90.28", features = [ "ecma_ast_serde", "ecma_codegen", "binding_macro_wasm", diff --git a/bindings/binding_minifier_node/Cargo.toml b/bindings/binding_minifier_node/Cargo.toml index 0b5785435b18..918d3b0331e5 100644 --- a/bindings/binding_minifier_node/Cargo.toml +++ b/bindings/binding_minifier_node/Cargo.toml @@ -37,7 +37,7 @@ tracing-subscriber = { version = "0.3.9", features = ["env-filter"] } swc_compiler_base = { version = "0.7.20", features = ["node"] } swc_config = "0.1.12" -swc_core = { version = "0.90.27", features = [ +swc_core = { version = "0.90.28", features = [ "allocator_node", "common_concurrent", "common_sourcemap", diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 9900f008fa1a..f46658dc874b 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.12" +version = "1.4.13-nightly-20240406.1" [lib] bench = false @@ -35,7 +35,7 @@ anyhow = "1.0.66" getrandom = { version = "0.2.10", features = ["js"] } serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" -swc_core = { version = "0.90.27", features = [ +swc_core = { version = "0.90.28", features = [ "ecma_ast_serde", "ecma_codegen", "binding_macro_wasm", diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index ca4f0711dcaa..2b774324ad2b 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.211" +version = "0.91.212" [[bin]] bench = false diff --git a/package.json b/package.json index 9bd83eaf858f..a427f32e19b4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.4.12", + "version": "1.4.13-nightly-20240406.1", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/package.json b/packages/minifier/package.json index d79d5704ba09..a56faee9bbde 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.4.12", + "version": "1.4.13-nightly-20240406.1", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", From 089f61bc37bb9c09dc94a24a5518840883827f57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Tue, 9 Apr 2024 00:19:28 +0900 Subject: [PATCH 078/172] fix(plugin/runner): Pin version of `virtual-fs` (#8827) --- Cargo.lock | 7 ++++--- crates/swc_plugin_runner/Cargo.toml | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 76d4e2c5e9b1..8d7e1bde2175 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1717,7 +1717,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.4.10", + "socket2 0.5.5", "tokio", "tower-service", "tracing", @@ -5248,6 +5248,7 @@ dependencies = [ "testing", "tokio", "tracing", + "virtual-fs", "wasmer", "wasmer-cache", "wasmer-compiler-cranelift", @@ -6034,9 +6035,9 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "virtual-fs" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a16a7893a16a31ef442ce86691e7060a19691fb7739387624f3dd07ec4c04b" +checksum = "6ce7b7674a3d0ddb5915b8f4feccdd6e8680c5980c296688e0f0e7378b8c69e1" dependencies = [ "anyhow", "async-trait", diff --git a/crates/swc_plugin_runner/Cargo.toml b/crates/swc_plugin_runner/Cargo.toml index 5acadbeff944..62802ecf0da8 100644 --- a/crates/swc_plugin_runner/Cargo.toml +++ b/crates/swc_plugin_runner/Cargo.toml @@ -55,6 +55,7 @@ serde = { version = "1.0.197", features = ["derive"] } serde_json = "1.0.115" tokio = { version = "1", default-features = false, optional = true } tracing = "0.1.40" +virtual-fs = { version = "=0.11.1", default-features = false } wasmer = { version = "4.2.5", default-features = false } wasmer-wasix = { version = "0.18.0", default-features = false } From b511cea27301cde7e1ff7c8b4d4c5682e06d93d6 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Mon, 8 Apr 2024 15:21:09 +0000 Subject: [PATCH 079/172] chore: Bump crates --- CHANGELOG.md | 6 +++--- Cargo.lock | 4 ++-- crates/swc_core/Cargo.toml | 2 +- crates/swc_plugin_runner/Cargo.toml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de30f33aec1c..3d0e337e1e77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ - **(es/transforms)** Fix capacity overflow with decorators ([#8815](https://github.com/swc-project/swc/issues/8815)) ([974f5c7](https://github.com/swc-project/swc/commit/974f5c759c7736ab521d18c8e7bd88210691a2ab)) + +- **(plugin/runner)** Pin version of `virtual-fs` ([#8827](https://github.com/swc-project/swc/issues/8827)) ([089f61b](https://github.com/swc-project/swc/commit/089f61bc37bb9c09dc94a24a5518840883827f57)) + ## [1.4.12] - 2024-04-04 ### Bug Fixes @@ -1378,7 +1381,4 @@ - **(es/codegen)** Use `emitAssertForImportAttributes` ([#7936](https://github.com/swc-project/swc/issues/7936)) ([dac8888](https://github.com/swc-project/swc/commit/dac8888829841e1de19d53c887a2a52c9ab5feaa)) - -- **(es/compat)** Visit assign expr in generator ([#7932](https://github.com/swc-project/swc/issues/7932)) ([97068e1](https://github.com/swc-project/swc/commit/97068e12d16803012a4859114702577def024a36)) - diff --git a/Cargo.lock b/Cargo.lock index 8d7e1bde2175..dec3fbeb9799 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3935,7 +3935,7 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.90.28" +version = "0.90.29" dependencies = [ "anyhow", "binding_macros", @@ -5225,7 +5225,7 @@ dependencies = [ [[package]] name = "swc_plugin_runner" -version = "0.106.14" +version = "0.106.15" dependencies = [ "anyhow", "criterion", diff --git a/crates/swc_core/Cargo.toml b/crates/swc_core/Cargo.toml index b4781e340dfa..371bb437f551 100644 --- a/crates/swc_core/Cargo.toml +++ b/crates/swc_core/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_core" repository = "https://github.com/swc-project/swc.git" -version = "0.90.28" +version = "0.90.29" [package.metadata.docs.rs] features = [ "allocator_node", diff --git a/crates/swc_plugin_runner/Cargo.toml b/crates/swc_plugin_runner/Cargo.toml index 62802ecf0da8..6b6168874be5 100644 --- a/crates/swc_plugin_runner/Cargo.toml +++ b/crates/swc_plugin_runner/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_plugin_runner" repository = "https://github.com/swc-project/swc.git" -version = "0.106.14" +version = "0.106.15" [lib] bench = false From e1f770463d1f0402468e07fca9c637e3823bb2d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Tue, 9 Apr 2024 01:04:15 +0900 Subject: [PATCH 080/172] fix(es/module): Respect `module.resolveFully` in more cases (#8820) **Related issue:** - Closes #8742 --- crates/swc/tests/fixture/issues-8xxx/8742/input/.swcrc | 9 +++++++++ .../tests/fixture/issues-8xxx/8742/input/global/index.js | 1 + crates/swc/tests/fixture/issues-8xxx/8742/input/index.js | 9 +++++++++ .../issues-8xxx/8742/input/themeToTokensObject.js | 1 + .../tests/fixture/issues-8xxx/8742/input/themes/index.js | 1 + .../swc/tests/fixture/issues-8xxx/8742/input/tokens.js | 1 + .../tests/fixture/issues-8xxx/8742/input/utils/index.js | 1 + .../fixture/issues-8xxx/8742/output/global/index.js | 1 + .../swc/tests/fixture/issues-8xxx/8742/output/index.js | 8 ++++++++ .../issues-8xxx/8742/output/themeToTokensObject.js | 1 + .../fixture/issues-8xxx/8742/output/themes/index.js | 1 + .../swc/tests/fixture/issues-8xxx/8742/output/tokens.js | 1 + .../tests/fixture/issues-8xxx/8742/output/utils/index.js | 1 + crates/swc_ecma_transforms_module/src/path.rs | 3 ++- 14 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 crates/swc/tests/fixture/issues-8xxx/8742/input/.swcrc create mode 100644 crates/swc/tests/fixture/issues-8xxx/8742/input/global/index.js create mode 100644 crates/swc/tests/fixture/issues-8xxx/8742/input/index.js create mode 100644 crates/swc/tests/fixture/issues-8xxx/8742/input/themeToTokensObject.js create mode 100644 crates/swc/tests/fixture/issues-8xxx/8742/input/themes/index.js create mode 100644 crates/swc/tests/fixture/issues-8xxx/8742/input/tokens.js create mode 100644 crates/swc/tests/fixture/issues-8xxx/8742/input/utils/index.js create mode 100644 crates/swc/tests/fixture/issues-8xxx/8742/output/global/index.js create mode 100644 crates/swc/tests/fixture/issues-8xxx/8742/output/index.js create mode 100644 crates/swc/tests/fixture/issues-8xxx/8742/output/themeToTokensObject.js create mode 100644 crates/swc/tests/fixture/issues-8xxx/8742/output/themes/index.js create mode 100644 crates/swc/tests/fixture/issues-8xxx/8742/output/tokens.js create mode 100644 crates/swc/tests/fixture/issues-8xxx/8742/output/utils/index.js diff --git a/crates/swc/tests/fixture/issues-8xxx/8742/input/.swcrc b/crates/swc/tests/fixture/issues-8xxx/8742/input/.swcrc new file mode 100644 index 000000000000..a2cea3ca7c0e --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8742/input/.swcrc @@ -0,0 +1,9 @@ +{ + "module": { + "type": "es6", + "resolveFully": true + }, + "jsc": { + "baseUrl": "." + } +} \ No newline at end of file diff --git a/crates/swc/tests/fixture/issues-8xxx/8742/input/global/index.js b/crates/swc/tests/fixture/issues-8xxx/8742/input/global/index.js new file mode 100644 index 000000000000..3deda8047e15 --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8742/input/global/index.js @@ -0,0 +1 @@ +export { } \ No newline at end of file diff --git a/crates/swc/tests/fixture/issues-8xxx/8742/input/index.js b/crates/swc/tests/fixture/issues-8xxx/8742/input/index.js new file mode 100644 index 000000000000..50ad856a72be --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8742/input/index.js @@ -0,0 +1,9 @@ +// ====== +// SOURCE +// ====== +export { teamsDarkTheme, teamsHighContrastTheme, teamsLightTheme, webDarkTheme, webLightTheme } from './themes'; // 🚨 invalid directory path - wont work within browser +export { createDarkTheme, createHighContrastTheme, createLightTheme, createTeamsDarkTheme } from './utils'; // 🚨 invalid directory path - wont work within browser + +export { themeToTokensObject } from './themeToTokensObject'; +export { tokens } from './tokens'; +export { typographyStyles } from './global'; // 🚨 invalid directory path - wont work within browser \ No newline at end of file diff --git a/crates/swc/tests/fixture/issues-8xxx/8742/input/themeToTokensObject.js b/crates/swc/tests/fixture/issues-8xxx/8742/input/themeToTokensObject.js new file mode 100644 index 000000000000..f0a766d36b82 --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8742/input/themeToTokensObject.js @@ -0,0 +1 @@ +export { } diff --git a/crates/swc/tests/fixture/issues-8xxx/8742/input/themes/index.js b/crates/swc/tests/fixture/issues-8xxx/8742/input/themes/index.js new file mode 100644 index 000000000000..3deda8047e15 --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8742/input/themes/index.js @@ -0,0 +1 @@ +export { } \ No newline at end of file diff --git a/crates/swc/tests/fixture/issues-8xxx/8742/input/tokens.js b/crates/swc/tests/fixture/issues-8xxx/8742/input/tokens.js new file mode 100644 index 000000000000..3deda8047e15 --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8742/input/tokens.js @@ -0,0 +1 @@ +export { } \ No newline at end of file diff --git a/crates/swc/tests/fixture/issues-8xxx/8742/input/utils/index.js b/crates/swc/tests/fixture/issues-8xxx/8742/input/utils/index.js new file mode 100644 index 000000000000..f0a766d36b82 --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8742/input/utils/index.js @@ -0,0 +1 @@ +export { } diff --git a/crates/swc/tests/fixture/issues-8xxx/8742/output/global/index.js b/crates/swc/tests/fixture/issues-8xxx/8742/output/global/index.js new file mode 100644 index 000000000000..2234b9cae16d --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8742/output/global/index.js @@ -0,0 +1 @@ +export { }; diff --git a/crates/swc/tests/fixture/issues-8xxx/8742/output/index.js b/crates/swc/tests/fixture/issues-8xxx/8742/output/index.js new file mode 100644 index 000000000000..971a2d901d87 --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8742/output/index.js @@ -0,0 +1,8 @@ +// ====== +// SOURCE +// ====== +export { teamsDarkTheme, teamsHighContrastTheme, teamsLightTheme, webDarkTheme, webLightTheme } from "./themes/index.js"; // 🚨 invalid directory path - wont work within browser +export { createDarkTheme, createHighContrastTheme, createLightTheme, createTeamsDarkTheme } from "./utils/index.js"; // 🚨 invalid directory path - wont work within browser +export { themeToTokensObject } from "./themeToTokensObject.js"; +export { tokens } from "./tokens.js"; +export { typographyStyles } from "./global/index.js"; // 🚨 invalid directory path - wont work within browser diff --git a/crates/swc/tests/fixture/issues-8xxx/8742/output/themeToTokensObject.js b/crates/swc/tests/fixture/issues-8xxx/8742/output/themeToTokensObject.js new file mode 100644 index 000000000000..2234b9cae16d --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8742/output/themeToTokensObject.js @@ -0,0 +1 @@ +export { }; diff --git a/crates/swc/tests/fixture/issues-8xxx/8742/output/themes/index.js b/crates/swc/tests/fixture/issues-8xxx/8742/output/themes/index.js new file mode 100644 index 000000000000..2234b9cae16d --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8742/output/themes/index.js @@ -0,0 +1 @@ +export { }; diff --git a/crates/swc/tests/fixture/issues-8xxx/8742/output/tokens.js b/crates/swc/tests/fixture/issues-8xxx/8742/output/tokens.js new file mode 100644 index 000000000000..2234b9cae16d --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8742/output/tokens.js @@ -0,0 +1 @@ +export { }; diff --git a/crates/swc/tests/fixture/issues-8xxx/8742/output/utils/index.js b/crates/swc/tests/fixture/issues-8xxx/8742/output/utils/index.js new file mode 100644 index 000000000000..2234b9cae16d --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8742/output/utils/index.js @@ -0,0 +1 @@ +export { }; diff --git a/crates/swc_ecma_transforms_module/src/path.rs b/crates/swc_ecma_transforms_module/src/path.rs index 06ee744f46a7..f1ae18c17c78 100644 --- a/crates/swc_ecma_transforms_module/src/path.rs +++ b/crates/swc_ecma_transforms_module/src/path.rs @@ -173,7 +173,8 @@ where false }; - if orig_filename == "index" { + if self.config.resolve_fully && is_resolved_as_js { + } else if orig_filename == "index" { // Import: `./foo/index` // Resolved: `./foo/index.js` From e63b39bbcdbac9f5165240ba88c19812fb247588 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Mon, 8 Apr 2024 16:06:33 +0000 Subject: [PATCH 081/172] chore: Bump crates --- CHANGELOG.md | 6 +++--- Cargo.lock | 2 +- crates/swc_ecma_transforms_module/Cargo.toml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d0e337e1e77..ced488523ad1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ - **(es/minifier)** Respect `top_retain` for top-level functions ([#8814](https://github.com/swc-project/swc/issues/8814)) ([811308c](https://github.com/swc-project/swc/commit/811308c3526003608e61c559f43408f6065ff9ee)) +- **(es/module)** Respect `module.resolveFully` in more cases ([#8820](https://github.com/swc-project/swc/issues/8820)) ([e1f7704](https://github.com/swc-project/swc/commit/e1f770463d1f0402468e07fca9c637e3823bb2d1)) + + - **(es/transforms)** Fix capacity overflow with decorators ([#8815](https://github.com/swc-project/swc/issues/8815)) ([974f5c7](https://github.com/swc-project/swc/commit/974f5c759c7736ab521d18c8e7bd88210691a2ab)) @@ -1376,9 +1379,6 @@ -- **(es/codegen)** Emit leading comments for `ExprStmt` ([#7916](https://github.com/swc-project/swc/issues/7916)) ([2da5895](https://github.com/swc-project/swc/commit/2da58959c26d5afb0b8f179fc681478bf05e6e20)) - - - **(es/codegen)** Use `emitAssertForImportAttributes` ([#7936](https://github.com/swc-project/swc/issues/7936)) ([dac8888](https://github.com/swc-project/swc/commit/dac8888829841e1de19d53c887a2a52c9ab5feaa)) diff --git a/Cargo.lock b/Cargo.lock index dec3fbeb9799..328eba81185b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4714,7 +4714,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_module" -version = "0.180.18" +version = "0.180.19" dependencies = [ "Inflector", "anyhow", diff --git a/crates/swc_ecma_transforms_module/Cargo.toml b/crates/swc_ecma_transforms_module/Cargo.toml index 05215eff3f75..3b1c78cbdca0 100644 --- a/crates/swc_ecma_transforms_module/Cargo.toml +++ b/crates/swc_ecma_transforms_module/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_module" repository = "https://github.com/swc-project/swc.git" -version = "0.180.18" +version = "0.180.19" [lib] bench = false From aa4ed06fe558d1bd412d8185c6490b50488e716e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 9 Apr 2024 09:54:52 +0900 Subject: [PATCH 082/172] chore: Allow gist.github.com for repros --- .github/workflows/nissuer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nissuer.yml b/.github/workflows/nissuer.yml index f364f3954fb0..6d186b0c6fa5 100644 --- a/.github/workflows/nissuer.yml +++ b/.github/workflows/nissuer.yml @@ -20,7 +20,7 @@ jobs: uses: balazsorban44/nissuer@1.7.3 with: reproduction-comment: ".github/invalid-link.md" - reproduction-hosts: "github.com,play.swc.rs,evanw.github.io,lightningcss.dev,play.rust-lang.org,stackblitz.com" + reproduction-hosts: "github.com,gist.github.com,play.swc.rs,evanw.github.io,lightningcss.dev,play.rust-lang.org,stackblitz.com" reproduction-invalid-label: "invalid link" reproduction-issue-labels: "C-bug" reproduction-link-section: "### Playground link \\(or link to the minimal reproduction\\)(.*)### SWC Info output" From dc046572def13a3eb625520c5a8bfd651b86f3a3 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Mon, 8 Apr 2024 21:21:03 -0400 Subject: [PATCH 083/172] fix(visit): Improve `Map` implementation for `Box` (#8819) **Related issue (if exists):** - Closes #8817 --- crates/swc_visit/src/util/map.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/crates/swc_visit/src/util/map.rs b/crates/swc_visit/src/util/map.rs index 1b3eb7d07b8c..992d2332645f 100644 --- a/crates/swc_visit/src/util/map.rs +++ b/crates/swc_visit/src/util/map.rs @@ -1,4 +1,4 @@ -use std::{mem, ptr}; +use std::ptr; /// Copied from `syntax::ptr::P` of rustc. pub trait Map { @@ -13,17 +13,15 @@ pub trait Map { } impl Map for Box { - fn map(mut self, f: F) -> Self + fn map(self, f: F) -> Self where F: FnOnce(T) -> T, { - let p: *mut T = &mut *self; - // Leak self in case of panic. // FIXME(eddyb) Use some sort of "free guard" that // only deallocates, without dropping the pointee, // in case the call the `f` below ends in a panic. - mem::forget(self); + let p = Box::into_raw(self); unsafe { ptr::write(p, f(ptr::read(p))); From 8f9aadde385283e910eb21400097fc3743c17a95 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 9 Apr 2024 01:22:59 +0000 Subject: [PATCH 084/172] chore: Bump crates --- CHANGELOG.md | 11 +++-------- Cargo.lock | 2 +- crates/swc_visit/Cargo.toml | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ced488523ad1..2070cf0f94ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,9 @@ - **(plugin/runner)** Pin version of `virtual-fs` ([#8827](https://github.com/swc-project/swc/issues/8827)) ([089f61b](https://github.com/swc-project/swc/commit/089f61bc37bb9c09dc94a24a5518840883827f57)) + +- **(visit)** Improve `Map` implementation for `Box` ([#8819](https://github.com/swc-project/swc/issues/8819)) ([dc04657](https://github.com/swc-project/swc/commit/dc046572def13a3eb625520c5a8bfd651b86f3a3)) + ## [1.4.12] - 2024-04-04 ### Bug Fixes @@ -1373,12 +1376,4 @@ - **(es/module)** Add an option to make resolver fully resolve `index.js` ([#7945](https://github.com/swc-project/swc/issues/7945)) ([7e8d72d](https://github.com/swc-project/swc/commit/7e8d72d03b312b7a48c17afa8d2a4d7f4e802a6a)) -## [1.3.84] - 2023-09-11 - -### Bug Fixes - - - -- **(es/codegen)** Use `emitAssertForImportAttributes` ([#7936](https://github.com/swc-project/swc/issues/7936)) ([dac8888](https://github.com/swc-project/swc/commit/dac8888829841e1de19d53c887a2a52c9ab5feaa)) - diff --git a/Cargo.lock b/Cargo.lock index 328eba81185b..fb883afcdfc2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5278,7 +5278,7 @@ dependencies = [ [[package]] name = "swc_visit" -version = "0.5.11" +version = "0.5.12" dependencies = [ "either", "swc_visit_macros", diff --git a/crates/swc_visit/Cargo.toml b/crates/swc_visit/Cargo.toml index 8c2d3f416fd1..5119d8ba25d7 100644 --- a/crates/swc_visit/Cargo.toml +++ b/crates/swc_visit/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_visit" repository = "https://github.com/swc-project/swc.git" -version = "0.5.11" +version = "0.5.12" [lib] bench = false From 9ed93c17cdb645274392ebdb9ad87f8fbeeed971 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Mon, 8 Apr 2024 21:51:21 -0400 Subject: [PATCH 085/172] fix(es/decorators): Fix capacity overflow with decorators (#8818) --- .../src/decorator_2022_03.rs | 161 ++++++++++++------ .../tests/decorators/issue-7358/2/input.js | 24 +++ .../decorators/issue-7358/2/options.json | 3 + .../tests/decorators/issue-7358/2/output.js | 42 +++++ 4 files changed, 175 insertions(+), 55 deletions(-) create mode 100644 crates/swc_ecma_transforms_proposal/tests/decorators/issue-7358/2/input.js create mode 100644 crates/swc_ecma_transforms_proposal/tests/decorators/issue-7358/2/options.json create mode 100644 crates/swc_ecma_transforms_proposal/tests/decorators/issue-7358/2/output.js diff --git a/crates/swc_ecma_transforms_proposal/src/decorator_2022_03.rs b/crates/swc_ecma_transforms_proposal/src/decorator_2022_03.rs index 4adc3f41e8d9..3dbedf9c99fb 100644 --- a/crates/swc_ecma_transforms_proposal/src/decorator_2022_03.rs +++ b/crates/swc_ecma_transforms_proposal/src/decorator_2022_03.rs @@ -11,8 +11,8 @@ use swc_ecma_ast::*; use swc_ecma_transforms_base::{helper, helper_expr}; use swc_ecma_utils::{ alias_ident_for, constructor::inject_after_super, default_constructor, - is_maybe_branch_directive, prepend_stmt, private_ident, prop_name_to_expr_value, quote_ident, - replace_ident, ExprFactory, IdentExt, IdentRenamer, + is_maybe_branch_directive, private_ident, prop_name_to_expr_value, quote_ident, replace_ident, + ExprFactory, IdentExt, IdentRenamer, }; use swc_ecma_visit::{as_folder, noop_visit_mut_type, Fold, VisitMut, VisitMutWith}; @@ -1507,12 +1507,13 @@ impl VisitMut for Decorator202203 { let pre_class_inits = self.pre_class_inits.take(); let extra_exports = self.extra_exports.take(); - let mut new = Vec::with_capacity(n.len()); + let mut insert_builder = InsertPassBuilder::new(); - for mut n in n.take() { + for (index, n) in n.iter_mut().enumerate() { n.visit_mut_with(self); if !self.extra_lets.is_empty() { - new.push( + insert_builder.push_back( + index, Stmt::Decl(Decl::Var(Box::new(VarDecl { span: DUMMY_SP, kind: VarDeclKind::Let, @@ -1520,23 +1521,30 @@ impl VisitMut for Decorator202203 { declare: false, }))) .into(), - ) + ); } if !self.pre_class_inits.is_empty() { - new.push( + insert_builder.push_back( + index, Stmt::Expr(ExprStmt { span: DUMMY_SP, expr: Expr::from_exprs(self.pre_class_inits.take()), }) .into(), - ) + ); } - new.push(n.take()); } if !self.extra_vars.is_empty() { - prepend_stmt( - &mut new, + let insert_pos = n + .iter() + .position(|module_item| match module_item { + ModuleItem::Stmt(stmt) => !is_maybe_branch_directive(stmt), + ModuleItem::ModuleDecl(_) => true, + }) + .unwrap_or(0); + insert_builder.push_front( + insert_pos, VarDecl { span: DUMMY_SP, kind: VarDeclKind::Var, @@ -1548,18 +1556,19 @@ impl VisitMut for Decorator202203 { } if !self.extra_exports.is_empty() { - new.push(ModuleItem::ModuleDecl(ModuleDecl::ExportNamed( - NamedExport { + insert_builder.push_back( + n.len() + 1, + ModuleItem::ModuleDecl(ModuleDecl::ExportNamed(NamedExport { span: DUMMY_SP, specifiers: self.extra_exports.take(), src: None, type_only: false, with: None, - }, - ))); + })), + ); } - *n = new; + *n = insert_builder.build(n.take()); if !self.rename_map.is_empty() { n.visit_mut_with(&mut IdentRenamer::new(&self.rename_map)); @@ -1700,61 +1709,49 @@ impl VisitMut for Decorator202203 { let old_extra_lets = self.extra_lets.take(); let old_extra_vars = self.extra_vars.take(); - struct Insert { - index: usize, - item: Stmt, - } - - let mut inserts = VecDeque::new(); - + let mut insert_builder = InsertPassBuilder::new(); for (index, n) in n.iter_mut().enumerate() { n.visit_mut_with(self); - if !self.pre_class_inits.is_empty() { - inserts.push_back(Insert { - index, - item: Stmt::Expr(ExprStmt { - span: DUMMY_SP, - expr: Expr::from_exprs(self.pre_class_inits.take()), - }), - }); - } if !self.extra_lets.is_empty() { - inserts.push_back(Insert { + insert_builder.push_back( index, - item: Stmt::Decl(Decl::Var(Box::new(VarDecl { + Stmt::Decl(Decl::Var(Box::new(VarDecl { span: DUMMY_SP, kind: VarDeclKind::Let, decls: self.extra_lets.take(), declare: false, }))), - }); + ); } - } - - let capacity = n.len() + inserts.len() + 1; - let mut new = Vec::with_capacity(capacity); - for (index, item) in n.take().into_iter().enumerate() { - if !self.extra_vars.is_empty() && !is_maybe_branch_directive(&item) { - new.push( - VarDecl { + if !self.pre_class_inits.is_empty() { + insert_builder.push_back( + index, + Stmt::Expr(ExprStmt { span: DUMMY_SP, - kind: VarDeclKind::Var, - decls: self.extra_vars.take(), - declare: false, - } - .into(), + expr: Expr::from_exprs(self.pre_class_inits.take()), + }), ); } + } - while inserts.front().map(|v| v.index == index).unwrap_or(false) { - new.push(inserts.pop_front().unwrap().item); - } - new.push(item); + if !self.extra_vars.is_empty() { + let insert_pos = n + .iter() + .position(|stmt| !is_maybe_branch_directive(stmt)) + .unwrap_or(0); + insert_builder.push_front( + insert_pos, + VarDecl { + span: DUMMY_SP, + kind: VarDeclKind::Var, + decls: self.extra_vars.take(), + declare: false, + } + .into(), + ); } - new.extend(inserts.into_iter().map(|v| v.item)); - debug_assert!(new.len() <= capacity, "len: {} / {}", new.len(), capacity); - *n = new; + *n = insert_builder.build(n.take()); self.extra_vars = old_extra_vars; self.extra_lets = old_extra_lets; @@ -1763,6 +1760,60 @@ impl VisitMut for Decorator202203 { } } +/// Inserts into a vector on `build()` setting the correct +/// capacity. This is useful in scenarios where you're iterating +/// a vector to insert and all the inserts are in the order of +/// the iteration. +struct InsertPassBuilder { + inserts: VecDeque<(usize, T)>, +} + +impl InsertPassBuilder { + pub fn new() -> Self { + Self { + inserts: Default::default(), + } + } + + pub fn push_front(&mut self, index: usize, item: T) { + if cfg!(debug_assertions) { + if let Some(past) = self.inserts.front() { + debug_assert!(past.0 >= index, "{} {}", past.0, index); + } + } + self.inserts.push_front((index, item)); + } + + pub fn push_back(&mut self, index: usize, item: T) { + if cfg!(debug_assertions) { + if let Some(past) = self.inserts.back() { + debug_assert!(past.0 <= index, "{} {}", past.0, index); + } + } + self.inserts.push_back((index, item)); + } + + pub fn build(mut self, original: Vec) -> Vec { + let capacity = original.len() + self.inserts.len(); + let mut new = Vec::with_capacity(capacity); + for (index, item) in original.into_iter().enumerate() { + while self + .inserts + .front() + .map(|(item_index, _)| *item_index == index) + .unwrap_or(false) + { + new.push(self.inserts.pop_front().unwrap().1); + } + new.push(item); + } + new.extend(self.inserts.into_iter().map(|v| v.1)); + + debug_assert!(new.len() == capacity, "len: {} / {}", new.len(), capacity); + new + } +} + fn merge_decorators(decorators: Vec>) -> Option { if decorators.len() == 1 { return decorators.into_iter().next().unwrap(); diff --git a/crates/swc_ecma_transforms_proposal/tests/decorators/issue-7358/2/input.js b/crates/swc_ecma_transforms_proposal/tests/decorators/issue-7358/2/input.js new file mode 100644 index 000000000000..8a42765c9349 --- /dev/null +++ b/crates/swc_ecma_transforms_proposal/tests/decorators/issue-7358/2/input.js @@ -0,0 +1,24 @@ +export function test() { + // try putting this in stmts instead of at the top level + @decorate() + class Foo { + + @decorate() + get name() { + return "hello" + } + + @decorate() + sayHi() { + return "hello" + } + } + + function decorate() { + return function (target, { kind }) { + console.log(target, kind) + } + } + + return new Foo(); +} \ No newline at end of file diff --git a/crates/swc_ecma_transforms_proposal/tests/decorators/issue-7358/2/options.json b/crates/swc_ecma_transforms_proposal/tests/decorators/issue-7358/2/options.json new file mode 100644 index 000000000000..4ad37b6e477c --- /dev/null +++ b/crates/swc_ecma_transforms_proposal/tests/decorators/issue-7358/2/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["proposal-decorators", { "version": "2022-03" }]] +} diff --git a/crates/swc_ecma_transforms_proposal/tests/decorators/issue-7358/2/output.js b/crates/swc_ecma_transforms_proposal/tests/decorators/issue-7358/2/output.js new file mode 100644 index 000000000000..b14e72a4ae75 --- /dev/null +++ b/crates/swc_ecma_transforms_proposal/tests/decorators/issue-7358/2/output.js @@ -0,0 +1,42 @@ +export function test() { + var _dec, _initClass, _dec1, _dec2, _initProto; + let _Foo; + _dec = decorate(), _dec1 = decorate(), _dec2 = decorate(); + // try putting this in stmts instead of at the top level + class Foo { + static{ + ({ e: [_initProto], c: [_Foo, _initClass] } = _apply_decs_2203_r(this, [ + [ + _dec1, + 3, + "name" + ], + [ + _dec2, + 2, + "sayHi" + ] + ], [ + _dec + ])); + } + constructor(){ + _initProto(this); + } + get name() { + return "hello"; + } + sayHi() { + return "hello"; + } + static{ + _initClass(); + } + } + function decorate() { + return function(target, { kind }) { + console.log(target, kind); + }; + } + return new _Foo(); +} From bc9c90332f05446f93cc4b033ef3670ee3996f7e Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 9 Apr 2024 01:53:14 +0000 Subject: [PATCH 086/172] chore: Bump crates --- CHANGELOG.md | 3 +++ Cargo.lock | 2 +- crates/swc_ecma_transforms_proposal/Cargo.toml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2070cf0f94ac..cc9df346f7f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ +- **(es/decorators)** Fix capacity overflow with decorators ([#8818](https://github.com/swc-project/swc/issues/8818)) ([9ed93c1](https://github.com/swc-project/swc/commit/9ed93c17cdb645274392ebdb9ad87f8fbeeed971)) + + - **(es/minifier)** Respect `top_retain` for top-level functions ([#8814](https://github.com/swc-project/swc/issues/8814)) ([811308c](https://github.com/swc-project/swc/commit/811308c3526003608e61c559f43408f6065ff9ee)) diff --git a/Cargo.lock b/Cargo.lock index fb883afcdfc2..24aa0f89a992 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4773,7 +4773,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_proposal" -version = "0.171.19" +version = "0.171.20" dependencies = [ "either", "rustc-hash", diff --git a/crates/swc_ecma_transforms_proposal/Cargo.toml b/crates/swc_ecma_transforms_proposal/Cargo.toml index 2552b93fe4a7..de75645ad739 100644 --- a/crates/swc_ecma_transforms_proposal/Cargo.toml +++ b/crates/swc_ecma_transforms_proposal/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_proposal" repository = "https://github.com/swc-project/swc.git" -version = "0.171.19" +version = "0.171.20" [lib] bench = false From 7fcfc74d15645dd2fb0ff95a9002662e152ca8e2 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 9 Apr 2024 04:08:01 +0000 Subject: [PATCH 087/172] chore: Publish 1.4.13-nightly-20240409.1 --- bindings/Cargo.lock | 10 +++++----- bindings/binding_core_node/Cargo.toml | 2 +- bindings/binding_core_wasm/Cargo.toml | 4 ++-- bindings/binding_minifier_node/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 4 ++-- bindings/swc_cli/Cargo.toml | 2 +- package.json | 2 +- packages/minifier/package.json | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 30ebcfa6105d..7a495c02f143 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -231,7 +231,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.4.13-nightly-20240406.1" +version = "1.4.13-nightly-20240409.1" dependencies = [ "anyhow", "getrandom", @@ -291,7 +291,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.4.13-nightly-20240406.1" +version = "1.4.13-nightly-20240409.1" dependencies = [ "anyhow", "getrandom", @@ -3074,7 +3074,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.212" +version = "0.91.213" dependencies = [ "anyhow", "swc_cli_impl", @@ -3189,9 +3189,9 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.90.28" +version = "0.90.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6957703336e4e9a20d4fcef3d065e1f31906c52470992f5bf4281e6fe1342dde" +checksum = "063599655db3984680351ff763b3bc17296e9df36194bcc3c03bc0e87928325f" dependencies = [ "binding_macros", "swc", diff --git a/bindings/binding_core_node/Cargo.toml b/bindings/binding_core_node/Cargo.toml index 0a1ca776e325..d5097822340e 100644 --- a/bindings/binding_core_node/Cargo.toml +++ b/bindings/binding_core_node/Cargo.toml @@ -51,7 +51,7 @@ tracing-chrome = "0.5.0" tracing-futures = "0.2.5" tracing-subscriber = { version = "0.3.9", features = ["env-filter"] } -swc_core = { version = "0.90.28", features = [ +swc_core = { version = "0.90.29", features = [ "allocator_node", "ecma_ast", "ecma_codegen", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 02afd0c0a81f..727314471f37 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.13-nightly-20240406.1" +version = "1.4.13-nightly-20240409.1" [lib] bench = false @@ -35,7 +35,7 @@ anyhow = "1.0.66" getrandom = { version = "0.2.10", features = ["js"] } serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" -swc_core = { version = "0.90.28", features = [ +swc_core = { version = "0.90.29", features = [ "ecma_ast_serde", "ecma_codegen", "binding_macro_wasm", diff --git a/bindings/binding_minifier_node/Cargo.toml b/bindings/binding_minifier_node/Cargo.toml index 918d3b0331e5..295ee7c5c3db 100644 --- a/bindings/binding_minifier_node/Cargo.toml +++ b/bindings/binding_minifier_node/Cargo.toml @@ -37,7 +37,7 @@ tracing-subscriber = { version = "0.3.9", features = ["env-filter"] } swc_compiler_base = { version = "0.7.20", features = ["node"] } swc_config = "0.1.12" -swc_core = { version = "0.90.28", features = [ +swc_core = { version = "0.90.29", features = [ "allocator_node", "common_concurrent", "common_sourcemap", diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index f46658dc874b..04ba593ca26d 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.13-nightly-20240406.1" +version = "1.4.13-nightly-20240409.1" [lib] bench = false @@ -35,7 +35,7 @@ anyhow = "1.0.66" getrandom = { version = "0.2.10", features = ["js"] } serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" -swc_core = { version = "0.90.28", features = [ +swc_core = { version = "0.90.29", features = [ "ecma_ast_serde", "ecma_codegen", "binding_macro_wasm", diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 2b774324ad2b..7626dada8732 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.212" +version = "0.91.213" [[bin]] bench = false diff --git a/package.json b/package.json index a427f32e19b4..be9b847d9847 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.4.13-nightly-20240406.1", + "version": "1.4.13-nightly-20240409.1", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/package.json b/packages/minifier/package.json index a56faee9bbde..cf32f471caa3 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.4.13-nightly-20240406.1", + "version": "1.4.13-nightly-20240409.1", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", From ebb68db24d7287ca12d85a68a34aabfa660eeae0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Tue, 9 Apr 2024 15:22:38 +0900 Subject: [PATCH 088/172] fix(es/minifier): Abort IIFE invoker in function parameters (#8828) **Related issue:** - Closes #8826 --- .../scripts/reduce/reduce.sh | 5 +- crates/swc_ecma_minifier/scripts/test.sh | 2 +- .../src/compress/optimize/iife.rs | 10 ++++ .../src/compress/optimize/mod.rs | 15 +++++- .../tests/fixture/issues/8826/config.json | 47 +++++++++++++++++++ .../tests/fixture/issues/8826/input.js | 12 +++++ .../tests/fixture/issues/8826/output.js | 5 ++ 7 files changed, 92 insertions(+), 4 deletions(-) create mode 100644 crates/swc_ecma_minifier/tests/fixture/issues/8826/config.json create mode 100644 crates/swc_ecma_minifier/tests/fixture/issues/8826/input.js create mode 100644 crates/swc_ecma_minifier/tests/fixture/issues/8826/output.js diff --git a/crates/swc_ecma_minifier/scripts/reduce/reduce.sh b/crates/swc_ecma_minifier/scripts/reduce/reduce.sh index 722d23390969..1ad58efc96ed 100755 --- a/crates/swc_ecma_minifier/scripts/reduce/reduce.sh +++ b/crates/swc_ecma_minifier/scripts/reduce/reduce.sh @@ -9,12 +9,15 @@ then fi SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +TARGET_DIR="$(cargo metadata --format-version 1 --no-deps | jq -r '.target_directory')" echo "Reducing $1" ls -al $1 + # Build swc minifier -export MINIFY=$(cargo profile bin-path --release --example compress) +cargo build --release --example compress +export MINIFY="$TARGET_DIR/release/examples/compress" wd="$(mktemp -d)" echo "Using $MINIFY; dir = $wd" diff --git a/crates/swc_ecma_minifier/scripts/test.sh b/crates/swc_ecma_minifier/scripts/test.sh index 249ea55eb6d2..ffe66f937f8f 100755 --- a/crates/swc_ecma_minifier/scripts/test.sh +++ b/crates/swc_ecma_minifier/scripts/test.sh @@ -8,6 +8,6 @@ export SWC_RUN=0 touch tests/compress.rs -cargo test -q -p swc_ecma_minifier -p swc --no-fail-fast --test projects --test tsc --test compress --test mangle --features concurrent $@ +cargo test -p swc_ecma_minifier -p swc --no-fail-fast --test projects --test tsc --test compress --test mangle --features concurrent $@ # find ../swc/tests/ -type f -empty -delete \ No newline at end of file diff --git a/crates/swc_ecma_minifier/src/compress/optimize/iife.rs b/crates/swc_ecma_minifier/src/compress/optimize/iife.rs index 6d8200c5d52f..200278abf23f 100644 --- a/crates/swc_ecma_minifier/src/compress/optimize/iife.rs +++ b/crates/swc_ecma_minifier/src/compress/optimize/iife.rs @@ -480,6 +480,11 @@ impl Optimizer<'_> { return; } + if self.ctx.in_param && !f.params.is_empty() { + log_abort!("iife: We don't invoke IIFE with params in function params"); + return; + } + if !self.may_add_ident() { match &*f.body { BlockStmtOrExpr::BlockStmt(body) => { @@ -595,6 +600,11 @@ impl Optimizer<'_> { return; } + if self.ctx.in_param && !f.function.params.is_empty() { + log_abort!("iife: We don't invoke IIFE with params in function params"); + return; + } + // Abort if a parameter is complex if f.function.params.iter().any(|param| { matches!( diff --git a/crates/swc_ecma_minifier/src/compress/optimize/mod.rs b/crates/swc_ecma_minifier/src/compress/optimize/mod.rs index 770d14ecf4e5..062c16944ff2 100644 --- a/crates/swc_ecma_minifier/src/compress/optimize/mod.rs +++ b/crates/swc_ecma_minifier/src/compress/optimize/mod.rs @@ -172,6 +172,8 @@ struct Ctx { in_with_stmt: bool, + in_param: bool, + /// Current scope. scope: SyntaxContext, } @@ -1459,9 +1461,16 @@ impl VisitMut for Optimizer<'_> { let prepend = self.prepend_stmts.take(); - let ctx = self.ctx; + { + let ctx = Ctx { + in_param: true, + ..self.ctx + }; + + n.params.visit_mut_with(&mut *self.with_ctx(ctx)); + } - n.visit_mut_children_with(&mut *self.with_ctx(ctx)); + n.body.visit_mut_with(self); if !self.prepend_stmts.is_empty() { let mut stmts = self.prepend_stmts.take().take_stmts(); @@ -1561,6 +1570,7 @@ impl VisitMut for Optimizer<'_> { top_level: false, in_block: true, scope: n.span.ctxt, + in_param: false, ..self.ctx }; n.visit_mut_children_with(&mut *self.with_ctx(ctx)); @@ -2360,6 +2370,7 @@ impl VisitMut for Optimizer<'_> { fn visit_mut_param(&mut self, n: &mut Param) { let ctx = Ctx { var_kind: None, + in_param: true, ..self.ctx }; let mut o = self.with_ctx(ctx); diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/8826/config.json b/crates/swc_ecma_minifier/tests/fixture/issues/8826/config.json new file mode 100644 index 000000000000..7e144b291fa7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/8826/config.json @@ -0,0 +1,47 @@ +{ + "defaults": true, + "arguments": false, + "arrows": true, + "booleans": true, + "booleans_as_integers": false, + "collapse_vars": true, + "comparisons": true, + "computed_props": true, + "conditionals": true, + "dead_code": true, + "directives": true, + "drop_console": false, + "drop_debugger": true, + "evaluate": true, + "expression": false, + "hoist_funs": false, + "hoist_props": true, + "hoist_vars": false, + "if_return": true, + "join_vars": true, + "keep_classnames": false, + "keep_fargs": true, + "keep_fnames": false, + "keep_infinity": false, + "loops": true, + "negate_iife": true, + "properties": true, + "reduce_funcs": false, + "reduce_vars": false, + "side_effects": true, + "switches": true, + "typeofs": true, + "unsafe": false, + "unsafe_arrows": false, + "unsafe_comps": false, + "unsafe_Function": false, + "unsafe_math": false, + "unsafe_symbols": false, + "unsafe_methods": false, + "unsafe_proto": false, + "unsafe_regexp": false, + "unsafe_undefined": false, + "unused": true, + "const_to_let": true, + "pristine_globals": true +} diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/8826/input.js b/crates/swc_ecma_minifier/tests/fixture/issues/8826/input.js new file mode 100644 index 000000000000..c1b9d7865f7e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/8826/input.js @@ -0,0 +1,12 @@ + +export function createTypeChecker(host) { + + return { + getFlowTypeOfReference + } + + function getFlowTypeOfReference(reference, declaredType, initialType = declaredType, flowContainer, flowNode = (_a2 => (_a2 = tryCast(reference, canHaveFlowNode)) == null ? void 0 : _a2.flowNode)()) { + + + } +} \ No newline at end of file diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/8826/output.js b/crates/swc_ecma_minifier/tests/fixture/issues/8826/output.js new file mode 100644 index 000000000000..c75f1bda7604 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/8826/output.js @@ -0,0 +1,5 @@ +export function createTypeChecker(host) { + return { + getFlowTypeOfReference: function(reference, declaredType, initialType = declaredType, flowContainer, flowNode = ((_a2)=>null == (_a2 = tryCast(reference, canHaveFlowNode)) ? void 0 : _a2.flowNode)()) {} + }; +} From 487992d9fa4b2773e4773838196fbdb9667baea7 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 9 Apr 2024 06:24:27 +0000 Subject: [PATCH 089/172] chore: Bump crates --- CHANGELOG.md | 9 +++------ Cargo.lock | 4 ++-- crates/swc_core/Cargo.toml | 2 +- crates/swc_ecma_minifier/Cargo.toml | 2 +- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc9df346f7f5..c5cd4464b7f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ - **(es/minifier)** Respect `top_retain` for top-level functions ([#8814](https://github.com/swc-project/swc/issues/8814)) ([811308c](https://github.com/swc-project/swc/commit/811308c3526003608e61c559f43408f6065ff9ee)) +- **(es/minifier)** Abort IIFE invoker in function parameters ([#8828](https://github.com/swc-project/swc/issues/8828)) ([ebb68db](https://github.com/swc-project/swc/commit/ebb68db24d7287ca12d85a68a34aabfa660eeae0)) + + - **(es/module)** Respect `module.resolveFully` in more cases ([#8820](https://github.com/swc-project/swc/issues/8820)) ([e1f7704](https://github.com/swc-project/swc/commit/e1f770463d1f0402468e07fca9c637e3823bb2d1)) @@ -1367,16 +1370,10 @@ - **(es/compat)** Handle single expression case in static block ([#7944](https://github.com/swc-project/swc/issues/7944)) ([a80aec4](https://github.com/swc-project/swc/commit/a80aec47efcff953d3408cf6910b66c2312f3006)) - -- **(es/minifier)** Parse a file as a module only if `opts.module` is `true` ([#7943](https://github.com/swc-project/swc/issues/7943)) ([b87ac64](https://github.com/swc-project/swc/commit/b87ac646f81f181b574da798b3e613a3cfa4cad5)) - ### Features -- **(es/compat)** Support `pure_getters` for `optional_chaining` ([#7933](https://github.com/swc-project/swc/issues/7933)) ([c091c5e](https://github.com/swc-project/swc/commit/c091c5e295ec2ef704be1461f6587ae85051b543)) - - - **(es/module)** Add an option to make resolver fully resolve `index.js` ([#7945](https://github.com/swc-project/swc/issues/7945)) ([7e8d72d](https://github.com/swc-project/swc/commit/7e8d72d03b312b7a48c17afa8d2a4d7f4e802a6a)) diff --git a/Cargo.lock b/Cargo.lock index 24aa0f89a992..5996e3a40b9a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3935,7 +3935,7 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.90.29" +version = "0.90.30" dependencies = [ "anyhow", "binding_macros", @@ -4468,7 +4468,7 @@ dependencies = [ [[package]] name = "swc_ecma_minifier" -version = "0.192.21" +version = "0.192.22" dependencies = [ "ansi_term", "anyhow", diff --git a/crates/swc_core/Cargo.toml b/crates/swc_core/Cargo.toml index 371bb437f551..b5c2df3ec71d 100644 --- a/crates/swc_core/Cargo.toml +++ b/crates/swc_core/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_core" repository = "https://github.com/swc-project/swc.git" -version = "0.90.29" +version = "0.90.30" [package.metadata.docs.rs] features = [ "allocator_node", diff --git a/crates/swc_ecma_minifier/Cargo.toml b/crates/swc_ecma_minifier/Cargo.toml index c09c4bd867af..a7e3c6e9dc98 100644 --- a/crates/swc_ecma_minifier/Cargo.toml +++ b/crates/swc_ecma_minifier/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/lists/*.json"] license = "Apache-2.0" name = "swc_ecma_minifier" repository = "https://github.com/swc-project/swc.git" -version = "0.192.21" +version = "0.192.22" [package.metadata.docs.rs] all-features = true From 1a5b2f729d3637a198e839da3f0297b6409346f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 9 Apr 2024 15:25:51 +0900 Subject: [PATCH 090/172] chore: Publish `1.4.13` with `swc_core` `v0.90.30` --- bindings/Cargo.lock | 39 ++++++++++--------- bindings/binding_core_node/Cargo.toml | 2 +- bindings/binding_core_wasm/Cargo.toml | 4 +- bindings/binding_minifier_node/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 4 +- bindings/swc_cli/Cargo.toml | 2 +- package.json | 2 +- packages/minifier/package.json | 2 +- .../scripts/npm/darwin-arm64/package.json | 2 +- .../scripts/npm/darwin-x64/package.json | 2 +- .../npm/linux-arm-gnueabihf/package.json | 2 +- .../scripts/npm/linux-arm64-gnu/package.json | 2 +- .../scripts/npm/linux-arm64-musl/package.json | 2 +- .../scripts/npm/linux-x64-gnu/package.json | 2 +- .../scripts/npm/linux-x64-musl/package.json | 2 +- .../scripts/npm/win32-arm64-msvc/package.json | 2 +- .../scripts/npm/win32-ia32-msvc/package.json | 2 +- .../scripts/npm/win32-x64-msvc/package.json | 2 +- 18 files changed, 39 insertions(+), 38 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 7a495c02f143..44a3f779e8ba 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -231,7 +231,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.4.13-nightly-20240409.1" +version = "1.4.13" dependencies = [ "anyhow", "getrandom", @@ -291,7 +291,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.4.13-nightly-20240409.1" +version = "1.4.13" dependencies = [ "anyhow", "getrandom", @@ -3074,7 +3074,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.213" +version = "0.91.214" dependencies = [ "anyhow", "swc_cli_impl", @@ -3189,9 +3189,9 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.90.29" +version = "0.90.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063599655db3984680351ff763b3bc17296e9df36194bcc3c03bc0e87928325f" +checksum = "fe7651ba172f4a82cd6f27b73e51d363e9b32aa97b9f6aab2e63e58f4df9ea62" dependencies = [ "binding_macros", "swc", @@ -3517,9 +3517,9 @@ dependencies = [ [[package]] name = "swc_ecma_minifier" -version = "0.192.20" +version = "0.192.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2025b1b4fb4bff8502378ecf37fe63726e6dfbd0ee3429abcda341edebcfb06a" +checksum = "c1b038d6effbed5103d38460e6b9f5006fd6ffa91e827efdf78953b0e97d3895" dependencies = [ "arrayvec", "indexmap 2.1.0", @@ -3705,9 +3705,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_module" -version = "0.180.18" +version = "0.180.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "175fa941dc78c7423fd3a895ff7004f6547bb026dce537f990585fa5ce6242e5" +checksum = "914cbfb4d9e9aa4b0a5a63c01fb4c2edfa8d7486bec0b891a5e15a94615453a2" dependencies = [ "Inflector", "anyhow", @@ -3757,9 +3757,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_proposal" -version = "0.171.18" +version = "0.171.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "755b89f804230b840519d49444fba3133d494ae7d9d6f7aec7b250d62dba7256" +checksum = "ac54efb40cb374c53323823da2b5f74406b8531b59a2cb689801cbf22d0057db" dependencies = [ "either", "rustc-hash", @@ -3836,9 +3836,9 @@ dependencies = [ [[package]] name = "swc_ecma_utils" -version = "0.127.16" +version = "0.127.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b693d3fd413b76be123d2ce899a9788db8f85ca6127a1b1d743ed9cb8a68fdcc" +checksum = "624c19fdbe1807275b16560892cf7a12a9ac3f631fb10ad45aaa3eeac903e6e5" dependencies = [ "indexmap 2.1.0", "num_cpus", @@ -4008,9 +4008,9 @@ dependencies = [ [[package]] name = "swc_plugin_runner" -version = "0.106.14" +version = "0.106.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8761bc153a97c9d292eeb950fa14eb85ba9f62b95c1189344f59e47a7f76209" +checksum = "3a62d1390c524b5afc151b7e7c5e3d76fcd4051d9aa1c4a3b5afcc8322083c28" dependencies = [ "anyhow", "enumset", @@ -4023,6 +4023,7 @@ dependencies = [ "swc_ecma_ast", "swc_plugin_proxy", "tracing", + "virtual-fs", "wasmer", "wasmer-cache", "wasmer-compiler-cranelift", @@ -4051,9 +4052,9 @@ dependencies = [ [[package]] name = "swc_visit" -version = "0.5.11" +version = "0.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6af31bfc7b5b7405eb0cfb5158a40f12e827af9db74ce93b0cf8b838ee1c100" +checksum = "7dcfe07ffcd4360d6bf69d75819ccf6c6db852dfbf0f35dd65e9296a2b25c070" dependencies = [ "either", "swc_visit_macros", @@ -4607,9 +4608,9 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "virtual-fs" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a16a7893a16a31ef442ce86691e7060a19691fb7739387624f3dd07ec4c04b" +checksum = "6ce7b7674a3d0ddb5915b8f4feccdd6e8680c5980c296688e0f0e7378b8c69e1" dependencies = [ "anyhow", "async-trait", diff --git a/bindings/binding_core_node/Cargo.toml b/bindings/binding_core_node/Cargo.toml index d5097822340e..42758d5c131d 100644 --- a/bindings/binding_core_node/Cargo.toml +++ b/bindings/binding_core_node/Cargo.toml @@ -51,7 +51,7 @@ tracing-chrome = "0.5.0" tracing-futures = "0.2.5" tracing-subscriber = { version = "0.3.9", features = ["env-filter"] } -swc_core = { version = "0.90.29", features = [ +swc_core = { version = "0.90.30", features = [ "allocator_node", "ecma_ast", "ecma_codegen", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 727314471f37..a8ff23ec1e4d 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.13-nightly-20240409.1" +version = "1.4.13" [lib] bench = false @@ -35,7 +35,7 @@ anyhow = "1.0.66" getrandom = { version = "0.2.10", features = ["js"] } serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" -swc_core = { version = "0.90.29", features = [ +swc_core = { version = "0.90.30", features = [ "ecma_ast_serde", "ecma_codegen", "binding_macro_wasm", diff --git a/bindings/binding_minifier_node/Cargo.toml b/bindings/binding_minifier_node/Cargo.toml index 295ee7c5c3db..d246141f6c32 100644 --- a/bindings/binding_minifier_node/Cargo.toml +++ b/bindings/binding_minifier_node/Cargo.toml @@ -37,7 +37,7 @@ tracing-subscriber = { version = "0.3.9", features = ["env-filter"] } swc_compiler_base = { version = "0.7.20", features = ["node"] } swc_config = "0.1.12" -swc_core = { version = "0.90.29", features = [ +swc_core = { version = "0.90.30", features = [ "allocator_node", "common_concurrent", "common_sourcemap", diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 04ba593ca26d..5364a0fa152d 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.13-nightly-20240409.1" +version = "1.4.13" [lib] bench = false @@ -35,7 +35,7 @@ anyhow = "1.0.66" getrandom = { version = "0.2.10", features = ["js"] } serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" -swc_core = { version = "0.90.29", features = [ +swc_core = { version = "0.90.30", features = [ "ecma_ast_serde", "ecma_codegen", "binding_macro_wasm", diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 7626dada8732..e9842ab65628 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.213" +version = "0.91.214" [[bin]] bench = false diff --git a/package.json b/package.json index be9b847d9847..9c17afee77c8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.4.13-nightly-20240409.1", + "version": "1.4.13", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/package.json b/packages/minifier/package.json index cf32f471caa3..851472ea251d 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.4.13-nightly-20240409.1", + "version": "1.4.13", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index c34037301890..19c89bd6087d 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.4.12", + "version": "1.4.13", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index 164fc729fe94..35677c40d5bd 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.4.12", + "version": "1.4.13", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index 4f189e35e558..88df0804d362 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.4.12", + "version": "1.4.13", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index 9081e3176daf..36479d8033fd 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.4.12", + "version": "1.4.13", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index 5cd5ec07d862..78bfee473305 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.4.12", + "version": "1.4.13", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index 6c987d58692e..d20e8475efff 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.4.12", + "version": "1.4.13", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index 57712412bb05..abfb5d37b890 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.4.12", + "version": "1.4.13", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index 3f91d06b69ad..511aaae5af16 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.4.12", + "version": "1.4.13", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index 4d3962dd0e11..17b7021afae5 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.4.12", + "version": "1.4.13", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index 13e06f48a866..113a63afd0db 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.4.12", + "version": "1.4.13", "os": [ "win32" ], From 67ec5e09b945591d4efba7261248c0280c605aa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 9 Apr 2024 15:25:53 +0900 Subject: [PATCH 091/172] chore: Update changelog --- CHANGELOG.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c5cd4464b7f8..6a629741e291 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ # Changelog -## [unreleased] +## [1.4.13] - 2024-04-09 ### Bug Fixes @@ -1365,9 +1365,6 @@ -- **(css/modules)** Support composes when using multiple subclass selectors ([#7949](https://github.com/swc-project/swc/issues/7949)) ([05ca19b](https://github.com/swc-project/swc/commit/05ca19b84489ae47f69d8228b3c0097164c7ec6e)) - - - **(es/compat)** Handle single expression case in static block ([#7944](https://github.com/swc-project/swc/issues/7944)) ([a80aec4](https://github.com/swc-project/swc/commit/a80aec47efcff953d3408cf6910b66c2312f3006)) ### Features From b1973d490afc8e4bc597192caab7a3aa8eb2701d Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 10 Apr 2024 19:00:14 -0400 Subject: [PATCH 092/172] refactor(visit): Simplify `Vec::move_map` (#8838) --- crates/swc_visit/src/util/move_map.rs | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/crates/swc_visit/src/util/move_map.rs b/crates/swc_visit/src/util/move_map.rs index 69b85a22fca7..6f6abf05ab92 100644 --- a/crates/swc_visit/src/util/move_map.rs +++ b/crates/swc_visit/src/util/move_map.rs @@ -26,26 +26,21 @@ impl MoveMap for Vec { where F: FnMut(T) -> T, { - let mut read_i = 0; - let mut write_i = 0; unsafe { let old_len = self.len(); self.set_len(0); // make sure we just leak elements in case of panic - while read_i < old_len { - // move the read_i'th item out of the vector and map it - // to an iterator - let e = ptr::read(self.as_ptr().add(read_i)); - let e = f(e); - read_i += 1; + for index in 0..old_len { + let item_ptr = self.as_mut_ptr().add(index); + // move the item out of the vector and map it + let item = ptr::read(item_ptr); + let item = f(item); - assert!(write_i < read_i); - ptr::write(self.as_mut_ptr().add(write_i), e); - write_i += 1; + ptr::write(item_ptr, item); } - // write_i tracks the number of actually written new items. - self.set_len(write_i); + // restore the original length + self.set_len(old_len); } self From c90c199479c0dc5175a6ed01927d4939a0d44cb3 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Wed, 10 Apr 2024 23:01:59 +0000 Subject: [PATCH 093/172] chore: Bump crates --- CHANGELOG.md | 14 ++++++++------ Cargo.lock | 2 +- crates/swc_visit/Cargo.toml | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a629741e291..5bff18cc9a9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,12 @@ # Changelog +## [unreleased] + +### Refactor + + + +- **(visit)** Simplify `Vec::move_map` ([#8838](https://github.com/swc-project/swc/issues/8838)) ([b1973d4](https://github.com/swc-project/swc/commit/b1973d490afc8e4bc597192caab7a3aa8eb2701d)) + ## [1.4.13] - 2024-04-09 ### Bug Fixes @@ -1361,12 +1369,6 @@ ## [1.3.85] - 2023-09-15 -### Bug Fixes - - - -- **(es/compat)** Handle single expression case in static block ([#7944](https://github.com/swc-project/swc/issues/7944)) ([a80aec4](https://github.com/swc-project/swc/commit/a80aec47efcff953d3408cf6910b66c2312f3006)) - ### Features diff --git a/Cargo.lock b/Cargo.lock index 5996e3a40b9a..dfa869d8cb8c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5278,7 +5278,7 @@ dependencies = [ [[package]] name = "swc_visit" -version = "0.5.12" +version = "0.5.13" dependencies = [ "either", "swc_visit_macros", diff --git a/crates/swc_visit/Cargo.toml b/crates/swc_visit/Cargo.toml index 5119d8ba25d7..1f676b56da62 100644 --- a/crates/swc_visit/Cargo.toml +++ b/crates/swc_visit/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_visit" repository = "https://github.com/swc-project/swc.git" -version = "0.5.12" +version = "0.5.13" [lib] bench = false From 3a51140dd77ccf2cc35098a72c411b05de418ff1 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 10 Apr 2024 19:43:07 -0400 Subject: [PATCH 094/172] refactor(es): Make the code compile with `miri` (#8836) --- crates/swc_ecma_codegen/src/comments.rs | 2 -- crates/swc_ecma_codegen/src/text_writer.rs | 2 -- crates/swc_ecma_parser/src/lexer/jsx.rs | 1 - crates/swc_ecma_parser/src/lexer/number.rs | 3 +-- crates/swc_ecma_parser/src/lib.rs | 10 ++++++-- .../src/parser/class_and_fn.rs | 2 +- crates/swc_ecma_parser/src/parser/expr.rs | 2 +- crates/swc_ecma_parser/src/parser/expr/ops.rs | 1 - crates/swc_ecma_parser/src/parser/jsx.rs | 23 +------------------ .../src/simplify/expr/mod.rs | 2 +- 10 files changed, 13 insertions(+), 35 deletions(-) diff --git a/crates/swc_ecma_codegen/src/comments.rs b/crates/swc_ecma_codegen/src/comments.rs index 8ab20dcfb7d7..c37e842f914f 100644 --- a/crates/swc_ecma_codegen/src/comments.rs +++ b/crates/swc_ecma_codegen/src/comments.rs @@ -1,5 +1,3 @@ -use swc_common::comments::CommentKind; - use super::*; macro_rules! write_comments { diff --git a/crates/swc_ecma_codegen/src/text_writer.rs b/crates/swc_ecma_codegen/src/text_writer.rs index 965752693f8e..bc119963d9e1 100644 --- a/crates/swc_ecma_codegen/src/text_writer.rs +++ b/crates/swc_ecma_codegen/src/text_writer.rs @@ -1,5 +1,3 @@ -use swc_common::Span; - pub use self::{basic_impl::JsWriter, semicolon::omit_trailing_semi}; use super::*; diff --git a/crates/swc_ecma_parser/src/lexer/jsx.rs b/crates/swc_ecma_parser/src/lexer/jsx.rs index ebd71d6dbe4e..c597a9f8aecf 100644 --- a/crates/swc_ecma_parser/src/lexer/jsx.rs +++ b/crates/swc_ecma_parser/src/lexer/jsx.rs @@ -1,7 +1,6 @@ use either::Either; use super::*; -use crate::token::Token; impl<'a> Lexer<'a> { pub(super) fn read_jsx_token(&mut self) -> LexResult> { diff --git a/crates/swc_ecma_parser/src/lexer/number.rs b/crates/swc_ecma_parser/src/lexer/number.rs index b015eaa003c2..bd77f22e22ff 100644 --- a/crates/swc_ecma_parser/src/lexer/number.rs +++ b/crates/swc_ecma_parser/src/lexer/number.rs @@ -7,12 +7,11 @@ use std::{borrow::Cow, fmt::Write}; use either::Either; use num_bigint::BigInt as BigIntValue; use num_traits::{Num as NumTrait, ToPrimitive}; -use smartstring::{LazyCompact, SmartString}; +use smartstring::LazyCompact; use swc_common::SyntaxContext; use tracing::trace; use super::*; -use crate::error::SyntaxError; struct LazyBigInt { value: String, diff --git a/crates/swc_ecma_parser/src/lib.rs b/crates/swc_ecma_parser/src/lib.rs index 6c8e0bb51ebd..260ea56e44e1 100644 --- a/crates/swc_ecma_parser/src/lib.rs +++ b/crates/swc_ecma_parser/src/lib.rs @@ -509,14 +509,20 @@ expose!(parse_file_as_script, Script, |p| { p.parse_script() }); expose!(parse_file_as_program, Program, |p| { p.parse_program() }); #[inline(always)] -#[cfg(any(target_arch = "wasm32", target_arch = "arm", not(feature = "stacker")))] +#[cfg(any( + target_arch = "wasm32", + target_arch = "arm", + not(feature = "stacker"), + // miri does not work with stacker + miri +))] fn maybe_grow R>(_red_zone: usize, _stack_size: usize, callback: F) -> R { callback() } #[inline(always)] #[cfg(all( - not(any(target_arch = "wasm32", target_arch = "arm")), + not(any(target_arch = "wasm32", target_arch = "arm", miri)), feature = "stacker" ))] fn maybe_grow R>(red_zone: usize, stack_size: usize, callback: F) -> R { diff --git a/crates/swc_ecma_parser/src/parser/class_and_fn.rs b/crates/swc_ecma_parser/src/parser/class_and_fn.rs index e4e178923eba..c9d6161e3031 100644 --- a/crates/swc_ecma_parser/src/parser/class_and_fn.rs +++ b/crates/swc_ecma_parser/src/parser/class_and_fn.rs @@ -1,7 +1,7 @@ use swc_common::{Spanned, SyntaxContext}; use super::*; -use crate::{error::SyntaxError, lexer::TokenContext, Tokens}; +use crate::lexer::TokenContext; /// Parser for function expression and function declaration. impl Parser { diff --git a/crates/swc_ecma_parser/src/parser/expr.rs b/crates/swc_ecma_parser/src/parser/expr.rs index 705b1e23f4e2..230512c94a98 100644 --- a/crates/swc_ecma_parser/src/parser/expr.rs +++ b/crates/swc_ecma_parser/src/parser/expr.rs @@ -1,5 +1,5 @@ use either::Either; -use swc_common::{ast_node, collections::AHashMap, util::take::Take, Spanned}; +use swc_common::{ast_node, util::take::Take, Spanned}; use super::{pat::PatType, util::ExprExt, *}; use crate::{lexer::TokenContext, parser::class_and_fn::IsSimpleParameterList}; diff --git a/crates/swc_ecma_parser/src/parser/expr/ops.rs b/crates/swc_ecma_parser/src/parser/expr/ops.rs index 0873045da978..3b97154df26d 100644 --- a/crates/swc_ecma_parser/src/parser/expr/ops.rs +++ b/crates/swc_ecma_parser/src/parser/expr/ops.rs @@ -1,5 +1,4 @@ //! Parser for unary operations and binary operations. -use swc_common::Spanned; use tracing::trace; use super::*; diff --git a/crates/swc_ecma_parser/src/parser/jsx.rs b/crates/swc_ecma_parser/src/parser/jsx.rs index 4c739750c26b..c0ae37b6856f 100644 --- a/crates/swc_ecma_parser/src/parser/jsx.rs +++ b/crates/swc_ecma_parser/src/parser/jsx.rs @@ -1,5 +1,5 @@ use either::Either; -use swc_common::{Span, Spanned, SyntaxContext}; +use swc_common::{Spanned, SyntaxContext}; use super::*; @@ -439,27 +439,6 @@ impl Parser { } } -trait IsFragment { - fn is_fragment(&self) -> bool; -} - -impl IsFragment for Either { - fn is_fragment(&self) -> bool { - matches!(*self, Either::Left(..)) - } -} - -impl IsFragment for Either { - fn is_fragment(&self) -> bool { - matches!(*self, Either::Left(..)) - } -} -impl IsFragment for Option { - fn is_fragment(&self) -> bool { - self.as_ref().map(|s| s.is_fragment()).unwrap_or(false) - } -} - fn get_qualified_jsx_name(name: &JSXElementName) -> JsWord { fn get_qualified_obj_name(obj: &JSXObject) -> JsWord { match *obj { diff --git a/crates/swc_ecma_transforms_optimization/src/simplify/expr/mod.rs b/crates/swc_ecma_transforms_optimization/src/simplify/expr/mod.rs index 3fc880ecea34..4823a7c59f53 100644 --- a/crates/swc_ecma_transforms_optimization/src/simplify/expr/mod.rs +++ b/crates/swc_ecma_transforms_optimization/src/simplify/expr/mod.rs @@ -6,7 +6,7 @@ use swc_common::{ util::take::Take, Mark, Span, Spanned, SyntaxContext, DUMMY_SP, }; -use swc_ecma_ast::{Ident, Lit, *}; +use swc_ecma_ast::*; use swc_ecma_transforms_base::{ ext::ExprRefExt, pass::RepeatedJsPass, From 645a5e44928c444b6614c5464e65978e3eaaff32 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Wed, 10 Apr 2024 23:44:44 +0000 Subject: [PATCH 095/172] chore: Bump crates --- CHANGELOG.md | 11 +++-------- Cargo.lock | 6 +++--- crates/swc_ecma_codegen/Cargo.toml | 2 +- crates/swc_ecma_parser/Cargo.toml | 2 +- crates/swc_ecma_transforms_optimization/Cargo.toml | 2 +- 5 files changed, 9 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bff18cc9a9c..27905bd90bdd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ +- **(es)** Make the code compile with `miri` ([#8836](https://github.com/swc-project/swc/issues/8836)) ([3a51140](https://github.com/swc-project/swc/commit/3a51140dd77ccf2cc35098a72c411b05de418ff1)) + + - **(visit)** Simplify `Vec::move_map` ([#8838](https://github.com/swc-project/swc/issues/8838)) ([b1973d4](https://github.com/swc-project/swc/commit/b1973d490afc8e4bc597192caab7a3aa8eb2701d)) ## [1.4.13] - 2024-04-09 @@ -1367,12 +1370,4 @@ - **(bindings/node)** Link msvc runtime statically ([#7965](https://github.com/swc-project/swc/issues/7965)) ([0759779](https://github.com/swc-project/swc/commit/07597795cc39cce527f505bc5db304ad93082494)) -## [1.3.85] - 2023-09-15 - -### Features - - - -- **(es/module)** Add an option to make resolver fully resolve `index.js` ([#7945](https://github.com/swc-project/swc/issues/7945)) ([7e8d72d](https://github.com/swc-project/swc/commit/7e8d72d03b312b7a48c17afa8d2a4d7f4e802a6a)) - diff --git a/Cargo.lock b/Cargo.lock index dfa869d8cb8c..024eff5f5c2c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4191,7 +4191,7 @@ dependencies = [ [[package]] name = "swc_ecma_codegen" -version = "0.148.14" +version = "0.148.15" dependencies = [ "base64", "criterion", @@ -4509,7 +4509,7 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "0.143.12" +version = "0.143.13" dependencies = [ "criterion", "either", @@ -4743,7 +4743,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_optimization" -version = "0.198.18" +version = "0.198.19" dependencies = [ "dashmap", "indexmap 2.1.0", diff --git a/crates/swc_ecma_codegen/Cargo.toml b/crates/swc_ecma_codegen/Cargo.toml index 7caedbfa54e1..44da712ff44d 100644 --- a/crates/swc_ecma_codegen/Cargo.toml +++ b/crates/swc_ecma_codegen/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_codegen" repository = "https://github.com/swc-project/swc.git" -version = "0.148.14" +version = "0.148.15" [features] # This does not enable serde for ast nodes. diff --git a/crates/swc_ecma_parser/Cargo.toml b/crates/swc_ecma_parser/Cargo.toml index 8f9a4040eadf..1069ea835ad2 100644 --- a/crates/swc_ecma_parser/Cargo.toml +++ b/crates/swc_ecma_parser/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "examples/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_parser" repository = "https://github.com/swc-project/swc.git" -version = "0.143.12" +version = "0.143.13" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_ecma_transforms_optimization/Cargo.toml b/crates/swc_ecma_transforms_optimization/Cargo.toml index 24c81f80acd6..a1754628ec8b 100644 --- a/crates/swc_ecma_transforms_optimization/Cargo.toml +++ b/crates/swc_ecma_transforms_optimization/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_optimization" repository = "https://github.com/swc-project/swc.git" -version = "0.198.18" +version = "0.198.19" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] From ea830aabbe606164f96c78443d8838c7e894cd47 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Thu, 11 Apr 2024 00:07:51 +0000 Subject: [PATCH 096/172] chore: Publish 1.4.14-nightly-20240411.1 --- bindings/Cargo.lock | 6 +++--- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- package.json | 2 +- packages/minifier/package.json | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 44a3f779e8ba..0225958d15b2 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -231,7 +231,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.4.13" +version = "1.4.14-nightly-20240411.1" dependencies = [ "anyhow", "getrandom", @@ -291,7 +291,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.4.13" +version = "1.4.14-nightly-20240411.1" dependencies = [ "anyhow", "getrandom", @@ -3074,7 +3074,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.214" +version = "0.91.215" dependencies = [ "anyhow", "swc_cli_impl", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index a8ff23ec1e4d..178aefe777ad 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.13" +version = "1.4.14-nightly-20240411.1" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 5364a0fa152d..ec7cce604a15 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.13" +version = "1.4.14-nightly-20240411.1" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index e9842ab65628..17af2ac34b3b 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.214" +version = "0.91.215" [[bin]] bench = false diff --git a/package.json b/package.json index 9c17afee77c8..a45919404699 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.4.13", + "version": "1.4.14-nightly-20240411.1", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 851472ea251d..873010c53ff7 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.4.13", + "version": "1.4.14-nightly-20240411.1", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", From 5cc585b8f3359d960420e31a91f53c761c90f3f5 Mon Sep 17 00:00:00 2001 From: magic-akari Date: Thu, 11 Apr 2024 08:35:27 +0800 Subject: [PATCH 097/172] fix(es/compat): Handle class fields correctly (#8835) **Related issue:** - Closes #8830 --- .../fixture/issues-8xxx/8830/input/.swcrc | 12 ++ .../fixture/issues-8xxx/8830/input/index.js | 16 ++ .../fixture/issues-8xxx/8830/output/index.js | 14 ++ .../src/class_fields_use_set.rs | 179 ++++++++---------- 4 files changed, 121 insertions(+), 100 deletions(-) create mode 100644 crates/swc/tests/fixture/issues-8xxx/8830/input/.swcrc create mode 100644 crates/swc/tests/fixture/issues-8xxx/8830/input/index.js create mode 100644 crates/swc/tests/fixture/issues-8xxx/8830/output/index.js diff --git a/crates/swc/tests/fixture/issues-8xxx/8830/input/.swcrc b/crates/swc/tests/fixture/issues-8xxx/8830/input/.swcrc new file mode 100644 index 000000000000..743551ad27e8 --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8830/input/.swcrc @@ -0,0 +1,12 @@ +{ + "jsc": { + "target": "es2018", + "parser": { + "syntax": "ecmascript" + }, + "transform": { + "useDefineForClassFields": false + } + }, + "isModule": true +} \ No newline at end of file diff --git a/crates/swc/tests/fixture/issues-8xxx/8830/input/index.js b/crates/swc/tests/fixture/issues-8xxx/8830/input/index.js new file mode 100644 index 000000000000..8aa61bfa737b --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8830/input/index.js @@ -0,0 +1,16 @@ +class MyClass { + // also same behavior for static methods + methodReturningClass() { + return class SomeOtherClass { + constructor() { + // Assignment to foo goes here + } + }; + } + + constructor(args) { + // Assignment to foo should go here + } + + foo = "bar"; +} diff --git a/crates/swc/tests/fixture/issues-8xxx/8830/output/index.js b/crates/swc/tests/fixture/issues-8xxx/8830/output/index.js new file mode 100644 index 000000000000..a7611a163b0e --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8830/output/index.js @@ -0,0 +1,14 @@ +class MyClass { + // also same behavior for static methods + methodReturningClass() { + return class SomeOtherClass { + constructor(){ + // Assignment to foo goes here + } + }; + } + constructor(args){ + this.foo = "bar"; + // Assignment to foo should go here + } +} diff --git a/crates/swc_ecma_transforms_compat/src/class_fields_use_set.rs b/crates/swc_ecma_transforms_compat/src/class_fields_use_set.rs index 7fb3da66e4c2..345877a132b7 100644 --- a/crates/swc_ecma_transforms_compat/src/class_fields_use_set.rs +++ b/crates/swc_ecma_transforms_compat/src/class_fields_use_set.rs @@ -104,27 +104,14 @@ impl VisitMut for ClassFieldsUseSet { } fn visit_mut_class(&mut self, n: &mut Class) { + // visit inner classes first n.visit_mut_children_with(self); - let mut fields_handler = FieldsHandler::default(); - n.visit_mut_with(&mut fields_handler); - - let FieldsHandler { - constructor_inits, - constructor_found, - .. - } = fields_handler; - - if constructor_inits.is_empty() { - return; - } - - let mut constructor_handler = ConstructorHandler { + let mut fields_handler = FieldsHandler { has_super: n.super_class.is_some(), - constructor_inits, - constructor_found, }; - n.visit_mut_with(&mut constructor_handler); + + n.body.visit_mut_with(&mut fields_handler); } } @@ -170,113 +157,105 @@ impl ClassFieldsUseSet { } } -#[derive(Debug, Default)] +#[derive(Debug)] struct FieldsHandler { - constructor_inits: Vec>, - constructor_found: bool, + has_super: bool, } impl VisitMut for FieldsHandler { noop_visit_mut_type!(); - fn visit_mut_class(&mut self, n: &mut Class) { - n.body.visit_mut_with(self); + fn visit_mut_class(&mut self, _: &mut Class) { + // skip inner classes + // In fact, FieldsHandler does not visit children recursively. + // We call FieldsHandler with the class.body as the only entry point. + // The FieldsHandler actually operates in a iterative way. } - fn visit_mut_class_member(&mut self, n: &mut ClassMember) { - match n { - ClassMember::Constructor(..) => self.constructor_found = true, - ClassMember::ClassProp(ClassProp { - ref span, - ref is_static, - key, - value, - .. - }) => { - if let Some(value) = value.take() { - let init_expr: Expr = AssignExpr { - span: *span, - op: op!("="), - left: MemberExpr { - span: DUMMY_SP, - obj: ThisExpr::dummy().into(), - prop: prop_name_to_member_prop(key.take()), - } - .into(), - right: value, - } - .into(); - - if *is_static { - *n = StaticBlock { - span: DUMMY_SP, - body: BlockStmt { + fn visit_mut_class_members(&mut self, n: &mut Vec) { + let mut constructor_inits = vec![]; + + for member in n.iter_mut() { + match member { + ClassMember::ClassProp(ClassProp { + ref span, + ref is_static, + key, + value, + .. + }) => { + if let Some(value) = value.take() { + let init_expr: Expr = AssignExpr { + span: *span, + op: op!("="), + left: MemberExpr { span: DUMMY_SP, - stmts: vec![init_expr.into_stmt()], - }, + obj: ThisExpr::dummy().into(), + prop: prop_name_to_member_prop(key.take()), + } + .into(), + right: value, } .into(); - return; - } else { - self.constructor_inits.push(init_expr.into()); + if *is_static { + *member = StaticBlock { + span: DUMMY_SP, + body: BlockStmt { + span: DUMMY_SP, + stmts: vec![init_expr.into_stmt()], + }, + } + .into(); + + continue; + } else { + constructor_inits.push(init_expr.into()); + } } - } - n.take(); - } - ClassMember::PrivateProp(PrivateProp { - ref span, - is_static: false, - key, - value, - .. - }) => { - if let Some(value) = value.take() { - let init_expr: Expr = AssignExpr { - span: *span, - op: op!("="), - left: MemberExpr { - span: DUMMY_SP, - obj: ThisExpr::dummy().into(), - prop: MemberProp::PrivateName(key.clone()), + member.take(); + } + ClassMember::PrivateProp(PrivateProp { + ref span, + is_static: false, + key, + value, + .. + }) => { + if let Some(value) = value.take() { + let init_expr: Expr = AssignExpr { + span: *span, + op: op!("="), + left: MemberExpr { + span: DUMMY_SP, + obj: ThisExpr::dummy().into(), + prop: MemberProp::PrivateName(key.clone()), + } + .into(), + right: value, } - .into(), - right: value, - } - .into(); + .into(); - self.constructor_inits.push(init_expr.into()); + constructor_inits.push(init_expr.into()); + } } + _ => {} } - _ => {} } - } -} - -#[derive(Debug, Default)] -struct ConstructorHandler { - has_super: bool, - constructor_inits: Vec>, - constructor_found: bool, -} -impl VisitMut for ConstructorHandler { - noop_visit_mut_type!(); + if constructor_inits.is_empty() { + return; + } - fn visit_mut_class(&mut self, n: &mut Class) { - if !self.constructor_found { - let mut constructor = default_constructor(self.has_super); - constructor.visit_mut_with(self); - n.body.push(constructor.into()); + if let Some(c) = n.iter_mut().find_map(|m| m.as_mut_constructor()) { + inject_after_super(c, constructor_inits.take()); } else { - n.body.visit_mut_children_with(self); + let mut c = default_constructor(self.has_super); + inject_after_super(&mut c, constructor_inits.take()); + n.push(c.into()); } } - - fn visit_mut_constructor(&mut self, n: &mut Constructor) { - inject_after_super(n, self.constructor_inits.take()); - } } #[derive(Debug)] From 62cd932f329b7e288003b0da713c79c23c5f671e Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Thu, 11 Apr 2024 00:37:21 +0000 Subject: [PATCH 098/172] chore: Bump crates --- CHANGELOG.md | 6 ++++++ Cargo.lock | 2 +- crates/swc_ecma_transforms_compat/Cargo.toml | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27905bd90bdd..052c5f660c83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Changelog ## [unreleased] +### Bug Fixes + + + +- **(es/compat)** Handle class fields correctly ([#8835](https://github.com/swc-project/swc/issues/8835)) ([5cc585b](https://github.com/swc-project/swc/commit/5cc585b8f3359d960420e31a91f53c761c90f3f5)) + ### Refactor diff --git a/Cargo.lock b/Cargo.lock index 024eff5f5c2c..7d9f0523611a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4665,7 +4665,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_compat" -version = "0.163.18" +version = "0.163.19" dependencies = [ "arrayvec", "indexmap 2.1.0", diff --git a/crates/swc_ecma_transforms_compat/Cargo.toml b/crates/swc_ecma_transforms_compat/Cargo.toml index 4346bf3ab8ec..6021427cdc92 100644 --- a/crates/swc_ecma_transforms_compat/Cargo.toml +++ b/crates/swc_ecma_transforms_compat/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_compat" repository = "https://github.com/swc-project/swc.git" -version = "0.163.18" +version = "0.163.19" [lib] bench = false From e8c63447f64076de64002bcb5a3124b809df44ed Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 10 Apr 2024 21:03:29 -0400 Subject: [PATCH 099/172] refactor(es/decorator): Remove unsafe code (#8839) --- .../src/decorator_2022_03.rs | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/crates/swc_ecma_transforms_proposal/src/decorator_2022_03.rs b/crates/swc_ecma_transforms_proposal/src/decorator_2022_03.rs index 3dbedf9c99fb..e6897ecbbb98 100644 --- a/crates/swc_ecma_transforms_proposal/src/decorator_2022_03.rs +++ b/crates/swc_ecma_transforms_proposal/src/decorator_2022_03.rs @@ -1,8 +1,4 @@ -use std::{ - collections::VecDeque, - iter::once, - mem::{take, transmute}, -}; +use std::{collections::VecDeque, iter::once, mem::take}; use rustc_hash::FxHashMap; use swc_atoms::JsWord; @@ -278,15 +274,17 @@ impl Decorator202203 { fn ensure_constructor<'a>(&mut self, c: &'a mut Class) -> &'a mut Constructor { let mut insert_index = 0; - for (i, member) in c.body.iter_mut().enumerate() { + for (i, member) in c.body.iter().enumerate() { if let ClassMember::Constructor(constructor) = member { - insert_index = i + 1; // decorators occur before typescript's type strip, so skip ctor overloads if constructor.body.is_some() { - return unsafe { - // Safety: We need polonius - transmute::<&mut Constructor, &'a mut Constructor>(constructor) - }; + if let Some(ClassMember::Constructor(c)) = c.body.get_mut(i) { + return c; + } else { + unreachable!() + } + } else { + insert_index = i + 1; } } } @@ -305,15 +303,17 @@ impl Decorator202203 { fn ensure_identity_constructor<'a>(&mut self, c: &'a mut Class) -> &'a mut Constructor { let mut insert_index = 0; - for (i, member) in c.body.iter_mut().enumerate() { + for (i, member) in c.body.iter().enumerate() { if let ClassMember::Constructor(constructor) = member { - insert_index = i + 1; // decorators occur before typescript's type strip, so skip ctor overloads if constructor.body.is_some() { - return unsafe { - // Safety: We need polonius - transmute::<&mut Constructor, &'a mut Constructor>(constructor) - }; + if let Some(ClassMember::Constructor(c)) = c.body.get_mut(i) { + return c; + } else { + unreachable!() + } + } else { + insert_index = i + 1; } } } From b103184832efb7bcc7ccfcc8b6703d804312479a Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Thu, 11 Apr 2024 01:05:09 +0000 Subject: [PATCH 100/172] chore: Bump crates --- CHANGELOG.md | 6 +++--- Cargo.lock | 4 ++-- crates/swc_core/Cargo.toml | 2 +- crates/swc_ecma_transforms_proposal/Cargo.toml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 052c5f660c83..4e78317cc289 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,9 @@ - **(es)** Make the code compile with `miri` ([#8836](https://github.com/swc-project/swc/issues/8836)) ([3a51140](https://github.com/swc-project/swc/commit/3a51140dd77ccf2cc35098a72c411b05de418ff1)) +- **(es/decorator)** Remove unsafe code ([#8839](https://github.com/swc-project/swc/issues/8839)) ([e8c6344](https://github.com/swc-project/swc/commit/e8c63447f64076de64002bcb5a3124b809df44ed)) + + - **(visit)** Simplify `Vec::move_map` ([#8838](https://github.com/swc-project/swc/issues/8838)) ([b1973d4](https://github.com/swc-project/swc/commit/b1973d490afc8e4bc597192caab7a3aa8eb2701d)) ## [1.4.13] - 2024-04-09 @@ -1359,9 +1362,6 @@ -- **(es/preset-env)** Add the repository url to `Cargo.toml` ([#7941](https://github.com/swc-project/swc/issues/7941)) ([ca22359](https://github.com/swc-project/swc/commit/ca22359dbd0ca6e2e925bdc240939f6bd6e9ac9a)) - - - **(es/preset-env)** Ignore `tp` in the version of a browser version ([#7968](https://github.com/swc-project/swc/issues/7968)) ([005ddc5](https://github.com/swc-project/swc/commit/005ddc573e3752183783cc25dd6242b750f8beb5)) ### Refactor diff --git a/Cargo.lock b/Cargo.lock index 7d9f0523611a..f908b986f023 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3935,7 +3935,7 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.90.30" +version = "0.90.31" dependencies = [ "anyhow", "binding_macros", @@ -4773,7 +4773,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_proposal" -version = "0.171.20" +version = "0.171.21" dependencies = [ "either", "rustc-hash", diff --git a/crates/swc_core/Cargo.toml b/crates/swc_core/Cargo.toml index b5c2df3ec71d..90963c914062 100644 --- a/crates/swc_core/Cargo.toml +++ b/crates/swc_core/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_core" repository = "https://github.com/swc-project/swc.git" -version = "0.90.30" +version = "0.90.31" [package.metadata.docs.rs] features = [ "allocator_node", diff --git a/crates/swc_ecma_transforms_proposal/Cargo.toml b/crates/swc_ecma_transforms_proposal/Cargo.toml index de75645ad739..c87b91e5fb55 100644 --- a/crates/swc_ecma_transforms_proposal/Cargo.toml +++ b/crates/swc_ecma_transforms_proposal/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_proposal" repository = "https://github.com/swc-project/swc.git" -version = "0.171.20" +version = "0.171.21" [lib] bench = false From ea5d9cc52413a1270e25af93c353baf10282fd86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Thu, 11 Apr 2024 16:22:56 +0900 Subject: [PATCH 101/172] test(es): Update `conformance` test suite from `tsc` (#8834) --- .../ES3For-ofTypeCheck1.1.normal.js | 4 +- .../ES3For-ofTypeCheck4.1.normal.js | 4 +- .../ES3For-ofTypeCheck6.1.normal.js | 4 +- .../ambientAccessors.1.normal.js | 2 + .../ambientAccessors.2.minified.js | 1 + ...ntrolFlowComputedPropertyNames.1.normal.js | 34 + ...rolFlowComputedPropertyNames.2.minified.js | 1 + .../decoratorOnClassMethod11.1.normal.js | 2 +- .../decoratorOnClassMethod11.2.minified.js | 23 +- .../decoratorOnClassMethod12.1.normal.js | 43 +- .../decoratorOnClassMethod12.2.minified.js | 32 +- .../tsc-references/errorIsolation.1.normal.js | 5 + .../errorIsolation.2.minified.js | 4 + .../tsc-references/es2018IntlAPIs.1.normal.js | 2 + .../es2018IntlAPIs.2.minified.js | 2 + ...corators-decoratorExpression.1.1.normal.js | 12 + ...rators-decoratorExpression.1.2.minified.js | 12 + ...corators-decoratorExpression.2.1.normal.js | 12 + ...rators-decoratorExpression.2.2.minified.js | 12 + ...ortsAndImportsWithUnderscores2.1.normal.js | 4 +- ...ortsAndImportsWithUnderscores3.1.normal.js | 6 +- .../tsc-references/importTag1.1.normal.js | 9 + .../tsc-references/importTag1.2.minified.js | 4 + .../tsc-references/importTag10.1.normal.js | 5 + .../tsc-references/importTag10.2.minified.js | 2 + .../tsc-references/importTag11.1.normal.js | 5 + .../tsc-references/importTag11.2.minified.js | 2 + .../tsc-references/importTag12.1.normal.js | 5 + .../tsc-references/importTag12.2.minified.js | 2 + .../tsc-references/importTag13.1.normal.js | 5 + .../tsc-references/importTag13.2.minified.js | 4 + .../tsc-references/importTag14.1.normal.js | 3 + .../tsc-references/importTag14.2.minified.js | 2 + .../tsc-references/importTag15.1.normal.js | 5 + .../tsc-references/importTag15.2.minified.js | 4 + .../tsc-references/importTag16.1.normal.js | 8 + .../tsc-references/importTag16.2.minified.js | 5 + .../tsc-references/importTag2.1.normal.js | 9 + .../tsc-references/importTag2.2.minified.js | 5 + .../tsc-references/importTag3.1.normal.js | 9 + .../tsc-references/importTag3.2.minified.js | 5 + .../tsc-references/importTag4.1.normal.js | 11 + .../tsc-references/importTag4.2.minified.js | 4 + .../tsc-references/importTag5.1.normal.js | 9 + .../tsc-references/importTag5.2.minified.js | 4 + .../tsc-references/importTag6.1.normal.js | 13 + .../tsc-references/importTag6.2.minified.js | 4 + .../tsc-references/importTag7.1.normal.js | 12 + .../tsc-references/importTag7.2.minified.js | 4 + .../tsc-references/importTag8.1.normal.js | 12 + .../tsc-references/importTag8.2.minified.js | 4 + .../tsc-references/importTag9.1.normal.js | 12 + .../tsc-references/importTag9.2.minified.js | 4 + ...torWithRHSHasSymbolHasInstance.1.normal.js | 2 + ...rWithRHSHasSymbolHasInstance.2.minified.js | 2 +- .../intlDateTimeFormatRangeES2021.1.normal.js | 4 + ...ntlDateTimeFormatRangeES2021.2.minified.js | 3 + .../intlNumberFormatES2020.1.normal.js | 36 + .../intlNumberFormatES2020.2.minified.js | 20 + .../intlNumberFormatES2023.1.normal.js | 37 + .../intlNumberFormatES2023.2.minified.js | 17 + ...intlNumberFormatES5UseGrouping.1.normal.js | 11 + ...tlNumberFormatES5UseGrouping.2.minified.js | 8 + .../libReferenceDeclarationEmit.1.normal.js | 4 +- ...ReferenceDeclarationEmitBundle.1.normal.js | 4 +- .../mappedTypesGenericTuples2.1.normal.js | 10 + .../mappedTypesGenericTuples2.2.minified.js | 7 + ...arators.decimal(target=es2020).1.normal.js | 15 + ...ators.decimal(target=es2020).2.minified.js | 1 + ...arators.decimal(target=es2021).1.normal.js | 15 + ...ators.decimal(target=es2021).2.minified.js | 1 + ...Separators.decimal(target=es5).1.normal.js | 15 + ...parators.decimal(target=es5).2.minified.js | 1 + ...arserArrowFunctionExpression10.1.normal.js | 7 + ...serArrowFunctionExpression10.2.minified.js | 5 + ...arserArrowFunctionExpression11.1.normal.js | 16 + ...serArrowFunctionExpression11.2.minified.js | 16 + ...arserArrowFunctionExpression12.1.normal.js | 7 + ...serArrowFunctionExpression12.2.minified.js | 5 + ...arserArrowFunctionExpression13.1.normal.js | 5 + ...serArrowFunctionExpression13.2.minified.js | 5 + ...arserArrowFunctionExpression14.1.normal.js | 5 + ...serArrowFunctionExpression14.2.minified.js | 5 + ...arserArrowFunctionExpression15.1.normal.js | 6 + ...serArrowFunctionExpression15.2.minified.js | 3 + ...arserArrowFunctionExpression16.1.normal.js | 6 + ...serArrowFunctionExpression16.2.minified.js | 3 + ...arserArrowFunctionExpression17.1.normal.js | 6 + ...serArrowFunctionExpression17.2.minified.js | 5 + ...parserArrowFunctionExpression8.1.normal.js | 15 + ...rserArrowFunctionExpression8.2.minified.js | 9 + ...parserArrowFunctionExpression9.1.normal.js | 7 + ...rserArrowFunctionExpression9.2.minified.js | 5 + .../privateNameES5Ban.1.normal.js | 38 + .../privateNameES5Ban.2.minified.js | 5 + .../spreadNonObject1.1.normal.js | 13 + .../spreadNonObject1.2.minified.js | 10 + .../templateLiteralTypes5.1.normal.js | 8 + .../templateLiteralTypes5.2.minified.js | 2 + .../templateLiteralTypes6.1.normal.js | 5 + .../templateLiteralTypes6.2.minified.js | 1 + .../templateLiteralTypes7.1.normal.js | 5 + .../templateLiteralTypes7.2.minified.js | 2 + .../templateStringMultiline3.1.normal.js | 3 +- .../tests/tsc/1.0lib-noErrors.ts | 4 +- .../tests/tsc/ES3For-ofTypeCheck1.ts | 2 +- .../tests/tsc/ES3For-ofTypeCheck2.ts | 2 +- .../tests/tsc/ES3For-ofTypeCheck4.ts | 2 +- .../tests/tsc/ES3For-ofTypeCheck6.ts | 2 +- .../tests/tsc/accessorWithES3.json | 367 -- .../tests/tsc/accessorWithES3.ts | 22 - .../tests/tsc/ambientAccessors.json | 204 +- .../tests/tsc/ambientAccessors.ts | 2 +- ...awaitUsingDeclarationsWithImportHelpers.ts | 2 +- .../tests/tsc/checkJsdocReturnTag1.json | 72 +- .../tests/tsc/checkJsdocReturnTag1.ts | 4 +- .../tests/tsc/checkJsdocReturnTag2.json | 52 +- .../tests/tsc/checkJsdocReturnTag2.ts | 4 +- ...nstructorDefaultValuesReferencingThis.json | 360 -- ...constructorDefaultValuesReferencingThis.ts | 11 - .../tsc/controlFlowComputedPropertyNames.json | 2060 +++++++++++ .../tsc/controlFlowComputedPropertyNames.ts | 41 + .../tests/tsc/decoratorOnClassMethod11.json | 40 +- .../tests/tsc/decoratorOnClassMethod11.ts | 2 +- .../tests/tsc/decoratorOnClassMethod12.ts | 2 +- .../tests/tsc/definePropertyOutputES3.json | 76 - .../tests/tsc/definePropertyOutputES3.ts | 5 - .../tests/tsc/errorIsolation.json | 172 + .../tests/tsc/errorIsolation.ts | 8 + .../tests/tsc/es2018IntlAPIs.json | 221 +- .../tests/tsc/es2018IntlAPIs.ts | 5 +- .../tsc/esDecorators-decoratorExpression.1.ts | 50 + .../esDecorators-decoratorExpression.2.json | 3189 +++++++++++++++++ .../tsc/esDecorators-decoratorExpression.2.ts | 60 + .../tests/tsc/esDecorators-preservesThis.ts | 2 +- .../tests/tsc/exportAndImport-es3-amd.json | 163 - .../tests/tsc/exportAndImport-es3-amd.ts | 12 - .../tests/tsc/exportAndImport-es3.json | 163 - .../tests/tsc/exportAndImport-es3.ts | 12 - .../tests/tsc/exportDefaultInJsFile01.ts | 2 +- .../tsc/exportsAndImportsWithUnderscores2.ts | 2 +- .../tsc/exportsAndImportsWithUnderscores3.ts | 2 +- .../tsc/exportsAndImportsWithUnderscores4.ts | 2 +- .../tsc/genericSetterInClassTypeJsDoc.json | 192 +- .../tsc/genericSetterInClassTypeJsDoc.ts | 2 +- .../tests/tsc/globalThisVarDeclaration.json | 356 +- .../tests/tsc/globalThisVarDeclaration.ts | 2 +- .../tsc/importCallExpressionAsyncES3AMD.json | 759 ---- .../tsc/importCallExpressionAsyncES3AMD.ts | 31 - .../tsc/importCallExpressionAsyncES3CJS.json | 759 ---- .../tsc/importCallExpressionAsyncES3CJS.ts | 31 - .../importCallExpressionAsyncES3System.json | 759 ---- .../tsc/importCallExpressionAsyncES3System.ts | 31 - .../tsc/importCallExpressionAsyncES3UMD.json | 759 ---- .../tsc/importCallExpressionAsyncES3UMD.ts | 31 - .../swc_ecma_parser/tests/tsc/importTag1.json | 146 + .../swc_ecma_parser/tests/tsc/importTag1.ts | 18 + .../tests/tsc/importTag10.json | 10 + .../swc_ecma_parser/tests/tsc/importTag10.ts | 8 + .../tests/tsc/importTag11.json | 10 + .../swc_ecma_parser/tests/tsc/importTag11.ts | 8 + .../tests/tsc/importTag12.json | 10 + .../swc_ecma_parser/tests/tsc/importTag12.ts | 8 + .../tests/tsc/importTag13.json | 91 + .../swc_ecma_parser/tests/tsc/importTag13.ts | 11 + .../tests/tsc/importTag14.json | 10 + .../swc_ecma_parser/tests/tsc/importTag14.ts | 6 + .../tests/tsc/importTag15.json | 104 + .../swc_ecma_parser/tests/tsc/importTag15.ts | 15 + .../tests/tsc/importTag16.json | 170 + .../swc_ecma_parser/tests/tsc/importTag16.ts | 17 + .../swc_ecma_parser/tests/tsc/importTag2.json | 154 + .../swc_ecma_parser/tests/tsc/importTag2.ts | 18 + .../swc_ecma_parser/tests/tsc/importTag3.json | 154 + .../swc_ecma_parser/tests/tsc/importTag3.ts | 18 + .../swc_ecma_parser/tests/tsc/importTag4.json | 146 + .../swc_ecma_parser/tests/tsc/importTag4.ts | 22 + .../swc_ecma_parser/tests/tsc/importTag5.json | 146 + .../swc_ecma_parser/tests/tsc/importTag5.ts | 19 + .../swc_ecma_parser/tests/tsc/importTag6.json | 246 ++ .../swc_ecma_parser/tests/tsc/importTag6.ts | 25 + .../swc_ecma_parser/tests/tsc/importTag7.json | 246 ++ .../swc_ecma_parser/tests/tsc/importTag7.ts | 24 + .../swc_ecma_parser/tests/tsc/importTag8.json | 246 ++ .../swc_ecma_parser/tests/tsc/importTag8.ts | 24 + .../swc_ecma_parser/tests/tsc/importTag9.json | 246 ++ .../swc_ecma_parser/tests/tsc/importTag9.ts | 24 + .../inferringClassMembersFromAssignments.json | 1716 ++++----- .../inferringClassMembersFromAssignments.ts | 2 +- ...ofOperatorWithRHSHasSymbolHasInstance.json | 783 +++- ...ceofOperatorWithRHSHasSymbolHasInstance.ts | 18 +- .../tsc/intlDateTimeFormatRangeES2021.json | 283 ++ .../tsc/intlDateTimeFormatRangeES2021.ts | 4 + .../tests/tsc/intlNumberFormatES2020.json | 1238 +++++++ .../tests/tsc/intlNumberFormatES2020.ts | 26 + .../tests/tsc/intlNumberFormatES2023.json | 2064 +++++++++++ .../tests/tsc/intlNumberFormatES2023.ts | 34 + .../tsc/intlNumberFormatES5UseGrouping.json | 431 +++ .../tsc/intlNumberFormatES5UseGrouping.ts | 8 + .../tests/tsc/jsObjectsMarkedAsOpenEnded.json | 428 +-- .../tests/tsc/jsObjectsMarkedAsOpenEnded.ts | 2 +- .../jsdocAccessibilityTagsDeclarations.json | 376 +- .../tsc/jsdocAccessibilityTagsDeclarations.ts | 4 +- .../tests/tsc/jsdocLinkTag8.json | 88 + .../tests/tsc/jsdocLinkTag8.ts | 8 + .../tests/tsc/jsdocLiteral.json | 104 +- .../swc_ecma_parser/tests/tsc/jsdocLiteral.ts | 2 +- .../tests/tsc/jsdocNeverUndefinedNull.json | 40 +- .../tests/tsc/jsdocNeverUndefinedNull.ts | 2 +- .../tests/tsc/jsdocReadonlyDeclarations.json | 176 +- .../tests/tsc/jsdocReadonlyDeclarations.ts | 4 +- .../tests/tsc/jsdocReturnTag1.json | 72 +- .../tests/tsc/jsdocReturnTag1.ts | 4 +- .../tsc/libReferenceDeclarationEmit.json | 60 +- .../tests/tsc/libReferenceDeclarationEmit.ts | 4 +- .../libReferenceDeclarationEmitBundle.json | 60 +- .../tsc/libReferenceDeclarationEmitBundle.ts | 4 +- .../tests/tsc/mappedTypesGenericTuples2.json | 503 +++ .../tests/tsc/mappedTypesGenericTuples2.ts | 13 + .../tests/tsc/methodsReturningThis.json | 640 ++-- .../tests/tsc/methodsReturningThis.ts | 2 +- .../tests/tsc/multipleDeclarations.json | 524 +-- .../tests/tsc/multipleDeclarations.ts | 2 +- .../tests/tsc/numberFormatCurrencySign.json | 219 -- .../tests/tsc/numberFormatCurrencySign.ts | 4 - .../tsc/numberFormatCurrencySignResolved.json | 265 -- .../tsc/numberFormatCurrencySignResolved.ts | 5 - .../tests/tsc/objectLiteralErrorsES3.json | 309 -- .../tests/tsc/objectLiteralErrorsES3.ts | 6 - .../tsc/parser.numericSeparators.decimal.ts | 1 + .../tsc/parserArrowFunctionExpression10.json | 108 +- .../tsc/parserArrowFunctionExpression10.ts | 2 +- .../tsc/parserArrowFunctionExpression11.ts | 2 +- .../tsc/parserArrowFunctionExpression12.json | 84 +- .../tsc/parserArrowFunctionExpression12.ts | 2 +- .../tsc/parserArrowFunctionExpression13.json | 84 +- .../tsc/parserArrowFunctionExpression13.ts | 2 +- .../tsc/parserArrowFunctionExpression14.json | 132 +- .../tsc/parserArrowFunctionExpression14.ts | 2 +- .../tsc/parserArrowFunctionExpression15.json | 76 +- .../tsc/parserArrowFunctionExpression15.ts | 2 +- .../tsc/parserArrowFunctionExpression16.json | 100 +- .../tsc/parserArrowFunctionExpression16.ts | 2 +- .../tsc/parserArrowFunctionExpression17.json | 84 +- .../tsc/parserArrowFunctionExpression17.ts | 2 +- .../tsc/parserArrowFunctionExpression8.json | 108 +- .../tsc/parserArrowFunctionExpression8.ts | 2 +- .../tsc/parserArrowFunctionExpression9.json | 68 +- .../tsc/parserArrowFunctionExpression9.ts | 2 +- .../tests/tsc/privateNameES5Ban.json | 224 +- .../tests/tsc/privateNameES5Ban.ts | 2 +- .../tests/tsc/spreadNonObject1.json | 364 ++ .../tests/tsc/spreadNonObject1.ts | 11 + .../tests/tsc/templateLiteralTypes5.json | 1472 ++++++++ .../tests/tsc/templateLiteralTypes5.ts | 19 + .../tests/tsc/templateLiteralTypes6.json | 1042 ++++++ .../tests/tsc/templateLiteralTypes6.ts | 24 + .../tests/tsc/templateLiteralTypes7.json | 1506 ++++++++ .../tests/tsc/templateLiteralTypes7.ts | 23 + .../tests/tsc/templateStringMultiline3.json | 37 +- .../tests/tsc/templateStringMultiline3.ts | 2 +- .../tsc/templateStringMultiline3_ES6.json | 37 +- .../tests/tsc/templateStringMultiline3_ES6.ts | 2 +- .../tests/tsc/topLevelThisAssignment.json | 76 +- .../tests/tsc/topLevelThisAssignment.ts | 2 +- .../tsc/topLevelVarHoistingCommonJS.json | 1631 --------- .../typeFromPropertyAssignmentOutOfOrder.ts | 2 +- .../tests/tsc/typeSatisfaction_js.json | 32 +- .../tests/tsc/typeSatisfaction_js.ts | 2 +- .../tsc/uniqueSymbolsDeclarationsInJs.json | 120 +- .../tsc/uniqueSymbolsDeclarationsInJs.ts | 2 +- .../uniqueSymbolsDeclarationsInJsErrors.json | 36 +- .../uniqueSymbolsDeclarationsInJsErrors.ts | 4 +- .../tsc/usingDeclarationsWithImportHelpers.ts | 2 +- .../tests/tsc/variadicTuples1.json | 58 +- .../tests/tsc/variadicTuples1.ts | 2 + crates/swc_ecma_parser/tests/typescript.rs | 8 +- .../tests/strip_correctness.rs | 3 + 278 files changed, 22323 insertions(+), 10197 deletions(-) create mode 100644 crates/swc/tests/tsc-references/ambientAccessors.1.normal.js create mode 100644 crates/swc/tests/tsc-references/ambientAccessors.2.minified.js create mode 100644 crates/swc/tests/tsc-references/controlFlowComputedPropertyNames.1.normal.js create mode 100644 crates/swc/tests/tsc-references/controlFlowComputedPropertyNames.2.minified.js create mode 100644 crates/swc/tests/tsc-references/errorIsolation.1.normal.js create mode 100644 crates/swc/tests/tsc-references/errorIsolation.2.minified.js create mode 100644 crates/swc/tests/tsc-references/esDecorators-decoratorExpression.1.1.normal.js create mode 100644 crates/swc/tests/tsc-references/esDecorators-decoratorExpression.1.2.minified.js create mode 100644 crates/swc/tests/tsc-references/esDecorators-decoratorExpression.2.1.normal.js create mode 100644 crates/swc/tests/tsc-references/esDecorators-decoratorExpression.2.2.minified.js create mode 100644 crates/swc/tests/tsc-references/importTag1.1.normal.js create mode 100644 crates/swc/tests/tsc-references/importTag1.2.minified.js create mode 100644 crates/swc/tests/tsc-references/importTag10.1.normal.js create mode 100644 crates/swc/tests/tsc-references/importTag10.2.minified.js create mode 100644 crates/swc/tests/tsc-references/importTag11.1.normal.js create mode 100644 crates/swc/tests/tsc-references/importTag11.2.minified.js create mode 100644 crates/swc/tests/tsc-references/importTag12.1.normal.js create mode 100644 crates/swc/tests/tsc-references/importTag12.2.minified.js create mode 100644 crates/swc/tests/tsc-references/importTag13.1.normal.js create mode 100644 crates/swc/tests/tsc-references/importTag13.2.minified.js create mode 100644 crates/swc/tests/tsc-references/importTag14.1.normal.js create mode 100644 crates/swc/tests/tsc-references/importTag14.2.minified.js create mode 100644 crates/swc/tests/tsc-references/importTag15.1.normal.js create mode 100644 crates/swc/tests/tsc-references/importTag15.2.minified.js create mode 100644 crates/swc/tests/tsc-references/importTag16.1.normal.js create mode 100644 crates/swc/tests/tsc-references/importTag16.2.minified.js create mode 100644 crates/swc/tests/tsc-references/importTag2.1.normal.js create mode 100644 crates/swc/tests/tsc-references/importTag2.2.minified.js create mode 100644 crates/swc/tests/tsc-references/importTag3.1.normal.js create mode 100644 crates/swc/tests/tsc-references/importTag3.2.minified.js create mode 100644 crates/swc/tests/tsc-references/importTag4.1.normal.js create mode 100644 crates/swc/tests/tsc-references/importTag4.2.minified.js create mode 100644 crates/swc/tests/tsc-references/importTag5.1.normal.js create mode 100644 crates/swc/tests/tsc-references/importTag5.2.minified.js create mode 100644 crates/swc/tests/tsc-references/importTag6.1.normal.js create mode 100644 crates/swc/tests/tsc-references/importTag6.2.minified.js create mode 100644 crates/swc/tests/tsc-references/importTag7.1.normal.js create mode 100644 crates/swc/tests/tsc-references/importTag7.2.minified.js create mode 100644 crates/swc/tests/tsc-references/importTag8.1.normal.js create mode 100644 crates/swc/tests/tsc-references/importTag8.2.minified.js create mode 100644 crates/swc/tests/tsc-references/importTag9.1.normal.js create mode 100644 crates/swc/tests/tsc-references/importTag9.2.minified.js create mode 100644 crates/swc/tests/tsc-references/intlDateTimeFormatRangeES2021.1.normal.js create mode 100644 crates/swc/tests/tsc-references/intlDateTimeFormatRangeES2021.2.minified.js create mode 100644 crates/swc/tests/tsc-references/intlNumberFormatES2020.1.normal.js create mode 100644 crates/swc/tests/tsc-references/intlNumberFormatES2020.2.minified.js create mode 100644 crates/swc/tests/tsc-references/intlNumberFormatES2023.1.normal.js create mode 100644 crates/swc/tests/tsc-references/intlNumberFormatES2023.2.minified.js create mode 100644 crates/swc/tests/tsc-references/intlNumberFormatES5UseGrouping.1.normal.js create mode 100644 crates/swc/tests/tsc-references/intlNumberFormatES5UseGrouping.2.minified.js create mode 100644 crates/swc/tests/tsc-references/mappedTypesGenericTuples2.1.normal.js create mode 100644 crates/swc/tests/tsc-references/mappedTypesGenericTuples2.2.minified.js create mode 100644 crates/swc/tests/tsc-references/parser.numericSeparators.decimal(target=es2020).1.normal.js create mode 100644 crates/swc/tests/tsc-references/parser.numericSeparators.decimal(target=es2020).2.minified.js create mode 100644 crates/swc/tests/tsc-references/parser.numericSeparators.decimal(target=es2021).1.normal.js create mode 100644 crates/swc/tests/tsc-references/parser.numericSeparators.decimal(target=es2021).2.minified.js create mode 100644 crates/swc/tests/tsc-references/parser.numericSeparators.decimal(target=es5).1.normal.js create mode 100644 crates/swc/tests/tsc-references/parser.numericSeparators.decimal(target=es5).2.minified.js create mode 100644 crates/swc/tests/tsc-references/parserArrowFunctionExpression10.1.normal.js create mode 100644 crates/swc/tests/tsc-references/parserArrowFunctionExpression10.2.minified.js create mode 100644 crates/swc/tests/tsc-references/parserArrowFunctionExpression11.1.normal.js create mode 100644 crates/swc/tests/tsc-references/parserArrowFunctionExpression11.2.minified.js create mode 100644 crates/swc/tests/tsc-references/parserArrowFunctionExpression12.1.normal.js create mode 100644 crates/swc/tests/tsc-references/parserArrowFunctionExpression12.2.minified.js create mode 100644 crates/swc/tests/tsc-references/parserArrowFunctionExpression13.1.normal.js create mode 100644 crates/swc/tests/tsc-references/parserArrowFunctionExpression13.2.minified.js create mode 100644 crates/swc/tests/tsc-references/parserArrowFunctionExpression14.1.normal.js create mode 100644 crates/swc/tests/tsc-references/parserArrowFunctionExpression14.2.minified.js create mode 100644 crates/swc/tests/tsc-references/parserArrowFunctionExpression15.1.normal.js create mode 100644 crates/swc/tests/tsc-references/parserArrowFunctionExpression15.2.minified.js create mode 100644 crates/swc/tests/tsc-references/parserArrowFunctionExpression16.1.normal.js create mode 100644 crates/swc/tests/tsc-references/parserArrowFunctionExpression16.2.minified.js create mode 100644 crates/swc/tests/tsc-references/parserArrowFunctionExpression17.1.normal.js create mode 100644 crates/swc/tests/tsc-references/parserArrowFunctionExpression17.2.minified.js create mode 100644 crates/swc/tests/tsc-references/parserArrowFunctionExpression8.1.normal.js create mode 100644 crates/swc/tests/tsc-references/parserArrowFunctionExpression8.2.minified.js create mode 100644 crates/swc/tests/tsc-references/parserArrowFunctionExpression9.1.normal.js create mode 100644 crates/swc/tests/tsc-references/parserArrowFunctionExpression9.2.minified.js create mode 100644 crates/swc/tests/tsc-references/privateNameES5Ban.1.normal.js create mode 100644 crates/swc/tests/tsc-references/privateNameES5Ban.2.minified.js create mode 100644 crates/swc/tests/tsc-references/spreadNonObject1.1.normal.js create mode 100644 crates/swc/tests/tsc-references/spreadNonObject1.2.minified.js create mode 100644 crates/swc/tests/tsc-references/templateLiteralTypes5.1.normal.js create mode 100644 crates/swc/tests/tsc-references/templateLiteralTypes5.2.minified.js create mode 100644 crates/swc/tests/tsc-references/templateLiteralTypes6.1.normal.js create mode 100644 crates/swc/tests/tsc-references/templateLiteralTypes6.2.minified.js create mode 100644 crates/swc/tests/tsc-references/templateLiteralTypes7.1.normal.js create mode 100644 crates/swc/tests/tsc-references/templateLiteralTypes7.2.minified.js delete mode 100644 crates/swc_ecma_parser/tests/tsc/accessorWithES3.json delete mode 100644 crates/swc_ecma_parser/tests/tsc/accessorWithES3.ts delete mode 100644 crates/swc_ecma_parser/tests/tsc/constructorDefaultValuesReferencingThis.json delete mode 100644 crates/swc_ecma_parser/tests/tsc/constructorDefaultValuesReferencingThis.ts create mode 100644 crates/swc_ecma_parser/tests/tsc/controlFlowComputedPropertyNames.json create mode 100644 crates/swc_ecma_parser/tests/tsc/controlFlowComputedPropertyNames.ts delete mode 100644 crates/swc_ecma_parser/tests/tsc/definePropertyOutputES3.json delete mode 100644 crates/swc_ecma_parser/tests/tsc/definePropertyOutputES3.ts create mode 100644 crates/swc_ecma_parser/tests/tsc/errorIsolation.json create mode 100644 crates/swc_ecma_parser/tests/tsc/errorIsolation.ts create mode 100644 crates/swc_ecma_parser/tests/tsc/esDecorators-decoratorExpression.1.ts create mode 100644 crates/swc_ecma_parser/tests/tsc/esDecorators-decoratorExpression.2.json create mode 100644 crates/swc_ecma_parser/tests/tsc/esDecorators-decoratorExpression.2.ts delete mode 100644 crates/swc_ecma_parser/tests/tsc/exportAndImport-es3-amd.json delete mode 100644 crates/swc_ecma_parser/tests/tsc/exportAndImport-es3-amd.ts delete mode 100644 crates/swc_ecma_parser/tests/tsc/exportAndImport-es3.json delete mode 100644 crates/swc_ecma_parser/tests/tsc/exportAndImport-es3.ts delete mode 100644 crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3AMD.json delete mode 100644 crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3AMD.ts delete mode 100644 crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3CJS.json delete mode 100644 crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3CJS.ts delete mode 100644 crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3System.json delete mode 100644 crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3System.ts delete mode 100644 crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3UMD.json delete mode 100644 crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3UMD.ts create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag1.json create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag1.ts create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag10.json create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag10.ts create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag11.json create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag11.ts create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag12.json create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag12.ts create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag13.json create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag13.ts create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag14.json create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag14.ts create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag15.json create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag15.ts create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag16.json create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag16.ts create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag2.json create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag2.ts create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag3.json create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag3.ts create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag4.json create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag4.ts create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag5.json create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag5.ts create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag6.json create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag6.ts create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag7.json create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag7.ts create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag8.json create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag8.ts create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag9.json create mode 100644 crates/swc_ecma_parser/tests/tsc/importTag9.ts create mode 100644 crates/swc_ecma_parser/tests/tsc/intlDateTimeFormatRangeES2021.json create mode 100644 crates/swc_ecma_parser/tests/tsc/intlDateTimeFormatRangeES2021.ts create mode 100644 crates/swc_ecma_parser/tests/tsc/intlNumberFormatES2020.json create mode 100644 crates/swc_ecma_parser/tests/tsc/intlNumberFormatES2020.ts create mode 100644 crates/swc_ecma_parser/tests/tsc/intlNumberFormatES2023.json create mode 100644 crates/swc_ecma_parser/tests/tsc/intlNumberFormatES2023.ts create mode 100644 crates/swc_ecma_parser/tests/tsc/intlNumberFormatES5UseGrouping.json create mode 100644 crates/swc_ecma_parser/tests/tsc/intlNumberFormatES5UseGrouping.ts create mode 100644 crates/swc_ecma_parser/tests/tsc/jsdocLinkTag8.json create mode 100644 crates/swc_ecma_parser/tests/tsc/jsdocLinkTag8.ts create mode 100644 crates/swc_ecma_parser/tests/tsc/mappedTypesGenericTuples2.json create mode 100644 crates/swc_ecma_parser/tests/tsc/mappedTypesGenericTuples2.ts delete mode 100644 crates/swc_ecma_parser/tests/tsc/numberFormatCurrencySign.json delete mode 100644 crates/swc_ecma_parser/tests/tsc/numberFormatCurrencySign.ts delete mode 100644 crates/swc_ecma_parser/tests/tsc/numberFormatCurrencySignResolved.json delete mode 100644 crates/swc_ecma_parser/tests/tsc/numberFormatCurrencySignResolved.ts delete mode 100644 crates/swc_ecma_parser/tests/tsc/objectLiteralErrorsES3.json delete mode 100644 crates/swc_ecma_parser/tests/tsc/objectLiteralErrorsES3.ts create mode 100644 crates/swc_ecma_parser/tests/tsc/spreadNonObject1.json create mode 100644 crates/swc_ecma_parser/tests/tsc/spreadNonObject1.ts create mode 100644 crates/swc_ecma_parser/tests/tsc/templateLiteralTypes5.json create mode 100644 crates/swc_ecma_parser/tests/tsc/templateLiteralTypes5.ts create mode 100644 crates/swc_ecma_parser/tests/tsc/templateLiteralTypes6.json create mode 100644 crates/swc_ecma_parser/tests/tsc/templateLiteralTypes6.ts create mode 100644 crates/swc_ecma_parser/tests/tsc/templateLiteralTypes7.json create mode 100644 crates/swc_ecma_parser/tests/tsc/templateLiteralTypes7.ts delete mode 100644 crates/swc_ecma_parser/tests/tsc/topLevelVarHoistingCommonJS.json diff --git a/crates/swc/tests/tsc-references/ES3For-ofTypeCheck1.1.normal.js b/crates/swc/tests/tsc-references/ES3For-ofTypeCheck1.1.normal.js index 052496710c28..15156297eace 100644 --- a/crates/swc/tests/tsc-references/ES3For-ofTypeCheck1.1.normal.js +++ b/crates/swc/tests/tsc-references/ES3For-ofTypeCheck1.1.normal.js @@ -9,8 +9,8 @@ try { _iteratorError = err; } finally{ try { - if (!_iteratorNormalCompletion && _iterator["return"] != null) { - _iterator["return"](); + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); } } finally{ if (_didIteratorError) { diff --git a/crates/swc/tests/tsc-references/ES3For-ofTypeCheck4.1.normal.js b/crates/swc/tests/tsc-references/ES3For-ofTypeCheck4.1.normal.js index 648d660a9eee..5bc56c910dfa 100644 --- a/crates/swc/tests/tsc-references/ES3For-ofTypeCheck4.1.normal.js +++ b/crates/swc/tests/tsc-references/ES3For-ofTypeCheck4.1.normal.js @@ -10,8 +10,8 @@ try { _iteratorError = err; } finally{ try { - if (!_iteratorNormalCompletion && _iterator["return"] != null) { - _iterator["return"](); + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); } } finally{ if (_didIteratorError) { diff --git a/crates/swc/tests/tsc-references/ES3For-ofTypeCheck6.1.normal.js b/crates/swc/tests/tsc-references/ES3For-ofTypeCheck6.1.normal.js index 4d589b0bfa88..cebd57c37791 100644 --- a/crates/swc/tests/tsc-references/ES3For-ofTypeCheck6.1.normal.js +++ b/crates/swc/tests/tsc-references/ES3For-ofTypeCheck6.1.normal.js @@ -10,8 +10,8 @@ try { _iteratorError = err; } finally{ try { - if (!_iteratorNormalCompletion && _iterator["return"] != null) { - _iterator["return"](); + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); } } finally{ if (_didIteratorError) { diff --git a/crates/swc/tests/tsc-references/ambientAccessors.1.normal.js b/crates/swc/tests/tsc-references/ambientAccessors.1.normal.js new file mode 100644 index 000000000000..1f89f7dee575 --- /dev/null +++ b/crates/swc/tests/tsc-references/ambientAccessors.1.normal.js @@ -0,0 +1,2 @@ +//// [ambientAccessors.ts] +// ok to use accessors in ambient class in ES3 diff --git a/crates/swc/tests/tsc-references/ambientAccessors.2.minified.js b/crates/swc/tests/tsc-references/ambientAccessors.2.minified.js new file mode 100644 index 000000000000..72a6075a8321 --- /dev/null +++ b/crates/swc/tests/tsc-references/ambientAccessors.2.minified.js @@ -0,0 +1 @@ +//// [ambientAccessors.ts] diff --git a/crates/swc/tests/tsc-references/controlFlowComputedPropertyNames.1.normal.js b/crates/swc/tests/tsc-references/controlFlowComputedPropertyNames.1.normal.js new file mode 100644 index 000000000000..0fcf61b515e8 --- /dev/null +++ b/crates/swc/tests/tsc-references/controlFlowComputedPropertyNames.1.normal.js @@ -0,0 +1,34 @@ +//// [controlFlowComputedPropertyNames.ts] +function f1(obj, key) { + if (typeof obj[key] === "string") { + obj[key].toUpperCase(); + } +} +function f2(obj, key) { + if (obj[key] !== undefined) { + obj[key].toUpperCase(); + } + var key2 = key + key; + if (obj[key2] !== undefined) { + obj[key2].toUpperCase(); + } + var key3 = key + key; + if (obj[key3] !== undefined) { + obj[key3].toUpperCase(); + } +} +function f3(obj, key) { + if (obj[key] !== undefined) { + if (typeof obj[key] === "string") { + obj[key].toUpperCase(); + } + if (typeof obj[key] === "number") { + obj[key].toFixed(); + } + } +} +function f4(obj, key) { + if (obj[key]) { + obj[key].toUpperCase(); + } +} diff --git a/crates/swc/tests/tsc-references/controlFlowComputedPropertyNames.2.minified.js b/crates/swc/tests/tsc-references/controlFlowComputedPropertyNames.2.minified.js new file mode 100644 index 000000000000..d30b31bc6714 --- /dev/null +++ b/crates/swc/tests/tsc-references/controlFlowComputedPropertyNames.2.minified.js @@ -0,0 +1 @@ +//// [controlFlowComputedPropertyNames.ts] diff --git a/crates/swc/tests/tsc-references/decoratorOnClassMethod11.1.normal.js b/crates/swc/tests/tsc-references/decoratorOnClassMethod11.1.normal.js index aa6e44323687..c58da50c3b29 100644 --- a/crates/swc/tests/tsc-references/decoratorOnClassMethod11.1.normal.js +++ b/crates/swc/tests/tsc-references/decoratorOnClassMethod11.1.normal.js @@ -14,6 +14,6 @@ var M; return C; }(); _ts_decorate([ - _this.decorator + this.decorator ], C.prototype, "method", null); })(M || (M = {})); diff --git a/crates/swc/tests/tsc-references/decoratorOnClassMethod11.2.minified.js b/crates/swc/tests/tsc-references/decoratorOnClassMethod11.2.minified.js index b1f4d4fc10b3..ccf5586923dd 100644 --- a/crates/swc/tests/tsc-references/decoratorOnClassMethod11.2.minified.js +++ b/crates/swc/tests/tsc-references/decoratorOnClassMethod11.2.minified.js @@ -1,13 +1,16 @@ //// [decoratorOnClassMethod11.ts] -var M, C; +var M; import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -M || (M = {}), C = function() { - function C() { - _class_call_check(this, C); - } - var _proto = C.prototype; - return _proto.decorator = function(target, key) {}, _proto.method = function() {}, C; -}(), _ts_decorate([ - _this.decorator -], C.prototype, "method", null); +!function(M) { + var C = function() { + function C() { + _class_call_check(this, C); + } + var _proto = C.prototype; + return _proto.decorator = function(target, key) {}, _proto.method = function() {}, C; + }(); + _ts_decorate([ + this.decorator + ], C.prototype, "method", null); +}(M || (M = {})); diff --git a/crates/swc/tests/tsc-references/decoratorOnClassMethod12.1.normal.js b/crates/swc/tests/tsc-references/decoratorOnClassMethod12.1.normal.js index d2b42c83835b..2644714bf671 100644 --- a/crates/swc/tests/tsc-references/decoratorOnClassMethod12.1.normal.js +++ b/crates/swc/tests/tsc-references/decoratorOnClassMethod12.1.normal.js @@ -1,13 +1,32 @@ //// [decoratorOnClassMethod12.ts] -//! -//! x Expected ident -//! ,-[3:1] -//! 3 | decorator(target: Object, key: string): void { } -//! 4 | } -//! 5 | class C extends S { -//! 6 | @super.decorator -//! : ^^^^^ -//! 7 | method() { } -//! 8 | } -//! 9 | } -//! `---- +import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; +import { _ as _inherits } from "@swc/helpers/_/_inherits"; +import { _ as _create_super } from "@swc/helpers/_/_create_super"; +import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; +var M; +(function(M) { + var S = /*#__PURE__*/ function() { + "use strict"; + function S() { + _class_call_check(this, S); + } + var _proto = S.prototype; + _proto.decorator = function decorator(target, key) {}; + return S; + }(); + var C = /*#__PURE__*/ function(S) { + "use strict"; + _inherits(C, S); + var _super = _create_super(C); + function C() { + _class_call_check(this, C); + return _super.apply(this, arguments); + } + var _proto = C.prototype; + _proto.method = function method() {}; + return C; + }(S); + _ts_decorate([ + super.decorator + ], C.prototype, "method", null); +})(M || (M = {})); diff --git a/crates/swc/tests/tsc-references/decoratorOnClassMethod12.2.minified.js b/crates/swc/tests/tsc-references/decoratorOnClassMethod12.2.minified.js index d2b42c83835b..cd29930ef76e 100644 --- a/crates/swc/tests/tsc-references/decoratorOnClassMethod12.2.minified.js +++ b/crates/swc/tests/tsc-references/decoratorOnClassMethod12.2.minified.js @@ -1,13 +1,21 @@ //// [decoratorOnClassMethod12.ts] -//! -//! x Expected ident -//! ,-[3:1] -//! 3 | decorator(target: Object, key: string): void { } -//! 4 | } -//! 5 | class C extends S { -//! 6 | @super.decorator -//! : ^^^^^ -//! 7 | method() { } -//! 8 | } -//! 9 | } -//! `---- +var M, C; +import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; +import { _ as _inherits } from "@swc/helpers/_/_inherits"; +import { _ as _create_super } from "@swc/helpers/_/_create_super"; +import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; +M || (M = {}), C = function(S) { + _inherits(C, S); + var _super = _create_super(C); + function C() { + return _class_call_check(this, C), _super.apply(this, arguments); + } + return C.prototype.method = function() {}, C; +}(function() { + function S() { + _class_call_check(this, S); + } + return S.prototype.decorator = function(target, key) {}, S; +}()), _ts_decorate([ + super.decorator +], C.prototype, "method", null); diff --git a/crates/swc/tests/tsc-references/errorIsolation.1.normal.js b/crates/swc/tests/tsc-references/errorIsolation.1.normal.js new file mode 100644 index 000000000000..423389c61945 --- /dev/null +++ b/crates/swc/tests/tsc-references/errorIsolation.1.normal.js @@ -0,0 +1,5 @@ +//// [errorIsolation.js] +var async = { + doSomething: function(_) {} +}; +async.doSomething(/***/ function() {}); diff --git a/crates/swc/tests/tsc-references/errorIsolation.2.minified.js b/crates/swc/tests/tsc-references/errorIsolation.2.minified.js new file mode 100644 index 000000000000..de9d795e844d --- /dev/null +++ b/crates/swc/tests/tsc-references/errorIsolation.2.minified.js @@ -0,0 +1,4 @@ +//// [errorIsolation.js] +({ + doSomething: function(_) {} +}).doSomething(function() {}); diff --git a/crates/swc/tests/tsc-references/es2018IntlAPIs.1.normal.js b/crates/swc/tests/tsc-references/es2018IntlAPIs.1.normal.js index 5a375d05e68b..49982d115b9a 100644 --- a/crates/swc/tests/tsc-references/es2018IntlAPIs.1.normal.js +++ b/crates/swc/tests/tsc-references/es2018IntlAPIs.1.normal.js @@ -10,3 +10,5 @@ const options = { localeMatcher: 'lookup' }; console.log(Intl.PluralRules.supportedLocalesOf(locales, options).join(', ')); +const [part] = new Intl.NumberFormat().formatToParts(); +console.log(part.type, part.value); diff --git a/crates/swc/tests/tsc-references/es2018IntlAPIs.2.minified.js b/crates/swc/tests/tsc-references/es2018IntlAPIs.2.minified.js index 1d353e68c16c..64e0f730b62b 100644 --- a/crates/swc/tests/tsc-references/es2018IntlAPIs.2.minified.js +++ b/crates/swc/tests/tsc-references/es2018IntlAPIs.2.minified.js @@ -6,3 +6,5 @@ console.log(Intl.PluralRules.supportedLocalesOf([ ], { localeMatcher: 'lookup' }).join(', ')); +const [part] = new Intl.NumberFormat().formatToParts(); +console.log(part.type, part.value); diff --git a/crates/swc/tests/tsc-references/esDecorators-decoratorExpression.1.1.normal.js b/crates/swc/tests/tsc-references/esDecorators-decoratorExpression.1.1.normal.js new file mode 100644 index 000000000000..ebc3ab8aa349 --- /dev/null +++ b/crates/swc/tests/tsc-references/esDecorators-decoratorExpression.1.1.normal.js @@ -0,0 +1,12 @@ +//// [esDecorators-decoratorExpression.1.ts] +//! +//! x Expression expected +//! ,-[1:1] +//! 1 | +//! 2 | declare let x: any; +//! 3 | +//! 4 | { @x().y class C {} } +//! : ^ +//! 5 | +//! 6 | { @new x class C {} } +//! `---- diff --git a/crates/swc/tests/tsc-references/esDecorators-decoratorExpression.1.2.minified.js b/crates/swc/tests/tsc-references/esDecorators-decoratorExpression.1.2.minified.js new file mode 100644 index 000000000000..ebc3ab8aa349 --- /dev/null +++ b/crates/swc/tests/tsc-references/esDecorators-decoratorExpression.1.2.minified.js @@ -0,0 +1,12 @@ +//// [esDecorators-decoratorExpression.1.ts] +//! +//! x Expression expected +//! ,-[1:1] +//! 1 | +//! 2 | declare let x: any; +//! 3 | +//! 4 | { @x().y class C {} } +//! : ^ +//! 5 | +//! 6 | { @new x class C {} } +//! `---- diff --git a/crates/swc/tests/tsc-references/esDecorators-decoratorExpression.2.1.normal.js b/crates/swc/tests/tsc-references/esDecorators-decoratorExpression.2.1.normal.js new file mode 100644 index 000000000000..075850ff4bcc --- /dev/null +++ b/crates/swc/tests/tsc-references/esDecorators-decoratorExpression.2.1.normal.js @@ -0,0 +1,12 @@ +//// [esDecorators-decoratorExpression.2.ts] +//! +//! x Expression expected +//! ,-[3:1] +//! 3 | declare let g: (...args: any) => any; +//! 4 | declare let h: () => (...args: any) => any; +//! 5 | +//! 6 | { @x! class C {} } +//! : ^ +//! 7 | +//! 8 | { @x.y! class C {} } +//! `---- diff --git a/crates/swc/tests/tsc-references/esDecorators-decoratorExpression.2.2.minified.js b/crates/swc/tests/tsc-references/esDecorators-decoratorExpression.2.2.minified.js new file mode 100644 index 000000000000..075850ff4bcc --- /dev/null +++ b/crates/swc/tests/tsc-references/esDecorators-decoratorExpression.2.2.minified.js @@ -0,0 +1,12 @@ +//// [esDecorators-decoratorExpression.2.ts] +//! +//! x Expression expected +//! ,-[3:1] +//! 3 | declare let g: (...args: any) => any; +//! 4 | declare let h: () => (...args: any) => any; +//! 5 | +//! 6 | { @x! class C {} } +//! : ^ +//! 7 | +//! 8 | { @x.y! class C {} } +//! `---- diff --git a/crates/swc/tests/tsc-references/exportsAndImportsWithUnderscores2.1.normal.js b/crates/swc/tests/tsc-references/exportsAndImportsWithUnderscores2.1.normal.js index 3ca90d11ab45..295b0abb947e 100644 --- a/crates/swc/tests/tsc-references/exportsAndImportsWithUnderscores2.1.normal.js +++ b/crates/swc/tests/tsc-references/exportsAndImportsWithUnderscores2.1.normal.js @@ -13,8 +13,8 @@ Object.defineProperty(exports, "default", { }); var R; var _default = R = { - __esmodule: true, - __proto__: {} + "__esmodule": true, + "__proto__": {} }; //// [m2.ts] "use strict"; diff --git a/crates/swc/tests/tsc-references/exportsAndImportsWithUnderscores3.1.normal.js b/crates/swc/tests/tsc-references/exportsAndImportsWithUnderscores3.1.normal.js index 47bce16cea69..790fd75c6ed6 100644 --- a/crates/swc/tests/tsc-references/exportsAndImportsWithUnderscores3.1.normal.js +++ b/crates/swc/tests/tsc-references/exportsAndImportsWithUnderscores3.1.normal.js @@ -13,9 +13,9 @@ Object.defineProperty(exports, "default", { }); var R; var _default = R = { - ___: 30, - ___hello: 21, - _hi: 40 + "___": 30, + "___hello": 21, + "_hi": 40 }; //// [m2.ts] "use strict"; diff --git a/crates/swc/tests/tsc-references/importTag1.1.normal.js b/crates/swc/tests/tsc-references/importTag1.1.normal.js new file mode 100644 index 000000000000..d3b7d448e327 --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag1.1.normal.js @@ -0,0 +1,9 @@ +//// [importTag1.ts] +//// [/types.ts] +export { }; +//// [/foo.js] +/** + * @import { Foo } from "./types" + */ /** + * @param { Foo } foo + */ function f(foo) {} diff --git a/crates/swc/tests/tsc-references/importTag1.2.minified.js b/crates/swc/tests/tsc-references/importTag1.2.minified.js new file mode 100644 index 000000000000..ee5b39618056 --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag1.2.minified.js @@ -0,0 +1,4 @@ +//// [importTag1.ts] +//// [/types.ts] +export { }; +//// [/foo.js] diff --git a/crates/swc/tests/tsc-references/importTag10.1.normal.js b/crates/swc/tests/tsc-references/importTag10.1.normal.js new file mode 100644 index 000000000000..83d09921ec70 --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag10.1.normal.js @@ -0,0 +1,5 @@ +//// [importTag10.ts] +//// [/foo.js] +/** + * @import + */ diff --git a/crates/swc/tests/tsc-references/importTag10.2.minified.js b/crates/swc/tests/tsc-references/importTag10.2.minified.js new file mode 100644 index 000000000000..e56a75fdd757 --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag10.2.minified.js @@ -0,0 +1,2 @@ +//// [importTag10.ts] +//// [/foo.js] diff --git a/crates/swc/tests/tsc-references/importTag11.1.normal.js b/crates/swc/tests/tsc-references/importTag11.1.normal.js new file mode 100644 index 000000000000..7cbe3cf2ebef --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag11.1.normal.js @@ -0,0 +1,5 @@ +//// [importTag11.ts] +//// [/foo.js] +/** + * @import foo + */ diff --git a/crates/swc/tests/tsc-references/importTag11.2.minified.js b/crates/swc/tests/tsc-references/importTag11.2.minified.js new file mode 100644 index 000000000000..4c39d1a03d8e --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag11.2.minified.js @@ -0,0 +1,2 @@ +//// [importTag11.ts] +//// [/foo.js] diff --git a/crates/swc/tests/tsc-references/importTag12.1.normal.js b/crates/swc/tests/tsc-references/importTag12.1.normal.js new file mode 100644 index 000000000000..7e6926a004ab --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag12.1.normal.js @@ -0,0 +1,5 @@ +//// [importTag12.ts] +//// [/foo.js] +/** + * @import foo from + */ diff --git a/crates/swc/tests/tsc-references/importTag12.2.minified.js b/crates/swc/tests/tsc-references/importTag12.2.minified.js new file mode 100644 index 000000000000..5cc1657cf0a7 --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag12.2.minified.js @@ -0,0 +1,2 @@ +//// [importTag12.ts] +//// [/foo.js] diff --git a/crates/swc/tests/tsc-references/importTag13.1.normal.js b/crates/swc/tests/tsc-references/importTag13.1.normal.js new file mode 100644 index 000000000000..d1c6edd34a9b --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag13.1.normal.js @@ -0,0 +1,5 @@ +//// [importTag13.ts] +//// [/types.ts] +export { }; +//// [/foo.js] +/** @import x = require("types") */ diff --git a/crates/swc/tests/tsc-references/importTag13.2.minified.js b/crates/swc/tests/tsc-references/importTag13.2.minified.js new file mode 100644 index 000000000000..d34dedf7f2f6 --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag13.2.minified.js @@ -0,0 +1,4 @@ +//// [importTag13.ts] +//// [/types.ts] +export { }; +//// [/foo.js] diff --git a/crates/swc/tests/tsc-references/importTag14.1.normal.js b/crates/swc/tests/tsc-references/importTag14.1.normal.js new file mode 100644 index 000000000000..facf85a6ae68 --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag14.1.normal.js @@ -0,0 +1,3 @@ +//// [importTag14.ts] +//// [/foo.js] +/** @import * as f from "./foo" with */ diff --git a/crates/swc/tests/tsc-references/importTag14.2.minified.js b/crates/swc/tests/tsc-references/importTag14.2.minified.js new file mode 100644 index 000000000000..c2928e07d122 --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag14.2.minified.js @@ -0,0 +1,2 @@ +//// [importTag14.ts] +//// [/foo.js] diff --git a/crates/swc/tests/tsc-references/importTag15.1.normal.js b/crates/swc/tests/tsc-references/importTag15.1.normal.js new file mode 100644 index 000000000000..b5dca2ca3d59 --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag15.1.normal.js @@ -0,0 +1,5 @@ +//// [importTag15.ts] +//// [0.ts] +export { }; +//// [1.js] +/** @import { I } from './0' with { type: "json" } */ /** @import * as foo from './0' with { type: "json" } */ /** @param {I} a */ function f(a) {} diff --git a/crates/swc/tests/tsc-references/importTag15.2.minified.js b/crates/swc/tests/tsc-references/importTag15.2.minified.js new file mode 100644 index 000000000000..fd0b7ddcb178 --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag15.2.minified.js @@ -0,0 +1,4 @@ +//// [importTag15.ts] +//// [0.ts] +export { }; +//// [1.js] diff --git a/crates/swc/tests/tsc-references/importTag16.1.normal.js b/crates/swc/tests/tsc-references/importTag16.1.normal.js new file mode 100644 index 000000000000..8697085bcc0d --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag16.1.normal.js @@ -0,0 +1,8 @@ +//// [importTag16.ts] +//// [a.ts] +export { }; +//// [b.js] +/** @import Foo, { I } from "./a" */ /** + * @param {Foo} a + * @param {I} b + */ export function foo(a, b) {} diff --git a/crates/swc/tests/tsc-references/importTag16.2.minified.js b/crates/swc/tests/tsc-references/importTag16.2.minified.js new file mode 100644 index 000000000000..03592d47d9b8 --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag16.2.minified.js @@ -0,0 +1,5 @@ +//// [importTag16.ts] +//// [a.ts] +export { }; +//// [b.js] +export function foo(a, b) {} diff --git a/crates/swc/tests/tsc-references/importTag2.1.normal.js b/crates/swc/tests/tsc-references/importTag2.1.normal.js new file mode 100644 index 000000000000..55e29b80ce9e --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag2.1.normal.js @@ -0,0 +1,9 @@ +//// [importTag2.ts] +//// [/types.ts] +export { }; +//// [/foo.js] +/** + * @import * as types from "./types" + */ /** + * @param { types.Foo } foo + */ export function f(foo) {} diff --git a/crates/swc/tests/tsc-references/importTag2.2.minified.js b/crates/swc/tests/tsc-references/importTag2.2.minified.js new file mode 100644 index 000000000000..b15a0150fbb9 --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag2.2.minified.js @@ -0,0 +1,5 @@ +//// [importTag2.ts] +//// [/types.ts] +export { }; +//// [/foo.js] +export function f(foo) {} diff --git a/crates/swc/tests/tsc-references/importTag3.1.normal.js b/crates/swc/tests/tsc-references/importTag3.1.normal.js new file mode 100644 index 000000000000..b44d352ee17e --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag3.1.normal.js @@ -0,0 +1,9 @@ +//// [importTag3.ts] +//// [/types.ts] +export { }; +//// [/foo.js] +/** + * @import Foo from "./types" + */ /** + * @param { Foo } foo + */ export function f(foo) {} diff --git a/crates/swc/tests/tsc-references/importTag3.2.minified.js b/crates/swc/tests/tsc-references/importTag3.2.minified.js new file mode 100644 index 000000000000..5c8c013ecd35 --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag3.2.minified.js @@ -0,0 +1,5 @@ +//// [importTag3.ts] +//// [/types.ts] +export { }; +//// [/foo.js] +export function f(foo) {} diff --git a/crates/swc/tests/tsc-references/importTag4.1.normal.js b/crates/swc/tests/tsc-references/importTag4.1.normal.js new file mode 100644 index 000000000000..c6e8de4e1fe7 --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag4.1.normal.js @@ -0,0 +1,11 @@ +//// [importTag4.ts] +//// [/types.ts] +export { }; +//// [/foo.js] +/** + * @import { Foo } from "./types" + */ /** + * @import { Foo } from "./types" + */ /** + * @param { Foo } foo + */ function f(foo) {} diff --git a/crates/swc/tests/tsc-references/importTag4.2.minified.js b/crates/swc/tests/tsc-references/importTag4.2.minified.js new file mode 100644 index 000000000000..b55d3d3f5ac8 --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag4.2.minified.js @@ -0,0 +1,4 @@ +//// [importTag4.ts] +//// [/types.ts] +export { }; +//// [/foo.js] diff --git a/crates/swc/tests/tsc-references/importTag5.1.normal.js b/crates/swc/tests/tsc-references/importTag5.1.normal.js new file mode 100644 index 000000000000..15354a7faa76 --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag5.1.normal.js @@ -0,0 +1,9 @@ +//// [importTag5.ts] +//// [/types.ts] +export { }; +//// [/foo.js] +/** + * @import { Foo } from "./types" + */ /** + * @param { Foo } foo + */ function f(foo) {} diff --git a/crates/swc/tests/tsc-references/importTag5.2.minified.js b/crates/swc/tests/tsc-references/importTag5.2.minified.js new file mode 100644 index 000000000000..ed1e0d73fa9d --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag5.2.minified.js @@ -0,0 +1,4 @@ +//// [importTag5.ts] +//// [/types.ts] +export { }; +//// [/foo.js] diff --git a/crates/swc/tests/tsc-references/importTag6.1.normal.js b/crates/swc/tests/tsc-references/importTag6.1.normal.js new file mode 100644 index 000000000000..03149342778a --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag6.1.normal.js @@ -0,0 +1,13 @@ +//// [importTag6.ts] +//// [/types.ts] +export { }; +//// [/foo.js] +/** + * @import { + * A, + * B, + * } from "./types" + */ /** + * @param { A } a + * @param { B } b + */ function f(a, b) {} diff --git a/crates/swc/tests/tsc-references/importTag6.2.minified.js b/crates/swc/tests/tsc-references/importTag6.2.minified.js new file mode 100644 index 000000000000..2b24e4af5271 --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag6.2.minified.js @@ -0,0 +1,4 @@ +//// [importTag6.ts] +//// [/types.ts] +export { }; +//// [/foo.js] diff --git a/crates/swc/tests/tsc-references/importTag7.1.normal.js b/crates/swc/tests/tsc-references/importTag7.1.normal.js new file mode 100644 index 000000000000..b37333799c57 --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag7.1.normal.js @@ -0,0 +1,12 @@ +//// [importTag7.ts] +//// [/types.ts] +export { }; +//// [/foo.js] +/** + * @import { + * A, + * B } from "./types" + */ /** + * @param { A } a + * @param { B } b + */ function f(a, b) {} diff --git a/crates/swc/tests/tsc-references/importTag7.2.minified.js b/crates/swc/tests/tsc-references/importTag7.2.minified.js new file mode 100644 index 000000000000..4a737048d4d1 --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag7.2.minified.js @@ -0,0 +1,4 @@ +//// [importTag7.ts] +//// [/types.ts] +export { }; +//// [/foo.js] diff --git a/crates/swc/tests/tsc-references/importTag8.1.normal.js b/crates/swc/tests/tsc-references/importTag8.1.normal.js new file mode 100644 index 000000000000..cc2cbf77b453 --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag8.1.normal.js @@ -0,0 +1,12 @@ +//// [importTag8.ts] +//// [/types.ts] +export { }; +//// [/foo.js] +/** + * @import + * { A, B } + * from "./types" + */ /** + * @param { A } a + * @param { B } b + */ function f(a, b) {} diff --git a/crates/swc/tests/tsc-references/importTag8.2.minified.js b/crates/swc/tests/tsc-references/importTag8.2.minified.js new file mode 100644 index 000000000000..e87362f00c9f --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag8.2.minified.js @@ -0,0 +1,4 @@ +//// [importTag8.ts] +//// [/types.ts] +export { }; +//// [/foo.js] diff --git a/crates/swc/tests/tsc-references/importTag9.1.normal.js b/crates/swc/tests/tsc-references/importTag9.1.normal.js new file mode 100644 index 000000000000..ee0d5b816f56 --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag9.1.normal.js @@ -0,0 +1,12 @@ +//// [importTag9.ts] +//// [/types.ts] +export { }; +//// [/foo.js] +/** + * @import + * * as types + * from "./types" + */ /** + * @param { types.A } a + * @param { types.B } b + */ function f(a, b) {} diff --git a/crates/swc/tests/tsc-references/importTag9.2.minified.js b/crates/swc/tests/tsc-references/importTag9.2.minified.js new file mode 100644 index 000000000000..0f7f96782606 --- /dev/null +++ b/crates/swc/tests/tsc-references/importTag9.2.minified.js @@ -0,0 +1,4 @@ +//// [importTag9.ts] +//// [/types.ts] +export { }; +//// [/foo.js] diff --git a/crates/swc/tests/tsc-references/instanceofOperatorWithRHSHasSymbolHasInstance.1.normal.js b/crates/swc/tests/tsc-references/instanceofOperatorWithRHSHasSymbolHasInstance.1.normal.js index 5e2ed17ea24a..3bcd60e9060a 100644 --- a/crates/swc/tests/tsc-references/instanceofOperatorWithRHSHasSymbolHasInstance.1.normal.js +++ b/crates/swc/tests/tsc-references/instanceofOperatorWithRHSHasSymbolHasInstance.1.normal.js @@ -63,3 +63,5 @@ if (obj instanceof A) { if (obj instanceof B) { obj; // B } +lhs0 instanceof rhs14 && lhs0; +lhs0 instanceof rhs15 && lhs0; diff --git a/crates/swc/tests/tsc-references/instanceofOperatorWithRHSHasSymbolHasInstance.2.minified.js b/crates/swc/tests/tsc-references/instanceofOperatorWithRHSHasSymbolHasInstance.2.minified.js index 1bb1e9c2d019..003bae624f97 100644 --- a/crates/swc/tests/tsc-references/instanceofOperatorWithRHSHasSymbolHasInstance.2.minified.js +++ b/crates/swc/tests/tsc-references/instanceofOperatorWithRHSHasSymbolHasInstance.2.minified.js @@ -1,2 +1,2 @@ //// [instanceofOperatorWithRHSHasSymbolHasInstance.ts] -lhs0 instanceof rhs0 && lhs0, lhs0 instanceof rhs1 && lhs0, lhs0 instanceof rhs2 && lhs0, lhs0 instanceof rhs3 && lhs0, lhs0 instanceof rhs4 && lhs0, lhs0 instanceof rhs5 && lhs0, lhs0 instanceof rhs6 && lhs0, lhs0 instanceof Rhs7 && lhs0, lhs0 instanceof Rhs8 && lhs0, lhs0 instanceof Rhs9 && lhs0, lhs0 instanceof Rhs10 && lhs0, lhs0 instanceof Rhs11 && lhs0, lhs0 instanceof Rhs12 && lhs0, lhs0 instanceof Rhs13 && lhs0, lhs1 instanceof rhs0 && lhs1, lhs1 instanceof rhs1 && lhs1, lhs1 instanceof rhs2 && lhs1, lhs1 instanceof Rhs7 && lhs1, lhs1 instanceof Rhs8 && lhs1, lhs1 instanceof Rhs9 && lhs1, lhs2 instanceof rhs0 && lhs2, lhs2 instanceof rhs1 && lhs2, lhs2 instanceof rhs2 && lhs2, lhs2 instanceof rhs3 && lhs2, lhs2 instanceof rhs4 && lhs2, lhs2 instanceof rhs5 && lhs2, lhs2 instanceof Rhs7 && lhs2, lhs2 instanceof Rhs8 && lhs2, lhs2 instanceof Rhs9 && lhs2, lhs2 instanceof Rhs10 && lhs2, lhs2 instanceof Rhs11 && lhs2, lhs2 instanceof Rhs12 && lhs2, lhs3 instanceof rhs0 && lhs3, lhs3 instanceof rhs1 && lhs3, lhs3 instanceof rhs2 && lhs3, lhs3 instanceof rhs3 && lhs3, lhs3 instanceof rhs4 && lhs3, lhs3 instanceof rhs5 && lhs3, lhs3 instanceof rhs6 && lhs3, lhs3 instanceof Rhs7 && lhs3, lhs3 instanceof Rhs8 && lhs3, lhs3 instanceof Rhs9 && lhs3, lhs3 instanceof Rhs10 && lhs3, lhs3 instanceof Rhs11 && lhs3, lhs3 instanceof Rhs12 && lhs3, lhs3 instanceof Rhs13 && lhs3, lhs4 instanceof rhs0 && lhs4, lhs4 instanceof rhs1 && lhs4, lhs4 instanceof rhs2 && lhs4, lhs4 instanceof rhs3 && lhs4, lhs4 instanceof rhs4 && lhs4, lhs4 instanceof rhs5 && lhs4, lhs4 instanceof Rhs7 && lhs4, lhs4 instanceof Rhs8 && lhs4, lhs4 instanceof Rhs9 && lhs4, lhs4 instanceof Rhs10 && lhs4, lhs4 instanceof Rhs11 && lhs4, lhs4 instanceof Rhs12 && lhs4, obj instanceof A && obj, obj instanceof B && obj; +lhs0 instanceof rhs0 && lhs0, lhs0 instanceof rhs1 && lhs0, lhs0 instanceof rhs2 && lhs0, lhs0 instanceof rhs3 && lhs0, lhs0 instanceof rhs4 && lhs0, lhs0 instanceof rhs5 && lhs0, lhs0 instanceof rhs6 && lhs0, lhs0 instanceof Rhs7 && lhs0, lhs0 instanceof Rhs8 && lhs0, lhs0 instanceof Rhs9 && lhs0, lhs0 instanceof Rhs10 && lhs0, lhs0 instanceof Rhs11 && lhs0, lhs0 instanceof Rhs12 && lhs0, lhs0 instanceof Rhs13 && lhs0, lhs1 instanceof rhs0 && lhs1, lhs1 instanceof rhs1 && lhs1, lhs1 instanceof rhs2 && lhs1, lhs1 instanceof Rhs7 && lhs1, lhs1 instanceof Rhs8 && lhs1, lhs1 instanceof Rhs9 && lhs1, lhs2 instanceof rhs0 && lhs2, lhs2 instanceof rhs1 && lhs2, lhs2 instanceof rhs2 && lhs2, lhs2 instanceof rhs3 && lhs2, lhs2 instanceof rhs4 && lhs2, lhs2 instanceof rhs5 && lhs2, lhs2 instanceof Rhs7 && lhs2, lhs2 instanceof Rhs8 && lhs2, lhs2 instanceof Rhs9 && lhs2, lhs2 instanceof Rhs10 && lhs2, lhs2 instanceof Rhs11 && lhs2, lhs2 instanceof Rhs12 && lhs2, lhs3 instanceof rhs0 && lhs3, lhs3 instanceof rhs1 && lhs3, lhs3 instanceof rhs2 && lhs3, lhs3 instanceof rhs3 && lhs3, lhs3 instanceof rhs4 && lhs3, lhs3 instanceof rhs5 && lhs3, lhs3 instanceof rhs6 && lhs3, lhs3 instanceof Rhs7 && lhs3, lhs3 instanceof Rhs8 && lhs3, lhs3 instanceof Rhs9 && lhs3, lhs3 instanceof Rhs10 && lhs3, lhs3 instanceof Rhs11 && lhs3, lhs3 instanceof Rhs12 && lhs3, lhs3 instanceof Rhs13 && lhs3, lhs4 instanceof rhs0 && lhs4, lhs4 instanceof rhs1 && lhs4, lhs4 instanceof rhs2 && lhs4, lhs4 instanceof rhs3 && lhs4, lhs4 instanceof rhs4 && lhs4, lhs4 instanceof rhs5 && lhs4, lhs4 instanceof Rhs7 && lhs4, lhs4 instanceof Rhs8 && lhs4, lhs4 instanceof Rhs9 && lhs4, lhs4 instanceof Rhs10 && lhs4, lhs4 instanceof Rhs11 && lhs4, lhs4 instanceof Rhs12 && lhs4, obj instanceof A && obj, obj instanceof B && obj, lhs0 instanceof rhs14 && lhs0, lhs0 instanceof rhs15 && lhs0; diff --git a/crates/swc/tests/tsc-references/intlDateTimeFormatRangeES2021.1.normal.js b/crates/swc/tests/tsc-references/intlDateTimeFormatRangeES2021.1.normal.js new file mode 100644 index 000000000000..6122cf5ca14e --- /dev/null +++ b/crates/swc/tests/tsc-references/intlDateTimeFormatRangeES2021.1.normal.js @@ -0,0 +1,4 @@ +//// [intlDateTimeFormatRangeES2021.ts] +import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array"; +new Intl.DateTimeFormat().formatRange(new Date(0), new Date()); +var _formatRangeToParts = _sliced_to_array(new Intl.DateTimeFormat().formatRangeToParts(1000, 1000000000), 1), part = _formatRangeToParts[0]; diff --git a/crates/swc/tests/tsc-references/intlDateTimeFormatRangeES2021.2.minified.js b/crates/swc/tests/tsc-references/intlDateTimeFormatRangeES2021.2.minified.js new file mode 100644 index 000000000000..ec0b809c3998 --- /dev/null +++ b/crates/swc/tests/tsc-references/intlDateTimeFormatRangeES2021.2.minified.js @@ -0,0 +1,3 @@ +//// [intlDateTimeFormatRangeES2021.ts] +import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array"; +new Intl.DateTimeFormat().formatRange(new Date(0), new Date()), _sliced_to_array(new Intl.DateTimeFormat().formatRangeToParts(1000, 1000000000), 1)[0]; diff --git a/crates/swc/tests/tsc-references/intlNumberFormatES2020.1.normal.js b/crates/swc/tests/tsc-references/intlNumberFormatES2020.1.normal.js new file mode 100644 index 000000000000..a0efb6a2d818 --- /dev/null +++ b/crates/swc/tests/tsc-references/intlNumberFormatES2020.1.normal.js @@ -0,0 +1,36 @@ +//// [intlNumberFormatES2020.ts] +// New/updated resolved options in ES2020 +const { notation, style, signDisplay } = new Intl.NumberFormat('en-NZ').resolvedOptions(); +// Empty options +new Intl.NumberFormat('en-NZ', {}); +// Override numbering system +new Intl.NumberFormat('en-NZ', { + numberingSystem: 'arab' +}); +// Currency +const { currency, currencySign } = new Intl.NumberFormat('en-NZ', { + style: 'currency', + currency: 'NZD', + currencySign: 'accounting' +}).resolvedOptions(); +// Units +const { unit, unitDisplay } = new Intl.NumberFormat('en-NZ', { + style: 'unit', + unit: 'kilogram', + unitDisplay: 'narrow' +}).resolvedOptions(); +// Compact +const { compactDisplay } = new Intl.NumberFormat('en-NZ', { + notation: 'compact', + compactDisplay: 'long' +}).resolvedOptions(); +// Sign display +new Intl.NumberFormat('en-NZ', { + signDisplay: 'always' +}); +// New additions to NumberFormatPartTypes +const types = [ + 'compact', + 'unit', + 'unknown' +]; diff --git a/crates/swc/tests/tsc-references/intlNumberFormatES2020.2.minified.js b/crates/swc/tests/tsc-references/intlNumberFormatES2020.2.minified.js new file mode 100644 index 000000000000..603a129016bb --- /dev/null +++ b/crates/swc/tests/tsc-references/intlNumberFormatES2020.2.minified.js @@ -0,0 +1,20 @@ +//// [intlNumberFormatES2020.ts] +const { notation, style, signDisplay } = new Intl.NumberFormat('en-NZ').resolvedOptions(); +new Intl.NumberFormat('en-NZ', {}), new Intl.NumberFormat('en-NZ', { + numberingSystem: 'arab' +}); +const { currency, currencySign } = new Intl.NumberFormat('en-NZ', { + style: 'currency', + currency: 'NZD', + currencySign: 'accounting' +}).resolvedOptions(), { unit, unitDisplay } = new Intl.NumberFormat('en-NZ', { + style: 'unit', + unit: 'kilogram', + unitDisplay: 'narrow' +}).resolvedOptions(), { compactDisplay } = new Intl.NumberFormat('en-NZ', { + notation: 'compact', + compactDisplay: 'long' +}).resolvedOptions(); +new Intl.NumberFormat('en-NZ', { + signDisplay: 'always' +}); diff --git a/crates/swc/tests/tsc-references/intlNumberFormatES2023.1.normal.js b/crates/swc/tests/tsc-references/intlNumberFormatES2023.1.normal.js new file mode 100644 index 000000000000..61f5ecb37790 --- /dev/null +++ b/crates/swc/tests/tsc-references/intlNumberFormatES2023.1.normal.js @@ -0,0 +1,37 @@ +//// [intlNumberFormatES2023.ts] +// New / updated resolved options in ES2023, including type change for useGrouping +const { roundingPriority, roundingMode, roundingIncrement, trailingZeroDisplay, useGrouping } = new Intl.NumberFormat('en-GB').resolvedOptions(); +// Empty options +new Intl.NumberFormat('en-GB', {}); +// Rounding +new Intl.NumberFormat('en-GB', { + roundingPriority: 'lessPrecision', + roundingIncrement: 100, + roundingMode: 'trunc' +}); +// Changes to signDisplay +const { signDisplay } = new Intl.NumberFormat('en-GB', { + signDisplay: 'negative' +}).resolvedOptions(); +// Changes to useGrouping +new Intl.NumberFormat('en-GB', { + useGrouping: true +}); +new Intl.NumberFormat('en-GB', { + useGrouping: 'true' +}); +new Intl.NumberFormat('en-GB', { + useGrouping: 'always' +}); +// formatRange +new Intl.NumberFormat('en-GB').formatRange(10, 100); +new Intl.NumberFormat('en-GB').formatRange(10n, 1000n); +new Intl.NumberFormat('en-GB').formatRangeToParts(10, 1000)[0]; +new Intl.NumberFormat('en-GB').formatRangeToParts(10n, 1000n)[0]; +// Arbitrary-precision string arguments +new Intl.NumberFormat('en-GB').format('-12.3E-4'); +new Intl.NumberFormat('en-GB').formatRange('123.4', '567.8'); +new Intl.NumberFormat('en-GB').formatRangeToParts('123E-4', '567E8'); +new Intl.NumberFormat('en-GB').format('Infinity'); +new Intl.NumberFormat('en-GB').format('-Infinity'); +new Intl.NumberFormat('en-GB').format('+Infinity'); diff --git a/crates/swc/tests/tsc-references/intlNumberFormatES2023.2.minified.js b/crates/swc/tests/tsc-references/intlNumberFormatES2023.2.minified.js new file mode 100644 index 000000000000..7020deaaa3c3 --- /dev/null +++ b/crates/swc/tests/tsc-references/intlNumberFormatES2023.2.minified.js @@ -0,0 +1,17 @@ +//// [intlNumberFormatES2023.ts] +const { roundingPriority, roundingMode, roundingIncrement, trailingZeroDisplay, useGrouping } = new Intl.NumberFormat('en-GB').resolvedOptions(); +new Intl.NumberFormat('en-GB', {}), new Intl.NumberFormat('en-GB', { + roundingPriority: 'lessPrecision', + roundingIncrement: 100, + roundingMode: 'trunc' +}); +const { signDisplay } = new Intl.NumberFormat('en-GB', { + signDisplay: 'negative' +}).resolvedOptions(); +new Intl.NumberFormat('en-GB', { + useGrouping: !0 +}), new Intl.NumberFormat('en-GB', { + useGrouping: 'true' +}), new Intl.NumberFormat('en-GB', { + useGrouping: 'always' +}), new Intl.NumberFormat('en-GB').formatRange(10, 100), new Intl.NumberFormat('en-GB').formatRange(10n, 1000n), new Intl.NumberFormat('en-GB').formatRangeToParts(10, 1000)[0], new Intl.NumberFormat('en-GB').formatRangeToParts(10n, 1000n)[0], new Intl.NumberFormat('en-GB').format('-12.3E-4'), new Intl.NumberFormat('en-GB').formatRange('123.4', '567.8'), new Intl.NumberFormat('en-GB').formatRangeToParts('123E-4', '567E8'), new Intl.NumberFormat('en-GB').format('Infinity'), new Intl.NumberFormat('en-GB').format('-Infinity'), new Intl.NumberFormat('en-GB').format('+Infinity'); diff --git a/crates/swc/tests/tsc-references/intlNumberFormatES5UseGrouping.1.normal.js b/crates/swc/tests/tsc-references/intlNumberFormatES5UseGrouping.1.normal.js new file mode 100644 index 000000000000..97294df9f709 --- /dev/null +++ b/crates/swc/tests/tsc-references/intlNumberFormatES5UseGrouping.1.normal.js @@ -0,0 +1,11 @@ +//// [intlNumberFormatES5UseGrouping.ts] +new Intl.NumberFormat("en-GB", { + useGrouping: true +}); +new Intl.NumberFormat("en-GB", { + useGrouping: "true" +}); // expect error +new Intl.NumberFormat("en-GB", { + useGrouping: "always" +}); // expect error +var useGrouping = new Intl.NumberFormat("en-GB").resolvedOptions().useGrouping; diff --git a/crates/swc/tests/tsc-references/intlNumberFormatES5UseGrouping.2.minified.js b/crates/swc/tests/tsc-references/intlNumberFormatES5UseGrouping.2.minified.js new file mode 100644 index 000000000000..db0f4a2441e4 --- /dev/null +++ b/crates/swc/tests/tsc-references/intlNumberFormatES5UseGrouping.2.minified.js @@ -0,0 +1,8 @@ +//// [intlNumberFormatES5UseGrouping.ts] +new Intl.NumberFormat("en-GB", { + useGrouping: !0 +}), new Intl.NumberFormat("en-GB", { + useGrouping: "true" +}), new Intl.NumberFormat("en-GB", { + useGrouping: "always" +}), new Intl.NumberFormat("en-GB").resolvedOptions().useGrouping; diff --git a/crates/swc/tests/tsc-references/libReferenceDeclarationEmit.1.normal.js b/crates/swc/tests/tsc-references/libReferenceDeclarationEmit.1.normal.js index a6e719a8a2c9..25d23d45f6b1 100644 --- a/crates/swc/tests/tsc-references/libReferenceDeclarationEmit.1.normal.js +++ b/crates/swc/tests/tsc-references/libReferenceDeclarationEmit.1.normal.js @@ -1,11 +1,11 @@ //// [file1.ts] -/// +/// "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //// [file2.ts] -/// +/// "use strict"; Object.defineProperty(exports, "__esModule", { value: true diff --git a/crates/swc/tests/tsc-references/libReferenceDeclarationEmitBundle.1.normal.js b/crates/swc/tests/tsc-references/libReferenceDeclarationEmitBundle.1.normal.js index 7b256d853251..d5b8c7c2721a 100644 --- a/crates/swc/tests/tsc-references/libReferenceDeclarationEmitBundle.1.normal.js +++ b/crates/swc/tests/tsc-references/libReferenceDeclarationEmitBundle.1.normal.js @@ -1,5 +1,5 @@ //// [file1.ts] -/// +/// define([ "require", "exports" @@ -10,7 +10,7 @@ define([ }); }); //// [file2.ts] -/// +/// define([ "require", "exports" diff --git a/crates/swc/tests/tsc-references/mappedTypesGenericTuples2.1.normal.js b/crates/swc/tests/tsc-references/mappedTypesGenericTuples2.1.normal.js new file mode 100644 index 000000000000..0c068df05270 --- /dev/null +++ b/crates/swc/tests/tsc-references/mappedTypesGenericTuples2.1.normal.js @@ -0,0 +1,10 @@ +//// [mappedTypesGenericTuples2.ts] +// https://github.com/microsoft/TypeScript/issues/57389 +import { _ as _to_consumable_array } from "@swc/helpers/_/_to_consumable_array"; +Promise.all([ + getT() +].concat(_to_consumable_array(getT()))).then(function(result) { + var head = result[0]; // string + var tail = result.slice(1); // any[] + tail; // ok +}); diff --git a/crates/swc/tests/tsc-references/mappedTypesGenericTuples2.2.minified.js b/crates/swc/tests/tsc-references/mappedTypesGenericTuples2.2.minified.js new file mode 100644 index 000000000000..047f69d219db --- /dev/null +++ b/crates/swc/tests/tsc-references/mappedTypesGenericTuples2.2.minified.js @@ -0,0 +1,7 @@ +//// [mappedTypesGenericTuples2.ts] +import { _ as _to_consumable_array } from "@swc/helpers/_/_to_consumable_array"; +Promise.all([ + getT() +].concat(_to_consumable_array(getT()))).then(function(result) { + result[0], result.slice(1); +}); diff --git a/crates/swc/tests/tsc-references/parser.numericSeparators.decimal(target=es2020).1.normal.js b/crates/swc/tests/tsc-references/parser.numericSeparators.decimal(target=es2020).1.normal.js new file mode 100644 index 000000000000..59c6429aea79 --- /dev/null +++ b/crates/swc/tests/tsc-references/parser.numericSeparators.decimal(target=es2020).1.normal.js @@ -0,0 +1,15 @@ +//// [parser.numericSeparators.decimal.ts] +1000000000; +1.10001; +1e10; +1e+10; +1e-10; +1.1e100; +1.1e+100; +1.1e-100; +123456; +122333; +12.34; +12.34e56; +12.34e+56; +12.34e-56; diff --git a/crates/swc/tests/tsc-references/parser.numericSeparators.decimal(target=es2020).2.minified.js b/crates/swc/tests/tsc-references/parser.numericSeparators.decimal(target=es2020).2.minified.js new file mode 100644 index 000000000000..47f5aa77bef2 --- /dev/null +++ b/crates/swc/tests/tsc-references/parser.numericSeparators.decimal(target=es2020).2.minified.js @@ -0,0 +1 @@ +//// [parser.numericSeparators.decimal.ts] diff --git a/crates/swc/tests/tsc-references/parser.numericSeparators.decimal(target=es2021).1.normal.js b/crates/swc/tests/tsc-references/parser.numericSeparators.decimal(target=es2021).1.normal.js new file mode 100644 index 000000000000..971089834e3f --- /dev/null +++ b/crates/swc/tests/tsc-references/parser.numericSeparators.decimal(target=es2021).1.normal.js @@ -0,0 +1,15 @@ +//// [parser.numericSeparators.decimal.ts] +1_000_000_000; +1.1_00_01; +1e1_0; +1e+1_0; +1e-1_0; +1.1e10_0; +1.1e+10_0; +1.1e-10_0; +12_34_56; +1_22_333; +1_2.3_4; +1_2.3_4e5_6; +1_2.3_4e+5_6; +1_2.3_4e-5_6; diff --git a/crates/swc/tests/tsc-references/parser.numericSeparators.decimal(target=es2021).2.minified.js b/crates/swc/tests/tsc-references/parser.numericSeparators.decimal(target=es2021).2.minified.js new file mode 100644 index 000000000000..47f5aa77bef2 --- /dev/null +++ b/crates/swc/tests/tsc-references/parser.numericSeparators.decimal(target=es2021).2.minified.js @@ -0,0 +1 @@ +//// [parser.numericSeparators.decimal.ts] diff --git a/crates/swc/tests/tsc-references/parser.numericSeparators.decimal(target=es5).1.normal.js b/crates/swc/tests/tsc-references/parser.numericSeparators.decimal(target=es5).1.normal.js new file mode 100644 index 000000000000..59c6429aea79 --- /dev/null +++ b/crates/swc/tests/tsc-references/parser.numericSeparators.decimal(target=es5).1.normal.js @@ -0,0 +1,15 @@ +//// [parser.numericSeparators.decimal.ts] +1000000000; +1.10001; +1e10; +1e+10; +1e-10; +1.1e100; +1.1e+100; +1.1e-100; +123456; +122333; +12.34; +12.34e56; +12.34e+56; +12.34e-56; diff --git a/crates/swc/tests/tsc-references/parser.numericSeparators.decimal(target=es5).2.minified.js b/crates/swc/tests/tsc-references/parser.numericSeparators.decimal(target=es5).2.minified.js new file mode 100644 index 000000000000..47f5aa77bef2 --- /dev/null +++ b/crates/swc/tests/tsc-references/parser.numericSeparators.decimal(target=es5).2.minified.js @@ -0,0 +1 @@ +//// [parser.numericSeparators.decimal.ts] diff --git a/crates/swc/tests/tsc-references/parserArrowFunctionExpression10.1.normal.js b/crates/swc/tests/tsc-references/parserArrowFunctionExpression10.1.normal.js new file mode 100644 index 000000000000..9120f0eeaa5e --- /dev/null +++ b/crates/swc/tests/tsc-references/parserArrowFunctionExpression10.1.normal.js @@ -0,0 +1,7 @@ +//// [parserArrowFunctionExpression10.ts] +//// [fileJs.js] +a ? (b)=>d : (e)=>f // Not legal JS; "Unexpected token ':'" at last colon + // Not legal JS; "Unexpected token ':'" at last colon +; +//// [fileTs.ts] +a ? (b)=>d : (e)=>f; diff --git a/crates/swc/tests/tsc-references/parserArrowFunctionExpression10.2.minified.js b/crates/swc/tests/tsc-references/parserArrowFunctionExpression10.2.minified.js new file mode 100644 index 000000000000..55a0a8c14a76 --- /dev/null +++ b/crates/swc/tests/tsc-references/parserArrowFunctionExpression10.2.minified.js @@ -0,0 +1,5 @@ +//// [parserArrowFunctionExpression10.ts] +//// [fileJs.js] +a || ((e)=>f); +//// [fileTs.ts] +a || ((e)=>f); diff --git a/crates/swc/tests/tsc-references/parserArrowFunctionExpression11.1.normal.js b/crates/swc/tests/tsc-references/parserArrowFunctionExpression11.1.normal.js new file mode 100644 index 000000000000..630a2b0eaf29 --- /dev/null +++ b/crates/swc/tests/tsc-references/parserArrowFunctionExpression11.1.normal.js @@ -0,0 +1,16 @@ +//// [parserArrowFunctionExpression11.ts] +//// [fileJs.js] +//! +//! x Expected ':', got '' +//! ,-[1:1] +//! 1 | a ? b ? c : (d) : e => f // Legal JS +//! : ^ +//! 2 | +//! `---- +//// [fileTs.ts] +//! +//! x Expected ':', got '' +//! ,---- +//! 1 | a ? b ? c : (d) : e => f +//! : ^ +//! `---- diff --git a/crates/swc/tests/tsc-references/parserArrowFunctionExpression11.2.minified.js b/crates/swc/tests/tsc-references/parserArrowFunctionExpression11.2.minified.js new file mode 100644 index 000000000000..630a2b0eaf29 --- /dev/null +++ b/crates/swc/tests/tsc-references/parserArrowFunctionExpression11.2.minified.js @@ -0,0 +1,16 @@ +//// [parserArrowFunctionExpression11.ts] +//// [fileJs.js] +//! +//! x Expected ':', got '' +//! ,-[1:1] +//! 1 | a ? b ? c : (d) : e => f // Legal JS +//! : ^ +//! 2 | +//! `---- +//// [fileTs.ts] +//! +//! x Expected ':', got '' +//! ,---- +//! 1 | a ? b ? c : (d) : e => f +//! : ^ +//! `---- diff --git a/crates/swc/tests/tsc-references/parserArrowFunctionExpression12.1.normal.js b/crates/swc/tests/tsc-references/parserArrowFunctionExpression12.1.normal.js new file mode 100644 index 000000000000..3e44c07136ab --- /dev/null +++ b/crates/swc/tests/tsc-references/parserArrowFunctionExpression12.1.normal.js @@ -0,0 +1,7 @@ +//// [parserArrowFunctionExpression12.ts] +//// [fileJs.js] +a ? (b)=>c : (d)=>e // Legal JS + // Legal JS +; +//// [fileTs.ts] +a ? (b)=>c : (d)=>e; diff --git a/crates/swc/tests/tsc-references/parserArrowFunctionExpression12.2.minified.js b/crates/swc/tests/tsc-references/parserArrowFunctionExpression12.2.minified.js new file mode 100644 index 000000000000..3db81a70b451 --- /dev/null +++ b/crates/swc/tests/tsc-references/parserArrowFunctionExpression12.2.minified.js @@ -0,0 +1,5 @@ +//// [parserArrowFunctionExpression12.ts] +//// [fileJs.js] +a || ((d)=>e); +//// [fileTs.ts] +a || ((d)=>e); diff --git a/crates/swc/tests/tsc-references/parserArrowFunctionExpression13.1.normal.js b/crates/swc/tests/tsc-references/parserArrowFunctionExpression13.1.normal.js new file mode 100644 index 000000000000..66c4ed550982 --- /dev/null +++ b/crates/swc/tests/tsc-references/parserArrowFunctionExpression13.1.normal.js @@ -0,0 +1,5 @@ +//// [parserArrowFunctionExpression13.ts] +//// [fileJs.js] +a ? ()=>a() : ()=>null; // Not legal JS; "Unexpected token ')'" at last paren +//// [fileTs.ts] +a ? ()=>a() : ()=>null; diff --git a/crates/swc/tests/tsc-references/parserArrowFunctionExpression13.2.minified.js b/crates/swc/tests/tsc-references/parserArrowFunctionExpression13.2.minified.js new file mode 100644 index 000000000000..1d5876994726 --- /dev/null +++ b/crates/swc/tests/tsc-references/parserArrowFunctionExpression13.2.minified.js @@ -0,0 +1,5 @@ +//// [parserArrowFunctionExpression13.ts] +//// [fileJs.js] +a || (()=>null); +//// [fileTs.ts] +a || (()=>null); diff --git a/crates/swc/tests/tsc-references/parserArrowFunctionExpression14.1.normal.js b/crates/swc/tests/tsc-references/parserArrowFunctionExpression14.1.normal.js new file mode 100644 index 000000000000..c790b5016466 --- /dev/null +++ b/crates/swc/tests/tsc-references/parserArrowFunctionExpression14.1.normal.js @@ -0,0 +1,5 @@ +//// [parserArrowFunctionExpression14.ts] +//// [fileJs.js] +a() ? (b, c)=>d() : e; // Not legal JS; "Unexpected token ':'" at first colon +//// [fileTs.ts] +a() ? (b, c)=>d() : e; diff --git a/crates/swc/tests/tsc-references/parserArrowFunctionExpression14.2.minified.js b/crates/swc/tests/tsc-references/parserArrowFunctionExpression14.2.minified.js new file mode 100644 index 000000000000..a5ac086615ea --- /dev/null +++ b/crates/swc/tests/tsc-references/parserArrowFunctionExpression14.2.minified.js @@ -0,0 +1,5 @@ +//// [parserArrowFunctionExpression14.ts] +//// [fileJs.js] +a() || e; +//// [fileTs.ts] +a() || e; diff --git a/crates/swc/tests/tsc-references/parserArrowFunctionExpression15.1.normal.js b/crates/swc/tests/tsc-references/parserArrowFunctionExpression15.1.normal.js new file mode 100644 index 000000000000..ff216a6d741b --- /dev/null +++ b/crates/swc/tests/tsc-references/parserArrowFunctionExpression15.1.normal.js @@ -0,0 +1,6 @@ +//// [parserArrowFunctionExpression15.ts] +//// [fileJs.js] +false ? (param)=>param : null // Not legal JS; "Unexpected token ':'" at last colon +; +//// [fileTs.ts] +false ? (param)=>param : null; diff --git a/crates/swc/tests/tsc-references/parserArrowFunctionExpression15.2.minified.js b/crates/swc/tests/tsc-references/parserArrowFunctionExpression15.2.minified.js new file mode 100644 index 000000000000..1e82829ffcae --- /dev/null +++ b/crates/swc/tests/tsc-references/parserArrowFunctionExpression15.2.minified.js @@ -0,0 +1,3 @@ +//// [parserArrowFunctionExpression15.ts] +//// [fileJs.js] +//// [fileTs.ts] diff --git a/crates/swc/tests/tsc-references/parserArrowFunctionExpression16.1.normal.js b/crates/swc/tests/tsc-references/parserArrowFunctionExpression16.1.normal.js new file mode 100644 index 000000000000..b8e84a8b22dc --- /dev/null +++ b/crates/swc/tests/tsc-references/parserArrowFunctionExpression16.1.normal.js @@ -0,0 +1,6 @@ +//// [parserArrowFunctionExpression16.ts] +//// [fileJs.js] +true ? false ? (param)=>param : null : null // Not legal JS; "Unexpected token ':'" at last colon +; +//// [fileTs.ts] +true ? false ? (param)=>param : null : null; diff --git a/crates/swc/tests/tsc-references/parserArrowFunctionExpression16.2.minified.js b/crates/swc/tests/tsc-references/parserArrowFunctionExpression16.2.minified.js new file mode 100644 index 000000000000..8de23efa2a3c --- /dev/null +++ b/crates/swc/tests/tsc-references/parserArrowFunctionExpression16.2.minified.js @@ -0,0 +1,3 @@ +//// [parserArrowFunctionExpression16.ts] +//// [fileJs.js] +//// [fileTs.ts] diff --git a/crates/swc/tests/tsc-references/parserArrowFunctionExpression17.1.normal.js b/crates/swc/tests/tsc-references/parserArrowFunctionExpression17.1.normal.js new file mode 100644 index 000000000000..d5d624018e29 --- /dev/null +++ b/crates/swc/tests/tsc-references/parserArrowFunctionExpression17.1.normal.js @@ -0,0 +1,6 @@ +//// [parserArrowFunctionExpression17.ts] +//// [fileJs.js] +a ? b : (c)=>e // Not legal JS; "Unexpected token ':'" at last colon +; +//// [fileTs.ts] +a ? b : (c)=>e; diff --git a/crates/swc/tests/tsc-references/parserArrowFunctionExpression17.2.minified.js b/crates/swc/tests/tsc-references/parserArrowFunctionExpression17.2.minified.js new file mode 100644 index 000000000000..877ccd114c47 --- /dev/null +++ b/crates/swc/tests/tsc-references/parserArrowFunctionExpression17.2.minified.js @@ -0,0 +1,5 @@ +//// [parserArrowFunctionExpression17.ts] +//// [fileJs.js] +a && b; +//// [fileTs.ts] +a && b; diff --git a/crates/swc/tests/tsc-references/parserArrowFunctionExpression8.1.normal.js b/crates/swc/tests/tsc-references/parserArrowFunctionExpression8.1.normal.js new file mode 100644 index 000000000000..1830b5928d32 --- /dev/null +++ b/crates/swc/tests/tsc-references/parserArrowFunctionExpression8.1.normal.js @@ -0,0 +1,15 @@ +//// [parserArrowFunctionExpression8.ts] +//// [fileJs.js] +x ? (y)=>({ + y + }) : (z)=>({ + z + } // Legal JS + // Legal JS + ); +//// [fileTs.ts] +x ? (y)=>({ + y + }) : (z)=>({ + z + }); diff --git a/crates/swc/tests/tsc-references/parserArrowFunctionExpression8.2.minified.js b/crates/swc/tests/tsc-references/parserArrowFunctionExpression8.2.minified.js new file mode 100644 index 000000000000..cf6b319eaf18 --- /dev/null +++ b/crates/swc/tests/tsc-references/parserArrowFunctionExpression8.2.minified.js @@ -0,0 +1,9 @@ +//// [parserArrowFunctionExpression8.ts] +//// [fileJs.js] +x || ((z)=>({ + z + })); +//// [fileTs.ts] +x || ((z)=>({ + z + })); diff --git a/crates/swc/tests/tsc-references/parserArrowFunctionExpression9.1.normal.js b/crates/swc/tests/tsc-references/parserArrowFunctionExpression9.1.normal.js new file mode 100644 index 000000000000..922e889b1458 --- /dev/null +++ b/crates/swc/tests/tsc-references/parserArrowFunctionExpression9.1.normal.js @@ -0,0 +1,7 @@ +//// [parserArrowFunctionExpression9.ts] +//// [fileJs.js] +b ? c : (d)=>e // Legal JS + // Legal JS +; +//// [fileTs.ts] +b ? c : (d)=>e; diff --git a/crates/swc/tests/tsc-references/parserArrowFunctionExpression9.2.minified.js b/crates/swc/tests/tsc-references/parserArrowFunctionExpression9.2.minified.js new file mode 100644 index 000000000000..93bd42f0712e --- /dev/null +++ b/crates/swc/tests/tsc-references/parserArrowFunctionExpression9.2.minified.js @@ -0,0 +1,5 @@ +//// [parserArrowFunctionExpression9.ts] +//// [fileJs.js] +b && c; +//// [fileTs.ts] +b && c; diff --git a/crates/swc/tests/tsc-references/privateNameES5Ban.1.normal.js b/crates/swc/tests/tsc-references/privateNameES5Ban.1.normal.js new file mode 100644 index 000000000000..22bf837baaa7 --- /dev/null +++ b/crates/swc/tests/tsc-references/privateNameES5Ban.1.normal.js @@ -0,0 +1,38 @@ +//// [privateNameES5Ban.ts] +import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; +import { _ as _class_private_field_init } from "@swc/helpers/_/_class_private_field_init"; +import { _ as _class_private_field_set } from "@swc/helpers/_/_class_private_field_set"; +import { _ as _class_private_method_init } from "@swc/helpers/_/_class_private_method_init"; +var _field = /*#__PURE__*/ new WeakMap(), _method = /*#__PURE__*/ new WeakSet(), _acc = /*#__PURE__*/ new WeakMap(); +var A = function A() { + "use strict"; + _class_call_check(this, A); + _class_private_method_init(this, _method); + _class_private_field_init(this, _acc, { + get: get_acc, + set: set_acc + }); + _class_private_field_init(this, _field, { + writable: true, + value: void 0 + }); + _class_private_field_set(this, _field, 123); +}; +var _sAcc = { + get: get_sAcc, + set: set_sAcc +}; +var _sField = { + writable: true, + value: "hello world" +}; +function method() {} +function sMethod() {} +function get_acc() { + return ""; +} +function set_acc(x) {} +function get_sAcc() { + return 0; +} +function set_sAcc(x) {} diff --git a/crates/swc/tests/tsc-references/privateNameES5Ban.2.minified.js b/crates/swc/tests/tsc-references/privateNameES5Ban.2.minified.js new file mode 100644 index 000000000000..12f711897b5f --- /dev/null +++ b/crates/swc/tests/tsc-references/privateNameES5Ban.2.minified.js @@ -0,0 +1,5 @@ +//// [privateNameES5Ban.ts] +import "@swc/helpers/_/_class_call_check"; +import "@swc/helpers/_/_class_private_field_init"; +import "@swc/helpers/_/_class_private_field_set"; +import "@swc/helpers/_/_class_private_method_init"; diff --git a/crates/swc/tests/tsc-references/spreadNonObject1.1.normal.js b/crates/swc/tests/tsc-references/spreadNonObject1.1.normal.js new file mode 100644 index 000000000000..25a8eeb414e8 --- /dev/null +++ b/crates/swc/tests/tsc-references/spreadNonObject1.1.normal.js @@ -0,0 +1,13 @@ +//// [spreadNonObject1.ts] +// https://github.com/microsoft/TypeScript/issues/45493 +import { _ as _object_spread } from "@swc/helpers/_/_object_spread"; +import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props"; +var b = { + c: [ + "4" + ].map(function(s) { + var a = _object_spread_props(_object_spread({}, s), { + y: 6 + }); + }) +}; diff --git a/crates/swc/tests/tsc-references/spreadNonObject1.2.minified.js b/crates/swc/tests/tsc-references/spreadNonObject1.2.minified.js new file mode 100644 index 000000000000..6d0ede3a5713 --- /dev/null +++ b/crates/swc/tests/tsc-references/spreadNonObject1.2.minified.js @@ -0,0 +1,10 @@ +//// [spreadNonObject1.ts] +import { _ as _object_spread } from "@swc/helpers/_/_object_spread"; +import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props"; +[ + "4" +].map(function(s) { + _object_spread_props(_object_spread({}, s), { + y: 6 + }); +}); diff --git a/crates/swc/tests/tsc-references/templateLiteralTypes5.1.normal.js b/crates/swc/tests/tsc-references/templateLiteralTypes5.1.normal.js new file mode 100644 index 000000000000..b1ed7654a674 --- /dev/null +++ b/crates/swc/tests/tsc-references/templateLiteralTypes5.1.normal.js @@ -0,0 +1,8 @@ +//// [templateLiteralTypes5.ts] +// https://github.com/microsoft/TypeScript/issues/55364 +const f1 = f; +const f2 = f; +function f3(x) { + const test1 = x; + const test2 = ""; +} diff --git a/crates/swc/tests/tsc-references/templateLiteralTypes5.2.minified.js b/crates/swc/tests/tsc-references/templateLiteralTypes5.2.minified.js new file mode 100644 index 000000000000..51dc93488a5d --- /dev/null +++ b/crates/swc/tests/tsc-references/templateLiteralTypes5.2.minified.js @@ -0,0 +1,2 @@ +//// [templateLiteralTypes5.ts] +f, f; diff --git a/crates/swc/tests/tsc-references/templateLiteralTypes6.1.normal.js b/crates/swc/tests/tsc-references/templateLiteralTypes6.1.normal.js new file mode 100644 index 000000000000..837be90a7c6b --- /dev/null +++ b/crates/swc/tests/tsc-references/templateLiteralTypes6.1.normal.js @@ -0,0 +1,5 @@ +//// [templateLiteralTypes6.ts] +// https://github.com/microsoft/TypeScript/issues/56659 +function f2(scope, event) { + f1(`${scope}:${event}`); +} diff --git a/crates/swc/tests/tsc-references/templateLiteralTypes6.2.minified.js b/crates/swc/tests/tsc-references/templateLiteralTypes6.2.minified.js new file mode 100644 index 000000000000..d1bdf58060c2 --- /dev/null +++ b/crates/swc/tests/tsc-references/templateLiteralTypes6.2.minified.js @@ -0,0 +1 @@ +//// [templateLiteralTypes6.ts] diff --git a/crates/swc/tests/tsc-references/templateLiteralTypes7.1.normal.js b/crates/swc/tests/tsc-references/templateLiteralTypes7.1.normal.js new file mode 100644 index 000000000000..23213ef967db --- /dev/null +++ b/crates/swc/tests/tsc-references/templateLiteralTypes7.1.normal.js @@ -0,0 +1,5 @@ +//// [templateLiteralTypes7.ts] +// https://github.com/microsoft/TypeScript/issues/57807 +const g1 = g; // ok +const g2 = g; // error +const g3 = g; // ok diff --git a/crates/swc/tests/tsc-references/templateLiteralTypes7.2.minified.js b/crates/swc/tests/tsc-references/templateLiteralTypes7.2.minified.js new file mode 100644 index 000000000000..f1f19ee7a0f9 --- /dev/null +++ b/crates/swc/tests/tsc-references/templateLiteralTypes7.2.minified.js @@ -0,0 +1,2 @@ +//// [templateLiteralTypes7.ts] +g, g, g; diff --git a/crates/swc/tests/tsc-references/templateStringMultiline3.1.normal.js b/crates/swc/tests/tsc-references/templateStringMultiline3.1.normal.js index a6dcc059a4cc..c58859469643 100644 --- a/crates/swc/tests/tsc-references/templateStringMultiline3.1.normal.js +++ b/crates/swc/tests/tsc-references/templateStringMultiline3.1.normal.js @@ -1,3 +1,2 @@ //// [templateStringMultiline3.ts] -// newlines are -"\n"; +// newlines are `\` diff --git a/crates/swc_ecma_parser/tests/tsc/1.0lib-noErrors.ts b/crates/swc_ecma_parser/tests/tsc/1.0lib-noErrors.ts index 74f6bd28043e..49d8e03877fb 100644 --- a/crates/swc_ecma_parser/tests/tsc/1.0lib-noErrors.ts +++ b/crates/swc_ecma_parser/tests/tsc/1.0lib-noErrors.ts @@ -661,7 +661,7 @@ interface Date { getMilliseconds(): number; /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */ getUTCMilliseconds(): number; - /** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */ + /** Gets the difference in minutes between Universal Coordinated Time (UTC) and the time on the local computer. */ getTimezoneOffset(): number; /** * Sets the date and time value in the Date object. @@ -1141,4 +1141,4 @@ declare var Array: { (...items: T[]): T[]; isArray(arg: any): boolean; prototype: Array; -} \ No newline at end of file +} \ No newline at end of file diff --git a/crates/swc_ecma_parser/tests/tsc/ES3For-ofTypeCheck1.ts b/crates/swc_ecma_parser/tests/tsc/ES3For-ofTypeCheck1.ts index cf410a8d307b..3a2c2ec82e44 100644 --- a/crates/swc_ecma_parser/tests/tsc/ES3For-ofTypeCheck1.ts +++ b/crates/swc_ecma_parser/tests/tsc/ES3For-ofTypeCheck1.ts @@ -1,2 +1,2 @@ -//@target: ES3 +//@target: ES5 for (var v of "") { } \ No newline at end of file diff --git a/crates/swc_ecma_parser/tests/tsc/ES3For-ofTypeCheck2.ts b/crates/swc_ecma_parser/tests/tsc/ES3For-ofTypeCheck2.ts index 3598e70e92af..cb8563ed4e7f 100644 --- a/crates/swc_ecma_parser/tests/tsc/ES3For-ofTypeCheck2.ts +++ b/crates/swc_ecma_parser/tests/tsc/ES3For-ofTypeCheck2.ts @@ -1,2 +1,2 @@ -//@target: ES3 +//@target: ES5 for (var v of [true]) { } \ No newline at end of file diff --git a/crates/swc_ecma_parser/tests/tsc/ES3For-ofTypeCheck4.ts b/crates/swc_ecma_parser/tests/tsc/ES3For-ofTypeCheck4.ts index 34a55aedc0c1..489216c92623 100644 --- a/crates/swc_ecma_parser/tests/tsc/ES3For-ofTypeCheck4.ts +++ b/crates/swc_ecma_parser/tests/tsc/ES3For-ofTypeCheck4.ts @@ -1,3 +1,3 @@ -//@target: ES3 +//@target: ES5 var union: string | string[]; for (const v of union) { } \ No newline at end of file diff --git a/crates/swc_ecma_parser/tests/tsc/ES3For-ofTypeCheck6.ts b/crates/swc_ecma_parser/tests/tsc/ES3For-ofTypeCheck6.ts index 2d0a4b72dece..9ad18ae02b0e 100644 --- a/crates/swc_ecma_parser/tests/tsc/ES3For-ofTypeCheck6.ts +++ b/crates/swc_ecma_parser/tests/tsc/ES3For-ofTypeCheck6.ts @@ -1,3 +1,3 @@ -//@target: ES3 +//@target: ES5 var union: string[] | number[]; for (var v of union) { } \ No newline at end of file diff --git a/crates/swc_ecma_parser/tests/tsc/accessorWithES3.json b/crates/swc_ecma_parser/tests/tsc/accessorWithES3.json deleted file mode 100644 index 46ab643a6282..000000000000 --- a/crates/swc_ecma_parser/tests/tsc/accessorWithES3.json +++ /dev/null @@ -1,367 +0,0 @@ -{ - "type": "Script", - "span": { - "start": 57, - "end": 208, - "ctxt": 0 - }, - "body": [ - { - "type": "ClassDeclaration", - "identifier": { - "type": "Identifier", - "span": { - "start": 63, - "end": 64, - "ctxt": 0 - }, - "value": "C", - "optional": false - }, - "declare": false, - "span": { - "start": 57, - "end": 106, - "ctxt": 0 - }, - "decorators": [], - "body": [ - { - "type": "ClassMethod", - "span": { - "start": 71, - "end": 104, - "ctxt": 0 - }, - "key": { - "type": "Identifier", - "span": { - "start": 75, - "end": 76, - "ctxt": 0 - }, - "value": "x", - "optional": false - }, - "function": { - "params": [], - "decorators": [], - "span": { - "start": 71, - "end": 104, - "ctxt": 0 - }, - "body": { - "type": "BlockStatement", - "span": { - "start": 79, - "end": 104, - "ctxt": 0 - }, - "stmts": [ - { - "type": "ReturnStatement", - "span": { - "start": 89, - "end": 98, - "ctxt": 0 - }, - "argument": { - "type": "NumericLiteral", - "span": { - "start": 96, - "end": 97, - "ctxt": 0 - }, - "value": 1.0, - "raw": "1" - } - } - ] - }, - "generator": false, - "async": false, - "typeParameters": null, - "returnType": null - }, - "kind": "getter", - "isStatic": false, - "accessibility": null, - "isAbstract": false, - "isOptional": false, - "isOverride": false - } - ], - "superClass": null, - "isAbstract": false, - "typeParams": null, - "superTypeParams": null, - "implements": [] - }, - { - "type": "ClassDeclaration", - "identifier": { - "type": "Identifier", - "span": { - "start": 114, - "end": 115, - "ctxt": 0 - }, - "value": "D", - "optional": false - }, - "declare": false, - "span": { - "start": 108, - "end": 140, - "ctxt": 0 - }, - "decorators": [], - "body": [ - { - "type": "ClassMethod", - "span": { - "start": 122, - "end": 138, - "ctxt": 0 - }, - "key": { - "type": "Identifier", - "span": { - "start": 126, - "end": 127, - "ctxt": 0 - }, - "value": "x", - "optional": false - }, - "function": { - "params": [ - { - "type": "Parameter", - "span": { - "start": 128, - "end": 129, - "ctxt": 0 - }, - "decorators": [], - "pat": { - "type": "Identifier", - "span": { - "start": 128, - "end": 129, - "ctxt": 0 - }, - "value": "v", - "optional": false, - "typeAnnotation": null - } - } - ], - "decorators": [], - "span": { - "start": 122, - "end": 138, - "ctxt": 0 - }, - "body": { - "type": "BlockStatement", - "span": { - "start": 131, - "end": 138, - "ctxt": 0 - }, - "stmts": [] - }, - "generator": false, - "async": false, - "typeParameters": null, - "returnType": null - }, - "kind": "setter", - "isStatic": false, - "accessibility": null, - "isAbstract": false, - "isOptional": false, - "isOverride": false - } - ], - "superClass": null, - "isAbstract": false, - "typeParams": null, - "superTypeParams": null, - "implements": [] - }, - { - "type": "VariableDeclaration", - "span": { - "start": 142, - "end": 178, - "ctxt": 0 - }, - "kind": "var", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 146, - "end": 178, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 146, - "end": 147, - "ctxt": 0 - }, - "value": "x", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "ObjectExpression", - "span": { - "start": 150, - "end": 178, - "ctxt": 0 - }, - "properties": [ - { - "type": "GetterProperty", - "span": { - "start": 156, - "end": 176, - "ctxt": 0 - }, - "key": { - "type": "Identifier", - "span": { - "start": 160, - "end": 161, - "ctxt": 0 - }, - "value": "a", - "optional": false - }, - "typeAnnotation": null, - "body": { - "type": "BlockStatement", - "span": { - "start": 164, - "end": 176, - "ctxt": 0 - }, - "stmts": [ - { - "type": "ReturnStatement", - "span": { - "start": 166, - "end": 174, - "ctxt": 0 - }, - "argument": { - "type": "NumericLiteral", - "span": { - "start": 173, - "end": 174, - "ctxt": 0 - }, - "value": 1.0, - "raw": "1" - } - } - ] - } - } - ] - }, - "definite": false - } - ] - }, - { - "type": "VariableDeclaration", - "span": { - "start": 180, - "end": 208, - "ctxt": 0 - }, - "kind": "var", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 184, - "end": 208, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 184, - "end": 185, - "ctxt": 0 - }, - "value": "y", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "ObjectExpression", - "span": { - "start": 188, - "end": 208, - "ctxt": 0 - }, - "properties": [ - { - "type": "SetterProperty", - "span": { - "start": 194, - "end": 206, - "ctxt": 0 - }, - "key": { - "type": "Identifier", - "span": { - "start": 198, - "end": 199, - "ctxt": 0 - }, - "value": "b", - "optional": false - }, - "thisParam": null, - "param": { - "type": "Identifier", - "span": { - "start": 200, - "end": 201, - "ctxt": 0 - }, - "value": "v", - "optional": false, - "typeAnnotation": null - }, - "body": { - "type": "BlockStatement", - "span": { - "start": 203, - "end": 206, - "ctxt": 0 - }, - "stmts": [] - } - } - ] - }, - "definite": false - } - ] - } - ], - "interpreter": null -} diff --git a/crates/swc_ecma_parser/tests/tsc/accessorWithES3.ts b/crates/swc_ecma_parser/tests/tsc/accessorWithES3.ts deleted file mode 100644 index 69089a004396..000000000000 --- a/crates/swc_ecma_parser/tests/tsc/accessorWithES3.ts +++ /dev/null @@ -1,22 +0,0 @@ -// @target: ES3 - -// error to use accessors in ES3 mode - -class C { - get x() { - return 1; - } -} - -class D { - set x(v) { - } -} - -var x = { - get a() { return 1 } -} - -var y = { - set b(v) { } -} \ No newline at end of file diff --git a/crates/swc_ecma_parser/tests/tsc/ambientAccessors.json b/crates/swc_ecma_parser/tests/tsc/ambientAccessors.json index dd3190a22643..abc802307b4f 100644 --- a/crates/swc_ecma_parser/tests/tsc/ambientAccessors.json +++ b/crates/swc_ecma_parser/tests/tsc/ambientAccessors.json @@ -1,8 +1,8 @@ { "type": "Script", "span": { - "start": 91, - "end": 357, + "start": 86, + "end": 352, "ctxt": 0 }, "body": [ @@ -11,8 +11,8 @@ "identifier": { "type": "Identifier", "span": { - "start": 105, - "end": 106, + "start": 100, + "end": 101, "ctxt": 0 }, "value": "C", @@ -20,8 +20,8 @@ }, "declare": true, "span": { - "start": 91, - "end": 357, + "start": 86, + "end": 352, "ctxt": 0 }, "decorators": [], @@ -29,15 +29,15 @@ { "type": "ClassMethod", "span": { - "start": 113, - "end": 136, + "start": 108, + "end": 131, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 124, - "end": 125, + "start": 119, + "end": 120, "ctxt": 0 }, "value": "a", @@ -47,8 +47,8 @@ "params": [], "decorators": [], "span": { - "start": 113, - "end": 136, + "start": 108, + "end": 131, "ctxt": 0 }, "body": null, @@ -58,15 +58,15 @@ "returnType": { "type": "TsTypeAnnotation", "span": { - "start": 127, - "end": 135, + "start": 122, + "end": 130, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { - "start": 129, - "end": 135, + "start": 124, + "end": 130, "ctxt": 0 }, "kind": "string" @@ -83,15 +83,15 @@ { "type": "ClassMethod", "span": { - "start": 141, - "end": 169, + "start": 136, + "end": 164, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 152, - "end": 153, + "start": 147, + "end": 148, "ctxt": 0 }, "value": "a", @@ -102,16 +102,16 @@ { "type": "Parameter", "span": { - "start": 154, - "end": 167, + "start": 149, + "end": 162, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 154, - "end": 167, + "start": 149, + "end": 162, "ctxt": 0 }, "value": "value", @@ -119,15 +119,15 @@ "typeAnnotation": { "type": "TsTypeAnnotation", "span": { - "start": 159, - "end": 167, + "start": 154, + "end": 162, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { - "start": 161, - "end": 167, + "start": 156, + "end": 162, "ctxt": 0 }, "kind": "string" @@ -138,8 +138,8 @@ ], "decorators": [], "span": { - "start": 141, - "end": 169, + "start": 136, + "end": 164, "ctxt": 0 }, "body": null, @@ -158,15 +158,15 @@ { "type": "ClassMethod", "span": { - "start": 175, - "end": 206, + "start": 170, + "end": 201, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 194, - "end": 195, + "start": 189, + "end": 190, "ctxt": 0 }, "value": "b", @@ -176,8 +176,8 @@ "params": [], "decorators": [], "span": { - "start": 175, - "end": 206, + "start": 170, + "end": 201, "ctxt": 0 }, "body": null, @@ -187,15 +187,15 @@ "returnType": { "type": "TsTypeAnnotation", "span": { - "start": 197, - "end": 205, + "start": 192, + "end": 200, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { - "start": 199, - "end": 205, + "start": 194, + "end": 200, "ctxt": 0 }, "kind": "string" @@ -212,15 +212,15 @@ { "type": "ClassMethod", "span": { - "start": 211, - "end": 245, + "start": 206, + "end": 240, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 230, - "end": 231, + "start": 225, + "end": 226, "ctxt": 0 }, "value": "b", @@ -231,16 +231,16 @@ { "type": "Parameter", "span": { - "start": 232, - "end": 243, + "start": 227, + "end": 238, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 232, - "end": 243, + "start": 227, + "end": 238, "ctxt": 0 }, "value": "foo", @@ -248,15 +248,15 @@ "typeAnnotation": { "type": "TsTypeAnnotation", "span": { - "start": 235, - "end": 243, + "start": 230, + "end": 238, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { - "start": 237, - "end": 243, + "start": 232, + "end": 238, "ctxt": 0 }, "kind": "string" @@ -267,8 +267,8 @@ ], "decorators": [], "span": { - "start": 211, - "end": 245, + "start": 206, + "end": 240, "ctxt": 0 }, "body": null, @@ -287,15 +287,15 @@ { "type": "ClassMethod", "span": { - "start": 251, - "end": 267, + "start": 246, + "end": 262, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 255, - "end": 256, + "start": 250, + "end": 251, "ctxt": 0 }, "value": "x", @@ -305,8 +305,8 @@ "params": [], "decorators": [], "span": { - "start": 251, - "end": 267, + "start": 246, + "end": 262, "ctxt": 0 }, "body": null, @@ -316,15 +316,15 @@ "returnType": { "type": "TsTypeAnnotation", "span": { - "start": 258, - "end": 266, + "start": 253, + "end": 261, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { - "start": 260, - "end": 266, + "start": 255, + "end": 261, "ctxt": 0 }, "kind": "string" @@ -341,15 +341,15 @@ { "type": "ClassMethod", "span": { - "start": 272, - "end": 293, + "start": 267, + "end": 288, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 276, - "end": 277, + "start": 271, + "end": 272, "ctxt": 0 }, "value": "x", @@ -360,16 +360,16 @@ { "type": "Parameter", "span": { - "start": 278, - "end": 291, + "start": 273, + "end": 286, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 278, - "end": 291, + "start": 273, + "end": 286, "ctxt": 0 }, "value": "value", @@ -377,15 +377,15 @@ "typeAnnotation": { "type": "TsTypeAnnotation", "span": { - "start": 283, - "end": 291, + "start": 278, + "end": 286, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { - "start": 285, - "end": 291, + "start": 280, + "end": 286, "ctxt": 0 }, "kind": "string" @@ -396,8 +396,8 @@ ], "decorators": [], "span": { - "start": 272, - "end": 293, + "start": 267, + "end": 288, "ctxt": 0 }, "body": null, @@ -416,15 +416,15 @@ { "type": "ClassMethod", "span": { - "start": 299, - "end": 323, + "start": 294, + "end": 318, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 311, - "end": 312, + "start": 306, + "end": 307, "ctxt": 0 }, "value": "y", @@ -434,8 +434,8 @@ "params": [], "decorators": [], "span": { - "start": 299, - "end": 323, + "start": 294, + "end": 318, "ctxt": 0 }, "body": null, @@ -445,15 +445,15 @@ "returnType": { "type": "TsTypeAnnotation", "span": { - "start": 314, - "end": 322, + "start": 309, + "end": 317, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { - "start": 316, - "end": 322, + "start": 311, + "end": 317, "ctxt": 0 }, "kind": "string" @@ -470,15 +470,15 @@ { "type": "ClassMethod", "span": { - "start": 328, - "end": 355, + "start": 323, + "end": 350, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 340, - "end": 341, + "start": 335, + "end": 336, "ctxt": 0 }, "value": "y", @@ -489,16 +489,16 @@ { "type": "Parameter", "span": { - "start": 342, - "end": 353, + "start": 337, + "end": 348, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 342, - "end": 353, + "start": 337, + "end": 348, "ctxt": 0 }, "value": "foo", @@ -506,15 +506,15 @@ "typeAnnotation": { "type": "TsTypeAnnotation", "span": { - "start": 345, - "end": 353, + "start": 340, + "end": 348, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { - "start": 347, - "end": 353, + "start": 342, + "end": 348, "ctxt": 0 }, "kind": "string" @@ -525,8 +525,8 @@ ], "decorators": [], "span": { - "start": 328, - "end": 355, + "start": 323, + "end": 350, "ctxt": 0 }, "body": null, diff --git a/crates/swc_ecma_parser/tests/tsc/ambientAccessors.ts b/crates/swc_ecma_parser/tests/tsc/ambientAccessors.ts index 636d4fa75c44..b49ab127826d 100644 --- a/crates/swc_ecma_parser/tests/tsc/ambientAccessors.ts +++ b/crates/swc_ecma_parser/tests/tsc/ambientAccessors.ts @@ -1,4 +1,4 @@ -// @target: es3, es5 +// @target: es5 // @declaration: true // ok to use accessors in ambient class in ES3 declare class C { diff --git a/crates/swc_ecma_parser/tests/tsc/awaitUsingDeclarationsWithImportHelpers.ts b/crates/swc_ecma_parser/tests/tsc/awaitUsingDeclarationsWithImportHelpers.ts index 0eec97f7eddd..0247aa5ad311 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitUsingDeclarationsWithImportHelpers.ts +++ b/crates/swc_ecma_parser/tests/tsc/awaitUsingDeclarationsWithImportHelpers.ts @@ -1,4 +1,4 @@ -// @target: esnext +// @target: es2022 // @module: esnext // @lib: esnext // @importHelpers: true diff --git a/crates/swc_ecma_parser/tests/tsc/checkJsdocReturnTag1.json b/crates/swc_ecma_parser/tests/tsc/checkJsdocReturnTag1.json index 3ba4279ca88f..441163f670fb 100644 --- a/crates/swc_ecma_parser/tests/tsc/checkJsdocReturnTag1.json +++ b/crates/swc_ecma_parser/tests/tsc/checkJsdocReturnTag1.json @@ -1,8 +1,8 @@ { "type": "Script", "span": { - "start": 143, - "end": 410, + "start": 147, + "end": 414, "ctxt": 0 }, "body": [ @@ -11,8 +11,8 @@ "identifier": { "type": "Identifier", "span": { - "start": 152, - "end": 153, + "start": 156, + "end": 157, "ctxt": 0 }, "value": "f", @@ -22,30 +22,30 @@ "params": [], "decorators": [], "span": { - "start": 143, - "end": 179, + "start": 147, + "end": 183, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 156, - "end": 179, + "start": 160, + "end": 183, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { - "start": 162, - "end": 177, + "start": 166, + "end": 181, "ctxt": 0 }, "argument": { "type": "StringLiteral", "span": { - "start": 169, - "end": 176, + "start": 173, + "end": 180, "ctxt": 0 }, "value": "hello", @@ -64,8 +64,8 @@ "identifier": { "type": "Identifier", "span": { - "start": 258, - "end": 260, + "start": 262, + "end": 264, "ctxt": 0 }, "value": "f1", @@ -75,30 +75,30 @@ "params": [], "decorators": [], "span": { - "start": 249, - "end": 292, + "start": 253, + "end": 296, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 263, - "end": 292, + "start": 267, + "end": 296, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { - "start": 269, - "end": 290, + "start": 273, + "end": 294, "ctxt": 0 }, "argument": { "type": "StringLiteral", "span": { - "start": 276, - "end": 289, + "start": 280, + "end": 293, "ctxt": 0 }, "value": "hello world", @@ -117,8 +117,8 @@ "identifier": { "type": "Identifier", "span": { - "start": 377, - "end": 379, + "start": 381, + "end": 383, "ctxt": 0 }, "value": "f2", @@ -128,38 +128,38 @@ "params": [], "decorators": [], "span": { - "start": 368, - "end": 410, + "start": 372, + "end": 414, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 382, - "end": 410, + "start": 386, + "end": 414, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { - "start": 388, - "end": 408, + "start": 392, + "end": 412, "ctxt": 0 }, "argument": { "type": "BinaryExpression", "span": { - "start": 395, - "end": 407, + "start": 399, + "end": 411, "ctxt": 0 }, "operator": "||", "left": { "type": "NumericLiteral", "span": { - "start": 395, - "end": 396, + "start": 399, + "end": 400, "ctxt": 0 }, "value": 5.0, @@ -168,8 +168,8 @@ "right": { "type": "StringLiteral", "span": { - "start": 400, - "end": 407, + "start": 404, + "end": 411, "ctxt": 0 }, "value": "hello", diff --git a/crates/swc_ecma_parser/tests/tsc/checkJsdocReturnTag1.ts b/crates/swc_ecma_parser/tests/tsc/checkJsdocReturnTag1.ts index 8c6217bb44db..c0da052dc907 100644 --- a/crates/swc_ecma_parser/tests/tsc/checkJsdocReturnTag1.ts +++ b/crates/swc_ecma_parser/tests/tsc/checkJsdocReturnTag1.ts @@ -1,5 +1,5 @@ // @allowJs: true -// @out: dummy.js +// @outFile: dummy.js // @filename: returns.js // @ts-check @@ -22,4 +22,4 @@ function f1() { */ function f2() { return 5 || "hello"; -} \ No newline at end of file +} diff --git a/crates/swc_ecma_parser/tests/tsc/checkJsdocReturnTag2.json b/crates/swc_ecma_parser/tests/tsc/checkJsdocReturnTag2.json index de3ba49c80ac..a5a7c92e890f 100644 --- a/crates/swc_ecma_parser/tests/tsc/checkJsdocReturnTag2.json +++ b/crates/swc_ecma_parser/tests/tsc/checkJsdocReturnTag2.json @@ -1,8 +1,8 @@ { "type": "Script", "span": { - "start": 143, - "end": 290, + "start": 147, + "end": 294, "ctxt": 0 }, "body": [ @@ -11,8 +11,8 @@ "identifier": { "type": "Identifier", "span": { - "start": 152, - "end": 153, + "start": 156, + "end": 157, "ctxt": 0 }, "value": "f", @@ -22,30 +22,30 @@ "params": [], "decorators": [], "span": { - "start": 143, - "end": 173, + "start": 147, + "end": 177, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 156, - "end": 173, + "start": 160, + "end": 177, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { - "start": 162, - "end": 171, + "start": 166, + "end": 175, "ctxt": 0 }, "argument": { "type": "NumericLiteral", "span": { - "start": 169, - "end": 170, + "start": 173, + "end": 174, "ctxt": 0 }, "value": 5.0, @@ -64,8 +64,8 @@ "identifier": { "type": "Identifier", "span": { - "start": 260, - "end": 262, + "start": 264, + "end": 266, "ctxt": 0 }, "value": "f1", @@ -75,38 +75,38 @@ "params": [], "decorators": [], "span": { - "start": 251, - "end": 290, + "start": 255, + "end": 294, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 265, - "end": 290, + "start": 269, + "end": 294, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { - "start": 271, - "end": 288, + "start": 275, + "end": 292, "ctxt": 0 }, "argument": { "type": "BinaryExpression", "span": { - "start": 278, - "end": 287, + "start": 282, + "end": 291, "ctxt": 0 }, "operator": "||", "left": { "type": "NumericLiteral", "span": { - "start": 278, - "end": 279, + "start": 282, + "end": 283, "ctxt": 0 }, "value": 5.0, @@ -115,8 +115,8 @@ "right": { "type": "BooleanLiteral", "span": { - "start": 283, - "end": 287, + "start": 287, + "end": 291, "ctxt": 0 }, "value": true diff --git a/crates/swc_ecma_parser/tests/tsc/checkJsdocReturnTag2.ts b/crates/swc_ecma_parser/tests/tsc/checkJsdocReturnTag2.ts index 8da62b9b2899..437b3880907e 100644 --- a/crates/swc_ecma_parser/tests/tsc/checkJsdocReturnTag2.ts +++ b/crates/swc_ecma_parser/tests/tsc/checkJsdocReturnTag2.ts @@ -1,5 +1,5 @@ // @allowJs: true -// @out: dummy.js +// @outFile: dummy.js // @filename: returns.js // @ts-check @@ -15,4 +15,4 @@ function f() { */ function f1() { return 5 || true; -} \ No newline at end of file +} diff --git a/crates/swc_ecma_parser/tests/tsc/constructorDefaultValuesReferencingThis.json b/crates/swc_ecma_parser/tests/tsc/constructorDefaultValuesReferencingThis.json deleted file mode 100644 index 8c16e3e82490..000000000000 --- a/crates/swc_ecma_parser/tests/tsc/constructorDefaultValuesReferencingThis.json +++ /dev/null @@ -1,360 +0,0 @@ -{ - "type": "Script", - "span": { - "start": 1, - "end": 141, - "ctxt": 0 - }, - "body": [ - { - "type": "ClassDeclaration", - "identifier": { - "type": "Identifier", - "span": { - "start": 7, - "end": 8, - "ctxt": 0 - }, - "value": "C", - "optional": false - }, - "declare": false, - "span": { - "start": 1, - "end": 42, - "ctxt": 0 - }, - "decorators": [], - "body": [ - { - "type": "Constructor", - "span": { - "start": 15, - "end": 40, - "ctxt": 0 - }, - "key": { - "type": "Identifier", - "span": { - "start": 15, - "end": 26, - "ctxt": 0 - }, - "value": "constructor", - "optional": false - }, - "params": [ - { - "type": "Parameter", - "span": { - "start": 27, - "end": 35, - "ctxt": 0 - }, - "decorators": [], - "pat": { - "type": "AssignmentPattern", - "span": { - "start": 27, - "end": 35, - "ctxt": 0 - }, - "left": { - "type": "Identifier", - "span": { - "start": 27, - "end": 28, - "ctxt": 0 - }, - "value": "x", - "optional": false, - "typeAnnotation": null - }, - "right": { - "type": "ThisExpression", - "span": { - "start": 31, - "end": 35, - "ctxt": 0 - } - } - } - } - ], - "body": { - "type": "BlockStatement", - "span": { - "start": 37, - "end": 40, - "ctxt": 0 - }, - "stmts": [] - }, - "accessibility": null, - "isOptional": false - } - ], - "superClass": null, - "isAbstract": false, - "typeParams": null, - "superTypeParams": null, - "implements": [] - }, - { - "type": "ClassDeclaration", - "identifier": { - "type": "Identifier", - "span": { - "start": 50, - "end": 51, - "ctxt": 0 - }, - "value": "D", - "optional": false - }, - "declare": false, - "span": { - "start": 44, - "end": 88, - "ctxt": 0 - }, - "decorators": [], - "body": [ - { - "type": "Constructor", - "span": { - "start": 61, - "end": 86, - "ctxt": 0 - }, - "key": { - "type": "Identifier", - "span": { - "start": 61, - "end": 72, - "ctxt": 0 - }, - "value": "constructor", - "optional": false - }, - "params": [ - { - "type": "Parameter", - "span": { - "start": 73, - "end": 81, - "ctxt": 0 - }, - "decorators": [], - "pat": { - "type": "AssignmentPattern", - "span": { - "start": 73, - "end": 81, - "ctxt": 0 - }, - "left": { - "type": "Identifier", - "span": { - "start": 73, - "end": 74, - "ctxt": 0 - }, - "value": "x", - "optional": false, - "typeAnnotation": null - }, - "right": { - "type": "ThisExpression", - "span": { - "start": 77, - "end": 81, - "ctxt": 0 - } - } - } - } - ], - "body": { - "type": "BlockStatement", - "span": { - "start": 83, - "end": 86, - "ctxt": 0 - }, - "stmts": [] - }, - "accessibility": null, - "isOptional": false - } - ], - "superClass": null, - "isAbstract": false, - "typeParams": { - "type": "TsTypeParameterDeclaration", - "span": { - "start": 51, - "end": 54, - "ctxt": 0 - }, - "parameters": [ - { - "type": "TsTypeParameter", - "span": { - "start": 52, - "end": 53, - "ctxt": 0 - }, - "name": { - "type": "Identifier", - "span": { - "start": 52, - "end": 53, - "ctxt": 0 - }, - "value": "T", - "optional": false - }, - "in": false, - "out": false, - "const": false, - "constraint": null, - "default": null - } - ] - }, - "superTypeParams": null, - "implements": [] - }, - { - "type": "ClassDeclaration", - "identifier": { - "type": "Identifier", - "span": { - "start": 96, - "end": 97, - "ctxt": 0 - }, - "value": "E", - "optional": false - }, - "declare": false, - "span": { - "start": 90, - "end": 141, - "ctxt": 0 - }, - "decorators": [], - "body": [ - { - "type": "Constructor", - "span": { - "start": 107, - "end": 139, - "ctxt": 0 - }, - "key": { - "type": "Identifier", - "span": { - "start": 107, - "end": 118, - "ctxt": 0 - }, - "value": "constructor", - "optional": false - }, - "params": [ - { - "type": "TsParameterProperty", - "span": { - "start": 119, - "end": 134, - "ctxt": 0 - }, - "decorators": [], - "accessibility": "public", - "override": false, - "readonly": false, - "param": { - "type": "AssignmentPattern", - "span": { - "start": 126, - "end": 134, - "ctxt": 0 - }, - "left": { - "type": "Identifier", - "span": { - "start": 126, - "end": 127, - "ctxt": 0 - }, - "value": "x", - "optional": false, - "typeAnnotation": null - }, - "right": { - "type": "ThisExpression", - "span": { - "start": 130, - "end": 134, - "ctxt": 0 - } - } - } - } - ], - "body": { - "type": "BlockStatement", - "span": { - "start": 136, - "end": 139, - "ctxt": 0 - }, - "stmts": [] - }, - "accessibility": null, - "isOptional": false - } - ], - "superClass": null, - "isAbstract": false, - "typeParams": { - "type": "TsTypeParameterDeclaration", - "span": { - "start": 97, - "end": 100, - "ctxt": 0 - }, - "parameters": [ - { - "type": "TsTypeParameter", - "span": { - "start": 98, - "end": 99, - "ctxt": 0 - }, - "name": { - "type": "Identifier", - "span": { - "start": 98, - "end": 99, - "ctxt": 0 - }, - "value": "T", - "optional": false - }, - "in": false, - "out": false, - "const": false, - "constraint": null, - "default": null - } - ] - }, - "superTypeParams": null, - "implements": [] - } - ], - "interpreter": null -} diff --git a/crates/swc_ecma_parser/tests/tsc/constructorDefaultValuesReferencingThis.ts b/crates/swc_ecma_parser/tests/tsc/constructorDefaultValuesReferencingThis.ts deleted file mode 100644 index bec1b484a6f6..000000000000 --- a/crates/swc_ecma_parser/tests/tsc/constructorDefaultValuesReferencingThis.ts +++ /dev/null @@ -1,11 +0,0 @@ -class C { - constructor(x = this) { } -} - -class D { - constructor(x = this) { } -} - -class E { - constructor(public x = this) { } -} \ No newline at end of file diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowComputedPropertyNames.json b/crates/swc_ecma_parser/tests/tsc/controlFlowComputedPropertyNames.json new file mode 100644 index 000000000000..2a11a61d8e21 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowComputedPropertyNames.json @@ -0,0 +1,2060 @@ +{ + "type": "Script", + "span": { + "start": 36, + "end": 971, + "ctxt": 0 + }, + "body": [ + { + "type": "FunctionDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 45, + "end": 47, + "ctxt": 0 + }, + "value": "f1", + "optional": false + }, + "declare": false, + "params": [ + { + "type": "Parameter", + "span": { + "start": 48, + "end": 76, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 48, + "end": 76, + "ctxt": 0 + }, + "value": "obj", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 51, + "end": 76, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 53, + "end": 76, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 53, + "end": 59, + "ctxt": 0 + }, + "value": "Record", + "optional": false + }, + "typeParams": { + "type": "TsTypeParameterInstantiation", + "span": { + "start": 59, + "end": 76, + "ctxt": 0 + }, + "params": [ + { + "type": "TsKeywordType", + "span": { + "start": 60, + "end": 66, + "ctxt": 0 + }, + "kind": "string" + }, + { + "type": "TsKeywordType", + "span": { + "start": 68, + "end": 75, + "ctxt": 0 + }, + "kind": "unknown" + } + ] + } + } + } + } + }, + { + "type": "Parameter", + "span": { + "start": 78, + "end": 89, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 78, + "end": 89, + "ctxt": 0 + }, + "value": "key", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 81, + "end": 89, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 83, + "end": 89, + "ctxt": 0 + }, + "kind": "string" + } + } + } + } + ], + "decorators": [], + "span": { + "start": 36, + "end": 172, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 91, + "end": 172, + "ctxt": 0 + }, + "stmts": [ + { + "type": "IfStatement", + "span": { + "start": 97, + "end": 170, + "ctxt": 0 + }, + "test": { + "type": "BinaryExpression", + "span": { + "start": 101, + "end": 129, + "ctxt": 0 + }, + "operator": "===", + "left": { + "type": "UnaryExpression", + "span": { + "start": 101, + "end": 116, + "ctxt": 0 + }, + "operator": "typeof", + "argument": { + "type": "MemberExpression", + "span": { + "start": 108, + "end": 116, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 108, + "end": 111, + "ctxt": 0 + }, + "value": "obj", + "optional": false + }, + "property": { + "type": "Computed", + "span": { + "start": 111, + "end": 116, + "ctxt": 0 + }, + "expression": { + "type": "Identifier", + "span": { + "start": 112, + "end": 115, + "ctxt": 0 + }, + "value": "key", + "optional": false + } + } + } + }, + "right": { + "type": "StringLiteral", + "span": { + "start": 121, + "end": 129, + "ctxt": 0 + }, + "value": "string", + "raw": "\"string\"" + } + }, + "consequent": { + "type": "BlockStatement", + "span": { + "start": 131, + "end": 170, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ExpressionStatement", + "span": { + "start": 141, + "end": 164, + "ctxt": 0 + }, + "expression": { + "type": "CallExpression", + "span": { + "start": 141, + "end": 163, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 141, + "end": 161, + "ctxt": 0 + }, + "object": { + "type": "MemberExpression", + "span": { + "start": 141, + "end": 149, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 141, + "end": 144, + "ctxt": 0 + }, + "value": "obj", + "optional": false + }, + "property": { + "type": "Computed", + "span": { + "start": 144, + "end": 149, + "ctxt": 0 + }, + "expression": { + "type": "Identifier", + "span": { + "start": 145, + "end": 148, + "ctxt": 0 + }, + "value": "key", + "optional": false + } + } + }, + "property": { + "type": "Identifier", + "span": { + "start": 150, + "end": 161, + "ctxt": 0 + }, + "value": "toUpperCase", + "optional": false + } + }, + "arguments": [], + "typeArguments": null + } + } + ] + }, + "alternate": null + } + ] + }, + "generator": false, + "async": false, + "typeParameters": null, + "returnType": null + }, + { + "type": "FunctionDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 183, + "end": 185, + "ctxt": 0 + }, + "value": "f2", + "optional": false + }, + "declare": false, + "params": [ + { + "type": "Parameter", + "span": { + "start": 186, + "end": 225, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 186, + "end": 225, + "ctxt": 0 + }, + "value": "obj", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 189, + "end": 225, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 191, + "end": 225, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 191, + "end": 197, + "ctxt": 0 + }, + "value": "Record", + "optional": false + }, + "typeParams": { + "type": "TsTypeParameterInstantiation", + "span": { + "start": 197, + "end": 225, + "ctxt": 0 + }, + "params": [ + { + "type": "TsKeywordType", + "span": { + "start": 198, + "end": 204, + "ctxt": 0 + }, + "kind": "string" + }, + { + "type": "TsUnionType", + "span": { + "start": 206, + "end": 224, + "ctxt": 0 + }, + "types": [ + { + "type": "TsKeywordType", + "span": { + "start": 206, + "end": 212, + "ctxt": 0 + }, + "kind": "string" + }, + { + "type": "TsKeywordType", + "span": { + "start": 215, + "end": 224, + "ctxt": 0 + }, + "kind": "undefined" + } + ] + } + ] + } + } + } + } + }, + { + "type": "Parameter", + "span": { + "start": 227, + "end": 238, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 227, + "end": 238, + "ctxt": 0 + }, + "value": "key", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 230, + "end": 238, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 232, + "end": 238, + "ctxt": 0 + }, + "kind": "string" + } + } + } + } + ], + "decorators": [], + "span": { + "start": 174, + "end": 517, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 240, + "end": 517, + "ctxt": 0 + }, + "stmts": [ + { + "type": "IfStatement", + "span": { + "start": 246, + "end": 313, + "ctxt": 0 + }, + "test": { + "type": "BinaryExpression", + "span": { + "start": 250, + "end": 272, + "ctxt": 0 + }, + "operator": "!==", + "left": { + "type": "MemberExpression", + "span": { + "start": 250, + "end": 258, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 250, + "end": 253, + "ctxt": 0 + }, + "value": "obj", + "optional": false + }, + "property": { + "type": "Computed", + "span": { + "start": 253, + "end": 258, + "ctxt": 0 + }, + "expression": { + "type": "Identifier", + "span": { + "start": 254, + "end": 257, + "ctxt": 0 + }, + "value": "key", + "optional": false + } + } + }, + "right": { + "type": "Identifier", + "span": { + "start": 263, + "end": 272, + "ctxt": 0 + }, + "value": "undefined", + "optional": false + } + }, + "consequent": { + "type": "BlockStatement", + "span": { + "start": 274, + "end": 313, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ExpressionStatement", + "span": { + "start": 284, + "end": 307, + "ctxt": 0 + }, + "expression": { + "type": "CallExpression", + "span": { + "start": 284, + "end": 306, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 284, + "end": 304, + "ctxt": 0 + }, + "object": { + "type": "MemberExpression", + "span": { + "start": 284, + "end": 292, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 284, + "end": 287, + "ctxt": 0 + }, + "value": "obj", + "optional": false + }, + "property": { + "type": "Computed", + "span": { + "start": 287, + "end": 292, + "ctxt": 0 + }, + "expression": { + "type": "Identifier", + "span": { + "start": 288, + "end": 291, + "ctxt": 0 + }, + "value": "key", + "optional": false + } + } + }, + "property": { + "type": "Identifier", + "span": { + "start": 293, + "end": 304, + "ctxt": 0 + }, + "value": "toUpperCase", + "optional": false + } + }, + "arguments": [], + "typeArguments": null + } + } + ] + }, + "alternate": null + }, + { + "type": "VariableDeclaration", + "span": { + "start": 318, + "end": 339, + "ctxt": 0 + }, + "kind": "let", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 322, + "end": 338, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 322, + "end": 326, + "ctxt": 0 + }, + "value": "key2", + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "BinaryExpression", + "span": { + "start": 329, + "end": 338, + "ctxt": 0 + }, + "operator": "+", + "left": { + "type": "Identifier", + "span": { + "start": 329, + "end": 332, + "ctxt": 0 + }, + "value": "key", + "optional": false + }, + "right": { + "type": "Identifier", + "span": { + "start": 335, + "end": 338, + "ctxt": 0 + }, + "value": "key", + "optional": false + } + }, + "definite": false + } + ] + }, + { + "type": "IfStatement", + "span": { + "start": 344, + "end": 413, + "ctxt": 0 + }, + "test": { + "type": "BinaryExpression", + "span": { + "start": 348, + "end": 371, + "ctxt": 0 + }, + "operator": "!==", + "left": { + "type": "MemberExpression", + "span": { + "start": 348, + "end": 357, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 348, + "end": 351, + "ctxt": 0 + }, + "value": "obj", + "optional": false + }, + "property": { + "type": "Computed", + "span": { + "start": 351, + "end": 357, + "ctxt": 0 + }, + "expression": { + "type": "Identifier", + "span": { + "start": 352, + "end": 356, + "ctxt": 0 + }, + "value": "key2", + "optional": false + } + } + }, + "right": { + "type": "Identifier", + "span": { + "start": 362, + "end": 371, + "ctxt": 0 + }, + "value": "undefined", + "optional": false + } + }, + "consequent": { + "type": "BlockStatement", + "span": { + "start": 373, + "end": 413, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ExpressionStatement", + "span": { + "start": 383, + "end": 407, + "ctxt": 0 + }, + "expression": { + "type": "CallExpression", + "span": { + "start": 383, + "end": 406, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 383, + "end": 404, + "ctxt": 0 + }, + "object": { + "type": "MemberExpression", + "span": { + "start": 383, + "end": 392, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 383, + "end": 386, + "ctxt": 0 + }, + "value": "obj", + "optional": false + }, + "property": { + "type": "Computed", + "span": { + "start": 386, + "end": 392, + "ctxt": 0 + }, + "expression": { + "type": "Identifier", + "span": { + "start": 387, + "end": 391, + "ctxt": 0 + }, + "value": "key2", + "optional": false + } + } + }, + "property": { + "type": "Identifier", + "span": { + "start": 393, + "end": 404, + "ctxt": 0 + }, + "value": "toUpperCase", + "optional": false + } + }, + "arguments": [], + "typeArguments": null + } + } + ] + }, + "alternate": null + }, + { + "type": "VariableDeclaration", + "span": { + "start": 418, + "end": 441, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 424, + "end": 440, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 424, + "end": 428, + "ctxt": 0 + }, + "value": "key3", + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "BinaryExpression", + "span": { + "start": 431, + "end": 440, + "ctxt": 0 + }, + "operator": "+", + "left": { + "type": "Identifier", + "span": { + "start": 431, + "end": 434, + "ctxt": 0 + }, + "value": "key", + "optional": false + }, + "right": { + "type": "Identifier", + "span": { + "start": 437, + "end": 440, + "ctxt": 0 + }, + "value": "key", + "optional": false + } + }, + "definite": false + } + ] + }, + { + "type": "IfStatement", + "span": { + "start": 446, + "end": 515, + "ctxt": 0 + }, + "test": { + "type": "BinaryExpression", + "span": { + "start": 450, + "end": 473, + "ctxt": 0 + }, + "operator": "!==", + "left": { + "type": "MemberExpression", + "span": { + "start": 450, + "end": 459, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 450, + "end": 453, + "ctxt": 0 + }, + "value": "obj", + "optional": false + }, + "property": { + "type": "Computed", + "span": { + "start": 453, + "end": 459, + "ctxt": 0 + }, + "expression": { + "type": "Identifier", + "span": { + "start": 454, + "end": 458, + "ctxt": 0 + }, + "value": "key3", + "optional": false + } + } + }, + "right": { + "type": "Identifier", + "span": { + "start": 464, + "end": 473, + "ctxt": 0 + }, + "value": "undefined", + "optional": false + } + }, + "consequent": { + "type": "BlockStatement", + "span": { + "start": 475, + "end": 515, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ExpressionStatement", + "span": { + "start": 485, + "end": 509, + "ctxt": 0 + }, + "expression": { + "type": "CallExpression", + "span": { + "start": 485, + "end": 508, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 485, + "end": 506, + "ctxt": 0 + }, + "object": { + "type": "MemberExpression", + "span": { + "start": 485, + "end": 494, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 485, + "end": 488, + "ctxt": 0 + }, + "value": "obj", + "optional": false + }, + "property": { + "type": "Computed", + "span": { + "start": 488, + "end": 494, + "ctxt": 0 + }, + "expression": { + "type": "Identifier", + "span": { + "start": 489, + "end": 493, + "ctxt": 0 + }, + "value": "key3", + "optional": false + } + } + }, + "property": { + "type": "Identifier", + "span": { + "start": 495, + "end": 506, + "ctxt": 0 + }, + "value": "toUpperCase", + "optional": false + } + }, + "arguments": [], + "typeArguments": null + } + } + ] + }, + "alternate": null + } + ] + }, + "generator": false, + "async": false, + "typeParameters": null, + "returnType": null + }, + { + "type": "TsTypeAliasDeclaration", + "span": { + "start": 519, + "end": 571, + "ctxt": 0 + }, + "declare": false, + "id": { + "type": "Identifier", + "span": { + "start": 524, + "end": 529, + "ctxt": 0 + }, + "value": "Thing", + "optional": false + }, + "typeParams": null, + "typeAnnotation": { + "type": "TsTypeLiteral", + "span": { + "start": 532, + "end": 570, + "ctxt": 0 + }, + "members": [ + { + "type": "TsPropertySignature", + "span": { + "start": 534, + "end": 545, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "Identifier", + "span": { + "start": 534, + "end": 535, + "ctxt": 0 + }, + "value": "a", + "optional": false + }, + "computed": false, + "optional": true, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 536, + "end": 544, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 538, + "end": 544, + "ctxt": 0 + }, + "kind": "string" + } + }, + "typeParams": null + }, + { + "type": "TsPropertySignature", + "span": { + "start": 546, + "end": 557, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "Identifier", + "span": { + "start": 546, + "end": 547, + "ctxt": 0 + }, + "value": "b", + "optional": false + }, + "computed": false, + "optional": true, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 548, + "end": 556, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 550, + "end": 556, + "ctxt": 0 + }, + "kind": "number" + } + }, + "typeParams": null + }, + { + "type": "TsPropertySignature", + "span": { + "start": 558, + "end": 568, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "Identifier", + "span": { + "start": 558, + "end": 559, + "ctxt": 0 + }, + "value": "c", + "optional": false + }, + "computed": false, + "optional": true, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 560, + "end": 568, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 562, + "end": 568, + "ctxt": 0 + }, + "kind": "number" + } + }, + "typeParams": null + } + ] + } + }, + { + "type": "FunctionDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 582, + "end": 584, + "ctxt": 0 + }, + "value": "f3", + "optional": false + }, + "declare": false, + "params": [ + { + "type": "Parameter", + "span": { + "start": 585, + "end": 595, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 585, + "end": 595, + "ctxt": 0 + }, + "value": "obj", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 588, + "end": 595, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 590, + "end": 595, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 590, + "end": 595, + "ctxt": 0 + }, + "value": "Thing", + "optional": false + }, + "typeParams": null + } + } + } + }, + { + "type": "Parameter", + "span": { + "start": 597, + "end": 613, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 597, + "end": 613, + "ctxt": 0 + }, + "value": "key", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 600, + "end": 613, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeOperator", + "span": { + "start": 602, + "end": 613, + "ctxt": 0 + }, + "op": "keyof", + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 608, + "end": 613, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 608, + "end": 613, + "ctxt": 0 + }, + "value": "Thing", + "optional": false + }, + "typeParams": null + } + } + } + } + } + ], + "decorators": [], + "span": { + "start": 573, + "end": 834, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 615, + "end": 834, + "ctxt": 0 + }, + "stmts": [ + { + "type": "IfStatement", + "span": { + "start": 621, + "end": 832, + "ctxt": 0 + }, + "test": { + "type": "BinaryExpression", + "span": { + "start": 625, + "end": 647, + "ctxt": 0 + }, + "operator": "!==", + "left": { + "type": "MemberExpression", + "span": { + "start": 625, + "end": 633, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 625, + "end": 628, + "ctxt": 0 + }, + "value": "obj", + "optional": false + }, + "property": { + "type": "Computed", + "span": { + "start": 628, + "end": 633, + "ctxt": 0 + }, + "expression": { + "type": "Identifier", + "span": { + "start": 629, + "end": 632, + "ctxt": 0 + }, + "value": "key", + "optional": false + } + } + }, + "right": { + "type": "Identifier", + "span": { + "start": 638, + "end": 647, + "ctxt": 0 + }, + "value": "undefined", + "optional": false + } + }, + "consequent": { + "type": "BlockStatement", + "span": { + "start": 649, + "end": 832, + "ctxt": 0 + }, + "stmts": [ + { + "type": "IfStatement", + "span": { + "start": 659, + "end": 740, + "ctxt": 0 + }, + "test": { + "type": "BinaryExpression", + "span": { + "start": 663, + "end": 691, + "ctxt": 0 + }, + "operator": "===", + "left": { + "type": "UnaryExpression", + "span": { + "start": 663, + "end": 678, + "ctxt": 0 + }, + "operator": "typeof", + "argument": { + "type": "MemberExpression", + "span": { + "start": 670, + "end": 678, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 670, + "end": 673, + "ctxt": 0 + }, + "value": "obj", + "optional": false + }, + "property": { + "type": "Computed", + "span": { + "start": 673, + "end": 678, + "ctxt": 0 + }, + "expression": { + "type": "Identifier", + "span": { + "start": 674, + "end": 677, + "ctxt": 0 + }, + "value": "key", + "optional": false + } + } + } + }, + "right": { + "type": "StringLiteral", + "span": { + "start": 683, + "end": 691, + "ctxt": 0 + }, + "value": "string", + "raw": "\"string\"" + } + }, + "consequent": { + "type": "BlockStatement", + "span": { + "start": 693, + "end": 740, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ExpressionStatement", + "span": { + "start": 707, + "end": 730, + "ctxt": 0 + }, + "expression": { + "type": "CallExpression", + "span": { + "start": 707, + "end": 729, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 707, + "end": 727, + "ctxt": 0 + }, + "object": { + "type": "MemberExpression", + "span": { + "start": 707, + "end": 715, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 707, + "end": 710, + "ctxt": 0 + }, + "value": "obj", + "optional": false + }, + "property": { + "type": "Computed", + "span": { + "start": 710, + "end": 715, + "ctxt": 0 + }, + "expression": { + "type": "Identifier", + "span": { + "start": 711, + "end": 714, + "ctxt": 0 + }, + "value": "key", + "optional": false + } + } + }, + "property": { + "type": "Identifier", + "span": { + "start": 716, + "end": 727, + "ctxt": 0 + }, + "value": "toUpperCase", + "optional": false + } + }, + "arguments": [], + "typeArguments": null + } + } + ] + }, + "alternate": null + }, + { + "type": "IfStatement", + "span": { + "start": 749, + "end": 826, + "ctxt": 0 + }, + "test": { + "type": "BinaryExpression", + "span": { + "start": 753, + "end": 781, + "ctxt": 0 + }, + "operator": "===", + "left": { + "type": "UnaryExpression", + "span": { + "start": 753, + "end": 768, + "ctxt": 0 + }, + "operator": "typeof", + "argument": { + "type": "MemberExpression", + "span": { + "start": 760, + "end": 768, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 760, + "end": 763, + "ctxt": 0 + }, + "value": "obj", + "optional": false + }, + "property": { + "type": "Computed", + "span": { + "start": 763, + "end": 768, + "ctxt": 0 + }, + "expression": { + "type": "Identifier", + "span": { + "start": 764, + "end": 767, + "ctxt": 0 + }, + "value": "key", + "optional": false + } + } + } + }, + "right": { + "type": "StringLiteral", + "span": { + "start": 773, + "end": 781, + "ctxt": 0 + }, + "value": "number", + "raw": "\"number\"" + } + }, + "consequent": { + "type": "BlockStatement", + "span": { + "start": 783, + "end": 826, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ExpressionStatement", + "span": { + "start": 797, + "end": 816, + "ctxt": 0 + }, + "expression": { + "type": "CallExpression", + "span": { + "start": 797, + "end": 815, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 797, + "end": 813, + "ctxt": 0 + }, + "object": { + "type": "MemberExpression", + "span": { + "start": 797, + "end": 805, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 797, + "end": 800, + "ctxt": 0 + }, + "value": "obj", + "optional": false + }, + "property": { + "type": "Computed", + "span": { + "start": 800, + "end": 805, + "ctxt": 0 + }, + "expression": { + "type": "Identifier", + "span": { + "start": 801, + "end": 804, + "ctxt": 0 + }, + "value": "key", + "optional": false + } + } + }, + "property": { + "type": "Identifier", + "span": { + "start": 806, + "end": 813, + "ctxt": 0 + }, + "value": "toFixed", + "optional": false + } + }, + "arguments": [], + "typeArguments": null + } + } + ] + }, + "alternate": null + } + ] + }, + "alternate": null + } + ] + }, + "generator": false, + "async": false, + "typeParameters": null, + "returnType": null + }, + { + "type": "FunctionDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 845, + "end": 847, + "ctxt": 0 + }, + "value": "f4", + "optional": false + }, + "declare": false, + "params": [ + { + "type": "Parameter", + "span": { + "start": 866, + "end": 900, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 866, + "end": 900, + "ctxt": 0 + }, + "value": "obj", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 869, + "end": 900, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 871, + "end": 900, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 871, + "end": 877, + "ctxt": 0 + }, + "value": "Record", + "optional": false + }, + "typeParams": { + "type": "TsTypeParameterInstantiation", + "span": { + "start": 877, + "end": 900, + "ctxt": 0 + }, + "params": [ + { + "type": "TsTypeReference", + "span": { + "start": 878, + "end": 879, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 878, + "end": 879, + "ctxt": 0 + }, + "value": "K", + "optional": false + }, + "typeParams": null + }, + { + "type": "TsUnionType", + "span": { + "start": 881, + "end": 899, + "ctxt": 0 + }, + "types": [ + { + "type": "TsKeywordType", + "span": { + "start": 881, + "end": 887, + "ctxt": 0 + }, + "kind": "string" + }, + { + "type": "TsKeywordType", + "span": { + "start": 890, + "end": 899, + "ctxt": 0 + }, + "kind": "undefined" + } + ] + } + ] + } + } + } + } + }, + { + "type": "Parameter", + "span": { + "start": 902, + "end": 908, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 902, + "end": 908, + "ctxt": 0 + }, + "value": "key", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 905, + "end": 908, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 907, + "end": 908, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 907, + "end": 908, + "ctxt": 0 + }, + "value": "K", + "optional": false + }, + "typeParams": null + } + } + } + } + ], + "decorators": [], + "span": { + "start": 836, + "end": 971, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 910, + "end": 971, + "ctxt": 0 + }, + "stmts": [ + { + "type": "IfStatement", + "span": { + "start": 916, + "end": 969, + "ctxt": 0 + }, + "test": { + "type": "MemberExpression", + "span": { + "start": 920, + "end": 928, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 920, + "end": 923, + "ctxt": 0 + }, + "value": "obj", + "optional": false + }, + "property": { + "type": "Computed", + "span": { + "start": 923, + "end": 928, + "ctxt": 0 + }, + "expression": { + "type": "Identifier", + "span": { + "start": 924, + "end": 927, + "ctxt": 0 + }, + "value": "key", + "optional": false + } + } + }, + "consequent": { + "type": "BlockStatement", + "span": { + "start": 930, + "end": 969, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ExpressionStatement", + "span": { + "start": 940, + "end": 963, + "ctxt": 0 + }, + "expression": { + "type": "CallExpression", + "span": { + "start": 940, + "end": 962, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 940, + "end": 960, + "ctxt": 0 + }, + "object": { + "type": "MemberExpression", + "span": { + "start": 940, + "end": 948, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 940, + "end": 943, + "ctxt": 0 + }, + "value": "obj", + "optional": false + }, + "property": { + "type": "Computed", + "span": { + "start": 943, + "end": 948, + "ctxt": 0 + }, + "expression": { + "type": "Identifier", + "span": { + "start": 944, + "end": 947, + "ctxt": 0 + }, + "value": "key", + "optional": false + } + } + }, + "property": { + "type": "Identifier", + "span": { + "start": 949, + "end": 960, + "ctxt": 0 + }, + "value": "toUpperCase", + "optional": false + } + }, + "arguments": [], + "typeArguments": null + } + } + ] + }, + "alternate": null + } + ] + }, + "generator": false, + "async": false, + "typeParameters": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 847, + "end": 865, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 848, + "end": 864, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 848, + "end": 849, + "ctxt": 0 + }, + "value": "K", + "optional": false + }, + "in": false, + "out": false, + "const": false, + "constraint": { + "type": "TsKeywordType", + "span": { + "start": 858, + "end": 864, + "ctxt": 0 + }, + "kind": "string" + }, + "default": null + } + ] + }, + "returnType": null + } + ], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowComputedPropertyNames.ts b/crates/swc_ecma_parser/tests/tsc/controlFlowComputedPropertyNames.ts new file mode 100644 index 000000000000..e4bdfb049be2 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowComputedPropertyNames.ts @@ -0,0 +1,41 @@ +// @strict: true +// @noEmit: true + +function f1(obj: Record, key: string) { + if (typeof obj[key] === "string") { + obj[key].toUpperCase(); + } +} + +function f2(obj: Record, key: string) { + if (obj[key] !== undefined) { + obj[key].toUpperCase(); + } + let key2 = key + key; + if (obj[key2] !== undefined) { + obj[key2].toUpperCase(); + } + const key3 = key + key; + if (obj[key3] !== undefined) { + obj[key3].toUpperCase(); + } +} + +type Thing = { a?: string, b?: number, c?: number }; + +function f3(obj: Thing, key: keyof Thing) { + if (obj[key] !== undefined) { + if (typeof obj[key] === "string") { + obj[key].toUpperCase(); + } + if (typeof obj[key] === "number") { + obj[key].toFixed(); + } + } +} + +function f4(obj: Record, key: K) { + if (obj[key]) { + obj[key].toUpperCase(); + } +} diff --git a/crates/swc_ecma_parser/tests/tsc/decoratorOnClassMethod11.json b/crates/swc_ecma_parser/tests/tsc/decoratorOnClassMethod11.json index 7f8716ae043f..8b9cd3f6e1a8 100644 --- a/crates/swc_ecma_parser/tests/tsc/decoratorOnClassMethod11.json +++ b/crates/swc_ecma_parser/tests/tsc/decoratorOnClassMethod11.json @@ -2,7 +2,7 @@ "type": "Script", "span": { "start": 50, - "end": 185, + "end": 187, "ctxt": 0 }, "body": [ @@ -10,7 +10,7 @@ "type": "TsModuleDeclaration", "span": { "start": 50, - "end": 185, + "end": 187, "ctxt": 0 }, "declare": false, @@ -29,7 +29,7 @@ "type": "TsModuleBlock", "span": { "start": 59, - "end": 185, + "end": 187, "ctxt": 0 }, "body": [ @@ -48,7 +48,7 @@ "declare": false, "span": { "start": 65, - "end": 183, + "end": 185, "ctxt": 0 }, "decorators": [], @@ -202,14 +202,14 @@ "type": "ClassMethod", "span": { "start": 141, - "end": 177, + "end": 179, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 165, - "end": 171, + "start": 167, + "end": 173, "ctxt": 0 }, "value": "method", @@ -222,31 +222,29 @@ "type": "Decorator", "span": { "start": 141, - "end": 156, + "end": 158, "ctxt": 0 }, "expression": { "type": "MemberExpression", "span": { - "start": 142, - "end": 156, + "start": 143, + "end": 157, "ctxt": 0 }, "object": { - "type": "Identifier", + "type": "ThisExpression", "span": { - "start": 142, - "end": 146, + "start": 143, + "end": 147, "ctxt": 0 - }, - "value": "this", - "optional": false + } }, "property": { "type": "Identifier", "span": { - "start": 147, - "end": 156, + "start": 148, + "end": 157, "ctxt": 0 }, "value": "decorator", @@ -257,14 +255,14 @@ ], "span": { "start": 141, - "end": 177, + "end": 179, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 174, - "end": 177, + "start": 176, + "end": 179, "ctxt": 0 }, "stmts": [] diff --git a/crates/swc_ecma_parser/tests/tsc/decoratorOnClassMethod11.ts b/crates/swc_ecma_parser/tests/tsc/decoratorOnClassMethod11.ts index f3a03715ff08..7a76cb8d0663 100644 --- a/crates/swc_ecma_parser/tests/tsc/decoratorOnClassMethod11.ts +++ b/crates/swc_ecma_parser/tests/tsc/decoratorOnClassMethod11.ts @@ -4,7 +4,7 @@ module M { class C { decorator(target: Object, key: string): void { } - @this.decorator + @(this.decorator) method() { } } } \ No newline at end of file diff --git a/crates/swc_ecma_parser/tests/tsc/decoratorOnClassMethod12.ts b/crates/swc_ecma_parser/tests/tsc/decoratorOnClassMethod12.ts index 9af80e32c46b..e353d0db587e 100644 --- a/crates/swc_ecma_parser/tests/tsc/decoratorOnClassMethod12.ts +++ b/crates/swc_ecma_parser/tests/tsc/decoratorOnClassMethod12.ts @@ -5,7 +5,7 @@ module M { decorator(target: Object, key: string): void { } } class C extends S { - @super.decorator + @(super.decorator) method() { } } } \ No newline at end of file diff --git a/crates/swc_ecma_parser/tests/tsc/definePropertyOutputES3.json b/crates/swc_ecma_parser/tests/tsc/definePropertyOutputES3.json deleted file mode 100644 index c2511c67ee0c..000000000000 --- a/crates/swc_ecma_parser/tests/tsc/definePropertyOutputES3.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "type": "Script", - "span": { - "start": 51, - "end": 73, - "ctxt": 0 - }, - "body": [ - { - "type": "ClassDeclaration", - "identifier": { - "type": "Identifier", - "span": { - "start": 57, - "end": 58, - "ctxt": 0 - }, - "value": "A", - "optional": false - }, - "declare": false, - "span": { - "start": 51, - "end": 73, - "ctxt": 0 - }, - "decorators": [], - "body": [ - { - "type": "ClassProperty", - "span": { - "start": 65, - "end": 71, - "ctxt": 0 - }, - "key": { - "type": "Identifier", - "span": { - "start": 65, - "end": 66, - "ctxt": 0 - }, - "value": "a", - "optional": false - }, - "value": { - "type": "NumericLiteral", - "span": { - "start": 69, - "end": 71, - "ctxt": 0 - }, - "value": 12.0, - "raw": "12" - }, - "typeAnnotation": null, - "isStatic": false, - "decorators": [], - "accessibility": null, - "isAbstract": false, - "isOptional": false, - "isOverride": false, - "readonly": false, - "declare": false, - "definite": false - } - ], - "superClass": null, - "isAbstract": false, - "typeParams": null, - "superTypeParams": null, - "implements": [] - } - ], - "interpreter": null -} diff --git a/crates/swc_ecma_parser/tests/tsc/definePropertyOutputES3.ts b/crates/swc_ecma_parser/tests/tsc/definePropertyOutputES3.ts deleted file mode 100644 index f6a62d32650f..000000000000 --- a/crates/swc_ecma_parser/tests/tsc/definePropertyOutputES3.ts +++ /dev/null @@ -1,5 +0,0 @@ -// @target: es3 -// @useDefineForClassFields: true -class A { - a = 12 -} diff --git a/crates/swc_ecma_parser/tests/tsc/errorIsolation.json b/crates/swc_ecma_parser/tests/tsc/errorIsolation.json new file mode 100644 index 000000000000..c8c58c7a5840 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/errorIsolation.json @@ -0,0 +1,172 @@ +{ + "type": "Script", + "span": { + "start": 68, + "end": 146, + "ctxt": 0 + }, + "body": [ + { + "type": "VariableDeclaration", + "span": { + "start": 68, + "end": 107, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 74, + "end": 106, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 74, + "end": 79, + "ctxt": 0 + }, + "value": "async", + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "ObjectExpression", + "span": { + "start": 82, + "end": 106, + "ctxt": 0 + }, + "properties": [ + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 84, + "end": 95, + "ctxt": 0 + }, + "value": "doSomething", + "optional": false + }, + "value": { + "type": "ArrowFunctionExpression", + "span": { + "start": 97, + "end": 104, + "ctxt": 0 + }, + "params": [ + { + "type": "Identifier", + "span": { + "start": 97, + "end": 98, + "ctxt": 0 + }, + "value": "_", + "optional": false, + "typeAnnotation": null + } + ], + "body": { + "type": "BlockStatement", + "span": { + "start": 102, + "end": 104, + "ctxt": 0 + }, + "stmts": [] + }, + "async": false, + "generator": false, + "typeParameters": null, + "returnType": null + } + } + ] + }, + "definite": false + } + ] + }, + { + "type": "ExpressionStatement", + "span": { + "start": 108, + "end": 146, + "ctxt": 0 + }, + "expression": { + "type": "CallExpression", + "span": { + "start": 108, + "end": 145, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 108, + "end": 125, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 108, + "end": 113, + "ctxt": 0 + }, + "value": "async", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 114, + "end": 125, + "ctxt": 0 + }, + "value": "doSomething", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "ArrowFunctionExpression", + "span": { + "start": 135, + "end": 143, + "ctxt": 0 + }, + "params": [], + "body": { + "type": "BlockStatement", + "span": { + "start": 141, + "end": 143, + "ctxt": 0 + }, + "stmts": [] + }, + "async": false, + "generator": false, + "typeParameters": null, + "returnType": null + } + } + ], + "typeArguments": null + } + } + ], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/tsc/errorIsolation.ts b/crates/swc_ecma_parser/tests/tsc/errorIsolation.ts new file mode 100644 index 000000000000..d06d76dcac86 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/errorIsolation.ts @@ -0,0 +1,8 @@ +// @noEmit: true +// @checkJs: true +// @filename: errorIsolation.js +const async = { doSomething: _ => {} }; +async.doSomething( + /***/ + () => {} +); \ No newline at end of file diff --git a/crates/swc_ecma_parser/tests/tsc/es2018IntlAPIs.json b/crates/swc_ecma_parser/tests/tsc/es2018IntlAPIs.json index 5b4c1470df3d..885d285a8230 100644 --- a/crates/swc_ecma_parser/tests/tsc/es2018IntlAPIs.json +++ b/crates/swc_ecma_parser/tests/tsc/es2018IntlAPIs.json @@ -2,7 +2,7 @@ "type": "Script", "span": { "start": 156, - "end": 340, + "end": 435, "ctxt": 0 }, "body": [ @@ -334,6 +334,225 @@ ], "typeArguments": null } + }, + { + "type": "VariableDeclaration", + "span": { + "start": 342, + "end": 399, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 348, + "end": 398, + "ctxt": 0 + }, + "id": { + "type": "ArrayPattern", + "span": { + "start": 348, + "end": 356, + "ctxt": 0 + }, + "elements": [ + { + "type": "Identifier", + "span": { + "start": 350, + "end": 354, + "ctxt": 0 + }, + "value": "part", + "optional": false, + "typeAnnotation": null + } + ], + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "CallExpression", + "span": { + "start": 359, + "end": 398, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 359, + "end": 396, + "ctxt": 0 + }, + "object": { + "type": "NewExpression", + "span": { + "start": 359, + "end": 382, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 363, + "end": 380, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 363, + "end": 367, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 368, + "end": 380, + "ctxt": 0 + }, + "value": "NumberFormat", + "optional": false + } + }, + "arguments": [], + "typeArguments": null + }, + "property": { + "type": "Identifier", + "span": { + "start": 383, + "end": 396, + "ctxt": 0 + }, + "value": "formatToParts", + "optional": false + } + }, + "arguments": [], + "typeArguments": null + }, + "definite": false + } + ] + }, + { + "type": "ExpressionStatement", + "span": { + "start": 400, + "end": 435, + "ctxt": 0 + }, + "expression": { + "type": "CallExpression", + "span": { + "start": 400, + "end": 434, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 400, + "end": 411, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 400, + "end": 407, + "ctxt": 0 + }, + "value": "console", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 408, + "end": 411, + "ctxt": 0 + }, + "value": "log", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "MemberExpression", + "span": { + "start": 412, + "end": 421, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 412, + "end": 416, + "ctxt": 0 + }, + "value": "part", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 417, + "end": 421, + "ctxt": 0 + }, + "value": "type", + "optional": false + } + } + }, + { + "spread": null, + "expression": { + "type": "MemberExpression", + "span": { + "start": 423, + "end": 433, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 423, + "end": 427, + "ctxt": 0 + }, + "value": "part", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 428, + "end": 433, + "ctxt": 0 + }, + "value": "value", + "optional": false + } + } + } + ], + "typeArguments": null + } } ], "interpreter": null diff --git a/crates/swc_ecma_parser/tests/tsc/es2018IntlAPIs.ts b/crates/swc_ecma_parser/tests/tsc/es2018IntlAPIs.ts index c1f6739202d7..d9c3c03c780a 100644 --- a/crates/swc_ecma_parser/tests/tsc/es2018IntlAPIs.ts +++ b/crates/swc_ecma_parser/tests/tsc/es2018IntlAPIs.ts @@ -4,4 +4,7 @@ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/PluralRules/supportedLocalesOf const locales = ['ban', 'id-u-co-pinyin', 'de-ID']; const options = { localeMatcher: 'lookup' } as const; -console.log(Intl.PluralRules.supportedLocalesOf(locales, options).join(', ')); \ No newline at end of file +console.log(Intl.PluralRules.supportedLocalesOf(locales, options).join(', ')); + +const [ part ] = new Intl.NumberFormat().formatToParts(); +console.log(part.type, part.value); diff --git a/crates/swc_ecma_parser/tests/tsc/esDecorators-decoratorExpression.1.ts b/crates/swc_ecma_parser/tests/tsc/esDecorators-decoratorExpression.1.ts new file mode 100644 index 000000000000..333e42638354 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/esDecorators-decoratorExpression.1.ts @@ -0,0 +1,50 @@ +// @target: esnext +// @experimentalDecorators: * +// @noEmitHelpers: true +// @noTypesAndSymbols: true + +declare let x: any; + +{ @x().y class C {} } + +{ @new x class C {} } + +{ @x().y() class C {} } + +{ @x?.y class C {} } + +{ @x?.y() class C {} } + +{ @x?.["y"] class C {} } + +{ @x?.() class C {} } + +{ @x`` class C {} } + +{ @x``() class C {} } + +{ @x.y`` class C {} } + +{ @x.y``() class C {} } + +{ class C { @x().y m() {} } } + +{ class C { @new x m() {} } } + +{ class C { @x().y() m() {} } } + +{ class C { @x?.y m() {} } } + +{ class C { @x?.y() m() {} } } + +{ class C { @x?.["y"] m() {} } } + +{ class C { @x?.() m() {} } } + +{ class C { @x`` m() {} } } + +{ class C { @x``() m() {} } } + +{ class C { @x.y`` m() {} } } + +{ class C { @x.y``() m() {} } } diff --git a/crates/swc_ecma_parser/tests/tsc/esDecorators-decoratorExpression.2.json b/crates/swc_ecma_parser/tests/tsc/esDecorators-decoratorExpression.2.json new file mode 100644 index 000000000000..630229417836 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/esDecorators-decoratorExpression.2.json @@ -0,0 +1,3189 @@ +{ + "type": "Script", + "span": { + "start": 103, + "end": 978, + "ctxt": 0 + }, + "body": [ + { + "type": "VariableDeclaration", + "span": { + "start": 103, + "end": 122, + "ctxt": 0 + }, + "kind": "let", + "declare": true, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 115, + "end": 121, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 115, + "end": 116, + "ctxt": 0 + }, + "value": "x", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 116, + "end": 121, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 118, + "end": 121, + "ctxt": 0 + }, + "kind": "any" + } + } + }, + "init": null, + "definite": false + } + ] + }, + { + "type": "VariableDeclaration", + "span": { + "start": 123, + "end": 163, + "ctxt": 0 + }, + "kind": "let", + "declare": true, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 135, + "end": 162, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 135, + "end": 136, + "ctxt": 0 + }, + "value": "g", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 136, + "end": 162, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsFunctionType", + "span": { + "start": 138, + "end": 162, + "ctxt": 0 + }, + "params": [ + { + "type": "RestElement", + "span": { + "start": 142, + "end": 154, + "ctxt": 0 + }, + "rest": { + "start": 142, + "end": 145, + "ctxt": 0 + }, + "argument": { + "type": "Identifier", + "span": { + "start": 145, + "end": 149, + "ctxt": 0 + }, + "value": "args", + "optional": false, + "typeAnnotation": null + }, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 149, + "end": 154, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 151, + "end": 154, + "ctxt": 0 + }, + "kind": "any" + } + } + } + ], + "typeParams": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 138, + "end": 141, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 139, + "end": 140, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 139, + "end": 140, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "in": false, + "out": false, + "const": false, + "constraint": null, + "default": null + } + ] + }, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 156, + "end": 162, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 159, + "end": 162, + "ctxt": 0 + }, + "kind": "any" + } + } + } + } + }, + "init": null, + "definite": false + } + ] + }, + { + "type": "VariableDeclaration", + "span": { + "start": 164, + "end": 210, + "ctxt": 0 + }, + "kind": "let", + "declare": true, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 176, + "end": 209, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 176, + "end": 177, + "ctxt": 0 + }, + "value": "h", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 177, + "end": 209, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsFunctionType", + "span": { + "start": 179, + "end": 209, + "ctxt": 0 + }, + "params": [], + "typeParams": null, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 182, + "end": 209, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsFunctionType", + "span": { + "start": 185, + "end": 209, + "ctxt": 0 + }, + "params": [ + { + "type": "RestElement", + "span": { + "start": 189, + "end": 201, + "ctxt": 0 + }, + "rest": { + "start": 189, + "end": 192, + "ctxt": 0 + }, + "argument": { + "type": "Identifier", + "span": { + "start": 192, + "end": 196, + "ctxt": 0 + }, + "value": "args", + "optional": false, + "typeAnnotation": null + }, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 196, + "end": 201, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 198, + "end": 201, + "ctxt": 0 + }, + "kind": "any" + } + } + } + ], + "typeParams": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 185, + "end": 188, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 186, + "end": 187, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 186, + "end": 187, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "in": false, + "out": false, + "const": false, + "constraint": null, + "default": null + } + ] + }, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 203, + "end": 209, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 206, + "end": 209, + "ctxt": 0 + }, + "kind": "any" + } + } + } + } + } + } + }, + "init": null, + "definite": false + } + ] + }, + { + "type": "BlockStatement", + "span": { + "start": 212, + "end": 230, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ClassDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 224, + "end": 225, + "ctxt": 0 + }, + "value": "C", + "optional": false + }, + "declare": false, + "span": { + "start": 214, + "end": 228, + "ctxt": 0 + }, + "decorators": [ + { + "type": "Decorator", + "span": { + "start": 214, + "end": 217, + "ctxt": 0 + }, + "expression": { + "type": "TsNonNullExpression", + "span": { + "start": 215, + "end": 217, + "ctxt": 0 + }, + "expression": { + "type": "Identifier", + "span": { + "start": 215, + "end": 216, + "ctxt": 0 + }, + "value": "x", + "optional": false + } + } + } + ], + "body": [], + "superClass": null, + "isAbstract": false, + "typeParams": null, + "superTypeParams": null, + "implements": [] + } + ] + }, + { + "type": "BlockStatement", + "span": { + "start": 232, + "end": 252, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ClassDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 246, + "end": 247, + "ctxt": 0 + }, + "value": "C", + "optional": false + }, + "declare": false, + "span": { + "start": 234, + "end": 250, + "ctxt": 0 + }, + "decorators": [ + { + "type": "Decorator", + "span": { + "start": 234, + "end": 239, + "ctxt": 0 + }, + "expression": { + "type": "TsNonNullExpression", + "span": { + "start": 235, + "end": 239, + "ctxt": 0 + }, + "expression": { + "type": "MemberExpression", + "span": { + "start": 235, + "end": 238, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 235, + "end": 236, + "ctxt": 0 + }, + "value": "x", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 237, + "end": 238, + "ctxt": 0 + }, + "value": "y", + "optional": false + } + } + } + } + ], + "body": [], + "superClass": null, + "isAbstract": false, + "typeParams": null, + "superTypeParams": null, + "implements": [] + } + ] + }, + { + "type": "BlockStatement", + "span": { + "start": 254, + "end": 274, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ClassDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 268, + "end": 269, + "ctxt": 0 + }, + "value": "C", + "optional": false + }, + "declare": false, + "span": { + "start": 256, + "end": 272, + "ctxt": 0 + }, + "decorators": [ + { + "type": "Decorator", + "span": { + "start": 256, + "end": 261, + "ctxt": 0 + }, + "expression": { + "type": "MemberExpression", + "span": { + "start": 257, + "end": 261, + "ctxt": 0 + }, + "object": { + "type": "TsNonNullExpression", + "span": { + "start": 257, + "end": 259, + "ctxt": 0 + }, + "expression": { + "type": "Identifier", + "span": { + "start": 257, + "end": 258, + "ctxt": 0 + }, + "value": "x", + "optional": false + } + }, + "property": { + "type": "Identifier", + "span": { + "start": 260, + "end": 261, + "ctxt": 0 + }, + "value": "y", + "optional": false + } + } + } + ], + "body": [], + "superClass": null, + "isAbstract": false, + "typeParams": null, + "superTypeParams": null, + "implements": [] + } + ] + }, + { + "type": "BlockStatement", + "span": { + "start": 276, + "end": 303, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ClassDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 297, + "end": 298, + "ctxt": 0 + }, + "value": "C", + "optional": false + }, + "declare": false, + "span": { + "start": 278, + "end": 301, + "ctxt": 0 + }, + "decorators": [ + { + "type": "Decorator", + "span": { + "start": 278, + "end": 290, + "ctxt": 0 + }, + "expression": { + "type": "CallExpression", + "span": { + "start": 279, + "end": 290, + "ctxt": 0 + }, + "callee": { + "type": "Identifier", + "span": { + "start": 279, + "end": 280, + "ctxt": 0 + }, + "value": "g", + "optional": false + }, + "arguments": [], + "typeArguments": { + "type": "TsTypeParameterInstantiation", + "span": { + "start": 280, + "end": 288, + "ctxt": 0 + }, + "params": [ + { + "type": "TsKeywordType", + "span": { + "start": 281, + "end": 287, + "ctxt": 0 + }, + "kind": "number" + } + ] + } + } + } + ], + "body": [], + "superClass": null, + "isAbstract": false, + "typeParams": null, + "superTypeParams": null, + "implements": [] + } + ] + }, + { + "type": "BlockStatement", + "span": { + "start": 305, + "end": 332, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ClassDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 326, + "end": 327, + "ctxt": 0 + }, + "value": "C", + "optional": false + }, + "declare": false, + "span": { + "start": 307, + "end": 330, + "ctxt": 0 + }, + "decorators": [ + { + "type": "Decorator", + "span": { + "start": 307, + "end": 319, + "ctxt": 0 + }, + "expression": { + "type": "TsInstantiation", + "span": { + "start": 309, + "end": 318, + "ctxt": 0 + }, + "expression": { + "type": "Identifier", + "span": { + "start": 309, + "end": 310, + "ctxt": 0 + }, + "value": "g", + "optional": false + }, + "typeArguments": { + "type": "TsTypeParameterInstantiation", + "span": { + "start": 310, + "end": 318, + "ctxt": 0 + }, + "params": [ + { + "type": "TsKeywordType", + "span": { + "start": 311, + "end": 317, + "ctxt": 0 + }, + "kind": "number" + } + ] + } + } + } + ], + "body": [], + "superClass": null, + "isAbstract": false, + "typeParams": null, + "superTypeParams": null, + "implements": [] + } + ] + }, + { + "type": "BlockStatement", + "span": { + "start": 334, + "end": 363, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ClassDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 357, + "end": 358, + "ctxt": 0 + }, + "value": "C", + "optional": false + }, + "declare": false, + "span": { + "start": 336, + "end": 361, + "ctxt": 0 + }, + "decorators": [ + { + "type": "Decorator", + "span": { + "start": 336, + "end": 350, + "ctxt": 0 + }, + "expression": { + "type": "TsInstantiation", + "span": { + "start": 338, + "end": 349, + "ctxt": 0 + }, + "expression": { + "type": "CallExpression", + "span": { + "start": 338, + "end": 341, + "ctxt": 0 + }, + "callee": { + "type": "Identifier", + "span": { + "start": 338, + "end": 339, + "ctxt": 0 + }, + "value": "h", + "optional": false + }, + "arguments": [], + "typeArguments": null + }, + "typeArguments": { + "type": "TsTypeParameterInstantiation", + "span": { + "start": 341, + "end": 349, + "ctxt": 0 + }, + "params": [ + { + "type": "TsKeywordType", + "span": { + "start": 342, + "end": 348, + "ctxt": 0 + }, + "kind": "number" + } + ] + } + } + } + ], + "body": [], + "superClass": null, + "isAbstract": false, + "typeParams": null, + "superTypeParams": null, + "implements": [] + } + ] + }, + { + "type": "BlockStatement", + "span": { + "start": 365, + "end": 388, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ClassDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 382, + "end": 383, + "ctxt": 0 + }, + "value": "C", + "optional": false + }, + "declare": false, + "span": { + "start": 367, + "end": 386, + "ctxt": 0 + }, + "decorators": [ + { + "type": "Decorator", + "span": { + "start": 367, + "end": 375, + "ctxt": 0 + }, + "expression": { + "type": "MemberExpression", + "span": { + "start": 369, + "end": 374, + "ctxt": 0 + }, + "object": { + "type": "CallExpression", + "span": { + "start": 369, + "end": 372, + "ctxt": 0 + }, + "callee": { + "type": "Identifier", + "span": { + "start": 369, + "end": 370, + "ctxt": 0 + }, + "value": "x", + "optional": false + }, + "arguments": [], + "typeArguments": null + }, + "property": { + "type": "Identifier", + "span": { + "start": 373, + "end": 374, + "ctxt": 0 + }, + "value": "y", + "optional": false + } + } + } + ], + "body": [], + "superClass": null, + "isAbstract": false, + "typeParams": null, + "superTypeParams": null, + "implements": [] + } + ] + }, + { + "type": "BlockStatement", + "span": { + "start": 390, + "end": 415, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ClassDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 409, + "end": 410, + "ctxt": 0 + }, + "value": "C", + "optional": false + }, + "declare": false, + "span": { + "start": 392, + "end": 413, + "ctxt": 0 + }, + "decorators": [ + { + "type": "Decorator", + "span": { + "start": 392, + "end": 402, + "ctxt": 0 + }, + "expression": { + "type": "CallExpression", + "span": { + "start": 394, + "end": 401, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 394, + "end": 399, + "ctxt": 0 + }, + "object": { + "type": "CallExpression", + "span": { + "start": 394, + "end": 397, + "ctxt": 0 + }, + "callee": { + "type": "Identifier", + "span": { + "start": 394, + "end": 395, + "ctxt": 0 + }, + "value": "x", + "optional": false + }, + "arguments": [], + "typeArguments": null + }, + "property": { + "type": "Identifier", + "span": { + "start": 398, + "end": 399, + "ctxt": 0 + }, + "value": "y", + "optional": false + } + }, + "arguments": [], + "typeArguments": null + } + } + ], + "body": [], + "superClass": null, + "isAbstract": false, + "typeParams": null, + "superTypeParams": null, + "implements": [] + } + ] + }, + { + "type": "BlockStatement", + "span": { + "start": 417, + "end": 438, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ClassDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 432, + "end": 433, + "ctxt": 0 + }, + "value": "C", + "optional": false + }, + "declare": false, + "span": { + "start": 419, + "end": 436, + "ctxt": 0 + }, + "decorators": [ + { + "type": "Decorator", + "span": { + "start": 419, + "end": 425, + "ctxt": 0 + }, + "expression": { + "type": "TaggedTemplateExpression", + "span": { + "start": 421, + "end": 424, + "ctxt": 0 + }, + "tag": { + "type": "Identifier", + "span": { + "start": 421, + "end": 422, + "ctxt": 0 + }, + "value": "x", + "optional": false + }, + "typeParameters": null, + "template": { + "type": "TemplateLiteral", + "span": { + "start": 422, + "end": 424, + "ctxt": 0 + }, + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "span": { + "start": 423, + "end": 423, + "ctxt": 0 + }, + "tail": true, + "cooked": "", + "raw": "" + } + ] + } + } + } + ], + "body": [], + "superClass": null, + "isAbstract": false, + "typeParams": null, + "superTypeParams": null, + "implements": [] + } + ] + }, + { + "type": "BlockStatement", + "span": { + "start": 440, + "end": 463, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ClassDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 457, + "end": 458, + "ctxt": 0 + }, + "value": "C", + "optional": false + }, + "declare": false, + "span": { + "start": 442, + "end": 461, + "ctxt": 0 + }, + "decorators": [ + { + "type": "Decorator", + "span": { + "start": 442, + "end": 450, + "ctxt": 0 + }, + "expression": { + "type": "TaggedTemplateExpression", + "span": { + "start": 444, + "end": 449, + "ctxt": 0 + }, + "tag": { + "type": "MemberExpression", + "span": { + "start": 444, + "end": 447, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 444, + "end": 445, + "ctxt": 0 + }, + "value": "x", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 446, + "end": 447, + "ctxt": 0 + }, + "value": "y", + "optional": false + } + }, + "typeParameters": null, + "template": { + "type": "TemplateLiteral", + "span": { + "start": 447, + "end": 449, + "ctxt": 0 + }, + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "span": { + "start": 448, + "end": 448, + "ctxt": 0 + }, + "tail": true, + "cooked": "", + "raw": "" + } + ] + } + } + } + ], + "body": [], + "superClass": null, + "isAbstract": false, + "typeParams": null, + "superTypeParams": null, + "implements": [] + } + ] + }, + { + "type": "BlockStatement", + "span": { + "start": 465, + "end": 488, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ClassDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 482, + "end": 483, + "ctxt": 0 + }, + "value": "C", + "optional": false + }, + "declare": false, + "span": { + "start": 467, + "end": 486, + "ctxt": 0 + }, + "decorators": [ + { + "type": "Decorator", + "span": { + "start": 467, + "end": 475, + "ctxt": 0 + }, + "expression": { + "type": "TsNonNullExpression", + "span": { + "start": 469, + "end": 474, + "ctxt": 0 + }, + "expression": { + "type": "OptionalChainingExpression", + "span": { + "start": 469, + "end": 473, + "ctxt": 0 + }, + "optional": true, + "base": { + "type": "MemberExpression", + "span": { + "start": 469, + "end": 473, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 469, + "end": 470, + "ctxt": 0 + }, + "value": "x", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 472, + "end": 473, + "ctxt": 0 + }, + "value": "y", + "optional": false + } + } + } + } + } + ], + "body": [], + "superClass": null, + "isAbstract": false, + "typeParams": null, + "superTypeParams": null, + "implements": [] + } + ] + }, + { + "type": "BlockStatement", + "span": { + "start": 490, + "end": 514, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ClassDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 508, + "end": 509, + "ctxt": 0 + }, + "value": "C", + "optional": false + }, + "declare": false, + "span": { + "start": 492, + "end": 512, + "ctxt": 0 + }, + "decorators": [ + { + "type": "Decorator", + "span": { + "start": 492, + "end": 501, + "ctxt": 0 + }, + "expression": { + "type": "MemberExpression", + "span": { + "start": 494, + "end": 500, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 494, + "end": 495, + "ctxt": 0 + }, + "value": "x", + "optional": false + }, + "property": { + "type": "Computed", + "span": { + "start": 495, + "end": 500, + "ctxt": 0 + }, + "expression": { + "type": "StringLiteral", + "span": { + "start": 496, + "end": 499, + "ctxt": 0 + }, + "value": "y", + "raw": "\"y\"" + } + } + } + } + ], + "body": [], + "superClass": null, + "isAbstract": false, + "typeParams": null, + "superTypeParams": null, + "implements": [] + } + ] + }, + { + "type": "BlockStatement", + "span": { + "start": 516, + "end": 542, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ClassDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 536, + "end": 537, + "ctxt": 0 + }, + "value": "C", + "optional": false + }, + "declare": false, + "span": { + "start": 518, + "end": 540, + "ctxt": 0 + }, + "decorators": [ + { + "type": "Decorator", + "span": { + "start": 518, + "end": 529, + "ctxt": 0 + }, + "expression": { + "type": "OptionalChainingExpression", + "span": { + "start": 520, + "end": 528, + "ctxt": 0 + }, + "optional": true, + "base": { + "type": "MemberExpression", + "span": { + "start": 520, + "end": 528, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 520, + "end": 521, + "ctxt": 0 + }, + "value": "x", + "optional": false + }, + "property": { + "type": "Computed", + "span": { + "start": 523, + "end": 528, + "ctxt": 0 + }, + "expression": { + "type": "StringLiteral", + "span": { + "start": 524, + "end": 527, + "ctxt": 0 + }, + "value": "y", + "raw": "\"y\"" + } + } + } + } + } + ], + "body": [], + "superClass": null, + "isAbstract": false, + "typeParams": null, + "superTypeParams": null, + "implements": [] + } + ] + }, + { + "type": "BlockStatement", + "span": { + "start": 544, + "end": 570, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ClassDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 552, + "end": 553, + "ctxt": 0 + }, + "value": "C", + "optional": false + }, + "declare": false, + "span": { + "start": 546, + "end": 568, + "ctxt": 0 + }, + "decorators": [], + "body": [ + { + "type": "ClassMethod", + "span": { + "start": 556, + "end": 566, + "ctxt": 0 + }, + "key": { + "type": "Identifier", + "span": { + "start": 560, + "end": 561, + "ctxt": 0 + }, + "value": "m", + "optional": false + }, + "function": { + "params": [], + "decorators": [ + { + "type": "Decorator", + "span": { + "start": 556, + "end": 559, + "ctxt": 0 + }, + "expression": { + "type": "TsNonNullExpression", + "span": { + "start": 557, + "end": 559, + "ctxt": 0 + }, + "expression": { + "type": "Identifier", + "span": { + "start": 557, + "end": 558, + "ctxt": 0 + }, + "value": "x", + "optional": false + } + } + } + ], + "span": { + "start": 556, + "end": 566, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 564, + "end": 566, + "ctxt": 0 + }, + "stmts": [] + }, + "generator": false, + "async": false, + "typeParameters": null, + "returnType": null + }, + "kind": "method", + "isStatic": false, + "accessibility": null, + "isAbstract": false, + "isOptional": false, + "isOverride": false + } + ], + "superClass": null, + "isAbstract": false, + "typeParams": null, + "superTypeParams": null, + "implements": [] + } + ] + }, + { + "type": "BlockStatement", + "span": { + "start": 572, + "end": 600, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ClassDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 580, + "end": 581, + "ctxt": 0 + }, + "value": "C", + "optional": false + }, + "declare": false, + "span": { + "start": 574, + "end": 598, + "ctxt": 0 + }, + "decorators": [], + "body": [ + { + "type": "ClassMethod", + "span": { + "start": 584, + "end": 596, + "ctxt": 0 + }, + "key": { + "type": "Identifier", + "span": { + "start": 590, + "end": 591, + "ctxt": 0 + }, + "value": "m", + "optional": false + }, + "function": { + "params": [], + "decorators": [ + { + "type": "Decorator", + "span": { + "start": 584, + "end": 589, + "ctxt": 0 + }, + "expression": { + "type": "TsNonNullExpression", + "span": { + "start": 585, + "end": 589, + "ctxt": 0 + }, + "expression": { + "type": "MemberExpression", + "span": { + "start": 585, + "end": 588, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 585, + "end": 586, + "ctxt": 0 + }, + "value": "x", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 587, + "end": 588, + "ctxt": 0 + }, + "value": "y", + "optional": false + } + } + } + } + ], + "span": { + "start": 584, + "end": 596, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 594, + "end": 596, + "ctxt": 0 + }, + "stmts": [] + }, + "generator": false, + "async": false, + "typeParameters": null, + "returnType": null + }, + "kind": "method", + "isStatic": false, + "accessibility": null, + "isAbstract": false, + "isOptional": false, + "isOverride": false + } + ], + "superClass": null, + "isAbstract": false, + "typeParams": null, + "superTypeParams": null, + "implements": [] + } + ] + }, + { + "type": "BlockStatement", + "span": { + "start": 602, + "end": 630, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ClassDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 610, + "end": 611, + "ctxt": 0 + }, + "value": "C", + "optional": false + }, + "declare": false, + "span": { + "start": 604, + "end": 628, + "ctxt": 0 + }, + "decorators": [], + "body": [ + { + "type": "ClassMethod", + "span": { + "start": 614, + "end": 626, + "ctxt": 0 + }, + "key": { + "type": "Identifier", + "span": { + "start": 620, + "end": 621, + "ctxt": 0 + }, + "value": "m", + "optional": false + }, + "function": { + "params": [], + "decorators": [ + { + "type": "Decorator", + "span": { + "start": 614, + "end": 619, + "ctxt": 0 + }, + "expression": { + "type": "MemberExpression", + "span": { + "start": 615, + "end": 619, + "ctxt": 0 + }, + "object": { + "type": "TsNonNullExpression", + "span": { + "start": 615, + "end": 617, + "ctxt": 0 + }, + "expression": { + "type": "Identifier", + "span": { + "start": 615, + "end": 616, + "ctxt": 0 + }, + "value": "x", + "optional": false + } + }, + "property": { + "type": "Identifier", + "span": { + "start": 618, + "end": 619, + "ctxt": 0 + }, + "value": "y", + "optional": false + } + } + } + ], + "span": { + "start": 614, + "end": 626, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 624, + "end": 626, + "ctxt": 0 + }, + "stmts": [] + }, + "generator": false, + "async": false, + "typeParameters": null, + "returnType": null + }, + "kind": "method", + "isStatic": false, + "accessibility": null, + "isAbstract": false, + "isOptional": false, + "isOverride": false + } + ], + "superClass": null, + "isAbstract": false, + "typeParams": null, + "superTypeParams": null, + "implements": [] + } + ] + }, + { + "type": "BlockStatement", + "span": { + "start": 632, + "end": 667, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ClassDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 640, + "end": 641, + "ctxt": 0 + }, + "value": "C", + "optional": false + }, + "declare": false, + "span": { + "start": 634, + "end": 665, + "ctxt": 0 + }, + "decorators": [], + "body": [ + { + "type": "ClassMethod", + "span": { + "start": 644, + "end": 663, + "ctxt": 0 + }, + "key": { + "type": "Identifier", + "span": { + "start": 657, + "end": 658, + "ctxt": 0 + }, + "value": "m", + "optional": false + }, + "function": { + "params": [], + "decorators": [ + { + "type": "Decorator", + "span": { + "start": 644, + "end": 656, + "ctxt": 0 + }, + "expression": { + "type": "CallExpression", + "span": { + "start": 645, + "end": 656, + "ctxt": 0 + }, + "callee": { + "type": "Identifier", + "span": { + "start": 645, + "end": 646, + "ctxt": 0 + }, + "value": "g", + "optional": false + }, + "arguments": [], + "typeArguments": { + "type": "TsTypeParameterInstantiation", + "span": { + "start": 646, + "end": 654, + "ctxt": 0 + }, + "params": [ + { + "type": "TsKeywordType", + "span": { + "start": 647, + "end": 653, + "ctxt": 0 + }, + "kind": "number" + } + ] + } + } + } + ], + "span": { + "start": 644, + "end": 663, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 661, + "end": 663, + "ctxt": 0 + }, + "stmts": [] + }, + "generator": false, + "async": false, + "typeParameters": null, + "returnType": null + }, + "kind": "method", + "isStatic": false, + "accessibility": null, + "isAbstract": false, + "isOptional": false, + "isOverride": false + } + ], + "superClass": null, + "isAbstract": false, + "typeParams": null, + "superTypeParams": null, + "implements": [] + } + ] + }, + { + "type": "BlockStatement", + "span": { + "start": 669, + "end": 704, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ClassDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 677, + "end": 678, + "ctxt": 0 + }, + "value": "C", + "optional": false + }, + "declare": false, + "span": { + "start": 671, + "end": 702, + "ctxt": 0 + }, + "decorators": [], + "body": [ + { + "type": "ClassMethod", + "span": { + "start": 681, + "end": 700, + "ctxt": 0 + }, + "key": { + "type": "Identifier", + "span": { + "start": 694, + "end": 695, + "ctxt": 0 + }, + "value": "m", + "optional": false + }, + "function": { + "params": [], + "decorators": [ + { + "type": "Decorator", + "span": { + "start": 681, + "end": 693, + "ctxt": 0 + }, + "expression": { + "type": "TsInstantiation", + "span": { + "start": 683, + "end": 692, + "ctxt": 0 + }, + "expression": { + "type": "Identifier", + "span": { + "start": 683, + "end": 684, + "ctxt": 0 + }, + "value": "g", + "optional": false + }, + "typeArguments": { + "type": "TsTypeParameterInstantiation", + "span": { + "start": 684, + "end": 692, + "ctxt": 0 + }, + "params": [ + { + "type": "TsKeywordType", + "span": { + "start": 685, + "end": 691, + "ctxt": 0 + }, + "kind": "number" + } + ] + } + } + } + ], + "span": { + "start": 681, + "end": 700, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 698, + "end": 700, + "ctxt": 0 + }, + "stmts": [] + }, + "generator": false, + "async": false, + "typeParameters": null, + "returnType": null + }, + "kind": "method", + "isStatic": false, + "accessibility": null, + "isAbstract": false, + "isOptional": false, + "isOverride": false + } + ], + "superClass": null, + "isAbstract": false, + "typeParams": null, + "superTypeParams": null, + "implements": [] + } + ] + }, + { + "type": "BlockStatement", + "span": { + "start": 706, + "end": 743, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ClassDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 714, + "end": 715, + "ctxt": 0 + }, + "value": "C", + "optional": false + }, + "declare": false, + "span": { + "start": 708, + "end": 741, + "ctxt": 0 + }, + "decorators": [], + "body": [ + { + "type": "ClassMethod", + "span": { + "start": 718, + "end": 739, + "ctxt": 0 + }, + "key": { + "type": "Identifier", + "span": { + "start": 733, + "end": 734, + "ctxt": 0 + }, + "value": "m", + "optional": false + }, + "function": { + "params": [], + "decorators": [ + { + "type": "Decorator", + "span": { + "start": 718, + "end": 732, + "ctxt": 0 + }, + "expression": { + "type": "TsInstantiation", + "span": { + "start": 720, + "end": 731, + "ctxt": 0 + }, + "expression": { + "type": "CallExpression", + "span": { + "start": 720, + "end": 723, + "ctxt": 0 + }, + "callee": { + "type": "Identifier", + "span": { + "start": 720, + "end": 721, + "ctxt": 0 + }, + "value": "h", + "optional": false + }, + "arguments": [], + "typeArguments": null + }, + "typeArguments": { + "type": "TsTypeParameterInstantiation", + "span": { + "start": 723, + "end": 731, + "ctxt": 0 + }, + "params": [ + { + "type": "TsKeywordType", + "span": { + "start": 724, + "end": 730, + "ctxt": 0 + }, + "kind": "number" + } + ] + } + } + } + ], + "span": { + "start": 718, + "end": 739, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 737, + "end": 739, + "ctxt": 0 + }, + "stmts": [] + }, + "generator": false, + "async": false, + "typeParameters": null, + "returnType": null + }, + "kind": "method", + "isStatic": false, + "accessibility": null, + "isAbstract": false, + "isOptional": false, + "isOverride": false + } + ], + "superClass": null, + "isAbstract": false, + "typeParams": null, + "superTypeParams": null, + "implements": [] + } + ] + }, + { + "type": "BlockStatement", + "span": { + "start": 745, + "end": 776, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ClassDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 753, + "end": 754, + "ctxt": 0 + }, + "value": "C", + "optional": false + }, + "declare": false, + "span": { + "start": 747, + "end": 774, + "ctxt": 0 + }, + "decorators": [], + "body": [ + { + "type": "ClassMethod", + "span": { + "start": 757, + "end": 772, + "ctxt": 0 + }, + "key": { + "type": "Identifier", + "span": { + "start": 766, + "end": 767, + "ctxt": 0 + }, + "value": "m", + "optional": false + }, + "function": { + "params": [], + "decorators": [ + { + "type": "Decorator", + "span": { + "start": 757, + "end": 765, + "ctxt": 0 + }, + "expression": { + "type": "MemberExpression", + "span": { + "start": 759, + "end": 764, + "ctxt": 0 + }, + "object": { + "type": "CallExpression", + "span": { + "start": 759, + "end": 762, + "ctxt": 0 + }, + "callee": { + "type": "Identifier", + "span": { + "start": 759, + "end": 760, + "ctxt": 0 + }, + "value": "x", + "optional": false + }, + "arguments": [], + "typeArguments": null + }, + "property": { + "type": "Identifier", + "span": { + "start": 763, + "end": 764, + "ctxt": 0 + }, + "value": "y", + "optional": false + } + } + } + ], + "span": { + "start": 757, + "end": 772, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 770, + "end": 772, + "ctxt": 0 + }, + "stmts": [] + }, + "generator": false, + "async": false, + "typeParameters": null, + "returnType": null + }, + "kind": "method", + "isStatic": false, + "accessibility": null, + "isAbstract": false, + "isOptional": false, + "isOverride": false + } + ], + "superClass": null, + "isAbstract": false, + "typeParams": null, + "superTypeParams": null, + "implements": [] + } + ] + }, + { + "type": "BlockStatement", + "span": { + "start": 778, + "end": 811, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ClassDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 786, + "end": 787, + "ctxt": 0 + }, + "value": "C", + "optional": false + }, + "declare": false, + "span": { + "start": 780, + "end": 809, + "ctxt": 0 + }, + "decorators": [], + "body": [ + { + "type": "ClassMethod", + "span": { + "start": 790, + "end": 807, + "ctxt": 0 + }, + "key": { + "type": "Identifier", + "span": { + "start": 801, + "end": 802, + "ctxt": 0 + }, + "value": "m", + "optional": false + }, + "function": { + "params": [], + "decorators": [ + { + "type": "Decorator", + "span": { + "start": 790, + "end": 800, + "ctxt": 0 + }, + "expression": { + "type": "CallExpression", + "span": { + "start": 792, + "end": 799, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 792, + "end": 797, + "ctxt": 0 + }, + "object": { + "type": "CallExpression", + "span": { + "start": 792, + "end": 795, + "ctxt": 0 + }, + "callee": { + "type": "Identifier", + "span": { + "start": 792, + "end": 793, + "ctxt": 0 + }, + "value": "x", + "optional": false + }, + "arguments": [], + "typeArguments": null + }, + "property": { + "type": "Identifier", + "span": { + "start": 796, + "end": 797, + "ctxt": 0 + }, + "value": "y", + "optional": false + } + }, + "arguments": [], + "typeArguments": null + } + } + ], + "span": { + "start": 790, + "end": 807, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 805, + "end": 807, + "ctxt": 0 + }, + "stmts": [] + }, + "generator": false, + "async": false, + "typeParameters": null, + "returnType": null + }, + "kind": "method", + "isStatic": false, + "accessibility": null, + "isAbstract": false, + "isOptional": false, + "isOverride": false + } + ], + "superClass": null, + "isAbstract": false, + "typeParams": null, + "superTypeParams": null, + "implements": [] + } + ] + }, + { + "type": "BlockStatement", + "span": { + "start": 813, + "end": 842, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ClassDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 821, + "end": 822, + "ctxt": 0 + }, + "value": "C", + "optional": false + }, + "declare": false, + "span": { + "start": 815, + "end": 840, + "ctxt": 0 + }, + "decorators": [], + "body": [ + { + "type": "ClassMethod", + "span": { + "start": 825, + "end": 838, + "ctxt": 0 + }, + "key": { + "type": "Identifier", + "span": { + "start": 832, + "end": 833, + "ctxt": 0 + }, + "value": "m", + "optional": false + }, + "function": { + "params": [], + "decorators": [ + { + "type": "Decorator", + "span": { + "start": 825, + "end": 831, + "ctxt": 0 + }, + "expression": { + "type": "TaggedTemplateExpression", + "span": { + "start": 827, + "end": 830, + "ctxt": 0 + }, + "tag": { + "type": "Identifier", + "span": { + "start": 827, + "end": 828, + "ctxt": 0 + }, + "value": "x", + "optional": false + }, + "typeParameters": null, + "template": { + "type": "TemplateLiteral", + "span": { + "start": 828, + "end": 830, + "ctxt": 0 + }, + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "span": { + "start": 829, + "end": 829, + "ctxt": 0 + }, + "tail": true, + "cooked": "", + "raw": "" + } + ] + } + } + } + ], + "span": { + "start": 825, + "end": 838, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 836, + "end": 838, + "ctxt": 0 + }, + "stmts": [] + }, + "generator": false, + "async": false, + "typeParameters": null, + "returnType": null + }, + "kind": "method", + "isStatic": false, + "accessibility": null, + "isAbstract": false, + "isOptional": false, + "isOverride": false + } + ], + "superClass": null, + "isAbstract": false, + "typeParams": null, + "superTypeParams": null, + "implements": [] + } + ] + }, + { + "type": "BlockStatement", + "span": { + "start": 844, + "end": 875, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ClassDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 852, + "end": 853, + "ctxt": 0 + }, + "value": "C", + "optional": false + }, + "declare": false, + "span": { + "start": 846, + "end": 873, + "ctxt": 0 + }, + "decorators": [], + "body": [ + { + "type": "ClassMethod", + "span": { + "start": 856, + "end": 871, + "ctxt": 0 + }, + "key": { + "type": "Identifier", + "span": { + "start": 865, + "end": 866, + "ctxt": 0 + }, + "value": "m", + "optional": false + }, + "function": { + "params": [], + "decorators": [ + { + "type": "Decorator", + "span": { + "start": 856, + "end": 864, + "ctxt": 0 + }, + "expression": { + "type": "TaggedTemplateExpression", + "span": { + "start": 858, + "end": 863, + "ctxt": 0 + }, + "tag": { + "type": "MemberExpression", + "span": { + "start": 858, + "end": 861, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 858, + "end": 859, + "ctxt": 0 + }, + "value": "x", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 860, + "end": 861, + "ctxt": 0 + }, + "value": "y", + "optional": false + } + }, + "typeParameters": null, + "template": { + "type": "TemplateLiteral", + "span": { + "start": 861, + "end": 863, + "ctxt": 0 + }, + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "span": { + "start": 862, + "end": 862, + "ctxt": 0 + }, + "tail": true, + "cooked": "", + "raw": "" + } + ] + } + } + } + ], + "span": { + "start": 856, + "end": 871, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 869, + "end": 871, + "ctxt": 0 + }, + "stmts": [] + }, + "generator": false, + "async": false, + "typeParameters": null, + "returnType": null + }, + "kind": "method", + "isStatic": false, + "accessibility": null, + "isAbstract": false, + "isOptional": false, + "isOverride": false + } + ], + "superClass": null, + "isAbstract": false, + "typeParams": null, + "superTypeParams": null, + "implements": [] + } + ] + }, + { + "type": "BlockStatement", + "span": { + "start": 877, + "end": 908, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ClassDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 885, + "end": 886, + "ctxt": 0 + }, + "value": "C", + "optional": false + }, + "declare": false, + "span": { + "start": 879, + "end": 906, + "ctxt": 0 + }, + "decorators": [], + "body": [ + { + "type": "ClassMethod", + "span": { + "start": 889, + "end": 904, + "ctxt": 0 + }, + "key": { + "type": "Identifier", + "span": { + "start": 898, + "end": 899, + "ctxt": 0 + }, + "value": "m", + "optional": false + }, + "function": { + "params": [], + "decorators": [ + { + "type": "Decorator", + "span": { + "start": 889, + "end": 897, + "ctxt": 0 + }, + "expression": { + "type": "TsNonNullExpression", + "span": { + "start": 891, + "end": 896, + "ctxt": 0 + }, + "expression": { + "type": "OptionalChainingExpression", + "span": { + "start": 891, + "end": 895, + "ctxt": 0 + }, + "optional": true, + "base": { + "type": "MemberExpression", + "span": { + "start": 891, + "end": 895, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 891, + "end": 892, + "ctxt": 0 + }, + "value": "x", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 894, + "end": 895, + "ctxt": 0 + }, + "value": "y", + "optional": false + } + } + } + } + } + ], + "span": { + "start": 889, + "end": 904, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 902, + "end": 904, + "ctxt": 0 + }, + "stmts": [] + }, + "generator": false, + "async": false, + "typeParameters": null, + "returnType": null + }, + "kind": "method", + "isStatic": false, + "accessibility": null, + "isAbstract": false, + "isOptional": false, + "isOverride": false + } + ], + "superClass": null, + "isAbstract": false, + "typeParams": null, + "superTypeParams": null, + "implements": [] + } + ] + }, + { + "type": "BlockStatement", + "span": { + "start": 910, + "end": 942, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ClassDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 918, + "end": 919, + "ctxt": 0 + }, + "value": "C", + "optional": false + }, + "declare": false, + "span": { + "start": 912, + "end": 940, + "ctxt": 0 + }, + "decorators": [], + "body": [ + { + "type": "ClassMethod", + "span": { + "start": 922, + "end": 938, + "ctxt": 0 + }, + "key": { + "type": "Identifier", + "span": { + "start": 932, + "end": 933, + "ctxt": 0 + }, + "value": "m", + "optional": false + }, + "function": { + "params": [], + "decorators": [ + { + "type": "Decorator", + "span": { + "start": 922, + "end": 931, + "ctxt": 0 + }, + "expression": { + "type": "MemberExpression", + "span": { + "start": 924, + "end": 930, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 924, + "end": 925, + "ctxt": 0 + }, + "value": "x", + "optional": false + }, + "property": { + "type": "Computed", + "span": { + "start": 925, + "end": 930, + "ctxt": 0 + }, + "expression": { + "type": "StringLiteral", + "span": { + "start": 926, + "end": 929, + "ctxt": 0 + }, + "value": "y", + "raw": "\"y\"" + } + } + } + } + ], + "span": { + "start": 922, + "end": 938, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 936, + "end": 938, + "ctxt": 0 + }, + "stmts": [] + }, + "generator": false, + "async": false, + "typeParameters": null, + "returnType": null + }, + "kind": "method", + "isStatic": false, + "accessibility": null, + "isAbstract": false, + "isOptional": false, + "isOverride": false + } + ], + "superClass": null, + "isAbstract": false, + "typeParams": null, + "superTypeParams": null, + "implements": [] + } + ] + }, + { + "type": "BlockStatement", + "span": { + "start": 944, + "end": 978, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ClassDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 952, + "end": 953, + "ctxt": 0 + }, + "value": "C", + "optional": false + }, + "declare": false, + "span": { + "start": 946, + "end": 976, + "ctxt": 0 + }, + "decorators": [], + "body": [ + { + "type": "ClassMethod", + "span": { + "start": 956, + "end": 974, + "ctxt": 0 + }, + "key": { + "type": "Identifier", + "span": { + "start": 968, + "end": 969, + "ctxt": 0 + }, + "value": "m", + "optional": false + }, + "function": { + "params": [], + "decorators": [ + { + "type": "Decorator", + "span": { + "start": 956, + "end": 967, + "ctxt": 0 + }, + "expression": { + "type": "OptionalChainingExpression", + "span": { + "start": 958, + "end": 966, + "ctxt": 0 + }, + "optional": true, + "base": { + "type": "MemberExpression", + "span": { + "start": 958, + "end": 966, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 958, + "end": 959, + "ctxt": 0 + }, + "value": "x", + "optional": false + }, + "property": { + "type": "Computed", + "span": { + "start": 961, + "end": 966, + "ctxt": 0 + }, + "expression": { + "type": "StringLiteral", + "span": { + "start": 962, + "end": 965, + "ctxt": 0 + }, + "value": "y", + "raw": "\"y\"" + } + } + } + } + } + ], + "span": { + "start": 956, + "end": 974, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 972, + "end": 974, + "ctxt": 0 + }, + "stmts": [] + }, + "generator": false, + "async": false, + "typeParameters": null, + "returnType": null + }, + "kind": "method", + "isStatic": false, + "accessibility": null, + "isAbstract": false, + "isOptional": false, + "isOverride": false + } + ], + "superClass": null, + "isAbstract": false, + "typeParams": null, + "superTypeParams": null, + "implements": [] + } + ] + } + ], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/tsc/esDecorators-decoratorExpression.2.ts b/crates/swc_ecma_parser/tests/tsc/esDecorators-decoratorExpression.2.ts new file mode 100644 index 000000000000..36903099cb6d --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/esDecorators-decoratorExpression.2.ts @@ -0,0 +1,60 @@ +// @target: esnext +// @experimentalDecorators: * +// @noEmitHelpers: true +// @noTypesAndSymbols: true + +declare let x: any; +declare let g: (...args: any) => any; +declare let h: () => (...args: any) => any; + +{ @x! class C {} } + +{ @x.y! class C {} } + +{ @x!.y class C {} } + +{ @g() class C {} } + +{ @(g) class C {} } + +{ @(h()) class C {} } + +{ @(x().y) class C {} } + +{ @(x().y()) class C {} } + +{ @(x``) class C {} } + +{ @(x.y``) class C {} } + +{ @(x?.y!) class C {} } + +{ @(x["y"]) class C {} } + +{ @(x?.["y"]) class C {} } + +{ class C { @x! m() {} } } + +{ class C { @x.y! m() {} } } + +{ class C { @x!.y m() {} } } + +{ class C { @g() m() {} } } + +{ class C { @(g) m() {} } } + +{ class C { @(h()) m() {} } } + +{ class C { @(x().y) m() {} } } + +{ class C { @(x().y()) m() {} } } + +{ class C { @(x``) m() {} } } + +{ class C { @(x.y``) m() {} } } + +{ class C { @(x?.y!) m() {} } } + +{ class C { @(x["y"]) m() {} } } + +{ class C { @(x?.["y"]) m() {} } } diff --git a/crates/swc_ecma_parser/tests/tsc/esDecorators-preservesThis.ts b/crates/swc_ecma_parser/tests/tsc/esDecorators-preservesThis.ts index e1c688099f96..6972c8287068 100644 --- a/crates/swc_ecma_parser/tests/tsc/esDecorators-preservesThis.ts +++ b/crates/swc_ecma_parser/tests/tsc/esDecorators-preservesThis.ts @@ -24,7 +24,7 @@ class C { class D extends DecoratorProvider { m() { class C { - @super.decorate + @(super.decorate) method1() { } @(super["decorate"]) diff --git a/crates/swc_ecma_parser/tests/tsc/exportAndImport-es3-amd.json b/crates/swc_ecma_parser/tests/tsc/exportAndImport-es3-amd.json deleted file mode 100644 index e25c7d79af45..000000000000 --- a/crates/swc_ecma_parser/tests/tsc/exportAndImport-es3-amd.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "type": "Module", - "span": { - "start": 52, - "end": 171, - "ctxt": 0 - }, - "body": [ - { - "type": "ExportDefaultDeclaration", - "span": { - "start": 52, - "end": 84, - "ctxt": 0 - }, - "decl": { - "type": "FunctionExpression", - "identifier": { - "type": "Identifier", - "span": { - "start": 76, - "end": 78, - "ctxt": 0 - }, - "value": "f1", - "optional": false - }, - "params": [], - "decorators": [], - "span": { - "start": 67, - "end": 84, - "ctxt": 0 - }, - "body": { - "type": "BlockStatement", - "span": { - "start": 81, - "end": 84, - "ctxt": 0 - }, - "stmts": [] - }, - "generator": false, - "async": false, - "typeParameters": null, - "returnType": null - } - }, - { - "type": "ImportDeclaration", - "span": { - "start": 106, - "end": 128, - "ctxt": 0 - }, - "specifiers": [ - { - "type": "ImportDefaultSpecifier", - "span": { - "start": 113, - "end": 115, - "ctxt": 0 - }, - "local": { - "type": "Identifier", - "span": { - "start": 113, - "end": 115, - "ctxt": 0 - }, - "value": "f1", - "optional": false - } - } - ], - "source": { - "type": "StringLiteral", - "span": { - "start": 121, - "end": 127, - "ctxt": 0 - }, - "value": "./m1", - "raw": "\"./m1\"" - }, - "typeOnly": false, - "with": null, - "phase": "evaluation" - }, - { - "type": "ExportDefaultDeclaration", - "span": { - "start": 129, - "end": 171, - "ctxt": 0 - }, - "decl": { - "type": "FunctionExpression", - "identifier": { - "type": "Identifier", - "span": { - "start": 153, - "end": 155, - "ctxt": 0 - }, - "value": "f2", - "optional": false - }, - "params": [], - "decorators": [], - "span": { - "start": 144, - "end": 171, - "ctxt": 0 - }, - "body": { - "type": "BlockStatement", - "span": { - "start": 158, - "end": 171, - "ctxt": 0 - }, - "stmts": [ - { - "type": "ExpressionStatement", - "span": { - "start": 164, - "end": 169, - "ctxt": 0 - }, - "expression": { - "type": "CallExpression", - "span": { - "start": 164, - "end": 168, - "ctxt": 0 - }, - "callee": { - "type": "Identifier", - "span": { - "start": 164, - "end": 166, - "ctxt": 0 - }, - "value": "f1", - "optional": false - }, - "arguments": [], - "typeArguments": null - } - } - ] - }, - "generator": false, - "async": false, - "typeParameters": null, - "returnType": null - } - } - ], - "interpreter": null -} diff --git a/crates/swc_ecma_parser/tests/tsc/exportAndImport-es3-amd.ts b/crates/swc_ecma_parser/tests/tsc/exportAndImport-es3-amd.ts deleted file mode 100644 index 725230dbe6d0..000000000000 --- a/crates/swc_ecma_parser/tests/tsc/exportAndImport-es3-amd.ts +++ /dev/null @@ -1,12 +0,0 @@ -//@module: amd -//@target: ES3 - -// @filename: m1.ts -export default function f1() { -} - -// @filename: m2.ts -import f1 from "./m1"; -export default function f2() { - f1(); -} diff --git a/crates/swc_ecma_parser/tests/tsc/exportAndImport-es3.json b/crates/swc_ecma_parser/tests/tsc/exportAndImport-es3.json deleted file mode 100644 index 61d7986a4bd6..000000000000 --- a/crates/swc_ecma_parser/tests/tsc/exportAndImport-es3.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "type": "Module", - "span": { - "start": 57, - "end": 174, - "ctxt": 0 - }, - "body": [ - { - "type": "ExportDefaultDeclaration", - "span": { - "start": 57, - "end": 89, - "ctxt": 0 - }, - "decl": { - "type": "FunctionExpression", - "identifier": { - "type": "Identifier", - "span": { - "start": 81, - "end": 83, - "ctxt": 0 - }, - "value": "f1", - "optional": false - }, - "params": [], - "decorators": [], - "span": { - "start": 72, - "end": 89, - "ctxt": 0 - }, - "body": { - "type": "BlockStatement", - "span": { - "start": 86, - "end": 89, - "ctxt": 0 - }, - "stmts": [] - }, - "generator": false, - "async": false, - "typeParameters": null, - "returnType": null - } - }, - { - "type": "ImportDeclaration", - "span": { - "start": 111, - "end": 133, - "ctxt": 0 - }, - "specifiers": [ - { - "type": "ImportDefaultSpecifier", - "span": { - "start": 118, - "end": 120, - "ctxt": 0 - }, - "local": { - "type": "Identifier", - "span": { - "start": 118, - "end": 120, - "ctxt": 0 - }, - "value": "f1", - "optional": false - } - } - ], - "source": { - "type": "StringLiteral", - "span": { - "start": 126, - "end": 132, - "ctxt": 0 - }, - "value": "./m1", - "raw": "\"./m1\"" - }, - "typeOnly": false, - "with": null, - "phase": "evaluation" - }, - { - "type": "ExportDefaultDeclaration", - "span": { - "start": 134, - "end": 174, - "ctxt": 0 - }, - "decl": { - "type": "FunctionExpression", - "identifier": { - "type": "Identifier", - "span": { - "start": 158, - "end": 160, - "ctxt": 0 - }, - "value": "f2", - "optional": false - }, - "params": [], - "decorators": [], - "span": { - "start": 149, - "end": 174, - "ctxt": 0 - }, - "body": { - "type": "BlockStatement", - "span": { - "start": 163, - "end": 174, - "ctxt": 0 - }, - "stmts": [ - { - "type": "ExpressionStatement", - "span": { - "start": 167, - "end": 172, - "ctxt": 0 - }, - "expression": { - "type": "CallExpression", - "span": { - "start": 167, - "end": 171, - "ctxt": 0 - }, - "callee": { - "type": "Identifier", - "span": { - "start": 167, - "end": 169, - "ctxt": 0 - }, - "value": "f1", - "optional": false - }, - "arguments": [], - "typeArguments": null - } - } - ] - }, - "generator": false, - "async": false, - "typeParameters": null, - "returnType": null - } - } - ], - "interpreter": null -} diff --git a/crates/swc_ecma_parser/tests/tsc/exportAndImport-es3.ts b/crates/swc_ecma_parser/tests/tsc/exportAndImport-es3.ts deleted file mode 100644 index fbb6ad5f20bf..000000000000 --- a/crates/swc_ecma_parser/tests/tsc/exportAndImport-es3.ts +++ /dev/null @@ -1,12 +0,0 @@ -//@module: commonjs -//@target: ES3 - -// @filename: m1.ts -export default function f1() { -} - -// @filename: m2.ts -import f1 from "./m1"; -export default function f2() { - f1(); -} diff --git a/crates/swc_ecma_parser/tests/tsc/exportDefaultInJsFile01.ts b/crates/swc_ecma_parser/tests/tsc/exportDefaultInJsFile01.ts index 7bb17d6a6019..e07f8fbfb3f8 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportDefaultInJsFile01.ts +++ b/crates/swc_ecma_parser/tests/tsc/exportDefaultInJsFile01.ts @@ -1,5 +1,5 @@ // @allowJS: true -// @target: es3 +// @target: es5 // @module: commonjs // @filename: myFile01.js diff --git a/crates/swc_ecma_parser/tests/tsc/exportsAndImportsWithUnderscores2.ts b/crates/swc_ecma_parser/tests/tsc/exportsAndImportsWithUnderscores2.ts index 26c123f2aa20..dc2381cd207f 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportsAndImportsWithUnderscores2.ts +++ b/crates/swc_ecma_parser/tests/tsc/exportsAndImportsWithUnderscores2.ts @@ -1,5 +1,5 @@ //@module: commonjs -//@target: ES3 +//@target: ES5 // @filename: m1.ts var R: any diff --git a/crates/swc_ecma_parser/tests/tsc/exportsAndImportsWithUnderscores3.ts b/crates/swc_ecma_parser/tests/tsc/exportsAndImportsWithUnderscores3.ts index 6eb6351ad684..03b7a008e2fc 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportsAndImportsWithUnderscores3.ts +++ b/crates/swc_ecma_parser/tests/tsc/exportsAndImportsWithUnderscores3.ts @@ -1,5 +1,5 @@ //@module: commonjs -//@target: ES3 +//@target: ES5 // @filename: m1.ts var R: any diff --git a/crates/swc_ecma_parser/tests/tsc/exportsAndImportsWithUnderscores4.ts b/crates/swc_ecma_parser/tests/tsc/exportsAndImportsWithUnderscores4.ts index 3c40d1986705..93b86c9b06bf 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportsAndImportsWithUnderscores4.ts +++ b/crates/swc_ecma_parser/tests/tsc/exportsAndImportsWithUnderscores4.ts @@ -1,5 +1,5 @@ //@module: commonjs -//@target: ES3 +//@target: ES5 // @filename: m1.ts declare var console: any; diff --git a/crates/swc_ecma_parser/tests/tsc/genericSetterInClassTypeJsDoc.json b/crates/swc_ecma_parser/tests/tsc/genericSetterInClassTypeJsDoc.json index 777ebcf39f07..e30b914aa4bd 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericSetterInClassTypeJsDoc.json +++ b/crates/swc_ecma_parser/tests/tsc/genericSetterInClassTypeJsDoc.json @@ -1,8 +1,8 @@ { "type": "Script", "span": { - "start": 212, - "end": 507, + "start": 216, + "end": 511, "ctxt": 0 }, "body": [ @@ -11,8 +11,8 @@ "identifier": { "type": "Identifier", "span": { - "start": 218, - "end": 221, + "start": 222, + "end": 225, "ctxt": 0 }, "value": "Box", @@ -20,8 +20,8 @@ }, "declare": false, "span": { - "start": 212, - "end": 484, + "start": 216, + "end": 488, "ctxt": 0 }, "decorators": [], @@ -29,22 +29,22 @@ { "type": "PrivateProperty", "span": { - "start": 228, - "end": 235, + "start": 232, + "end": 239, "ctxt": 0 }, "key": { "type": "PrivateName", "span": { - "start": 228, - "end": 234, + "start": 232, + "end": 238, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 229, - "end": 234, + "start": 233, + "end": 238, "ctxt": 0 }, "value": "value", @@ -64,15 +64,15 @@ { "type": "Constructor", "span": { - "start": 276, - "end": 345, + "start": 280, + "end": 349, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 276, - "end": 287, + "start": 280, + "end": 291, "ctxt": 0 }, "value": "constructor", @@ -82,16 +82,16 @@ { "type": "Parameter", "span": { - "start": 288, - "end": 300, + "start": 292, + "end": 304, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 288, - "end": 300, + "start": 292, + "end": 304, "ctxt": 0 }, "value": "initialValue", @@ -103,53 +103,53 @@ "body": { "type": "BlockStatement", "span": { - "start": 302, - "end": 345, + "start": 306, + "end": 349, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 312, - "end": 339, + "start": 316, + "end": 343, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 312, - "end": 338, + "start": 316, + "end": 342, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 312, - "end": 323, + "start": 316, + "end": 327, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 312, - "end": 316, + "start": 316, + "end": 320, "ctxt": 0 } }, "property": { "type": "PrivateName", "span": { - "start": 317, - "end": 323, + "start": 321, + "end": 327, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 318, - "end": 323, + "start": 322, + "end": 327, "ctxt": 0 }, "value": "value", @@ -160,8 +160,8 @@ "right": { "type": "Identifier", "span": { - "start": 326, - "end": 338, + "start": 330, + "end": 342, "ctxt": 0 }, "value": "initialValue", @@ -177,15 +177,15 @@ { "type": "ClassMethod", "span": { - "start": 376, - "end": 423, + "start": 380, + "end": 427, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 380, - "end": 385, + "start": 384, + "end": 389, "ctxt": 0 }, "value": "value", @@ -195,52 +195,52 @@ "params": [], "decorators": [], "span": { - "start": 376, - "end": 423, + "start": 380, + "end": 427, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 388, - "end": 423, + "start": 392, + "end": 427, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { - "start": 398, - "end": 417, + "start": 402, + "end": 421, "ctxt": 0 }, "argument": { "type": "MemberExpression", "span": { - "start": 405, - "end": 416, + "start": 409, + "end": 420, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 405, - "end": 409, + "start": 409, + "end": 413, "ctxt": 0 } }, "property": { "type": "PrivateName", "span": { - "start": 410, - "end": 416, + "start": 414, + "end": 420, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 411, - "end": 416, + "start": 415, + "end": 420, "ctxt": 0 }, "value": "value", @@ -266,15 +266,15 @@ { "type": "ClassMethod", "span": { - "start": 429, - "end": 482, + "start": 433, + "end": 486, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 433, - "end": 438, + "start": 437, + "end": 442, "ctxt": 0 }, "value": "value", @@ -285,16 +285,16 @@ { "type": "Parameter", "span": { - "start": 439, - "end": 444, + "start": 443, + "end": 448, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 439, - "end": 444, + "start": 443, + "end": 448, "ctxt": 0 }, "value": "value", @@ -305,60 +305,60 @@ ], "decorators": [], "span": { - "start": 429, - "end": 482, + "start": 433, + "end": 486, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 446, - "end": 482, + "start": 450, + "end": 486, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 456, - "end": 476, + "start": 460, + "end": 480, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 456, - "end": 475, + "start": 460, + "end": 479, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 456, - "end": 467, + "start": 460, + "end": 471, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 456, - "end": 460, + "start": 460, + "end": 464, "ctxt": 0 } }, "property": { "type": "PrivateName", "span": { - "start": 461, - "end": 467, + "start": 465, + "end": 471, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 462, - "end": 467, + "start": 466, + "end": 471, "ctxt": 0 }, "value": "value", @@ -369,8 +369,8 @@ "right": { "type": "Identifier", "span": { - "start": 470, - "end": 475, + "start": 474, + "end": 479, "ctxt": 0 }, "value": "value", @@ -402,37 +402,37 @@ { "type": "ExpressionStatement", "span": { - "start": 486, - "end": 507, + "start": 490, + "end": 511, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 486, - "end": 506, + "start": 490, + "end": 510, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 486, - "end": 502, + "start": 490, + "end": 506, "ctxt": 0 }, "object": { "type": "NewExpression", "span": { - "start": 486, - "end": 496, + "start": 490, + "end": 500, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { - "start": 490, - "end": 493, + "start": 494, + "end": 497, "ctxt": 0 }, "value": "Box", @@ -444,8 +444,8 @@ "expression": { "type": "NumericLiteral", "span": { - "start": 494, - "end": 495, + "start": 498, + "end": 499, "ctxt": 0 }, "value": 3.0, @@ -458,8 +458,8 @@ "property": { "type": "Identifier", "span": { - "start": 497, - "end": 502, + "start": 501, + "end": 506, "ctxt": 0 }, "value": "value", @@ -469,8 +469,8 @@ "right": { "type": "NumericLiteral", "span": { - "start": 505, - "end": 506, + "start": 509, + "end": 510, "ctxt": 0 }, "value": 3.0, diff --git a/crates/swc_ecma_parser/tests/tsc/genericSetterInClassTypeJsDoc.ts b/crates/swc_ecma_parser/tests/tsc/genericSetterInClassTypeJsDoc.ts index 243e8605d40a..b5cfb17a9c17 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericSetterInClassTypeJsDoc.ts +++ b/crates/swc_ecma_parser/tests/tsc/genericSetterInClassTypeJsDoc.ts @@ -4,7 +4,7 @@ // @allowJs: true // @checkJs: true // @filename: genericSetterInClassTypeJsDoc.js -// @out: genericSetterInClassTypeJsDoc-out.js +// @outFile: genericSetterInClassTypeJsDoc-out.js /** * @template T diff --git a/crates/swc_ecma_parser/tests/tsc/globalThisVarDeclaration.json b/crates/swc_ecma_parser/tests/tsc/globalThisVarDeclaration.json index f5771cd361cc..54e68ca30de4 100644 --- a/crates/swc_ecma_parser/tests/tsc/globalThisVarDeclaration.json +++ b/crates/swc_ecma_parser/tests/tsc/globalThisVarDeclaration.json @@ -1,16 +1,16 @@ { "type": "Script", "span": { - "start": 115, - "end": 483, + "start": 119, + "end": 487, "ctxt": 0 }, "body": [ { "type": "VariableDeclaration", "span": { - "start": 115, - "end": 126, + "start": 119, + "end": 130, "ctxt": 0 }, "kind": "var", @@ -19,15 +19,15 @@ { "type": "VariableDeclarator", "span": { - "start": 119, - "end": 125, + "start": 123, + "end": 129, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 119, - "end": 120, + "start": 123, + "end": 124, "ctxt": 0 }, "value": "a", @@ -37,8 +37,8 @@ "init": { "type": "NumericLiteral", "span": { - "start": 123, - "end": 125, + "start": 127, + "end": 129, "ctxt": 0 }, "value": 10.0, @@ -51,30 +51,30 @@ { "type": "ExpressionStatement", "span": { - "start": 127, - "end": 134, + "start": 131, + "end": 138, "ctxt": 0 }, "expression": { "type": "MemberExpression", "span": { - "start": 127, - "end": 133, + "start": 131, + "end": 137, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 127, - "end": 131, + "start": 131, + "end": 135, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 132, - "end": 133, + "start": 136, + "end": 137, "ctxt": 0 }, "value": "a", @@ -85,30 +85,30 @@ { "type": "ExpressionStatement", "span": { - "start": 135, - "end": 142, + "start": 139, + "end": 146, "ctxt": 0 }, "expression": { "type": "MemberExpression", "span": { - "start": 135, - "end": 141, + "start": 139, + "end": 145, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 135, - "end": 139, + "start": 139, + "end": 143, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 140, - "end": 141, + "start": 144, + "end": 145, "ctxt": 0 }, "value": "b", @@ -119,22 +119,22 @@ { "type": "ExpressionStatement", "span": { - "start": 143, - "end": 156, + "start": 147, + "end": 160, "ctxt": 0 }, "expression": { "type": "MemberExpression", "span": { - "start": 143, - "end": 155, + "start": 147, + "end": 159, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 143, - "end": 153, + "start": 147, + "end": 157, "ctxt": 0 }, "value": "globalThis", @@ -143,8 +143,8 @@ "property": { "type": "Identifier", "span": { - "start": 154, - "end": 155, + "start": 158, + "end": 159, "ctxt": 0 }, "value": "a", @@ -155,22 +155,22 @@ { "type": "ExpressionStatement", "span": { - "start": 157, - "end": 170, + "start": 161, + "end": 174, "ctxt": 0 }, "expression": { "type": "MemberExpression", "span": { - "start": 157, - "end": 169, + "start": 161, + "end": 173, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 157, - "end": 167, + "start": 161, + "end": 171, "ctxt": 0 }, "value": "globalThis", @@ -179,8 +179,8 @@ "property": { "type": "Identifier", "span": { - "start": 168, - "end": 169, + "start": 172, + "end": 173, "ctxt": 0 }, "value": "b", @@ -191,22 +191,22 @@ { "type": "ExpressionStatement", "span": { - "start": 254, - "end": 261, + "start": 258, + "end": 265, "ctxt": 0 }, "expression": { "type": "MemberExpression", "span": { - "start": 254, - "end": 260, + "start": 258, + "end": 264, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 254, - "end": 258, + "start": 258, + "end": 262, "ctxt": 0 }, "value": "self", @@ -215,8 +215,8 @@ "property": { "type": "Identifier", "span": { - "start": 259, - "end": 260, + "start": 263, + "end": 264, "ctxt": 0 }, "value": "a", @@ -227,22 +227,22 @@ { "type": "ExpressionStatement", "span": { - "start": 262, - "end": 269, + "start": 266, + "end": 273, "ctxt": 0 }, "expression": { "type": "MemberExpression", "span": { - "start": 262, - "end": 268, + "start": 266, + "end": 272, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 262, - "end": 266, + "start": 266, + "end": 270, "ctxt": 0 }, "value": "self", @@ -251,8 +251,8 @@ "property": { "type": "Identifier", "span": { - "start": 267, - "end": 268, + "start": 271, + "end": 272, "ctxt": 0 }, "value": "b", @@ -263,22 +263,22 @@ { "type": "ExpressionStatement", "span": { - "start": 270, - "end": 279, + "start": 274, + "end": 283, "ctxt": 0 }, "expression": { "type": "MemberExpression", "span": { - "start": 270, - "end": 278, + "start": 274, + "end": 282, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 270, - "end": 276, + "start": 274, + "end": 280, "ctxt": 0 }, "value": "window", @@ -287,8 +287,8 @@ "property": { "type": "Identifier", "span": { - "start": 277, - "end": 278, + "start": 281, + "end": 282, "ctxt": 0 }, "value": "a", @@ -299,22 +299,22 @@ { "type": "ExpressionStatement", "span": { - "start": 280, - "end": 289, + "start": 284, + "end": 293, "ctxt": 0 }, "expression": { "type": "MemberExpression", "span": { - "start": 280, - "end": 288, + "start": 284, + "end": 292, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 280, - "end": 286, + "start": 284, + "end": 290, "ctxt": 0 }, "value": "window", @@ -323,8 +323,8 @@ "property": { "type": "Identifier", "span": { - "start": 287, - "end": 288, + "start": 291, + "end": 292, "ctxt": 0 }, "value": "b", @@ -335,22 +335,22 @@ { "type": "ExpressionStatement", "span": { - "start": 290, - "end": 296, + "start": 294, + "end": 300, "ctxt": 0 }, "expression": { "type": "MemberExpression", "span": { - "start": 290, - "end": 295, + "start": 294, + "end": 299, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 290, - "end": 293, + "start": 294, + "end": 297, "ctxt": 0 }, "value": "top", @@ -359,8 +359,8 @@ "property": { "type": "Identifier", "span": { - "start": 294, - "end": 295, + "start": 298, + "end": 299, "ctxt": 0 }, "value": "a", @@ -371,22 +371,22 @@ { "type": "ExpressionStatement", "span": { - "start": 297, - "end": 303, + "start": 301, + "end": 307, "ctxt": 0 }, "expression": { "type": "MemberExpression", "span": { - "start": 297, - "end": 302, + "start": 301, + "end": 306, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 297, - "end": 300, + "start": 301, + "end": 304, "ctxt": 0 }, "value": "top", @@ -395,8 +395,8 @@ "property": { "type": "Identifier", "span": { - "start": 301, - "end": 302, + "start": 305, + "end": 306, "ctxt": 0 }, "value": "b", @@ -407,8 +407,8 @@ { "type": "VariableDeclaration", "span": { - "start": 329, - "end": 340, + "start": 333, + "end": 344, "ctxt": 0 }, "kind": "var", @@ -417,15 +417,15 @@ { "type": "VariableDeclarator", "span": { - "start": 333, - "end": 339, + "start": 337, + "end": 343, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 333, - "end": 334, + "start": 337, + "end": 338, "ctxt": 0 }, "value": "b", @@ -435,8 +435,8 @@ "init": { "type": "NumericLiteral", "span": { - "start": 337, - "end": 339, + "start": 341, + "end": 343, "ctxt": 0 }, "value": 10.0, @@ -449,30 +449,30 @@ { "type": "ExpressionStatement", "span": { - "start": 341, - "end": 348, + "start": 345, + "end": 352, "ctxt": 0 }, "expression": { "type": "MemberExpression", "span": { - "start": 341, - "end": 347, + "start": 345, + "end": 351, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 341, - "end": 345, + "start": 345, + "end": 349, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 346, - "end": 347, + "start": 350, + "end": 351, "ctxt": 0 }, "value": "a", @@ -483,30 +483,30 @@ { "type": "ExpressionStatement", "span": { - "start": 349, - "end": 356, + "start": 353, + "end": 360, "ctxt": 0 }, "expression": { "type": "MemberExpression", "span": { - "start": 349, - "end": 355, + "start": 353, + "end": 359, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 349, - "end": 353, + "start": 353, + "end": 357, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 354, - "end": 355, + "start": 358, + "end": 359, "ctxt": 0 }, "value": "b", @@ -517,22 +517,22 @@ { "type": "ExpressionStatement", "span": { - "start": 357, - "end": 370, + "start": 361, + "end": 374, "ctxt": 0 }, "expression": { "type": "MemberExpression", "span": { - "start": 357, - "end": 369, + "start": 361, + "end": 373, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 357, - "end": 367, + "start": 361, + "end": 371, "ctxt": 0 }, "value": "globalThis", @@ -541,8 +541,8 @@ "property": { "type": "Identifier", "span": { - "start": 368, - "end": 369, + "start": 372, + "end": 373, "ctxt": 0 }, "value": "a", @@ -553,22 +553,22 @@ { "type": "ExpressionStatement", "span": { - "start": 371, - "end": 384, + "start": 375, + "end": 388, "ctxt": 0 }, "expression": { "type": "MemberExpression", "span": { - "start": 371, - "end": 383, + "start": 375, + "end": 387, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 371, - "end": 381, + "start": 375, + "end": 385, "ctxt": 0 }, "value": "globalThis", @@ -577,8 +577,8 @@ "property": { "type": "Identifier", "span": { - "start": 382, - "end": 383, + "start": 386, + "end": 387, "ctxt": 0 }, "value": "b", @@ -589,22 +589,22 @@ { "type": "ExpressionStatement", "span": { - "start": 434, - "end": 441, + "start": 438, + "end": 445, "ctxt": 0 }, "expression": { "type": "MemberExpression", "span": { - "start": 434, - "end": 440, + "start": 438, + "end": 444, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 434, - "end": 438, + "start": 438, + "end": 442, "ctxt": 0 }, "value": "self", @@ -613,8 +613,8 @@ "property": { "type": "Identifier", "span": { - "start": 439, - "end": 440, + "start": 443, + "end": 444, "ctxt": 0 }, "value": "a", @@ -625,22 +625,22 @@ { "type": "ExpressionStatement", "span": { - "start": 442, - "end": 449, + "start": 446, + "end": 453, "ctxt": 0 }, "expression": { "type": "MemberExpression", "span": { - "start": 442, - "end": 448, + "start": 446, + "end": 452, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 442, - "end": 446, + "start": 446, + "end": 450, "ctxt": 0 }, "value": "self", @@ -649,8 +649,8 @@ "property": { "type": "Identifier", "span": { - "start": 447, - "end": 448, + "start": 451, + "end": 452, "ctxt": 0 }, "value": "b", @@ -661,22 +661,22 @@ { "type": "ExpressionStatement", "span": { - "start": 450, - "end": 459, + "start": 454, + "end": 463, "ctxt": 0 }, "expression": { "type": "MemberExpression", "span": { - "start": 450, - "end": 458, + "start": 454, + "end": 462, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 450, - "end": 456, + "start": 454, + "end": 460, "ctxt": 0 }, "value": "window", @@ -685,8 +685,8 @@ "property": { "type": "Identifier", "span": { - "start": 457, - "end": 458, + "start": 461, + "end": 462, "ctxt": 0 }, "value": "a", @@ -697,22 +697,22 @@ { "type": "ExpressionStatement", "span": { - "start": 460, - "end": 469, + "start": 464, + "end": 473, "ctxt": 0 }, "expression": { "type": "MemberExpression", "span": { - "start": 460, - "end": 468, + "start": 464, + "end": 472, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 460, - "end": 466, + "start": 464, + "end": 470, "ctxt": 0 }, "value": "window", @@ -721,8 +721,8 @@ "property": { "type": "Identifier", "span": { - "start": 467, - "end": 468, + "start": 471, + "end": 472, "ctxt": 0 }, "value": "b", @@ -733,22 +733,22 @@ { "type": "ExpressionStatement", "span": { - "start": 470, - "end": 476, + "start": 474, + "end": 480, "ctxt": 0 }, "expression": { "type": "MemberExpression", "span": { - "start": 470, - "end": 475, + "start": 474, + "end": 479, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 470, - "end": 473, + "start": 474, + "end": 477, "ctxt": 0 }, "value": "top", @@ -757,8 +757,8 @@ "property": { "type": "Identifier", "span": { - "start": 474, - "end": 475, + "start": 478, + "end": 479, "ctxt": 0 }, "value": "a", @@ -769,22 +769,22 @@ { "type": "ExpressionStatement", "span": { - "start": 477, - "end": 483, + "start": 481, + "end": 487, "ctxt": 0 }, "expression": { "type": "MemberExpression", "span": { - "start": 477, - "end": 482, + "start": 481, + "end": 486, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 477, - "end": 480, + "start": 481, + "end": 484, "ctxt": 0 }, "value": "top", @@ -793,8 +793,8 @@ "property": { "type": "Identifier", "span": { - "start": 481, - "end": 482, + "start": 485, + "end": 486, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/tsc/globalThisVarDeclaration.ts b/crates/swc_ecma_parser/tests/tsc/globalThisVarDeclaration.ts index 5b75d1095a68..1c7435902780 100644 --- a/crates/swc_ecma_parser/tests/tsc/globalThisVarDeclaration.ts +++ b/crates/swc_ecma_parser/tests/tsc/globalThisVarDeclaration.ts @@ -1,4 +1,4 @@ -// @out: output.js +// @outFile: output.js // @target: esnext // @lib: esnext, dom // @Filename: b.js diff --git a/crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3AMD.json b/crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3AMD.json deleted file mode 100644 index e09d7cbdd60b..000000000000 --- a/crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3AMD.json +++ /dev/null @@ -1,759 +0,0 @@ -{ - "type": "Module", - "span": { - "start": 68, - "end": 564, - "ctxt": 0 - }, - "body": [ - { - "type": "ExportDeclaration", - "span": { - "start": 68, - "end": 144, - "ctxt": 0 - }, - "declaration": { - "type": "FunctionDeclaration", - "identifier": { - "type": "Identifier", - "span": { - "start": 90, - "end": 92, - "ctxt": 0 - }, - "value": "fn", - "optional": false - }, - "declare": false, - "params": [], - "decorators": [], - "span": { - "start": 75, - "end": 144, - "ctxt": 0 - }, - "body": { - "type": "BlockStatement", - "span": { - "start": 95, - "end": 144, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 101, - "end": 135, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 107, - "end": 135, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 107, - "end": 110, - "ctxt": 0 - }, - "value": "req", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "AwaitExpression", - "span": { - "start": 113, - "end": 135, - "ctxt": 0 - }, - "argument": { - "type": "CallExpression", - "span": { - "start": 119, - "end": 135, - "ctxt": 0 - }, - "callee": { - "type": "Import", - "span": { - "start": 119, - "end": 125, - "ctxt": 0 - }, - "phase": "evaluation" - }, - "arguments": [ - { - "spread": null, - "expression": { - "type": "StringLiteral", - "span": { - "start": 126, - "end": 134, - "ctxt": 0 - }, - "value": "./test", - "raw": "'./test'" - } - } - ], - "typeArguments": null - } - }, - "definite": false - } - ] - } - ] - }, - "generator": false, - "async": true, - "typeParameters": null, - "returnType": null - } - }, - { - "type": "ExportDeclaration", - "span": { - "start": 146, - "end": 245, - "ctxt": 0 - }, - "declaration": { - "type": "ClassDeclaration", - "identifier": { - "type": "Identifier", - "span": { - "start": 159, - "end": 162, - "ctxt": 0 - }, - "value": "cl1", - "optional": false - }, - "declare": false, - "span": { - "start": 153, - "end": 245, - "ctxt": 0 - }, - "decorators": [], - "body": [ - { - "type": "ClassMethod", - "span": { - "start": 169, - "end": 243, - "ctxt": 0 - }, - "key": { - "type": "Identifier", - "span": { - "start": 182, - "end": 183, - "ctxt": 0 - }, - "value": "m", - "optional": false - }, - "function": { - "params": [], - "decorators": [], - "span": { - "start": 169, - "end": 243, - "ctxt": 0 - }, - "body": { - "type": "BlockStatement", - "span": { - "start": 186, - "end": 243, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 196, - "end": 230, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 202, - "end": 230, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 202, - "end": 205, - "ctxt": 0 - }, - "value": "req", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "AwaitExpression", - "span": { - "start": 208, - "end": 230, - "ctxt": 0 - }, - "argument": { - "type": "CallExpression", - "span": { - "start": 214, - "end": 230, - "ctxt": 0 - }, - "callee": { - "type": "Import", - "span": { - "start": 214, - "end": 220, - "ctxt": 0 - }, - "phase": "evaluation" - }, - "arguments": [ - { - "spread": null, - "expression": { - "type": "StringLiteral", - "span": { - "start": 221, - "end": 229, - "ctxt": 0 - }, - "value": "./test", - "raw": "'./test'" - } - } - ], - "typeArguments": null - } - }, - "definite": false - } - ] - } - ] - }, - "generator": false, - "async": true, - "typeParameters": null, - "returnType": null - }, - "kind": "method", - "isStatic": false, - "accessibility": "public", - "isAbstract": false, - "isOptional": false, - "isOverride": false - } - ], - "superClass": null, - "isAbstract": false, - "typeParams": null, - "superTypeParams": null, - "implements": [] - } - }, - { - "type": "ExportDeclaration", - "span": { - "start": 247, - "end": 348, - "ctxt": 0 - }, - "declaration": { - "type": "VariableDeclaration", - "span": { - "start": 254, - "end": 348, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 260, - "end": 348, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 260, - "end": 263, - "ctxt": 0 - }, - "value": "obj", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "ObjectExpression", - "span": { - "start": 266, - "end": 348, - "ctxt": 0 - }, - "properties": [ - { - "type": "KeyValueProperty", - "key": { - "type": "Identifier", - "span": { - "start": 272, - "end": 273, - "ctxt": 0 - }, - "value": "m", - "optional": false - }, - "value": { - "type": "ArrowFunctionExpression", - "span": { - "start": 275, - "end": 346, - "ctxt": 0 - }, - "params": [], - "body": { - "type": "BlockStatement", - "span": { - "start": 287, - "end": 346, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 297, - "end": 331, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 303, - "end": 331, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 303, - "end": 306, - "ctxt": 0 - }, - "value": "req", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "AwaitExpression", - "span": { - "start": 309, - "end": 331, - "ctxt": 0 - }, - "argument": { - "type": "CallExpression", - "span": { - "start": 315, - "end": 331, - "ctxt": 0 - }, - "callee": { - "type": "Import", - "span": { - "start": 315, - "end": 321, - "ctxt": 0 - }, - "phase": "evaluation" - }, - "arguments": [ - { - "spread": null, - "expression": { - "type": "StringLiteral", - "span": { - "start": 322, - "end": 330, - "ctxt": 0 - }, - "value": "./test", - "raw": "'./test'" - } - } - ], - "typeArguments": null - } - }, - "definite": false - } - ] - } - ] - }, - "async": true, - "generator": false, - "typeParameters": null, - "returnType": null - } - } - ] - }, - "definite": false - } - ] - } - }, - { - "type": "ExportDeclaration", - "span": { - "start": 350, - "end": 483, - "ctxt": 0 - }, - "declaration": { - "type": "ClassDeclaration", - "identifier": { - "type": "Identifier", - "span": { - "start": 363, - "end": 366, - "ctxt": 0 - }, - "value": "cl2", - "optional": false - }, - "declare": false, - "span": { - "start": 357, - "end": 483, - "ctxt": 0 - }, - "decorators": [], - "body": [ - { - "type": "ClassProperty", - "span": { - "start": 373, - "end": 481, - "ctxt": 0 - }, - "key": { - "type": "Identifier", - "span": { - "start": 380, - "end": 381, - "ctxt": 0 - }, - "value": "p", - "optional": false - }, - "value": { - "type": "ObjectExpression", - "span": { - "start": 384, - "end": 481, - "ctxt": 0 - }, - "properties": [ - { - "type": "KeyValueProperty", - "key": { - "type": "Identifier", - "span": { - "start": 394, - "end": 395, - "ctxt": 0 - }, - "value": "m", - "optional": false - }, - "value": { - "type": "ArrowFunctionExpression", - "span": { - "start": 397, - "end": 475, - "ctxt": 0 - }, - "params": [], - "body": { - "type": "BlockStatement", - "span": { - "start": 409, - "end": 475, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 423, - "end": 457, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 429, - "end": 457, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 429, - "end": 432, - "ctxt": 0 - }, - "value": "req", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "AwaitExpression", - "span": { - "start": 435, - "end": 457, - "ctxt": 0 - }, - "argument": { - "type": "CallExpression", - "span": { - "start": 441, - "end": 457, - "ctxt": 0 - }, - "callee": { - "type": "Import", - "span": { - "start": 441, - "end": 447, - "ctxt": 0 - }, - "phase": "evaluation" - }, - "arguments": [ - { - "spread": null, - "expression": { - "type": "StringLiteral", - "span": { - "start": 448, - "end": 456, - "ctxt": 0 - }, - "value": "./test", - "raw": "'./test'" - } - } - ], - "typeArguments": null - } - }, - "definite": false - } - ] - } - ] - }, - "async": true, - "generator": false, - "typeParameters": null, - "returnType": null - } - } - ] - }, - "typeAnnotation": null, - "isStatic": false, - "decorators": [], - "accessibility": "public", - "isAbstract": false, - "isOptional": false, - "isOverride": false, - "readonly": false, - "declare": false, - "definite": false - } - ], - "superClass": null, - "isAbstract": false, - "typeParams": null, - "superTypeParams": null, - "implements": [] - } - }, - { - "type": "ExportDeclaration", - "span": { - "start": 485, - "end": 564, - "ctxt": 0 - }, - "declaration": { - "type": "VariableDeclaration", - "span": { - "start": 492, - "end": 564, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 498, - "end": 564, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 498, - "end": 499, - "ctxt": 0 - }, - "value": "l", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "ArrowFunctionExpression", - "span": { - "start": 502, - "end": 564, - "ctxt": 0 - }, - "params": [], - "body": { - "type": "BlockStatement", - "span": { - "start": 514, - "end": 564, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 520, - "end": 554, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 526, - "end": 554, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 526, - "end": 529, - "ctxt": 0 - }, - "value": "req", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "AwaitExpression", - "span": { - "start": 532, - "end": 554, - "ctxt": 0 - }, - "argument": { - "type": "CallExpression", - "span": { - "start": 538, - "end": 554, - "ctxt": 0 - }, - "callee": { - "type": "Import", - "span": { - "start": 538, - "end": 544, - "ctxt": 0 - }, - "phase": "evaluation" - }, - "arguments": [ - { - "spread": null, - "expression": { - "type": "StringLiteral", - "span": { - "start": 545, - "end": 553, - "ctxt": 0 - }, - "value": "./test", - "raw": "'./test'" - } - } - ], - "typeArguments": null - } - }, - "definite": false - } - ] - } - ] - }, - "async": true, - "generator": false, - "typeParameters": null, - "returnType": null - }, - "definite": false - } - ] - } - } - ], - "interpreter": null -} diff --git a/crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3AMD.ts b/crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3AMD.ts deleted file mode 100644 index ee6c3c5d8ea4..000000000000 --- a/crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3AMD.ts +++ /dev/null @@ -1,31 +0,0 @@ -// @module: amd -// @target: es3 -// @lib: es6 -// @filename: test.ts -export async function fn() { - const req = await import('./test') // ONE -} - -export class cl1 { - public async m() { - const req = await import('./test') // TWO - } -} - -export const obj = { - m: async () => { - const req = await import('./test') // THREE - } -} - -export class cl2 { - public p = { - m: async () => { - const req = await import('./test') // FOUR - } - } -} - -export const l = async () => { - const req = await import('./test') // FIVE -} diff --git a/crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3CJS.json b/crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3CJS.json deleted file mode 100644 index d0089a7214f2..000000000000 --- a/crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3CJS.json +++ /dev/null @@ -1,759 +0,0 @@ -{ - "type": "Module", - "span": { - "start": 73, - "end": 569, - "ctxt": 0 - }, - "body": [ - { - "type": "ExportDeclaration", - "span": { - "start": 73, - "end": 149, - "ctxt": 0 - }, - "declaration": { - "type": "FunctionDeclaration", - "identifier": { - "type": "Identifier", - "span": { - "start": 95, - "end": 97, - "ctxt": 0 - }, - "value": "fn", - "optional": false - }, - "declare": false, - "params": [], - "decorators": [], - "span": { - "start": 80, - "end": 149, - "ctxt": 0 - }, - "body": { - "type": "BlockStatement", - "span": { - "start": 100, - "end": 149, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 106, - "end": 140, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 112, - "end": 140, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 112, - "end": 115, - "ctxt": 0 - }, - "value": "req", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "AwaitExpression", - "span": { - "start": 118, - "end": 140, - "ctxt": 0 - }, - "argument": { - "type": "CallExpression", - "span": { - "start": 124, - "end": 140, - "ctxt": 0 - }, - "callee": { - "type": "Import", - "span": { - "start": 124, - "end": 130, - "ctxt": 0 - }, - "phase": "evaluation" - }, - "arguments": [ - { - "spread": null, - "expression": { - "type": "StringLiteral", - "span": { - "start": 131, - "end": 139, - "ctxt": 0 - }, - "value": "./test", - "raw": "'./test'" - } - } - ], - "typeArguments": null - } - }, - "definite": false - } - ] - } - ] - }, - "generator": false, - "async": true, - "typeParameters": null, - "returnType": null - } - }, - { - "type": "ExportDeclaration", - "span": { - "start": 151, - "end": 250, - "ctxt": 0 - }, - "declaration": { - "type": "ClassDeclaration", - "identifier": { - "type": "Identifier", - "span": { - "start": 164, - "end": 167, - "ctxt": 0 - }, - "value": "cl1", - "optional": false - }, - "declare": false, - "span": { - "start": 158, - "end": 250, - "ctxt": 0 - }, - "decorators": [], - "body": [ - { - "type": "ClassMethod", - "span": { - "start": 174, - "end": 248, - "ctxt": 0 - }, - "key": { - "type": "Identifier", - "span": { - "start": 187, - "end": 188, - "ctxt": 0 - }, - "value": "m", - "optional": false - }, - "function": { - "params": [], - "decorators": [], - "span": { - "start": 174, - "end": 248, - "ctxt": 0 - }, - "body": { - "type": "BlockStatement", - "span": { - "start": 191, - "end": 248, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 201, - "end": 235, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 207, - "end": 235, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 207, - "end": 210, - "ctxt": 0 - }, - "value": "req", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "AwaitExpression", - "span": { - "start": 213, - "end": 235, - "ctxt": 0 - }, - "argument": { - "type": "CallExpression", - "span": { - "start": 219, - "end": 235, - "ctxt": 0 - }, - "callee": { - "type": "Import", - "span": { - "start": 219, - "end": 225, - "ctxt": 0 - }, - "phase": "evaluation" - }, - "arguments": [ - { - "spread": null, - "expression": { - "type": "StringLiteral", - "span": { - "start": 226, - "end": 234, - "ctxt": 0 - }, - "value": "./test", - "raw": "'./test'" - } - } - ], - "typeArguments": null - } - }, - "definite": false - } - ] - } - ] - }, - "generator": false, - "async": true, - "typeParameters": null, - "returnType": null - }, - "kind": "method", - "isStatic": false, - "accessibility": "public", - "isAbstract": false, - "isOptional": false, - "isOverride": false - } - ], - "superClass": null, - "isAbstract": false, - "typeParams": null, - "superTypeParams": null, - "implements": [] - } - }, - { - "type": "ExportDeclaration", - "span": { - "start": 252, - "end": 353, - "ctxt": 0 - }, - "declaration": { - "type": "VariableDeclaration", - "span": { - "start": 259, - "end": 353, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 265, - "end": 353, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 265, - "end": 268, - "ctxt": 0 - }, - "value": "obj", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "ObjectExpression", - "span": { - "start": 271, - "end": 353, - "ctxt": 0 - }, - "properties": [ - { - "type": "KeyValueProperty", - "key": { - "type": "Identifier", - "span": { - "start": 277, - "end": 278, - "ctxt": 0 - }, - "value": "m", - "optional": false - }, - "value": { - "type": "ArrowFunctionExpression", - "span": { - "start": 280, - "end": 351, - "ctxt": 0 - }, - "params": [], - "body": { - "type": "BlockStatement", - "span": { - "start": 292, - "end": 351, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 302, - "end": 336, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 308, - "end": 336, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 308, - "end": 311, - "ctxt": 0 - }, - "value": "req", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "AwaitExpression", - "span": { - "start": 314, - "end": 336, - "ctxt": 0 - }, - "argument": { - "type": "CallExpression", - "span": { - "start": 320, - "end": 336, - "ctxt": 0 - }, - "callee": { - "type": "Import", - "span": { - "start": 320, - "end": 326, - "ctxt": 0 - }, - "phase": "evaluation" - }, - "arguments": [ - { - "spread": null, - "expression": { - "type": "StringLiteral", - "span": { - "start": 327, - "end": 335, - "ctxt": 0 - }, - "value": "./test", - "raw": "'./test'" - } - } - ], - "typeArguments": null - } - }, - "definite": false - } - ] - } - ] - }, - "async": true, - "generator": false, - "typeParameters": null, - "returnType": null - } - } - ] - }, - "definite": false - } - ] - } - }, - { - "type": "ExportDeclaration", - "span": { - "start": 355, - "end": 488, - "ctxt": 0 - }, - "declaration": { - "type": "ClassDeclaration", - "identifier": { - "type": "Identifier", - "span": { - "start": 368, - "end": 371, - "ctxt": 0 - }, - "value": "cl2", - "optional": false - }, - "declare": false, - "span": { - "start": 362, - "end": 488, - "ctxt": 0 - }, - "decorators": [], - "body": [ - { - "type": "ClassProperty", - "span": { - "start": 378, - "end": 486, - "ctxt": 0 - }, - "key": { - "type": "Identifier", - "span": { - "start": 385, - "end": 386, - "ctxt": 0 - }, - "value": "p", - "optional": false - }, - "value": { - "type": "ObjectExpression", - "span": { - "start": 389, - "end": 486, - "ctxt": 0 - }, - "properties": [ - { - "type": "KeyValueProperty", - "key": { - "type": "Identifier", - "span": { - "start": 399, - "end": 400, - "ctxt": 0 - }, - "value": "m", - "optional": false - }, - "value": { - "type": "ArrowFunctionExpression", - "span": { - "start": 402, - "end": 480, - "ctxt": 0 - }, - "params": [], - "body": { - "type": "BlockStatement", - "span": { - "start": 414, - "end": 480, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 428, - "end": 462, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 434, - "end": 462, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 434, - "end": 437, - "ctxt": 0 - }, - "value": "req", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "AwaitExpression", - "span": { - "start": 440, - "end": 462, - "ctxt": 0 - }, - "argument": { - "type": "CallExpression", - "span": { - "start": 446, - "end": 462, - "ctxt": 0 - }, - "callee": { - "type": "Import", - "span": { - "start": 446, - "end": 452, - "ctxt": 0 - }, - "phase": "evaluation" - }, - "arguments": [ - { - "spread": null, - "expression": { - "type": "StringLiteral", - "span": { - "start": 453, - "end": 461, - "ctxt": 0 - }, - "value": "./test", - "raw": "'./test'" - } - } - ], - "typeArguments": null - } - }, - "definite": false - } - ] - } - ] - }, - "async": true, - "generator": false, - "typeParameters": null, - "returnType": null - } - } - ] - }, - "typeAnnotation": null, - "isStatic": false, - "decorators": [], - "accessibility": "public", - "isAbstract": false, - "isOptional": false, - "isOverride": false, - "readonly": false, - "declare": false, - "definite": false - } - ], - "superClass": null, - "isAbstract": false, - "typeParams": null, - "superTypeParams": null, - "implements": [] - } - }, - { - "type": "ExportDeclaration", - "span": { - "start": 490, - "end": 569, - "ctxt": 0 - }, - "declaration": { - "type": "VariableDeclaration", - "span": { - "start": 497, - "end": 569, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 503, - "end": 569, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 503, - "end": 504, - "ctxt": 0 - }, - "value": "l", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "ArrowFunctionExpression", - "span": { - "start": 507, - "end": 569, - "ctxt": 0 - }, - "params": [], - "body": { - "type": "BlockStatement", - "span": { - "start": 519, - "end": 569, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 525, - "end": 559, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 531, - "end": 559, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 531, - "end": 534, - "ctxt": 0 - }, - "value": "req", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "AwaitExpression", - "span": { - "start": 537, - "end": 559, - "ctxt": 0 - }, - "argument": { - "type": "CallExpression", - "span": { - "start": 543, - "end": 559, - "ctxt": 0 - }, - "callee": { - "type": "Import", - "span": { - "start": 543, - "end": 549, - "ctxt": 0 - }, - "phase": "evaluation" - }, - "arguments": [ - { - "spread": null, - "expression": { - "type": "StringLiteral", - "span": { - "start": 550, - "end": 558, - "ctxt": 0 - }, - "value": "./test", - "raw": "'./test'" - } - } - ], - "typeArguments": null - } - }, - "definite": false - } - ] - } - ] - }, - "async": true, - "generator": false, - "typeParameters": null, - "returnType": null - }, - "definite": false - } - ] - } - } - ], - "interpreter": null -} diff --git a/crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3CJS.ts b/crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3CJS.ts deleted file mode 100644 index 3742604a77ad..000000000000 --- a/crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3CJS.ts +++ /dev/null @@ -1,31 +0,0 @@ -// @module: commonjs -// @target: es3 -// @lib: es6 -// @filename: test.ts -export async function fn() { - const req = await import('./test') // ONE -} - -export class cl1 { - public async m() { - const req = await import('./test') // TWO - } -} - -export const obj = { - m: async () => { - const req = await import('./test') // THREE - } -} - -export class cl2 { - public p = { - m: async () => { - const req = await import('./test') // FOUR - } - } -} - -export const l = async () => { - const req = await import('./test') // FIVE -} diff --git a/crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3System.json b/crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3System.json deleted file mode 100644 index b87d75d2ccdf..000000000000 --- a/crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3System.json +++ /dev/null @@ -1,759 +0,0 @@ -{ - "type": "Module", - "span": { - "start": 71, - "end": 567, - "ctxt": 0 - }, - "body": [ - { - "type": "ExportDeclaration", - "span": { - "start": 71, - "end": 147, - "ctxt": 0 - }, - "declaration": { - "type": "FunctionDeclaration", - "identifier": { - "type": "Identifier", - "span": { - "start": 93, - "end": 95, - "ctxt": 0 - }, - "value": "fn", - "optional": false - }, - "declare": false, - "params": [], - "decorators": [], - "span": { - "start": 78, - "end": 147, - "ctxt": 0 - }, - "body": { - "type": "BlockStatement", - "span": { - "start": 98, - "end": 147, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 104, - "end": 138, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 110, - "end": 138, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 110, - "end": 113, - "ctxt": 0 - }, - "value": "req", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "AwaitExpression", - "span": { - "start": 116, - "end": 138, - "ctxt": 0 - }, - "argument": { - "type": "CallExpression", - "span": { - "start": 122, - "end": 138, - "ctxt": 0 - }, - "callee": { - "type": "Import", - "span": { - "start": 122, - "end": 128, - "ctxt": 0 - }, - "phase": "evaluation" - }, - "arguments": [ - { - "spread": null, - "expression": { - "type": "StringLiteral", - "span": { - "start": 129, - "end": 137, - "ctxt": 0 - }, - "value": "./test", - "raw": "'./test'" - } - } - ], - "typeArguments": null - } - }, - "definite": false - } - ] - } - ] - }, - "generator": false, - "async": true, - "typeParameters": null, - "returnType": null - } - }, - { - "type": "ExportDeclaration", - "span": { - "start": 149, - "end": 248, - "ctxt": 0 - }, - "declaration": { - "type": "ClassDeclaration", - "identifier": { - "type": "Identifier", - "span": { - "start": 162, - "end": 165, - "ctxt": 0 - }, - "value": "cl1", - "optional": false - }, - "declare": false, - "span": { - "start": 156, - "end": 248, - "ctxt": 0 - }, - "decorators": [], - "body": [ - { - "type": "ClassMethod", - "span": { - "start": 172, - "end": 246, - "ctxt": 0 - }, - "key": { - "type": "Identifier", - "span": { - "start": 185, - "end": 186, - "ctxt": 0 - }, - "value": "m", - "optional": false - }, - "function": { - "params": [], - "decorators": [], - "span": { - "start": 172, - "end": 246, - "ctxt": 0 - }, - "body": { - "type": "BlockStatement", - "span": { - "start": 189, - "end": 246, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 199, - "end": 233, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 205, - "end": 233, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 205, - "end": 208, - "ctxt": 0 - }, - "value": "req", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "AwaitExpression", - "span": { - "start": 211, - "end": 233, - "ctxt": 0 - }, - "argument": { - "type": "CallExpression", - "span": { - "start": 217, - "end": 233, - "ctxt": 0 - }, - "callee": { - "type": "Import", - "span": { - "start": 217, - "end": 223, - "ctxt": 0 - }, - "phase": "evaluation" - }, - "arguments": [ - { - "spread": null, - "expression": { - "type": "StringLiteral", - "span": { - "start": 224, - "end": 232, - "ctxt": 0 - }, - "value": "./test", - "raw": "'./test'" - } - } - ], - "typeArguments": null - } - }, - "definite": false - } - ] - } - ] - }, - "generator": false, - "async": true, - "typeParameters": null, - "returnType": null - }, - "kind": "method", - "isStatic": false, - "accessibility": "public", - "isAbstract": false, - "isOptional": false, - "isOverride": false - } - ], - "superClass": null, - "isAbstract": false, - "typeParams": null, - "superTypeParams": null, - "implements": [] - } - }, - { - "type": "ExportDeclaration", - "span": { - "start": 250, - "end": 351, - "ctxt": 0 - }, - "declaration": { - "type": "VariableDeclaration", - "span": { - "start": 257, - "end": 351, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 263, - "end": 351, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 263, - "end": 266, - "ctxt": 0 - }, - "value": "obj", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "ObjectExpression", - "span": { - "start": 269, - "end": 351, - "ctxt": 0 - }, - "properties": [ - { - "type": "KeyValueProperty", - "key": { - "type": "Identifier", - "span": { - "start": 275, - "end": 276, - "ctxt": 0 - }, - "value": "m", - "optional": false - }, - "value": { - "type": "ArrowFunctionExpression", - "span": { - "start": 278, - "end": 349, - "ctxt": 0 - }, - "params": [], - "body": { - "type": "BlockStatement", - "span": { - "start": 290, - "end": 349, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 300, - "end": 334, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 306, - "end": 334, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 306, - "end": 309, - "ctxt": 0 - }, - "value": "req", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "AwaitExpression", - "span": { - "start": 312, - "end": 334, - "ctxt": 0 - }, - "argument": { - "type": "CallExpression", - "span": { - "start": 318, - "end": 334, - "ctxt": 0 - }, - "callee": { - "type": "Import", - "span": { - "start": 318, - "end": 324, - "ctxt": 0 - }, - "phase": "evaluation" - }, - "arguments": [ - { - "spread": null, - "expression": { - "type": "StringLiteral", - "span": { - "start": 325, - "end": 333, - "ctxt": 0 - }, - "value": "./test", - "raw": "'./test'" - } - } - ], - "typeArguments": null - } - }, - "definite": false - } - ] - } - ] - }, - "async": true, - "generator": false, - "typeParameters": null, - "returnType": null - } - } - ] - }, - "definite": false - } - ] - } - }, - { - "type": "ExportDeclaration", - "span": { - "start": 353, - "end": 486, - "ctxt": 0 - }, - "declaration": { - "type": "ClassDeclaration", - "identifier": { - "type": "Identifier", - "span": { - "start": 366, - "end": 369, - "ctxt": 0 - }, - "value": "cl2", - "optional": false - }, - "declare": false, - "span": { - "start": 360, - "end": 486, - "ctxt": 0 - }, - "decorators": [], - "body": [ - { - "type": "ClassProperty", - "span": { - "start": 376, - "end": 484, - "ctxt": 0 - }, - "key": { - "type": "Identifier", - "span": { - "start": 383, - "end": 384, - "ctxt": 0 - }, - "value": "p", - "optional": false - }, - "value": { - "type": "ObjectExpression", - "span": { - "start": 387, - "end": 484, - "ctxt": 0 - }, - "properties": [ - { - "type": "KeyValueProperty", - "key": { - "type": "Identifier", - "span": { - "start": 397, - "end": 398, - "ctxt": 0 - }, - "value": "m", - "optional": false - }, - "value": { - "type": "ArrowFunctionExpression", - "span": { - "start": 400, - "end": 478, - "ctxt": 0 - }, - "params": [], - "body": { - "type": "BlockStatement", - "span": { - "start": 412, - "end": 478, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 426, - "end": 460, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 432, - "end": 460, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 432, - "end": 435, - "ctxt": 0 - }, - "value": "req", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "AwaitExpression", - "span": { - "start": 438, - "end": 460, - "ctxt": 0 - }, - "argument": { - "type": "CallExpression", - "span": { - "start": 444, - "end": 460, - "ctxt": 0 - }, - "callee": { - "type": "Import", - "span": { - "start": 444, - "end": 450, - "ctxt": 0 - }, - "phase": "evaluation" - }, - "arguments": [ - { - "spread": null, - "expression": { - "type": "StringLiteral", - "span": { - "start": 451, - "end": 459, - "ctxt": 0 - }, - "value": "./test", - "raw": "'./test'" - } - } - ], - "typeArguments": null - } - }, - "definite": false - } - ] - } - ] - }, - "async": true, - "generator": false, - "typeParameters": null, - "returnType": null - } - } - ] - }, - "typeAnnotation": null, - "isStatic": false, - "decorators": [], - "accessibility": "public", - "isAbstract": false, - "isOptional": false, - "isOverride": false, - "readonly": false, - "declare": false, - "definite": false - } - ], - "superClass": null, - "isAbstract": false, - "typeParams": null, - "superTypeParams": null, - "implements": [] - } - }, - { - "type": "ExportDeclaration", - "span": { - "start": 488, - "end": 567, - "ctxt": 0 - }, - "declaration": { - "type": "VariableDeclaration", - "span": { - "start": 495, - "end": 567, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 501, - "end": 567, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 501, - "end": 502, - "ctxt": 0 - }, - "value": "l", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "ArrowFunctionExpression", - "span": { - "start": 505, - "end": 567, - "ctxt": 0 - }, - "params": [], - "body": { - "type": "BlockStatement", - "span": { - "start": 517, - "end": 567, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 523, - "end": 557, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 529, - "end": 557, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 529, - "end": 532, - "ctxt": 0 - }, - "value": "req", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "AwaitExpression", - "span": { - "start": 535, - "end": 557, - "ctxt": 0 - }, - "argument": { - "type": "CallExpression", - "span": { - "start": 541, - "end": 557, - "ctxt": 0 - }, - "callee": { - "type": "Import", - "span": { - "start": 541, - "end": 547, - "ctxt": 0 - }, - "phase": "evaluation" - }, - "arguments": [ - { - "spread": null, - "expression": { - "type": "StringLiteral", - "span": { - "start": 548, - "end": 556, - "ctxt": 0 - }, - "value": "./test", - "raw": "'./test'" - } - } - ], - "typeArguments": null - } - }, - "definite": false - } - ] - } - ] - }, - "async": true, - "generator": false, - "typeParameters": null, - "returnType": null - }, - "definite": false - } - ] - } - } - ], - "interpreter": null -} diff --git a/crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3System.ts b/crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3System.ts deleted file mode 100644 index 6cbfa746bea9..000000000000 --- a/crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3System.ts +++ /dev/null @@ -1,31 +0,0 @@ -// @module: system -// @target: es3 -// @lib: es6 -// @filename: test.ts -export async function fn() { - const req = await import('./test') // ONE -} - -export class cl1 { - public async m() { - const req = await import('./test') // TWO - } -} - -export const obj = { - m: async () => { - const req = await import('./test') // THREE - } -} - -export class cl2 { - public p = { - m: async () => { - const req = await import('./test') // FOUR - } - } -} - -export const l = async () => { - const req = await import('./test') // FIVE -} diff --git a/crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3UMD.json b/crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3UMD.json deleted file mode 100644 index e09d7cbdd60b..000000000000 --- a/crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3UMD.json +++ /dev/null @@ -1,759 +0,0 @@ -{ - "type": "Module", - "span": { - "start": 68, - "end": 564, - "ctxt": 0 - }, - "body": [ - { - "type": "ExportDeclaration", - "span": { - "start": 68, - "end": 144, - "ctxt": 0 - }, - "declaration": { - "type": "FunctionDeclaration", - "identifier": { - "type": "Identifier", - "span": { - "start": 90, - "end": 92, - "ctxt": 0 - }, - "value": "fn", - "optional": false - }, - "declare": false, - "params": [], - "decorators": [], - "span": { - "start": 75, - "end": 144, - "ctxt": 0 - }, - "body": { - "type": "BlockStatement", - "span": { - "start": 95, - "end": 144, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 101, - "end": 135, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 107, - "end": 135, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 107, - "end": 110, - "ctxt": 0 - }, - "value": "req", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "AwaitExpression", - "span": { - "start": 113, - "end": 135, - "ctxt": 0 - }, - "argument": { - "type": "CallExpression", - "span": { - "start": 119, - "end": 135, - "ctxt": 0 - }, - "callee": { - "type": "Import", - "span": { - "start": 119, - "end": 125, - "ctxt": 0 - }, - "phase": "evaluation" - }, - "arguments": [ - { - "spread": null, - "expression": { - "type": "StringLiteral", - "span": { - "start": 126, - "end": 134, - "ctxt": 0 - }, - "value": "./test", - "raw": "'./test'" - } - } - ], - "typeArguments": null - } - }, - "definite": false - } - ] - } - ] - }, - "generator": false, - "async": true, - "typeParameters": null, - "returnType": null - } - }, - { - "type": "ExportDeclaration", - "span": { - "start": 146, - "end": 245, - "ctxt": 0 - }, - "declaration": { - "type": "ClassDeclaration", - "identifier": { - "type": "Identifier", - "span": { - "start": 159, - "end": 162, - "ctxt": 0 - }, - "value": "cl1", - "optional": false - }, - "declare": false, - "span": { - "start": 153, - "end": 245, - "ctxt": 0 - }, - "decorators": [], - "body": [ - { - "type": "ClassMethod", - "span": { - "start": 169, - "end": 243, - "ctxt": 0 - }, - "key": { - "type": "Identifier", - "span": { - "start": 182, - "end": 183, - "ctxt": 0 - }, - "value": "m", - "optional": false - }, - "function": { - "params": [], - "decorators": [], - "span": { - "start": 169, - "end": 243, - "ctxt": 0 - }, - "body": { - "type": "BlockStatement", - "span": { - "start": 186, - "end": 243, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 196, - "end": 230, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 202, - "end": 230, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 202, - "end": 205, - "ctxt": 0 - }, - "value": "req", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "AwaitExpression", - "span": { - "start": 208, - "end": 230, - "ctxt": 0 - }, - "argument": { - "type": "CallExpression", - "span": { - "start": 214, - "end": 230, - "ctxt": 0 - }, - "callee": { - "type": "Import", - "span": { - "start": 214, - "end": 220, - "ctxt": 0 - }, - "phase": "evaluation" - }, - "arguments": [ - { - "spread": null, - "expression": { - "type": "StringLiteral", - "span": { - "start": 221, - "end": 229, - "ctxt": 0 - }, - "value": "./test", - "raw": "'./test'" - } - } - ], - "typeArguments": null - } - }, - "definite": false - } - ] - } - ] - }, - "generator": false, - "async": true, - "typeParameters": null, - "returnType": null - }, - "kind": "method", - "isStatic": false, - "accessibility": "public", - "isAbstract": false, - "isOptional": false, - "isOverride": false - } - ], - "superClass": null, - "isAbstract": false, - "typeParams": null, - "superTypeParams": null, - "implements": [] - } - }, - { - "type": "ExportDeclaration", - "span": { - "start": 247, - "end": 348, - "ctxt": 0 - }, - "declaration": { - "type": "VariableDeclaration", - "span": { - "start": 254, - "end": 348, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 260, - "end": 348, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 260, - "end": 263, - "ctxt": 0 - }, - "value": "obj", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "ObjectExpression", - "span": { - "start": 266, - "end": 348, - "ctxt": 0 - }, - "properties": [ - { - "type": "KeyValueProperty", - "key": { - "type": "Identifier", - "span": { - "start": 272, - "end": 273, - "ctxt": 0 - }, - "value": "m", - "optional": false - }, - "value": { - "type": "ArrowFunctionExpression", - "span": { - "start": 275, - "end": 346, - "ctxt": 0 - }, - "params": [], - "body": { - "type": "BlockStatement", - "span": { - "start": 287, - "end": 346, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 297, - "end": 331, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 303, - "end": 331, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 303, - "end": 306, - "ctxt": 0 - }, - "value": "req", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "AwaitExpression", - "span": { - "start": 309, - "end": 331, - "ctxt": 0 - }, - "argument": { - "type": "CallExpression", - "span": { - "start": 315, - "end": 331, - "ctxt": 0 - }, - "callee": { - "type": "Import", - "span": { - "start": 315, - "end": 321, - "ctxt": 0 - }, - "phase": "evaluation" - }, - "arguments": [ - { - "spread": null, - "expression": { - "type": "StringLiteral", - "span": { - "start": 322, - "end": 330, - "ctxt": 0 - }, - "value": "./test", - "raw": "'./test'" - } - } - ], - "typeArguments": null - } - }, - "definite": false - } - ] - } - ] - }, - "async": true, - "generator": false, - "typeParameters": null, - "returnType": null - } - } - ] - }, - "definite": false - } - ] - } - }, - { - "type": "ExportDeclaration", - "span": { - "start": 350, - "end": 483, - "ctxt": 0 - }, - "declaration": { - "type": "ClassDeclaration", - "identifier": { - "type": "Identifier", - "span": { - "start": 363, - "end": 366, - "ctxt": 0 - }, - "value": "cl2", - "optional": false - }, - "declare": false, - "span": { - "start": 357, - "end": 483, - "ctxt": 0 - }, - "decorators": [], - "body": [ - { - "type": "ClassProperty", - "span": { - "start": 373, - "end": 481, - "ctxt": 0 - }, - "key": { - "type": "Identifier", - "span": { - "start": 380, - "end": 381, - "ctxt": 0 - }, - "value": "p", - "optional": false - }, - "value": { - "type": "ObjectExpression", - "span": { - "start": 384, - "end": 481, - "ctxt": 0 - }, - "properties": [ - { - "type": "KeyValueProperty", - "key": { - "type": "Identifier", - "span": { - "start": 394, - "end": 395, - "ctxt": 0 - }, - "value": "m", - "optional": false - }, - "value": { - "type": "ArrowFunctionExpression", - "span": { - "start": 397, - "end": 475, - "ctxt": 0 - }, - "params": [], - "body": { - "type": "BlockStatement", - "span": { - "start": 409, - "end": 475, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 423, - "end": 457, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 429, - "end": 457, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 429, - "end": 432, - "ctxt": 0 - }, - "value": "req", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "AwaitExpression", - "span": { - "start": 435, - "end": 457, - "ctxt": 0 - }, - "argument": { - "type": "CallExpression", - "span": { - "start": 441, - "end": 457, - "ctxt": 0 - }, - "callee": { - "type": "Import", - "span": { - "start": 441, - "end": 447, - "ctxt": 0 - }, - "phase": "evaluation" - }, - "arguments": [ - { - "spread": null, - "expression": { - "type": "StringLiteral", - "span": { - "start": 448, - "end": 456, - "ctxt": 0 - }, - "value": "./test", - "raw": "'./test'" - } - } - ], - "typeArguments": null - } - }, - "definite": false - } - ] - } - ] - }, - "async": true, - "generator": false, - "typeParameters": null, - "returnType": null - } - } - ] - }, - "typeAnnotation": null, - "isStatic": false, - "decorators": [], - "accessibility": "public", - "isAbstract": false, - "isOptional": false, - "isOverride": false, - "readonly": false, - "declare": false, - "definite": false - } - ], - "superClass": null, - "isAbstract": false, - "typeParams": null, - "superTypeParams": null, - "implements": [] - } - }, - { - "type": "ExportDeclaration", - "span": { - "start": 485, - "end": 564, - "ctxt": 0 - }, - "declaration": { - "type": "VariableDeclaration", - "span": { - "start": 492, - "end": 564, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 498, - "end": 564, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 498, - "end": 499, - "ctxt": 0 - }, - "value": "l", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "ArrowFunctionExpression", - "span": { - "start": 502, - "end": 564, - "ctxt": 0 - }, - "params": [], - "body": { - "type": "BlockStatement", - "span": { - "start": 514, - "end": 564, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 520, - "end": 554, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 526, - "end": 554, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 526, - "end": 529, - "ctxt": 0 - }, - "value": "req", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "AwaitExpression", - "span": { - "start": 532, - "end": 554, - "ctxt": 0 - }, - "argument": { - "type": "CallExpression", - "span": { - "start": 538, - "end": 554, - "ctxt": 0 - }, - "callee": { - "type": "Import", - "span": { - "start": 538, - "end": 544, - "ctxt": 0 - }, - "phase": "evaluation" - }, - "arguments": [ - { - "spread": null, - "expression": { - "type": "StringLiteral", - "span": { - "start": 545, - "end": 553, - "ctxt": 0 - }, - "value": "./test", - "raw": "'./test'" - } - } - ], - "typeArguments": null - } - }, - "definite": false - } - ] - } - ] - }, - "async": true, - "generator": false, - "typeParameters": null, - "returnType": null - }, - "definite": false - } - ] - } - } - ], - "interpreter": null -} diff --git a/crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3UMD.ts b/crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3UMD.ts deleted file mode 100644 index 59476c7acfa6..000000000000 --- a/crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES3UMD.ts +++ /dev/null @@ -1,31 +0,0 @@ -// @module: umd -// @target: es3 -// @lib: es6 -// @filename: test.ts -export async function fn() { - const req = await import('./test') // ONE -} - -export class cl1 { - public async m() { - const req = await import('./test') // TWO - } -} - -export const obj = { - m: async () => { - const req = await import('./test') // THREE - } -} - -export class cl2 { - public p = { - m: async () => { - const req = await import('./test') // FOUR - } - } -} - -export const l = async () => { - const req = await import('./test') // FIVE -} diff --git a/crates/swc_ecma_parser/tests/tsc/importTag1.json b/crates/swc_ecma_parser/tests/tsc/importTag1.json new file mode 100644 index 000000000000..b34f81069b37 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag1.json @@ -0,0 +1,146 @@ +{ + "type": "Module", + "span": { + "start": 79, + "end": 233, + "ctxt": 0 + }, + "body": [ + { + "type": "ExportDeclaration", + "span": { + "start": 79, + "end": 118, + "ctxt": 0 + }, + "declaration": { + "type": "TsInterfaceDeclaration", + "span": { + "start": 86, + "end": 118, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 96, + "end": 99, + "ctxt": 0 + }, + "value": "Foo", + "optional": false + }, + "declare": false, + "typeParams": null, + "extends": [], + "body": { + "type": "TsInterfaceBody", + "span": { + "start": 100, + "end": 118, + "ctxt": 0 + }, + "body": [ + { + "type": "TsPropertySignature", + "span": { + "start": 106, + "end": 116, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "Identifier", + "span": { + "start": 106, + "end": 107, + "ctxt": 0 + }, + "value": "a", + "optional": false + }, + "computed": false, + "optional": false, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 107, + "end": 115, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 109, + "end": 115, + "ctxt": 0 + }, + "kind": "number" + } + }, + "typeParams": null + } + ] + } + } + }, + { + "type": "FunctionDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 224, + "end": 225, + "ctxt": 0 + }, + "value": "f", + "optional": false + }, + "declare": false, + "params": [ + { + "type": "Parameter", + "span": { + "start": 226, + "end": 229, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 226, + "end": 229, + "ctxt": 0 + }, + "value": "foo", + "optional": false, + "typeAnnotation": null + } + } + ], + "decorators": [], + "span": { + "start": 215, + "end": 233, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 231, + "end": 233, + "ctxt": 0 + }, + "stmts": [] + }, + "generator": false, + "async": false, + "typeParameters": null, + "returnType": null + } + ], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/tsc/importTag1.ts b/crates/swc_ecma_parser/tests/tsc/importTag1.ts new file mode 100644 index 000000000000..b85735da4d96 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag1.ts @@ -0,0 +1,18 @@ +// @checkJs: true +// @allowJs: true +// @noEmit: true + +// @filename: /types.ts +export interface Foo { + a: number; +} + +// @filename: /foo.js +/** + * @import { Foo } from "./types" + */ + +/** + * @param { Foo } foo + */ +function f(foo) {} diff --git a/crates/swc_ecma_parser/tests/tsc/importTag10.json b/crates/swc_ecma_parser/tests/tsc/importTag10.json new file mode 100644 index 000000000000..e6ebc6ba5b0c --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag10.json @@ -0,0 +1,10 @@ +{ + "type": "Script", + "span": { + "start": 1, + "end": 1, + "ctxt": 0 + }, + "body": [], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/tsc/importTag10.ts b/crates/swc_ecma_parser/tests/tsc/importTag10.ts new file mode 100644 index 000000000000..ae3f71e74eed --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag10.ts @@ -0,0 +1,8 @@ +// @checkJs: true +// @allowJs: true +// @noEmit: true + +// @filename: /foo.js +/** + * @import + */ diff --git a/crates/swc_ecma_parser/tests/tsc/importTag11.json b/crates/swc_ecma_parser/tests/tsc/importTag11.json new file mode 100644 index 000000000000..e6ebc6ba5b0c --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag11.json @@ -0,0 +1,10 @@ +{ + "type": "Script", + "span": { + "start": 1, + "end": 1, + "ctxt": 0 + }, + "body": [], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/tsc/importTag11.ts b/crates/swc_ecma_parser/tests/tsc/importTag11.ts new file mode 100644 index 000000000000..f4c2d18ecb7c --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag11.ts @@ -0,0 +1,8 @@ +// @checkJs: true +// @allowJs: true +// @noEmit: true + +// @filename: /foo.js +/** + * @import foo + */ diff --git a/crates/swc_ecma_parser/tests/tsc/importTag12.json b/crates/swc_ecma_parser/tests/tsc/importTag12.json new file mode 100644 index 000000000000..e6ebc6ba5b0c --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag12.json @@ -0,0 +1,10 @@ +{ + "type": "Script", + "span": { + "start": 1, + "end": 1, + "ctxt": 0 + }, + "body": [], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/tsc/importTag12.ts b/crates/swc_ecma_parser/tests/tsc/importTag12.ts new file mode 100644 index 000000000000..464444b8f924 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag12.ts @@ -0,0 +1,8 @@ +// @checkJs: true +// @allowJs: true +// @noEmit: true + +// @filename: /foo.js +/** + * @import foo from + */ diff --git a/crates/swc_ecma_parser/tests/tsc/importTag13.json b/crates/swc_ecma_parser/tests/tsc/importTag13.json new file mode 100644 index 000000000000..e51093428a2c --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag13.json @@ -0,0 +1,91 @@ +{ + "type": "Module", + "span": { + "start": 79, + "end": 118, + "ctxt": 0 + }, + "body": [ + { + "type": "ExportDeclaration", + "span": { + "start": 79, + "end": 118, + "ctxt": 0 + }, + "declaration": { + "type": "TsInterfaceDeclaration", + "span": { + "start": 86, + "end": 118, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 96, + "end": 99, + "ctxt": 0 + }, + "value": "Foo", + "optional": false + }, + "declare": false, + "typeParams": null, + "extends": [], + "body": { + "type": "TsInterfaceBody", + "span": { + "start": 100, + "end": 118, + "ctxt": 0 + }, + "body": [ + { + "type": "TsPropertySignature", + "span": { + "start": 106, + "end": 116, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "Identifier", + "span": { + "start": 106, + "end": 107, + "ctxt": 0 + }, + "value": "a", + "optional": false + }, + "computed": false, + "optional": false, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 107, + "end": 115, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 109, + "end": 115, + "ctxt": 0 + }, + "kind": "number" + } + }, + "typeParams": null + } + ] + } + } + } + ], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/tsc/importTag13.ts b/crates/swc_ecma_parser/tests/tsc/importTag13.ts new file mode 100644 index 000000000000..8f15c41695bb --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag13.ts @@ -0,0 +1,11 @@ +// @checkJs: true +// @allowJs: true +// @noEmit: true + +// @filename: /types.ts +export interface Foo { + a: number; +} + +// @filename: /foo.js +/** @import x = require("types") */ diff --git a/crates/swc_ecma_parser/tests/tsc/importTag14.json b/crates/swc_ecma_parser/tests/tsc/importTag14.json new file mode 100644 index 000000000000..e6ebc6ba5b0c --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag14.json @@ -0,0 +1,10 @@ +{ + "type": "Script", + "span": { + "start": 1, + "end": 1, + "ctxt": 0 + }, + "body": [], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/tsc/importTag14.ts b/crates/swc_ecma_parser/tests/tsc/importTag14.ts new file mode 100644 index 000000000000..98375d7356c3 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag14.ts @@ -0,0 +1,6 @@ +// @checkJs: true +// @allowJs: true +// @noEmit: true + +// @filename: /foo.js +/** @import * as f from "./foo" with */ diff --git a/crates/swc_ecma_parser/tests/tsc/importTag15.json b/crates/swc_ecma_parser/tests/tsc/importTag15.json new file mode 100644 index 000000000000..8d635ac67a05 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag15.json @@ -0,0 +1,104 @@ +{ + "type": "Module", + "span": { + "start": 135, + "end": 326, + "ctxt": 0 + }, + "body": [ + { + "type": "ExportDeclaration", + "span": { + "start": 135, + "end": 157, + "ctxt": 0 + }, + "declaration": { + "type": "TsInterfaceDeclaration", + "span": { + "start": 142, + "end": 157, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 152, + "end": 153, + "ctxt": 0 + }, + "value": "I", + "optional": false + }, + "declare": false, + "typeParams": null, + "extends": [], + "body": { + "type": "TsInterfaceBody", + "span": { + "start": 154, + "end": 157, + "ctxt": 0 + }, + "body": [] + } + } + }, + { + "type": "FunctionDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 319, + "end": 320, + "ctxt": 0 + }, + "value": "f", + "optional": false + }, + "declare": false, + "params": [ + { + "type": "Parameter", + "span": { + "start": 321, + "end": 322, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 321, + "end": 322, + "ctxt": 0 + }, + "value": "a", + "optional": false, + "typeAnnotation": null + } + } + ], + "decorators": [], + "span": { + "start": 310, + "end": 326, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 324, + "end": 326, + "ctxt": 0 + }, + "stmts": [] + }, + "generator": false, + "async": false, + "typeParameters": null, + "returnType": null + } + ], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/tsc/importTag15.ts b/crates/swc_ecma_parser/tests/tsc/importTag15.ts new file mode 100644 index 000000000000..50004fdb86ac --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag15.ts @@ -0,0 +1,15 @@ +// @declaration: true +// @emitDeclarationOnly: true +// @module: esnext,es2015 +// @checkJs: true +// @allowJs: true + +// @filename: 0.ts +export interface I { } + +// @filename: 1.js +/** @import { I } from './0' with { type: "json" } */ +/** @import * as foo from './0' with { type: "json" } */ + +/** @param {I} a */ +function f(a) {} diff --git a/crates/swc_ecma_parser/tests/tsc/importTag16.json b/crates/swc_ecma_parser/tests/tsc/importTag16.json new file mode 100644 index 000000000000..ccbf06ed0b4c --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag16.json @@ -0,0 +1,170 @@ +{ + "type": "Module", + "span": { + "start": 109, + "end": 291, + "ctxt": 0 + }, + "body": [ + { + "type": "ExportDefaultDeclaration", + "span": { + "start": 109, + "end": 140, + "ctxt": 0 + }, + "decl": { + "type": "TsInterfaceDeclaration", + "span": { + "start": 124, + "end": 140, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 134, + "end": 137, + "ctxt": 0 + }, + "value": "Foo", + "optional": false + }, + "declare": false, + "typeParams": null, + "extends": [], + "body": { + "type": "TsInterfaceBody", + "span": { + "start": 138, + "end": 140, + "ctxt": 0 + }, + "body": [] + } + } + }, + { + "type": "ExportDeclaration", + "span": { + "start": 141, + "end": 162, + "ctxt": 0 + }, + "declaration": { + "type": "TsInterfaceDeclaration", + "span": { + "start": 148, + "end": 162, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 158, + "end": 159, + "ctxt": 0 + }, + "value": "I", + "optional": false + }, + "declare": false, + "typeParams": null, + "extends": [], + "body": { + "type": "TsInterfaceBody", + "span": { + "start": 160, + "end": 162, + "ctxt": 0 + }, + "body": [] + } + } + }, + { + "type": "ExportDeclaration", + "span": { + "start": 263, + "end": 291, + "ctxt": 0 + }, + "declaration": { + "type": "FunctionDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 279, + "end": 282, + "ctxt": 0 + }, + "value": "foo", + "optional": false + }, + "declare": false, + "params": [ + { + "type": "Parameter", + "span": { + "start": 283, + "end": 284, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 283, + "end": 284, + "ctxt": 0 + }, + "value": "a", + "optional": false, + "typeAnnotation": null + } + }, + { + "type": "Parameter", + "span": { + "start": 286, + "end": 287, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 286, + "end": 287, + "ctxt": 0 + }, + "value": "b", + "optional": false, + "typeAnnotation": null + } + } + ], + "decorators": [], + "span": { + "start": 270, + "end": 291, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 289, + "end": 291, + "ctxt": 0 + }, + "stmts": [] + }, + "generator": false, + "async": false, + "typeParameters": null, + "returnType": null + } + } + ], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/tsc/importTag16.ts b/crates/swc_ecma_parser/tests/tsc/importTag16.ts new file mode 100644 index 000000000000..0a28cd9c8a58 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag16.ts @@ -0,0 +1,17 @@ +// @declaration: true +// @emitDeclarationOnly: true +// @checkJs: true +// @allowJs: true + +// @filename: a.ts +export default interface Foo {} +export interface I {} + +// @filename: b.js +/** @import Foo, { I } from "./a" */ + +/** + * @param {Foo} a + * @param {I} b + */ +export function foo(a, b) {} diff --git a/crates/swc_ecma_parser/tests/tsc/importTag2.json b/crates/swc_ecma_parser/tests/tsc/importTag2.json new file mode 100644 index 000000000000..17994669712f --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag2.json @@ -0,0 +1,154 @@ +{ + "type": "Module", + "span": { + "start": 79, + "end": 249, + "ctxt": 0 + }, + "body": [ + { + "type": "ExportDeclaration", + "span": { + "start": 79, + "end": 118, + "ctxt": 0 + }, + "declaration": { + "type": "TsInterfaceDeclaration", + "span": { + "start": 86, + "end": 118, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 96, + "end": 99, + "ctxt": 0 + }, + "value": "Foo", + "optional": false + }, + "declare": false, + "typeParams": null, + "extends": [], + "body": { + "type": "TsInterfaceBody", + "span": { + "start": 100, + "end": 118, + "ctxt": 0 + }, + "body": [ + { + "type": "TsPropertySignature", + "span": { + "start": 106, + "end": 116, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "Identifier", + "span": { + "start": 106, + "end": 107, + "ctxt": 0 + }, + "value": "a", + "optional": false + }, + "computed": false, + "optional": false, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 107, + "end": 115, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 109, + "end": 115, + "ctxt": 0 + }, + "kind": "number" + } + }, + "typeParams": null + } + ] + } + } + }, + { + "type": "ExportDeclaration", + "span": { + "start": 224, + "end": 249, + "ctxt": 0 + }, + "declaration": { + "type": "FunctionDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 240, + "end": 241, + "ctxt": 0 + }, + "value": "f", + "optional": false + }, + "declare": false, + "params": [ + { + "type": "Parameter", + "span": { + "start": 242, + "end": 245, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 242, + "end": 245, + "ctxt": 0 + }, + "value": "foo", + "optional": false, + "typeAnnotation": null + } + } + ], + "decorators": [], + "span": { + "start": 231, + "end": 249, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 247, + "end": 249, + "ctxt": 0 + }, + "stmts": [] + }, + "generator": false, + "async": false, + "typeParameters": null, + "returnType": null + } + } + ], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/tsc/importTag2.ts b/crates/swc_ecma_parser/tests/tsc/importTag2.ts new file mode 100644 index 000000000000..e306afb43a82 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag2.ts @@ -0,0 +1,18 @@ +// @checkJs: true +// @allowJs: true +// @noEmit: true + +// @filename: /types.ts +export interface Foo { + a: number; +} + +// @filename: /foo.js +/** + * @import * as types from "./types" + */ + +/** + * @param { types.Foo } foo + */ +export function f(foo) {} diff --git a/crates/swc_ecma_parser/tests/tsc/importTag3.json b/crates/swc_ecma_parser/tests/tsc/importTag3.json new file mode 100644 index 000000000000..3c83e64db883 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag3.json @@ -0,0 +1,154 @@ +{ + "type": "Module", + "span": { + "start": 79, + "end": 244, + "ctxt": 0 + }, + "body": [ + { + "type": "ExportDefaultDeclaration", + "span": { + "start": 79, + "end": 126, + "ctxt": 0 + }, + "decl": { + "type": "TsInterfaceDeclaration", + "span": { + "start": 94, + "end": 126, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 104, + "end": 107, + "ctxt": 0 + }, + "value": "Foo", + "optional": false + }, + "declare": false, + "typeParams": null, + "extends": [], + "body": { + "type": "TsInterfaceBody", + "span": { + "start": 108, + "end": 126, + "ctxt": 0 + }, + "body": [ + { + "type": "TsPropertySignature", + "span": { + "start": 114, + "end": 124, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "Identifier", + "span": { + "start": 114, + "end": 115, + "ctxt": 0 + }, + "value": "a", + "optional": false + }, + "computed": false, + "optional": false, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 115, + "end": 123, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 117, + "end": 123, + "ctxt": 0 + }, + "kind": "number" + } + }, + "typeParams": null + } + ] + } + } + }, + { + "type": "ExportDeclaration", + "span": { + "start": 219, + "end": 244, + "ctxt": 0 + }, + "declaration": { + "type": "FunctionDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 235, + "end": 236, + "ctxt": 0 + }, + "value": "f", + "optional": false + }, + "declare": false, + "params": [ + { + "type": "Parameter", + "span": { + "start": 237, + "end": 240, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 237, + "end": 240, + "ctxt": 0 + }, + "value": "foo", + "optional": false, + "typeAnnotation": null + } + } + ], + "decorators": [], + "span": { + "start": 226, + "end": 244, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 242, + "end": 244, + "ctxt": 0 + }, + "stmts": [] + }, + "generator": false, + "async": false, + "typeParameters": null, + "returnType": null + } + } + ], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/tsc/importTag3.ts b/crates/swc_ecma_parser/tests/tsc/importTag3.ts new file mode 100644 index 000000000000..7ebe8894b524 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag3.ts @@ -0,0 +1,18 @@ +// @checkJs: true +// @allowJs: true +// @noEmit: true + +// @filename: /types.ts +export default interface Foo { + a: number; +} + +// @filename: /foo.js +/** + * @import Foo from "./types" + */ + +/** + * @param { Foo } foo + */ +export function f(foo) {} diff --git a/crates/swc_ecma_parser/tests/tsc/importTag4.json b/crates/swc_ecma_parser/tests/tsc/importTag4.json new file mode 100644 index 000000000000..3743aa8c0c2a --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag4.json @@ -0,0 +1,146 @@ +{ + "type": "Module", + "span": { + "start": 79, + "end": 276, + "ctxt": 0 + }, + "body": [ + { + "type": "ExportDeclaration", + "span": { + "start": 79, + "end": 118, + "ctxt": 0 + }, + "declaration": { + "type": "TsInterfaceDeclaration", + "span": { + "start": 86, + "end": 118, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 96, + "end": 99, + "ctxt": 0 + }, + "value": "Foo", + "optional": false + }, + "declare": false, + "typeParams": null, + "extends": [], + "body": { + "type": "TsInterfaceBody", + "span": { + "start": 100, + "end": 118, + "ctxt": 0 + }, + "body": [ + { + "type": "TsPropertySignature", + "span": { + "start": 106, + "end": 116, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "Identifier", + "span": { + "start": 106, + "end": 107, + "ctxt": 0 + }, + "value": "a", + "optional": false + }, + "computed": false, + "optional": false, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 107, + "end": 115, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 109, + "end": 115, + "ctxt": 0 + }, + "kind": "number" + } + }, + "typeParams": null + } + ] + } + } + }, + { + "type": "FunctionDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 267, + "end": 268, + "ctxt": 0 + }, + "value": "f", + "optional": false + }, + "declare": false, + "params": [ + { + "type": "Parameter", + "span": { + "start": 269, + "end": 272, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 269, + "end": 272, + "ctxt": 0 + }, + "value": "foo", + "optional": false, + "typeAnnotation": null + } + } + ], + "decorators": [], + "span": { + "start": 258, + "end": 276, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 274, + "end": 276, + "ctxt": 0 + }, + "stmts": [] + }, + "generator": false, + "async": false, + "typeParameters": null, + "returnType": null + } + ], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/tsc/importTag4.ts b/crates/swc_ecma_parser/tests/tsc/importTag4.ts new file mode 100644 index 000000000000..1f76717279c5 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag4.ts @@ -0,0 +1,22 @@ +// @checkJs: true +// @allowJs: true +// @noEmit: true + +// @filename: /types.ts +export interface Foo { + a: number; +} + +// @filename: /foo.js +/** + * @import { Foo } from "./types" + */ + +/** + * @import { Foo } from "./types" + */ + +/** + * @param { Foo } foo + */ +function f(foo) {} diff --git a/crates/swc_ecma_parser/tests/tsc/importTag5.json b/crates/swc_ecma_parser/tests/tsc/importTag5.json new file mode 100644 index 000000000000..f2a600e3c7f8 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag5.json @@ -0,0 +1,146 @@ +{ + "type": "Module", + "span": { + "start": 114, + "end": 268, + "ctxt": 0 + }, + "body": [ + { + "type": "ExportDeclaration", + "span": { + "start": 114, + "end": 153, + "ctxt": 0 + }, + "declaration": { + "type": "TsInterfaceDeclaration", + "span": { + "start": 121, + "end": 153, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 131, + "end": 134, + "ctxt": 0 + }, + "value": "Foo", + "optional": false + }, + "declare": false, + "typeParams": null, + "extends": [], + "body": { + "type": "TsInterfaceBody", + "span": { + "start": 135, + "end": 153, + "ctxt": 0 + }, + "body": [ + { + "type": "TsPropertySignature", + "span": { + "start": 141, + "end": 151, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "Identifier", + "span": { + "start": 141, + "end": 142, + "ctxt": 0 + }, + "value": "a", + "optional": false + }, + "computed": false, + "optional": false, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 142, + "end": 150, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 144, + "end": 150, + "ctxt": 0 + }, + "kind": "number" + } + }, + "typeParams": null + } + ] + } + } + }, + { + "type": "FunctionDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 259, + "end": 260, + "ctxt": 0 + }, + "value": "f", + "optional": false + }, + "declare": false, + "params": [ + { + "type": "Parameter", + "span": { + "start": 261, + "end": 264, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 261, + "end": 264, + "ctxt": 0 + }, + "value": "foo", + "optional": false, + "typeAnnotation": null + } + } + ], + "decorators": [], + "span": { + "start": 250, + "end": 268, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 266, + "end": 268, + "ctxt": 0 + }, + "stmts": [] + }, + "generator": false, + "async": false, + "typeParameters": null, + "returnType": null + } + ], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/tsc/importTag5.ts b/crates/swc_ecma_parser/tests/tsc/importTag5.ts new file mode 100644 index 000000000000..7dfedad464d9 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag5.ts @@ -0,0 +1,19 @@ +// @checkJs: true +// @allowJs: true +// @declaration: true +// @emitDeclarationOnly: true + +// @filename: /types.ts +export interface Foo { + a: number; +} + +// @filename: /foo.js +/** + * @import { Foo } from "./types" + */ + +/** + * @param { Foo } foo + */ +function f(foo) {} diff --git a/crates/swc_ecma_parser/tests/tsc/importTag6.json b/crates/swc_ecma_parser/tests/tsc/importTag6.json new file mode 100644 index 000000000000..4ca570b6a04e --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag6.json @@ -0,0 +1,246 @@ +{ + "type": "Module", + "span": { + "start": 79, + "end": 303, + "ctxt": 0 + }, + "body": [ + { + "type": "ExportDeclaration", + "span": { + "start": 79, + "end": 116, + "ctxt": 0 + }, + "declaration": { + "type": "TsInterfaceDeclaration", + "span": { + "start": 86, + "end": 116, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 96, + "end": 97, + "ctxt": 0 + }, + "value": "A", + "optional": false + }, + "declare": false, + "typeParams": null, + "extends": [], + "body": { + "type": "TsInterfaceBody", + "span": { + "start": 98, + "end": 116, + "ctxt": 0 + }, + "body": [ + { + "type": "TsPropertySignature", + "span": { + "start": 104, + "end": 114, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "Identifier", + "span": { + "start": 104, + "end": 105, + "ctxt": 0 + }, + "value": "a", + "optional": false + }, + "computed": false, + "optional": false, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 105, + "end": 113, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 107, + "end": 113, + "ctxt": 0 + }, + "kind": "number" + } + }, + "typeParams": null + } + ] + } + } + }, + { + "type": "ExportDeclaration", + "span": { + "start": 117, + "end": 154, + "ctxt": 0 + }, + "declaration": { + "type": "TsInterfaceDeclaration", + "span": { + "start": 124, + "end": 154, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 134, + "end": 135, + "ctxt": 0 + }, + "value": "B", + "optional": false + }, + "declare": false, + "typeParams": null, + "extends": [], + "body": { + "type": "TsInterfaceBody", + "span": { + "start": 136, + "end": 154, + "ctxt": 0 + }, + "body": [ + { + "type": "TsPropertySignature", + "span": { + "start": 142, + "end": 152, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "Identifier", + "span": { + "start": 142, + "end": 143, + "ctxt": 0 + }, + "value": "a", + "optional": false + }, + "computed": false, + "optional": false, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 143, + "end": 151, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 145, + "end": 151, + "ctxt": 0 + }, + "kind": "number" + } + }, + "typeParams": null + } + ] + } + } + }, + { + "type": "FunctionDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 293, + "end": 294, + "ctxt": 0 + }, + "value": "f", + "optional": false + }, + "declare": false, + "params": [ + { + "type": "Parameter", + "span": { + "start": 295, + "end": 296, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 295, + "end": 296, + "ctxt": 0 + }, + "value": "a", + "optional": false, + "typeAnnotation": null + } + }, + { + "type": "Parameter", + "span": { + "start": 298, + "end": 299, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 298, + "end": 299, + "ctxt": 0 + }, + "value": "b", + "optional": false, + "typeAnnotation": null + } + } + ], + "decorators": [], + "span": { + "start": 284, + "end": 303, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 301, + "end": 303, + "ctxt": 0 + }, + "stmts": [] + }, + "generator": false, + "async": false, + "typeParameters": null, + "returnType": null + } + ], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/tsc/importTag6.ts b/crates/swc_ecma_parser/tests/tsc/importTag6.ts new file mode 100644 index 000000000000..2d6470c3ff55 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag6.ts @@ -0,0 +1,25 @@ +// @checkJs: true +// @allowJs: true +// @noEmit: true + +// @filename: /types.ts +export interface A { + a: number; +} +export interface B { + a: number; +} + +// @filename: /foo.js +/** + * @import { + * A, + * B, + * } from "./types" + */ + +/** + * @param { A } a + * @param { B } b + */ +function f(a, b) {} diff --git a/crates/swc_ecma_parser/tests/tsc/importTag7.json b/crates/swc_ecma_parser/tests/tsc/importTag7.json new file mode 100644 index 000000000000..7e589f39fc04 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag7.json @@ -0,0 +1,246 @@ +{ + "type": "Module", + "span": { + "start": 79, + "end": 291, + "ctxt": 0 + }, + "body": [ + { + "type": "ExportDeclaration", + "span": { + "start": 79, + "end": 116, + "ctxt": 0 + }, + "declaration": { + "type": "TsInterfaceDeclaration", + "span": { + "start": 86, + "end": 116, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 96, + "end": 97, + "ctxt": 0 + }, + "value": "A", + "optional": false + }, + "declare": false, + "typeParams": null, + "extends": [], + "body": { + "type": "TsInterfaceBody", + "span": { + "start": 98, + "end": 116, + "ctxt": 0 + }, + "body": [ + { + "type": "TsPropertySignature", + "span": { + "start": 104, + "end": 114, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "Identifier", + "span": { + "start": 104, + "end": 105, + "ctxt": 0 + }, + "value": "a", + "optional": false + }, + "computed": false, + "optional": false, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 105, + "end": 113, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 107, + "end": 113, + "ctxt": 0 + }, + "kind": "number" + } + }, + "typeParams": null + } + ] + } + } + }, + { + "type": "ExportDeclaration", + "span": { + "start": 117, + "end": 154, + "ctxt": 0 + }, + "declaration": { + "type": "TsInterfaceDeclaration", + "span": { + "start": 124, + "end": 154, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 134, + "end": 135, + "ctxt": 0 + }, + "value": "B", + "optional": false + }, + "declare": false, + "typeParams": null, + "extends": [], + "body": { + "type": "TsInterfaceBody", + "span": { + "start": 136, + "end": 154, + "ctxt": 0 + }, + "body": [ + { + "type": "TsPropertySignature", + "span": { + "start": 142, + "end": 152, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "Identifier", + "span": { + "start": 142, + "end": 143, + "ctxt": 0 + }, + "value": "a", + "optional": false + }, + "computed": false, + "optional": false, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 143, + "end": 151, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 145, + "end": 151, + "ctxt": 0 + }, + "kind": "number" + } + }, + "typeParams": null + } + ] + } + } + }, + { + "type": "FunctionDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 281, + "end": 282, + "ctxt": 0 + }, + "value": "f", + "optional": false + }, + "declare": false, + "params": [ + { + "type": "Parameter", + "span": { + "start": 283, + "end": 284, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 283, + "end": 284, + "ctxt": 0 + }, + "value": "a", + "optional": false, + "typeAnnotation": null + } + }, + { + "type": "Parameter", + "span": { + "start": 286, + "end": 287, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 286, + "end": 287, + "ctxt": 0 + }, + "value": "b", + "optional": false, + "typeAnnotation": null + } + } + ], + "decorators": [], + "span": { + "start": 272, + "end": 291, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 289, + "end": 291, + "ctxt": 0 + }, + "stmts": [] + }, + "generator": false, + "async": false, + "typeParameters": null, + "returnType": null + } + ], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/tsc/importTag7.ts b/crates/swc_ecma_parser/tests/tsc/importTag7.ts new file mode 100644 index 000000000000..d6643e411f26 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag7.ts @@ -0,0 +1,24 @@ +// @checkJs: true +// @allowJs: true +// @noEmit: true + +// @filename: /types.ts +export interface A { + a: number; +} +export interface B { + a: number; +} + +// @filename: /foo.js +/** + * @import { + * A, + * B } from "./types" + */ + +/** + * @param { A } a + * @param { B } b + */ +function f(a, b) {} diff --git a/crates/swc_ecma_parser/tests/tsc/importTag8.json b/crates/swc_ecma_parser/tests/tsc/importTag8.json new file mode 100644 index 000000000000..7e589f39fc04 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag8.json @@ -0,0 +1,246 @@ +{ + "type": "Module", + "span": { + "start": 79, + "end": 291, + "ctxt": 0 + }, + "body": [ + { + "type": "ExportDeclaration", + "span": { + "start": 79, + "end": 116, + "ctxt": 0 + }, + "declaration": { + "type": "TsInterfaceDeclaration", + "span": { + "start": 86, + "end": 116, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 96, + "end": 97, + "ctxt": 0 + }, + "value": "A", + "optional": false + }, + "declare": false, + "typeParams": null, + "extends": [], + "body": { + "type": "TsInterfaceBody", + "span": { + "start": 98, + "end": 116, + "ctxt": 0 + }, + "body": [ + { + "type": "TsPropertySignature", + "span": { + "start": 104, + "end": 114, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "Identifier", + "span": { + "start": 104, + "end": 105, + "ctxt": 0 + }, + "value": "a", + "optional": false + }, + "computed": false, + "optional": false, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 105, + "end": 113, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 107, + "end": 113, + "ctxt": 0 + }, + "kind": "number" + } + }, + "typeParams": null + } + ] + } + } + }, + { + "type": "ExportDeclaration", + "span": { + "start": 117, + "end": 154, + "ctxt": 0 + }, + "declaration": { + "type": "TsInterfaceDeclaration", + "span": { + "start": 124, + "end": 154, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 134, + "end": 135, + "ctxt": 0 + }, + "value": "B", + "optional": false + }, + "declare": false, + "typeParams": null, + "extends": [], + "body": { + "type": "TsInterfaceBody", + "span": { + "start": 136, + "end": 154, + "ctxt": 0 + }, + "body": [ + { + "type": "TsPropertySignature", + "span": { + "start": 142, + "end": 152, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "Identifier", + "span": { + "start": 142, + "end": 143, + "ctxt": 0 + }, + "value": "a", + "optional": false + }, + "computed": false, + "optional": false, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 143, + "end": 151, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 145, + "end": 151, + "ctxt": 0 + }, + "kind": "number" + } + }, + "typeParams": null + } + ] + } + } + }, + { + "type": "FunctionDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 281, + "end": 282, + "ctxt": 0 + }, + "value": "f", + "optional": false + }, + "declare": false, + "params": [ + { + "type": "Parameter", + "span": { + "start": 283, + "end": 284, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 283, + "end": 284, + "ctxt": 0 + }, + "value": "a", + "optional": false, + "typeAnnotation": null + } + }, + { + "type": "Parameter", + "span": { + "start": 286, + "end": 287, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 286, + "end": 287, + "ctxt": 0 + }, + "value": "b", + "optional": false, + "typeAnnotation": null + } + } + ], + "decorators": [], + "span": { + "start": 272, + "end": 291, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 289, + "end": 291, + "ctxt": 0 + }, + "stmts": [] + }, + "generator": false, + "async": false, + "typeParameters": null, + "returnType": null + } + ], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/tsc/importTag8.ts b/crates/swc_ecma_parser/tests/tsc/importTag8.ts new file mode 100644 index 000000000000..9832c5485852 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag8.ts @@ -0,0 +1,24 @@ +// @checkJs: true +// @allowJs: true +// @noEmit: true + +// @filename: /types.ts +export interface A { + a: number; +} +export interface B { + a: number; +} + +// @filename: /foo.js +/** + * @import + * { A, B } + * from "./types" + */ + +/** + * @param { A } a + * @param { B } b + */ +function f(a, b) {} diff --git a/crates/swc_ecma_parser/tests/tsc/importTag9.json b/crates/swc_ecma_parser/tests/tsc/importTag9.json new file mode 100644 index 000000000000..f028480fe28e --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag9.json @@ -0,0 +1,246 @@ +{ + "type": "Module", + "span": { + "start": 79, + "end": 305, + "ctxt": 0 + }, + "body": [ + { + "type": "ExportDeclaration", + "span": { + "start": 79, + "end": 116, + "ctxt": 0 + }, + "declaration": { + "type": "TsInterfaceDeclaration", + "span": { + "start": 86, + "end": 116, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 96, + "end": 97, + "ctxt": 0 + }, + "value": "A", + "optional": false + }, + "declare": false, + "typeParams": null, + "extends": [], + "body": { + "type": "TsInterfaceBody", + "span": { + "start": 98, + "end": 116, + "ctxt": 0 + }, + "body": [ + { + "type": "TsPropertySignature", + "span": { + "start": 104, + "end": 114, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "Identifier", + "span": { + "start": 104, + "end": 105, + "ctxt": 0 + }, + "value": "a", + "optional": false + }, + "computed": false, + "optional": false, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 105, + "end": 113, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 107, + "end": 113, + "ctxt": 0 + }, + "kind": "number" + } + }, + "typeParams": null + } + ] + } + } + }, + { + "type": "ExportDeclaration", + "span": { + "start": 117, + "end": 154, + "ctxt": 0 + }, + "declaration": { + "type": "TsInterfaceDeclaration", + "span": { + "start": 124, + "end": 154, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 134, + "end": 135, + "ctxt": 0 + }, + "value": "B", + "optional": false + }, + "declare": false, + "typeParams": null, + "extends": [], + "body": { + "type": "TsInterfaceBody", + "span": { + "start": 136, + "end": 154, + "ctxt": 0 + }, + "body": [ + { + "type": "TsPropertySignature", + "span": { + "start": 142, + "end": 152, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "Identifier", + "span": { + "start": 142, + "end": 143, + "ctxt": 0 + }, + "value": "a", + "optional": false + }, + "computed": false, + "optional": false, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 143, + "end": 151, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 145, + "end": 151, + "ctxt": 0 + }, + "kind": "number" + } + }, + "typeParams": null + } + ] + } + } + }, + { + "type": "FunctionDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 295, + "end": 296, + "ctxt": 0 + }, + "value": "f", + "optional": false + }, + "declare": false, + "params": [ + { + "type": "Parameter", + "span": { + "start": 297, + "end": 298, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 297, + "end": 298, + "ctxt": 0 + }, + "value": "a", + "optional": false, + "typeAnnotation": null + } + }, + { + "type": "Parameter", + "span": { + "start": 300, + "end": 301, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 300, + "end": 301, + "ctxt": 0 + }, + "value": "b", + "optional": false, + "typeAnnotation": null + } + } + ], + "decorators": [], + "span": { + "start": 286, + "end": 305, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 303, + "end": 305, + "ctxt": 0 + }, + "stmts": [] + }, + "generator": false, + "async": false, + "typeParameters": null, + "returnType": null + } + ], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/tsc/importTag9.ts b/crates/swc_ecma_parser/tests/tsc/importTag9.ts new file mode 100644 index 000000000000..6cf733d5e83d --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/importTag9.ts @@ -0,0 +1,24 @@ +// @checkJs: true +// @allowJs: true +// @noEmit: true + +// @filename: /types.ts +export interface A { + a: number; +} +export interface B { + a: number; +} + +// @filename: /foo.js +/** + * @import + * * as types + * from "./types" + */ + +/** + * @param { types.A } a + * @param { types.B } b + */ +function f(a, b) {} diff --git a/crates/swc_ecma_parser/tests/tsc/inferringClassMembersFromAssignments.json b/crates/swc_ecma_parser/tests/tsc/inferringClassMembersFromAssignments.json index f150ef3e33c7..9c9e3f7d632b 100644 --- a/crates/swc_ecma_parser/tests/tsc/inferringClassMembersFromAssignments.json +++ b/crates/swc_ecma_parser/tests/tsc/inferringClassMembersFromAssignments.json @@ -1,8 +1,8 @@ { "type": "Script", "span": { - "start": 127, - "end": 3346, + "start": 131, + "end": 3350, "ctxt": 0 }, "body": [ @@ -11,8 +11,8 @@ "identifier": { "type": "Identifier", "span": { - "start": 133, - "end": 134, + "start": 137, + "end": 138, "ctxt": 0 }, "value": "C", @@ -20,8 +20,8 @@ }, "declare": false, "span": { - "start": 127, - "end": 2382, + "start": 131, + "end": 2386, "ctxt": 0 }, "decorators": [], @@ -29,15 +29,15 @@ { "type": "Constructor", "span": { - "start": 141, - "end": 333, + "start": 145, + "end": 337, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 141, - "end": 152, + "start": 145, + "end": 156, "ctxt": 0 }, "value": "constructor", @@ -47,37 +47,37 @@ "body": { "type": "BlockStatement", "span": { - "start": 155, - "end": 333, + "start": 159, + "end": 337, "ctxt": 0 }, "stmts": [ { "type": "IfStatement", "span": { - "start": 165, - "end": 298, + "start": 169, + "end": 302, "ctxt": 0 }, "test": { "type": "CallExpression", "span": { - "start": 169, - "end": 182, + "start": 173, + "end": 186, "ctxt": 0 }, "callee": { "type": "MemberExpression", "span": { - "start": 169, - "end": 180, + "start": 173, + "end": 184, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 169, - "end": 173, + "start": 173, + "end": 177, "ctxt": 0 }, "value": "Math", @@ -86,8 +86,8 @@ "property": { "type": "Identifier", "span": { - "start": 174, - "end": 180, + "start": 178, + "end": 184, "ctxt": 0 }, "value": "random", @@ -100,46 +100,46 @@ "consequent": { "type": "BlockStatement", "span": { - "start": 184, - "end": 231, + "start": 188, + "end": 235, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 198, - "end": 221, + "start": 202, + "end": 225, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 198, - "end": 220, + "start": 202, + "end": 224, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 198, - "end": 216, + "start": 202, + "end": 220, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 198, - "end": 202, + "start": 202, + "end": 206, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 203, - "end": 216, + "start": 207, + "end": 220, "ctxt": 0 }, "value": "inConstructor", @@ -149,8 +149,8 @@ "right": { "type": "NumericLiteral", "span": { - "start": 219, - "end": 220, + "start": 223, + "end": 224, "ctxt": 0 }, "value": 0.0, @@ -163,46 +163,46 @@ "alternate": { "type": "BlockStatement", "span": { - "start": 245, - "end": 298, + "start": 249, + "end": 302, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 259, - "end": 288, + "start": 263, + "end": 292, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 259, - "end": 288, + "start": 263, + "end": 292, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 259, - "end": 277, + "start": 263, + "end": 281, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 259, - "end": 263, + "start": 263, + "end": 267, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 264, - "end": 277, + "start": 268, + "end": 281, "ctxt": 0 }, "value": "inConstructor", @@ -212,8 +212,8 @@ "right": { "type": "StringLiteral", "span": { - "start": 280, - "end": 288, + "start": 284, + "end": 292, "ctxt": 0 }, "value": "string", @@ -227,38 +227,38 @@ { "type": "ExpressionStatement", "span": { - "start": 307, - "end": 327, + "start": 311, + "end": 331, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 307, - "end": 326, + "start": 311, + "end": 330, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 307, - "end": 322, + "start": 311, + "end": 326, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 307, - "end": 311, + "start": 311, + "end": 315, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 312, - "end": 322, + "start": 316, + "end": 326, "ctxt": 0 }, "value": "inMultiple", @@ -268,8 +268,8 @@ "right": { "type": "NumericLiteral", "span": { - "start": 325, - "end": 326, + "start": 329, + "end": 330, "ctxt": 0 }, "value": 0.0, @@ -285,15 +285,15 @@ { "type": "ClassMethod", "span": { - "start": 338, - "end": 877, + "start": 342, + "end": 881, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 338, - "end": 344, + "start": 342, + "end": 348, "ctxt": 0 }, "value": "method", @@ -303,44 +303,44 @@ "params": [], "decorators": [], "span": { - "start": 338, - "end": 877, + "start": 342, + "end": 881, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 347, - "end": 877, + "start": 351, + "end": 881, "ctxt": 0 }, "stmts": [ { "type": "IfStatement", "span": { - "start": 357, - "end": 569, + "start": 361, + "end": 573, "ctxt": 0 }, "test": { "type": "CallExpression", "span": { - "start": 361, - "end": 374, + "start": 365, + "end": 378, "ctxt": 0 }, "callee": { "type": "MemberExpression", "span": { - "start": 361, - "end": 372, + "start": 365, + "end": 376, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 361, - "end": 365, + "start": 365, + "end": 369, "ctxt": 0 }, "value": "Math", @@ -349,8 +349,8 @@ "property": { "type": "Identifier", "span": { - "start": 366, - "end": 372, + "start": 370, + "end": 376, "ctxt": 0 }, "value": "random", @@ -363,46 +363,46 @@ "consequent": { "type": "BlockStatement", "span": { - "start": 376, - "end": 460, + "start": 380, + "end": 464, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 390, - "end": 408, + "start": 394, + "end": 412, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 390, - "end": 407, + "start": 394, + "end": 411, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 390, - "end": 403, + "start": 394, + "end": 407, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 390, - "end": 394, + "start": 394, + "end": 398, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 395, - "end": 403, + "start": 399, + "end": 407, "ctxt": 0 }, "value": "inMethod", @@ -412,8 +412,8 @@ "right": { "type": "NumericLiteral", "span": { - "start": 406, - "end": 407, + "start": 410, + "end": 411, "ctxt": 0 }, "value": 0.0, @@ -424,38 +424,38 @@ { "type": "ExpressionStatement", "span": { - "start": 421, - "end": 450, + "start": 425, + "end": 454, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 421, - "end": 449, + "start": 425, + "end": 453, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 421, - "end": 442, + "start": 425, + "end": 446, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 421, - "end": 425, + "start": 425, + "end": 429, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 426, - "end": 442, + "start": 430, + "end": 446, "ctxt": 0 }, "value": "inMethodNullable", @@ -465,8 +465,8 @@ "right": { "type": "NullLiteral", "span": { - "start": 445, - "end": 449, + "start": 449, + "end": 453, "ctxt": 0 } } @@ -477,46 +477,46 @@ "alternate": { "type": "BlockStatement", "span": { - "start": 474, - "end": 569, + "start": 478, + "end": 573, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 488, - "end": 512, + "start": 492, + "end": 516, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 488, - "end": 512, + "start": 492, + "end": 516, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 488, - "end": 501, + "start": 492, + "end": 505, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 488, - "end": 492, + "start": 492, + "end": 496, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 493, - "end": 501, + "start": 497, + "end": 505, "ctxt": 0 }, "value": "inMethod", @@ -526,8 +526,8 @@ "right": { "type": "StringLiteral", "span": { - "start": 504, - "end": 512, + "start": 508, + "end": 516, "ctxt": 0 }, "value": "string", @@ -538,38 +538,38 @@ { "type": "ExpressionStatement", "span": { - "start": 525, - "end": 559, + "start": 529, + "end": 563, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 525, - "end": 558, + "start": 529, + "end": 562, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 525, - "end": 546, + "start": 529, + "end": 550, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 525, - "end": 529, + "start": 529, + "end": 533, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 530, - "end": 546, + "start": 534, + "end": 550, "ctxt": 0 }, "value": "inMethodNullable", @@ -579,8 +579,8 @@ "right": { "type": "Identifier", "span": { - "start": 549, - "end": 558, + "start": 553, + "end": 562, "ctxt": 0 }, "value": "undefined", @@ -594,38 +594,38 @@ { "type": "ExpressionStatement", "span": { - "start": 578, - "end": 605, + "start": 582, + "end": 609, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 578, - "end": 604, + "start": 582, + "end": 608, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 578, - "end": 593, + "start": 582, + "end": 597, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 578, - "end": 582, + "start": 582, + "end": 586, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 583, - "end": 593, + "start": 587, + "end": 597, "ctxt": 0 }, "value": "inMultiple", @@ -635,8 +635,8 @@ "right": { "type": "StringLiteral", "span": { - "start": 596, - "end": 604, + "start": 600, + "end": 608, "ctxt": 0 }, "value": "string", @@ -647,38 +647,38 @@ { "type": "ExpressionStatement", "span": { - "start": 614, - "end": 648, + "start": 618, + "end": 652, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 614, - "end": 647, + "start": 618, + "end": 651, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 614, - "end": 636, + "start": 618, + "end": 640, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 614, - "end": 618, + "start": 618, + "end": 622, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 619, - "end": 636, + "start": 623, + "end": 640, "ctxt": 0 }, "value": "inMultipleMethods", @@ -688,8 +688,8 @@ "right": { "type": "StringLiteral", "span": { - "start": 639, - "end": 647, + "start": 643, + "end": 651, "ctxt": 0 }, "value": "string", @@ -700,8 +700,8 @@ { "type": "VariableDeclaration", "span": { - "start": 658, - "end": 871, + "start": 662, + "end": 875, "ctxt": 0 }, "kind": "var", @@ -710,15 +710,15 @@ { "type": "VariableDeclarator", "span": { - "start": 662, - "end": 870, + "start": 666, + "end": 874, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 662, - "end": 668, + "start": 666, + "end": 672, "ctxt": 0 }, "value": "action", @@ -728,45 +728,45 @@ "init": { "type": "ArrowFunctionExpression", "span": { - "start": 671, - "end": 870, + "start": 675, + "end": 874, "ctxt": 0 }, "params": [], "body": { "type": "BlockStatement", "span": { - "start": 677, - "end": 870, + "start": 681, + "end": 874, "ctxt": 0 }, "stmts": [ { "type": "IfStatement", "span": { - "start": 691, - "end": 860, + "start": 695, + "end": 864, "ctxt": 0 }, "test": { "type": "CallExpression", "span": { - "start": 695, - "end": 708, + "start": 699, + "end": 712, "ctxt": 0 }, "callee": { "type": "MemberExpression", "span": { - "start": 695, - "end": 706, + "start": 699, + "end": 710, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 695, - "end": 699, + "start": 699, + "end": 703, "ctxt": 0 }, "value": "Math", @@ -775,8 +775,8 @@ "property": { "type": "Identifier", "span": { - "start": 700, - "end": 706, + "start": 704, + "end": 710, "ctxt": 0 }, "value": "random", @@ -789,46 +789,46 @@ "consequent": { "type": "BlockStatement", "span": { - "start": 710, - "end": 773, + "start": 714, + "end": 777, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 728, - "end": 759, + "start": 732, + "end": 763, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 728, - "end": 758, + "start": 732, + "end": 762, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 728, - "end": 754, + "start": 732, + "end": 758, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 728, - "end": 732, + "start": 732, + "end": 736, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 733, - "end": 754, + "start": 737, + "end": 758, "ctxt": 0 }, "value": "inNestedArrowFunction", @@ -838,8 +838,8 @@ "right": { "type": "NumericLiteral", "span": { - "start": 757, - "end": 758, + "start": 761, + "end": 762, "ctxt": 0 }, "value": 0.0, @@ -852,46 +852,46 @@ "alternate": { "type": "BlockStatement", "span": { - "start": 791, - "end": 860, + "start": 795, + "end": 864, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 809, - "end": 846, + "start": 813, + "end": 850, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 809, - "end": 846, + "start": 813, + "end": 850, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 809, - "end": 835, + "start": 813, + "end": 839, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 809, - "end": 813, + "start": 813, + "end": 817, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 814, - "end": 835, + "start": 818, + "end": 839, "ctxt": 0 }, "value": "inNestedArrowFunction", @@ -901,8 +901,8 @@ "right": { "type": "StringLiteral", "span": { - "start": 838, - "end": 846, + "start": 842, + "end": 850, "ctxt": 0 }, "value": "string", @@ -941,15 +941,15 @@ { "type": "ClassMethod", "span": { - "start": 882, - "end": 1100, + "start": 886, + "end": 1104, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 882, - "end": 885, + "start": 886, + "end": 889, "ctxt": 0 }, "value": "get", @@ -959,44 +959,44 @@ "params": [], "decorators": [], "span": { - "start": 882, - "end": 1100, + "start": 886, + "end": 1104, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 888, - "end": 1100, + "start": 892, + "end": 1104, "ctxt": 0 }, "stmts": [ { "type": "IfStatement", "span": { - "start": 898, - "end": 1021, + "start": 902, + "end": 1025, "ctxt": 0 }, "test": { "type": "CallExpression", "span": { - "start": 902, - "end": 915, + "start": 906, + "end": 919, "ctxt": 0 }, "callee": { "type": "MemberExpression", "span": { - "start": 902, - "end": 913, + "start": 906, + "end": 917, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 902, - "end": 906, + "start": 906, + "end": 910, "ctxt": 0 }, "value": "Math", @@ -1005,8 +1005,8 @@ "property": { "type": "Identifier", "span": { - "start": 907, - "end": 913, + "start": 911, + "end": 917, "ctxt": 0 }, "value": "random", @@ -1019,46 +1019,46 @@ "consequent": { "type": "BlockStatement", "span": { - "start": 917, - "end": 959, + "start": 921, + "end": 963, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 931, - "end": 949, + "start": 935, + "end": 953, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 931, - "end": 948, + "start": 935, + "end": 952, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 931, - "end": 944, + "start": 935, + "end": 948, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 931, - "end": 935, + "start": 935, + "end": 939, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 936, - "end": 944, + "start": 940, + "end": 948, "ctxt": 0 }, "value": "inGetter", @@ -1068,8 +1068,8 @@ "right": { "type": "NumericLiteral", "span": { - "start": 947, - "end": 948, + "start": 951, + "end": 952, "ctxt": 0 }, "value": 0.0, @@ -1082,46 +1082,46 @@ "alternate": { "type": "BlockStatement", "span": { - "start": 973, - "end": 1021, + "start": 977, + "end": 1025, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 987, - "end": 1011, + "start": 991, + "end": 1015, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 987, - "end": 1011, + "start": 991, + "end": 1015, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 987, - "end": 1000, + "start": 991, + "end": 1004, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 987, - "end": 991, + "start": 991, + "end": 995, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 992, - "end": 1000, + "start": 996, + "end": 1004, "ctxt": 0 }, "value": "inGetter", @@ -1131,8 +1131,8 @@ "right": { "type": "StringLiteral", "span": { - "start": 1003, - "end": 1011, + "start": 1007, + "end": 1015, "ctxt": 0 }, "value": "string", @@ -1146,38 +1146,38 @@ { "type": "ExpressionStatement", "span": { - "start": 1030, - "end": 1054, + "start": 1034, + "end": 1058, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 1030, - "end": 1053, + "start": 1034, + "end": 1057, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 1030, - "end": 1045, + "start": 1034, + "end": 1049, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 1030, - "end": 1034, + "start": 1034, + "end": 1038, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 1035, - "end": 1045, + "start": 1039, + "end": 1049, "ctxt": 0 }, "value": "inMultiple", @@ -1187,8 +1187,8 @@ "right": { "type": "BooleanLiteral", "span": { - "start": 1048, - "end": 1053, + "start": 1052, + "end": 1057, "ctxt": 0 }, "value": false @@ -1198,38 +1198,38 @@ { "type": "ExpressionStatement", "span": { - "start": 1063, - "end": 1094, + "start": 1067, + "end": 1098, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 1063, - "end": 1093, + "start": 1067, + "end": 1097, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 1063, - "end": 1085, + "start": 1067, + "end": 1089, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 1063, - "end": 1067, + "start": 1067, + "end": 1071, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 1068, - "end": 1085, + "start": 1072, + "end": 1089, "ctxt": 0 }, "value": "inMultipleMethods", @@ -1239,8 +1239,8 @@ "right": { "type": "BooleanLiteral", "span": { - "start": 1088, - "end": 1093, + "start": 1092, + "end": 1097, "ctxt": 0 }, "value": false @@ -1264,15 +1264,15 @@ { "type": "ClassMethod", "span": { - "start": 1105, - "end": 1250, + "start": 1109, + "end": 1254, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 1105, - "end": 1108, + "start": 1109, + "end": 1112, "ctxt": 0 }, "value": "set", @@ -1282,44 +1282,44 @@ "params": [], "decorators": [], "span": { - "start": 1105, - "end": 1250, + "start": 1109, + "end": 1254, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 1111, - "end": 1250, + "start": 1115, + "end": 1254, "ctxt": 0 }, "stmts": [ { "type": "IfStatement", "span": { - "start": 1121, - "end": 1244, + "start": 1125, + "end": 1248, "ctxt": 0 }, "test": { "type": "CallExpression", "span": { - "start": 1125, - "end": 1138, + "start": 1129, + "end": 1142, "ctxt": 0 }, "callee": { "type": "MemberExpression", "span": { - "start": 1125, - "end": 1136, + "start": 1129, + "end": 1140, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 1125, - "end": 1129, + "start": 1129, + "end": 1133, "ctxt": 0 }, "value": "Math", @@ -1328,8 +1328,8 @@ "property": { "type": "Identifier", "span": { - "start": 1130, - "end": 1136, + "start": 1134, + "end": 1140, "ctxt": 0 }, "value": "random", @@ -1342,46 +1342,46 @@ "consequent": { "type": "BlockStatement", "span": { - "start": 1140, - "end": 1182, + "start": 1144, + "end": 1186, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 1154, - "end": 1172, + "start": 1158, + "end": 1176, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 1154, - "end": 1171, + "start": 1158, + "end": 1175, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 1154, - "end": 1167, + "start": 1158, + "end": 1171, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 1154, - "end": 1158, + "start": 1158, + "end": 1162, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 1159, - "end": 1167, + "start": 1163, + "end": 1171, "ctxt": 0 }, "value": "inSetter", @@ -1391,8 +1391,8 @@ "right": { "type": "NumericLiteral", "span": { - "start": 1170, - "end": 1171, + "start": 1174, + "end": 1175, "ctxt": 0 }, "value": 0.0, @@ -1405,46 +1405,46 @@ "alternate": { "type": "BlockStatement", "span": { - "start": 1196, - "end": 1244, + "start": 1200, + "end": 1248, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 1210, - "end": 1234, + "start": 1214, + "end": 1238, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 1210, - "end": 1234, + "start": 1214, + "end": 1238, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 1210, - "end": 1223, + "start": 1214, + "end": 1227, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 1210, - "end": 1214, + "start": 1214, + "end": 1218, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 1215, - "end": 1223, + "start": 1219, + "end": 1227, "ctxt": 0 }, "value": "inSetter", @@ -1454,8 +1454,8 @@ "right": { "type": "StringLiteral", "span": { - "start": 1226, - "end": 1234, + "start": 1230, + "end": 1238, "ctxt": 0 }, "value": "string", @@ -1483,15 +1483,15 @@ { "type": "ClassProperty", "span": { - "start": 1255, - "end": 1433, + "start": 1259, + "end": 1437, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 1255, - "end": 1259, + "start": 1259, + "end": 1263, "ctxt": 0 }, "value": "prop", @@ -1500,45 +1500,45 @@ "value": { "type": "ArrowFunctionExpression", "span": { - "start": 1262, - "end": 1433, + "start": 1266, + "end": 1437, "ctxt": 0 }, "params": [], "body": { "type": "BlockStatement", "span": { - "start": 1268, - "end": 1433, + "start": 1272, + "end": 1437, "ctxt": 0 }, "stmts": [ { "type": "IfStatement", "span": { - "start": 1278, - "end": 1427, + "start": 1282, + "end": 1431, "ctxt": 0 }, "test": { "type": "CallExpression", "span": { - "start": 1282, - "end": 1295, + "start": 1286, + "end": 1299, "ctxt": 0 }, "callee": { "type": "MemberExpression", "span": { - "start": 1282, - "end": 1293, + "start": 1286, + "end": 1297, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 1282, - "end": 1286, + "start": 1286, + "end": 1290, "ctxt": 0 }, "value": "Math", @@ -1547,8 +1547,8 @@ "property": { "type": "Identifier", "span": { - "start": 1287, - "end": 1293, + "start": 1291, + "end": 1297, "ctxt": 0 }, "value": "random", @@ -1561,46 +1561,46 @@ "consequent": { "type": "BlockStatement", "span": { - "start": 1297, - "end": 1352, + "start": 1301, + "end": 1356, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 1311, - "end": 1342, + "start": 1315, + "end": 1346, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 1311, - "end": 1341, + "start": 1315, + "end": 1345, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 1311, - "end": 1337, + "start": 1315, + "end": 1341, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 1311, - "end": 1315, + "start": 1315, + "end": 1319, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 1316, - "end": 1337, + "start": 1320, + "end": 1341, "ctxt": 0 }, "value": "inPropertyDeclaration", @@ -1610,8 +1610,8 @@ "right": { "type": "NumericLiteral", "span": { - "start": 1340, - "end": 1341, + "start": 1344, + "end": 1345, "ctxt": 0 }, "value": 0.0, @@ -1624,46 +1624,46 @@ "alternate": { "type": "BlockStatement", "span": { - "start": 1366, - "end": 1427, + "start": 1370, + "end": 1431, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 1380, - "end": 1417, + "start": 1384, + "end": 1421, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 1380, - "end": 1417, + "start": 1384, + "end": 1421, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 1380, - "end": 1406, + "start": 1384, + "end": 1410, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 1380, - "end": 1384, + "start": 1384, + "end": 1388, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 1385, - "end": 1406, + "start": 1389, + "end": 1410, "ctxt": 0 }, "value": "inPropertyDeclaration", @@ -1673,8 +1673,8 @@ "right": { "type": "StringLiteral", "span": { - "start": 1409, - "end": 1417, + "start": 1413, + "end": 1421, "ctxt": 0 }, "value": "string", @@ -1706,15 +1706,15 @@ { "type": "ClassMethod", "span": { - "start": 1438, - "end": 1840, + "start": 1442, + "end": 1844, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 1445, - "end": 1451, + "start": 1449, + "end": 1455, "ctxt": 0 }, "value": "method", @@ -1724,44 +1724,44 @@ "params": [], "decorators": [], "span": { - "start": 1438, - "end": 1840, + "start": 1442, + "end": 1844, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 1454, - "end": 1840, + "start": 1458, + "end": 1844, "ctxt": 0 }, "stmts": [ { "type": "IfStatement", "span": { - "start": 1464, - "end": 1599, + "start": 1468, + "end": 1603, "ctxt": 0 }, "test": { "type": "CallExpression", "span": { - "start": 1468, - "end": 1481, + "start": 1472, + "end": 1485, "ctxt": 0 }, "callee": { "type": "MemberExpression", "span": { - "start": 1468, - "end": 1479, + "start": 1472, + "end": 1483, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 1468, - "end": 1472, + "start": 1472, + "end": 1476, "ctxt": 0 }, "value": "Math", @@ -1770,8 +1770,8 @@ "property": { "type": "Identifier", "span": { - "start": 1473, - "end": 1479, + "start": 1477, + "end": 1483, "ctxt": 0 }, "value": "random", @@ -1784,46 +1784,46 @@ "consequent": { "type": "BlockStatement", "span": { - "start": 1483, - "end": 1531, + "start": 1487, + "end": 1535, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 1497, - "end": 1521, + "start": 1501, + "end": 1525, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 1497, - "end": 1520, + "start": 1501, + "end": 1524, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 1497, - "end": 1516, + "start": 1501, + "end": 1520, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 1497, - "end": 1501, + "start": 1501, + "end": 1505, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 1502, - "end": 1516, + "start": 1506, + "end": 1520, "ctxt": 0 }, "value": "inStaticMethod", @@ -1833,8 +1833,8 @@ "right": { "type": "NumericLiteral", "span": { - "start": 1519, - "end": 1520, + "start": 1523, + "end": 1524, "ctxt": 0 }, "value": 0.0, @@ -1847,46 +1847,46 @@ "alternate": { "type": "BlockStatement", "span": { - "start": 1545, - "end": 1599, + "start": 1549, + "end": 1603, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 1559, - "end": 1589, + "start": 1563, + "end": 1593, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 1559, - "end": 1589, + "start": 1563, + "end": 1593, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 1559, - "end": 1578, + "start": 1563, + "end": 1582, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 1559, - "end": 1563, + "start": 1563, + "end": 1567, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 1564, - "end": 1578, + "start": 1568, + "end": 1582, "ctxt": 0 }, "value": "inStaticMethod", @@ -1896,8 +1896,8 @@ "right": { "type": "StringLiteral", "span": { - "start": 1581, - "end": 1589, + "start": 1585, + "end": 1593, "ctxt": 0 }, "value": "string", @@ -1911,8 +1911,8 @@ { "type": "VariableDeclaration", "span": { - "start": 1609, - "end": 1834, + "start": 1613, + "end": 1838, "ctxt": 0 }, "kind": "var", @@ -1921,15 +1921,15 @@ { "type": "VariableDeclarator", "span": { - "start": 1613, - "end": 1833, + "start": 1617, + "end": 1837, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 1613, - "end": 1619, + "start": 1617, + "end": 1623, "ctxt": 0 }, "value": "action", @@ -1939,45 +1939,45 @@ "init": { "type": "ArrowFunctionExpression", "span": { - "start": 1622, - "end": 1833, + "start": 1626, + "end": 1837, "ctxt": 0 }, "params": [], "body": { "type": "BlockStatement", "span": { - "start": 1628, - "end": 1833, + "start": 1632, + "end": 1837, "ctxt": 0 }, "stmts": [ { "type": "IfStatement", "span": { - "start": 1642, - "end": 1823, + "start": 1646, + "end": 1827, "ctxt": 0 }, "test": { "type": "CallExpression", "span": { - "start": 1646, - "end": 1659, + "start": 1650, + "end": 1663, "ctxt": 0 }, "callee": { "type": "MemberExpression", "span": { - "start": 1646, - "end": 1657, + "start": 1650, + "end": 1661, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 1646, - "end": 1650, + "start": 1650, + "end": 1654, "ctxt": 0 }, "value": "Math", @@ -1986,8 +1986,8 @@ "property": { "type": "Identifier", "span": { - "start": 1651, - "end": 1657, + "start": 1655, + "end": 1661, "ctxt": 0 }, "value": "random", @@ -2000,46 +2000,46 @@ "consequent": { "type": "BlockStatement", "span": { - "start": 1661, - "end": 1730, + "start": 1665, + "end": 1734, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 1679, - "end": 1716, + "start": 1683, + "end": 1720, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 1679, - "end": 1715, + "start": 1683, + "end": 1719, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 1679, - "end": 1711, + "start": 1683, + "end": 1715, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 1679, - "end": 1683, + "start": 1683, + "end": 1687, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 1684, - "end": 1711, + "start": 1688, + "end": 1715, "ctxt": 0 }, "value": "inStaticNestedArrowFunction", @@ -2049,8 +2049,8 @@ "right": { "type": "NumericLiteral", "span": { - "start": 1714, - "end": 1715, + "start": 1718, + "end": 1719, "ctxt": 0 }, "value": 0.0, @@ -2063,46 +2063,46 @@ "alternate": { "type": "BlockStatement", "span": { - "start": 1748, - "end": 1823, + "start": 1752, + "end": 1827, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 1766, - "end": 1809, + "start": 1770, + "end": 1813, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 1766, - "end": 1809, + "start": 1770, + "end": 1813, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 1766, - "end": 1798, + "start": 1770, + "end": 1802, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 1766, - "end": 1770, + "start": 1770, + "end": 1774, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 1771, - "end": 1798, + "start": 1775, + "end": 1802, "ctxt": 0 }, "value": "inStaticNestedArrowFunction", @@ -2112,8 +2112,8 @@ "right": { "type": "StringLiteral", "span": { - "start": 1801, - "end": 1809, + "start": 1805, + "end": 1813, "ctxt": 0 }, "value": "string", @@ -2152,15 +2152,15 @@ { "type": "ClassMethod", "span": { - "start": 1845, - "end": 2009, + "start": 1849, + "end": 2013, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 1852, - "end": 1855, + "start": 1856, + "end": 1859, "ctxt": 0 }, "value": "get", @@ -2170,44 +2170,44 @@ "params": [], "decorators": [], "span": { - "start": 1845, - "end": 2009, + "start": 1849, + "end": 2013, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 1858, - "end": 2009, + "start": 1862, + "end": 2013, "ctxt": 0 }, "stmts": [ { "type": "IfStatement", "span": { - "start": 1868, - "end": 2003, + "start": 1872, + "end": 2007, "ctxt": 0 }, "test": { "type": "CallExpression", "span": { - "start": 1872, - "end": 1885, + "start": 1876, + "end": 1889, "ctxt": 0 }, "callee": { "type": "MemberExpression", "span": { - "start": 1872, - "end": 1883, + "start": 1876, + "end": 1887, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 1872, - "end": 1876, + "start": 1876, + "end": 1880, "ctxt": 0 }, "value": "Math", @@ -2216,8 +2216,8 @@ "property": { "type": "Identifier", "span": { - "start": 1877, - "end": 1883, + "start": 1881, + "end": 1887, "ctxt": 0 }, "value": "random", @@ -2230,46 +2230,46 @@ "consequent": { "type": "BlockStatement", "span": { - "start": 1887, - "end": 1935, + "start": 1891, + "end": 1939, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 1901, - "end": 1925, + "start": 1905, + "end": 1929, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 1901, - "end": 1924, + "start": 1905, + "end": 1928, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 1901, - "end": 1920, + "start": 1905, + "end": 1924, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 1901, - "end": 1905, + "start": 1905, + "end": 1909, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 1906, - "end": 1920, + "start": 1910, + "end": 1924, "ctxt": 0 }, "value": "inStaticGetter", @@ -2279,8 +2279,8 @@ "right": { "type": "NumericLiteral", "span": { - "start": 1923, - "end": 1924, + "start": 1927, + "end": 1928, "ctxt": 0 }, "value": 0.0, @@ -2293,46 +2293,46 @@ "alternate": { "type": "BlockStatement", "span": { - "start": 1949, - "end": 2003, + "start": 1953, + "end": 2007, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 1963, - "end": 1993, + "start": 1967, + "end": 1997, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 1963, - "end": 1993, + "start": 1967, + "end": 1997, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 1963, - "end": 1982, + "start": 1967, + "end": 1986, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 1963, - "end": 1967, + "start": 1967, + "end": 1971, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 1968, - "end": 1982, + "start": 1972, + "end": 1986, "ctxt": 0 }, "value": "inStaticGetter", @@ -2342,8 +2342,8 @@ "right": { "type": "StringLiteral", "span": { - "start": 1985, - "end": 1993, + "start": 1989, + "end": 1997, "ctxt": 0 }, "value": "string", @@ -2371,15 +2371,15 @@ { "type": "ClassMethod", "span": { - "start": 2014, - "end": 2178, + "start": 2018, + "end": 2182, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 2021, - "end": 2024, + "start": 2025, + "end": 2028, "ctxt": 0 }, "value": "set", @@ -2389,44 +2389,44 @@ "params": [], "decorators": [], "span": { - "start": 2014, - "end": 2178, + "start": 2018, + "end": 2182, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 2027, - "end": 2178, + "start": 2031, + "end": 2182, "ctxt": 0 }, "stmts": [ { "type": "IfStatement", "span": { - "start": 2037, - "end": 2172, + "start": 2041, + "end": 2176, "ctxt": 0 }, "test": { "type": "CallExpression", "span": { - "start": 2041, - "end": 2054, + "start": 2045, + "end": 2058, "ctxt": 0 }, "callee": { "type": "MemberExpression", "span": { - "start": 2041, - "end": 2052, + "start": 2045, + "end": 2056, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 2041, - "end": 2045, + "start": 2045, + "end": 2049, "ctxt": 0 }, "value": "Math", @@ -2435,8 +2435,8 @@ "property": { "type": "Identifier", "span": { - "start": 2046, - "end": 2052, + "start": 2050, + "end": 2056, "ctxt": 0 }, "value": "random", @@ -2449,46 +2449,46 @@ "consequent": { "type": "BlockStatement", "span": { - "start": 2056, - "end": 2104, + "start": 2060, + "end": 2108, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 2070, - "end": 2094, + "start": 2074, + "end": 2098, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 2070, - "end": 2093, + "start": 2074, + "end": 2097, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 2070, - "end": 2089, + "start": 2074, + "end": 2093, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 2070, - "end": 2074, + "start": 2074, + "end": 2078, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 2075, - "end": 2089, + "start": 2079, + "end": 2093, "ctxt": 0 }, "value": "inStaticSetter", @@ -2498,8 +2498,8 @@ "right": { "type": "NumericLiteral", "span": { - "start": 2092, - "end": 2093, + "start": 2096, + "end": 2097, "ctxt": 0 }, "value": 0.0, @@ -2512,46 +2512,46 @@ "alternate": { "type": "BlockStatement", "span": { - "start": 2118, - "end": 2172, + "start": 2122, + "end": 2176, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 2132, - "end": 2162, + "start": 2136, + "end": 2166, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 2132, - "end": 2162, + "start": 2136, + "end": 2166, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 2132, - "end": 2151, + "start": 2136, + "end": 2155, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 2132, - "end": 2136, + "start": 2136, + "end": 2140, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 2137, - "end": 2151, + "start": 2141, + "end": 2155, "ctxt": 0 }, "value": "inStaticSetter", @@ -2561,8 +2561,8 @@ "right": { "type": "StringLiteral", "span": { - "start": 2154, - "end": 2162, + "start": 2158, + "end": 2166, "ctxt": 0 }, "value": "string", @@ -2590,15 +2590,15 @@ { "type": "ClassProperty", "span": { - "start": 2183, - "end": 2380, + "start": 2187, + "end": 2384, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 2190, - "end": 2194, + "start": 2194, + "end": 2198, "ctxt": 0 }, "value": "prop", @@ -2607,45 +2607,45 @@ "value": { "type": "ArrowFunctionExpression", "span": { - "start": 2197, - "end": 2380, + "start": 2201, + "end": 2384, "ctxt": 0 }, "params": [], "body": { "type": "BlockStatement", "span": { - "start": 2203, - "end": 2380, + "start": 2207, + "end": 2384, "ctxt": 0 }, "stmts": [ { "type": "IfStatement", "span": { - "start": 2213, - "end": 2374, + "start": 2217, + "end": 2378, "ctxt": 0 }, "test": { "type": "CallExpression", "span": { - "start": 2217, - "end": 2230, + "start": 2221, + "end": 2234, "ctxt": 0 }, "callee": { "type": "MemberExpression", "span": { - "start": 2217, - "end": 2228, + "start": 2221, + "end": 2232, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 2217, - "end": 2221, + "start": 2221, + "end": 2225, "ctxt": 0 }, "value": "Math", @@ -2654,8 +2654,8 @@ "property": { "type": "Identifier", "span": { - "start": 2222, - "end": 2228, + "start": 2226, + "end": 2232, "ctxt": 0 }, "value": "random", @@ -2668,46 +2668,46 @@ "consequent": { "type": "BlockStatement", "span": { - "start": 2232, - "end": 2293, + "start": 2236, + "end": 2297, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 2246, - "end": 2283, + "start": 2250, + "end": 2287, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 2246, - "end": 2282, + "start": 2250, + "end": 2286, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 2246, - "end": 2278, + "start": 2250, + "end": 2282, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 2246, - "end": 2250, + "start": 2250, + "end": 2254, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 2251, - "end": 2278, + "start": 2255, + "end": 2282, "ctxt": 0 }, "value": "inStaticPropertyDeclaration", @@ -2717,8 +2717,8 @@ "right": { "type": "NumericLiteral", "span": { - "start": 2281, - "end": 2282, + "start": 2285, + "end": 2286, "ctxt": 0 }, "value": 0.0, @@ -2731,46 +2731,46 @@ "alternate": { "type": "BlockStatement", "span": { - "start": 2307, - "end": 2374, + "start": 2311, + "end": 2378, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 2321, - "end": 2364, + "start": 2325, + "end": 2368, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 2321, - "end": 2364, + "start": 2325, + "end": 2368, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 2321, - "end": 2353, + "start": 2325, + "end": 2357, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 2321, - "end": 2325, + "start": 2325, + "end": 2329, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 2326, - "end": 2353, + "start": 2330, + "end": 2357, "ctxt": 0 }, "value": "inStaticPropertyDeclaration", @@ -2780,8 +2780,8 @@ "right": { "type": "StringLiteral", "span": { - "start": 2356, - "end": 2364, + "start": 2360, + "end": 2368, "ctxt": 0 }, "value": "string", @@ -2820,8 +2820,8 @@ { "type": "VariableDeclaration", "span": { - "start": 2403, - "end": 2419, + "start": 2407, + "end": 2423, "ctxt": 0 }, "kind": "var", @@ -2830,15 +2830,15 @@ { "type": "VariableDeclarator", "span": { - "start": 2407, - "end": 2418, + "start": 2411, + "end": 2422, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 2407, - "end": 2408, + "start": 2411, + "end": 2412, "ctxt": 0 }, "value": "c", @@ -2848,15 +2848,15 @@ "init": { "type": "NewExpression", "span": { - "start": 2411, - "end": 2418, + "start": 2415, + "end": 2422, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { - "start": 2415, - "end": 2416, + "start": 2419, + "end": 2420, "ctxt": 0 }, "value": "C", @@ -2872,8 +2872,8 @@ { "type": "VariableDeclaration", "span": { - "start": 2421, - "end": 2457, + "start": 2425, + "end": 2461, "ctxt": 0 }, "kind": "var", @@ -2882,15 +2882,15 @@ { "type": "VariableDeclarator", "span": { - "start": 2425, - "end": 2456, + "start": 2429, + "end": 2460, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 2425, - "end": 2439, + "start": 2429, + "end": 2443, "ctxt": 0 }, "value": "stringOrNumber", @@ -2898,23 +2898,23 @@ "typeAnnotation": { "type": "TsTypeAnnotation", "span": { - "start": 2439, - "end": 2456, + "start": 2443, + "end": 2460, "ctxt": 0 }, "typeAnnotation": { "type": "TsUnionType", "span": { - "start": 2441, - "end": 2456, + "start": 2445, + "end": 2460, "ctxt": 0 }, "types": [ { "type": "TsKeywordType", "span": { - "start": 2441, - "end": 2447, + "start": 2445, + "end": 2451, "ctxt": 0 }, "kind": "string" @@ -2922,8 +2922,8 @@ { "type": "TsKeywordType", "span": { - "start": 2450, - "end": 2456, + "start": 2454, + "end": 2460, "ctxt": 0 }, "kind": "number" @@ -2940,8 +2940,8 @@ { "type": "VariableDeclaration", "span": { - "start": 2458, - "end": 2495, + "start": 2462, + "end": 2499, "ctxt": 0 }, "kind": "var", @@ -2950,15 +2950,15 @@ { "type": "VariableDeclarator", "span": { - "start": 2462, - "end": 2494, + "start": 2466, + "end": 2498, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 2462, - "end": 2476, + "start": 2466, + "end": 2480, "ctxt": 0 }, "value": "stringOrNumber", @@ -2968,15 +2968,15 @@ "init": { "type": "MemberExpression", "span": { - "start": 2479, - "end": 2494, + "start": 2483, + "end": 2498, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 2479, - "end": 2480, + "start": 2483, + "end": 2484, "ctxt": 0 }, "value": "c", @@ -2985,8 +2985,8 @@ "property": { "type": "Identifier", "span": { - "start": 2481, - "end": 2494, + "start": 2485, + "end": 2498, "ctxt": 0 }, "value": "inConstructor", @@ -3000,8 +3000,8 @@ { "type": "VariableDeclaration", "span": { - "start": 2497, - "end": 2556, + "start": 2501, + "end": 2560, "ctxt": 0 }, "kind": "var", @@ -3010,15 +3010,15 @@ { "type": "VariableDeclarator", "span": { - "start": 2501, - "end": 2555, + "start": 2505, + "end": 2559, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 2501, - "end": 2526, + "start": 2505, + "end": 2530, "ctxt": 0 }, "value": "stringOrNumberOrUndefined", @@ -3026,23 +3026,23 @@ "typeAnnotation": { "type": "TsTypeAnnotation", "span": { - "start": 2526, - "end": 2555, + "start": 2530, + "end": 2559, "ctxt": 0 }, "typeAnnotation": { "type": "TsUnionType", "span": { - "start": 2528, - "end": 2555, + "start": 2532, + "end": 2559, "ctxt": 0 }, "types": [ { "type": "TsKeywordType", "span": { - "start": 2528, - "end": 2534, + "start": 2532, + "end": 2538, "ctxt": 0 }, "kind": "string" @@ -3050,8 +3050,8 @@ { "type": "TsKeywordType", "span": { - "start": 2537, - "end": 2543, + "start": 2541, + "end": 2547, "ctxt": 0 }, "kind": "number" @@ -3059,8 +3059,8 @@ { "type": "TsKeywordType", "span": { - "start": 2546, - "end": 2555, + "start": 2550, + "end": 2559, "ctxt": 0 }, "kind": "undefined" @@ -3077,8 +3077,8 @@ { "type": "VariableDeclaration", "span": { - "start": 2558, - "end": 2601, + "start": 2562, + "end": 2605, "ctxt": 0 }, "kind": "var", @@ -3087,15 +3087,15 @@ { "type": "VariableDeclarator", "span": { - "start": 2562, - "end": 2600, + "start": 2566, + "end": 2604, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 2562, - "end": 2587, + "start": 2566, + "end": 2591, "ctxt": 0 }, "value": "stringOrNumberOrUndefined", @@ -3105,15 +3105,15 @@ "init": { "type": "MemberExpression", "span": { - "start": 2590, - "end": 2600, + "start": 2594, + "end": 2604, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 2590, - "end": 2591, + "start": 2594, + "end": 2595, "ctxt": 0 }, "value": "c", @@ -3122,8 +3122,8 @@ "property": { "type": "Identifier", "span": { - "start": 2592, - "end": 2600, + "start": 2596, + "end": 2604, "ctxt": 0 }, "value": "inMethod", @@ -3137,8 +3137,8 @@ { "type": "VariableDeclaration", "span": { - "start": 2602, - "end": 2645, + "start": 2606, + "end": 2649, "ctxt": 0 }, "kind": "var", @@ -3147,15 +3147,15 @@ { "type": "VariableDeclarator", "span": { - "start": 2606, - "end": 2644, + "start": 2610, + "end": 2648, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 2606, - "end": 2631, + "start": 2610, + "end": 2635, "ctxt": 0 }, "value": "stringOrNumberOrUndefined", @@ -3165,15 +3165,15 @@ "init": { "type": "MemberExpression", "span": { - "start": 2634, - "end": 2644, + "start": 2638, + "end": 2648, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 2634, - "end": 2635, + "start": 2638, + "end": 2639, "ctxt": 0 }, "value": "c", @@ -3182,8 +3182,8 @@ "property": { "type": "Identifier", "span": { - "start": 2636, - "end": 2644, + "start": 2640, + "end": 2648, "ctxt": 0 }, "value": "inGetter", @@ -3197,8 +3197,8 @@ { "type": "VariableDeclaration", "span": { - "start": 2646, - "end": 2689, + "start": 2650, + "end": 2693, "ctxt": 0 }, "kind": "var", @@ -3207,15 +3207,15 @@ { "type": "VariableDeclarator", "span": { - "start": 2650, - "end": 2688, + "start": 2654, + "end": 2692, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 2650, - "end": 2675, + "start": 2654, + "end": 2679, "ctxt": 0 }, "value": "stringOrNumberOrUndefined", @@ -3225,15 +3225,15 @@ "init": { "type": "MemberExpression", "span": { - "start": 2678, - "end": 2688, + "start": 2682, + "end": 2692, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 2678, - "end": 2679, + "start": 2682, + "end": 2683, "ctxt": 0 }, "value": "c", @@ -3242,8 +3242,8 @@ "property": { "type": "Identifier", "span": { - "start": 2680, - "end": 2688, + "start": 2684, + "end": 2692, "ctxt": 0 }, "value": "inSetter", @@ -3257,8 +3257,8 @@ { "type": "VariableDeclaration", "span": { - "start": 2690, - "end": 2746, + "start": 2694, + "end": 2750, "ctxt": 0 }, "kind": "var", @@ -3267,15 +3267,15 @@ { "type": "VariableDeclarator", "span": { - "start": 2694, - "end": 2745, + "start": 2698, + "end": 2749, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 2694, - "end": 2719, + "start": 2698, + "end": 2723, "ctxt": 0 }, "value": "stringOrNumberOrUndefined", @@ -3285,15 +3285,15 @@ "init": { "type": "MemberExpression", "span": { - "start": 2722, - "end": 2745, + "start": 2726, + "end": 2749, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 2722, - "end": 2723, + "start": 2726, + "end": 2727, "ctxt": 0 }, "value": "c", @@ -3302,8 +3302,8 @@ "property": { "type": "Identifier", "span": { - "start": 2724, - "end": 2745, + "start": 2728, + "end": 2749, "ctxt": 0 }, "value": "inPropertyDeclaration", @@ -3317,8 +3317,8 @@ { "type": "VariableDeclaration", "span": { - "start": 2747, - "end": 2802, + "start": 2751, + "end": 2806, "ctxt": 0 }, "kind": "var", @@ -3327,15 +3327,15 @@ { "type": "VariableDeclarator", "span": { - "start": 2751, - "end": 2802, + "start": 2755, + "end": 2806, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 2751, - "end": 2776, + "start": 2755, + "end": 2780, "ctxt": 0 }, "value": "stringOrNumberOrUndefined", @@ -3345,15 +3345,15 @@ "init": { "type": "MemberExpression", "span": { - "start": 2779, - "end": 2802, + "start": 2783, + "end": 2806, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 2779, - "end": 2780, + "start": 2783, + "end": 2784, "ctxt": 0 }, "value": "c", @@ -3362,8 +3362,8 @@ "property": { "type": "Identifier", "span": { - "start": 2781, - "end": 2802, + "start": 2785, + "end": 2806, "ctxt": 0 }, "value": "inNestedArrowFunction", @@ -3377,8 +3377,8 @@ { "type": "VariableDeclaration", "span": { - "start": 2804, - "end": 2859, + "start": 2808, + "end": 2863, "ctxt": 0 }, "kind": "var", @@ -3387,15 +3387,15 @@ { "type": "VariableDeclarator", "span": { - "start": 2808, - "end": 2858, + "start": 2812, + "end": 2862, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 2808, - "end": 2831, + "start": 2812, + "end": 2835, "ctxt": 0 }, "value": "stringOrNumberOrBoolean", @@ -3403,23 +3403,23 @@ "typeAnnotation": { "type": "TsTypeAnnotation", "span": { - "start": 2831, - "end": 2858, + "start": 2835, + "end": 2862, "ctxt": 0 }, "typeAnnotation": { "type": "TsUnionType", "span": { - "start": 2833, - "end": 2858, + "start": 2837, + "end": 2862, "ctxt": 0 }, "types": [ { "type": "TsKeywordType", "span": { - "start": 2833, - "end": 2839, + "start": 2837, + "end": 2843, "ctxt": 0 }, "kind": "string" @@ -3427,8 +3427,8 @@ { "type": "TsKeywordType", "span": { - "start": 2842, - "end": 2848, + "start": 2846, + "end": 2852, "ctxt": 0 }, "kind": "number" @@ -3436,8 +3436,8 @@ { "type": "TsKeywordType", "span": { - "start": 2851, - "end": 2858, + "start": 2855, + "end": 2862, "ctxt": 0 }, "kind": "boolean" @@ -3454,8 +3454,8 @@ { "type": "VariableDeclaration", "span": { - "start": 2861, - "end": 2880, + "start": 2865, + "end": 2884, "ctxt": 0 }, "kind": "var", @@ -3464,15 +3464,15 @@ { "type": "VariableDeclarator", "span": { - "start": 2865, - "end": 2879, + "start": 2869, + "end": 2883, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 2865, - "end": 2871, + "start": 2869, + "end": 2875, "ctxt": 0 }, "value": "number", @@ -3480,15 +3480,15 @@ "typeAnnotation": { "type": "TsTypeAnnotation", "span": { - "start": 2871, - "end": 2879, + "start": 2875, + "end": 2883, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { - "start": 2873, - "end": 2879, + "start": 2877, + "end": 2883, "ctxt": 0 }, "kind": "number" @@ -3503,8 +3503,8 @@ { "type": "VariableDeclaration", "span": { - "start": 2881, - "end": 2907, + "start": 2885, + "end": 2911, "ctxt": 0 }, "kind": "var", @@ -3513,15 +3513,15 @@ { "type": "VariableDeclarator", "span": { - "start": 2885, - "end": 2906, + "start": 2889, + "end": 2910, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 2885, - "end": 2891, + "start": 2889, + "end": 2895, "ctxt": 0 }, "value": "number", @@ -3531,15 +3531,15 @@ "init": { "type": "MemberExpression", "span": { - "start": 2894, - "end": 2906, + "start": 2898, + "end": 2910, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 2894, - "end": 2895, + "start": 2898, + "end": 2899, "ctxt": 0 }, "value": "c", @@ -3548,8 +3548,8 @@ "property": { "type": "Identifier", "span": { - "start": 2896, - "end": 2906, + "start": 2900, + "end": 2910, "ctxt": 0 }, "value": "inMultiple", @@ -3563,8 +3563,8 @@ { "type": "VariableDeclaration", "span": { - "start": 2908, - "end": 2970, + "start": 2912, + "end": 2974, "ctxt": 0 }, "kind": "var", @@ -3573,15 +3573,15 @@ { "type": "VariableDeclarator", "span": { - "start": 2912, - "end": 2969, + "start": 2916, + "end": 2973, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 2912, - "end": 2938, + "start": 2916, + "end": 2942, "ctxt": 0 }, "value": "stringOrBooleanOrUndefined", @@ -3589,23 +3589,23 @@ "typeAnnotation": { "type": "TsTypeAnnotation", "span": { - "start": 2939, - "end": 2969, + "start": 2943, + "end": 2973, "ctxt": 0 }, "typeAnnotation": { "type": "TsUnionType", "span": { - "start": 2941, - "end": 2969, + "start": 2945, + "end": 2973, "ctxt": 0 }, "types": [ { "type": "TsKeywordType", "span": { - "start": 2941, - "end": 2947, + "start": 2945, + "end": 2951, "ctxt": 0 }, "kind": "string" @@ -3613,8 +3613,8 @@ { "type": "TsKeywordType", "span": { - "start": 2950, - "end": 2957, + "start": 2954, + "end": 2961, "ctxt": 0 }, "kind": "boolean" @@ -3622,8 +3622,8 @@ { "type": "TsKeywordType", "span": { - "start": 2960, - "end": 2969, + "start": 2964, + "end": 2973, "ctxt": 0 }, "kind": "undefined" @@ -3640,8 +3640,8 @@ { "type": "VariableDeclaration", "span": { - "start": 2971, - "end": 3024, + "start": 2975, + "end": 3028, "ctxt": 0 }, "kind": "var", @@ -3650,15 +3650,15 @@ { "type": "VariableDeclarator", "span": { - "start": 2975, - "end": 3023, + "start": 2979, + "end": 3027, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 2975, - "end": 3001, + "start": 2979, + "end": 3005, "ctxt": 0 }, "value": "stringOrBooleanOrUndefined", @@ -3668,15 +3668,15 @@ "init": { "type": "MemberExpression", "span": { - "start": 3004, - "end": 3023, + "start": 3008, + "end": 3027, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 3004, - "end": 3005, + "start": 3008, + "end": 3009, "ctxt": 0 }, "value": "c", @@ -3685,8 +3685,8 @@ "property": { "type": "Identifier", "span": { - "start": 3006, - "end": 3023, + "start": 3010, + "end": 3027, "ctxt": 0 }, "value": "inMultipleMethods", @@ -3700,8 +3700,8 @@ { "type": "VariableDeclaration", "span": { - "start": 3025, - "end": 3038, + "start": 3029, + "end": 3042, "ctxt": 0 }, "kind": "var", @@ -3710,15 +3710,15 @@ { "type": "VariableDeclarator", "span": { - "start": 3029, - "end": 3037, + "start": 3033, + "end": 3041, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 3029, - "end": 3032, + "start": 3033, + "end": 3036, "ctxt": 0 }, "value": "any", @@ -3726,15 +3726,15 @@ "typeAnnotation": { "type": "TsTypeAnnotation", "span": { - "start": 3032, - "end": 3037, + "start": 3036, + "end": 3041, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { - "start": 3034, - "end": 3037, + "start": 3038, + "end": 3041, "ctxt": 0 }, "kind": "any" @@ -3749,8 +3749,8 @@ { "type": "VariableDeclaration", "span": { - "start": 3039, - "end": 3068, + "start": 3043, + "end": 3072, "ctxt": 0 }, "kind": "var", @@ -3759,15 +3759,15 @@ { "type": "VariableDeclarator", "span": { - "start": 3043, - "end": 3067, + "start": 3047, + "end": 3071, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 3043, - "end": 3046, + "start": 3047, + "end": 3050, "ctxt": 0 }, "value": "any", @@ -3777,15 +3777,15 @@ "init": { "type": "MemberExpression", "span": { - "start": 3049, - "end": 3067, + "start": 3053, + "end": 3071, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 3049, - "end": 3050, + "start": 3053, + "end": 3054, "ctxt": 0 }, "value": "c", @@ -3794,8 +3794,8 @@ "property": { "type": "Identifier", "span": { - "start": 3051, - "end": 3067, + "start": 3055, + "end": 3071, "ctxt": 0 }, "value": "inMethodNullable", @@ -3809,8 +3809,8 @@ { "type": "VariableDeclaration", "span": { - "start": 3071, - "end": 3120, + "start": 3075, + "end": 3124, "ctxt": 0 }, "kind": "var", @@ -3819,15 +3819,15 @@ { "type": "VariableDeclarator", "span": { - "start": 3075, - "end": 3119, + "start": 3079, + "end": 3123, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 3075, - "end": 3100, + "start": 3079, + "end": 3104, "ctxt": 0 }, "value": "stringOrNumberOrUndefined", @@ -3837,15 +3837,15 @@ "init": { "type": "MemberExpression", "span": { - "start": 3103, - "end": 3119, + "start": 3107, + "end": 3123, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 3103, - "end": 3104, + "start": 3107, + "end": 3108, "ctxt": 0 }, "value": "C", @@ -3854,8 +3854,8 @@ "property": { "type": "Identifier", "span": { - "start": 3105, - "end": 3119, + "start": 3109, + "end": 3123, "ctxt": 0 }, "value": "inStaticMethod", @@ -3869,8 +3869,8 @@ { "type": "VariableDeclaration", "span": { - "start": 3121, - "end": 3170, + "start": 3125, + "end": 3174, "ctxt": 0 }, "kind": "var", @@ -3879,15 +3879,15 @@ { "type": "VariableDeclarator", "span": { - "start": 3125, - "end": 3169, + "start": 3129, + "end": 3173, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 3125, - "end": 3150, + "start": 3129, + "end": 3154, "ctxt": 0 }, "value": "stringOrNumberOrUndefined", @@ -3897,15 +3897,15 @@ "init": { "type": "MemberExpression", "span": { - "start": 3153, - "end": 3169, + "start": 3157, + "end": 3173, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 3153, - "end": 3154, + "start": 3157, + "end": 3158, "ctxt": 0 }, "value": "C", @@ -3914,8 +3914,8 @@ "property": { "type": "Identifier", "span": { - "start": 3155, - "end": 3169, + "start": 3159, + "end": 3173, "ctxt": 0 }, "value": "inStaticGetter", @@ -3929,8 +3929,8 @@ { "type": "VariableDeclaration", "span": { - "start": 3171, - "end": 3220, + "start": 3175, + "end": 3224, "ctxt": 0 }, "kind": "var", @@ -3939,15 +3939,15 @@ { "type": "VariableDeclarator", "span": { - "start": 3175, - "end": 3219, + "start": 3179, + "end": 3223, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 3175, - "end": 3200, + "start": 3179, + "end": 3204, "ctxt": 0 }, "value": "stringOrNumberOrUndefined", @@ -3957,15 +3957,15 @@ "init": { "type": "MemberExpression", "span": { - "start": 3203, - "end": 3219, + "start": 3207, + "end": 3223, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 3203, - "end": 3204, + "start": 3207, + "end": 3208, "ctxt": 0 }, "value": "C", @@ -3974,8 +3974,8 @@ "property": { "type": "Identifier", "span": { - "start": 3205, - "end": 3219, + "start": 3209, + "end": 3223, "ctxt": 0 }, "value": "inStaticSetter", @@ -3989,8 +3989,8 @@ { "type": "VariableDeclaration", "span": { - "start": 3221, - "end": 3283, + "start": 3225, + "end": 3287, "ctxt": 0 }, "kind": "var", @@ -3999,15 +3999,15 @@ { "type": "VariableDeclarator", "span": { - "start": 3225, - "end": 3282, + "start": 3229, + "end": 3286, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 3225, - "end": 3250, + "start": 3229, + "end": 3254, "ctxt": 0 }, "value": "stringOrNumberOrUndefined", @@ -4017,15 +4017,15 @@ "init": { "type": "MemberExpression", "span": { - "start": 3253, - "end": 3282, + "start": 3257, + "end": 3286, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 3253, - "end": 3254, + "start": 3257, + "end": 3258, "ctxt": 0 }, "value": "C", @@ -4034,8 +4034,8 @@ "property": { "type": "Identifier", "span": { - "start": 3255, - "end": 3282, + "start": 3259, + "end": 3286, "ctxt": 0 }, "value": "inStaticPropertyDeclaration", @@ -4049,8 +4049,8 @@ { "type": "VariableDeclaration", "span": { - "start": 3284, - "end": 3346, + "start": 3288, + "end": 3350, "ctxt": 0 }, "kind": "var", @@ -4059,15 +4059,15 @@ { "type": "VariableDeclarator", "span": { - "start": 3288, - "end": 3345, + "start": 3292, + "end": 3349, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 3288, - "end": 3313, + "start": 3292, + "end": 3317, "ctxt": 0 }, "value": "stringOrNumberOrUndefined", @@ -4077,15 +4077,15 @@ "init": { "type": "MemberExpression", "span": { - "start": 3316, - "end": 3345, + "start": 3320, + "end": 3349, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 3316, - "end": 3317, + "start": 3320, + "end": 3321, "ctxt": 0 }, "value": "C", @@ -4094,8 +4094,8 @@ "property": { "type": "Identifier", "span": { - "start": 3318, - "end": 3345, + "start": 3322, + "end": 3349, "ctxt": 0 }, "value": "inStaticNestedArrowFunction", diff --git a/crates/swc_ecma_parser/tests/tsc/inferringClassMembersFromAssignments.ts b/crates/swc_ecma_parser/tests/tsc/inferringClassMembersFromAssignments.ts index b6c12be64074..69c3f789be9c 100644 --- a/crates/swc_ecma_parser/tests/tsc/inferringClassMembersFromAssignments.ts +++ b/crates/swc_ecma_parser/tests/tsc/inferringClassMembersFromAssignments.ts @@ -1,4 +1,4 @@ -// @out: output.js +// @outFile: output.js // @allowJs: true // @checkJs: true // @noImplicitAny: true diff --git a/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithRHSHasSymbolHasInstance.json b/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithRHSHasSymbolHasInstance.json index d31d17dc0239..3bf54e60704e 100644 --- a/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithRHSHasSymbolHasInstance.json +++ b/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithRHSHasSymbolHasInstance.json @@ -2,7 +2,7 @@ "type": "Script", "span": { "start": 37, - "end": 4138, + "end": 4643, "ctxt": 0 }, "body": [ @@ -7838,6 +7838,787 @@ ] }, "alternate": null + }, + { + "type": "TsInterfaceDeclaration", + "span": { + "start": 4214, + "end": 4283, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 4224, + "end": 4237, + "ctxt": 0 + }, + "value": "HasInstanceOf", + "optional": false + }, + "declare": false, + "typeParams": null, + "extends": [], + "body": { + "type": "TsInterfaceBody", + "span": { + "start": 4238, + "end": 4283, + "ctxt": 0 + }, + "body": [ + { + "type": "TsMethodSignature", + "span": { + "start": 4240, + "end": 4281, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "MemberExpression", + "span": { + "start": 4241, + "end": 4259, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 4241, + "end": 4247, + "ctxt": 0 + }, + "value": "Symbol", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 4248, + "end": 4259, + "ctxt": 0 + }, + "value": "hasInstance", + "optional": false + } + }, + "computed": true, + "optional": false, + "params": [ + { + "type": "Identifier", + "span": { + "start": 4261, + "end": 4271, + "ctxt": 0 + }, + "value": "x", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 4262, + "end": 4271, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 4264, + "end": 4271, + "ctxt": 0 + }, + "kind": "unknown" + } + } + } + ], + "typeAnn": { + "type": "TsTypeAnnotation", + "span": { + "start": 4272, + "end": 4281, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 4274, + "end": 4281, + "ctxt": 0 + }, + "kind": "boolean" + } + }, + "typeParams": null + } + ] + } + }, + { + "type": "TsTypeAliasDeclaration", + "span": { + "start": 4284, + "end": 4320, + "ctxt": 0 + }, + "declare": false, + "id": { + "type": "Identifier", + "span": { + "start": 4289, + "end": 4294, + "ctxt": 0 + }, + "value": "Rhs14", + "optional": false + }, + "typeParams": null, + "typeAnnotation": { + "type": "TsIntersectionType", + "span": { + "start": 4297, + "end": 4319, + "ctxt": 0 + }, + "types": [ + { + "type": "TsTypeReference", + "span": { + "start": 4297, + "end": 4310, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 4297, + "end": 4310, + "ctxt": 0 + }, + "value": "HasInstanceOf", + "optional": false + }, + "typeParams": null + }, + { + "type": "TsKeywordType", + "span": { + "start": 4313, + "end": 4319, + "ctxt": 0 + }, + "kind": "object" + } + ] + } + }, + { + "type": "VariableDeclaration", + "span": { + "start": 4321, + "end": 4348, + "ctxt": 0 + }, + "kind": "const", + "declare": true, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 4335, + "end": 4347, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 4335, + "end": 4340, + "ctxt": 0 + }, + "value": "rhs14", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 4340, + "end": 4347, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 4342, + "end": 4347, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 4342, + "end": 4347, + "ctxt": 0 + }, + "value": "Rhs14", + "optional": false + }, + "typeParams": null + } + } + }, + "init": null, + "definite": false + } + ] + }, + { + "type": "ExpressionStatement", + "span": { + "start": 4349, + "end": 4379, + "ctxt": 0 + }, + "expression": { + "type": "BinaryExpression", + "span": { + "start": 4349, + "end": 4378, + "ctxt": 0 + }, + "operator": "&&", + "left": { + "type": "BinaryExpression", + "span": { + "start": 4349, + "end": 4370, + "ctxt": 0 + }, + "operator": "instanceof", + "left": { + "type": "Identifier", + "span": { + "start": 4349, + "end": 4353, + "ctxt": 0 + }, + "value": "lhs0", + "optional": false + }, + "right": { + "type": "Identifier", + "span": { + "start": 4365, + "end": 4370, + "ctxt": 0 + }, + "value": "rhs14", + "optional": false + } + }, + "right": { + "type": "Identifier", + "span": { + "start": 4374, + "end": 4378, + "ctxt": 0 + }, + "value": "lhs0", + "optional": false + } + } + }, + { + "type": "TsInterfaceDeclaration", + "span": { + "start": 4392, + "end": 4465, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 4402, + "end": 4416, + "ctxt": 0 + }, + "value": "HasInstanceOf1", + "optional": false + }, + "declare": false, + "typeParams": null, + "extends": [], + "body": { + "type": "TsInterfaceBody", + "span": { + "start": 4417, + "end": 4465, + "ctxt": 0 + }, + "body": [ + { + "type": "TsMethodSignature", + "span": { + "start": 4419, + "end": 4463, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "MemberExpression", + "span": { + "start": 4420, + "end": 4438, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 4420, + "end": 4426, + "ctxt": 0 + }, + "value": "Symbol", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 4427, + "end": 4438, + "ctxt": 0 + }, + "value": "hasInstance", + "optional": false + } + }, + "computed": true, + "optional": false, + "params": [ + { + "type": "Identifier", + "span": { + "start": 4440, + "end": 4450, + "ctxt": 0 + }, + "value": "x", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 4441, + "end": 4450, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 4443, + "end": 4450, + "ctxt": 0 + }, + "kind": "unknown" + } + } + } + ], + "typeAnn": { + "type": "TsTypeAnnotation", + "span": { + "start": 4451, + "end": 4463, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypePredicate", + "span": { + "start": 4453, + "end": 4463, + "ctxt": 0 + }, + "asserts": false, + "paramName": { + "type": "Identifier", + "span": { + "start": 4453, + "end": 4454, + "ctxt": 0 + }, + "value": "x", + "optional": false + }, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 4458, + "end": 4463, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 4458, + "end": 4463, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 4458, + "end": 4463, + "ctxt": 0 + }, + "value": "Point", + "optional": false + }, + "typeParams": null + } + } + } + }, + "typeParams": null + } + ] + } + }, + { + "type": "TsInterfaceDeclaration", + "span": { + "start": 4466, + "end": 4538, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 4476, + "end": 4490, + "ctxt": 0 + }, + "value": "HasInstanceOf2", + "optional": false + }, + "declare": false, + "typeParams": null, + "extends": [], + "body": { + "type": "TsInterfaceBody", + "span": { + "start": 4491, + "end": 4538, + "ctxt": 0 + }, + "body": [ + { + "type": "TsMethodSignature", + "span": { + "start": 4493, + "end": 4536, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "MemberExpression", + "span": { + "start": 4494, + "end": 4512, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 4494, + "end": 4500, + "ctxt": 0 + }, + "value": "Symbol", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 4501, + "end": 4512, + "ctxt": 0 + }, + "value": "hasInstance", + "optional": false + } + }, + "computed": true, + "optional": false, + "params": [ + { + "type": "Identifier", + "span": { + "start": 4514, + "end": 4524, + "ctxt": 0 + }, + "value": "x", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 4515, + "end": 4524, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 4517, + "end": 4524, + "ctxt": 0 + }, + "kind": "unknown" + } + } + } + ], + "typeAnn": { + "type": "TsTypeAnnotation", + "span": { + "start": 4525, + "end": 4536, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypePredicate", + "span": { + "start": 4527, + "end": 4536, + "ctxt": 0 + }, + "asserts": false, + "paramName": { + "type": "Identifier", + "span": { + "start": 4527, + "end": 4528, + "ctxt": 0 + }, + "value": "x", + "optional": false + }, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 4532, + "end": 4536, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 4532, + "end": 4536, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 4532, + "end": 4536, + "ctxt": 0 + }, + "value": "Line", + "optional": false + }, + "typeParams": null + } + } + } + }, + "typeParams": null + } + ] + } + }, + { + "type": "TsTypeAliasDeclaration", + "span": { + "start": 4539, + "end": 4584, + "ctxt": 0 + }, + "declare": false, + "id": { + "type": "Identifier", + "span": { + "start": 4544, + "end": 4549, + "ctxt": 0 + }, + "value": "Rhs15", + "optional": false + }, + "typeParams": null, + "typeAnnotation": { + "type": "TsUnionType", + "span": { + "start": 4552, + "end": 4583, + "ctxt": 0 + }, + "types": [ + { + "type": "TsTypeReference", + "span": { + "start": 4552, + "end": 4566, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 4552, + "end": 4566, + "ctxt": 0 + }, + "value": "HasInstanceOf1", + "optional": false + }, + "typeParams": null + }, + { + "type": "TsTypeReference", + "span": { + "start": 4569, + "end": 4583, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 4569, + "end": 4583, + "ctxt": 0 + }, + "value": "HasInstanceOf2", + "optional": false + }, + "typeParams": null + } + ] + } + }, + { + "type": "VariableDeclaration", + "span": { + "start": 4585, + "end": 4612, + "ctxt": 0 + }, + "kind": "const", + "declare": true, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 4599, + "end": 4611, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 4599, + "end": 4604, + "ctxt": 0 + }, + "value": "rhs15", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 4604, + "end": 4611, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 4606, + "end": 4611, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 4606, + "end": 4611, + "ctxt": 0 + }, + "value": "Rhs15", + "optional": false + }, + "typeParams": null + } + } + }, + "init": null, + "definite": false + } + ] + }, + { + "type": "ExpressionStatement", + "span": { + "start": 4613, + "end": 4643, + "ctxt": 0 + }, + "expression": { + "type": "BinaryExpression", + "span": { + "start": 4613, + "end": 4642, + "ctxt": 0 + }, + "operator": "&&", + "left": { + "type": "BinaryExpression", + "span": { + "start": 4613, + "end": 4634, + "ctxt": 0 + }, + "operator": "instanceof", + "left": { + "type": "Identifier", + "span": { + "start": 4613, + "end": 4617, + "ctxt": 0 + }, + "value": "lhs0", + "optional": false + }, + "right": { + "type": "Identifier", + "span": { + "start": 4629, + "end": 4634, + "ctxt": 0 + }, + "value": "rhs15", + "optional": false + } + }, + "right": { + "type": "Identifier", + "span": { + "start": 4638, + "end": 4642, + "ctxt": 0 + }, + "value": "lhs0", + "optional": false + } + } } ], "interpreter": null diff --git a/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithRHSHasSymbolHasInstance.ts b/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithRHSHasSymbolHasInstance.ts index 0a849cc21399..100b04727e0f 100644 --- a/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithRHSHasSymbolHasInstance.ts +++ b/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithRHSHasSymbolHasInstance.ts @@ -115,4 +115,20 @@ if (obj instanceof A) { } if (obj instanceof B) { obj; // B -} \ No newline at end of file +} + +// intersections +// https://github.com/microsoft/TypeScript/issues/56536 + +interface HasInstanceOf { [Symbol.hasInstance](x: unknown): boolean } +type Rhs14 = HasInstanceOf & object; +declare const rhs14: Rhs14; +lhs0 instanceof rhs14 && lhs0; + +// unions + +interface HasInstanceOf1 { [Symbol.hasInstance](x: unknown): x is Point } +interface HasInstanceOf2 { [Symbol.hasInstance](x: unknown): x is Line } +type Rhs15 = HasInstanceOf1 | HasInstanceOf2; +declare const rhs15: Rhs15; +lhs0 instanceof rhs15 && lhs0; diff --git a/crates/swc_ecma_parser/tests/tsc/intlDateTimeFormatRangeES2021.json b/crates/swc_ecma_parser/tests/tsc/intlDateTimeFormatRangeES2021.json new file mode 100644 index 000000000000..5707477e6b4d --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/intlDateTimeFormatRangeES2021.json @@ -0,0 +1,283 @@ +{ + "type": "Script", + "span": { + "start": 18, + "end": 162, + "ctxt": 0 + }, + "body": [ + { + "type": "ExpressionStatement", + "span": { + "start": 18, + "end": 81, + "ctxt": 0 + }, + "expression": { + "type": "CallExpression", + "span": { + "start": 18, + "end": 80, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 18, + "end": 55, + "ctxt": 0 + }, + "object": { + "type": "NewExpression", + "span": { + "start": 18, + "end": 43, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 22, + "end": 41, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 22, + "end": 26, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 27, + "end": 41, + "ctxt": 0 + }, + "value": "DateTimeFormat", + "optional": false + } + }, + "arguments": [], + "typeArguments": null + }, + "property": { + "type": "Identifier", + "span": { + "start": 44, + "end": 55, + "ctxt": 0 + }, + "value": "formatRange", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "NewExpression", + "span": { + "start": 56, + "end": 67, + "ctxt": 0 + }, + "callee": { + "type": "Identifier", + "span": { + "start": 60, + "end": 64, + "ctxt": 0 + }, + "value": "Date", + "optional": false + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "NumericLiteral", + "span": { + "start": 65, + "end": 66, + "ctxt": 0 + }, + "value": 0.0, + "raw": "0" + } + } + ], + "typeArguments": null + } + }, + { + "spread": null, + "expression": { + "type": "NewExpression", + "span": { + "start": 69, + "end": 79, + "ctxt": 0 + }, + "callee": { + "type": "Identifier", + "span": { + "start": 73, + "end": 77, + "ctxt": 0 + }, + "value": "Date", + "optional": false + }, + "arguments": [], + "typeArguments": null + } + } + ], + "typeArguments": null + } + }, + { + "type": "VariableDeclaration", + "span": { + "start": 82, + "end": 162, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 88, + "end": 161, + "ctxt": 0 + }, + "id": { + "type": "ArrayPattern", + "span": { + "start": 88, + "end": 96, + "ctxt": 0 + }, + "elements": [ + { + "type": "Identifier", + "span": { + "start": 90, + "end": 94, + "ctxt": 0 + }, + "value": "part", + "optional": false, + "typeAnnotation": null + } + ], + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "CallExpression", + "span": { + "start": 99, + "end": 161, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 99, + "end": 143, + "ctxt": 0 + }, + "object": { + "type": "NewExpression", + "span": { + "start": 99, + "end": 124, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 103, + "end": 122, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 103, + "end": 107, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 108, + "end": 122, + "ctxt": 0 + }, + "value": "DateTimeFormat", + "optional": false + } + }, + "arguments": [], + "typeArguments": null + }, + "property": { + "type": "Identifier", + "span": { + "start": 125, + "end": 143, + "ctxt": 0 + }, + "value": "formatRangeToParts", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "NumericLiteral", + "span": { + "start": 144, + "end": 148, + "ctxt": 0 + }, + "value": 1000.0, + "raw": "1000" + } + }, + { + "spread": null, + "expression": { + "type": "NumericLiteral", + "span": { + "start": 150, + "end": 160, + "ctxt": 0 + }, + "value": 1000000000.0, + "raw": "1000000000" + } + } + ], + "typeArguments": null + }, + "definite": false + } + ] + } + ], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/tsc/intlDateTimeFormatRangeES2021.ts b/crates/swc_ecma_parser/tests/tsc/intlDateTimeFormatRangeES2021.ts new file mode 100644 index 000000000000..f3a8d50aaa81 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/intlDateTimeFormatRangeES2021.ts @@ -0,0 +1,4 @@ +// @lib: es2021 + +new Intl.DateTimeFormat().formatRange(new Date(0), new Date()); +const [ part ] = new Intl.DateTimeFormat().formatRangeToParts(1000, 1000000000); diff --git a/crates/swc_ecma_parser/tests/tsc/intlNumberFormatES2020.json b/crates/swc_ecma_parser/tests/tsc/intlNumberFormatES2020.json new file mode 100644 index 000000000000..b276b80a5190 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/intlNumberFormatES2020.json @@ -0,0 +1,1238 @@ +{ + "type": "Script", + "span": { + "start": 80, + "end": 966, + "ctxt": 0 + }, + "body": [ + { + "type": "VariableDeclaration", + "span": { + "start": 80, + "end": 170, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 86, + "end": 169, + "ctxt": 0 + }, + "id": { + "type": "ObjectPattern", + "span": { + "start": 86, + "end": 118, + "ctxt": 0 + }, + "properties": [ + { + "type": "AssignmentPatternProperty", + "span": { + "start": 88, + "end": 96, + "ctxt": 0 + }, + "key": { + "type": "Identifier", + "span": { + "start": 88, + "end": 96, + "ctxt": 0 + }, + "value": "notation", + "optional": false, + "typeAnnotation": null + }, + "value": null + }, + { + "type": "AssignmentPatternProperty", + "span": { + "start": 98, + "end": 103, + "ctxt": 0 + }, + "key": { + "type": "Identifier", + "span": { + "start": 98, + "end": 103, + "ctxt": 0 + }, + "value": "style", + "optional": false, + "typeAnnotation": null + }, + "value": null + }, + { + "type": "AssignmentPatternProperty", + "span": { + "start": 105, + "end": 116, + "ctxt": 0 + }, + "key": { + "type": "Identifier", + "span": { + "start": 105, + "end": 116, + "ctxt": 0 + }, + "value": "signDisplay", + "optional": false, + "typeAnnotation": null + }, + "value": null + } + ], + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "CallExpression", + "span": { + "start": 121, + "end": 169, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 121, + "end": 167, + "ctxt": 0 + }, + "object": { + "type": "NewExpression", + "span": { + "start": 121, + "end": 151, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 125, + "end": 142, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 125, + "end": 129, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 130, + "end": 142, + "ctxt": 0 + }, + "value": "NumberFormat", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 143, + "end": 150, + "ctxt": 0 + }, + "value": "en-NZ", + "raw": "'en-NZ'" + } + } + ], + "typeArguments": null + }, + "property": { + "type": "Identifier", + "span": { + "start": 152, + "end": 167, + "ctxt": 0 + }, + "value": "resolvedOptions", + "optional": false + } + }, + "arguments": [], + "typeArguments": null + }, + "definite": false + } + ] + }, + { + "type": "ExpressionStatement", + "span": { + "start": 189, + "end": 224, + "ctxt": 0 + }, + "expression": { + "type": "NewExpression", + "span": { + "start": 189, + "end": 223, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 193, + "end": 210, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 193, + "end": 197, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 198, + "end": 210, + "ctxt": 0 + }, + "value": "NumberFormat", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 211, + "end": 218, + "ctxt": 0 + }, + "value": "en-NZ", + "raw": "'en-NZ'" + } + }, + { + "spread": null, + "expression": { + "type": "ObjectExpression", + "span": { + "start": 220, + "end": 222, + "ctxt": 0 + }, + "properties": [] + } + } + ], + "typeArguments": null + } + }, + { + "type": "ExpressionStatement", + "span": { + "start": 255, + "end": 315, + "ctxt": 0 + }, + "expression": { + "type": "NewExpression", + "span": { + "start": 255, + "end": 314, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 259, + "end": 276, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 259, + "end": 263, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 264, + "end": 276, + "ctxt": 0 + }, + "value": "NumberFormat", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 277, + "end": 284, + "ctxt": 0 + }, + "value": "en-NZ", + "raw": "'en-NZ'" + } + }, + { + "spread": null, + "expression": { + "type": "ObjectExpression", + "span": { + "start": 286, + "end": 313, + "ctxt": 0 + }, + "properties": [ + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 288, + "end": 303, + "ctxt": 0 + }, + "value": "numberingSystem", + "optional": false + }, + "value": { + "type": "StringLiteral", + "span": { + "start": 305, + "end": 311, + "ctxt": 0 + }, + "value": "arab", + "raw": "'arab'" + } + } + ] + } + } + ], + "typeArguments": null + } + }, + { + "type": "VariableDeclaration", + "span": { + "start": 329, + "end": 481, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 335, + "end": 480, + "ctxt": 0 + }, + "id": { + "type": "ObjectPattern", + "span": { + "start": 335, + "end": 361, + "ctxt": 0 + }, + "properties": [ + { + "type": "AssignmentPatternProperty", + "span": { + "start": 337, + "end": 345, + "ctxt": 0 + }, + "key": { + "type": "Identifier", + "span": { + "start": 337, + "end": 345, + "ctxt": 0 + }, + "value": "currency", + "optional": false, + "typeAnnotation": null + }, + "value": null + }, + { + "type": "AssignmentPatternProperty", + "span": { + "start": 347, + "end": 359, + "ctxt": 0 + }, + "key": { + "type": "Identifier", + "span": { + "start": 347, + "end": 359, + "ctxt": 0 + }, + "value": "currencySign", + "optional": false, + "typeAnnotation": null + }, + "value": null + } + ], + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "CallExpression", + "span": { + "start": 364, + "end": 480, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 364, + "end": 478, + "ctxt": 0 + }, + "object": { + "type": "NewExpression", + "span": { + "start": 364, + "end": 462, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 368, + "end": 385, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 368, + "end": 372, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 373, + "end": 385, + "ctxt": 0 + }, + "value": "NumberFormat", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 386, + "end": 393, + "ctxt": 0 + }, + "value": "en-NZ", + "raw": "'en-NZ'" + } + }, + { + "spread": null, + "expression": { + "type": "ObjectExpression", + "span": { + "start": 395, + "end": 461, + "ctxt": 0 + }, + "properties": [ + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 397, + "end": 402, + "ctxt": 0 + }, + "value": "style", + "optional": false + }, + "value": { + "type": "StringLiteral", + "span": { + "start": 404, + "end": 414, + "ctxt": 0 + }, + "value": "currency", + "raw": "'currency'" + } + }, + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 416, + "end": 424, + "ctxt": 0 + }, + "value": "currency", + "optional": false + }, + "value": { + "type": "StringLiteral", + "span": { + "start": 426, + "end": 431, + "ctxt": 0 + }, + "value": "NZD", + "raw": "'NZD'" + } + }, + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 433, + "end": 445, + "ctxt": 0 + }, + "value": "currencySign", + "optional": false + }, + "value": { + "type": "StringLiteral", + "span": { + "start": 447, + "end": 459, + "ctxt": 0 + }, + "value": "accounting", + "raw": "'accounting'" + } + } + ] + } + } + ], + "typeArguments": null + }, + "property": { + "type": "Identifier", + "span": { + "start": 463, + "end": 478, + "ctxt": 0 + }, + "value": "resolvedOptions", + "optional": false + } + }, + "arguments": [], + "typeArguments": null + }, + "definite": false + } + ] + }, + { + "type": "VariableDeclaration", + "span": { + "start": 492, + "end": 631, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 498, + "end": 630, + "ctxt": 0 + }, + "id": { + "type": "ObjectPattern", + "span": { + "start": 498, + "end": 519, + "ctxt": 0 + }, + "properties": [ + { + "type": "AssignmentPatternProperty", + "span": { + "start": 500, + "end": 504, + "ctxt": 0 + }, + "key": { + "type": "Identifier", + "span": { + "start": 500, + "end": 504, + "ctxt": 0 + }, + "value": "unit", + "optional": false, + "typeAnnotation": null + }, + "value": null + }, + { + "type": "AssignmentPatternProperty", + "span": { + "start": 506, + "end": 517, + "ctxt": 0 + }, + "key": { + "type": "Identifier", + "span": { + "start": 506, + "end": 517, + "ctxt": 0 + }, + "value": "unitDisplay", + "optional": false, + "typeAnnotation": null + }, + "value": null + } + ], + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "CallExpression", + "span": { + "start": 522, + "end": 630, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 522, + "end": 628, + "ctxt": 0 + }, + "object": { + "type": "NewExpression", + "span": { + "start": 522, + "end": 612, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 526, + "end": 543, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 526, + "end": 530, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 531, + "end": 543, + "ctxt": 0 + }, + "value": "NumberFormat", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 544, + "end": 551, + "ctxt": 0 + }, + "value": "en-NZ", + "raw": "'en-NZ'" + } + }, + { + "spread": null, + "expression": { + "type": "ObjectExpression", + "span": { + "start": 553, + "end": 611, + "ctxt": 0 + }, + "properties": [ + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 555, + "end": 560, + "ctxt": 0 + }, + "value": "style", + "optional": false + }, + "value": { + "type": "StringLiteral", + "span": { + "start": 562, + "end": 568, + "ctxt": 0 + }, + "value": "unit", + "raw": "'unit'" + } + }, + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 570, + "end": 574, + "ctxt": 0 + }, + "value": "unit", + "optional": false + }, + "value": { + "type": "StringLiteral", + "span": { + "start": 576, + "end": 586, + "ctxt": 0 + }, + "value": "kilogram", + "raw": "'kilogram'" + } + }, + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 588, + "end": 599, + "ctxt": 0 + }, + "value": "unitDisplay", + "optional": false + }, + "value": { + "type": "StringLiteral", + "span": { + "start": 601, + "end": 609, + "ctxt": 0 + }, + "value": "narrow", + "raw": "'narrow'" + } + } + ] + } + } + ], + "typeArguments": null + }, + "property": { + "type": "Identifier", + "span": { + "start": 613, + "end": 628, + "ctxt": 0 + }, + "value": "resolvedOptions", + "optional": false + } + }, + "arguments": [], + "typeArguments": null + }, + "definite": false + } + ] + }, + { + "type": "VariableDeclaration", + "span": { + "start": 644, + "end": 769, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 650, + "end": 768, + "ctxt": 0 + }, + "id": { + "type": "ObjectPattern", + "span": { + "start": 650, + "end": 668, + "ctxt": 0 + }, + "properties": [ + { + "type": "AssignmentPatternProperty", + "span": { + "start": 652, + "end": 666, + "ctxt": 0 + }, + "key": { + "type": "Identifier", + "span": { + "start": 652, + "end": 666, + "ctxt": 0 + }, + "value": "compactDisplay", + "optional": false, + "typeAnnotation": null + }, + "value": null + } + ], + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "CallExpression", + "span": { + "start": 671, + "end": 768, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 671, + "end": 766, + "ctxt": 0 + }, + "object": { + "type": "NewExpression", + "span": { + "start": 671, + "end": 750, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 675, + "end": 692, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 675, + "end": 679, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 680, + "end": 692, + "ctxt": 0 + }, + "value": "NumberFormat", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 693, + "end": 700, + "ctxt": 0 + }, + "value": "en-NZ", + "raw": "'en-NZ'" + } + }, + { + "spread": null, + "expression": { + "type": "ObjectExpression", + "span": { + "start": 702, + "end": 749, + "ctxt": 0 + }, + "properties": [ + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 704, + "end": 712, + "ctxt": 0 + }, + "value": "notation", + "optional": false + }, + "value": { + "type": "StringLiteral", + "span": { + "start": 714, + "end": 723, + "ctxt": 0 + }, + "value": "compact", + "raw": "'compact'" + } + }, + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 725, + "end": 739, + "ctxt": 0 + }, + "value": "compactDisplay", + "optional": false + }, + "value": { + "type": "StringLiteral", + "span": { + "start": 741, + "end": 747, + "ctxt": 0 + }, + "value": "long", + "raw": "'long'" + } + } + ] + } + } + ], + "typeArguments": null + }, + "property": { + "type": "Identifier", + "span": { + "start": 751, + "end": 766, + "ctxt": 0 + }, + "value": "resolvedOptions", + "optional": false + } + }, + "arguments": [], + "typeArguments": null + }, + "definite": false + } + ] + }, + { + "type": "ExpressionStatement", + "span": { + "start": 787, + "end": 845, + "ctxt": 0 + }, + "expression": { + "type": "NewExpression", + "span": { + "start": 787, + "end": 844, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 791, + "end": 808, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 791, + "end": 795, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 796, + "end": 808, + "ctxt": 0 + }, + "value": "NumberFormat", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 809, + "end": 816, + "ctxt": 0 + }, + "value": "en-NZ", + "raw": "'en-NZ'" + } + }, + { + "spread": null, + "expression": { + "type": "ObjectExpression", + "span": { + "start": 818, + "end": 843, + "ctxt": 0 + }, + "properties": [ + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 820, + "end": 831, + "ctxt": 0 + }, + "value": "signDisplay", + "optional": false + }, + "value": { + "type": "StringLiteral", + "span": { + "start": 833, + "end": 841, + "ctxt": 0 + }, + "value": "always", + "raw": "'always'" + } + } + ] + } + } + ], + "typeArguments": null + } + }, + { + "type": "VariableDeclaration", + "span": { + "start": 889, + "end": 966, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 895, + "end": 965, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 895, + "end": 900, + "ctxt": 0 + }, + "value": "types", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 900, + "end": 930, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsArrayType", + "span": { + "start": 902, + "end": 930, + "ctxt": 0 + }, + "elemType": { + "type": "TsTypeReference", + "span": { + "start": 902, + "end": 928, + "ctxt": 0 + }, + "typeName": { + "type": "TsQualifiedName", + "left": { + "type": "Identifier", + "span": { + "start": 902, + "end": 906, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "right": { + "type": "Identifier", + "span": { + "start": 907, + "end": 928, + "ctxt": 0 + }, + "value": "NumberFormatPartTypes", + "optional": false + } + }, + "typeParams": null + } + } + } + }, + "init": { + "type": "ArrayExpression", + "span": { + "start": 933, + "end": 965, + "ctxt": 0 + }, + "elements": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 935, + "end": 944, + "ctxt": 0 + }, + "value": "compact", + "raw": "'compact'" + } + }, + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 946, + "end": 952, + "ctxt": 0 + }, + "value": "unit", + "raw": "'unit'" + } + }, + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 954, + "end": 963, + "ctxt": 0 + }, + "value": "unknown", + "raw": "'unknown'" + } + } + ] + }, + "definite": false + } + ] + } + ], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/tsc/intlNumberFormatES2020.ts b/crates/swc_ecma_parser/tests/tsc/intlNumberFormatES2020.ts new file mode 100644 index 000000000000..a69160c246a0 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/intlNumberFormatES2020.ts @@ -0,0 +1,26 @@ +// @target: es2020 +// @strict: true + +// New/updated resolved options in ES2020 +const { notation, style, signDisplay } = new Intl.NumberFormat('en-NZ').resolvedOptions(); + +// Empty options +new Intl.NumberFormat('en-NZ', {}); + +// Override numbering system +new Intl.NumberFormat('en-NZ', { numberingSystem: 'arab' }); + +// Currency +const { currency, currencySign } = new Intl.NumberFormat('en-NZ', { style: 'currency', currency: 'NZD', currencySign: 'accounting' }).resolvedOptions(); + +// Units +const { unit, unitDisplay } = new Intl.NumberFormat('en-NZ', { style: 'unit', unit: 'kilogram', unitDisplay: 'narrow' }).resolvedOptions(); + +// Compact +const { compactDisplay } = new Intl.NumberFormat('en-NZ', { notation: 'compact', compactDisplay: 'long' }).resolvedOptions(); + +// Sign display +new Intl.NumberFormat('en-NZ', { signDisplay: 'always' }); + +// New additions to NumberFormatPartTypes +const types: Intl.NumberFormatPartTypes[] = [ 'compact', 'unit', 'unknown' ]; diff --git a/crates/swc_ecma_parser/tests/tsc/intlNumberFormatES2023.json b/crates/swc_ecma_parser/tests/tsc/intlNumberFormatES2023.json new file mode 100644 index 000000000000..95185ce4dd90 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/intlNumberFormatES2023.json @@ -0,0 +1,2064 @@ +{ + "type": "Script", + "span": { + "start": 149, + "end": 1442, + "ctxt": 0 + }, + "body": [ + { + "type": "VariableDeclaration", + "span": { + "start": 149, + "end": 295, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 155, + "end": 294, + "ctxt": 0 + }, + "id": { + "type": "ObjectPattern", + "span": { + "start": 155, + "end": 242, + "ctxt": 0 + }, + "properties": [ + { + "type": "AssignmentPatternProperty", + "span": { + "start": 157, + "end": 173, + "ctxt": 0 + }, + "key": { + "type": "Identifier", + "span": { + "start": 157, + "end": 173, + "ctxt": 0 + }, + "value": "roundingPriority", + "optional": false, + "typeAnnotation": null + }, + "value": null + }, + { + "type": "AssignmentPatternProperty", + "span": { + "start": 175, + "end": 187, + "ctxt": 0 + }, + "key": { + "type": "Identifier", + "span": { + "start": 175, + "end": 187, + "ctxt": 0 + }, + "value": "roundingMode", + "optional": false, + "typeAnnotation": null + }, + "value": null + }, + { + "type": "AssignmentPatternProperty", + "span": { + "start": 189, + "end": 206, + "ctxt": 0 + }, + "key": { + "type": "Identifier", + "span": { + "start": 189, + "end": 206, + "ctxt": 0 + }, + "value": "roundingIncrement", + "optional": false, + "typeAnnotation": null + }, + "value": null + }, + { + "type": "AssignmentPatternProperty", + "span": { + "start": 208, + "end": 227, + "ctxt": 0 + }, + "key": { + "type": "Identifier", + "span": { + "start": 208, + "end": 227, + "ctxt": 0 + }, + "value": "trailingZeroDisplay", + "optional": false, + "typeAnnotation": null + }, + "value": null + }, + { + "type": "AssignmentPatternProperty", + "span": { + "start": 229, + "end": 240, + "ctxt": 0 + }, + "key": { + "type": "Identifier", + "span": { + "start": 229, + "end": 240, + "ctxt": 0 + }, + "value": "useGrouping", + "optional": false, + "typeAnnotation": null + }, + "value": null + } + ], + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "CallExpression", + "span": { + "start": 246, + "end": 294, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 246, + "end": 292, + "ctxt": 0 + }, + "object": { + "type": "NewExpression", + "span": { + "start": 246, + "end": 276, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 250, + "end": 267, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 250, + "end": 254, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 255, + "end": 267, + "ctxt": 0 + }, + "value": "NumberFormat", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 268, + "end": 275, + "ctxt": 0 + }, + "value": "en-GB", + "raw": "'en-GB'" + } + } + ], + "typeArguments": null + }, + "property": { + "type": "Identifier", + "span": { + "start": 277, + "end": 292, + "ctxt": 0 + }, + "value": "resolvedOptions", + "optional": false + } + }, + "arguments": [], + "typeArguments": null + }, + "definite": false + } + ] + }, + { + "type": "ExpressionStatement", + "span": { + "start": 314, + "end": 349, + "ctxt": 0 + }, + "expression": { + "type": "NewExpression", + "span": { + "start": 314, + "end": 348, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 318, + "end": 335, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 318, + "end": 322, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 323, + "end": 335, + "ctxt": 0 + }, + "value": "NumberFormat", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 336, + "end": 343, + "ctxt": 0 + }, + "value": "en-GB", + "raw": "'en-GB'" + } + }, + { + "spread": null, + "expression": { + "type": "ObjectExpression", + "span": { + "start": 345, + "end": 347, + "ctxt": 0 + }, + "properties": [] + } + } + ], + "typeArguments": null + } + }, + { + "type": "ExpressionStatement", + "span": { + "start": 363, + "end": 480, + "ctxt": 0 + }, + "expression": { + "type": "NewExpression", + "span": { + "start": 363, + "end": 479, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 367, + "end": 384, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 367, + "end": 371, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 372, + "end": 384, + "ctxt": 0 + }, + "value": "NumberFormat", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 385, + "end": 392, + "ctxt": 0 + }, + "value": "en-GB", + "raw": "'en-GB'" + } + }, + { + "spread": null, + "expression": { + "type": "ObjectExpression", + "span": { + "start": 394, + "end": 478, + "ctxt": 0 + }, + "properties": [ + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 396, + "end": 412, + "ctxt": 0 + }, + "value": "roundingPriority", + "optional": false + }, + "value": { + "type": "StringLiteral", + "span": { + "start": 414, + "end": 429, + "ctxt": 0 + }, + "value": "lessPrecision", + "raw": "'lessPrecision'" + } + }, + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 431, + "end": 448, + "ctxt": 0 + }, + "value": "roundingIncrement", + "optional": false + }, + "value": { + "type": "NumericLiteral", + "span": { + "start": 450, + "end": 453, + "ctxt": 0 + }, + "value": 100.0, + "raw": "100" + } + }, + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 455, + "end": 467, + "ctxt": 0 + }, + "value": "roundingMode", + "optional": false + }, + "value": { + "type": "StringLiteral", + "span": { + "start": 469, + "end": 476, + "ctxt": 0 + }, + "value": "trunc", + "raw": "'trunc'" + } + } + ] + } + } + ], + "typeArguments": null + } + }, + { + "type": "VariableDeclaration", + "span": { + "start": 508, + "end": 610, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 514, + "end": 609, + "ctxt": 0 + }, + "id": { + "type": "ObjectPattern", + "span": { + "start": 514, + "end": 529, + "ctxt": 0 + }, + "properties": [ + { + "type": "AssignmentPatternProperty", + "span": { + "start": 516, + "end": 527, + "ctxt": 0 + }, + "key": { + "type": "Identifier", + "span": { + "start": 516, + "end": 527, + "ctxt": 0 + }, + "value": "signDisplay", + "optional": false, + "typeAnnotation": null + }, + "value": null + } + ], + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "CallExpression", + "span": { + "start": 532, + "end": 609, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 532, + "end": 607, + "ctxt": 0 + }, + "object": { + "type": "NewExpression", + "span": { + "start": 532, + "end": 591, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 536, + "end": 553, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 536, + "end": 540, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 541, + "end": 553, + "ctxt": 0 + }, + "value": "NumberFormat", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 554, + "end": 561, + "ctxt": 0 + }, + "value": "en-GB", + "raw": "'en-GB'" + } + }, + { + "spread": null, + "expression": { + "type": "ObjectExpression", + "span": { + "start": 563, + "end": 590, + "ctxt": 0 + }, + "properties": [ + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 565, + "end": 576, + "ctxt": 0 + }, + "value": "signDisplay", + "optional": false + }, + "value": { + "type": "StringLiteral", + "span": { + "start": 578, + "end": 588, + "ctxt": 0 + }, + "value": "negative", + "raw": "'negative'" + } + } + ] + } + } + ], + "typeArguments": null + }, + "property": { + "type": "Identifier", + "span": { + "start": 592, + "end": 607, + "ctxt": 0 + }, + "value": "resolvedOptions", + "optional": false + } + }, + "arguments": [], + "typeArguments": null + }, + "definite": false + } + ] + }, + { + "type": "ExpressionStatement", + "span": { + "start": 638, + "end": 692, + "ctxt": 0 + }, + "expression": { + "type": "NewExpression", + "span": { + "start": 638, + "end": 691, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 642, + "end": 659, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 642, + "end": 646, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 647, + "end": 659, + "ctxt": 0 + }, + "value": "NumberFormat", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 660, + "end": 667, + "ctxt": 0 + }, + "value": "en-GB", + "raw": "'en-GB'" + } + }, + { + "spread": null, + "expression": { + "type": "ObjectExpression", + "span": { + "start": 669, + "end": 690, + "ctxt": 0 + }, + "properties": [ + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 671, + "end": 682, + "ctxt": 0 + }, + "value": "useGrouping", + "optional": false + }, + "value": { + "type": "BooleanLiteral", + "span": { + "start": 684, + "end": 688, + "ctxt": 0 + }, + "value": true + } + } + ] + } + } + ], + "typeArguments": null + } + }, + { + "type": "ExpressionStatement", + "span": { + "start": 693, + "end": 749, + "ctxt": 0 + }, + "expression": { + "type": "NewExpression", + "span": { + "start": 693, + "end": 748, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 697, + "end": 714, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 697, + "end": 701, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 702, + "end": 714, + "ctxt": 0 + }, + "value": "NumberFormat", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 715, + "end": 722, + "ctxt": 0 + }, + "value": "en-GB", + "raw": "'en-GB'" + } + }, + { + "spread": null, + "expression": { + "type": "ObjectExpression", + "span": { + "start": 724, + "end": 747, + "ctxt": 0 + }, + "properties": [ + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 726, + "end": 737, + "ctxt": 0 + }, + "value": "useGrouping", + "optional": false + }, + "value": { + "type": "StringLiteral", + "span": { + "start": 739, + "end": 745, + "ctxt": 0 + }, + "value": "true", + "raw": "'true'" + } + } + ] + } + } + ], + "typeArguments": null + } + }, + { + "type": "ExpressionStatement", + "span": { + "start": 750, + "end": 808, + "ctxt": 0 + }, + "expression": { + "type": "NewExpression", + "span": { + "start": 750, + "end": 807, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 754, + "end": 771, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 754, + "end": 758, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 759, + "end": 771, + "ctxt": 0 + }, + "value": "NumberFormat", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 772, + "end": 779, + "ctxt": 0 + }, + "value": "en-GB", + "raw": "'en-GB'" + } + }, + { + "spread": null, + "expression": { + "type": "ObjectExpression", + "span": { + "start": 781, + "end": 806, + "ctxt": 0 + }, + "properties": [ + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 783, + "end": 794, + "ctxt": 0 + }, + "value": "useGrouping", + "optional": false + }, + "value": { + "type": "StringLiteral", + "span": { + "start": 796, + "end": 804, + "ctxt": 0 + }, + "value": "always", + "raw": "'always'" + } + } + ] + } + } + ], + "typeArguments": null + } + }, + { + "type": "ExpressionStatement", + "span": { + "start": 825, + "end": 877, + "ctxt": 0 + }, + "expression": { + "type": "CallExpression", + "span": { + "start": 825, + "end": 876, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 825, + "end": 867, + "ctxt": 0 + }, + "object": { + "type": "NewExpression", + "span": { + "start": 825, + "end": 855, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 829, + "end": 846, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 829, + "end": 833, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 834, + "end": 846, + "ctxt": 0 + }, + "value": "NumberFormat", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 847, + "end": 854, + "ctxt": 0 + }, + "value": "en-GB", + "raw": "'en-GB'" + } + } + ], + "typeArguments": null + }, + "property": { + "type": "Identifier", + "span": { + "start": 856, + "end": 867, + "ctxt": 0 + }, + "value": "formatRange", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "NumericLiteral", + "span": { + "start": 868, + "end": 870, + "ctxt": 0 + }, + "value": 10.0, + "raw": "10" + } + }, + { + "spread": null, + "expression": { + "type": "NumericLiteral", + "span": { + "start": 872, + "end": 875, + "ctxt": 0 + }, + "value": 100.0, + "raw": "100" + } + } + ], + "typeArguments": null + } + }, + { + "type": "ExpressionStatement", + "span": { + "start": 878, + "end": 933, + "ctxt": 0 + }, + "expression": { + "type": "CallExpression", + "span": { + "start": 878, + "end": 932, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 878, + "end": 920, + "ctxt": 0 + }, + "object": { + "type": "NewExpression", + "span": { + "start": 878, + "end": 908, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 882, + "end": 899, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 882, + "end": 886, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 887, + "end": 899, + "ctxt": 0 + }, + "value": "NumberFormat", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 900, + "end": 907, + "ctxt": 0 + }, + "value": "en-GB", + "raw": "'en-GB'" + } + } + ], + "typeArguments": null + }, + "property": { + "type": "Identifier", + "span": { + "start": 909, + "end": 920, + "ctxt": 0 + }, + "value": "formatRange", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "BigIntLiteral", + "span": { + "start": 921, + "end": 924, + "ctxt": 0 + }, + "value": [ + 1, + [ + 10 + ] + ], + "raw": "10n" + } + }, + { + "spread": null, + "expression": { + "type": "BigIntLiteral", + "span": { + "start": 926, + "end": 931, + "ctxt": 0 + }, + "value": [ + 1, + [ + 1000 + ] + ], + "raw": "1000n" + } + } + ], + "typeArguments": null + } + }, + { + "type": "ExpressionStatement", + "span": { + "start": 934, + "end": 997, + "ctxt": 0 + }, + "expression": { + "type": "MemberExpression", + "span": { + "start": 934, + "end": 996, + "ctxt": 0 + }, + "object": { + "type": "CallExpression", + "span": { + "start": 934, + "end": 993, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 934, + "end": 983, + "ctxt": 0 + }, + "object": { + "type": "NewExpression", + "span": { + "start": 934, + "end": 964, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 938, + "end": 955, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 938, + "end": 942, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 943, + "end": 955, + "ctxt": 0 + }, + "value": "NumberFormat", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 956, + "end": 963, + "ctxt": 0 + }, + "value": "en-GB", + "raw": "'en-GB'" + } + } + ], + "typeArguments": null + }, + "property": { + "type": "Identifier", + "span": { + "start": 965, + "end": 983, + "ctxt": 0 + }, + "value": "formatRangeToParts", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "NumericLiteral", + "span": { + "start": 984, + "end": 986, + "ctxt": 0 + }, + "value": 10.0, + "raw": "10" + } + }, + { + "spread": null, + "expression": { + "type": "NumericLiteral", + "span": { + "start": 988, + "end": 992, + "ctxt": 0 + }, + "value": 1000.0, + "raw": "1000" + } + } + ], + "typeArguments": null + }, + "property": { + "type": "Computed", + "span": { + "start": 993, + "end": 996, + "ctxt": 0 + }, + "expression": { + "type": "NumericLiteral", + "span": { + "start": 994, + "end": 995, + "ctxt": 0 + }, + "value": 0.0, + "raw": "0" + } + } + } + }, + { + "type": "ExpressionStatement", + "span": { + "start": 998, + "end": 1063, + "ctxt": 0 + }, + "expression": { + "type": "MemberExpression", + "span": { + "start": 998, + "end": 1062, + "ctxt": 0 + }, + "object": { + "type": "CallExpression", + "span": { + "start": 998, + "end": 1059, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 998, + "end": 1047, + "ctxt": 0 + }, + "object": { + "type": "NewExpression", + "span": { + "start": 998, + "end": 1028, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 1002, + "end": 1019, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 1002, + "end": 1006, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 1007, + "end": 1019, + "ctxt": 0 + }, + "value": "NumberFormat", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 1020, + "end": 1027, + "ctxt": 0 + }, + "value": "en-GB", + "raw": "'en-GB'" + } + } + ], + "typeArguments": null + }, + "property": { + "type": "Identifier", + "span": { + "start": 1029, + "end": 1047, + "ctxt": 0 + }, + "value": "formatRangeToParts", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "BigIntLiteral", + "span": { + "start": 1048, + "end": 1051, + "ctxt": 0 + }, + "value": [ + 1, + [ + 10 + ] + ], + "raw": "10n" + } + }, + { + "spread": null, + "expression": { + "type": "BigIntLiteral", + "span": { + "start": 1053, + "end": 1058, + "ctxt": 0 + }, + "value": [ + 1, + [ + 1000 + ] + ], + "raw": "1000n" + } + } + ], + "typeArguments": null + }, + "property": { + "type": "Computed", + "span": { + "start": 1059, + "end": 1062, + "ctxt": 0 + }, + "expression": { + "type": "NumericLiteral", + "span": { + "start": 1060, + "end": 1061, + "ctxt": 0 + }, + "value": 0.0, + "raw": "0" + } + } + } + }, + { + "type": "ExpressionStatement", + "span": { + "start": 1105, + "end": 1155, + "ctxt": 0 + }, + "expression": { + "type": "CallExpression", + "span": { + "start": 1105, + "end": 1154, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 1105, + "end": 1142, + "ctxt": 0 + }, + "object": { + "type": "NewExpression", + "span": { + "start": 1105, + "end": 1135, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 1109, + "end": 1126, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 1109, + "end": 1113, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 1114, + "end": 1126, + "ctxt": 0 + }, + "value": "NumberFormat", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 1127, + "end": 1134, + "ctxt": 0 + }, + "value": "en-GB", + "raw": "'en-GB'" + } + } + ], + "typeArguments": null + }, + "property": { + "type": "Identifier", + "span": { + "start": 1136, + "end": 1142, + "ctxt": 0 + }, + "value": "format", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 1143, + "end": 1153, + "ctxt": 0 + }, + "value": "-12.3E-4", + "raw": "'-12.3E-4'" + } + } + ], + "typeArguments": null + } + }, + { + "type": "ExpressionStatement", + "span": { + "start": 1156, + "end": 1217, + "ctxt": 0 + }, + "expression": { + "type": "CallExpression", + "span": { + "start": 1156, + "end": 1216, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 1156, + "end": 1198, + "ctxt": 0 + }, + "object": { + "type": "NewExpression", + "span": { + "start": 1156, + "end": 1186, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 1160, + "end": 1177, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 1160, + "end": 1164, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 1165, + "end": 1177, + "ctxt": 0 + }, + "value": "NumberFormat", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 1178, + "end": 1185, + "ctxt": 0 + }, + "value": "en-GB", + "raw": "'en-GB'" + } + } + ], + "typeArguments": null + }, + "property": { + "type": "Identifier", + "span": { + "start": 1187, + "end": 1198, + "ctxt": 0 + }, + "value": "formatRange", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 1199, + "end": 1206, + "ctxt": 0 + }, + "value": "123.4", + "raw": "'123.4'" + } + }, + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 1208, + "end": 1215, + "ctxt": 0 + }, + "value": "567.8", + "raw": "'567.8'" + } + } + ], + "typeArguments": null + } + }, + { + "type": "ExpressionStatement", + "span": { + "start": 1218, + "end": 1287, + "ctxt": 0 + }, + "expression": { + "type": "CallExpression", + "span": { + "start": 1218, + "end": 1286, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 1218, + "end": 1267, + "ctxt": 0 + }, + "object": { + "type": "NewExpression", + "span": { + "start": 1218, + "end": 1248, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 1222, + "end": 1239, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 1222, + "end": 1226, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 1227, + "end": 1239, + "ctxt": 0 + }, + "value": "NumberFormat", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 1240, + "end": 1247, + "ctxt": 0 + }, + "value": "en-GB", + "raw": "'en-GB'" + } + } + ], + "typeArguments": null + }, + "property": { + "type": "Identifier", + "span": { + "start": 1249, + "end": 1267, + "ctxt": 0 + }, + "value": "formatRangeToParts", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 1268, + "end": 1276, + "ctxt": 0 + }, + "value": "123E-4", + "raw": "'123E-4'" + } + }, + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 1278, + "end": 1285, + "ctxt": 0 + }, + "value": "567E8", + "raw": "'567E8'" + } + } + ], + "typeArguments": null + } + }, + { + "type": "ExpressionStatement", + "span": { + "start": 1288, + "end": 1338, + "ctxt": 0 + }, + "expression": { + "type": "CallExpression", + "span": { + "start": 1288, + "end": 1337, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 1288, + "end": 1325, + "ctxt": 0 + }, + "object": { + "type": "NewExpression", + "span": { + "start": 1288, + "end": 1318, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 1292, + "end": 1309, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 1292, + "end": 1296, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 1297, + "end": 1309, + "ctxt": 0 + }, + "value": "NumberFormat", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 1310, + "end": 1317, + "ctxt": 0 + }, + "value": "en-GB", + "raw": "'en-GB'" + } + } + ], + "typeArguments": null + }, + "property": { + "type": "Identifier", + "span": { + "start": 1319, + "end": 1325, + "ctxt": 0 + }, + "value": "format", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 1326, + "end": 1336, + "ctxt": 0 + }, + "value": "Infinity", + "raw": "'Infinity'" + } + } + ], + "typeArguments": null + } + }, + { + "type": "ExpressionStatement", + "span": { + "start": 1339, + "end": 1390, + "ctxt": 0 + }, + "expression": { + "type": "CallExpression", + "span": { + "start": 1339, + "end": 1389, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 1339, + "end": 1376, + "ctxt": 0 + }, + "object": { + "type": "NewExpression", + "span": { + "start": 1339, + "end": 1369, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 1343, + "end": 1360, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 1343, + "end": 1347, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 1348, + "end": 1360, + "ctxt": 0 + }, + "value": "NumberFormat", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 1361, + "end": 1368, + "ctxt": 0 + }, + "value": "en-GB", + "raw": "'en-GB'" + } + } + ], + "typeArguments": null + }, + "property": { + "type": "Identifier", + "span": { + "start": 1370, + "end": 1376, + "ctxt": 0 + }, + "value": "format", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 1377, + "end": 1388, + "ctxt": 0 + }, + "value": "-Infinity", + "raw": "'-Infinity'" + } + } + ], + "typeArguments": null + } + }, + { + "type": "ExpressionStatement", + "span": { + "start": 1391, + "end": 1442, + "ctxt": 0 + }, + "expression": { + "type": "CallExpression", + "span": { + "start": 1391, + "end": 1441, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 1391, + "end": 1428, + "ctxt": 0 + }, + "object": { + "type": "NewExpression", + "span": { + "start": 1391, + "end": 1421, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 1395, + "end": 1412, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 1395, + "end": 1399, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 1400, + "end": 1412, + "ctxt": 0 + }, + "value": "NumberFormat", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 1413, + "end": 1420, + "ctxt": 0 + }, + "value": "en-GB", + "raw": "'en-GB'" + } + } + ], + "typeArguments": null + }, + "property": { + "type": "Identifier", + "span": { + "start": 1422, + "end": 1428, + "ctxt": 0 + }, + "value": "format", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 1429, + "end": 1440, + "ctxt": 0 + }, + "value": "+Infinity", + "raw": "'+Infinity'" + } + } + ], + "typeArguments": null + } + } + ], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/tsc/intlNumberFormatES2023.ts b/crates/swc_ecma_parser/tests/tsc/intlNumberFormatES2023.ts new file mode 100644 index 000000000000..fa6a7cf9804e --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/intlNumberFormatES2023.ts @@ -0,0 +1,34 @@ +// @target: es2022 +// @lib: es2022,es2023.intl +// @strict: true + +// New / updated resolved options in ES2023, including type change for useGrouping +const { roundingPriority, roundingMode, roundingIncrement, trailingZeroDisplay, useGrouping } = new Intl.NumberFormat('en-GB').resolvedOptions(); + +// Empty options +new Intl.NumberFormat('en-GB', {}); + +// Rounding +new Intl.NumberFormat('en-GB', { roundingPriority: 'lessPrecision', roundingIncrement: 100, roundingMode: 'trunc' }); + +// Changes to signDisplay +const { signDisplay } = new Intl.NumberFormat('en-GB', { signDisplay: 'negative' }).resolvedOptions(); + +// Changes to useGrouping +new Intl.NumberFormat('en-GB', { useGrouping: true }); +new Intl.NumberFormat('en-GB', { useGrouping: 'true' }); +new Intl.NumberFormat('en-GB', { useGrouping: 'always' }); + +// formatRange +new Intl.NumberFormat('en-GB').formatRange(10, 100); +new Intl.NumberFormat('en-GB').formatRange(10n, 1000n); +new Intl.NumberFormat('en-GB').formatRangeToParts(10, 1000)[0]; +new Intl.NumberFormat('en-GB').formatRangeToParts(10n, 1000n)[0]; + +// Arbitrary-precision string arguments +new Intl.NumberFormat('en-GB').format('-12.3E-4'); +new Intl.NumberFormat('en-GB').formatRange('123.4', '567.8'); +new Intl.NumberFormat('en-GB').formatRangeToParts('123E-4', '567E8'); +new Intl.NumberFormat('en-GB').format('Infinity'); +new Intl.NumberFormat('en-GB').format('-Infinity'); +new Intl.NumberFormat('en-GB').format('+Infinity'); diff --git a/crates/swc_ecma_parser/tests/tsc/intlNumberFormatES5UseGrouping.json b/crates/swc_ecma_parser/tests/tsc/intlNumberFormatES5UseGrouping.json new file mode 100644 index 000000000000..77234ab309d7 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/intlNumberFormatES5UseGrouping.json @@ -0,0 +1,431 @@ +{ + "type": "Script", + "span": { + "start": 35, + "end": 312, + "ctxt": 0 + }, + "body": [ + { + "type": "ExpressionStatement", + "span": { + "start": 35, + "end": 89, + "ctxt": 0 + }, + "expression": { + "type": "NewExpression", + "span": { + "start": 35, + "end": 88, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 39, + "end": 56, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 39, + "end": 43, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 44, + "end": 56, + "ctxt": 0 + }, + "value": "NumberFormat", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 57, + "end": 64, + "ctxt": 0 + }, + "value": "en-GB", + "raw": "'en-GB'" + } + }, + { + "spread": null, + "expression": { + "type": "ObjectExpression", + "span": { + "start": 66, + "end": 87, + "ctxt": 0 + }, + "properties": [ + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 68, + "end": 79, + "ctxt": 0 + }, + "value": "useGrouping", + "optional": false + }, + "value": { + "type": "BooleanLiteral", + "span": { + "start": 81, + "end": 85, + "ctxt": 0 + }, + "value": true + } + } + ] + } + } + ], + "typeArguments": null + } + }, + { + "type": "ExpressionStatement", + "span": { + "start": 90, + "end": 146, + "ctxt": 0 + }, + "expression": { + "type": "NewExpression", + "span": { + "start": 90, + "end": 145, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 94, + "end": 111, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 94, + "end": 98, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 99, + "end": 111, + "ctxt": 0 + }, + "value": "NumberFormat", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 112, + "end": 119, + "ctxt": 0 + }, + "value": "en-GB", + "raw": "'en-GB'" + } + }, + { + "spread": null, + "expression": { + "type": "ObjectExpression", + "span": { + "start": 121, + "end": 144, + "ctxt": 0 + }, + "properties": [ + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 123, + "end": 134, + "ctxt": 0 + }, + "value": "useGrouping", + "optional": false + }, + "value": { + "type": "StringLiteral", + "span": { + "start": 136, + "end": 142, + "ctxt": 0 + }, + "value": "true", + "raw": "'true'" + } + } + ] + } + } + ], + "typeArguments": null + } + }, + { + "type": "ExpressionStatement", + "span": { + "start": 163, + "end": 221, + "ctxt": 0 + }, + "expression": { + "type": "NewExpression", + "span": { + "start": 163, + "end": 220, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 167, + "end": 184, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 167, + "end": 171, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 172, + "end": 184, + "ctxt": 0 + }, + "value": "NumberFormat", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 185, + "end": 192, + "ctxt": 0 + }, + "value": "en-GB", + "raw": "'en-GB'" + } + }, + { + "spread": null, + "expression": { + "type": "ObjectExpression", + "span": { + "start": 194, + "end": 219, + "ctxt": 0 + }, + "properties": [ + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 196, + "end": 207, + "ctxt": 0 + }, + "value": "useGrouping", + "optional": false + }, + "value": { + "type": "StringLiteral", + "span": { + "start": 209, + "end": 217, + "ctxt": 0 + }, + "value": "always", + "raw": "'always'" + } + } + ] + } + } + ], + "typeArguments": null + } + }, + { + "type": "VariableDeclaration", + "span": { + "start": 239, + "end": 312, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 245, + "end": 311, + "ctxt": 0 + }, + "id": { + "type": "ObjectPattern", + "span": { + "start": 245, + "end": 260, + "ctxt": 0 + }, + "properties": [ + { + "type": "AssignmentPatternProperty", + "span": { + "start": 247, + "end": 258, + "ctxt": 0 + }, + "key": { + "type": "Identifier", + "span": { + "start": 247, + "end": 258, + "ctxt": 0 + }, + "value": "useGrouping", + "optional": false, + "typeAnnotation": null + }, + "value": null + } + ], + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "CallExpression", + "span": { + "start": 263, + "end": 311, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 263, + "end": 309, + "ctxt": 0 + }, + "object": { + "type": "NewExpression", + "span": { + "start": 263, + "end": 293, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 267, + "end": 284, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 267, + "end": 271, + "ctxt": 0 + }, + "value": "Intl", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 272, + "end": 284, + "ctxt": 0 + }, + "value": "NumberFormat", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 285, + "end": 292, + "ctxt": 0 + }, + "value": "en-GB", + "raw": "'en-GB'" + } + } + ], + "typeArguments": null + }, + "property": { + "type": "Identifier", + "span": { + "start": 294, + "end": 309, + "ctxt": 0 + }, + "value": "resolvedOptions", + "optional": false + } + }, + "arguments": [], + "typeArguments": null + }, + "definite": false + } + ] + } + ], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/tsc/intlNumberFormatES5UseGrouping.ts b/crates/swc_ecma_parser/tests/tsc/intlNumberFormatES5UseGrouping.ts new file mode 100644 index 000000000000..64203bcab254 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/intlNumberFormatES5UseGrouping.ts @@ -0,0 +1,8 @@ +// @target: es5 +// @strict: true + +new Intl.NumberFormat('en-GB', { useGrouping: true }); +new Intl.NumberFormat('en-GB', { useGrouping: 'true' }); // expect error +new Intl.NumberFormat('en-GB', { useGrouping: 'always' }); // expect error + +const { useGrouping } = new Intl.NumberFormat('en-GB').resolvedOptions(); diff --git a/crates/swc_ecma_parser/tests/tsc/jsObjectsMarkedAsOpenEnded.json b/crates/swc_ecma_parser/tests/tsc/jsObjectsMarkedAsOpenEnded.json index 4778ee31d125..709cd2afb4db 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsObjectsMarkedAsOpenEnded.json +++ b/crates/swc_ecma_parser/tests/tsc/jsObjectsMarkedAsOpenEnded.json @@ -1,16 +1,16 @@ { "type": "Script", "span": { - "start": 58, - "end": 467, + "start": 62, + "end": 471, "ctxt": 0 }, "body": [ { "type": "VariableDeclaration", "span": { - "start": 58, - "end": 76, + "start": 62, + "end": 80, "ctxt": 0 }, "kind": "var", @@ -19,15 +19,15 @@ { "type": "VariableDeclarator", "span": { - "start": 62, - "end": 75, + "start": 66, + "end": 79, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 62, - "end": 70, + "start": 66, + "end": 74, "ctxt": 0 }, "value": "variable", @@ -37,8 +37,8 @@ "init": { "type": "ObjectExpression", "span": { - "start": 73, - "end": 75, + "start": 77, + "end": 79, "ctxt": 0 }, "properties": [] @@ -50,30 +50,30 @@ { "type": "ExpressionStatement", "span": { - "start": 77, - "end": 92, + "start": 81, + "end": 96, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 77, - "end": 91, + "start": 81, + "end": 95, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 77, - "end": 87, + "start": 81, + "end": 91, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 77, - "end": 85, + "start": 81, + "end": 89, "ctxt": 0 }, "value": "variable", @@ -82,8 +82,8 @@ "property": { "type": "Identifier", "span": { - "start": 86, - "end": 87, + "start": 90, + "end": 91, "ctxt": 0 }, "value": "a", @@ -93,8 +93,8 @@ "right": { "type": "NumericLiteral", "span": { - "start": 90, - "end": 91, + "start": 94, + "end": 95, "ctxt": 0 }, "value": 0.0, @@ -107,8 +107,8 @@ "identifier": { "type": "Identifier", "span": { - "start": 100, - "end": 101, + "start": 104, + "end": 105, "ctxt": 0 }, "value": "C", @@ -116,8 +116,8 @@ }, "declare": false, "span": { - "start": 94, - "end": 212, + "start": 98, + "end": 216, "ctxt": 0 }, "decorators": [], @@ -125,15 +125,15 @@ { "type": "ClassProperty", "span": { - "start": 108, - "end": 131, + "start": 112, + "end": 135, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 108, - "end": 125, + "start": 112, + "end": 129, "ctxt": 0 }, "value": "initializedMember", @@ -142,8 +142,8 @@ "value": { "type": "ObjectExpression", "span": { - "start": 128, - "end": 130, + "start": 132, + "end": 134, "ctxt": 0 }, "properties": [] @@ -162,15 +162,15 @@ { "type": "Constructor", "span": { - "start": 136, - "end": 210, + "start": 140, + "end": 214, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 136, - "end": 147, + "start": 140, + "end": 151, "ctxt": 0 }, "value": "constructor", @@ -180,46 +180,46 @@ "body": { "type": "BlockStatement", "span": { - "start": 150, - "end": 210, + "start": 154, + "end": 214, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 160, - "end": 177, + "start": 164, + "end": 181, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 160, - "end": 176, + "start": 164, + "end": 180, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 160, - "end": 171, + "start": 164, + "end": 175, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 160, - "end": 164, + "start": 164, + "end": 168, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 165, - "end": 171, + "start": 169, + "end": 175, "ctxt": 0 }, "value": "member", @@ -229,8 +229,8 @@ "right": { "type": "ObjectExpression", "span": { - "start": 174, - "end": 176, + "start": 178, + "end": 180, "ctxt": 0 }, "properties": [] @@ -240,45 +240,45 @@ { "type": "ExpressionStatement", "span": { - "start": 186, - "end": 204, + "start": 190, + "end": 208, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 186, - "end": 203, + "start": 190, + "end": 207, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 186, - "end": 199, + "start": 190, + "end": 203, "ctxt": 0 }, "object": { "type": "MemberExpression", "span": { - "start": 186, - "end": 197, + "start": 190, + "end": 201, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 186, - "end": 190, + "start": 190, + "end": 194, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 191, - "end": 197, + "start": 195, + "end": 201, "ctxt": 0 }, "value": "member", @@ -288,8 +288,8 @@ "property": { "type": "Identifier", "span": { - "start": 198, - "end": 199, + "start": 202, + "end": 203, "ctxt": 0 }, "value": "a", @@ -299,8 +299,8 @@ "right": { "type": "NumericLiteral", "span": { - "start": 202, - "end": 203, + "start": 206, + "end": 207, "ctxt": 0 }, "value": 0.0, @@ -323,8 +323,8 @@ { "type": "VariableDeclaration", "span": { - "start": 214, - "end": 245, + "start": 218, + "end": 249, "ctxt": 0 }, "kind": "var", @@ -333,15 +333,15 @@ { "type": "VariableDeclarator", "span": { - "start": 218, - "end": 244, + "start": 222, + "end": 248, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 218, - "end": 221, + "start": 222, + "end": 225, "ctxt": 0 }, "value": "obj", @@ -351,8 +351,8 @@ "init": { "type": "ObjectExpression", "span": { - "start": 224, - "end": 244, + "start": 228, + "end": 248, "ctxt": 0 }, "properties": [ @@ -361,8 +361,8 @@ "key": { "type": "Identifier", "span": { - "start": 230, - "end": 238, + "start": 234, + "end": 242, "ctxt": 0 }, "value": "property", @@ -371,8 +371,8 @@ "value": { "type": "ObjectExpression", "span": { - "start": 240, - "end": 242, + "start": 244, + "end": 246, "ctxt": 0 }, "properties": [] @@ -387,37 +387,37 @@ { "type": "ExpressionStatement", "span": { - "start": 247, - "end": 266, + "start": 251, + "end": 270, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 247, - "end": 265, + "start": 251, + "end": 269, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 247, - "end": 261, + "start": 251, + "end": 265, "ctxt": 0 }, "object": { "type": "MemberExpression", "span": { - "start": 247, - "end": 259, + "start": 251, + "end": 263, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 247, - "end": 250, + "start": 251, + "end": 254, "ctxt": 0 }, "value": "obj", @@ -426,8 +426,8 @@ "property": { "type": "Identifier", "span": { - "start": 251, - "end": 259, + "start": 255, + "end": 263, "ctxt": 0 }, "value": "property", @@ -437,8 +437,8 @@ "property": { "type": "Identifier", "span": { - "start": 260, - "end": 261, + "start": 264, + "end": 265, "ctxt": 0 }, "value": "a", @@ -448,8 +448,8 @@ "right": { "type": "NumericLiteral", "span": { - "start": 264, - "end": 265, + "start": 268, + "end": 269, "ctxt": 0 }, "value": 0.0, @@ -460,8 +460,8 @@ { "type": "VariableDeclaration", "span": { - "start": 268, - "end": 283, + "start": 272, + "end": 287, "ctxt": 0 }, "kind": "var", @@ -470,15 +470,15 @@ { "type": "VariableDeclarator", "span": { - "start": 272, - "end": 282, + "start": 276, + "end": 286, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 272, - "end": 275, + "start": 276, + "end": 279, "ctxt": 0 }, "value": "arr", @@ -488,8 +488,8 @@ "init": { "type": "ArrayExpression", "span": { - "start": 278, - "end": 282, + "start": 282, + "end": 286, "ctxt": 0 }, "elements": [ @@ -498,8 +498,8 @@ "expression": { "type": "ObjectExpression", "span": { - "start": 279, - "end": 281, + "start": 283, + "end": 285, "ctxt": 0 }, "properties": [] @@ -516,8 +516,8 @@ "identifier": { "type": "Identifier", "span": { - "start": 294, - "end": 300, + "start": 298, + "end": 304, "ctxt": 0 }, "value": "getObj", @@ -527,30 +527,30 @@ "params": [], "decorators": [], "span": { - "start": 285, - "end": 321, + "start": 289, + "end": 325, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 303, - "end": 321, + "start": 307, + "end": 325, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { - "start": 309, - "end": 319, + "start": 313, + "end": 323, "ctxt": 0 }, "argument": { "type": "ObjectExpression", "span": { - "start": 316, - "end": 318, + "start": 320, + "end": 322, "ctxt": 0 }, "properties": [] @@ -566,30 +566,30 @@ { "type": "ExpressionStatement", "span": { - "start": 343, - "end": 358, + "start": 347, + "end": 362, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 343, - "end": 357, + "start": 347, + "end": 361, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 343, - "end": 353, + "start": 347, + "end": 357, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 343, - "end": 351, + "start": 347, + "end": 355, "ctxt": 0 }, "value": "variable", @@ -598,8 +598,8 @@ "property": { "type": "Identifier", "span": { - "start": 352, - "end": 353, + "start": 356, + "end": 357, "ctxt": 0 }, "value": "a", @@ -609,8 +609,8 @@ "right": { "type": "NumericLiteral", "span": { - "start": 356, - "end": 357, + "start": 360, + "end": 361, "ctxt": 0 }, "value": 1.0, @@ -621,51 +621,51 @@ { "type": "ExpressionStatement", "span": { - "start": 359, - "end": 382, + "start": 363, + "end": 386, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 359, - "end": 381, + "start": 363, + "end": 385, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 359, - "end": 377, + "start": 363, + "end": 381, "ctxt": 0 }, "object": { "type": "MemberExpression", "span": { - "start": 359, - "end": 375, + "start": 363, + "end": 379, "ctxt": 0 }, "object": { "type": "ParenthesisExpression", "span": { - "start": 359, - "end": 368, + "start": 363, + "end": 372, "ctxt": 0 }, "expression": { "type": "NewExpression", "span": { - "start": 360, - "end": 367, + "start": 364, + "end": 371, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { - "start": 364, - "end": 365, + "start": 368, + "end": 369, "ctxt": 0 }, "value": "C", @@ -678,8 +678,8 @@ "property": { "type": "Identifier", "span": { - "start": 369, - "end": 375, + "start": 373, + "end": 379, "ctxt": 0 }, "value": "member", @@ -689,8 +689,8 @@ "property": { "type": "Identifier", "span": { - "start": 376, - "end": 377, + "start": 380, + "end": 381, "ctxt": 0 }, "value": "a", @@ -700,8 +700,8 @@ "right": { "type": "NumericLiteral", "span": { - "start": 380, - "end": 381, + "start": 384, + "end": 385, "ctxt": 0 }, "value": 1.0, @@ -712,51 +712,51 @@ { "type": "ExpressionStatement", "span": { - "start": 383, - "end": 417, + "start": 387, + "end": 421, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 383, - "end": 416, + "start": 387, + "end": 420, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 383, - "end": 412, + "start": 387, + "end": 416, "ctxt": 0 }, "object": { "type": "MemberExpression", "span": { - "start": 383, - "end": 410, + "start": 387, + "end": 414, "ctxt": 0 }, "object": { "type": "ParenthesisExpression", "span": { - "start": 383, - "end": 392, + "start": 387, + "end": 396, "ctxt": 0 }, "expression": { "type": "NewExpression", "span": { - "start": 384, - "end": 391, + "start": 388, + "end": 395, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { - "start": 388, - "end": 389, + "start": 392, + "end": 393, "ctxt": 0 }, "value": "C", @@ -769,8 +769,8 @@ "property": { "type": "Identifier", "span": { - "start": 393, - "end": 410, + "start": 397, + "end": 414, "ctxt": 0 }, "value": "initializedMember", @@ -780,8 +780,8 @@ "property": { "type": "Identifier", "span": { - "start": 411, - "end": 412, + "start": 415, + "end": 416, "ctxt": 0 }, "value": "a", @@ -791,8 +791,8 @@ "right": { "type": "NumericLiteral", "span": { - "start": 415, - "end": 416, + "start": 419, + "end": 420, "ctxt": 0 }, "value": 1.0, @@ -803,37 +803,37 @@ { "type": "ExpressionStatement", "span": { - "start": 418, - "end": 437, + "start": 422, + "end": 441, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 418, - "end": 436, + "start": 422, + "end": 440, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 418, - "end": 432, + "start": 422, + "end": 436, "ctxt": 0 }, "object": { "type": "MemberExpression", "span": { - "start": 418, - "end": 430, + "start": 422, + "end": 434, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 418, - "end": 421, + "start": 422, + "end": 425, "ctxt": 0 }, "value": "obj", @@ -842,8 +842,8 @@ "property": { "type": "Identifier", "span": { - "start": 422, - "end": 430, + "start": 426, + "end": 434, "ctxt": 0 }, "value": "property", @@ -853,8 +853,8 @@ "property": { "type": "Identifier", "span": { - "start": 431, - "end": 432, + "start": 435, + "end": 436, "ctxt": 0 }, "value": "a", @@ -864,8 +864,8 @@ "right": { "type": "NumericLiteral", "span": { - "start": 435, - "end": 436, + "start": 439, + "end": 440, "ctxt": 0 }, "value": 1.0, @@ -876,37 +876,37 @@ { "type": "ExpressionStatement", "span": { - "start": 438, - "end": 451, + "start": 442, + "end": 455, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 438, - "end": 450, + "start": 442, + "end": 454, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 438, - "end": 446, + "start": 442, + "end": 450, "ctxt": 0 }, "object": { "type": "MemberExpression", "span": { - "start": 438, - "end": 444, + "start": 442, + "end": 448, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 438, - "end": 441, + "start": 442, + "end": 445, "ctxt": 0 }, "value": "arr", @@ -915,15 +915,15 @@ "property": { "type": "Computed", "span": { - "start": 441, - "end": 444, + "start": 445, + "end": 448, "ctxt": 0 }, "expression": { "type": "NumericLiteral", "span": { - "start": 442, - "end": 443, + "start": 446, + "end": 447, "ctxt": 0 }, "value": 0.0, @@ -934,8 +934,8 @@ "property": { "type": "Identifier", "span": { - "start": 445, - "end": 446, + "start": 449, + "end": 450, "ctxt": 0 }, "value": "a", @@ -945,8 +945,8 @@ "right": { "type": "NumericLiteral", "span": { - "start": 449, - "end": 450, + "start": 453, + "end": 454, "ctxt": 0 }, "value": 1.0, @@ -957,37 +957,37 @@ { "type": "ExpressionStatement", "span": { - "start": 452, - "end": 467, + "start": 456, + "end": 471, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 452, - "end": 466, + "start": 456, + "end": 470, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 452, - "end": 462, + "start": 456, + "end": 466, "ctxt": 0 }, "object": { "type": "CallExpression", "span": { - "start": 452, - "end": 460, + "start": 456, + "end": 464, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { - "start": 452, - "end": 458, + "start": 456, + "end": 462, "ctxt": 0 }, "value": "getObj", @@ -999,8 +999,8 @@ "property": { "type": "Identifier", "span": { - "start": 461, - "end": 462, + "start": 465, + "end": 466, "ctxt": 0 }, "value": "a", @@ -1010,8 +1010,8 @@ "right": { "type": "NumericLiteral", "span": { - "start": 465, - "end": 466, + "start": 469, + "end": 470, "ctxt": 0 }, "value": 1.0, diff --git a/crates/swc_ecma_parser/tests/tsc/jsObjectsMarkedAsOpenEnded.ts b/crates/swc_ecma_parser/tests/tsc/jsObjectsMarkedAsOpenEnded.ts index 52b27641f0d8..4991d674d5e7 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsObjectsMarkedAsOpenEnded.ts +++ b/crates/swc_ecma_parser/tests/tsc/jsObjectsMarkedAsOpenEnded.ts @@ -1,4 +1,4 @@ -// @out: output.js +// @outFile: output.js // @allowJs: true // @filename: a.js diff --git a/crates/swc_ecma_parser/tests/tsc/jsdocAccessibilityTagsDeclarations.json b/crates/swc_ecma_parser/tests/tsc/jsdocAccessibilityTagsDeclarations.json index 8008703a8fde..aebcc40fc838 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsdocAccessibilityTagsDeclarations.json +++ b/crates/swc_ecma_parser/tests/tsc/jsdocAccessibilityTagsDeclarations.json @@ -1,8 +1,8 @@ { "type": "Script", "span": { - "start": 145, - "end": 852, + "start": 149, + "end": 856, "ctxt": 0 }, "body": [ @@ -11,8 +11,8 @@ "identifier": { "type": "Identifier", "span": { - "start": 151, - "end": 160, + "start": 155, + "end": 164, "ctxt": 0 }, "value": "Protected", @@ -20,8 +20,8 @@ }, "declare": false, "span": { - "start": 145, - "end": 428, + "start": 149, + "end": 432, "ctxt": 0 }, "decorators": [], @@ -29,15 +29,15 @@ { "type": "Constructor", "span": { - "start": 189, - "end": 256, + "start": 193, + "end": 260, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 189, - "end": 200, + "start": 193, + "end": 204, "ctxt": 0 }, "value": "constructor", @@ -47,16 +47,16 @@ { "type": "Parameter", "span": { - "start": 201, - "end": 202, + "start": 205, + "end": 206, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 201, - "end": 202, + "start": 205, + "end": 206, "ctxt": 0 }, "value": "c", @@ -68,46 +68,46 @@ "body": { "type": "BlockStatement", "span": { - "start": 204, - "end": 256, + "start": 208, + "end": 260, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 240, - "end": 250, + "start": 244, + "end": 254, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 240, - "end": 250, + "start": 244, + "end": 254, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 240, - "end": 246, + "start": 244, + "end": 250, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 240, - "end": 244, + "start": 244, + "end": 248, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 245, - "end": 246, + "start": 249, + "end": 250, "ctxt": 0 }, "value": "c", @@ -117,8 +117,8 @@ "right": { "type": "Identifier", "span": { - "start": 249, - "end": 250, + "start": 253, + "end": 254, "ctxt": 0 }, "value": "c", @@ -134,15 +134,15 @@ { "type": "ClassMethod", "span": { - "start": 283, - "end": 316, + "start": 287, + "end": 320, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 283, - "end": 284, + "start": 287, + "end": 288, "ctxt": 0 }, "value": "m", @@ -152,45 +152,45 @@ "params": [], "decorators": [], "span": { - "start": 283, - "end": 316, + "start": 287, + "end": 320, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 287, - "end": 316, + "start": 291, + "end": 320, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { - "start": 297, - "end": 310, + "start": 301, + "end": 314, "ctxt": 0 }, "argument": { "type": "MemberExpression", "span": { - "start": 304, - "end": 310, + "start": 308, + "end": 314, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 304, - "end": 308, + "start": 308, + "end": 312, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 309, - "end": 310, + "start": 313, + "end": 314, "ctxt": 0 }, "value": "c", @@ -215,15 +215,15 @@ { "type": "ClassMethod", "span": { - "start": 343, - "end": 368, + "start": 347, + "end": 372, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 347, - "end": 348, + "start": 351, + "end": 352, "ctxt": 0 }, "value": "p", @@ -233,45 +233,45 @@ "params": [], "decorators": [], "span": { - "start": 343, - "end": 368, + "start": 347, + "end": 372, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 351, - "end": 368, + "start": 355, + "end": 372, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { - "start": 353, - "end": 366, + "start": 357, + "end": 370, "ctxt": 0 }, "argument": { "type": "MemberExpression", "span": { - "start": 360, - "end": 366, + "start": 364, + "end": 370, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 360, - "end": 364, + "start": 364, + "end": 368, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 365, - "end": 366, + "start": 369, + "end": 370, "ctxt": 0 }, "value": "c", @@ -296,15 +296,15 @@ { "type": "ClassMethod", "span": { - "start": 395, - "end": 426, + "start": 399, + "end": 430, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 399, - "end": 400, + "start": 403, + "end": 404, "ctxt": 0 }, "value": "p", @@ -315,16 +315,16 @@ { "type": "Parameter", "span": { - "start": 401, - "end": 406, + "start": 405, + "end": 410, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 401, - "end": 406, + "start": 405, + "end": 410, "ctxt": 0 }, "value": "value", @@ -335,53 +335,53 @@ ], "decorators": [], "span": { - "start": 395, - "end": 426, + "start": 399, + "end": 430, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 408, - "end": 426, + "start": 412, + "end": 430, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 410, - "end": 424, + "start": 414, + "end": 428, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 410, - "end": 424, + "start": 414, + "end": 428, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 410, - "end": 416, + "start": 414, + "end": 420, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 410, - "end": 414, + "start": 414, + "end": 418, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 415, - "end": 416, + "start": 419, + "end": 420, "ctxt": 0 }, "value": "c", @@ -391,8 +391,8 @@ "right": { "type": "Identifier", "span": { - "start": 419, - "end": 424, + "start": 423, + "end": 428, "ctxt": 0 }, "value": "value", @@ -426,8 +426,8 @@ "identifier": { "type": "Identifier", "span": { - "start": 436, - "end": 443, + "start": 440, + "end": 447, "ctxt": 0 }, "value": "Private", @@ -435,8 +435,8 @@ }, "declare": false, "span": { - "start": 430, - "end": 701, + "start": 434, + "end": 705, "ctxt": 0 }, "decorators": [], @@ -444,15 +444,15 @@ { "type": "Constructor", "span": { - "start": 470, - "end": 535, + "start": 474, + "end": 539, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 470, - "end": 481, + "start": 474, + "end": 485, "ctxt": 0 }, "value": "constructor", @@ -462,16 +462,16 @@ { "type": "Parameter", "span": { - "start": 482, - "end": 483, + "start": 486, + "end": 487, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 482, - "end": 483, + "start": 486, + "end": 487, "ctxt": 0 }, "value": "c", @@ -483,46 +483,46 @@ "body": { "type": "BlockStatement", "span": { - "start": 485, - "end": 535, + "start": 489, + "end": 539, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 519, - "end": 529, + "start": 523, + "end": 533, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 519, - "end": 529, + "start": 523, + "end": 533, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 519, - "end": 525, + "start": 523, + "end": 529, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 519, - "end": 523, + "start": 523, + "end": 527, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 524, - "end": 525, + "start": 528, + "end": 529, "ctxt": 0 }, "value": "c", @@ -532,8 +532,8 @@ "right": { "type": "Identifier", "span": { - "start": 528, - "end": 529, + "start": 532, + "end": 533, "ctxt": 0 }, "value": "c", @@ -549,15 +549,15 @@ { "type": "ClassMethod", "span": { - "start": 560, - "end": 593, + "start": 564, + "end": 597, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 560, - "end": 561, + "start": 564, + "end": 565, "ctxt": 0 }, "value": "m", @@ -567,45 +567,45 @@ "params": [], "decorators": [], "span": { - "start": 560, - "end": 593, + "start": 564, + "end": 597, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 564, - "end": 593, + "start": 568, + "end": 597, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { - "start": 574, - "end": 587, + "start": 578, + "end": 591, "ctxt": 0 }, "argument": { "type": "MemberExpression", "span": { - "start": 581, - "end": 587, + "start": 585, + "end": 591, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 581, - "end": 585, + "start": 585, + "end": 589, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 586, - "end": 587, + "start": 590, + "end": 591, "ctxt": 0 }, "value": "c", @@ -630,15 +630,15 @@ { "type": "ClassMethod", "span": { - "start": 618, - "end": 643, + "start": 622, + "end": 647, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 622, - "end": 623, + "start": 626, + "end": 627, "ctxt": 0 }, "value": "p", @@ -648,45 +648,45 @@ "params": [], "decorators": [], "span": { - "start": 618, - "end": 643, + "start": 622, + "end": 647, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 626, - "end": 643, + "start": 630, + "end": 647, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { - "start": 628, - "end": 641, + "start": 632, + "end": 645, "ctxt": 0 }, "argument": { "type": "MemberExpression", "span": { - "start": 635, - "end": 641, + "start": 639, + "end": 645, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 635, - "end": 639, + "start": 639, + "end": 643, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 640, - "end": 641, + "start": 644, + "end": 645, "ctxt": 0 }, "value": "c", @@ -711,15 +711,15 @@ { "type": "ClassMethod", "span": { - "start": 668, - "end": 699, + "start": 672, + "end": 703, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 672, - "end": 673, + "start": 676, + "end": 677, "ctxt": 0 }, "value": "p", @@ -730,16 +730,16 @@ { "type": "Parameter", "span": { - "start": 674, - "end": 679, + "start": 678, + "end": 683, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 674, - "end": 679, + "start": 678, + "end": 683, "ctxt": 0 }, "value": "value", @@ -750,53 +750,53 @@ ], "decorators": [], "span": { - "start": 668, - "end": 699, + "start": 672, + "end": 703, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 681, - "end": 699, + "start": 685, + "end": 703, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 683, - "end": 697, + "start": 687, + "end": 701, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 683, - "end": 697, + "start": 687, + "end": 701, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 683, - "end": 689, + "start": 687, + "end": 693, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 683, - "end": 687, + "start": 687, + "end": 691, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 688, - "end": 689, + "start": 692, + "end": 693, "ctxt": 0 }, "value": "c", @@ -806,8 +806,8 @@ "right": { "type": "Identifier", "span": { - "start": 692, - "end": 697, + "start": 696, + "end": 701, "ctxt": 0 }, "value": "value", @@ -841,8 +841,8 @@ "identifier": { "type": "Identifier", "span": { - "start": 765, - "end": 766, + "start": 769, + "end": 770, "ctxt": 0 }, "value": "C", @@ -850,8 +850,8 @@ }, "declare": false, "span": { - "start": 759, - "end": 852, + "start": 763, + "end": 856, "ctxt": 0 }, "decorators": [], @@ -859,15 +859,15 @@ { "type": "Constructor", "span": { - "start": 773, - "end": 850, + "start": 777, + "end": 854, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 773, - "end": 784, + "start": 777, + "end": 788, "ctxt": 0 }, "value": "constructor", @@ -877,16 +877,16 @@ { "type": "Parameter", "span": { - "start": 800, - "end": 801, + "start": 804, + "end": 805, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 800, - "end": 801, + "start": 804, + "end": 805, "ctxt": 0 }, "value": "x", @@ -897,16 +897,16 @@ { "type": "Parameter", "span": { - "start": 821, - "end": 822, + "start": 825, + "end": 826, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 821, - "end": 822, + "start": 825, + "end": 826, "ctxt": 0 }, "value": "y", @@ -917,16 +917,16 @@ { "type": "Parameter", "span": { - "start": 840, - "end": 841, + "start": 844, + "end": 845, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 840, - "end": 841, + "start": 844, + "end": 845, "ctxt": 0 }, "value": "z", @@ -938,8 +938,8 @@ "body": { "type": "BlockStatement", "span": { - "start": 843, - "end": 850, + "start": 847, + "end": 854, "ctxt": 0 }, "stmts": [] diff --git a/crates/swc_ecma_parser/tests/tsc/jsdocAccessibilityTagsDeclarations.ts b/crates/swc_ecma_parser/tests/tsc/jsdocAccessibilityTagsDeclarations.ts index 8890dbf92475..b49f732c1bb1 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsdocAccessibilityTagsDeclarations.ts +++ b/crates/swc_ecma_parser/tests/tsc/jsdocAccessibilityTagsDeclarations.ts @@ -1,7 +1,7 @@ // @allowJs: true // @checkJs: true // @target: esnext -// @out: foo.js +// @outFile: foo.js // @declaration: true // @Filename: jsdocAccessibilityTagDeclarations.js class Protected { @@ -40,4 +40,4 @@ class Private { class C { constructor(/** @public */ x, /** @protected */ y, /** @private */ z) { } -} \ No newline at end of file +} diff --git a/crates/swc_ecma_parser/tests/tsc/jsdocLinkTag8.json b/crates/swc_ecma_parser/tests/tsc/jsdocLinkTag8.json new file mode 100644 index 000000000000..d3ddbce990f9 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/jsdocLinkTag8.json @@ -0,0 +1,88 @@ +{ + "type": "Script", + "span": { + "start": 120, + "end": 151, + "ctxt": 0 + }, + "body": [ + { + "type": "VariableDeclaration", + "span": { + "start": 120, + "end": 151, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 126, + "end": 151, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 126, + "end": 132, + "ctxt": 0 + }, + "value": "remove", + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "ArrowFunctionExpression", + "span": { + "start": 135, + "end": 151, + "ctxt": 0 + }, + "params": [ + { + "type": "Identifier", + "span": { + "start": 136, + "end": 139, + "ctxt": 0 + }, + "value": "map", + "optional": false, + "typeAnnotation": null + }, + { + "type": "Identifier", + "span": { + "start": 141, + "end": 144, + "ctxt": 0 + }, + "value": "key", + "optional": false, + "typeAnnotation": null + } + ], + "body": { + "type": "BlockStatement", + "span": { + "start": 149, + "end": 151, + "ctxt": 0 + }, + "stmts": [] + }, + "async": false, + "generator": false, + "typeParameters": null, + "returnType": null + }, + "definite": false + } + ] + } + ], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/tsc/jsdocLinkTag8.ts b/crates/swc_ecma_parser/tests/tsc/jsdocLinkTag8.ts new file mode 100644 index 000000000000..ac817f70f117 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/jsdocLinkTag8.ts @@ -0,0 +1,8 @@ +// @checkJs: true +// @allowJs: true +// @target: esnext +// @noEmit: true +// @filename: /a.js + +/** {@link Map.delete} */ +const remove = (map, key) => {} diff --git a/crates/swc_ecma_parser/tests/tsc/jsdocLiteral.json b/crates/swc_ecma_parser/tests/tsc/jsdocLiteral.json index 2fb2980a7f4e..627b3a87edb1 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsdocLiteral.json +++ b/crates/swc_ecma_parser/tests/tsc/jsdocLiteral.json @@ -1,8 +1,8 @@ { "type": "Script", "span": { - "start": 215, - "end": 290, + "start": 219, + "end": 294, "ctxt": 0 }, "body": [ @@ -11,8 +11,8 @@ "identifier": { "type": "Identifier", "span": { - "start": 224, - "end": 225, + "start": 228, + "end": 229, "ctxt": 0 }, "value": "f", @@ -23,16 +23,16 @@ { "type": "Parameter", "span": { - "start": 226, - "end": 228, + "start": 230, + "end": 232, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 226, - "end": 228, + "start": 230, + "end": 232, "ctxt": 0 }, "value": "p1", @@ -43,16 +43,16 @@ { "type": "Parameter", "span": { - "start": 230, - "end": 232, + "start": 234, + "end": 236, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 230, - "end": 232, + "start": 234, + "end": 236, "ctxt": 0 }, "value": "p2", @@ -63,16 +63,16 @@ { "type": "Parameter", "span": { - "start": 234, - "end": 236, + "start": 238, + "end": 240, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 234, - "end": 236, + "start": 238, + "end": 240, "ctxt": 0 }, "value": "p3", @@ -83,16 +83,16 @@ { "type": "Parameter", "span": { - "start": 238, - "end": 240, + "start": 242, + "end": 244, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 238, - "end": 240, + "start": 242, + "end": 244, "ctxt": 0 }, "value": "p4", @@ -103,16 +103,16 @@ { "type": "Parameter", "span": { - "start": 242, - "end": 244, + "start": 246, + "end": 248, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 242, - "end": 244, + "start": 246, + "end": 248, "ctxt": 0 }, "value": "p5", @@ -123,70 +123,70 @@ ], "decorators": [], "span": { - "start": 215, - "end": 290, + "start": 219, + "end": 294, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 246, - "end": 290, + "start": 250, + "end": 294, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { - "start": 252, - "end": 288, + "start": 256, + "end": 292, "ctxt": 0 }, "argument": { "type": "BinaryExpression", "span": { - "start": 259, - "end": 287, + "start": 263, + "end": 291, "ctxt": 0 }, "operator": "+", "left": { "type": "BinaryExpression", "span": { - "start": 259, - "end": 281, + "start": 263, + "end": 285, "ctxt": 0 }, "operator": "+", "left": { "type": "BinaryExpression", "span": { - "start": 259, - "end": 276, + "start": 263, + "end": 280, "ctxt": 0 }, "operator": "+", "left": { "type": "BinaryExpression", "span": { - "start": 259, - "end": 271, + "start": 263, + "end": 275, "ctxt": 0 }, "operator": "+", "left": { "type": "BinaryExpression", "span": { - "start": 259, - "end": 266, + "start": 263, + "end": 270, "ctxt": 0 }, "operator": "+", "left": { "type": "Identifier", "span": { - "start": 259, - "end": 261, + "start": 263, + "end": 265, "ctxt": 0 }, "value": "p1", @@ -195,8 +195,8 @@ "right": { "type": "Identifier", "span": { - "start": 264, - "end": 266, + "start": 268, + "end": 270, "ctxt": 0 }, "value": "p2", @@ -206,8 +206,8 @@ "right": { "type": "Identifier", "span": { - "start": 269, - "end": 271, + "start": 273, + "end": 275, "ctxt": 0 }, "value": "p3", @@ -217,8 +217,8 @@ "right": { "type": "Identifier", "span": { - "start": 274, - "end": 276, + "start": 278, + "end": 280, "ctxt": 0 }, "value": "p4", @@ -228,8 +228,8 @@ "right": { "type": "Identifier", "span": { - "start": 279, - "end": 281, + "start": 283, + "end": 285, "ctxt": 0 }, "value": "p5", @@ -239,8 +239,8 @@ "right": { "type": "StringLiteral", "span": { - "start": 284, - "end": 287, + "start": 288, + "end": 291, "ctxt": 0 }, "value": ".", diff --git a/crates/swc_ecma_parser/tests/tsc/jsdocLiteral.ts b/crates/swc_ecma_parser/tests/tsc/jsdocLiteral.ts index bd0d2d562f9a..ff7b1e24b3e3 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsdocLiteral.ts +++ b/crates/swc_ecma_parser/tests/tsc/jsdocLiteral.ts @@ -1,6 +1,6 @@ // @allowJs: true // @filename: in.js -// @out: out.js +// @outFile: out.js /** * @param {'literal'} p1 * @param {"literal"} p2 diff --git a/crates/swc_ecma_parser/tests/tsc/jsdocNeverUndefinedNull.json b/crates/swc_ecma_parser/tests/tsc/jsdocNeverUndefinedNull.json index 7fc9440a00fa..1a20724e7e2d 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsdocNeverUndefinedNull.json +++ b/crates/swc_ecma_parser/tests/tsc/jsdocNeverUndefinedNull.json @@ -1,8 +1,8 @@ { "type": "Script", "span": { - "start": 156, - "end": 182, + "start": 160, + "end": 186, "ctxt": 0 }, "body": [ @@ -11,8 +11,8 @@ "identifier": { "type": "Identifier", "span": { - "start": 165, - "end": 166, + "start": 169, + "end": 170, "ctxt": 0 }, "value": "f", @@ -23,16 +23,16 @@ { "type": "Parameter", "span": { - "start": 167, - "end": 169, + "start": 171, + "end": 173, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 167, - "end": 169, + "start": 171, + "end": 173, "ctxt": 0 }, "value": "p1", @@ -43,16 +43,16 @@ { "type": "Parameter", "span": { - "start": 171, - "end": 173, + "start": 175, + "end": 177, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 171, - "end": 173, + "start": 175, + "end": 177, "ctxt": 0 }, "value": "p2", @@ -63,16 +63,16 @@ { "type": "Parameter", "span": { - "start": 175, - "end": 177, + "start": 179, + "end": 181, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 175, - "end": 177, + "start": 179, + "end": 181, "ctxt": 0 }, "value": "p3", @@ -83,15 +83,15 @@ ], "decorators": [], "span": { - "start": 156, - "end": 182, + "start": 160, + "end": 186, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 179, - "end": 182, + "start": 183, + "end": 186, "ctxt": 0 }, "stmts": [] diff --git a/crates/swc_ecma_parser/tests/tsc/jsdocNeverUndefinedNull.ts b/crates/swc_ecma_parser/tests/tsc/jsdocNeverUndefinedNull.ts index c095bc1c920d..40ccd5e7f699 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsdocNeverUndefinedNull.ts +++ b/crates/swc_ecma_parser/tests/tsc/jsdocNeverUndefinedNull.ts @@ -1,6 +1,6 @@ // @allowJs: true // @filename: in.js -// @out: out.js +// @outFile: out.js /** * @param {never} p1 * @param {undefined} p2 diff --git a/crates/swc_ecma_parser/tests/tsc/jsdocReadonlyDeclarations.json b/crates/swc_ecma_parser/tests/tsc/jsdocReadonlyDeclarations.json index 0996f132fd16..5c2163fbad03 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsdocReadonlyDeclarations.json +++ b/crates/swc_ecma_parser/tests/tsc/jsdocReadonlyDeclarations.json @@ -1,8 +1,8 @@ { "type": "Script", "span": { - "start": 172, - "end": 543, + "start": 176, + "end": 547, "ctxt": 0 }, "body": [ @@ -11,8 +11,8 @@ "identifier": { "type": "Identifier", "span": { - "start": 178, - "end": 179, + "start": 182, + "end": 183, "ctxt": 0 }, "value": "C", @@ -20,8 +20,8 @@ }, "declare": false, "span": { - "start": 172, - "end": 371, + "start": 176, + "end": 375, "ctxt": 0 }, "decorators": [], @@ -29,15 +29,15 @@ { "type": "ClassProperty", "span": { - "start": 207, - "end": 212, + "start": 211, + "end": 216, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 207, - "end": 208, + "start": 211, + "end": 212, "ctxt": 0 }, "value": "x", @@ -46,8 +46,8 @@ "value": { "type": "NumericLiteral", "span": { - "start": 211, - "end": 212, + "start": 215, + "end": 216, "ctxt": 0 }, "value": 6.0, @@ -67,15 +67,15 @@ { "type": "Constructor", "span": { - "start": 238, - "end": 369, + "start": 242, + "end": 373, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 238, - "end": 249, + "start": 242, + "end": 253, "ctxt": 0 }, "value": "constructor", @@ -85,16 +85,16 @@ { "type": "Parameter", "span": { - "start": 250, - "end": 251, + "start": 254, + "end": 255, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 250, - "end": 251, + "start": 254, + "end": 255, "ctxt": 0 }, "value": "n", @@ -106,46 +106,46 @@ "body": { "type": "BlockStatement", "span": { - "start": 253, - "end": 369, + "start": 257, + "end": 373, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 263, - "end": 273, + "start": 267, + "end": 277, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 263, - "end": 273, + "start": 267, + "end": 277, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 263, - "end": 269, + "start": 267, + "end": 273, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 263, - "end": 267, + "start": 267, + "end": 271, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 268, - "end": 269, + "start": 272, + "end": 273, "ctxt": 0 }, "value": "x", @@ -155,8 +155,8 @@ "right": { "type": "Identifier", "span": { - "start": 272, - "end": 273, + "start": 276, + "end": 277, "ctxt": 0 }, "value": "n", @@ -167,38 +167,38 @@ { "type": "ExpressionStatement", "span": { - "start": 353, - "end": 363, + "start": 357, + "end": 367, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 353, - "end": 363, + "start": 357, + "end": 367, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 353, - "end": 359, + "start": 357, + "end": 363, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 353, - "end": 357, + "start": 357, + "end": 361, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 358, - "end": 359, + "start": 362, + "end": 363, "ctxt": 0 }, "value": "y", @@ -208,8 +208,8 @@ "right": { "type": "Identifier", "span": { - "start": 362, - "end": 363, + "start": 366, + "end": 367, "ctxt": 0 }, "value": "n", @@ -232,29 +232,29 @@ { "type": "ExpressionStatement", "span": { - "start": 372, - "end": 381, + "start": 376, + "end": 385, "ctxt": 0 }, "expression": { "type": "MemberExpression", "span": { - "start": 372, - "end": 381, + "start": 376, + "end": 385, "ctxt": 0 }, "object": { "type": "NewExpression", "span": { - "start": 372, - "end": 379, + "start": 376, + "end": 383, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { - "start": 376, - "end": 377, + "start": 380, + "end": 381, "ctxt": 0 }, "value": "C", @@ -266,8 +266,8 @@ "property": { "type": "Identifier", "span": { - "start": 380, - "end": 381, + "start": 384, + "end": 385, "ctxt": 0 }, "value": "x", @@ -280,8 +280,8 @@ "identifier": { "type": "Identifier", "span": { - "start": 392, - "end": 393, + "start": 396, + "end": 397, "ctxt": 0 }, "value": "F", @@ -291,53 +291,53 @@ "params": [], "decorators": [], "span": { - "start": 383, - "end": 435, + "start": 387, + "end": 439, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 396, - "end": 435, + "start": 400, + "end": 439, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 423, - "end": 433, + "start": 427, + "end": 437, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 423, - "end": 433, + "start": 427, + "end": 437, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 423, - "end": 429, + "start": 427, + "end": 433, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 423, - "end": 427, + "start": 427, + "end": 431, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 428, - "end": 429, + "start": 432, + "end": 433, "ctxt": 0 }, "value": "z", @@ -347,8 +347,8 @@ "right": { "type": "NumericLiteral", "span": { - "start": 432, - "end": 433, + "start": 436, + "end": 437, "ctxt": 0 }, "value": 1.0, @@ -368,8 +368,8 @@ "identifier": { "type": "Identifier", "span": { - "start": 499, - "end": 500, + "start": 503, + "end": 504, "ctxt": 0 }, "value": "D", @@ -377,8 +377,8 @@ }, "declare": false, "span": { - "start": 493, - "end": 543, + "start": 497, + "end": 547, "ctxt": 0 }, "decorators": [], @@ -386,15 +386,15 @@ { "type": "Constructor", "span": { - "start": 507, - "end": 541, + "start": 511, + "end": 545, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 507, - "end": 518, + "start": 511, + "end": 522, "ctxt": 0 }, "value": "constructor", @@ -404,16 +404,16 @@ { "type": "Parameter", "span": { - "start": 536, - "end": 537, + "start": 540, + "end": 541, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 536, - "end": 537, + "start": 540, + "end": 541, "ctxt": 0 }, "value": "x", @@ -425,8 +425,8 @@ "body": { "type": "BlockStatement", "span": { - "start": 539, - "end": 541, + "start": 543, + "end": 545, "ctxt": 0 }, "stmts": [] diff --git a/crates/swc_ecma_parser/tests/tsc/jsdocReadonlyDeclarations.ts b/crates/swc_ecma_parser/tests/tsc/jsdocReadonlyDeclarations.ts index b70e0d75b994..1036c2eb7a85 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsdocReadonlyDeclarations.ts +++ b/crates/swc_ecma_parser/tests/tsc/jsdocReadonlyDeclarations.ts @@ -1,7 +1,7 @@ // @allowJs: true // @checkJs: true // @target: esnext -// @out: foo.js +// @outFile: foo.js // @declaration: true // @Filename: jsdocReadonlyDeclarations.js // @useDefineForClassFields: false @@ -28,4 +28,4 @@ function F() { // https://github.com/microsoft/TypeScript/issues/38401 class D { constructor(/** @readonly */ x) {} -} \ No newline at end of file +} diff --git a/crates/swc_ecma_parser/tests/tsc/jsdocReturnTag1.json b/crates/swc_ecma_parser/tests/tsc/jsdocReturnTag1.json index fbcf01bded0e..d4a24890378b 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsdocReturnTag1.json +++ b/crates/swc_ecma_parser/tests/tsc/jsdocReturnTag1.json @@ -1,8 +1,8 @@ { "type": "Script", "span": { - "start": 129, - "end": 378, + "start": 133, + "end": 382, "ctxt": 0 }, "body": [ @@ -11,8 +11,8 @@ "identifier": { "type": "Identifier", "span": { - "start": 138, - "end": 139, + "start": 142, + "end": 143, "ctxt": 0 }, "value": "f", @@ -22,30 +22,30 @@ "params": [], "decorators": [], "span": { - "start": 129, - "end": 159, + "start": 133, + "end": 163, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 142, - "end": 159, + "start": 146, + "end": 163, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { - "start": 148, - "end": 157, + "start": 152, + "end": 161, "ctxt": 0 }, "argument": { "type": "NumericLiteral", "span": { - "start": 155, - "end": 156, + "start": 159, + "end": 160, "ctxt": 0 }, "value": 5.0, @@ -64,8 +64,8 @@ "identifier": { "type": "Identifier", "span": { - "start": 238, - "end": 240, + "start": 242, + "end": 244, "ctxt": 0 }, "value": "f1", @@ -75,30 +75,30 @@ "params": [], "decorators": [], "span": { - "start": 229, - "end": 260, + "start": 233, + "end": 264, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 243, - "end": 260, + "start": 247, + "end": 264, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { - "start": 249, - "end": 258, + "start": 253, + "end": 262, "ctxt": 0 }, "argument": { "type": "NumericLiteral", "span": { - "start": 256, - "end": 257, + "start": 260, + "end": 261, "ctxt": 0 }, "value": 5.0, @@ -117,8 +117,8 @@ "identifier": { "type": "Identifier", "span": { - "start": 345, - "end": 347, + "start": 349, + "end": 351, "ctxt": 0 }, "value": "f2", @@ -128,38 +128,38 @@ "params": [], "decorators": [], "span": { - "start": 336, - "end": 378, + "start": 340, + "end": 382, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 350, - "end": 378, + "start": 354, + "end": 382, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { - "start": 356, - "end": 376, + "start": 360, + "end": 380, "ctxt": 0 }, "argument": { "type": "BinaryExpression", "span": { - "start": 363, - "end": 375, + "start": 367, + "end": 379, "ctxt": 0 }, "operator": "||", "left": { "type": "NumericLiteral", "span": { - "start": 363, - "end": 364, + "start": 367, + "end": 368, "ctxt": 0 }, "value": 5.0, @@ -168,8 +168,8 @@ "right": { "type": "StringLiteral", "span": { - "start": 368, - "end": 375, + "start": 372, + "end": 379, "ctxt": 0 }, "value": "hello", diff --git a/crates/swc_ecma_parser/tests/tsc/jsdocReturnTag1.ts b/crates/swc_ecma_parser/tests/tsc/jsdocReturnTag1.ts index 046c1d84b62f..fe4be551c4c7 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsdocReturnTag1.ts +++ b/crates/swc_ecma_parser/tests/tsc/jsdocReturnTag1.ts @@ -1,6 +1,6 @@ // @allowJs: true // @filename: returns.js -// @out: dummy.js +// @outFile: dummy.js /** * @returns {string} This comment is not currently exposed */ @@ -20,4 +20,4 @@ function f1() { */ function f2() { return 5 || "hello"; -} \ No newline at end of file +} diff --git a/crates/swc_ecma_parser/tests/tsc/libReferenceDeclarationEmit.json b/crates/swc_ecma_parser/tests/tsc/libReferenceDeclarationEmit.json index 71257cde2d4e..24e91ac6b436 100644 --- a/crates/swc_ecma_parser/tests/tsc/libReferenceDeclarationEmit.json +++ b/crates/swc_ecma_parser/tests/tsc/libReferenceDeclarationEmit.json @@ -1,23 +1,23 @@ { "type": "Module", "span": { - "start": 130, - "end": 264, + "start": 146, + "end": 296, "ctxt": 0 }, "body": [ { "type": "ExportDeclaration", "span": { - "start": 130, - "end": 169, + "start": 146, + "end": 185, "ctxt": 0 }, "declaration": { "type": "VariableDeclaration", "span": { - "start": 137, - "end": 169, + "start": 153, + "end": 185, "ctxt": 0 }, "kind": "const", @@ -26,15 +26,15 @@ { "type": "VariableDeclarator", "span": { - "start": 151, - "end": 168, + "start": 167, + "end": 184, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 151, - "end": 155, + "start": 167, + "end": 171, "ctxt": 0 }, "value": "elem", @@ -42,22 +42,22 @@ "typeAnnotation": { "type": "TsTypeAnnotation", "span": { - "start": 155, - "end": 168, + "start": 171, + "end": 184, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { - "start": 157, - "end": 168, + "start": 173, + "end": 184, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { - "start": 157, - "end": 168, + "start": 173, + "end": 184, "ctxt": 0 }, "value": "HTMLElement", @@ -76,8 +76,8 @@ { "type": "ExportNamedDeclaration", "span": { - "start": 222, - "end": 231, + "start": 254, + "end": 263, "ctxt": 0 }, "specifiers": [], @@ -88,8 +88,8 @@ { "type": "VariableDeclaration", "span": { - "start": 232, - "end": 264, + "start": 264, + "end": 296, "ctxt": 0 }, "kind": "const", @@ -98,15 +98,15 @@ { "type": "VariableDeclarator", "span": { - "start": 246, - "end": 263, + "start": 278, + "end": 295, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 246, - "end": 250, + "start": 278, + "end": 282, "ctxt": 0 }, "value": "elem", @@ -114,22 +114,22 @@ "typeAnnotation": { "type": "TsTypeAnnotation", "span": { - "start": 250, - "end": 263, + "start": 282, + "end": 295, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { - "start": 252, - "end": 263, + "start": 284, + "end": 295, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { - "start": 252, - "end": 263, + "start": 284, + "end": 295, "ctxt": 0 }, "value": "HTMLElement", diff --git a/crates/swc_ecma_parser/tests/tsc/libReferenceDeclarationEmit.ts b/crates/swc_ecma_parser/tests/tsc/libReferenceDeclarationEmit.ts index 02e4cd895ae1..6c2d061d31d1 100644 --- a/crates/swc_ecma_parser/tests/tsc/libReferenceDeclarationEmit.ts +++ b/crates/swc_ecma_parser/tests/tsc/libReferenceDeclarationEmit.ts @@ -3,10 +3,10 @@ // @lib: esnext // @declaration: true // @filename: file1.ts -/// +/// export declare const elem: HTMLElement; // @filename: file2.ts -/// +/// export {} declare const elem: HTMLElement; \ No newline at end of file diff --git a/crates/swc_ecma_parser/tests/tsc/libReferenceDeclarationEmitBundle.json b/crates/swc_ecma_parser/tests/tsc/libReferenceDeclarationEmitBundle.json index 530508e646a6..9cccdcabc8ee 100644 --- a/crates/swc_ecma_parser/tests/tsc/libReferenceDeclarationEmitBundle.json +++ b/crates/swc_ecma_parser/tests/tsc/libReferenceDeclarationEmitBundle.json @@ -1,23 +1,23 @@ { "type": "Module", "span": { - "start": 148, - "end": 282, + "start": 164, + "end": 314, "ctxt": 0 }, "body": [ { "type": "ExportDeclaration", "span": { - "start": 148, - "end": 187, + "start": 164, + "end": 203, "ctxt": 0 }, "declaration": { "type": "VariableDeclaration", "span": { - "start": 155, - "end": 187, + "start": 171, + "end": 203, "ctxt": 0 }, "kind": "const", @@ -26,15 +26,15 @@ { "type": "VariableDeclarator", "span": { - "start": 169, - "end": 186, + "start": 185, + "end": 202, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 169, - "end": 173, + "start": 185, + "end": 189, "ctxt": 0 }, "value": "elem", @@ -42,22 +42,22 @@ "typeAnnotation": { "type": "TsTypeAnnotation", "span": { - "start": 173, - "end": 186, + "start": 189, + "end": 202, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { - "start": 175, - "end": 186, + "start": 191, + "end": 202, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { - "start": 175, - "end": 186, + "start": 191, + "end": 202, "ctxt": 0 }, "value": "HTMLElement", @@ -76,8 +76,8 @@ { "type": "ExportNamedDeclaration", "span": { - "start": 240, - "end": 249, + "start": 272, + "end": 281, "ctxt": 0 }, "specifiers": [], @@ -88,8 +88,8 @@ { "type": "VariableDeclaration", "span": { - "start": 250, - "end": 282, + "start": 282, + "end": 314, "ctxt": 0 }, "kind": "const", @@ -98,15 +98,15 @@ { "type": "VariableDeclarator", "span": { - "start": 264, - "end": 281, + "start": 296, + "end": 313, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 264, - "end": 268, + "start": 296, + "end": 300, "ctxt": 0 }, "value": "elem", @@ -114,22 +114,22 @@ "typeAnnotation": { "type": "TsTypeAnnotation", "span": { - "start": 268, - "end": 281, + "start": 300, + "end": 313, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { - "start": 270, - "end": 281, + "start": 302, + "end": 313, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { - "start": 270, - "end": 281, + "start": 302, + "end": 313, "ctxt": 0 }, "value": "HTMLElement", diff --git a/crates/swc_ecma_parser/tests/tsc/libReferenceDeclarationEmitBundle.ts b/crates/swc_ecma_parser/tests/tsc/libReferenceDeclarationEmitBundle.ts index aa4c09477e0f..b5180a980207 100644 --- a/crates/swc_ecma_parser/tests/tsc/libReferenceDeclarationEmitBundle.ts +++ b/crates/swc_ecma_parser/tests/tsc/libReferenceDeclarationEmitBundle.ts @@ -4,10 +4,10 @@ // @declaration: true // @outFile: bundle.js // @filename: file1.ts -/// +/// export declare const elem: HTMLElement; // @filename: file2.ts -/// +/// export {} declare const elem: HTMLElement; \ No newline at end of file diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypesGenericTuples2.json b/crates/swc_ecma_parser/tests/tsc/mappedTypesGenericTuples2.json new file mode 100644 index 000000000000..801694baaaa8 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypesGenericTuples2.json @@ -0,0 +1,503 @@ +{ + "type": "Script", + "span": { + "start": 109, + "end": 319, + "ctxt": 0 + }, + "body": [ + { + "type": "FunctionDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 126, + "end": 130, + "ctxt": 0 + }, + "value": "getT", + "optional": false + }, + "declare": true, + "params": [], + "decorators": [], + "span": { + "start": 109, + "end": 139, + "ctxt": 0 + }, + "body": null, + "generator": false, + "async": false, + "typeParameters": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 130, + "end": 133, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 131, + "end": 132, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 131, + "end": 132, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "in": false, + "out": false, + "const": false, + "constraint": null, + "default": null + } + ] + }, + "returnType": { + "type": "TsTypeAnnotation", + "span": { + "start": 135, + "end": 138, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 137, + "end": 138, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 137, + "end": 138, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + } + }, + { + "type": "ExpressionStatement", + "span": { + "start": 141, + "end": 319, + "ctxt": 0 + }, + "expression": { + "type": "CallExpression", + "span": { + "start": 141, + "end": 318, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 141, + "end": 191, + "ctxt": 0 + }, + "object": { + "type": "CallExpression", + "span": { + "start": 141, + "end": 186, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 141, + "end": 152, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 141, + "end": 148, + "ctxt": 0 + }, + "value": "Promise", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 149, + "end": 152, + "ctxt": 0 + }, + "value": "all", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "ArrayExpression", + "span": { + "start": 153, + "end": 185, + "ctxt": 0 + }, + "elements": [ + { + "spread": null, + "expression": { + "type": "CallExpression", + "span": { + "start": 154, + "end": 168, + "ctxt": 0 + }, + "callee": { + "type": "Identifier", + "span": { + "start": 154, + "end": 158, + "ctxt": 0 + }, + "value": "getT", + "optional": false + }, + "arguments": [], + "typeArguments": { + "type": "TsTypeParameterInstantiation", + "span": { + "start": 158, + "end": 166, + "ctxt": 0 + }, + "params": [ + { + "type": "TsKeywordType", + "span": { + "start": 159, + "end": 165, + "ctxt": 0 + }, + "kind": "string" + } + ] + } + } + }, + { + "spread": { + "start": 170, + "end": 173, + "ctxt": 0 + }, + "expression": { + "type": "CallExpression", + "span": { + "start": 173, + "end": 184, + "ctxt": 0 + }, + "callee": { + "type": "Identifier", + "span": { + "start": 173, + "end": 177, + "ctxt": 0 + }, + "value": "getT", + "optional": false + }, + "arguments": [], + "typeArguments": { + "type": "TsTypeParameterInstantiation", + "span": { + "start": 177, + "end": 182, + "ctxt": 0 + }, + "params": [ + { + "type": "TsKeywordType", + "span": { + "start": 178, + "end": 181, + "ctxt": 0 + }, + "kind": "any" + } + ] + } + } + } + ] + } + } + ], + "typeArguments": null + }, + "property": { + "type": "Identifier", + "span": { + "start": 187, + "end": 191, + "ctxt": 0 + }, + "value": "then", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "ArrowFunctionExpression", + "span": { + "start": 192, + "end": 317, + "ctxt": 0 + }, + "params": [ + { + "type": "Identifier", + "span": { + "start": 193, + "end": 199, + "ctxt": 0 + }, + "value": "result", + "optional": false, + "typeAnnotation": null + } + ], + "body": { + "type": "BlockStatement", + "span": { + "start": 204, + "end": 317, + "ctxt": 0 + }, + "stmts": [ + { + "type": "VariableDeclaration", + "span": { + "start": 208, + "end": 231, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 214, + "end": 230, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 214, + "end": 218, + "ctxt": 0 + }, + "value": "head", + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "MemberExpression", + "span": { + "start": 221, + "end": 230, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 221, + "end": 227, + "ctxt": 0 + }, + "value": "result", + "optional": false + }, + "property": { + "type": "Computed", + "span": { + "start": 227, + "end": 230, + "ctxt": 0 + }, + "expression": { + "type": "NumericLiteral", + "span": { + "start": 228, + "end": 229, + "ctxt": 0 + }, + "value": 0.0, + "raw": "0" + } + } + }, + "definite": false + } + ] + }, + { + "type": "VariableDeclaration", + "span": { + "start": 244, + "end": 273, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 250, + "end": 272, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 250, + "end": 254, + "ctxt": 0 + }, + "value": "tail", + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "CallExpression", + "span": { + "start": 257, + "end": 272, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 257, + "end": 269, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 257, + "end": 263, + "ctxt": 0 + }, + "value": "result", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 264, + "end": 269, + "ctxt": 0 + }, + "value": "slice", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "NumericLiteral", + "span": { + "start": 270, + "end": 271, + "ctxt": 0 + }, + "value": 1.0, + "raw": "1" + } + } + ], + "typeArguments": null + }, + "definite": false + } + ] + }, + { + "type": "ExpressionStatement", + "span": { + "start": 285, + "end": 309, + "ctxt": 0 + }, + "expression": { + "type": "TsSatisfiesExpression", + "span": { + "start": 285, + "end": 308, + "ctxt": 0 + }, + "expression": { + "type": "Identifier", + "span": { + "start": 285, + "end": 289, + "ctxt": 0 + }, + "value": "tail", + "optional": false + }, + "typeAnnotation": { + "type": "TsArrayType", + "span": { + "start": 300, + "end": 308, + "ctxt": 0 + }, + "elemType": { + "type": "TsKeywordType", + "span": { + "start": 300, + "end": 306, + "ctxt": 0 + }, + "kind": "string" + } + } + } + } + ] + }, + "async": false, + "generator": false, + "typeParameters": null, + "returnType": null + } + } + ], + "typeArguments": null + } + } + ], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypesGenericTuples2.ts b/crates/swc_ecma_parser/tests/tsc/mappedTypesGenericTuples2.ts new file mode 100644 index 000000000000..6d411634bc4b --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypesGenericTuples2.ts @@ -0,0 +1,13 @@ +// @strict: true +// @lib: esnext +// @noEmit: true + +// https://github.com/microsoft/TypeScript/issues/57389 + +declare function getT(): T; + +Promise.all([getT(), ...getT()]).then((result) => { + const head = result[0]; // string + const tail = result.slice(1); // any[] + tail satisfies string[]; // ok +}); diff --git a/crates/swc_ecma_parser/tests/tsc/methodsReturningThis.json b/crates/swc_ecma_parser/tests/tsc/methodsReturningThis.json index 945de32ab850..e569c1569c95 100644 --- a/crates/swc_ecma_parser/tests/tsc/methodsReturningThis.json +++ b/crates/swc_ecma_parser/tests/tsc/methodsReturningThis.json @@ -1,8 +1,8 @@ { "type": "Script", "span": { - "start": 61, - "end": 842, + "start": 65, + "end": 846, "ctxt": 0 }, "body": [ @@ -11,8 +11,8 @@ "identifier": { "type": "Identifier", "span": { - "start": 70, - "end": 75, + "start": 74, + "end": 79, "ctxt": 0 }, "value": "Class", @@ -22,15 +22,15 @@ "params": [], "decorators": [], "span": { - "start": 61, - "end": 81, + "start": 65, + "end": 85, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 78, - "end": 81, + "start": 82, + "end": 85, "ctxt": 0 }, "stmts": [] @@ -43,37 +43,37 @@ { "type": "ExpressionStatement", "span": { - "start": 136, - "end": 208, + "start": 140, + "end": 212, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 136, - "end": 207, + "start": 140, + "end": 211, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 136, - "end": 165, + "start": 140, + "end": 169, "ctxt": 0 }, "object": { "type": "MemberExpression", "span": { - "start": 136, - "end": 151, + "start": 140, + "end": 155, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 136, - "end": 141, + "start": 140, + "end": 145, "ctxt": 0 }, "value": "Class", @@ -82,8 +82,8 @@ "property": { "type": "Identifier", "span": { - "start": 142, - "end": 151, + "start": 146, + "end": 155, "ctxt": 0 }, "value": "prototype", @@ -93,8 +93,8 @@ "property": { "type": "Identifier", "span": { - "start": 152, - "end": 165, + "start": 156, + "end": 169, "ctxt": 0 }, "value": "containsError", @@ -107,45 +107,45 @@ "params": [], "decorators": [], "span": { - "start": 168, - "end": 207, + "start": 172, + "end": 211, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 180, - "end": 207, + "start": 184, + "end": 211, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { - "start": 182, - "end": 205, + "start": 186, + "end": 209, "ctxt": 0 }, "argument": { "type": "MemberExpression", "span": { - "start": 189, - "end": 204, + "start": 193, + "end": 208, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 189, - "end": 193, + "start": 193, + "end": 197, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 194, - "end": 204, + "start": 198, + "end": 208, "ctxt": 0 }, "value": "notPresent", @@ -165,37 +165,37 @@ { "type": "ExpressionStatement", "span": { - "start": 283, - "end": 351, + "start": 287, + "end": 355, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 283, - "end": 350, + "start": 287, + "end": 354, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 283, - "end": 301, + "start": 287, + "end": 305, "ctxt": 0 }, "object": { "type": "MemberExpression", "span": { - "start": 283, - "end": 298, + "start": 287, + "end": 302, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 283, - "end": 288, + "start": 287, + "end": 292, "ctxt": 0 }, "value": "Class", @@ -204,8 +204,8 @@ "property": { "type": "Identifier", "span": { - "start": 289, - "end": 298, + "start": 293, + "end": 302, "ctxt": 0 }, "value": "prototype", @@ -215,8 +215,8 @@ "property": { "type": "Identifier", "span": { - "start": 299, - "end": 301, + "start": 303, + "end": 305, "ctxt": 0 }, "value": "m1", @@ -230,16 +230,16 @@ { "type": "Parameter", "span": { - "start": 314, - "end": 315, + "start": 318, + "end": 319, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 314, - "end": 315, + "start": 318, + "end": 319, "ctxt": 0 }, "value": "a", @@ -250,16 +250,16 @@ { "type": "Parameter", "span": { - "start": 317, - "end": 318, + "start": 321, + "end": 322, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 317, - "end": 318, + "start": 321, + "end": 322, "ctxt": 0 }, "value": "b", @@ -270,16 +270,16 @@ { "type": "Parameter", "span": { - "start": 320, - "end": 321, + "start": 324, + "end": 325, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 320, - "end": 321, + "start": 324, + "end": 325, "ctxt": 0 }, "value": "c", @@ -290,16 +290,16 @@ { "type": "Parameter", "span": { - "start": 323, - "end": 324, + "start": 327, + "end": 328, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 323, - "end": 324, + "start": 327, + "end": 328, "ctxt": 0 }, "value": "d", @@ -310,16 +310,16 @@ { "type": "Parameter", "span": { - "start": 326, - "end": 328, + "start": 330, + "end": 332, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 326, - "end": 328, + "start": 330, + "end": 332, "ctxt": 0 }, "value": "tx", @@ -330,16 +330,16 @@ { "type": "Parameter", "span": { - "start": 330, - "end": 332, + "start": 334, + "end": 336, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 330, - "end": 332, + "start": 334, + "end": 336, "ctxt": 0 }, "value": "ty", @@ -350,30 +350,30 @@ ], "decorators": [], "span": { - "start": 304, - "end": 350, + "start": 308, + "end": 354, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 334, - "end": 350, + "start": 338, + "end": 354, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { - "start": 336, - "end": 348, + "start": 340, + "end": 352, "ctxt": 0 }, "argument": { "type": "ThisExpression", "span": { - "start": 343, - "end": 347, + "start": 347, + "end": 351, "ctxt": 0 } } @@ -390,37 +390,37 @@ { "type": "ExpressionStatement", "span": { - "start": 352, - "end": 406, + "start": 356, + "end": 410, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 352, - "end": 405, + "start": 356, + "end": 409, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 352, - "end": 370, + "start": 356, + "end": 374, "ctxt": 0 }, "object": { "type": "MemberExpression", "span": { - "start": 352, - "end": 367, + "start": 356, + "end": 371, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 352, - "end": 357, + "start": 356, + "end": 361, "ctxt": 0 }, "value": "Class", @@ -429,8 +429,8 @@ "property": { "type": "Identifier", "span": { - "start": 358, - "end": 367, + "start": 362, + "end": 371, "ctxt": 0 }, "value": "prototype", @@ -440,8 +440,8 @@ "property": { "type": "Identifier", "span": { - "start": 368, - "end": 370, + "start": 372, + "end": 374, "ctxt": 0 }, "value": "m2", @@ -455,16 +455,16 @@ { "type": "Parameter", "span": { - "start": 383, - "end": 384, + "start": 387, + "end": 388, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 383, - "end": 384, + "start": 387, + "end": 388, "ctxt": 0 }, "value": "x", @@ -475,16 +475,16 @@ { "type": "Parameter", "span": { - "start": 386, - "end": 387, + "start": 390, + "end": 391, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 386, - "end": 387, + "start": 390, + "end": 391, "ctxt": 0 }, "value": "y", @@ -495,30 +495,30 @@ ], "decorators": [], "span": { - "start": 373, - "end": 405, + "start": 377, + "end": 409, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 389, - "end": 405, + "start": 393, + "end": 409, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { - "start": 391, - "end": 403, + "start": 395, + "end": 407, "ctxt": 0 }, "argument": { "type": "ThisExpression", "span": { - "start": 398, - "end": 402, + "start": 402, + "end": 406, "ctxt": 0 } } @@ -535,37 +535,37 @@ { "type": "ExpressionStatement", "span": { - "start": 407, - "end": 461, + "start": 411, + "end": 465, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 407, - "end": 460, + "start": 411, + "end": 464, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 407, - "end": 425, + "start": 411, + "end": 429, "ctxt": 0 }, "object": { "type": "MemberExpression", "span": { - "start": 407, - "end": 422, + "start": 411, + "end": 426, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 407, - "end": 412, + "start": 411, + "end": 416, "ctxt": 0 }, "value": "Class", @@ -574,8 +574,8 @@ "property": { "type": "Identifier", "span": { - "start": 413, - "end": 422, + "start": 417, + "end": 426, "ctxt": 0 }, "value": "prototype", @@ -585,8 +585,8 @@ "property": { "type": "Identifier", "span": { - "start": 423, - "end": 425, + "start": 427, + "end": 429, "ctxt": 0 }, "value": "m3", @@ -600,16 +600,16 @@ { "type": "Parameter", "span": { - "start": 438, - "end": 439, + "start": 442, + "end": 443, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 438, - "end": 439, + "start": 442, + "end": 443, "ctxt": 0 }, "value": "x", @@ -620,16 +620,16 @@ { "type": "Parameter", "span": { - "start": 441, - "end": 442, + "start": 445, + "end": 446, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 441, - "end": 442, + "start": 445, + "end": 446, "ctxt": 0 }, "value": "y", @@ -640,30 +640,30 @@ ], "decorators": [], "span": { - "start": 428, - "end": 460, + "start": 432, + "end": 464, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 444, - "end": 460, + "start": 448, + "end": 464, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { - "start": 446, - "end": 458, + "start": 450, + "end": 462, "ctxt": 0 }, "argument": { "type": "ThisExpression", "span": { - "start": 453, - "end": 457, + "start": 457, + "end": 461, "ctxt": 0 } } @@ -680,37 +680,37 @@ { "type": "ExpressionStatement", "span": { - "start": 462, - "end": 517, + "start": 466, + "end": 521, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 462, - "end": 516, + "start": 466, + "end": 520, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 462, - "end": 480, + "start": 466, + "end": 484, "ctxt": 0 }, "object": { "type": "MemberExpression", "span": { - "start": 462, - "end": 477, + "start": 466, + "end": 481, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 462, - "end": 467, + "start": 466, + "end": 471, "ctxt": 0 }, "value": "Class", @@ -719,8 +719,8 @@ "property": { "type": "Identifier", "span": { - "start": 468, - "end": 477, + "start": 472, + "end": 481, "ctxt": 0 }, "value": "prototype", @@ -730,8 +730,8 @@ "property": { "type": "Identifier", "span": { - "start": 478, - "end": 480, + "start": 482, + "end": 484, "ctxt": 0 }, "value": "m4", @@ -745,16 +745,16 @@ { "type": "Parameter", "span": { - "start": 493, - "end": 498, + "start": 497, + "end": 502, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 493, - "end": 498, + "start": 497, + "end": 502, "ctxt": 0 }, "value": "angle", @@ -765,30 +765,30 @@ ], "decorators": [], "span": { - "start": 483, - "end": 516, + "start": 487, + "end": 520, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 500, - "end": 516, + "start": 504, + "end": 520, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { - "start": 502, - "end": 514, + "start": 506, + "end": 518, "ctxt": 0 }, "argument": { "type": "ThisExpression", "span": { - "start": 509, - "end": 513, + "start": 513, + "end": 517, "ctxt": 0 } } @@ -805,37 +805,37 @@ { "type": "ExpressionStatement", "span": { - "start": 518, - "end": 574, + "start": 522, + "end": 578, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 518, - "end": 573, + "start": 522, + "end": 577, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 518, - "end": 536, + "start": 522, + "end": 540, "ctxt": 0 }, "object": { "type": "MemberExpression", "span": { - "start": 518, - "end": 533, + "start": 522, + "end": 537, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 518, - "end": 523, + "start": 522, + "end": 527, "ctxt": 0 }, "value": "Class", @@ -844,8 +844,8 @@ "property": { "type": "Identifier", "span": { - "start": 524, - "end": 533, + "start": 528, + "end": 537, "ctxt": 0 }, "value": "prototype", @@ -855,8 +855,8 @@ "property": { "type": "Identifier", "span": { - "start": 534, - "end": 536, + "start": 538, + "end": 540, "ctxt": 0 }, "value": "m5", @@ -870,16 +870,16 @@ { "type": "Parameter", "span": { - "start": 549, - "end": 555, + "start": 553, + "end": 559, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 549, - "end": 555, + "start": 553, + "end": 559, "ctxt": 0 }, "value": "matrix", @@ -890,30 +890,30 @@ ], "decorators": [], "span": { - "start": 539, - "end": 573, + "start": 543, + "end": 577, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 557, - "end": 573, + "start": 561, + "end": 577, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { - "start": 559, - "end": 571, + "start": 563, + "end": 575, "ctxt": 0 }, "argument": { "type": "ThisExpression", "span": { - "start": 566, - "end": 570, + "start": 570, + "end": 574, "ctxt": 0 } } @@ -930,37 +930,37 @@ { "type": "ExpressionStatement", "span": { - "start": 575, - "end": 685, + "start": 579, + "end": 689, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 575, - "end": 684, + "start": 579, + "end": 688, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 575, - "end": 593, + "start": 579, + "end": 597, "ctxt": 0 }, "object": { "type": "MemberExpression", "span": { - "start": 575, - "end": 590, + "start": 579, + "end": 594, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 575, - "end": 580, + "start": 579, + "end": 584, "ctxt": 0 }, "value": "Class", @@ -969,8 +969,8 @@ "property": { "type": "Identifier", "span": { - "start": 581, - "end": 590, + "start": 585, + "end": 594, "ctxt": 0 }, "value": "prototype", @@ -980,8 +980,8 @@ "property": { "type": "Identifier", "span": { - "start": 591, - "end": 593, + "start": 595, + "end": 597, "ctxt": 0 }, "value": "m6", @@ -995,16 +995,16 @@ { "type": "Parameter", "span": { - "start": 606, - "end": 607, + "start": 610, + "end": 611, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 606, - "end": 607, + "start": 610, + "end": 611, "ctxt": 0 }, "value": "x", @@ -1015,16 +1015,16 @@ { "type": "Parameter", "span": { - "start": 609, - "end": 610, + "start": 613, + "end": 614, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 609, - "end": 610, + "start": 613, + "end": 614, "ctxt": 0 }, "value": "y", @@ -1035,16 +1035,16 @@ { "type": "Parameter", "span": { - "start": 612, - "end": 618, + "start": 616, + "end": 622, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 612, - "end": 618, + "start": 616, + "end": 622, "ctxt": 0 }, "value": "pivotX", @@ -1055,16 +1055,16 @@ { "type": "Parameter", "span": { - "start": 620, - "end": 626, + "start": 624, + "end": 630, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 620, - "end": 626, + "start": 624, + "end": 630, "ctxt": 0 }, "value": "pivotY", @@ -1075,16 +1075,16 @@ { "type": "Parameter", "span": { - "start": 628, - "end": 634, + "start": 632, + "end": 638, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 628, - "end": 634, + "start": 632, + "end": 638, "ctxt": 0 }, "value": "scaleX", @@ -1095,16 +1095,16 @@ { "type": "Parameter", "span": { - "start": 636, - "end": 642, + "start": 640, + "end": 646, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 636, - "end": 642, + "start": 640, + "end": 646, "ctxt": 0 }, "value": "scaleY", @@ -1115,16 +1115,16 @@ { "type": "Parameter", "span": { - "start": 644, - "end": 652, + "start": 648, + "end": 656, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 644, - "end": 652, + "start": 648, + "end": 656, "ctxt": 0 }, "value": "rotation", @@ -1135,16 +1135,16 @@ { "type": "Parameter", "span": { - "start": 654, - "end": 659, + "start": 658, + "end": 663, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 654, - "end": 659, + "start": 658, + "end": 663, "ctxt": 0 }, "value": "skewX", @@ -1155,16 +1155,16 @@ { "type": "Parameter", "span": { - "start": 661, - "end": 666, + "start": 665, + "end": 670, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 661, - "end": 666, + "start": 665, + "end": 670, "ctxt": 0 }, "value": "skewY", @@ -1175,30 +1175,30 @@ ], "decorators": [], "span": { - "start": 596, - "end": 684, + "start": 600, + "end": 688, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 668, - "end": 684, + "start": 672, + "end": 688, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { - "start": 670, - "end": 682, + "start": 674, + "end": 686, "ctxt": 0 }, "argument": { "type": "ThisExpression", "span": { - "start": 677, - "end": 681, + "start": 681, + "end": 685, "ctxt": 0 } } @@ -1215,37 +1215,37 @@ { "type": "ExpressionStatement", "span": { - "start": 686, - "end": 741, + "start": 690, + "end": 745, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 686, - "end": 740, + "start": 690, + "end": 744, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 686, - "end": 704, + "start": 690, + "end": 708, "ctxt": 0 }, "object": { "type": "MemberExpression", "span": { - "start": 686, - "end": 701, + "start": 690, + "end": 705, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 686, - "end": 691, + "start": 690, + "end": 695, "ctxt": 0 }, "value": "Class", @@ -1254,8 +1254,8 @@ "property": { "type": "Identifier", "span": { - "start": 692, - "end": 701, + "start": 696, + "end": 705, "ctxt": 0 }, "value": "prototype", @@ -1265,8 +1265,8 @@ "property": { "type": "Identifier", "span": { - "start": 702, - "end": 704, + "start": 706, + "end": 708, "ctxt": 0 }, "value": "m7", @@ -1280,16 +1280,16 @@ { "type": "Parameter", "span": { - "start": 716, - "end": 722, + "start": 720, + "end": 726, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 716, - "end": 722, + "start": 720, + "end": 726, "ctxt": 0 }, "value": "matrix", @@ -1300,30 +1300,30 @@ ], "decorators": [], "span": { - "start": 707, - "end": 740, + "start": 711, + "end": 744, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 724, - "end": 740, + "start": 728, + "end": 744, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { - "start": 726, - "end": 738, + "start": 730, + "end": 742, "ctxt": 0 }, "argument": { "type": "ThisExpression", "span": { - "start": 733, - "end": 737, + "start": 737, + "end": 741, "ctxt": 0 } } @@ -1340,37 +1340,37 @@ { "type": "ExpressionStatement", "span": { - "start": 742, - "end": 791, + "start": 746, + "end": 795, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 742, - "end": 790, + "start": 746, + "end": 794, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 742, - "end": 760, + "start": 746, + "end": 764, "ctxt": 0 }, "object": { "type": "MemberExpression", "span": { - "start": 742, - "end": 757, + "start": 746, + "end": 761, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 742, - "end": 747, + "start": 746, + "end": 751, "ctxt": 0 }, "value": "Class", @@ -1379,8 +1379,8 @@ "property": { "type": "Identifier", "span": { - "start": 748, - "end": 757, + "start": 752, + "end": 761, "ctxt": 0 }, "value": "prototype", @@ -1390,8 +1390,8 @@ "property": { "type": "Identifier", "span": { - "start": 758, - "end": 760, + "start": 762, + "end": 764, "ctxt": 0 }, "value": "m8", @@ -1404,30 +1404,30 @@ "params": [], "decorators": [], "span": { - "start": 763, - "end": 790, + "start": 767, + "end": 794, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 774, - "end": 790, + "start": 778, + "end": 794, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { - "start": 776, - "end": 788, + "start": 780, + "end": 792, "ctxt": 0 }, "argument": { "type": "ThisExpression", "span": { - "start": 783, - "end": 787, + "start": 787, + "end": 791, "ctxt": 0 } } @@ -1444,37 +1444,37 @@ { "type": "ExpressionStatement", "span": { - "start": 792, - "end": 842, + "start": 796, + "end": 846, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 792, - "end": 841, + "start": 796, + "end": 845, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 792, - "end": 810, + "start": 796, + "end": 814, "ctxt": 0 }, "object": { "type": "MemberExpression", "span": { - "start": 792, - "end": 807, + "start": 796, + "end": 811, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 792, - "end": 797, + "start": 796, + "end": 801, "ctxt": 0 }, "value": "Class", @@ -1483,8 +1483,8 @@ "property": { "type": "Identifier", "span": { - "start": 798, - "end": 807, + "start": 802, + "end": 811, "ctxt": 0 }, "value": "prototype", @@ -1494,8 +1494,8 @@ "property": { "type": "Identifier", "span": { - "start": 808, - "end": 810, + "start": 812, + "end": 814, "ctxt": 0 }, "value": "m9", @@ -1508,30 +1508,30 @@ "params": [], "decorators": [], "span": { - "start": 813, - "end": 841, + "start": 817, + "end": 845, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 825, - "end": 841, + "start": 829, + "end": 845, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { - "start": 827, - "end": 839, + "start": 831, + "end": 843, "ctxt": 0 }, "argument": { "type": "ThisExpression", "span": { - "start": 834, - "end": 838, + "start": 838, + "end": 842, "ctxt": 0 } } diff --git a/crates/swc_ecma_parser/tests/tsc/methodsReturningThis.ts b/crates/swc_ecma_parser/tests/tsc/methodsReturningThis.ts index 4c9f0d5cd0b1..521613d9e986 100644 --- a/crates/swc_ecma_parser/tests/tsc/methodsReturningThis.ts +++ b/crates/swc_ecma_parser/tests/tsc/methodsReturningThis.ts @@ -1,5 +1,5 @@ // @filename: input.js -// @out: output.js +// @outFile: output.js // @allowJs: true function Class() { diff --git a/crates/swc_ecma_parser/tests/tsc/multipleDeclarations.json b/crates/swc_ecma_parser/tests/tsc/multipleDeclarations.json index 65bb7c8d7f4d..7c232fed071c 100644 --- a/crates/swc_ecma_parser/tests/tsc/multipleDeclarations.json +++ b/crates/swc_ecma_parser/tests/tsc/multipleDeclarations.json @@ -1,8 +1,8 @@ { "type": "Script", "span": { - "start": 61, - "end": 598, + "start": 65, + "end": 602, "ctxt": 0 }, "body": [ @@ -11,8 +11,8 @@ "identifier": { "type": "Identifier", "span": { - "start": 70, - "end": 71, + "start": 74, + "end": 75, "ctxt": 0 }, "value": "C", @@ -22,53 +22,53 @@ "params": [], "decorators": [], "span": { - "start": 61, - "end": 96, + "start": 65, + "end": 100, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 74, - "end": 96, + "start": 78, + "end": 100, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 80, - "end": 94, + "start": 84, + "end": 98, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 80, - "end": 93, + "start": 84, + "end": 97, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 80, - "end": 86, + "start": 84, + "end": 90, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 80, - "end": 84, + "start": 84, + "end": 88, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 85, - "end": 86, + "start": 89, + "end": 90, "ctxt": 0 }, "value": "m", @@ -78,8 +78,8 @@ "right": { "type": "NullLiteral", "span": { - "start": 89, - "end": 93, + "start": 93, + "end": 97, "ctxt": 0 } } @@ -95,37 +95,37 @@ { "type": "ExpressionStatement", "span": { - "start": 97, - "end": 147, + "start": 101, + "end": 151, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 97, - "end": 147, + "start": 101, + "end": 151, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 97, - "end": 110, + "start": 101, + "end": 114, "ctxt": 0 }, "object": { "type": "MemberExpression", "span": { - "start": 97, - "end": 108, + "start": 101, + "end": 112, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 97, - "end": 98, + "start": 101, + "end": 102, "ctxt": 0 }, "value": "C", @@ -134,8 +134,8 @@ "property": { "type": "Identifier", "span": { - "start": 99, - "end": 108, + "start": 103, + "end": 112, "ctxt": 0 }, "value": "prototype", @@ -145,8 +145,8 @@ "property": { "type": "Identifier", "span": { - "start": 109, - "end": 110, + "start": 113, + "end": 114, "ctxt": 0 }, "value": "m", @@ -159,52 +159,52 @@ "params": [], "decorators": [], "span": { - "start": 113, - "end": 147, + "start": 117, + "end": 151, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 124, - "end": 147, + "start": 128, + "end": 151, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 130, - "end": 145, + "start": 134, + "end": 149, "ctxt": 0 }, "expression": { "type": "CallExpression", "span": { - "start": 130, - "end": 144, + "start": 134, + "end": 148, "ctxt": 0 }, "callee": { "type": "MemberExpression", "span": { - "start": 130, - "end": 142, + "start": 134, + "end": 146, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 130, - "end": 134, + "start": 134, + "end": 138, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 135, - "end": 142, + "start": 139, + "end": 146, "ctxt": 0 }, "value": "nothing", @@ -229,8 +229,8 @@ "identifier": { "type": "Identifier", "span": { - "start": 154, - "end": 155, + "start": 158, + "end": 159, "ctxt": 0 }, "value": "X", @@ -238,8 +238,8 @@ }, "declare": false, "span": { - "start": 148, - "end": 312, + "start": 152, + "end": 316, "ctxt": 0 }, "decorators": [], @@ -247,15 +247,15 @@ { "type": "Constructor", "span": { - "start": 162, - "end": 272, + "start": 166, + "end": 276, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 162, - "end": 173, + "start": 166, + "end": 177, "ctxt": 0 }, "value": "constructor", @@ -265,46 +265,46 @@ "body": { "type": "BlockStatement", "span": { - "start": 176, - "end": 272, + "start": 180, + "end": 276, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 186, - "end": 213, + "start": 190, + "end": 217, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 186, - "end": 212, + "start": 190, + "end": 216, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 186, - "end": 192, + "start": 190, + "end": 196, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 186, - "end": 190, + "start": 190, + "end": 194, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 191, - "end": 192, + "start": 195, + "end": 196, "ctxt": 0 }, "value": "m", @@ -314,37 +314,37 @@ "right": { "type": "CallExpression", "span": { - "start": 195, - "end": 212, + "start": 199, + "end": 216, "ctxt": 0 }, "callee": { "type": "MemberExpression", "span": { - "start": 195, - "end": 206, + "start": 199, + "end": 210, "ctxt": 0 }, "object": { "type": "MemberExpression", "span": { - "start": 195, - "end": 201, + "start": 199, + "end": 205, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 195, - "end": 199, + "start": 199, + "end": 203, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 200, - "end": 201, + "start": 204, + "end": 205, "ctxt": 0 }, "value": "m", @@ -354,8 +354,8 @@ "property": { "type": "Identifier", "span": { - "start": 202, - "end": 206, + "start": 206, + "end": 210, "ctxt": 0 }, "value": "bind", @@ -368,8 +368,8 @@ "expression": { "type": "ThisExpression", "span": { - "start": 207, - "end": 211, + "start": 211, + "end": 215, "ctxt": 0 } } @@ -382,38 +382,38 @@ { "type": "ExpressionStatement", "span": { - "start": 222, - "end": 266, + "start": 226, + "end": 270, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 222, - "end": 265, + "start": 226, + "end": 269, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 222, - "end": 234, + "start": 226, + "end": 238, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 222, - "end": 226, + "start": 226, + "end": 230, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 227, - "end": 234, + "start": 231, + "end": 238, "ctxt": 0 }, "value": "mistake", @@ -423,8 +423,8 @@ "right": { "type": "StringLiteral", "span": { - "start": 237, - "end": 265, + "start": 241, + "end": 269, "ctxt": 0 }, "value": "frankly, complete nonsense", @@ -440,15 +440,15 @@ { "type": "ClassMethod", "span": { - "start": 277, - "end": 288, + "start": 281, + "end": 292, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 277, - "end": 278, + "start": 281, + "end": 282, "ctxt": 0 }, "value": "m", @@ -458,15 +458,15 @@ "params": [], "decorators": [], "span": { - "start": 277, - "end": 288, + "start": 281, + "end": 292, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 281, - "end": 288, + "start": 285, + "end": 292, "ctxt": 0 }, "stmts": [] @@ -486,15 +486,15 @@ { "type": "ClassMethod", "span": { - "start": 293, - "end": 310, + "start": 297, + "end": 314, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 293, - "end": 300, + "start": 297, + "end": 304, "ctxt": 0 }, "value": "mistake", @@ -504,15 +504,15 @@ "params": [], "decorators": [], "span": { - "start": 293, - "end": 310, + "start": 297, + "end": 314, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 303, - "end": 310, + "start": 307, + "end": 314, "ctxt": 0 }, "stmts": [] @@ -539,8 +539,8 @@ { "type": "VariableDeclaration", "span": { - "start": 313, - "end": 329, + "start": 317, + "end": 333, "ctxt": 0 }, "kind": "let", @@ -549,15 +549,15 @@ { "type": "VariableDeclarator", "span": { - "start": 317, - "end": 328, + "start": 321, + "end": 332, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 317, - "end": 318, + "start": 321, + "end": 322, "ctxt": 0 }, "value": "x", @@ -567,15 +567,15 @@ "init": { "type": "NewExpression", "span": { - "start": 321, - "end": 328, + "start": 325, + "end": 332, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { - "start": 325, - "end": 326, + "start": 329, + "end": 330, "ctxt": 0 }, "value": "X", @@ -591,37 +591,37 @@ { "type": "ExpressionStatement", "span": { - "start": 330, - "end": 358, + "start": 334, + "end": 362, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 330, - "end": 357, + "start": 334, + "end": 361, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 330, - "end": 349, + "start": 334, + "end": 353, "ctxt": 0 }, "object": { "type": "MemberExpression", "span": { - "start": 330, - "end": 341, + "start": 334, + "end": 345, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 330, - "end": 331, + "start": 334, + "end": 335, "ctxt": 0 }, "value": "X", @@ -630,8 +630,8 @@ "property": { "type": "Identifier", "span": { - "start": 332, - "end": 341, + "start": 336, + "end": 345, "ctxt": 0 }, "value": "prototype", @@ -641,8 +641,8 @@ "property": { "type": "Identifier", "span": { - "start": 342, - "end": 349, + "start": 346, + "end": 353, "ctxt": 0 }, "value": "mistake", @@ -652,8 +652,8 @@ "right": { "type": "BooleanLiteral", "span": { - "start": 352, - "end": 357, + "start": 356, + "end": 361, "ctxt": 0 }, "value": false @@ -663,29 +663,29 @@ { "type": "ExpressionStatement", "span": { - "start": 359, - "end": 365, + "start": 363, + "end": 369, "ctxt": 0 }, "expression": { "type": "CallExpression", "span": { - "start": 359, - "end": 364, + "start": 363, + "end": 368, "ctxt": 0 }, "callee": { "type": "MemberExpression", "span": { - "start": 359, - "end": 362, + "start": 363, + "end": 366, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 359, - "end": 360, + "start": 363, + "end": 364, "ctxt": 0 }, "value": "x", @@ -694,8 +694,8 @@ "property": { "type": "Identifier", "span": { - "start": 361, - "end": 362, + "start": 365, + "end": 366, "ctxt": 0 }, "value": "m", @@ -709,22 +709,22 @@ { "type": "ExpressionStatement", "span": { - "start": 366, - "end": 376, + "start": 370, + "end": 380, "ctxt": 0 }, "expression": { "type": "MemberExpression", "span": { - "start": 366, - "end": 375, + "start": 370, + "end": 379, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 366, - "end": 367, + "start": 370, + "end": 371, "ctxt": 0 }, "value": "x", @@ -733,8 +733,8 @@ "property": { "type": "Identifier", "span": { - "start": 368, - "end": 375, + "start": 372, + "end": 379, "ctxt": 0 }, "value": "mistake", @@ -747,8 +747,8 @@ "identifier": { "type": "Identifier", "span": { - "start": 383, - "end": 384, + "start": 387, + "end": 388, "ctxt": 0 }, "value": "Y", @@ -756,8 +756,8 @@ }, "declare": false, "span": { - "start": 377, - "end": 533, + "start": 381, + "end": 537, "ctxt": 0 }, "decorators": [], @@ -765,15 +765,15 @@ { "type": "ClassMethod", "span": { - "start": 391, - "end": 408, + "start": 395, + "end": 412, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 391, - "end": 398, + "start": 395, + "end": 402, "ctxt": 0 }, "value": "mistake", @@ -783,15 +783,15 @@ "params": [], "decorators": [], "span": { - "start": 391, - "end": 408, + "start": 395, + "end": 412, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 401, - "end": 408, + "start": 405, + "end": 412, "ctxt": 0 }, "stmts": [] @@ -811,15 +811,15 @@ { "type": "ClassMethod", "span": { - "start": 413, - "end": 424, + "start": 417, + "end": 428, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 413, - "end": 414, + "start": 417, + "end": 418, "ctxt": 0 }, "value": "m", @@ -829,15 +829,15 @@ "params": [], "decorators": [], "span": { - "start": 413, - "end": 424, + "start": 417, + "end": 428, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 417, - "end": 424, + "start": 421, + "end": 428, "ctxt": 0 }, "stmts": [] @@ -857,15 +857,15 @@ { "type": "Constructor", "span": { - "start": 429, - "end": 531, + "start": 433, + "end": 535, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 429, - "end": 440, + "start": 433, + "end": 444, "ctxt": 0 }, "value": "constructor", @@ -875,46 +875,46 @@ "body": { "type": "BlockStatement", "span": { - "start": 443, - "end": 531, + "start": 447, + "end": 535, "ctxt": 0 }, "stmts": [ { "type": "ExpressionStatement", "span": { - "start": 453, - "end": 480, + "start": 457, + "end": 484, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 453, - "end": 479, + "start": 457, + "end": 483, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 453, - "end": 459, + "start": 457, + "end": 463, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 453, - "end": 457, + "start": 457, + "end": 461, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 458, - "end": 459, + "start": 462, + "end": 463, "ctxt": 0 }, "value": "m", @@ -924,37 +924,37 @@ "right": { "type": "CallExpression", "span": { - "start": 462, - "end": 479, + "start": 466, + "end": 483, "ctxt": 0 }, "callee": { "type": "MemberExpression", "span": { - "start": 462, - "end": 473, + "start": 466, + "end": 477, "ctxt": 0 }, "object": { "type": "MemberExpression", "span": { - "start": 462, - "end": 468, + "start": 466, + "end": 472, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 462, - "end": 466, + "start": 466, + "end": 470, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 467, - "end": 468, + "start": 471, + "end": 472, "ctxt": 0 }, "value": "m", @@ -964,8 +964,8 @@ "property": { "type": "Identifier", "span": { - "start": 469, - "end": 473, + "start": 473, + "end": 477, "ctxt": 0 }, "value": "bind", @@ -978,8 +978,8 @@ "expression": { "type": "ThisExpression", "span": { - "start": 474, - "end": 478, + "start": 478, + "end": 482, "ctxt": 0 } } @@ -992,38 +992,38 @@ { "type": "ExpressionStatement", "span": { - "start": 489, - "end": 525, + "start": 493, + "end": 529, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 489, - "end": 524, + "start": 493, + "end": 528, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 489, - "end": 501, + "start": 493, + "end": 505, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 489, - "end": 493, + "start": 493, + "end": 497, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 494, - "end": 501, + "start": 498, + "end": 505, "ctxt": 0 }, "value": "mistake", @@ -1033,8 +1033,8 @@ "right": { "type": "StringLiteral", "span": { - "start": 504, - "end": 524, + "start": 508, + "end": 528, "ctxt": 0 }, "value": "even more nonsense", @@ -1057,37 +1057,37 @@ { "type": "ExpressionStatement", "span": { - "start": 534, - "end": 561, + "start": 538, + "end": 565, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 534, - "end": 560, + "start": 538, + "end": 564, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 534, - "end": 553, + "start": 538, + "end": 557, "ctxt": 0 }, "object": { "type": "MemberExpression", "span": { - "start": 534, - "end": 545, + "start": 538, + "end": 549, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 534, - "end": 535, + "start": 538, + "end": 539, "ctxt": 0 }, "value": "Y", @@ -1096,8 +1096,8 @@ "property": { "type": "Identifier", "span": { - "start": 536, - "end": 545, + "start": 540, + "end": 549, "ctxt": 0 }, "value": "prototype", @@ -1107,8 +1107,8 @@ "property": { "type": "Identifier", "span": { - "start": 546, - "end": 553, + "start": 550, + "end": 557, "ctxt": 0 }, "value": "mistake", @@ -1118,8 +1118,8 @@ "right": { "type": "BooleanLiteral", "span": { - "start": 556, - "end": 560, + "start": 560, + "end": 564, "ctxt": 0 }, "value": true @@ -1129,8 +1129,8 @@ { "type": "VariableDeclaration", "span": { - "start": 562, - "end": 578, + "start": 566, + "end": 582, "ctxt": 0 }, "kind": "let", @@ -1139,15 +1139,15 @@ { "type": "VariableDeclarator", "span": { - "start": 566, - "end": 577, + "start": 570, + "end": 581, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 566, - "end": 567, + "start": 570, + "end": 571, "ctxt": 0 }, "value": "y", @@ -1157,15 +1157,15 @@ "init": { "type": "NewExpression", "span": { - "start": 570, - "end": 577, + "start": 574, + "end": 581, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { - "start": 574, - "end": 575, + "start": 578, + "end": 579, "ctxt": 0 }, "value": "Y", @@ -1181,29 +1181,29 @@ { "type": "ExpressionStatement", "span": { - "start": 579, - "end": 585, + "start": 583, + "end": 589, "ctxt": 0 }, "expression": { "type": "CallExpression", "span": { - "start": 579, - "end": 584, + "start": 583, + "end": 588, "ctxt": 0 }, "callee": { "type": "MemberExpression", "span": { - "start": 579, - "end": 582, + "start": 583, + "end": 586, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 579, - "end": 580, + "start": 583, + "end": 584, "ctxt": 0 }, "value": "y", @@ -1212,8 +1212,8 @@ "property": { "type": "Identifier", "span": { - "start": 581, - "end": 582, + "start": 585, + "end": 586, "ctxt": 0 }, "value": "m", @@ -1227,29 +1227,29 @@ { "type": "ExpressionStatement", "span": { - "start": 586, - "end": 598, + "start": 590, + "end": 602, "ctxt": 0 }, "expression": { "type": "CallExpression", "span": { - "start": 586, - "end": 597, + "start": 590, + "end": 601, "ctxt": 0 }, "callee": { "type": "MemberExpression", "span": { - "start": 586, - "end": 595, + "start": 590, + "end": 599, "ctxt": 0 }, "object": { "type": "Identifier", "span": { - "start": 586, - "end": 587, + "start": 590, + "end": 591, "ctxt": 0 }, "value": "y", @@ -1258,8 +1258,8 @@ "property": { "type": "Identifier", "span": { - "start": 588, - "end": 595, + "start": 592, + "end": 599, "ctxt": 0 }, "value": "mistake", diff --git a/crates/swc_ecma_parser/tests/tsc/multipleDeclarations.ts b/crates/swc_ecma_parser/tests/tsc/multipleDeclarations.ts index ba2e14e11e93..89f1308eaddc 100644 --- a/crates/swc_ecma_parser/tests/tsc/multipleDeclarations.ts +++ b/crates/swc_ecma_parser/tests/tsc/multipleDeclarations.ts @@ -1,5 +1,5 @@ // @filename: input.js -// @out: output.js +// @outFile: output.js // @allowJs: true function C() { this.m = null; diff --git a/crates/swc_ecma_parser/tests/tsc/numberFormatCurrencySign.json b/crates/swc_ecma_parser/tests/tsc/numberFormatCurrencySign.json deleted file mode 100644 index efab4ff2c7d2..000000000000 --- a/crates/swc_ecma_parser/tests/tsc/numberFormatCurrencySign.json +++ /dev/null @@ -1,219 +0,0 @@ -{ - "type": "Script", - "span": { - "start": 53, - "end": 179, - "ctxt": 0 - }, - "body": [ - { - "type": "VariableDeclaration", - "span": { - "start": 53, - "end": 179, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 59, - "end": 178, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 59, - "end": 62, - "ctxt": 0 - }, - "value": "str", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "CallExpression", - "span": { - "start": 65, - "end": 178, - "ctxt": 0 - }, - "callee": { - "type": "MemberExpression", - "span": { - "start": 65, - "end": 170, - "ctxt": 0 - }, - "object": { - "type": "NewExpression", - "span": { - "start": 65, - "end": 163, - "ctxt": 0 - }, - "callee": { - "type": "MemberExpression", - "span": { - "start": 69, - "end": 86, - "ctxt": 0 - }, - "object": { - "type": "Identifier", - "span": { - "start": 69, - "end": 73, - "ctxt": 0 - }, - "value": "Intl", - "optional": false - }, - "property": { - "type": "Identifier", - "span": { - "start": 74, - "end": 86, - "ctxt": 0 - }, - "value": "NumberFormat", - "optional": false - } - }, - "arguments": [ - { - "spread": null, - "expression": { - "type": "StringLiteral", - "span": { - "start": 87, - "end": 94, - "ctxt": 0 - }, - "value": "en-NZ", - "raw": "'en-NZ'" - } - }, - { - "spread": null, - "expression": { - "type": "ObjectExpression", - "span": { - "start": 96, - "end": 162, - "ctxt": 0 - }, - "properties": [ - { - "type": "KeyValueProperty", - "key": { - "type": "Identifier", - "span": { - "start": 98, - "end": 103, - "ctxt": 0 - }, - "value": "style", - "optional": false - }, - "value": { - "type": "StringLiteral", - "span": { - "start": 105, - "end": 115, - "ctxt": 0 - }, - "value": "currency", - "raw": "'currency'" - } - }, - { - "type": "KeyValueProperty", - "key": { - "type": "Identifier", - "span": { - "start": 117, - "end": 125, - "ctxt": 0 - }, - "value": "currency", - "optional": false - }, - "value": { - "type": "StringLiteral", - "span": { - "start": 127, - "end": 132, - "ctxt": 0 - }, - "value": "NZD", - "raw": "'NZD'" - } - }, - { - "type": "KeyValueProperty", - "key": { - "type": "Identifier", - "span": { - "start": 134, - "end": 146, - "ctxt": 0 - }, - "value": "currencySign", - "optional": false - }, - "value": { - "type": "StringLiteral", - "span": { - "start": 148, - "end": 160, - "ctxt": 0 - }, - "value": "accounting", - "raw": "'accounting'" - } - } - ] - } - } - ], - "typeArguments": null - }, - "property": { - "type": "Identifier", - "span": { - "start": 164, - "end": 170, - "ctxt": 0 - }, - "value": "format", - "optional": false - } - }, - "arguments": [ - { - "spread": null, - "expression": { - "type": "NumericLiteral", - "span": { - "start": 171, - "end": 177, - "ctxt": 0 - }, - "value": 999999.0, - "raw": "999999" - } - } - ], - "typeArguments": null - }, - "definite": false - } - ] - } - ], - "interpreter": null -} diff --git a/crates/swc_ecma_parser/tests/tsc/numberFormatCurrencySign.ts b/crates/swc_ecma_parser/tests/tsc/numberFormatCurrencySign.ts deleted file mode 100644 index b7b451150d09..000000000000 --- a/crates/swc_ecma_parser/tests/tsc/numberFormatCurrencySign.ts +++ /dev/null @@ -1,4 +0,0 @@ -// @target: esnext -// @lib: esnext -// @strict: true -const str = new Intl.NumberFormat('en-NZ', { style: 'currency', currency: 'NZD', currencySign: 'accounting' }).format(999999); diff --git a/crates/swc_ecma_parser/tests/tsc/numberFormatCurrencySignResolved.json b/crates/swc_ecma_parser/tests/tsc/numberFormatCurrencySignResolved.json deleted file mode 100644 index 845b1dfce5d3..000000000000 --- a/crates/swc_ecma_parser/tests/tsc/numberFormatCurrencySignResolved.json +++ /dev/null @@ -1,265 +0,0 @@ -{ - "type": "Script", - "span": { - "start": 53, - "end": 229, - "ctxt": 0 - }, - "body": [ - { - "type": "VariableDeclaration", - "span": { - "start": 53, - "end": 186, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 59, - "end": 185, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 59, - "end": 66, - "ctxt": 0 - }, - "value": "options", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "CallExpression", - "span": { - "start": 69, - "end": 185, - "ctxt": 0 - }, - "callee": { - "type": "MemberExpression", - "span": { - "start": 69, - "end": 183, - "ctxt": 0 - }, - "object": { - "type": "NewExpression", - "span": { - "start": 69, - "end": 167, - "ctxt": 0 - }, - "callee": { - "type": "MemberExpression", - "span": { - "start": 73, - "end": 90, - "ctxt": 0 - }, - "object": { - "type": "Identifier", - "span": { - "start": 73, - "end": 77, - "ctxt": 0 - }, - "value": "Intl", - "optional": false - }, - "property": { - "type": "Identifier", - "span": { - "start": 78, - "end": 90, - "ctxt": 0 - }, - "value": "NumberFormat", - "optional": false - } - }, - "arguments": [ - { - "spread": null, - "expression": { - "type": "StringLiteral", - "span": { - "start": 91, - "end": 98, - "ctxt": 0 - }, - "value": "en-NZ", - "raw": "'en-NZ'" - } - }, - { - "spread": null, - "expression": { - "type": "ObjectExpression", - "span": { - "start": 100, - "end": 166, - "ctxt": 0 - }, - "properties": [ - { - "type": "KeyValueProperty", - "key": { - "type": "Identifier", - "span": { - "start": 102, - "end": 107, - "ctxt": 0 - }, - "value": "style", - "optional": false - }, - "value": { - "type": "StringLiteral", - "span": { - "start": 109, - "end": 119, - "ctxt": 0 - }, - "value": "currency", - "raw": "'currency'" - } - }, - { - "type": "KeyValueProperty", - "key": { - "type": "Identifier", - "span": { - "start": 121, - "end": 129, - "ctxt": 0 - }, - "value": "currency", - "optional": false - }, - "value": { - "type": "StringLiteral", - "span": { - "start": 131, - "end": 136, - "ctxt": 0 - }, - "value": "NZD", - "raw": "'NZD'" - } - }, - { - "type": "KeyValueProperty", - "key": { - "type": "Identifier", - "span": { - "start": 138, - "end": 150, - "ctxt": 0 - }, - "value": "currencySign", - "optional": false - }, - "value": { - "type": "StringLiteral", - "span": { - "start": 152, - "end": 164, - "ctxt": 0 - }, - "value": "accounting", - "raw": "'accounting'" - } - } - ] - } - } - ], - "typeArguments": null - }, - "property": { - "type": "Identifier", - "span": { - "start": 168, - "end": 183, - "ctxt": 0 - }, - "value": "resolvedOptions", - "optional": false - } - }, - "arguments": [], - "typeArguments": null - }, - "definite": false - } - ] - }, - { - "type": "VariableDeclaration", - "span": { - "start": 187, - "end": 229, - "ctxt": 0 - }, - "kind": "const", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 193, - "end": 228, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 193, - "end": 205, - "ctxt": 0 - }, - "value": "currencySign", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "MemberExpression", - "span": { - "start": 208, - "end": 228, - "ctxt": 0 - }, - "object": { - "type": "Identifier", - "span": { - "start": 208, - "end": 215, - "ctxt": 0 - }, - "value": "options", - "optional": false - }, - "property": { - "type": "Identifier", - "span": { - "start": 216, - "end": 228, - "ctxt": 0 - }, - "value": "currencySign", - "optional": false - } - }, - "definite": false - } - ] - } - ], - "interpreter": null -} diff --git a/crates/swc_ecma_parser/tests/tsc/numberFormatCurrencySignResolved.ts b/crates/swc_ecma_parser/tests/tsc/numberFormatCurrencySignResolved.ts deleted file mode 100644 index ce6c36fb19fe..000000000000 --- a/crates/swc_ecma_parser/tests/tsc/numberFormatCurrencySignResolved.ts +++ /dev/null @@ -1,5 +0,0 @@ -// @target: esnext -// @lib: esnext -// @strict: true -const options = new Intl.NumberFormat('en-NZ', { style: 'currency', currency: 'NZD', currencySign: 'accounting' }).resolvedOptions(); -const currencySign = options.currencySign; diff --git a/crates/swc_ecma_parser/tests/tsc/objectLiteralErrorsES3.json b/crates/swc_ecma_parser/tests/tsc/objectLiteralErrorsES3.json deleted file mode 100644 index 4eaedf004dc3..000000000000 --- a/crates/swc_ecma_parser/tests/tsc/objectLiteralErrorsES3.json +++ /dev/null @@ -1,309 +0,0 @@ -{ - "type": "Script", - "span": { - "start": 17, - "end": 130, - "ctxt": 0 - }, - "body": [ - { - "type": "VariableDeclaration", - "span": { - "start": 17, - "end": 52, - "ctxt": 0 - }, - "kind": "var", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 21, - "end": 51, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 21, - "end": 23, - "ctxt": 0 - }, - "value": "e1", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "ObjectExpression", - "span": { - "start": 26, - "end": 51, - "ctxt": 0 - }, - "properties": [ - { - "type": "GetterProperty", - "span": { - "start": 28, - "end": 49, - "ctxt": 0 - }, - "key": { - "type": "Identifier", - "span": { - "start": 32, - "end": 33, - "ctxt": 0 - }, - "value": "a", - "optional": false - }, - "typeAnnotation": null, - "body": { - "type": "BlockStatement", - "span": { - "start": 36, - "end": 49, - "ctxt": 0 - }, - "stmts": [ - { - "type": "ReturnStatement", - "span": { - "start": 38, - "end": 47, - "ctxt": 0 - }, - "argument": { - "type": "NumericLiteral", - "span": { - "start": 45, - "end": 46, - "ctxt": 0 - }, - "value": 4.0, - "raw": "4" - } - } - ] - } - } - ] - }, - "definite": false - } - ] - }, - { - "type": "VariableDeclaration", - "span": { - "start": 53, - "end": 79, - "ctxt": 0 - }, - "kind": "var", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 57, - "end": 78, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 57, - "end": 59, - "ctxt": 0 - }, - "value": "e2", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "ObjectExpression", - "span": { - "start": 62, - "end": 78, - "ctxt": 0 - }, - "properties": [ - { - "type": "SetterProperty", - "span": { - "start": 64, - "end": 76, - "ctxt": 0 - }, - "key": { - "type": "Identifier", - "span": { - "start": 68, - "end": 69, - "ctxt": 0 - }, - "value": "a", - "optional": false - }, - "thisParam": null, - "param": { - "type": "Identifier", - "span": { - "start": 70, - "end": 71, - "ctxt": 0 - }, - "value": "n", - "optional": false, - "typeAnnotation": null - }, - "body": { - "type": "BlockStatement", - "span": { - "start": 73, - "end": 76, - "ctxt": 0 - }, - "stmts": [] - } - } - ] - }, - "definite": false - } - ] - }, - { - "type": "VariableDeclaration", - "span": { - "start": 80, - "end": 130, - "ctxt": 0 - }, - "kind": "var", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 84, - "end": 129, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 84, - "end": 86, - "ctxt": 0 - }, - "value": "e3", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "ObjectExpression", - "span": { - "start": 89, - "end": 129, - "ctxt": 0 - }, - "properties": [ - { - "type": "GetterProperty", - "span": { - "start": 91, - "end": 113, - "ctxt": 0 - }, - "key": { - "type": "Identifier", - "span": { - "start": 95, - "end": 96, - "ctxt": 0 - }, - "value": "a", - "optional": false - }, - "typeAnnotation": null, - "body": { - "type": "BlockStatement", - "span": { - "start": 99, - "end": 113, - "ctxt": 0 - }, - "stmts": [ - { - "type": "ReturnStatement", - "span": { - "start": 101, - "end": 111, - "ctxt": 0 - }, - "argument": { - "type": "StringLiteral", - "span": { - "start": 108, - "end": 110, - "ctxt": 0 - }, - "value": "", - "raw": "''" - } - } - ] - } - }, - { - "type": "SetterProperty", - "span": { - "start": 115, - "end": 127, - "ctxt": 0 - }, - "key": { - "type": "Identifier", - "span": { - "start": 119, - "end": 120, - "ctxt": 0 - }, - "value": "a", - "optional": false - }, - "thisParam": null, - "param": { - "type": "Identifier", - "span": { - "start": 121, - "end": 122, - "ctxt": 0 - }, - "value": "n", - "optional": false, - "typeAnnotation": null - }, - "body": { - "type": "BlockStatement", - "span": { - "start": 124, - "end": 127, - "ctxt": 0 - }, - "stmts": [] - } - } - ] - }, - "definite": false - } - ] - } - ], - "interpreter": null -} diff --git a/crates/swc_ecma_parser/tests/tsc/objectLiteralErrorsES3.ts b/crates/swc_ecma_parser/tests/tsc/objectLiteralErrorsES3.ts deleted file mode 100644 index 7477e8b4827d..000000000000 --- a/crates/swc_ecma_parser/tests/tsc/objectLiteralErrorsES3.ts +++ /dev/null @@ -1,6 +0,0 @@ -//@Target: ES3 - -var e1 = { get a() { return 4; } }; -var e2 = { set a(n) { } }; -var e3 = { get a() { return ''; }, set a(n) { } }; - diff --git a/crates/swc_ecma_parser/tests/tsc/parser.numericSeparators.decimal.ts b/crates/swc_ecma_parser/tests/tsc/parser.numericSeparators.decimal.ts index a882fa9ccbd3..b48ec382fa0b 100644 --- a/crates/swc_ecma_parser/tests/tsc/parser.numericSeparators.decimal.ts +++ b/crates/swc_ecma_parser/tests/tsc/parser.numericSeparators.decimal.ts @@ -1,3 +1,4 @@ +// @target: es5, es2020, es2021 1_000_000_000 1.1_00_01 1e1_0 diff --git a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression10.json b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression10.json index 488b3d1fa0e1..d3c5352fa32c 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression10.json +++ b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression10.json @@ -1,30 +1,30 @@ { "type": "Script", "span": { - "start": 98, - "end": 232, + "start": 94, + "end": 228, "ctxt": 0 }, "body": [ { "type": "ExpressionStatement", "span": { - "start": 98, - "end": 125, + "start": 94, + "end": 121, "ctxt": 0 }, "expression": { "type": "ConditionalExpression", "span": { - "start": 98, - "end": 125, + "start": 94, + "end": 121, "ctxt": 0 }, "test": { "type": "Identifier", "span": { - "start": 98, - "end": 99, + "start": 94, + "end": 95, "ctxt": 0 }, "value": "a", @@ -33,16 +33,16 @@ "consequent": { "type": "ArrowFunctionExpression", "span": { - "start": 102, - "end": 116, + "start": 98, + "end": 112, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { - "start": 103, - "end": 104, + "start": 99, + "end": 100, "ctxt": 0 }, "value": "b", @@ -53,15 +53,15 @@ "body": { "type": "ParenthesisExpression", "span": { - "start": 113, - "end": 116, + "start": 109, + "end": 112, "ctxt": 0 }, "expression": { "type": "Identifier", "span": { - "start": 114, - "end": 115, + "start": 110, + "end": 111, "ctxt": 0 }, "value": "d", @@ -74,22 +74,22 @@ "returnType": { "type": "TsTypeAnnotation", "span": { - "start": 106, - "end": 109, + "start": 102, + "end": 105, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { - "start": 108, - "end": 109, + "start": 104, + "end": 105, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { - "start": 108, - "end": 109, + "start": 104, + "end": 105, "ctxt": 0 }, "value": "c", @@ -102,16 +102,16 @@ "alternate": { "type": "ArrowFunctionExpression", "span": { - "start": 119, - "end": 125, + "start": 115, + "end": 121, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { - "start": 119, - "end": 120, + "start": 115, + "end": 116, "ctxt": 0 }, "value": "e", @@ -122,8 +122,8 @@ "body": { "type": "Identifier", "span": { - "start": 124, - "end": 125, + "start": 120, + "end": 121, "ctxt": 0 }, "value": "f", @@ -139,22 +139,22 @@ { "type": "ExpressionStatement", "span": { - "start": 205, - "end": 232, + "start": 201, + "end": 228, "ctxt": 0 }, "expression": { "type": "ConditionalExpression", "span": { - "start": 205, - "end": 232, + "start": 201, + "end": 228, "ctxt": 0 }, "test": { "type": "Identifier", "span": { - "start": 205, - "end": 206, + "start": 201, + "end": 202, "ctxt": 0 }, "value": "a", @@ -163,16 +163,16 @@ "consequent": { "type": "ArrowFunctionExpression", "span": { - "start": 209, - "end": 223, + "start": 205, + "end": 219, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { - "start": 210, - "end": 211, + "start": 206, + "end": 207, "ctxt": 0 }, "value": "b", @@ -183,15 +183,15 @@ "body": { "type": "ParenthesisExpression", "span": { - "start": 220, - "end": 223, + "start": 216, + "end": 219, "ctxt": 0 }, "expression": { "type": "Identifier", "span": { - "start": 221, - "end": 222, + "start": 217, + "end": 218, "ctxt": 0 }, "value": "d", @@ -204,22 +204,22 @@ "returnType": { "type": "TsTypeAnnotation", "span": { - "start": 213, - "end": 216, + "start": 209, + "end": 212, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { - "start": 215, - "end": 216, + "start": 211, + "end": 212, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { - "start": 215, - "end": 216, + "start": 211, + "end": 212, "ctxt": 0 }, "value": "c", @@ -232,16 +232,16 @@ "alternate": { "type": "ArrowFunctionExpression", "span": { - "start": 226, - "end": 232, + "start": 222, + "end": 228, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { - "start": 226, - "end": 227, + "start": 222, + "end": 223, "ctxt": 0 }, "value": "e", @@ -252,8 +252,8 @@ "body": { "type": "Identifier", "span": { - "start": 231, - "end": 232, + "start": 227, + "end": 228, "ctxt": 0 }, "value": "f", diff --git a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression10.ts b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression10.ts index 306e32d7a238..35ed556d9500 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression10.ts +++ b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression10.ts @@ -1,7 +1,7 @@ // @allowjs: true // @checkjs: true // @outdir: out -// @target: es3,es6 +// @target: es6 // @filename: fileJs.js a ? (b) : c => (d) : e => f // Not legal JS; "Unexpected token ':'" at last colon diff --git a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression11.ts b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression11.ts index ef0a245ff5db..be1dbd5fda86 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression11.ts +++ b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression11.ts @@ -1,7 +1,7 @@ // @allowjs: true // @checkjs: true // @outdir: out -// @target: es3,es6 +// @target: es6 // @filename: fileJs.js a ? b ? c : (d) : e => f // Legal JS diff --git a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression12.json b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression12.json index 3185f8c5a4f7..528b1c927759 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression12.json +++ b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression12.json @@ -1,30 +1,30 @@ { "type": "Script", "span": { - "start": 98, - "end": 180, + "start": 94, + "end": 176, "ctxt": 0 }, "body": [ { "type": "ExpressionStatement", "span": { - "start": 98, - "end": 120, + "start": 94, + "end": 116, "ctxt": 0 }, "expression": { "type": "ConditionalExpression", "span": { - "start": 98, - "end": 120, + "start": 94, + "end": 116, "ctxt": 0 }, "test": { "type": "Identifier", "span": { - "start": 98, - "end": 99, + "start": 94, + "end": 95, "ctxt": 0 }, "value": "a", @@ -33,16 +33,16 @@ "consequent": { "type": "ArrowFunctionExpression", "span": { - "start": 102, - "end": 112, + "start": 98, + "end": 108, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { - "start": 103, - "end": 104, + "start": 99, + "end": 100, "ctxt": 0 }, "value": "b", @@ -53,15 +53,15 @@ "body": { "type": "ParenthesisExpression", "span": { - "start": 109, - "end": 112, + "start": 105, + "end": 108, "ctxt": 0 }, "expression": { "type": "Identifier", "span": { - "start": 110, - "end": 111, + "start": 106, + "end": 107, "ctxt": 0 }, "value": "c", @@ -76,16 +76,16 @@ "alternate": { "type": "ArrowFunctionExpression", "span": { - "start": 114, - "end": 120, + "start": 110, + "end": 116, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { - "start": 114, - "end": 115, + "start": 110, + "end": 111, "ctxt": 0 }, "value": "d", @@ -96,8 +96,8 @@ "body": { "type": "Identifier", "span": { - "start": 119, - "end": 120, + "start": 115, + "end": 116, "ctxt": 0 }, "value": "e", @@ -113,22 +113,22 @@ { "type": "ExpressionStatement", "span": { - "start": 158, - "end": 180, + "start": 154, + "end": 176, "ctxt": 0 }, "expression": { "type": "ConditionalExpression", "span": { - "start": 158, - "end": 180, + "start": 154, + "end": 176, "ctxt": 0 }, "test": { "type": "Identifier", "span": { - "start": 158, - "end": 159, + "start": 154, + "end": 155, "ctxt": 0 }, "value": "a", @@ -137,16 +137,16 @@ "consequent": { "type": "ArrowFunctionExpression", "span": { - "start": 162, - "end": 172, + "start": 158, + "end": 168, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { - "start": 163, - "end": 164, + "start": 159, + "end": 160, "ctxt": 0 }, "value": "b", @@ -157,15 +157,15 @@ "body": { "type": "ParenthesisExpression", "span": { - "start": 169, - "end": 172, + "start": 165, + "end": 168, "ctxt": 0 }, "expression": { "type": "Identifier", "span": { - "start": 170, - "end": 171, + "start": 166, + "end": 167, "ctxt": 0 }, "value": "c", @@ -180,16 +180,16 @@ "alternate": { "type": "ArrowFunctionExpression", "span": { - "start": 174, - "end": 180, + "start": 170, + "end": 176, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { - "start": 174, - "end": 175, + "start": 170, + "end": 171, "ctxt": 0 }, "value": "d", @@ -200,8 +200,8 @@ "body": { "type": "Identifier", "span": { - "start": 179, - "end": 180, + "start": 175, + "end": 176, "ctxt": 0 }, "value": "e", diff --git a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression12.ts b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression12.ts index 9d75874c0555..d76b73f550ef 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression12.ts +++ b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression12.ts @@ -1,7 +1,7 @@ // @allowjs: true // @checkjs: true // @outdir: out -// @target: es3,es6 +// @target: es6 // @filename: fileJs.js a ? (b) => (c): d => e // Legal JS diff --git a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression13.json b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression13.json index 8d302acddecb..841b7b1131ed 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression13.json +++ b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression13.json @@ -1,30 +1,30 @@ { "type": "Script", "span": { - "start": 98, - "end": 242, + "start": 94, + "end": 238, "ctxt": 0 }, "body": [ { "type": "ExpressionStatement", "span": { - "start": 98, - "end": 130, + "start": 94, + "end": 126, "ctxt": 0 }, "expression": { "type": "ConditionalExpression", "span": { - "start": 98, - "end": 129, + "start": 94, + "end": 125, "ctxt": 0 }, "test": { "type": "Identifier", "span": { - "start": 98, - "end": 99, + "start": 94, + "end": 95, "ctxt": 0 }, "value": "a", @@ -33,23 +33,23 @@ "consequent": { "type": "ArrowFunctionExpression", "span": { - "start": 102, - "end": 111, + "start": 98, + "end": 107, "ctxt": 0 }, "params": [], "body": { "type": "CallExpression", "span": { - "start": 108, - "end": 111, + "start": 104, + "end": 107, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { - "start": 108, - "end": 109, + "start": 104, + "end": 105, "ctxt": 0 }, "value": "a", @@ -66,16 +66,16 @@ "alternate": { "type": "ArrowFunctionExpression", "span": { - "start": 114, - "end": 129, + "start": 110, + "end": 125, "ctxt": 0 }, "params": [], "body": { "type": "NullLiteral", "span": { - "start": 125, - "end": 129, + "start": 121, + "end": 125, "ctxt": 0 } }, @@ -85,15 +85,15 @@ "returnType": { "type": "TsTypeAnnotation", "span": { - "start": 116, - "end": 121, + "start": 112, + "end": 117, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { - "start": 118, - "end": 121, + "start": 114, + "end": 117, "ctxt": 0 }, "kind": "any" @@ -105,22 +105,22 @@ { "type": "ExpressionStatement", "span": { - "start": 210, - "end": 242, + "start": 206, + "end": 238, "ctxt": 0 }, "expression": { "type": "ConditionalExpression", "span": { - "start": 210, - "end": 241, + "start": 206, + "end": 237, "ctxt": 0 }, "test": { "type": "Identifier", "span": { - "start": 210, - "end": 211, + "start": 206, + "end": 207, "ctxt": 0 }, "value": "a", @@ -129,23 +129,23 @@ "consequent": { "type": "ArrowFunctionExpression", "span": { - "start": 214, - "end": 223, + "start": 210, + "end": 219, "ctxt": 0 }, "params": [], "body": { "type": "CallExpression", "span": { - "start": 220, - "end": 223, + "start": 216, + "end": 219, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { - "start": 220, - "end": 221, + "start": 216, + "end": 217, "ctxt": 0 }, "value": "a", @@ -162,16 +162,16 @@ "alternate": { "type": "ArrowFunctionExpression", "span": { - "start": 226, - "end": 241, + "start": 222, + "end": 237, "ctxt": 0 }, "params": [], "body": { "type": "NullLiteral", "span": { - "start": 237, - "end": 241, + "start": 233, + "end": 237, "ctxt": 0 } }, @@ -181,15 +181,15 @@ "returnType": { "type": "TsTypeAnnotation", "span": { - "start": 228, - "end": 233, + "start": 224, + "end": 229, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { - "start": 230, - "end": 233, + "start": 226, + "end": 229, "ctxt": 0 }, "kind": "any" diff --git a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression13.ts b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression13.ts index eb988e3ea803..bfd9c623f710 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression13.ts +++ b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression13.ts @@ -1,7 +1,7 @@ // @allowjs: true // @checkjs: true // @outdir: out -// @target: es3,es6 +// @target: es6 // @filename: fileJs.js a ? () => a() : (): any => null; // Not legal JS; "Unexpected token ')'" at last paren diff --git a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression14.json b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression14.json index 335579af5059..5d500bd9f669 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression14.json +++ b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression14.json @@ -1,37 +1,37 @@ { "type": "Script", "span": { - "start": 98, - "end": 273, + "start": 94, + "end": 269, "ctxt": 0 }, "body": [ { "type": "ExpressionStatement", "span": { - "start": 98, - "end": 145, + "start": 94, + "end": 141, "ctxt": 0 }, "expression": { "type": "ConditionalExpression", "span": { - "start": 98, - "end": 144, + "start": 94, + "end": 140, "ctxt": 0 }, "test": { "type": "CallExpression", "span": { - "start": 98, - "end": 101, + "start": 94, + "end": 97, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { - "start": 98, - "end": 99, + "start": 94, + "end": 95, "ctxt": 0 }, "value": "a", @@ -43,16 +43,16 @@ "consequent": { "type": "ArrowFunctionExpression", "span": { - "start": 104, - "end": 140, + "start": 100, + "end": 136, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { - "start": 105, - "end": 114, + "start": 101, + "end": 110, "ctxt": 0 }, "value": "b", @@ -60,15 +60,15 @@ "typeAnnotation": { "type": "TsTypeAnnotation", "span": { - "start": 106, - "end": 114, + "start": 102, + "end": 110, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { - "start": 108, - "end": 114, + "start": 104, + "end": 110, "ctxt": 0 }, "kind": "number" @@ -78,8 +78,8 @@ { "type": "Identifier", "span": { - "start": 116, - "end": 126, + "start": 112, + "end": 122, "ctxt": 0 }, "value": "c", @@ -87,15 +87,15 @@ "typeAnnotation": { "type": "TsTypeAnnotation", "span": { - "start": 118, - "end": 126, + "start": 114, + "end": 122, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { - "start": 120, - "end": 126, + "start": 116, + "end": 122, "ctxt": 0 }, "kind": "string" @@ -106,15 +106,15 @@ "body": { "type": "CallExpression", "span": { - "start": 137, - "end": 140, + "start": 133, + "end": 136, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { - "start": 137, - "end": 138, + "start": 133, + "end": 134, "ctxt": 0 }, "value": "d", @@ -129,15 +129,15 @@ "returnType": { "type": "TsTypeAnnotation", "span": { - "start": 127, - "end": 133, + "start": 123, + "end": 129, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { - "start": 129, - "end": 133, + "start": 125, + "end": 129, "ctxt": 0 }, "kind": "void" @@ -147,8 +147,8 @@ "alternate": { "type": "Identifier", "span": { - "start": 143, - "end": 144, + "start": 139, + "end": 140, "ctxt": 0 }, "value": "e", @@ -159,29 +159,29 @@ { "type": "ExpressionStatement", "span": { - "start": 226, - "end": 273, + "start": 222, + "end": 269, "ctxt": 0 }, "expression": { "type": "ConditionalExpression", "span": { - "start": 226, - "end": 272, + "start": 222, + "end": 268, "ctxt": 0 }, "test": { "type": "CallExpression", "span": { - "start": 226, - "end": 229, + "start": 222, + "end": 225, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { - "start": 226, - "end": 227, + "start": 222, + "end": 223, "ctxt": 0 }, "value": "a", @@ -193,16 +193,16 @@ "consequent": { "type": "ArrowFunctionExpression", "span": { - "start": 232, - "end": 268, + "start": 228, + "end": 264, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { - "start": 233, - "end": 242, + "start": 229, + "end": 238, "ctxt": 0 }, "value": "b", @@ -210,15 +210,15 @@ "typeAnnotation": { "type": "TsTypeAnnotation", "span": { - "start": 234, - "end": 242, + "start": 230, + "end": 238, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { - "start": 236, - "end": 242, + "start": 232, + "end": 238, "ctxt": 0 }, "kind": "number" @@ -228,8 +228,8 @@ { "type": "Identifier", "span": { - "start": 244, - "end": 254, + "start": 240, + "end": 250, "ctxt": 0 }, "value": "c", @@ -237,15 +237,15 @@ "typeAnnotation": { "type": "TsTypeAnnotation", "span": { - "start": 246, - "end": 254, + "start": 242, + "end": 250, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { - "start": 248, - "end": 254, + "start": 244, + "end": 250, "ctxt": 0 }, "kind": "string" @@ -256,15 +256,15 @@ "body": { "type": "CallExpression", "span": { - "start": 265, - "end": 268, + "start": 261, + "end": 264, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { - "start": 265, - "end": 266, + "start": 261, + "end": 262, "ctxt": 0 }, "value": "d", @@ -279,15 +279,15 @@ "returnType": { "type": "TsTypeAnnotation", "span": { - "start": 255, - "end": 261, + "start": 251, + "end": 257, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { - "start": 257, - "end": 261, + "start": 253, + "end": 257, "ctxt": 0 }, "kind": "void" @@ -297,8 +297,8 @@ "alternate": { "type": "Identifier", "span": { - "start": 271, - "end": 272, + "start": 267, + "end": 268, "ctxt": 0 }, "value": "e", diff --git a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression14.ts b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression14.ts index 7462eaf6558d..e2cf539290ff 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression14.ts +++ b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression14.ts @@ -1,7 +1,7 @@ // @allowjs: true // @checkjs: true // @outdir: out -// @target: es3,es6 +// @target: es6 // @filename: fileJs.js a() ? (b: number, c?: string): void => d() : e; // Not legal JS; "Unexpected token ':'" at first colon diff --git a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression15.json b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression15.json index afd49a392a60..8ed6d17abb16 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression15.json +++ b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression15.json @@ -1,30 +1,30 @@ { "type": "Script", "span": { - "start": 98, - "end": 256, + "start": 94, + "end": 252, "ctxt": 0 }, "body": [ { "type": "ExpressionStatement", "span": { - "start": 98, - "end": 137, + "start": 94, + "end": 133, "ctxt": 0 }, "expression": { "type": "ConditionalExpression", "span": { - "start": 98, - "end": 137, + "start": 94, + "end": 133, "ctxt": 0 }, "test": { "type": "BooleanLiteral", "span": { - "start": 98, - "end": 103, + "start": 94, + "end": 99, "ctxt": 0 }, "value": false @@ -32,16 +32,16 @@ "consequent": { "type": "ArrowFunctionExpression", "span": { - "start": 106, - "end": 130, + "start": 102, + "end": 126, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { - "start": 107, - "end": 112, + "start": 103, + "end": 108, "ctxt": 0 }, "value": "param", @@ -52,8 +52,8 @@ "body": { "type": "Identifier", "span": { - "start": 125, - "end": 130, + "start": 121, + "end": 126, "ctxt": 0 }, "value": "param", @@ -65,15 +65,15 @@ "returnType": { "type": "TsTypeAnnotation", "span": { - "start": 113, - "end": 121, + "start": 109, + "end": 117, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { - "start": 115, - "end": 121, + "start": 111, + "end": 117, "ctxt": 0 }, "kind": "string" @@ -83,8 +83,8 @@ "alternate": { "type": "NullLiteral", "span": { - "start": 133, - "end": 137, + "start": 129, + "end": 133, "ctxt": 0 } } @@ -93,22 +93,22 @@ { "type": "ExpressionStatement", "span": { - "start": 217, - "end": 256, + "start": 213, + "end": 252, "ctxt": 0 }, "expression": { "type": "ConditionalExpression", "span": { - "start": 217, - "end": 256, + "start": 213, + "end": 252, "ctxt": 0 }, "test": { "type": "BooleanLiteral", "span": { - "start": 217, - "end": 222, + "start": 213, + "end": 218, "ctxt": 0 }, "value": false @@ -116,16 +116,16 @@ "consequent": { "type": "ArrowFunctionExpression", "span": { - "start": 225, - "end": 249, + "start": 221, + "end": 245, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { - "start": 226, - "end": 231, + "start": 222, + "end": 227, "ctxt": 0 }, "value": "param", @@ -136,8 +136,8 @@ "body": { "type": "Identifier", "span": { - "start": 244, - "end": 249, + "start": 240, + "end": 245, "ctxt": 0 }, "value": "param", @@ -149,15 +149,15 @@ "returnType": { "type": "TsTypeAnnotation", "span": { - "start": 232, - "end": 240, + "start": 228, + "end": 236, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { - "start": 234, - "end": 240, + "start": 230, + "end": 236, "ctxt": 0 }, "kind": "string" @@ -167,8 +167,8 @@ "alternate": { "type": "NullLiteral", "span": { - "start": 252, - "end": 256, + "start": 248, + "end": 252, "ctxt": 0 } } diff --git a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression15.ts b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression15.ts index b68e10ea31dd..00bf1782bb5a 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression15.ts +++ b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression15.ts @@ -1,7 +1,7 @@ // @allowjs: true // @checkjs: true // @outdir: out -// @target: es3,es6 +// @target: es6 // @filename: fileJs.js false ? (param): string => param : null // Not legal JS; "Unexpected token ':'" at last colon diff --git a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression16.json b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression16.json index 6c256979ed8e..23e5faaa543f 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression16.json +++ b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression16.json @@ -1,30 +1,30 @@ { "type": "Script", "span": { - "start": 98, - "end": 284, + "start": 94, + "end": 280, "ctxt": 0 }, "body": [ { "type": "ExpressionStatement", "span": { - "start": 98, - "end": 151, + "start": 94, + "end": 147, "ctxt": 0 }, "expression": { "type": "ConditionalExpression", "span": { - "start": 98, - "end": 151, + "start": 94, + "end": 147, "ctxt": 0 }, "test": { "type": "BooleanLiteral", "span": { - "start": 98, - "end": 102, + "start": 94, + "end": 98, "ctxt": 0 }, "value": true @@ -32,15 +32,15 @@ "consequent": { "type": "ConditionalExpression", "span": { - "start": 105, - "end": 144, + "start": 101, + "end": 140, "ctxt": 0 }, "test": { "type": "BooleanLiteral", "span": { - "start": 105, - "end": 110, + "start": 101, + "end": 106, "ctxt": 0 }, "value": false @@ -48,16 +48,16 @@ "consequent": { "type": "ArrowFunctionExpression", "span": { - "start": 113, - "end": 137, + "start": 109, + "end": 133, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { - "start": 114, - "end": 119, + "start": 110, + "end": 115, "ctxt": 0 }, "value": "param", @@ -68,8 +68,8 @@ "body": { "type": "Identifier", "span": { - "start": 132, - "end": 137, + "start": 128, + "end": 133, "ctxt": 0 }, "value": "param", @@ -81,15 +81,15 @@ "returnType": { "type": "TsTypeAnnotation", "span": { - "start": 120, - "end": 128, + "start": 116, + "end": 124, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { - "start": 122, - "end": 128, + "start": 118, + "end": 124, "ctxt": 0 }, "kind": "string" @@ -99,8 +99,8 @@ "alternate": { "type": "NullLiteral", "span": { - "start": 140, - "end": 144, + "start": 136, + "end": 140, "ctxt": 0 } } @@ -108,8 +108,8 @@ "alternate": { "type": "NullLiteral", "span": { - "start": 147, - "end": 151, + "start": 143, + "end": 147, "ctxt": 0 } } @@ -118,22 +118,22 @@ { "type": "ExpressionStatement", "span": { - "start": 231, - "end": 284, + "start": 227, + "end": 280, "ctxt": 0 }, "expression": { "type": "ConditionalExpression", "span": { - "start": 231, - "end": 284, + "start": 227, + "end": 280, "ctxt": 0 }, "test": { "type": "BooleanLiteral", "span": { - "start": 231, - "end": 235, + "start": 227, + "end": 231, "ctxt": 0 }, "value": true @@ -141,15 +141,15 @@ "consequent": { "type": "ConditionalExpression", "span": { - "start": 238, - "end": 277, + "start": 234, + "end": 273, "ctxt": 0 }, "test": { "type": "BooleanLiteral", "span": { - "start": 238, - "end": 243, + "start": 234, + "end": 239, "ctxt": 0 }, "value": false @@ -157,16 +157,16 @@ "consequent": { "type": "ArrowFunctionExpression", "span": { - "start": 246, - "end": 270, + "start": 242, + "end": 266, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { - "start": 247, - "end": 252, + "start": 243, + "end": 248, "ctxt": 0 }, "value": "param", @@ -177,8 +177,8 @@ "body": { "type": "Identifier", "span": { - "start": 265, - "end": 270, + "start": 261, + "end": 266, "ctxt": 0 }, "value": "param", @@ -190,15 +190,15 @@ "returnType": { "type": "TsTypeAnnotation", "span": { - "start": 253, - "end": 261, + "start": 249, + "end": 257, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { - "start": 255, - "end": 261, + "start": 251, + "end": 257, "ctxt": 0 }, "kind": "string" @@ -208,8 +208,8 @@ "alternate": { "type": "NullLiteral", "span": { - "start": 273, - "end": 277, + "start": 269, + "end": 273, "ctxt": 0 } } @@ -217,8 +217,8 @@ "alternate": { "type": "NullLiteral", "span": { - "start": 280, - "end": 284, + "start": 276, + "end": 280, "ctxt": 0 } } diff --git a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression16.ts b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression16.ts index c9a1c9b47226..dab1ea06c3b7 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression16.ts +++ b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression16.ts @@ -1,7 +1,7 @@ // @allowjs: true // @checkjs: true // @outdir: out -// @target: es3,es6 +// @target: es6 // @filename: fileJs.js true ? false ? (param): string => param : null : null // Not legal JS; "Unexpected token ':'" at last colon diff --git a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression17.json b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression17.json index 2cb9c1e3ca78..cfc1cf5b9edb 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression17.json +++ b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression17.json @@ -1,30 +1,30 @@ { "type": "Script", "span": { - "start": 98, - "end": 218, + "start": 94, + "end": 214, "ctxt": 0 }, "body": [ { "type": "ExpressionStatement", "span": { - "start": 98, - "end": 118, + "start": 94, + "end": 114, "ctxt": 0 }, "expression": { "type": "ConditionalExpression", "span": { - "start": 98, - "end": 118, + "start": 94, + "end": 114, "ctxt": 0 }, "test": { "type": "Identifier", "span": { - "start": 98, - "end": 99, + "start": 94, + "end": 95, "ctxt": 0 }, "value": "a", @@ -33,8 +33,8 @@ "consequent": { "type": "Identifier", "span": { - "start": 102, - "end": 103, + "start": 98, + "end": 99, "ctxt": 0 }, "value": "b", @@ -43,16 +43,16 @@ "alternate": { "type": "ArrowFunctionExpression", "span": { - "start": 106, - "end": 118, + "start": 102, + "end": 114, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { - "start": 107, - "end": 108, + "start": 103, + "end": 104, "ctxt": 0 }, "value": "c", @@ -63,8 +63,8 @@ "body": { "type": "Identifier", "span": { - "start": 117, - "end": 118, + "start": 113, + "end": 114, "ctxt": 0 }, "value": "e", @@ -76,22 +76,22 @@ "returnType": { "type": "TsTypeAnnotation", "span": { - "start": 110, - "end": 113, + "start": 106, + "end": 109, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { - "start": 112, - "end": 113, + "start": 108, + "end": 109, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { - "start": 112, - "end": 113, + "start": 108, + "end": 109, "ctxt": 0 }, "value": "d", @@ -106,22 +106,22 @@ { "type": "ExpressionStatement", "span": { - "start": 198, - "end": 218, + "start": 194, + "end": 214, "ctxt": 0 }, "expression": { "type": "ConditionalExpression", "span": { - "start": 198, - "end": 218, + "start": 194, + "end": 214, "ctxt": 0 }, "test": { "type": "Identifier", "span": { - "start": 198, - "end": 199, + "start": 194, + "end": 195, "ctxt": 0 }, "value": "a", @@ -130,8 +130,8 @@ "consequent": { "type": "Identifier", "span": { - "start": 202, - "end": 203, + "start": 198, + "end": 199, "ctxt": 0 }, "value": "b", @@ -140,16 +140,16 @@ "alternate": { "type": "ArrowFunctionExpression", "span": { - "start": 206, - "end": 218, + "start": 202, + "end": 214, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { - "start": 207, - "end": 208, + "start": 203, + "end": 204, "ctxt": 0 }, "value": "c", @@ -160,8 +160,8 @@ "body": { "type": "Identifier", "span": { - "start": 217, - "end": 218, + "start": 213, + "end": 214, "ctxt": 0 }, "value": "e", @@ -173,22 +173,22 @@ "returnType": { "type": "TsTypeAnnotation", "span": { - "start": 210, - "end": 213, + "start": 206, + "end": 209, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { - "start": 212, - "end": 213, + "start": 208, + "end": 209, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { - "start": 212, - "end": 213, + "start": 208, + "end": 209, "ctxt": 0 }, "value": "d", diff --git a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression17.ts b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression17.ts index bd0f531b717c..b6675b878a32 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression17.ts +++ b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression17.ts @@ -1,7 +1,7 @@ // @allowjs: true // @checkjs: true // @outdir: out -// @target: es3,es6 +// @target: es6 // @filename: fileJs.js a ? b : (c) : d => e // Not legal JS; "Unexpected token ':'" at last colon diff --git a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression8.json b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression8.json index 32597b17d6fd..8f48887ae296 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression8.json +++ b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression8.json @@ -1,30 +1,30 @@ { "type": "Script", "span": { - "start": 98, - "end": 198, + "start": 94, + "end": 194, "ctxt": 0 }, "body": [ { "type": "ExpressionStatement", "span": { - "start": 98, - "end": 129, + "start": 94, + "end": 125, "ctxt": 0 }, "expression": { "type": "ConditionalExpression", "span": { - "start": 98, - "end": 129, + "start": 94, + "end": 125, "ctxt": 0 }, "test": { "type": "Identifier", "span": { - "start": 98, - "end": 99, + "start": 94, + "end": 95, "ctxt": 0 }, "value": "x", @@ -33,16 +33,16 @@ "consequent": { "type": "ArrowFunctionExpression", "span": { - "start": 102, - "end": 114, + "start": 98, + "end": 110, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { - "start": 102, - "end": 103, + "start": 98, + "end": 99, "ctxt": 0 }, "value": "y", @@ -53,23 +53,23 @@ "body": { "type": "ParenthesisExpression", "span": { - "start": 107, - "end": 114, + "start": 103, + "end": 110, "ctxt": 0 }, "expression": { "type": "ObjectExpression", "span": { - "start": 108, - "end": 113, + "start": 104, + "end": 109, "ctxt": 0 }, "properties": [ { "type": "Identifier", "span": { - "start": 110, - "end": 111, + "start": 106, + "end": 107, "ctxt": 0 }, "value": "y", @@ -86,16 +86,16 @@ "alternate": { "type": "ArrowFunctionExpression", "span": { - "start": 117, - "end": 129, + "start": 113, + "end": 125, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { - "start": 117, - "end": 118, + "start": 113, + "end": 114, "ctxt": 0 }, "value": "z", @@ -106,23 +106,23 @@ "body": { "type": "ParenthesisExpression", "span": { - "start": 122, - "end": 129, + "start": 118, + "end": 125, "ctxt": 0 }, "expression": { "type": "ObjectExpression", "span": { - "start": 123, - "end": 128, + "start": 119, + "end": 124, "ctxt": 0 }, "properties": [ { "type": "Identifier", "span": { - "start": 125, - "end": 126, + "start": 121, + "end": 122, "ctxt": 0 }, "value": "z", @@ -141,22 +141,22 @@ { "type": "ExpressionStatement", "span": { - "start": 167, - "end": 198, + "start": 163, + "end": 194, "ctxt": 0 }, "expression": { "type": "ConditionalExpression", "span": { - "start": 167, - "end": 198, + "start": 163, + "end": 194, "ctxt": 0 }, "test": { "type": "Identifier", "span": { - "start": 167, - "end": 168, + "start": 163, + "end": 164, "ctxt": 0 }, "value": "x", @@ -165,16 +165,16 @@ "consequent": { "type": "ArrowFunctionExpression", "span": { - "start": 171, - "end": 183, + "start": 167, + "end": 179, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { - "start": 171, - "end": 172, + "start": 167, + "end": 168, "ctxt": 0 }, "value": "y", @@ -185,23 +185,23 @@ "body": { "type": "ParenthesisExpression", "span": { - "start": 176, - "end": 183, + "start": 172, + "end": 179, "ctxt": 0 }, "expression": { "type": "ObjectExpression", "span": { - "start": 177, - "end": 182, + "start": 173, + "end": 178, "ctxt": 0 }, "properties": [ { "type": "Identifier", "span": { - "start": 179, - "end": 180, + "start": 175, + "end": 176, "ctxt": 0 }, "value": "y", @@ -218,16 +218,16 @@ "alternate": { "type": "ArrowFunctionExpression", "span": { - "start": 186, - "end": 198, + "start": 182, + "end": 194, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { - "start": 186, - "end": 187, + "start": 182, + "end": 183, "ctxt": 0 }, "value": "z", @@ -238,23 +238,23 @@ "body": { "type": "ParenthesisExpression", "span": { - "start": 191, - "end": 198, + "start": 187, + "end": 194, "ctxt": 0 }, "expression": { "type": "ObjectExpression", "span": { - "start": 192, - "end": 197, + "start": 188, + "end": 193, "ctxt": 0 }, "properties": [ { "type": "Identifier", "span": { - "start": 194, - "end": 195, + "start": 190, + "end": 191, "ctxt": 0 }, "value": "z", diff --git a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression8.ts b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression8.ts index 4a908beffa74..641cb5ac45d5 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression8.ts +++ b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression8.ts @@ -1,7 +1,7 @@ // @allowjs: true // @checkjs: true // @outdir: out -// @target: es3,es6 +// @target: es6 // @filename: fileJs.js x ? y => ({ y }) : z => ({ z }) // Legal JS diff --git a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression9.json b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression9.json index fa35eb686736..3a4b4e88dfd8 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression9.json +++ b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression9.json @@ -1,30 +1,30 @@ { "type": "Script", "span": { - "start": 98, - "end": 168, + "start": 94, + "end": 164, "ctxt": 0 }, "body": [ { "type": "ExpressionStatement", "span": { - "start": 98, - "end": 114, + "start": 94, + "end": 110, "ctxt": 0 }, "expression": { "type": "ConditionalExpression", "span": { - "start": 98, - "end": 114, + "start": 94, + "end": 110, "ctxt": 0 }, "test": { "type": "Identifier", "span": { - "start": 98, - "end": 99, + "start": 94, + "end": 95, "ctxt": 0 }, "value": "b", @@ -33,15 +33,15 @@ "consequent": { "type": "ParenthesisExpression", "span": { - "start": 102, - "end": 105, + "start": 98, + "end": 101, "ctxt": 0 }, "expression": { "type": "Identifier", "span": { - "start": 103, - "end": 104, + "start": 99, + "end": 100, "ctxt": 0 }, "value": "c", @@ -51,16 +51,16 @@ "alternate": { "type": "ArrowFunctionExpression", "span": { - "start": 108, - "end": 114, + "start": 104, + "end": 110, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { - "start": 108, - "end": 109, + "start": 104, + "end": 105, "ctxt": 0 }, "value": "d", @@ -71,8 +71,8 @@ "body": { "type": "Identifier", "span": { - "start": 113, - "end": 114, + "start": 109, + "end": 110, "ctxt": 0 }, "value": "e", @@ -88,22 +88,22 @@ { "type": "ExpressionStatement", "span": { - "start": 152, - "end": 168, + "start": 148, + "end": 164, "ctxt": 0 }, "expression": { "type": "ConditionalExpression", "span": { - "start": 152, - "end": 168, + "start": 148, + "end": 164, "ctxt": 0 }, "test": { "type": "Identifier", "span": { - "start": 152, - "end": 153, + "start": 148, + "end": 149, "ctxt": 0 }, "value": "b", @@ -112,15 +112,15 @@ "consequent": { "type": "ParenthesisExpression", "span": { - "start": 156, - "end": 159, + "start": 152, + "end": 155, "ctxt": 0 }, "expression": { "type": "Identifier", "span": { - "start": 157, - "end": 158, + "start": 153, + "end": 154, "ctxt": 0 }, "value": "c", @@ -130,16 +130,16 @@ "alternate": { "type": "ArrowFunctionExpression", "span": { - "start": 162, - "end": 168, + "start": 158, + "end": 164, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { - "start": 162, - "end": 163, + "start": 158, + "end": 159, "ctxt": 0 }, "value": "d", @@ -150,8 +150,8 @@ "body": { "type": "Identifier", "span": { - "start": 167, - "end": 168, + "start": 163, + "end": 164, "ctxt": 0 }, "value": "e", diff --git a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression9.ts b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression9.ts index 93ebbc25408e..d2dd9733a18f 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression9.ts +++ b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression9.ts @@ -1,7 +1,7 @@ // @allowjs: true // @checkjs: true // @outdir: out -// @target: es3,es6 +// @target: es6 // @filename: fileJs.js b ? (c) : d => e // Legal JS diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameES5Ban.json b/crates/swc_ecma_parser/tests/tsc/privateNameES5Ban.json index c4617fd22e0a..1bb50f37e118 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameES5Ban.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNameES5Ban.json @@ -1,8 +1,8 @@ { "type": "Script", "span": { - "start": 23, - "end": 280, + "start": 18, + "end": 275, "ctxt": 0 }, "body": [ @@ -11,8 +11,8 @@ "identifier": { "type": "Identifier", "span": { - "start": 29, - "end": 30, + "start": 24, + "end": 25, "ctxt": 0 }, "value": "A", @@ -20,8 +20,8 @@ }, "declare": false, "span": { - "start": 23, - "end": 280, + "start": 18, + "end": 275, "ctxt": 0 }, "decorators": [], @@ -29,15 +29,15 @@ { "type": "Constructor", "span": { - "start": 37, - "end": 53, + "start": 32, + "end": 48, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 37, - "end": 48, + "start": 32, + "end": 43, "ctxt": 0 }, "value": "constructor", @@ -47,8 +47,8 @@ "body": { "type": "BlockStatement", "span": { - "start": 51, - "end": 53, + "start": 46, + "end": 48, "ctxt": 0 }, "stmts": [] @@ -59,22 +59,22 @@ { "type": "PrivateProperty", "span": { - "start": 58, - "end": 71, + "start": 53, + "end": 66, "ctxt": 0 }, "key": { "type": "PrivateName", "span": { - "start": 58, - "end": 64, + "start": 53, + "end": 59, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 59, - "end": 64, + "start": 54, + "end": 59, "ctxt": 0 }, "value": "field", @@ -84,8 +84,8 @@ "value": { "type": "NumericLiteral", "span": { - "start": 67, - "end": 70, + "start": 62, + "end": 65, "ctxt": 0 }, "value": 123.0, @@ -103,22 +103,22 @@ { "type": "PrivateMethod", "span": { - "start": 76, - "end": 88, + "start": 71, + "end": 83, "ctxt": 0 }, "key": { "type": "PrivateName", "span": { - "start": 76, - "end": 83, + "start": 71, + "end": 78, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 77, - "end": 83, + "start": 72, + "end": 78, "ctxt": 0 }, "value": "method", @@ -129,15 +129,15 @@ "params": [], "decorators": [], "span": { - "start": 76, - "end": 88, + "start": 71, + "end": 83, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 86, - "end": 88, + "start": 81, + "end": 83, "ctxt": 0 }, "stmts": [] @@ -157,22 +157,22 @@ { "type": "PrivateProperty", "span": { - "start": 93, - "end": 124, + "start": 88, + "end": 119, "ctxt": 0 }, "key": { "type": "PrivateName", "span": { - "start": 100, - "end": 107, + "start": 95, + "end": 102, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 101, - "end": 107, + "start": 96, + "end": 102, "ctxt": 0 }, "value": "sField", @@ -182,8 +182,8 @@ "value": { "type": "StringLiteral", "span": { - "start": 110, - "end": 123, + "start": 105, + "end": 118, "ctxt": 0 }, "value": "hello world", @@ -201,22 +201,22 @@ { "type": "PrivateMethod", "span": { - "start": 129, - "end": 149, + "start": 124, + "end": 144, "ctxt": 0 }, "key": { "type": "PrivateName", "span": { - "start": 136, - "end": 144, + "start": 131, + "end": 139, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 137, - "end": 144, + "start": 132, + "end": 139, "ctxt": 0 }, "value": "sMethod", @@ -227,15 +227,15 @@ "params": [], "decorators": [], "span": { - "start": 129, - "end": 149, + "start": 124, + "end": 144, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 147, - "end": 149, + "start": 142, + "end": 144, "ctxt": 0 }, "stmts": [] @@ -255,22 +255,22 @@ { "type": "PrivateMethod", "span": { - "start": 154, - "end": 179, + "start": 149, + "end": 174, "ctxt": 0 }, "key": { "type": "PrivateName", "span": { - "start": 158, - "end": 162, + "start": 153, + "end": 157, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 159, - "end": 162, + "start": 154, + "end": 157, "ctxt": 0 }, "value": "acc", @@ -281,30 +281,30 @@ "params": [], "decorators": [], "span": { - "start": 154, - "end": 179, + "start": 149, + "end": 174, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 165, - "end": 179, + "start": 160, + "end": 174, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { - "start": 167, - "end": 177, + "start": 162, + "end": 172, "ctxt": 0 }, "argument": { "type": "StringLiteral", "span": { - "start": 174, - "end": 176, + "start": 169, + "end": 171, "ctxt": 0 }, "value": "", @@ -328,22 +328,22 @@ { "type": "PrivateMethod", "span": { - "start": 184, - "end": 206, + "start": 179, + "end": 201, "ctxt": 0 }, "key": { "type": "PrivateName", "span": { - "start": 188, - "end": 192, + "start": 183, + "end": 187, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 189, - "end": 192, + "start": 184, + "end": 187, "ctxt": 0 }, "value": "acc", @@ -355,16 +355,16 @@ { "type": "Parameter", "span": { - "start": 193, - "end": 202, + "start": 188, + "end": 197, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 193, - "end": 202, + "start": 188, + "end": 197, "ctxt": 0 }, "value": "x", @@ -372,15 +372,15 @@ "typeAnnotation": { "type": "TsTypeAnnotation", "span": { - "start": 194, - "end": 202, + "start": 189, + "end": 197, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { - "start": 196, - "end": 202, + "start": 191, + "end": 197, "ctxt": 0 }, "kind": "string" @@ -391,15 +391,15 @@ ], "decorators": [], "span": { - "start": 184, - "end": 206, + "start": 179, + "end": 201, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 204, - "end": 206, + "start": 199, + "end": 201, "ctxt": 0 }, "stmts": [] @@ -419,22 +419,22 @@ { "type": "PrivateMethod", "span": { - "start": 211, - "end": 243, + "start": 206, + "end": 238, "ctxt": 0 }, "key": { "type": "PrivateName", "span": { - "start": 222, - "end": 227, + "start": 217, + "end": 222, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 223, - "end": 227, + "start": 218, + "end": 222, "ctxt": 0 }, "value": "sAcc", @@ -445,30 +445,30 @@ "params": [], "decorators": [], "span": { - "start": 211, - "end": 243, + "start": 206, + "end": 238, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 230, - "end": 243, + "start": 225, + "end": 238, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { - "start": 232, - "end": 241, + "start": 227, + "end": 236, "ctxt": 0 }, "argument": { "type": "NumericLiteral", "span": { - "start": 239, - "end": 240, + "start": 234, + "end": 235, "ctxt": 0 }, "value": 0.0, @@ -492,22 +492,22 @@ { "type": "PrivateMethod", "span": { - "start": 248, - "end": 278, + "start": 243, + "end": 273, "ctxt": 0 }, "key": { "type": "PrivateName", "span": { - "start": 259, - "end": 264, + "start": 254, + "end": 259, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 260, - "end": 264, + "start": 255, + "end": 259, "ctxt": 0 }, "value": "sAcc", @@ -519,16 +519,16 @@ { "type": "Parameter", "span": { - "start": 265, - "end": 274, + "start": 260, + "end": 269, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { - "start": 265, - "end": 274, + "start": 260, + "end": 269, "ctxt": 0 }, "value": "x", @@ -536,15 +536,15 @@ "typeAnnotation": { "type": "TsTypeAnnotation", "span": { - "start": 266, - "end": 274, + "start": 261, + "end": 269, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { - "start": 268, - "end": 274, + "start": 263, + "end": 269, "ctxt": 0 }, "kind": "number" @@ -555,15 +555,15 @@ ], "decorators": [], "span": { - "start": 248, - "end": 278, + "start": 243, + "end": 273, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { - "start": 276, - "end": 278, + "start": 271, + "end": 273, "ctxt": 0 }, "stmts": [] diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameES5Ban.ts b/crates/swc_ecma_parser/tests/tsc/privateNameES5Ban.ts index 169351c9822a..0d5ec7a66499 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameES5Ban.ts +++ b/crates/swc_ecma_parser/tests/tsc/privateNameES5Ban.ts @@ -1,4 +1,4 @@ -// @target: es5, es3 +// @target: es5 class A { constructor() {} diff --git a/crates/swc_ecma_parser/tests/tsc/spreadNonObject1.json b/crates/swc_ecma_parser/tests/tsc/spreadNonObject1.json new file mode 100644 index 000000000000..c83051576ddd --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/spreadNonObject1.json @@ -0,0 +1,364 @@ +{ + "type": "Script", + "span": { + "start": 93, + "end": 204, + "ctxt": 0 + }, + "body": [ + { + "type": "TsTypeAliasDeclaration", + "span": { + "start": 93, + "end": 114, + "ctxt": 0 + }, + "declare": false, + "id": { + "type": "Identifier", + "span": { + "start": 98, + "end": 99, + "ctxt": 0 + }, + "value": "S", + "optional": false + }, + "typeParams": null, + "typeAnnotation": { + "type": "TsLiteralType", + "span": { + "start": 102, + "end": 113, + "ctxt": 0 + }, + "literal": { + "type": "TemplateLiteral", + "span": { + "start": 102, + "end": 113, + "ctxt": 0 + }, + "types": [ + { + "type": "TsKeywordType", + "span": { + "start": 105, + "end": 111, + "ctxt": 0 + }, + "kind": "number" + } + ], + "quasis": [ + { + "type": "TemplateElement", + "span": { + "start": 103, + "end": 103, + "ctxt": 0 + }, + "tail": false, + "cooked": "", + "raw": "" + }, + { + "type": "TemplateElement", + "span": { + "start": 112, + "end": 112, + "ctxt": 0 + }, + "tail": true, + "cooked": "", + "raw": "" + } + ] + } + } + }, + { + "type": "VariableDeclaration", + "span": { + "start": 115, + "end": 204, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 121, + "end": 203, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 121, + "end": 122, + "ctxt": 0 + }, + "value": "b", + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "ObjectExpression", + "span": { + "start": 125, + "end": 203, + "ctxt": 0 + }, + "properties": [ + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 129, + "end": 130, + "ctxt": 0 + }, + "value": "c", + "optional": false + }, + "value": { + "type": "CallExpression", + "span": { + "start": 132, + "end": 200, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 132, + "end": 150, + "ctxt": 0 + }, + "object": { + "type": "ParenthesisExpression", + "span": { + "start": 132, + "end": 146, + "ctxt": 0 + }, + "expression": { + "type": "TsAsExpression", + "span": { + "start": 133, + "end": 145, + "ctxt": 0 + }, + "expression": { + "type": "ArrayExpression", + "span": { + "start": 133, + "end": 138, + "ctxt": 0 + }, + "elements": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 134, + "end": 137, + "ctxt": 0 + }, + "value": "4", + "raw": "\"4\"" + } + } + ] + }, + "typeAnnotation": { + "type": "TsArrayType", + "span": { + "start": 142, + "end": 145, + "ctxt": 0 + }, + "elemType": { + "type": "TsTypeReference", + "span": { + "start": 142, + "end": 143, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 142, + "end": 143, + "ctxt": 0 + }, + "value": "S", + "optional": false + }, + "typeParams": null + } + } + } + }, + "property": { + "type": "Identifier", + "span": { + "start": 147, + "end": 150, + "ctxt": 0 + }, + "value": "map", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "FunctionExpression", + "identifier": null, + "params": [ + { + "type": "Parameter", + "span": { + "start": 161, + "end": 162, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 161, + "end": 162, + "ctxt": 0 + }, + "value": "s", + "optional": false, + "typeAnnotation": null + } + } + ], + "decorators": [], + "span": { + "start": 151, + "end": 199, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 164, + "end": 199, + "ctxt": 0 + }, + "stmts": [ + { + "type": "VariableDeclaration", + "span": { + "start": 170, + "end": 195, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 176, + "end": 194, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 176, + "end": 177, + "ctxt": 0 + }, + "value": "a", + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "ObjectExpression", + "span": { + "start": 180, + "end": 194, + "ctxt": 0 + }, + "properties": [ + { + "type": "SpreadElement", + "spread": { + "start": 182, + "end": 185, + "ctxt": 0 + }, + "arguments": { + "type": "Identifier", + "span": { + "start": 185, + "end": 186, + "ctxt": 0 + }, + "value": "s", + "optional": false + } + }, + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 188, + "end": 189, + "ctxt": 0 + }, + "value": "y", + "optional": false + }, + "value": { + "type": "NumericLiteral", + "span": { + "start": 191, + "end": 192, + "ctxt": 0 + }, + "value": 6.0, + "raw": "6" + } + } + ] + }, + "definite": false + } + ] + } + ] + }, + "generator": false, + "async": false, + "typeParameters": null, + "returnType": null + } + } + ], + "typeArguments": null + } + } + ] + }, + "definite": false + } + ] + } + ], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/tsc/spreadNonObject1.ts b/crates/swc_ecma_parser/tests/tsc/spreadNonObject1.ts new file mode 100644 index 000000000000..17eb5fd2e521 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/spreadNonObject1.ts @@ -0,0 +1,11 @@ +// @strict: true +// @noEmit: true + +// https://github.com/microsoft/TypeScript/issues/45493 + +type S = `${number}`; +const b = { + c: (["4"] as S[]).map(function (s) { + const a = { ...s, y: 6 }; + }), +}; diff --git a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes5.json b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes5.json new file mode 100644 index 000000000000..a6606fe6a20d --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes5.json @@ -0,0 +1,1472 @@ +{ + "type": "Script", + "span": { + "start": 111, + "end": 502, + "ctxt": 0 + }, + "body": [ + { + "type": "TsInterfaceDeclaration", + "span": { + "start": 111, + "end": 152, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 121, + "end": 128, + "ctxt": 0 + }, + "value": "TypeMap", + "optional": false + }, + "declare": false, + "typeParams": null, + "extends": [], + "body": { + "type": "TsInterfaceBody", + "span": { + "start": 129, + "end": 152, + "ctxt": 0 + }, + "body": [ + { + "type": "TsPropertySignature", + "span": { + "start": 133, + "end": 140, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "Identifier", + "span": { + "start": 133, + "end": 134, + "ctxt": 0 + }, + "value": "a", + "optional": false + }, + "computed": false, + "optional": false, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 134, + "end": 139, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsLiteralType", + "span": { + "start": 136, + "end": 139, + "ctxt": 0 + }, + "literal": { + "type": "StringLiteral", + "span": { + "start": 136, + "end": 139, + "ctxt": 0 + }, + "value": "A", + "raw": "\"A\"" + } + } + }, + "typeParams": null + }, + { + "type": "TsPropertySignature", + "span": { + "start": 143, + "end": 150, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "Identifier", + "span": { + "start": 143, + "end": 144, + "ctxt": 0 + }, + "value": "b", + "optional": false + }, + "computed": false, + "optional": false, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 144, + "end": 149, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsLiteralType", + "span": { + "start": 146, + "end": 149, + "ctxt": 0 + }, + "literal": { + "type": "StringLiteral", + "span": { + "start": 146, + "end": 149, + "ctxt": 0 + }, + "value": "B", + "raw": "\"B\"" + } + } + }, + "typeParams": null + } + ] + } + }, + { + "type": "VariableDeclaration", + "span": { + "start": 153, + "end": 220, + "ctxt": 0 + }, + "kind": "const", + "declare": true, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 167, + "end": 219, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 167, + "end": 168, + "ctxt": 0 + }, + "value": "f", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 168, + "end": 219, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsFunctionType", + "span": { + "start": 170, + "end": 219, + "ctxt": 0 + }, + "params": [ + { + "type": "Identifier", + "span": { + "start": 193, + "end": 203, + "ctxt": 0 + }, + "value": "x", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 194, + "end": 203, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsLiteralType", + "span": { + "start": 196, + "end": 203, + "ctxt": 0 + }, + "literal": { + "type": "TemplateLiteral", + "span": { + "start": 196, + "end": 203, + "ctxt": 0 + }, + "types": [ + { + "type": "TsTypeReference", + "span": { + "start": 199, + "end": 201, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 199, + "end": 201, + "ctxt": 0 + }, + "value": "T0", + "optional": false + }, + "typeParams": null + } + ], + "quasis": [ + { + "type": "TemplateElement", + "span": { + "start": 197, + "end": 197, + "ctxt": 0 + }, + "tail": false, + "cooked": "", + "raw": "" + }, + { + "type": "TemplateElement", + "span": { + "start": 202, + "end": 202, + "ctxt": 0 + }, + "tail": true, + "cooked": "", + "raw": "" + } + ] + } + } + } + } + ], + "typeParams": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 170, + "end": 192, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 171, + "end": 191, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 171, + "end": 173, + "ctxt": 0 + }, + "value": "T0", + "optional": false + }, + "in": false, + "out": false, + "const": false, + "constraint": { + "type": "TsUnionType", + "span": { + "start": 182, + "end": 191, + "ctxt": 0 + }, + "types": [ + { + "type": "TsLiteralType", + "span": { + "start": 182, + "end": 185, + "ctxt": 0 + }, + "literal": { + "type": "StringLiteral", + "span": { + "start": 182, + "end": 185, + "ctxt": 0 + }, + "value": "a", + "raw": "\"a\"" + } + }, + { + "type": "TsLiteralType", + "span": { + "start": 188, + "end": 191, + "ctxt": 0 + }, + "literal": { + "type": "StringLiteral", + "span": { + "start": 188, + "end": 191, + "ctxt": 0 + }, + "value": "b", + "raw": "\"b\"" + } + } + ] + }, + "default": null + } + ] + }, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 205, + "end": 219, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsIndexedAccessType", + "span": { + "start": 208, + "end": 219, + "ctxt": 0 + }, + "readonly": false, + "objectType": { + "type": "TsTypeReference", + "span": { + "start": 208, + "end": 215, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 208, + "end": 215, + "ctxt": 0 + }, + "value": "TypeMap", + "optional": false + }, + "typeParams": null + }, + "indexType": { + "type": "TsTypeReference", + "span": { + "start": 216, + "end": 218, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 216, + "end": 218, + "ctxt": 0 + }, + "value": "T0", + "optional": false + }, + "typeParams": null + } + } + } + } + } + }, + "init": null, + "definite": false + } + ] + }, + { + "type": "TsTypeAliasDeclaration", + "span": { + "start": 221, + "end": 281, + "ctxt": 0 + }, + "declare": false, + "id": { + "type": "Identifier", + "span": { + "start": 226, + "end": 228, + "ctxt": 0 + }, + "value": "F1", + "optional": false + }, + "typeParams": null, + "typeAnnotation": { + "type": "TsFunctionType", + "span": { + "start": 231, + "end": 280, + "ctxt": 0 + }, + "params": [ + { + "type": "Identifier", + "span": { + "start": 254, + "end": 264, + "ctxt": 0 + }, + "value": "x", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 255, + "end": 264, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsLiteralType", + "span": { + "start": 257, + "end": 264, + "ctxt": 0 + }, + "literal": { + "type": "TemplateLiteral", + "span": { + "start": 257, + "end": 264, + "ctxt": 0 + }, + "types": [ + { + "type": "TsTypeReference", + "span": { + "start": 260, + "end": 262, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 260, + "end": 262, + "ctxt": 0 + }, + "value": "T1", + "optional": false + }, + "typeParams": null + } + ], + "quasis": [ + { + "type": "TemplateElement", + "span": { + "start": 258, + "end": 258, + "ctxt": 0 + }, + "tail": false, + "cooked": "", + "raw": "" + }, + { + "type": "TemplateElement", + "span": { + "start": 263, + "end": 263, + "ctxt": 0 + }, + "tail": true, + "cooked": "", + "raw": "" + } + ] + } + } + } + } + ], + "typeParams": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 231, + "end": 253, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 232, + "end": 252, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 232, + "end": 234, + "ctxt": 0 + }, + "value": "T1", + "optional": false + }, + "in": false, + "out": false, + "const": false, + "constraint": { + "type": "TsUnionType", + "span": { + "start": 243, + "end": 252, + "ctxt": 0 + }, + "types": [ + { + "type": "TsLiteralType", + "span": { + "start": 243, + "end": 246, + "ctxt": 0 + }, + "literal": { + "type": "StringLiteral", + "span": { + "start": 243, + "end": 246, + "ctxt": 0 + }, + "value": "a", + "raw": "\"a\"" + } + }, + { + "type": "TsLiteralType", + "span": { + "start": 249, + "end": 252, + "ctxt": 0 + }, + "literal": { + "type": "StringLiteral", + "span": { + "start": 249, + "end": 252, + "ctxt": 0 + }, + "value": "b", + "raw": "\"b\"" + } + } + ] + }, + "default": null + } + ] + }, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 266, + "end": 280, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsIndexedAccessType", + "span": { + "start": 269, + "end": 280, + "ctxt": 0 + }, + "readonly": false, + "objectType": { + "type": "TsTypeReference", + "span": { + "start": 269, + "end": 276, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 269, + "end": 276, + "ctxt": 0 + }, + "value": "TypeMap", + "optional": false + }, + "typeParams": null + }, + "indexType": { + "type": "TsTypeReference", + "span": { + "start": 277, + "end": 279, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 277, + "end": 279, + "ctxt": 0 + }, + "value": "T1", + "optional": false + }, + "typeParams": null + } + } + } + } + }, + { + "type": "VariableDeclaration", + "span": { + "start": 282, + "end": 299, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 288, + "end": 298, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 288, + "end": 290, + "ctxt": 0 + }, + "value": "f1", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 290, + "end": 294, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 292, + "end": 294, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 292, + "end": 294, + "ctxt": 0 + }, + "value": "F1", + "optional": false + }, + "typeParams": null + } + } + }, + "init": { + "type": "Identifier", + "span": { + "start": 297, + "end": 298, + "ctxt": 0 + }, + "value": "f", + "optional": false + }, + "definite": false + } + ] + }, + { + "type": "TsTypeAliasDeclaration", + "span": { + "start": 301, + "end": 365, + "ctxt": 0 + }, + "declare": false, + "id": { + "type": "Identifier", + "span": { + "start": 306, + "end": 308, + "ctxt": 0 + }, + "value": "F2", + "optional": false + }, + "typeParams": null, + "typeAnnotation": { + "type": "TsFunctionType", + "span": { + "start": 311, + "end": 365, + "ctxt": 0 + }, + "params": [ + { + "type": "Identifier", + "span": { + "start": 334, + "end": 344, + "ctxt": 0 + }, + "value": "x", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 335, + "end": 344, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsLiteralType", + "span": { + "start": 337, + "end": 344, + "ctxt": 0 + }, + "literal": { + "type": "TemplateLiteral", + "span": { + "start": 337, + "end": 344, + "ctxt": 0 + }, + "types": [ + { + "type": "TsTypeReference", + "span": { + "start": 340, + "end": 342, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 340, + "end": 342, + "ctxt": 0 + }, + "value": "T2", + "optional": false + }, + "typeParams": null + } + ], + "quasis": [ + { + "type": "TemplateElement", + "span": { + "start": 338, + "end": 338, + "ctxt": 0 + }, + "tail": false, + "cooked": "", + "raw": "" + }, + { + "type": "TemplateElement", + "span": { + "start": 343, + "end": 343, + "ctxt": 0 + }, + "tail": true, + "cooked": "", + "raw": "" + } + ] + } + } + } + } + ], + "typeParams": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 311, + "end": 333, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 312, + "end": 332, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 312, + "end": 314, + "ctxt": 0 + }, + "value": "T2", + "optional": false + }, + "in": false, + "out": false, + "const": false, + "constraint": { + "type": "TsUnionType", + "span": { + "start": 323, + "end": 332, + "ctxt": 0 + }, + "types": [ + { + "type": "TsLiteralType", + "span": { + "start": 323, + "end": 326, + "ctxt": 0 + }, + "literal": { + "type": "StringLiteral", + "span": { + "start": 323, + "end": 326, + "ctxt": 0 + }, + "value": "a", + "raw": "'a'" + } + }, + { + "type": "TsLiteralType", + "span": { + "start": 329, + "end": 332, + "ctxt": 0 + }, + "literal": { + "type": "StringLiteral", + "span": { + "start": 329, + "end": 332, + "ctxt": 0 + }, + "value": "b", + "raw": "'b'" + } + } + ] + }, + "default": null + } + ] + }, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 346, + "end": 365, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsIndexedAccessType", + "span": { + "start": 349, + "end": 365, + "ctxt": 0 + }, + "readonly": false, + "objectType": { + "type": "TsTypeReference", + "span": { + "start": 349, + "end": 356, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 349, + "end": 356, + "ctxt": 0 + }, + "value": "TypeMap", + "optional": false + }, + "typeParams": null + }, + "indexType": { + "type": "TsLiteralType", + "span": { + "start": 357, + "end": 364, + "ctxt": 0 + }, + "literal": { + "type": "TemplateLiteral", + "span": { + "start": 357, + "end": 364, + "ctxt": 0 + }, + "types": [ + { + "type": "TsTypeReference", + "span": { + "start": 360, + "end": 362, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 360, + "end": 362, + "ctxt": 0 + }, + "value": "T2", + "optional": false + }, + "typeParams": null + } + ], + "quasis": [ + { + "type": "TemplateElement", + "span": { + "start": 358, + "end": 358, + "ctxt": 0 + }, + "tail": false, + "cooked": "", + "raw": "" + }, + { + "type": "TemplateElement", + "span": { + "start": 363, + "end": 363, + "ctxt": 0 + }, + "tail": true, + "cooked": "", + "raw": "" + } + ] + } + } + } + } + } + }, + { + "type": "VariableDeclaration", + "span": { + "start": 366, + "end": 382, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 372, + "end": 382, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 372, + "end": 374, + "ctxt": 0 + }, + "value": "f2", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 374, + "end": 378, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 376, + "end": 378, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 376, + "end": 378, + "ctxt": 0 + }, + "value": "F2", + "optional": false + }, + "typeParams": null + } + } + }, + "init": { + "type": "Identifier", + "span": { + "start": 381, + "end": 382, + "ctxt": 0 + }, + "value": "f", + "optional": false + }, + "definite": false + } + ] + }, + { + "type": "FunctionDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 393, + "end": 395, + "ctxt": 0 + }, + "value": "f3", + "optional": false + }, + "declare": false, + "params": [ + { + "type": "Parameter", + "span": { + "start": 418, + "end": 423, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 418, + "end": 423, + "ctxt": 0 + }, + "value": "x", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 419, + "end": 423, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 421, + "end": 423, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 421, + "end": 423, + "ctxt": 0 + }, + "value": "T3", + "optional": false + }, + "typeParams": null + } + } + } + } + ], + "decorators": [], + "span": { + "start": 384, + "end": 502, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 425, + "end": 502, + "ctxt": 0 + }, + "stmts": [ + { + "type": "VariableDeclaration", + "span": { + "start": 431, + "end": 455, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 437, + "end": 455, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 437, + "end": 442, + "ctxt": 0 + }, + "value": "test1", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 442, + "end": 451, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsLiteralType", + "span": { + "start": 444, + "end": 451, + "ctxt": 0 + }, + "literal": { + "type": "TemplateLiteral", + "span": { + "start": 444, + "end": 451, + "ctxt": 0 + }, + "types": [ + { + "type": "TsTypeReference", + "span": { + "start": 447, + "end": 449, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 447, + "end": 449, + "ctxt": 0 + }, + "value": "T3", + "optional": false + }, + "typeParams": null + } + ], + "quasis": [ + { + "type": "TemplateElement", + "span": { + "start": 445, + "end": 445, + "ctxt": 0 + }, + "tail": false, + "cooked": "", + "raw": "" + }, + { + "type": "TemplateElement", + "span": { + "start": 450, + "end": 450, + "ctxt": 0 + }, + "tail": true, + "cooked": "", + "raw": "" + } + ] + } + } + } + }, + "init": { + "type": "Identifier", + "span": { + "start": 454, + "end": 455, + "ctxt": 0 + }, + "value": "x", + "optional": false + }, + "definite": false + } + ] + }, + { + "type": "VariableDeclaration", + "span": { + "start": 464, + "end": 496, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 470, + "end": 495, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 470, + "end": 475, + "ctxt": 0 + }, + "value": "test2", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 475, + "end": 479, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 477, + "end": 479, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 477, + "end": 479, + "ctxt": 0 + }, + "value": "T3", + "optional": false + }, + "typeParams": null + } + } + }, + "init": { + "type": "TsAsExpression", + "span": { + "start": 482, + "end": 495, + "ctxt": 0 + }, + "expression": { + "type": "StringLiteral", + "span": { + "start": 482, + "end": 484, + "ctxt": 0 + }, + "value": "", + "raw": "\"\"" + }, + "typeAnnotation": { + "type": "TsLiteralType", + "span": { + "start": 488, + "end": 495, + "ctxt": 0 + }, + "literal": { + "type": "TemplateLiteral", + "span": { + "start": 488, + "end": 495, + "ctxt": 0 + }, + "types": [ + { + "type": "TsTypeReference", + "span": { + "start": 491, + "end": 493, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 491, + "end": 493, + "ctxt": 0 + }, + "value": "T3", + "optional": false + }, + "typeParams": null + } + ], + "quasis": [ + { + "type": "TemplateElement", + "span": { + "start": 489, + "end": 489, + "ctxt": 0 + }, + "tail": false, + "cooked": "", + "raw": "" + }, + { + "type": "TemplateElement", + "span": { + "start": 494, + "end": 494, + "ctxt": 0 + }, + "tail": true, + "cooked": "", + "raw": "" + } + ] + } + } + }, + "definite": false + } + ] + } + ] + }, + "generator": false, + "async": false, + "typeParameters": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 395, + "end": 417, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 396, + "end": 416, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 396, + "end": 398, + "ctxt": 0 + }, + "value": "T3", + "optional": false + }, + "in": false, + "out": false, + "const": false, + "constraint": { + "type": "TsUnionType", + "span": { + "start": 407, + "end": 416, + "ctxt": 0 + }, + "types": [ + { + "type": "TsLiteralType", + "span": { + "start": 407, + "end": 410, + "ctxt": 0 + }, + "literal": { + "type": "StringLiteral", + "span": { + "start": 407, + "end": 410, + "ctxt": 0 + }, + "value": "a", + "raw": "\"a\"" + } + }, + { + "type": "TsLiteralType", + "span": { + "start": 413, + "end": 416, + "ctxt": 0 + }, + "literal": { + "type": "StringLiteral", + "span": { + "start": 413, + "end": 416, + "ctxt": 0 + }, + "value": "b", + "raw": "\"b\"" + } + } + ] + }, + "default": null + } + ] + }, + "returnType": null + } + ], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes5.ts b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes5.ts new file mode 100644 index 000000000000..ae1c32078f9b --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes5.ts @@ -0,0 +1,19 @@ +// @strict: true +// @target: esnext +// @noEmit: true + +// https://github.com/microsoft/TypeScript/issues/55364 +interface TypeMap { + a: "A"; + b: "B"; +} +declare const f: (x: `${T0}`) => TypeMap[T0]; +type F1 = (x: `${T1}`) => TypeMap[T1]; +const f1: F1 = f; +type F2 = (x: `${T2}`) => TypeMap[`${T2}`] +const f2: F2 = f + +function f3(x: T3) { + const test1: `${T3}` = x + const test2: T3 = "" as `${T3}`; +} diff --git a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes6.json b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes6.json new file mode 100644 index 000000000000..a8f9300cfca9 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes6.json @@ -0,0 +1,1042 @@ +{ + "type": "Script", + "span": { + "start": 112, + "end": 485, + "ctxt": 0 + }, + "body": [ + { + "type": "TsTypeAliasDeclaration", + "span": { + "start": 112, + "end": 166, + "ctxt": 0 + }, + "declare": false, + "id": { + "type": "Identifier", + "span": { + "start": 117, + "end": 125, + "ctxt": 0 + }, + "value": "Registry", + "optional": false + }, + "typeParams": null, + "typeAnnotation": { + "type": "TsTypeLiteral", + "span": { + "start": 128, + "end": 165, + "ctxt": 0 + }, + "members": [ + { + "type": "TsPropertySignature", + "span": { + "start": 132, + "end": 146, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "Identifier", + "span": { + "start": 132, + "end": 133, + "ctxt": 0 + }, + "value": "a", + "optional": false + }, + "computed": false, + "optional": false, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 133, + "end": 145, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeLiteral", + "span": { + "start": 135, + "end": 145, + "ctxt": 0 + }, + "members": [ + { + "type": "TsPropertySignature", + "span": { + "start": 137, + "end": 143, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "Identifier", + "span": { + "start": 137, + "end": 139, + "ctxt": 0 + }, + "value": "a1", + "optional": false + }, + "computed": false, + "optional": false, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 139, + "end": 143, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeLiteral", + "span": { + "start": 141, + "end": 143, + "ctxt": 0 + }, + "members": [] + } + }, + "typeParams": null + } + ] + } + }, + "typeParams": null + }, + { + "type": "TsPropertySignature", + "span": { + "start": 149, + "end": 163, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "Identifier", + "span": { + "start": 149, + "end": 150, + "ctxt": 0 + }, + "value": "b", + "optional": false + }, + "computed": false, + "optional": false, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 150, + "end": 162, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeLiteral", + "span": { + "start": 152, + "end": 162, + "ctxt": 0 + }, + "members": [ + { + "type": "TsPropertySignature", + "span": { + "start": 154, + "end": 160, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "Identifier", + "span": { + "start": 154, + "end": 156, + "ctxt": 0 + }, + "value": "b1", + "optional": false + }, + "computed": false, + "optional": false, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 156, + "end": 160, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeLiteral", + "span": { + "start": 158, + "end": 160, + "ctxt": 0 + }, + "members": [] + } + }, + "typeParams": null + } + ] + } + }, + "typeParams": null + } + ] + } + }, + { + "type": "TsTypeAliasDeclaration", + "span": { + "start": 168, + "end": 201, + "ctxt": 0 + }, + "declare": false, + "id": { + "type": "Identifier", + "span": { + "start": 173, + "end": 178, + "ctxt": 0 + }, + "value": "Keyof", + "optional": false + }, + "typeParams": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 178, + "end": 181, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 179, + "end": 180, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 179, + "end": 180, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "in": false, + "out": false, + "const": false, + "constraint": null, + "default": null + } + ] + }, + "typeAnnotation": { + "type": "TsIntersectionType", + "span": { + "start": 184, + "end": 200, + "ctxt": 0 + }, + "types": [ + { + "type": "TsTypeOperator", + "span": { + "start": 184, + "end": 191, + "ctxt": 0 + }, + "op": "keyof", + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 190, + "end": 191, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 190, + "end": 191, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + }, + { + "type": "TsKeywordType", + "span": { + "start": 194, + "end": 200, + "ctxt": 0 + }, + "kind": "string" + } + ] + } + }, + { + "type": "FunctionDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 220, + "end": 222, + "ctxt": 0 + }, + "value": "f1", + "optional": false + }, + "declare": true, + "params": [ + { + "type": "Parameter", + "span": { + "start": 299, + "end": 329, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 299, + "end": 329, + "ctxt": 0 + }, + "value": "eventPath", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 308, + "end": 329, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsLiteralType", + "span": { + "start": 310, + "end": 329, + "ctxt": 0 + }, + "literal": { + "type": "TemplateLiteral", + "span": { + "start": 310, + "end": 329, + "ctxt": 0 + }, + "types": [ + { + "type": "TsTypeReference", + "span": { + "start": 313, + "end": 318, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 313, + "end": 318, + "ctxt": 0 + }, + "value": "Scope", + "optional": false + }, + "typeParams": null + }, + { + "type": "TsTypeReference", + "span": { + "start": 322, + "end": 327, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 322, + "end": 327, + "ctxt": 0 + }, + "value": "Event", + "optional": false + }, + "typeParams": null + } + ], + "quasis": [ + { + "type": "TemplateElement", + "span": { + "start": 311, + "end": 311, + "ctxt": 0 + }, + "tail": false, + "cooked": "", + "raw": "" + }, + { + "type": "TemplateElement", + "span": { + "start": 319, + "end": 320, + "ctxt": 0 + }, + "tail": false, + "cooked": ":", + "raw": ":" + }, + { + "type": "TemplateElement", + "span": { + "start": 328, + "end": 328, + "ctxt": 0 + }, + "tail": true, + "cooked": "", + "raw": "" + } + ] + } + } + } + } + } + ], + "decorators": [], + "span": { + "start": 203, + "end": 337, + "ctxt": 0 + }, + "body": null, + "generator": false, + "async": false, + "typeParameters": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 222, + "end": 298, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 226, + "end": 255, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 226, + "end": 231, + "ctxt": 0 + }, + "value": "Scope", + "optional": false + }, + "in": false, + "out": false, + "const": false, + "constraint": { + "type": "TsTypeReference", + "span": { + "start": 240, + "end": 255, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 240, + "end": 245, + "ctxt": 0 + }, + "value": "Keyof", + "optional": false + }, + "typeParams": { + "type": "TsTypeParameterInstantiation", + "span": { + "start": 245, + "end": 255, + "ctxt": 0 + }, + "params": [ + { + "type": "TsTypeReference", + "span": { + "start": 246, + "end": 254, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 246, + "end": 254, + "ctxt": 0 + }, + "value": "Registry", + "optional": false + }, + "typeParams": null + } + ] + } + }, + "default": null + }, + { + "type": "TsTypeParameter", + "span": { + "start": 259, + "end": 295, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 259, + "end": 264, + "ctxt": 0 + }, + "value": "Event", + "optional": false + }, + "in": false, + "out": false, + "const": false, + "constraint": { + "type": "TsTypeReference", + "span": { + "start": 273, + "end": 295, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 273, + "end": 278, + "ctxt": 0 + }, + "value": "Keyof", + "optional": false + }, + "typeParams": { + "type": "TsTypeParameterInstantiation", + "span": { + "start": 278, + "end": 295, + "ctxt": 0 + }, + "params": [ + { + "type": "TsIndexedAccessType", + "span": { + "start": 279, + "end": 294, + "ctxt": 0 + }, + "readonly": false, + "objectType": { + "type": "TsTypeReference", + "span": { + "start": 279, + "end": 287, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 279, + "end": 287, + "ctxt": 0 + }, + "value": "Registry", + "optional": false + }, + "typeParams": null + }, + "indexType": { + "type": "TsTypeReference", + "span": { + "start": 288, + "end": 293, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 288, + "end": 293, + "ctxt": 0 + }, + "value": "Scope", + "optional": false + }, + "typeParams": null + } + } + ] + } + }, + "default": null + } + ] + }, + "returnType": { + "type": "TsTypeAnnotation", + "span": { + "start": 330, + "end": 336, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 332, + "end": 336, + "ctxt": 0 + }, + "kind": "void" + } + } + }, + { + "type": "FunctionDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 348, + "end": 350, + "ctxt": 0 + }, + "value": "f2", + "optional": false + }, + "declare": false, + "params": [ + { + "type": "Parameter", + "span": { + "start": 427, + "end": 439, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 427, + "end": 439, + "ctxt": 0 + }, + "value": "scope", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 432, + "end": 439, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 434, + "end": 439, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 434, + "end": 439, + "ctxt": 0 + }, + "value": "Scope", + "optional": false + }, + "typeParams": null + } + } + } + }, + { + "type": "Parameter", + "span": { + "start": 441, + "end": 453, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 441, + "end": 453, + "ctxt": 0 + }, + "value": "event", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 446, + "end": 453, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 448, + "end": 453, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 448, + "end": 453, + "ctxt": 0 + }, + "value": "Event", + "optional": false + }, + "typeParams": null + } + } + } + } + ], + "decorators": [], + "span": { + "start": 339, + "end": 485, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 455, + "end": 485, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ExpressionStatement", + "span": { + "start": 459, + "end": 483, + "ctxt": 0 + }, + "expression": { + "type": "CallExpression", + "span": { + "start": 459, + "end": 482, + "ctxt": 0 + }, + "callee": { + "type": "Identifier", + "span": { + "start": 459, + "end": 461, + "ctxt": 0 + }, + "value": "f1", + "optional": false + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "TemplateLiteral", + "span": { + "start": 462, + "end": 481, + "ctxt": 0 + }, + "expressions": [ + { + "type": "Identifier", + "span": { + "start": 465, + "end": 470, + "ctxt": 0 + }, + "value": "scope", + "optional": false + }, + { + "type": "Identifier", + "span": { + "start": 474, + "end": 479, + "ctxt": 0 + }, + "value": "event", + "optional": false + } + ], + "quasis": [ + { + "type": "TemplateElement", + "span": { + "start": 463, + "end": 463, + "ctxt": 0 + }, + "tail": false, + "cooked": "", + "raw": "" + }, + { + "type": "TemplateElement", + "span": { + "start": 471, + "end": 472, + "ctxt": 0 + }, + "tail": false, + "cooked": ":", + "raw": ":" + }, + { + "type": "TemplateElement", + "span": { + "start": 480, + "end": 480, + "ctxt": 0 + }, + "tail": true, + "cooked": "", + "raw": "" + } + ] + } + } + ], + "typeArguments": null + } + } + ] + }, + "generator": false, + "async": false, + "typeParameters": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 350, + "end": 426, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 354, + "end": 383, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 354, + "end": 359, + "ctxt": 0 + }, + "value": "Scope", + "optional": false + }, + "in": false, + "out": false, + "const": false, + "constraint": { + "type": "TsTypeReference", + "span": { + "start": 368, + "end": 383, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 368, + "end": 373, + "ctxt": 0 + }, + "value": "Keyof", + "optional": false + }, + "typeParams": { + "type": "TsTypeParameterInstantiation", + "span": { + "start": 373, + "end": 383, + "ctxt": 0 + }, + "params": [ + { + "type": "TsTypeReference", + "span": { + "start": 374, + "end": 382, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 374, + "end": 382, + "ctxt": 0 + }, + "value": "Registry", + "optional": false + }, + "typeParams": null + } + ] + } + }, + "default": null + }, + { + "type": "TsTypeParameter", + "span": { + "start": 387, + "end": 423, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 387, + "end": 392, + "ctxt": 0 + }, + "value": "Event", + "optional": false + }, + "in": false, + "out": false, + "const": false, + "constraint": { + "type": "TsTypeReference", + "span": { + "start": 401, + "end": 423, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 401, + "end": 406, + "ctxt": 0 + }, + "value": "Keyof", + "optional": false + }, + "typeParams": { + "type": "TsTypeParameterInstantiation", + "span": { + "start": 406, + "end": 423, + "ctxt": 0 + }, + "params": [ + { + "type": "TsIndexedAccessType", + "span": { + "start": 407, + "end": 422, + "ctxt": 0 + }, + "readonly": false, + "objectType": { + "type": "TsTypeReference", + "span": { + "start": 407, + "end": 415, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 407, + "end": 415, + "ctxt": 0 + }, + "value": "Registry", + "optional": false + }, + "typeParams": null + }, + "indexType": { + "type": "TsTypeReference", + "span": { + "start": 416, + "end": 421, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 416, + "end": 421, + "ctxt": 0 + }, + "value": "Scope", + "optional": false + }, + "typeParams": null + } + } + ] + } + }, + "default": null + } + ] + }, + "returnType": null + } + ], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes6.ts b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes6.ts new file mode 100644 index 000000000000..0123c9a22c4b --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes6.ts @@ -0,0 +1,24 @@ +// @strict: true +// @target: esnext +// @noEmit: true + +// https://github.com/microsoft/TypeScript/issues/56659 + +type Registry = { + a: { a1: {} }; + b: { b1: {} }; +}; + +type Keyof = keyof T & string; + +declare function f1< + Scope extends Keyof, + Event extends Keyof, +>(eventPath: `${Scope}:${Event}`): void; + +function f2< + Scope extends Keyof, + Event extends Keyof, +>(scope: Scope, event: Event) { + f1(`${scope}:${event}`); +} diff --git a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes7.json b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes7.json new file mode 100644 index 000000000000..b13ed167a458 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes7.json @@ -0,0 +1,1506 @@ +{ + "type": "Script", + "span": { + "start": 112, + "end": 462, + "ctxt": 0 + }, + "body": [ + { + "type": "TsInterfaceDeclaration", + "span": { + "start": 112, + "end": 166, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 122, + "end": 126, + "ctxt": 0 + }, + "value": "NMap", + "optional": false + }, + "declare": false, + "typeParams": null, + "extends": [], + "body": { + "type": "TsInterfaceBody", + "span": { + "start": 127, + "end": 166, + "ctxt": 0 + }, + "body": [ + { + "type": "TsPropertySignature", + "span": { + "start": 131, + "end": 137, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "NumericLiteral", + "span": { + "start": 131, + "end": 132, + "ctxt": 0 + }, + "value": 1.0, + "raw": "1" + }, + "computed": false, + "optional": false, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 132, + "end": 137, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsLiteralType", + "span": { + "start": 134, + "end": 137, + "ctxt": 0 + }, + "literal": { + "type": "StringLiteral", + "span": { + "start": 134, + "end": 137, + "ctxt": 0 + }, + "value": "A", + "raw": "'A'" + } + } + }, + "typeParams": null + }, + { + "type": "TsPropertySignature", + "span": { + "start": 140, + "end": 146, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "NumericLiteral", + "span": { + "start": 140, + "end": 141, + "ctxt": 0 + }, + "value": 2.0, + "raw": "2" + }, + "computed": false, + "optional": false, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 141, + "end": 146, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsLiteralType", + "span": { + "start": 143, + "end": 146, + "ctxt": 0 + }, + "literal": { + "type": "StringLiteral", + "span": { + "start": 143, + "end": 146, + "ctxt": 0 + }, + "value": "B", + "raw": "'B'" + } + } + }, + "typeParams": null + }, + { + "type": "TsPropertySignature", + "span": { + "start": 149, + "end": 155, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "NumericLiteral", + "span": { + "start": 149, + "end": 150, + "ctxt": 0 + }, + "value": 3.0, + "raw": "3" + }, + "computed": false, + "optional": false, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 150, + "end": 155, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsLiteralType", + "span": { + "start": 152, + "end": 155, + "ctxt": 0 + }, + "literal": { + "type": "StringLiteral", + "span": { + "start": 152, + "end": 155, + "ctxt": 0 + }, + "value": "C", + "raw": "'C'" + } + } + }, + "typeParams": null + }, + { + "type": "TsPropertySignature", + "span": { + "start": 158, + "end": 164, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "NumericLiteral", + "span": { + "start": 158, + "end": 159, + "ctxt": 0 + }, + "value": 4.0, + "raw": "4" + }, + "computed": false, + "optional": false, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 159, + "end": 164, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsLiteralType", + "span": { + "start": 161, + "end": 164, + "ctxt": 0 + }, + "literal": { + "type": "StringLiteral", + "span": { + "start": 161, + "end": 164, + "ctxt": 0 + }, + "value": "D", + "raw": "'D'" + } + } + }, + "typeParams": null + } + ] + } + }, + { + "type": "VariableDeclaration", + "span": { + "start": 168, + "end": 228, + "ctxt": 0 + }, + "kind": "const", + "declare": true, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 182, + "end": 228, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 182, + "end": 183, + "ctxt": 0 + }, + "value": "g", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 183, + "end": 228, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsFunctionType", + "span": { + "start": 185, + "end": 228, + "ctxt": 0 + }, + "params": [ + { + "type": "Identifier", + "span": { + "start": 207, + "end": 216, + "ctxt": 0 + }, + "value": "x", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 208, + "end": 216, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsLiteralType", + "span": { + "start": 210, + "end": 216, + "ctxt": 0 + }, + "literal": { + "type": "TemplateLiteral", + "span": { + "start": 210, + "end": 216, + "ctxt": 0 + }, + "types": [ + { + "type": "TsTypeReference", + "span": { + "start": 213, + "end": 214, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 213, + "end": 214, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + ], + "quasis": [ + { + "type": "TemplateElement", + "span": { + "start": 211, + "end": 211, + "ctxt": 0 + }, + "tail": false, + "cooked": "", + "raw": "" + }, + { + "type": "TemplateElement", + "span": { + "start": 215, + "end": 215, + "ctxt": 0 + }, + "tail": true, + "cooked": "", + "raw": "" + } + ] + } + } + } + } + ], + "typeParams": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 185, + "end": 206, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 186, + "end": 205, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 186, + "end": 187, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "in": false, + "out": false, + "const": false, + "constraint": { + "type": "TsUnionType", + "span": { + "start": 196, + "end": 205, + "ctxt": 0 + }, + "types": [ + { + "type": "TsLiteralType", + "span": { + "start": 196, + "end": 197, + "ctxt": 0 + }, + "literal": { + "type": "NumericLiteral", + "span": { + "start": 196, + "end": 197, + "ctxt": 0 + }, + "value": 1.0, + "raw": "1" + } + }, + { + "type": "TsLiteralType", + "span": { + "start": 200, + "end": 201, + "ctxt": 0 + }, + "literal": { + "type": "NumericLiteral", + "span": { + "start": 200, + "end": 201, + "ctxt": 0 + }, + "value": 2.0, + "raw": "2" + } + }, + { + "type": "TsLiteralType", + "span": { + "start": 204, + "end": 205, + "ctxt": 0 + }, + "literal": { + "type": "NumericLiteral", + "span": { + "start": 204, + "end": 205, + "ctxt": 0 + }, + "value": 3.0, + "raw": "3" + } + } + ] + }, + "default": null + } + ] + }, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 218, + "end": 228, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsIndexedAccessType", + "span": { + "start": 221, + "end": 228, + "ctxt": 0 + }, + "readonly": false, + "objectType": { + "type": "TsTypeReference", + "span": { + "start": 221, + "end": 225, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 221, + "end": 225, + "ctxt": 0 + }, + "value": "NMap", + "optional": false + }, + "typeParams": null + }, + "indexType": { + "type": "TsTypeReference", + "span": { + "start": 226, + "end": 227, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 226, + "end": 227, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + } + } + } + } + }, + "init": null, + "definite": false + } + ] + }, + { + "type": "TsTypeAliasDeclaration", + "span": { + "start": 230, + "end": 283, + "ctxt": 0 + }, + "declare": false, + "id": { + "type": "Identifier", + "span": { + "start": 235, + "end": 237, + "ctxt": 0 + }, + "value": "G1", + "optional": false + }, + "typeParams": null, + "typeAnnotation": { + "type": "TsFunctionType", + "span": { + "start": 240, + "end": 283, + "ctxt": 0 + }, + "params": [ + { + "type": "Identifier", + "span": { + "start": 262, + "end": 271, + "ctxt": 0 + }, + "value": "x", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 263, + "end": 271, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsLiteralType", + "span": { + "start": 265, + "end": 271, + "ctxt": 0 + }, + "literal": { + "type": "TemplateLiteral", + "span": { + "start": 265, + "end": 271, + "ctxt": 0 + }, + "types": [ + { + "type": "TsTypeReference", + "span": { + "start": 268, + "end": 269, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 268, + "end": 269, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + ], + "quasis": [ + { + "type": "TemplateElement", + "span": { + "start": 266, + "end": 266, + "ctxt": 0 + }, + "tail": false, + "cooked": "", + "raw": "" + }, + { + "type": "TemplateElement", + "span": { + "start": 270, + "end": 270, + "ctxt": 0 + }, + "tail": true, + "cooked": "", + "raw": "" + } + ] + } + } + } + } + ], + "typeParams": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 240, + "end": 261, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 241, + "end": 260, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 241, + "end": 242, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "in": false, + "out": false, + "const": false, + "constraint": { + "type": "TsUnionType", + "span": { + "start": 251, + "end": 260, + "ctxt": 0 + }, + "types": [ + { + "type": "TsLiteralType", + "span": { + "start": 251, + "end": 252, + "ctxt": 0 + }, + "literal": { + "type": "NumericLiteral", + "span": { + "start": 251, + "end": 252, + "ctxt": 0 + }, + "value": 1.0, + "raw": "1" + } + }, + { + "type": "TsLiteralType", + "span": { + "start": 255, + "end": 256, + "ctxt": 0 + }, + "literal": { + "type": "NumericLiteral", + "span": { + "start": 255, + "end": 256, + "ctxt": 0 + }, + "value": 2.0, + "raw": "2" + } + }, + { + "type": "TsLiteralType", + "span": { + "start": 259, + "end": 260, + "ctxt": 0 + }, + "literal": { + "type": "NumericLiteral", + "span": { + "start": 259, + "end": 260, + "ctxt": 0 + }, + "value": 3.0, + "raw": "3" + } + } + ] + }, + "default": null + } + ] + }, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 273, + "end": 283, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsIndexedAccessType", + "span": { + "start": 276, + "end": 283, + "ctxt": 0 + }, + "readonly": false, + "objectType": { + "type": "TsTypeReference", + "span": { + "start": 276, + "end": 280, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 276, + "end": 280, + "ctxt": 0 + }, + "value": "NMap", + "optional": false + }, + "typeParams": null + }, + "indexType": { + "type": "TsTypeReference", + "span": { + "start": 281, + "end": 282, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 281, + "end": 282, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + } + } + } + }, + { + "type": "VariableDeclaration", + "span": { + "start": 284, + "end": 301, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 290, + "end": 300, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 290, + "end": 292, + "ctxt": 0 + }, + "value": "g1", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 292, + "end": 296, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 294, + "end": 296, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 294, + "end": 296, + "ctxt": 0 + }, + "value": "G1", + "optional": false + }, + "typeParams": null + } + } + }, + "init": { + "type": "Identifier", + "span": { + "start": 299, + "end": 300, + "ctxt": 0 + }, + "value": "g", + "optional": false + }, + "definite": false + } + ] + }, + { + "type": "TsTypeAliasDeclaration", + "span": { + "start": 309, + "end": 366, + "ctxt": 0 + }, + "declare": false, + "id": { + "type": "Identifier", + "span": { + "start": 314, + "end": 316, + "ctxt": 0 + }, + "value": "G2", + "optional": false + }, + "typeParams": null, + "typeAnnotation": { + "type": "TsFunctionType", + "span": { + "start": 319, + "end": 366, + "ctxt": 0 + }, + "params": [ + { + "type": "Identifier", + "span": { + "start": 345, + "end": 354, + "ctxt": 0 + }, + "value": "x", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 346, + "end": 354, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsLiteralType", + "span": { + "start": 348, + "end": 354, + "ctxt": 0 + }, + "literal": { + "type": "TemplateLiteral", + "span": { + "start": 348, + "end": 354, + "ctxt": 0 + }, + "types": [ + { + "type": "TsTypeReference", + "span": { + "start": 351, + "end": 352, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 351, + "end": 352, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + ], + "quasis": [ + { + "type": "TemplateElement", + "span": { + "start": 349, + "end": 349, + "ctxt": 0 + }, + "tail": false, + "cooked": "", + "raw": "" + }, + { + "type": "TemplateElement", + "span": { + "start": 353, + "end": 353, + "ctxt": 0 + }, + "tail": true, + "cooked": "", + "raw": "" + } + ] + } + } + } + } + ], + "typeParams": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 319, + "end": 344, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 320, + "end": 343, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 320, + "end": 321, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "in": false, + "out": false, + "const": false, + "constraint": { + "type": "TsUnionType", + "span": { + "start": 330, + "end": 343, + "ctxt": 0 + }, + "types": [ + { + "type": "TsLiteralType", + "span": { + "start": 330, + "end": 331, + "ctxt": 0 + }, + "literal": { + "type": "NumericLiteral", + "span": { + "start": 330, + "end": 331, + "ctxt": 0 + }, + "value": 1.0, + "raw": "1" + } + }, + { + "type": "TsLiteralType", + "span": { + "start": 334, + "end": 335, + "ctxt": 0 + }, + "literal": { + "type": "NumericLiteral", + "span": { + "start": 334, + "end": 335, + "ctxt": 0 + }, + "value": 2.0, + "raw": "2" + } + }, + { + "type": "TsLiteralType", + "span": { + "start": 338, + "end": 339, + "ctxt": 0 + }, + "literal": { + "type": "NumericLiteral", + "span": { + "start": 338, + "end": 339, + "ctxt": 0 + }, + "value": 3.0, + "raw": "3" + } + }, + { + "type": "TsLiteralType", + "span": { + "start": 342, + "end": 343, + "ctxt": 0 + }, + "literal": { + "type": "NumericLiteral", + "span": { + "start": 342, + "end": 343, + "ctxt": 0 + }, + "value": 4.0, + "raw": "4" + } + } + ] + }, + "default": null + } + ] + }, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 356, + "end": 366, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsIndexedAccessType", + "span": { + "start": 359, + "end": 366, + "ctxt": 0 + }, + "readonly": false, + "objectType": { + "type": "TsTypeReference", + "span": { + "start": 359, + "end": 363, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 359, + "end": 363, + "ctxt": 0 + }, + "value": "NMap", + "optional": false + }, + "typeParams": null + }, + "indexType": { + "type": "TsTypeReference", + "span": { + "start": 364, + "end": 365, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 364, + "end": 365, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + } + } + } + }, + { + "type": "VariableDeclaration", + "span": { + "start": 367, + "end": 384, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 373, + "end": 383, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 373, + "end": 375, + "ctxt": 0 + }, + "value": "g2", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 375, + "end": 379, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 377, + "end": 379, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 377, + "end": 379, + "ctxt": 0 + }, + "value": "G2", + "optional": false + }, + "typeParams": null + } + } + }, + "init": { + "type": "Identifier", + "span": { + "start": 382, + "end": 383, + "ctxt": 0 + }, + "value": "g", + "optional": false + }, + "definite": false + } + ] + }, + { + "type": "TsTypeAliasDeclaration", + "span": { + "start": 395, + "end": 444, + "ctxt": 0 + }, + "declare": false, + "id": { + "type": "Identifier", + "span": { + "start": 400, + "end": 402, + "ctxt": 0 + }, + "value": "G3", + "optional": false + }, + "typeParams": null, + "typeAnnotation": { + "type": "TsFunctionType", + "span": { + "start": 405, + "end": 444, + "ctxt": 0 + }, + "params": [ + { + "type": "Identifier", + "span": { + "start": 423, + "end": 432, + "ctxt": 0 + }, + "value": "x", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 424, + "end": 432, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsLiteralType", + "span": { + "start": 426, + "end": 432, + "ctxt": 0 + }, + "literal": { + "type": "TemplateLiteral", + "span": { + "start": 426, + "end": 432, + "ctxt": 0 + }, + "types": [ + { + "type": "TsTypeReference", + "span": { + "start": 429, + "end": 430, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 429, + "end": 430, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + ], + "quasis": [ + { + "type": "TemplateElement", + "span": { + "start": 427, + "end": 427, + "ctxt": 0 + }, + "tail": false, + "cooked": "", + "raw": "" + }, + { + "type": "TemplateElement", + "span": { + "start": 431, + "end": 431, + "ctxt": 0 + }, + "tail": true, + "cooked": "", + "raw": "" + } + ] + } + } + } + } + ], + "typeParams": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 405, + "end": 422, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 406, + "end": 421, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 406, + "end": 407, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "in": false, + "out": false, + "const": false, + "constraint": { + "type": "TsUnionType", + "span": { + "start": 416, + "end": 421, + "ctxt": 0 + }, + "types": [ + { + "type": "TsLiteralType", + "span": { + "start": 416, + "end": 417, + "ctxt": 0 + }, + "literal": { + "type": "NumericLiteral", + "span": { + "start": 416, + "end": 417, + "ctxt": 0 + }, + "value": 1.0, + "raw": "1" + } + }, + { + "type": "TsLiteralType", + "span": { + "start": 420, + "end": 421, + "ctxt": 0 + }, + "literal": { + "type": "NumericLiteral", + "span": { + "start": 420, + "end": 421, + "ctxt": 0 + }, + "value": 2.0, + "raw": "2" + } + } + ] + }, + "default": null + } + ] + }, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 434, + "end": 444, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsIndexedAccessType", + "span": { + "start": 437, + "end": 444, + "ctxt": 0 + }, + "readonly": false, + "objectType": { + "type": "TsTypeReference", + "span": { + "start": 437, + "end": 441, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 437, + "end": 441, + "ctxt": 0 + }, + "value": "NMap", + "optional": false + }, + "typeParams": null + }, + "indexType": { + "type": "TsTypeReference", + "span": { + "start": 442, + "end": 443, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 442, + "end": 443, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + } + } + } + }, + { + "type": "VariableDeclaration", + "span": { + "start": 445, + "end": 462, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 451, + "end": 461, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 451, + "end": 453, + "ctxt": 0 + }, + "value": "g3", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 453, + "end": 457, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 455, + "end": 457, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 455, + "end": 457, + "ctxt": 0 + }, + "value": "G3", + "optional": false + }, + "typeParams": null + } + } + }, + "init": { + "type": "Identifier", + "span": { + "start": 460, + "end": 461, + "ctxt": 0 + }, + "value": "g", + "optional": false + }, + "definite": false + } + ] + } + ], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes7.ts b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes7.ts new file mode 100644 index 000000000000..2f06f286d2aa --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes7.ts @@ -0,0 +1,23 @@ +// @strict: true +// @target: esnext +// @noEmit: true + +// https://github.com/microsoft/TypeScript/issues/57807 + +interface NMap { + 1: 'A' + 2: 'B' + 3: 'C' + 4: 'D' +} + +declare const g: (x: `${T}`) => NMap[T] + +type G1 = (x: `${T}`) => NMap[T] +const g1: G1 = g; // ok + +type G2 = (x: `${T}`) => NMap[T] +const g2: G2 = g; // error + +type G3 = (x: `${T}`) => NMap[T] +const g3: G3 = g; // ok diff --git a/crates/swc_ecma_parser/tests/tsc/templateStringMultiline3.json b/crates/swc_ecma_parser/tests/tsc/templateStringMultiline3.json index f467151e7d07..e6ebc6ba5b0c 100644 --- a/crates/swc_ecma_parser/tests/tsc/templateStringMultiline3.json +++ b/crates/swc_ecma_parser/tests/tsc/templateStringMultiline3.json @@ -1,41 +1,10 @@ { "type": "Script", "span": { - "start": 24, - "end": 29, + "start": 1, + "end": 1, "ctxt": 0 }, - "body": [ - { - "type": "ExpressionStatement", - "span": { - "start": 24, - "end": 29, - "ctxt": 0 - }, - "expression": { - "type": "TemplateLiteral", - "span": { - "start": 24, - "end": 29, - "ctxt": 0 - }, - "expressions": [], - "quasis": [ - { - "type": "TemplateElement", - "span": { - "start": 25, - "end": 28, - "ctxt": 0 - }, - "tail": true, - "cooked": "\n", - "raw": "\n\\\r" - } - ] - } - } - ], + "body": [], "interpreter": null } diff --git a/crates/swc_ecma_parser/tests/tsc/templateStringMultiline3.ts b/crates/swc_ecma_parser/tests/tsc/templateStringMultiline3.ts index fbde56ac230b..045d5995ccdb 100644 --- a/crates/swc_ecma_parser/tests/tsc/templateStringMultiline3.ts +++ b/crates/swc_ecma_parser/tests/tsc/templateStringMultiline3.ts @@ -1 +1 @@ - // newlines are ` \ ` \ No newline at end of file +// newlines are `\` \ No newline at end of file diff --git a/crates/swc_ecma_parser/tests/tsc/templateStringMultiline3_ES6.json b/crates/swc_ecma_parser/tests/tsc/templateStringMultiline3_ES6.json index a6887797b9c1..e6ebc6ba5b0c 100644 --- a/crates/swc_ecma_parser/tests/tsc/templateStringMultiline3_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/templateStringMultiline3_ES6.json @@ -1,41 +1,10 @@ { "type": "Script", "span": { - "start": 38, - "end": 43, + "start": 1, + "end": 1, "ctxt": 0 }, - "body": [ - { - "type": "ExpressionStatement", - "span": { - "start": 38, - "end": 43, - "ctxt": 0 - }, - "expression": { - "type": "TemplateLiteral", - "span": { - "start": 38, - "end": 43, - "ctxt": 0 - }, - "expressions": [], - "quasis": [ - { - "type": "TemplateElement", - "span": { - "start": 39, - "end": 42, - "ctxt": 0 - }, - "tail": true, - "cooked": "\n", - "raw": "\n\\\r" - } - ] - } - } - ], + "body": [], "interpreter": null } diff --git a/crates/swc_ecma_parser/tests/tsc/templateStringMultiline3_ES6.ts b/crates/swc_ecma_parser/tests/tsc/templateStringMultiline3_ES6.ts index 4d2613f9f9fe..739dafbf098d 100644 --- a/crates/swc_ecma_parser/tests/tsc/templateStringMultiline3_ES6.ts +++ b/crates/swc_ecma_parser/tests/tsc/templateStringMultiline3_ES6.ts @@ -1 +1 @@ -//@target: es6 // newlines are ` \ ` \ No newline at end of file +//@target: es6// newlines are `\` \ No newline at end of file diff --git a/crates/swc_ecma_parser/tests/tsc/topLevelThisAssignment.json b/crates/swc_ecma_parser/tests/tsc/topLevelThisAssignment.json index 3ac3f4561b07..44a02675bd96 100644 --- a/crates/swc_ecma_parser/tests/tsc/topLevelThisAssignment.json +++ b/crates/swc_ecma_parser/tests/tsc/topLevelThisAssignment.json @@ -1,46 +1,46 @@ { "type": "Script", "span": { - "start": 75, - "end": 129, + "start": 79, + "end": 133, "ctxt": 0 }, "body": [ { "type": "ExpressionStatement", "span": { - "start": 75, - "end": 87, + "start": 79, + "end": 91, "ctxt": 0 }, "expression": { "type": "AssignmentExpression", "span": { - "start": 75, - "end": 86, + "start": 79, + "end": 90, "ctxt": 0 }, "operator": "=", "left": { "type": "MemberExpression", "span": { - "start": 75, - "end": 81, + "start": 79, + "end": 85, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 75, - "end": 79, + "start": 79, + "end": 83, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 80, - "end": 81, + "start": 84, + "end": 85, "ctxt": 0 }, "value": "a", @@ -50,8 +50,8 @@ "right": { "type": "NumericLiteral", "span": { - "start": 84, - "end": 86, + "start": 88, + "end": 90, "ctxt": 0 }, "value": 10.0, @@ -62,30 +62,30 @@ { "type": "ExpressionStatement", "span": { - "start": 88, - "end": 95, + "start": 92, + "end": 99, "ctxt": 0 }, "expression": { "type": "MemberExpression", "span": { - "start": 88, - "end": 94, + "start": 92, + "end": 98, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 88, - "end": 92, + "start": 92, + "end": 96, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 93, - "end": 94, + "start": 97, + "end": 98, "ctxt": 0 }, "value": "a", @@ -96,15 +96,15 @@ { "type": "ExpressionStatement", "span": { - "start": 96, - "end": 98, + "start": 100, + "end": 102, "ctxt": 0 }, "expression": { "type": "Identifier", "span": { - "start": 96, - "end": 97, + "start": 100, + "end": 101, "ctxt": 0 }, "value": "a", @@ -114,30 +114,30 @@ { "type": "ExpressionStatement", "span": { - "start": 119, - "end": 126, + "start": 123, + "end": 130, "ctxt": 0 }, "expression": { "type": "MemberExpression", "span": { - "start": 119, - "end": 125, + "start": 123, + "end": 129, "ctxt": 0 }, "object": { "type": "ThisExpression", "span": { - "start": 119, - "end": 123, + "start": 123, + "end": 127, "ctxt": 0 } }, "property": { "type": "Identifier", "span": { - "start": 124, - "end": 125, + "start": 128, + "end": 129, "ctxt": 0 }, "value": "a", @@ -148,15 +148,15 @@ { "type": "ExpressionStatement", "span": { - "start": 127, - "end": 129, + "start": 131, + "end": 133, "ctxt": 0 }, "expression": { "type": "Identifier", "span": { - "start": 127, - "end": 128, + "start": 131, + "end": 132, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/topLevelThisAssignment.ts b/crates/swc_ecma_parser/tests/tsc/topLevelThisAssignment.ts index aed2f8671080..7cf806450a0e 100644 --- a/crates/swc_ecma_parser/tests/tsc/topLevelThisAssignment.ts +++ b/crates/swc_ecma_parser/tests/tsc/topLevelThisAssignment.ts @@ -1,4 +1,4 @@ -// @out: output.js +// @outFile: output.js // @allowJs: true // @checkJs: true // @Filename: a.js diff --git a/crates/swc_ecma_parser/tests/tsc/topLevelVarHoistingCommonJS.json b/crates/swc_ecma_parser/tests/tsc/topLevelVarHoistingCommonJS.json deleted file mode 100644 index a3506a531b59..000000000000 --- a/crates/swc_ecma_parser/tests/tsc/topLevelVarHoistingCommonJS.json +++ /dev/null @@ -1,1631 +0,0 @@ -{ - "type": "Module", - "span": { - "start": 70, - "end": 709, - "ctxt": 0 - }, - "body": [ - { - "type": "VariableDeclaration", - "span": { - "start": 70, - "end": 89, - "ctxt": 0 - }, - "kind": "var", - "declare": true, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 82, - "end": 88, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 82, - "end": 83, - "ctxt": 0 - }, - "value": "_", - "optional": false, - "typeAnnotation": { - "type": "TsTypeAnnotation", - "span": { - "start": 83, - "end": 88, - "ctxt": 0 - }, - "typeAnnotation": { - "type": "TsKeywordType", - "span": { - "start": 85, - "end": 88, - "ctxt": 0 - }, - "kind": "any" - } - } - }, - "init": null, - "definite": false - } - ] - }, - { - "type": "BlockStatement", - "span": { - "start": 91, - "end": 109, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 97, - "end": 107, - "ctxt": 0 - }, - "kind": "var", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 101, - "end": 106, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 101, - "end": 102, - "ctxt": 0 - }, - "value": "a", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "Identifier", - "span": { - "start": 105, - "end": 106, - "ctxt": 0 - }, - "value": "_", - "optional": false - }, - "definite": false - } - ] - } - ] - }, - { - "type": "IfStatement", - "span": { - "start": 111, - "end": 160, - "ctxt": 0 - }, - "test": { - "type": "Identifier", - "span": { - "start": 115, - "end": 116, - "ctxt": 0 - }, - "value": "_", - "optional": false - }, - "consequent": { - "type": "BlockStatement", - "span": { - "start": 118, - "end": 136, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 124, - "end": 134, - "ctxt": 0 - }, - "kind": "var", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 128, - "end": 133, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 128, - "end": 129, - "ctxt": 0 - }, - "value": "b", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "Identifier", - "span": { - "start": 132, - "end": 133, - "ctxt": 0 - }, - "value": "_", - "optional": false - }, - "definite": false - } - ] - } - ] - }, - "alternate": { - "type": "BlockStatement", - "span": { - "start": 142, - "end": 160, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 148, - "end": 158, - "ctxt": 0 - }, - "kind": "var", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 152, - "end": 157, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 152, - "end": 153, - "ctxt": 0 - }, - "value": "c", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "Identifier", - "span": { - "start": 156, - "end": 157, - "ctxt": 0 - }, - "value": "_", - "optional": false - }, - "definite": false - } - ] - } - ] - } - }, - { - "type": "SwitchStatement", - "span": { - "start": 162, - "end": 239, - "ctxt": 0 - }, - "discriminant": { - "type": "Identifier", - "span": { - "start": 170, - "end": 171, - "ctxt": 0 - }, - "value": "_", - "optional": false - }, - "cases": [ - { - "type": "SwitchCase", - "span": { - "start": 179, - "end": 205, - "ctxt": 0 - }, - "test": { - "type": "Identifier", - "span": { - "start": 184, - "end": 185, - "ctxt": 0 - }, - "value": "_", - "optional": false - }, - "consequent": [ - { - "type": "VariableDeclaration", - "span": { - "start": 195, - "end": 205, - "ctxt": 0 - }, - "kind": "var", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 199, - "end": 204, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 199, - "end": 200, - "ctxt": 0 - }, - "value": "d", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "Identifier", - "span": { - "start": 203, - "end": 204, - "ctxt": 0 - }, - "value": "_", - "optional": false - }, - "definite": false - } - ] - } - ] - }, - { - "type": "SwitchCase", - "span": { - "start": 210, - "end": 237, - "ctxt": 0 - }, - "test": null, - "consequent": [ - { - "type": "VariableDeclaration", - "span": { - "start": 227, - "end": 237, - "ctxt": 0 - }, - "kind": "var", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 231, - "end": 236, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 231, - "end": 232, - "ctxt": 0 - }, - "value": "e", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "Identifier", - "span": { - "start": 235, - "end": 236, - "ctxt": 0 - }, - "value": "_", - "optional": false - }, - "definite": false - } - ] - } - ] - } - ] - }, - { - "type": "WhileStatement", - "span": { - "start": 241, - "end": 269, - "ctxt": 0 - }, - "test": { - "type": "Identifier", - "span": { - "start": 248, - "end": 249, - "ctxt": 0 - }, - "value": "_", - "optional": false - }, - "body": { - "type": "BlockStatement", - "span": { - "start": 251, - "end": 269, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 257, - "end": 267, - "ctxt": 0 - }, - "kind": "var", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 261, - "end": 266, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 261, - "end": 262, - "ctxt": 0 - }, - "value": "f", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "Identifier", - "span": { - "start": 265, - "end": 266, - "ctxt": 0 - }, - "value": "_", - "optional": false - }, - "definite": false - } - ] - } - ] - } - }, - { - "type": "DoWhileStatement", - "span": { - "start": 271, - "end": 303, - "ctxt": 0 - }, - "test": { - "type": "Identifier", - "span": { - "start": 300, - "end": 301, - "ctxt": 0 - }, - "value": "_", - "optional": false - }, - "body": { - "type": "BlockStatement", - "span": { - "start": 274, - "end": 292, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 280, - "end": 290, - "ctxt": 0 - }, - "kind": "var", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 284, - "end": 289, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 284, - "end": 285, - "ctxt": 0 - }, - "value": "g", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "Identifier", - "span": { - "start": 288, - "end": 289, - "ctxt": 0 - }, - "value": "_", - "optional": false - }, - "definite": false - } - ] - } - ] - } - }, - { - "type": "ForStatement", - "span": { - "start": 305, - "end": 338, - "ctxt": 0 - }, - "init": { - "type": "VariableDeclaration", - "span": { - "start": 310, - "end": 319, - "ctxt": 0 - }, - "kind": "var", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 314, - "end": 319, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 314, - "end": 315, - "ctxt": 0 - }, - "value": "h", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "Identifier", - "span": { - "start": 318, - "end": 319, - "ctxt": 0 - }, - "value": "_", - "optional": false - }, - "definite": false - } - ] - }, - "test": null, - "update": null, - "body": { - "type": "BlockStatement", - "span": { - "start": 324, - "end": 338, - "ctxt": 0 - }, - "stmts": [ - { - "type": "BreakStatement", - "span": { - "start": 330, - "end": 336, - "ctxt": 0 - }, - "label": null - } - ] - } - }, - { - "type": "ForStatement", - "span": { - "start": 340, - "end": 379, - "ctxt": 0 - }, - "init": null, - "test": null, - "update": null, - "body": { - "type": "BlockStatement", - "span": { - "start": 350, - "end": 379, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 356, - "end": 366, - "ctxt": 0 - }, - "kind": "var", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 360, - "end": 365, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 360, - "end": 361, - "ctxt": 0 - }, - "value": "m", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "Identifier", - "span": { - "start": 364, - "end": 365, - "ctxt": 0 - }, - "value": "_", - "optional": false - }, - "definite": false - } - ] - }, - { - "type": "BreakStatement", - "span": { - "start": 371, - "end": 377, - "ctxt": 0 - }, - "label": null - } - ] - } - }, - { - "type": "ForInStatement", - "span": { - "start": 381, - "end": 404, - "ctxt": 0 - }, - "left": { - "type": "VariableDeclaration", - "span": { - "start": 386, - "end": 391, - "ctxt": 0 - }, - "kind": "var", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 390, - "end": 391, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 390, - "end": 391, - "ctxt": 0 - }, - "value": "n", - "optional": false, - "typeAnnotation": null - }, - "init": null, - "definite": false - } - ] - }, - "right": { - "type": "Identifier", - "span": { - "start": 395, - "end": 396, - "ctxt": 0 - }, - "value": "_", - "optional": false - }, - "body": { - "type": "BreakStatement", - "span": { - "start": 398, - "end": 404, - "ctxt": 0 - }, - "label": null - } - }, - { - "type": "ForInStatement", - "span": { - "start": 406, - "end": 437, - "ctxt": 0 - }, - "left": { - "type": "Identifier", - "span": { - "start": 411, - "end": 412, - "ctxt": 0 - }, - "value": "_", - "optional": false, - "typeAnnotation": null - }, - "right": { - "type": "Identifier", - "span": { - "start": 416, - "end": 417, - "ctxt": 0 - }, - "value": "_", - "optional": false - }, - "body": { - "type": "BlockStatement", - "span": { - "start": 419, - "end": 437, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 425, - "end": 435, - "ctxt": 0 - }, - "kind": "var", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 429, - "end": 434, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 429, - "end": 430, - "ctxt": 0 - }, - "value": "o", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "Identifier", - "span": { - "start": 433, - "end": 434, - "ctxt": 0 - }, - "value": "_", - "optional": false - }, - "definite": false - } - ] - } - ] - } - }, - { - "type": "ForOfStatement", - "span": { - "start": 439, - "end": 462, - "ctxt": 0 - }, - "await": false, - "left": { - "type": "VariableDeclaration", - "span": { - "start": 444, - "end": 449, - "ctxt": 0 - }, - "kind": "var", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 448, - "end": 449, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 448, - "end": 449, - "ctxt": 0 - }, - "value": "p", - "optional": false, - "typeAnnotation": null - }, - "init": null, - "definite": false - } - ] - }, - "right": { - "type": "Identifier", - "span": { - "start": 453, - "end": 454, - "ctxt": 0 - }, - "value": "_", - "optional": false - }, - "body": { - "type": "BreakStatement", - "span": { - "start": 456, - "end": 462, - "ctxt": 0 - }, - "label": null - } - }, - { - "type": "ForOfStatement", - "span": { - "start": 464, - "end": 495, - "ctxt": 0 - }, - "await": false, - "left": { - "type": "Identifier", - "span": { - "start": 469, - "end": 470, - "ctxt": 0 - }, - "value": "_", - "optional": false, - "typeAnnotation": null - }, - "right": { - "type": "Identifier", - "span": { - "start": 474, - "end": 475, - "ctxt": 0 - }, - "value": "_", - "optional": false - }, - "body": { - "type": "BlockStatement", - "span": { - "start": 477, - "end": 495, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 483, - "end": 493, - "ctxt": 0 - }, - "kind": "var", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 487, - "end": 492, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 487, - "end": 488, - "ctxt": 0 - }, - "value": "u", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "Identifier", - "span": { - "start": 491, - "end": 492, - "ctxt": 0 - }, - "value": "_", - "optional": false - }, - "definite": false - } - ] - } - ] - } - }, - { - "type": "TryStatement", - "span": { - "start": 497, - "end": 544, - "ctxt": 0 - }, - "block": { - "type": "BlockStatement", - "span": { - "start": 501, - "end": 519, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 507, - "end": 517, - "ctxt": 0 - }, - "kind": "var", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 511, - "end": 516, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 511, - "end": 512, - "ctxt": 0 - }, - "value": "v", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "Identifier", - "span": { - "start": 515, - "end": 516, - "ctxt": 0 - }, - "value": "_", - "optional": false - }, - "definite": false - } - ] - } - ] - }, - "handler": { - "type": "CatchClause", - "span": { - "start": 520, - "end": 544, - "ctxt": 0 - }, - "param": null, - "body": { - "type": "BlockStatement", - "span": { - "start": 526, - "end": 544, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 532, - "end": 542, - "ctxt": 0 - }, - "kind": "var", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 536, - "end": 541, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 536, - "end": 537, - "ctxt": 0 - }, - "value": "w", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "Identifier", - "span": { - "start": 540, - "end": 541, - "ctxt": 0 - }, - "value": "_", - "optional": false - }, - "definite": false - } - ] - } - ] - } - }, - "finalizer": null - }, - { - "type": "LabeledStatement", - "span": { - "start": 546, - "end": 588, - "ctxt": 0 - }, - "label": { - "type": "Identifier", - "span": { - "start": 546, - "end": 551, - "ctxt": 0 - }, - "value": "label", - "optional": false - }, - "body": { - "type": "BlockStatement", - "span": { - "start": 553, - "end": 588, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 559, - "end": 569, - "ctxt": 0 - }, - "kind": "var", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 563, - "end": 568, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 563, - "end": 564, - "ctxt": 0 - }, - "value": "x", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "Identifier", - "span": { - "start": 567, - "end": 568, - "ctxt": 0 - }, - "value": "_", - "optional": false - }, - "definite": false - } - ] - }, - { - "type": "BreakStatement", - "span": { - "start": 574, - "end": 586, - "ctxt": 0 - }, - "label": { - "type": "Identifier", - "span": { - "start": 580, - "end": 585, - "ctxt": 0 - }, - "value": "label", - "optional": false - } - } - ] - } - }, - { - "type": "WithStatement", - "span": { - "start": 604, - "end": 631, - "ctxt": 0 - }, - "object": { - "type": "Identifier", - "span": { - "start": 610, - "end": 611, - "ctxt": 0 - }, - "value": "_", - "optional": false - }, - "body": { - "type": "BlockStatement", - "span": { - "start": 613, - "end": 631, - "ctxt": 0 - }, - "stmts": [ - { - "type": "VariableDeclaration", - "span": { - "start": 619, - "end": 629, - "ctxt": 0 - }, - "kind": "var", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 623, - "end": 628, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 623, - "end": 624, - "ctxt": 0 - }, - "value": "y", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "Identifier", - "span": { - "start": 627, - "end": 628, - "ctxt": 0 - }, - "value": "_", - "optional": false - }, - "definite": false - } - ] - } - ] - } - }, - { - "type": "VariableDeclaration", - "span": { - "start": 633, - "end": 643, - "ctxt": 0 - }, - "kind": "var", - "declare": false, - "declarations": [ - { - "type": "VariableDeclarator", - "span": { - "start": 637, - "end": 642, - "ctxt": 0 - }, - "id": { - "type": "Identifier", - "span": { - "start": 637, - "end": 638, - "ctxt": 0 - }, - "value": "z", - "optional": false, - "typeAnnotation": null - }, - "init": { - "type": "Identifier", - "span": { - "start": 641, - "end": 642, - "ctxt": 0 - }, - "value": "_", - "optional": false - }, - "definite": false - } - ] - }, - { - "type": "ExportNamedDeclaration", - "span": { - "start": 645, - "end": 709, - "ctxt": 0 - }, - "specifiers": [ - { - "type": "ExportSpecifier", - "span": { - "start": 654, - "end": 655, - "ctxt": 0 - }, - "orig": { - "type": "Identifier", - "span": { - "start": 654, - "end": 655, - "ctxt": 0 - }, - "value": "a", - "optional": false - }, - "exported": null, - "isTypeOnly": false - }, - { - "type": "ExportSpecifier", - "span": { - "start": 657, - "end": 658, - "ctxt": 0 - }, - "orig": { - "type": "Identifier", - "span": { - "start": 657, - "end": 658, - "ctxt": 0 - }, - "value": "b", - "optional": false - }, - "exported": null, - "isTypeOnly": false - }, - { - "type": "ExportSpecifier", - "span": { - "start": 660, - "end": 661, - "ctxt": 0 - }, - "orig": { - "type": "Identifier", - "span": { - "start": 660, - "end": 661, - "ctxt": 0 - }, - "value": "c", - "optional": false - }, - "exported": null, - "isTypeOnly": false - }, - { - "type": "ExportSpecifier", - "span": { - "start": 663, - "end": 664, - "ctxt": 0 - }, - "orig": { - "type": "Identifier", - "span": { - "start": 663, - "end": 664, - "ctxt": 0 - }, - "value": "d", - "optional": false - }, - "exported": null, - "isTypeOnly": false - }, - { - "type": "ExportSpecifier", - "span": { - "start": 666, - "end": 667, - "ctxt": 0 - }, - "orig": { - "type": "Identifier", - "span": { - "start": 666, - "end": 667, - "ctxt": 0 - }, - "value": "e", - "optional": false - }, - "exported": null, - "isTypeOnly": false - }, - { - "type": "ExportSpecifier", - "span": { - "start": 669, - "end": 670, - "ctxt": 0 - }, - "orig": { - "type": "Identifier", - "span": { - "start": 669, - "end": 670, - "ctxt": 0 - }, - "value": "f", - "optional": false - }, - "exported": null, - "isTypeOnly": false - }, - { - "type": "ExportSpecifier", - "span": { - "start": 672, - "end": 673, - "ctxt": 0 - }, - "orig": { - "type": "Identifier", - "span": { - "start": 672, - "end": 673, - "ctxt": 0 - }, - "value": "g", - "optional": false - }, - "exported": null, - "isTypeOnly": false - }, - { - "type": "ExportSpecifier", - "span": { - "start": 675, - "end": 676, - "ctxt": 0 - }, - "orig": { - "type": "Identifier", - "span": { - "start": 675, - "end": 676, - "ctxt": 0 - }, - "value": "h", - "optional": false - }, - "exported": null, - "isTypeOnly": false - }, - { - "type": "ExportSpecifier", - "span": { - "start": 678, - "end": 679, - "ctxt": 0 - }, - "orig": { - "type": "Identifier", - "span": { - "start": 678, - "end": 679, - "ctxt": 0 - }, - "value": "m", - "optional": false - }, - "exported": null, - "isTypeOnly": false - }, - { - "type": "ExportSpecifier", - "span": { - "start": 681, - "end": 682, - "ctxt": 0 - }, - "orig": { - "type": "Identifier", - "span": { - "start": 681, - "end": 682, - "ctxt": 0 - }, - "value": "n", - "optional": false - }, - "exported": null, - "isTypeOnly": false - }, - { - "type": "ExportSpecifier", - "span": { - "start": 684, - "end": 685, - "ctxt": 0 - }, - "orig": { - "type": "Identifier", - "span": { - "start": 684, - "end": 685, - "ctxt": 0 - }, - "value": "o", - "optional": false - }, - "exported": null, - "isTypeOnly": false - }, - { - "type": "ExportSpecifier", - "span": { - "start": 687, - "end": 688, - "ctxt": 0 - }, - "orig": { - "type": "Identifier", - "span": { - "start": 687, - "end": 688, - "ctxt": 0 - }, - "value": "p", - "optional": false - }, - "exported": null, - "isTypeOnly": false - }, - { - "type": "ExportSpecifier", - "span": { - "start": 690, - "end": 691, - "ctxt": 0 - }, - "orig": { - "type": "Identifier", - "span": { - "start": 690, - "end": 691, - "ctxt": 0 - }, - "value": "u", - "optional": false - }, - "exported": null, - "isTypeOnly": false - }, - { - "type": "ExportSpecifier", - "span": { - "start": 693, - "end": 694, - "ctxt": 0 - }, - "orig": { - "type": "Identifier", - "span": { - "start": 693, - "end": 694, - "ctxt": 0 - }, - "value": "v", - "optional": false - }, - "exported": null, - "isTypeOnly": false - }, - { - "type": "ExportSpecifier", - "span": { - "start": 696, - "end": 697, - "ctxt": 0 - }, - "orig": { - "type": "Identifier", - "span": { - "start": 696, - "end": 697, - "ctxt": 0 - }, - "value": "w", - "optional": false - }, - "exported": null, - "isTypeOnly": false - }, - { - "type": "ExportSpecifier", - "span": { - "start": 699, - "end": 700, - "ctxt": 0 - }, - "orig": { - "type": "Identifier", - "span": { - "start": 699, - "end": 700, - "ctxt": 0 - }, - "value": "x", - "optional": false - }, - "exported": null, - "isTypeOnly": false - }, - { - "type": "ExportSpecifier", - "span": { - "start": 702, - "end": 703, - "ctxt": 0 - }, - "orig": { - "type": "Identifier", - "span": { - "start": 702, - "end": 703, - "ctxt": 0 - }, - "value": "y", - "optional": false - }, - "exported": null, - "isTypeOnly": false - }, - { - "type": "ExportSpecifier", - "span": { - "start": 705, - "end": 706, - "ctxt": 0 - }, - "orig": { - "type": "Identifier", - "span": { - "start": 705, - "end": 706, - "ctxt": 0 - }, - "value": "z", - "optional": false - }, - "exported": null, - "isTypeOnly": false - } - ], - "source": null, - "typeOnly": false, - "with": null - } - ], - "interpreter": null -} diff --git a/crates/swc_ecma_parser/tests/tsc/typeFromPropertyAssignmentOutOfOrder.ts b/crates/swc_ecma_parser/tests/tsc/typeFromPropertyAssignmentOutOfOrder.ts index cbb4f90b4400..7014abb5f31a 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeFromPropertyAssignmentOutOfOrder.ts +++ b/crates/swc_ecma_parser/tests/tsc/typeFromPropertyAssignmentOutOfOrder.ts @@ -1,7 +1,7 @@ // @noEmit: true // @allowJs: true // @checkJs: true -// @target: es3 +// @target: es5 // @filename: index.js First.Item = class I {} Common.Object = class extends First.Item {} diff --git a/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_js.json b/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_js.json index 036aed577333..488206b1cfa2 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_js.json +++ b/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_js.json @@ -1,16 +1,16 @@ { "type": "Script", "span": { - "start": 63, - "end": 93, + "start": 67, + "end": 97, "ctxt": 0 }, "body": [ { "type": "VariableDeclaration", "span": { - "start": 63, - "end": 93, + "start": 67, + "end": 97, "ctxt": 0 }, "kind": "var", @@ -19,15 +19,15 @@ { "type": "VariableDeclarator", "span": { - "start": 67, - "end": 92, + "start": 71, + "end": 96, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 67, - "end": 68, + "start": 71, + "end": 72, "ctxt": 0 }, "value": "v", @@ -37,15 +37,15 @@ "init": { "type": "TsSatisfiesExpression", "span": { - "start": 71, - "end": 92, + "start": 75, + "end": 96, "ctxt": 0 }, "expression": { "type": "Identifier", "span": { - "start": 71, - "end": 80, + "start": 75, + "end": 84, "ctxt": 0 }, "value": "undefined", @@ -54,15 +54,15 @@ "typeAnnotation": { "type": "TsLiteralType", "span": { - "start": 91, - "end": 92, + "start": 95, + "end": 96, "ctxt": 0 }, "literal": { "type": "NumericLiteral", "span": { - "start": 91, - "end": 92, + "start": 95, + "end": 96, "ctxt": 0 }, "value": 1.0, diff --git a/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_js.ts b/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_js.ts index 5826e4a20971..af47eeff3c33 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_js.ts +++ b/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_js.ts @@ -1,5 +1,5 @@ // @allowJs: true // @filename: /src/a.js -// @out: /lib/a.js +// @outFile: /lib/a.js var v = undefined satisfies 1; diff --git a/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarationsInJs.json b/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarationsInJs.json index 2c7e53de0c87..132bb11890ea 100644 --- a/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarationsInJs.json +++ b/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarationsInJs.json @@ -1,8 +1,8 @@ { "type": "Script", "span": { - "start": 234, - "end": 710, + "start": 238, + "end": 714, "ctxt": 0 }, "body": [ @@ -11,8 +11,8 @@ "identifier": { "type": "Identifier", "span": { - "start": 240, - "end": 241, + "start": 244, + "end": 245, "ctxt": 0 }, "value": "C", @@ -20,8 +20,8 @@ }, "declare": false, "span": { - "start": 234, - "end": 660, + "start": 238, + "end": 664, "ctxt": 0 }, "decorators": [], @@ -29,15 +29,15 @@ { "type": "ClassProperty", "span": { - "start": 281, - "end": 318, + "start": 285, + "end": 322, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 288, - "end": 306, + "start": 292, + "end": 310, "ctxt": 0 }, "value": "readonlyStaticCall", @@ -46,15 +46,15 @@ "value": { "type": "CallExpression", "span": { - "start": 309, - "end": 317, + "start": 313, + "end": 321, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { - "start": 309, - "end": 315, + "start": 313, + "end": 319, "ctxt": 0 }, "value": "Symbol", @@ -77,15 +77,15 @@ { "type": "ClassProperty", "span": { - "start": 385, - "end": 411, + "start": 389, + "end": 415, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 392, - "end": 410, + "start": 396, + "end": 414, "ctxt": 0 }, "value": "readonlyStaticType", @@ -106,15 +106,15 @@ { "type": "ClassProperty", "span": { - "start": 478, - "end": 522, + "start": 482, + "end": 526, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 485, - "end": 510, + "start": 489, + "end": 514, "ctxt": 0 }, "value": "readonlyStaticTypeAndCall", @@ -123,15 +123,15 @@ "value": { "type": "CallExpression", "span": { - "start": 513, - "end": 521, + "start": 517, + "end": 525, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { - "start": 513, - "end": 519, + "start": 517, + "end": 523, "ctxt": 0 }, "value": "Symbol", @@ -154,15 +154,15 @@ { "type": "ClassProperty", "span": { - "start": 527, - "end": 565, + "start": 531, + "end": 569, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 534, - "end": 553, + "start": 538, + "end": 557, "ctxt": 0 }, "value": "readwriteStaticCall", @@ -171,15 +171,15 @@ "value": { "type": "CallExpression", "span": { - "start": 556, - "end": 564, + "start": 560, + "end": 568, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { - "start": 556, - "end": 562, + "start": 560, + "end": 566, "ctxt": 0 }, "value": "Symbol", @@ -202,15 +202,15 @@ { "type": "ClassProperty", "span": { - "start": 604, - "end": 628, + "start": 608, + "end": 632, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 604, - "end": 616, + "start": 608, + "end": 620, "ctxt": 0 }, "value": "readonlyCall", @@ -219,15 +219,15 @@ "value": { "type": "CallExpression", "span": { - "start": 619, - "end": 627, + "start": 623, + "end": 631, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { - "start": 619, - "end": 625, + "start": 623, + "end": 629, "ctxt": 0 }, "value": "Symbol", @@ -250,15 +250,15 @@ { "type": "ClassProperty", "span": { - "start": 633, - "end": 658, + "start": 637, + "end": 662, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 633, - "end": 646, + "start": 637, + "end": 650, "ctxt": 0 }, "value": "readwriteCall", @@ -267,15 +267,15 @@ "value": { "type": "CallExpression", "span": { - "start": 649, - "end": 657, + "start": 653, + "end": 661, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { - "start": 649, - "end": 655, + "start": 653, + "end": 659, "ctxt": 0 }, "value": "Symbol", @@ -305,8 +305,8 @@ { "type": "VariableDeclaration", "span": { - "start": 691, - "end": 710, + "start": 695, + "end": 714, "ctxt": 0 }, "kind": "const", @@ -315,15 +315,15 @@ { "type": "VariableDeclarator", "span": { - "start": 697, - "end": 709, + "start": 701, + "end": 713, "ctxt": 0 }, "id": { "type": "Identifier", "span": { - "start": 697, - "end": 698, + "start": 701, + "end": 702, "ctxt": 0 }, "value": "a", @@ -333,15 +333,15 @@ "init": { "type": "CallExpression", "span": { - "start": 701, - "end": 709, + "start": 705, + "end": 713, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { - "start": 701, - "end": 707, + "start": 705, + "end": 711, "ctxt": 0 }, "value": "Symbol", diff --git a/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarationsInJs.ts b/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarationsInJs.ts index 9ba9147faac4..55f36b812b11 100644 --- a/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarationsInJs.ts +++ b/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarationsInJs.ts @@ -4,7 +4,7 @@ // @allowJs: true // @checkJs: true // @filename: uniqueSymbolsDeclarationsInJs.js -// @out: uniqueSymbolsDeclarationsInJs-out.js +// @outFile: uniqueSymbolsDeclarationsInJs-out.js // @useDefineForClassFields: false // classes diff --git a/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarationsInJsErrors.json b/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarationsInJsErrors.json index cfff295badff..1cc1413c1007 100644 --- a/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarationsInJsErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarationsInJsErrors.json @@ -1,8 +1,8 @@ { "type": "Script", "span": { - "start": 235, - "end": 481, + "start": 239, + "end": 485, "ctxt": 0 }, "body": [ @@ -11,8 +11,8 @@ "identifier": { "type": "Identifier", "span": { - "start": 241, - "end": 242, + "start": 245, + "end": 246, "ctxt": 0 }, "value": "C", @@ -20,8 +20,8 @@ }, "declare": false, "span": { - "start": 235, - "end": 481, + "start": 239, + "end": 485, "ctxt": 0 }, "decorators": [], @@ -29,15 +29,15 @@ { "type": "ClassProperty", "span": { - "start": 294, - "end": 321, + "start": 298, + "end": 325, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 301, - "end": 320, + "start": 305, + "end": 324, "ctxt": 0 }, "value": "readwriteStaticType", @@ -58,15 +58,15 @@ { "type": "ClassProperty", "span": { - "start": 388, - "end": 408, + "start": 392, + "end": 412, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 395, - "end": 407, + "start": 399, + "end": 411, "ctxt": 0 }, "value": "readonlyType", @@ -87,15 +87,15 @@ { "type": "ClassProperty", "span": { - "start": 458, - "end": 479, + "start": 462, + "end": 483, "ctxt": 0 }, "key": { "type": "Identifier", "span": { - "start": 465, - "end": 478, + "start": 469, + "end": 482, "ctxt": 0 }, "value": "readwriteType", diff --git a/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarationsInJsErrors.ts b/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarationsInJsErrors.ts index 8bf87812bb09..b47e25a690f8 100644 --- a/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarationsInJsErrors.ts +++ b/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarationsInJsErrors.ts @@ -4,7 +4,7 @@ // @allowJs: true // @checkJs: true // @filename: uniqueSymbolsDeclarationsInJsErrors.js -// @out: uniqueSymbolsDeclarationsInJsErrors-out.js +// @outFile: uniqueSymbolsDeclarationsInJsErrors-out.js // @useDefineForClassFields: false class C { @@ -21,4 +21,4 @@ class C { * @type {unique symbol} */ static readwriteType; -} \ No newline at end of file +} diff --git a/crates/swc_ecma_parser/tests/tsc/usingDeclarationsWithImportHelpers.ts b/crates/swc_ecma_parser/tests/tsc/usingDeclarationsWithImportHelpers.ts index ef6d86cc7297..39d0d9436fb5 100644 --- a/crates/swc_ecma_parser/tests/tsc/usingDeclarationsWithImportHelpers.ts +++ b/crates/swc_ecma_parser/tests/tsc/usingDeclarationsWithImportHelpers.ts @@ -1,4 +1,4 @@ -// @target: esnext +// @target: es2022 // @module: esnext // @lib: esnext // @importHelpers: true diff --git a/crates/swc_ecma_parser/tests/tsc/variadicTuples1.json b/crates/swc_ecma_parser/tests/tsc/variadicTuples1.json index 4043cf14e2c3..bb71a47bcd17 100644 --- a/crates/swc_ecma_parser/tests/tsc/variadicTuples1.json +++ b/crates/swc_ecma_parser/tests/tsc/variadicTuples1.json @@ -2,7 +2,7 @@ "type": "Script", "span": { "start": 70, - "end": 13612, + "end": 13637, "ctxt": 0 }, "body": [ @@ -30407,6 +30407,62 @@ ] } } + }, + { + "type": "TsTypeAliasDeclaration", + "span": { + "start": 13614, + "end": 13637, + "ctxt": 0 + }, + "declare": false, + "id": { + "type": "Identifier", + "span": { + "start": 13619, + "end": 13625, + "ctxt": 0 + }, + "value": "AnyArr", + "optional": false + }, + "typeParams": null, + "typeAnnotation": { + "type": "TsTupleType", + "span": { + "start": 13628, + "end": 13636, + "ctxt": 0 + }, + "elemTypes": [ + { + "type": "TsTupleElement", + "span": { + "start": 13629, + "end": 13635, + "ctxt": 0 + }, + "label": null, + "ty": { + "type": "TsRestType", + "span": { + "start": 13629, + "end": 13635, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsKeywordType", + "span": { + "start": 13632, + "end": 13635, + "ctxt": 0 + }, + "kind": "any" + } + } + } + ] + } } ], "interpreter": null diff --git a/crates/swc_ecma_parser/tests/tsc/variadicTuples1.ts b/crates/swc_ecma_parser/tests/tsc/variadicTuples1.ts index 23eec07a6843..1c8b73e26d6a 100644 --- a/crates/swc_ecma_parser/tests/tsc/variadicTuples1.ts +++ b/crates/swc_ecma_parser/tests/tsc/variadicTuples1.ts @@ -421,3 +421,5 @@ type U3 = [...[string, number], boolean]; type ToStringLength1 = `${T['length']}`; type ToStringLength2 = `${[...T]['length']}`; + +type AnyArr = [...any]; diff --git a/crates/swc_ecma_parser/tests/typescript.rs b/crates/swc_ecma_parser/tests/typescript.rs index a55c6df25817..0495747ee189 100644 --- a/crates/swc_ecma_parser/tests/typescript.rs +++ b/crates/swc_ecma_parser/tests/typescript.rs @@ -78,7 +78,13 @@ fn spec(file: PathBuf) { run_spec(&file, &output); } -#[testing::fixture("tests/tsc/**/*.ts", exclude("parserArrowFunctionExpression11"))] +#[testing::fixture( + "tests/tsc/**/*.ts", + exclude( + "parserArrowFunctionExpression11", + "esDecorators-decoratorExpression.1" + ) +)] fn tsc_spec(file: PathBuf) { let output = file.with_extension("json"); run_spec(&file, &output); diff --git a/crates/swc_ecma_transforms_typescript/tests/strip_correctness.rs b/crates/swc_ecma_transforms_typescript/tests/strip_correctness.rs index 4a6dcfc8e297..8629fb871ad6 100644 --- a/crates/swc_ecma_transforms_typescript/tests/strip_correctness.rs +++ b/crates/swc_ecma_transforms_typescript/tests/strip_correctness.rs @@ -63,6 +63,9 @@ fn identity(entry: PathBuf) { "esDecorators-classDeclaration-classSuper.2.ts", "esDecorators-classExpression-classSuper.2.ts", "contextualTypes.ts", + "decoratorOnClassMethod12.ts", + "decoratorExpression.2.ts", + "preservesThis.ts", ]; // TODO: Unignore const enum test From a5d1e579cbf3a05713fc1350f09fc9299be174f8 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Thu, 11 Apr 2024 07:24:41 +0000 Subject: [PATCH 102/172] chore: Bump crates --- CHANGELOG.md | 9 ++++++--- Cargo.lock | 2 +- crates/dbg-swc/Cargo.toml | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e78317cc289..353622a4b047 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,12 @@ - **(visit)** Simplify `Vec::move_map` ([#8838](https://github.com/swc-project/swc/issues/8838)) ([b1973d4](https://github.com/swc-project/swc/commit/b1973d490afc8e4bc597192caab7a3aa8eb2701d)) +### Testing + + + +- **(es)** Update `conformance` test suite from `tsc` ([#8834](https://github.com/swc-project/swc/issues/8834)) ([ea5d9cc](https://github.com/swc-project/swc/commit/ea5d9cc52413a1270e25af93c353baf10282fd86)) + ## [1.4.13] - 2024-04-09 ### Bug Fixes @@ -1355,9 +1361,6 @@ - **(es/minifier)** Handle `ModuleDecl` when transform const modules ([#7959](https://github.com/swc-project/swc/issues/7959)) ([06ca1fe](https://github.com/swc-project/swc/commit/06ca1fe0a03954883750c3c39d0163fc29596ad1)) - -- **(es/module)** Preserve import specifier if resolving fails ([#7955](https://github.com/swc-project/swc/issues/7955)) ([be5b02a](https://github.com/swc-project/swc/commit/be5b02a8cfe2a2c1c399a4f9404b8fd097084234)) - ### Miscellaneous Tasks diff --git a/Cargo.lock b/Cargo.lock index f908b986f023..d167580cf6fa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1064,7 +1064,7 @@ checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] name = "dbg-swc" -version = "0.91.26" +version = "0.91.27" dependencies = [ "anyhow", "clap 3.2.25", diff --git a/crates/dbg-swc/Cargo.toml b/crates/dbg-swc/Cargo.toml index 4379e9ba5aa8..158d7299ea86 100644 --- a/crates/dbg-swc/Cargo.toml +++ b/crates/dbg-swc/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "Apache-2.0" name = "dbg-swc" repository = "https://github.com/kdy1/dbg-swc.git" -version = "0.91.26" +version = "0.91.27" [[bin]] bench = false From b0df6e53411350f7761cd5cb43a34945d2134177 Mon Sep 17 00:00:00 2001 From: LongYinan Date: Fri, 12 Apr 2024 11:59:25 +0800 Subject: [PATCH 103/172] chore(ci): Add miri tests (#8847) It can help to find some UB in swc --- .github/workflows/CI.yml | 47 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c3ac1ef21206..319abd2c12e6 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -853,6 +853,53 @@ jobs: export NODE_OPTIONS="--unhandled-rejections=warn" (cd crates/swc_node_bundler/tests/integration/react && npm install && npx spack) + miri: + name: Miri + runs-on: ubuntu-latest + if: >- + ${{ !contains(github.event.head_commit.message, 'chore: ') }} + strategy: + fail-fast: false + matrix: + crate: + - better_scoped_tls + - string_enum + - swc + - swc_bundler + - swc_ecma_codegen + - swc_ecma_minifier + steps: + - uses: actions/checkout@v4 + with: + submodules: true + + - uses: actions/setup-node@v4 + with: + node-version: "18" + cache: "yarn" + + - name: Install node dependencies + shell: bash + run: yarn + + - name: Print rustup toolchain version + shell: bash + id: rustup-version + run: | + export RUST_TOOLCHAIN="$(cat rust-toolchain | tr -d '\n')" + echo "Rust toolchain: $RUST_TOOLCHAIN" + echo "RUST_TOOLCHAIN=$RUST_TOOLCHAIN" >> "$GITHUB_OUTPUT" + + - name: Install + uses: dtolnay/rust-toolchain@stable + with: + toolchain: "${{ steps.rustup-version.outputs.RUST_TOOLCHAIN }}" + components: miri + + - run: cargo miri test -p ${{ matrix.crate }} --no-fail-fast + continue-on-error: true + env: + MIRIFLAGS: "-Zmiri-disable-isolation" done: needs: - cargo-fmt From cfe7029d2e7a909d4bcee990b521bfbfbea7b5b4 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Fri, 12 Apr 2024 04:01:13 +0000 Subject: [PATCH 104/172] chore: Bump crates --- CHANGELOG.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 353622a4b047..432fb2b93560 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1356,9 +1356,6 @@ -- **(es/compat)** Handle `PrivateName` in `logical_assignments` ([#7958](https://github.com/swc-project/swc/issues/7958)) ([28318f0](https://github.com/swc-project/swc/commit/28318f09ed358b2baa155141bc715c25f658a2eb)) - - - **(es/minifier)** Handle `ModuleDecl` when transform const modules ([#7959](https://github.com/swc-project/swc/issues/7959)) ([06ca1fe](https://github.com/swc-project/swc/commit/06ca1fe0a03954883750c3c39d0163fc29596ad1)) ### Miscellaneous Tasks From c0d901eac6539940ce1956ec5031f624c4c049f0 Mon Sep 17 00:00:00 2001 From: magic-akari Date: Fri, 12 Apr 2024 12:47:08 +0800 Subject: [PATCH 105/172] doc(swc_core): Resolve build issue with `--all-features` flag (#8848) **Related issue:** - Closes #8829 --- crates/swc_common/src/plugin/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/swc_common/src/plugin/mod.rs b/crates/swc_common/src/plugin/mod.rs index 2185d1d269a9..66be51bc00b8 100644 --- a/crates/swc_common/src/plugin/mod.rs +++ b/crates/swc_common/src/plugin/mod.rs @@ -23,5 +23,8 @@ pub mod serialized; pub const PLUGIN_TRANSFORM_AST_SCHEMA_VERSION: u32 = 1; // Reserved for the testing purpose. -#[cfg(feature = "plugin_transform_schema_vtest")] +#[cfg(all( + feature = "plugin_transform_schema_vtest", + not(feature = "plugin_transform_schema_v1") +))] pub const PLUGIN_TRANSFORM_AST_SCHEMA_VERSION: u32 = u32::MAX - 1; From 586ab9a4a48cfed6f0de12615fb8973d119cb58f Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Fri, 12 Apr 2024 04:48:39 +0000 Subject: [PATCH 106/172] chore: Bump crates --- CHANGELOG.md | 12 ++++++------ Cargo.lock | 2 +- crates/swc_common/Cargo.toml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 432fb2b93560..3dc4777e7d10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ - **(es/compat)** Handle class fields correctly ([#8835](https://github.com/swc-project/swc/issues/8835)) ([5cc585b](https://github.com/swc-project/swc/commit/5cc585b8f3359d960420e31a91f53c761c90f3f5)) +### Documentation + + + +- **(swc_core)** Resolve build issue with `--all-features` flag ([#8848](https://github.com/swc-project/swc/issues/8848)) ([c0d901e](https://github.com/swc-project/swc/commit/c0d901eac6539940ce1956ec5031f624c4c049f0)) + ### Refactor @@ -1352,12 +1358,6 @@ ## [1.3.86] - 2023-09-18 -### Bug Fixes - - - -- **(es/minifier)** Handle `ModuleDecl` when transform const modules ([#7959](https://github.com/swc-project/swc/issues/7959)) ([06ca1fe](https://github.com/swc-project/swc/commit/06ca1fe0a03954883750c3c39d0163fc29596ad1)) - ### Miscellaneous Tasks diff --git a/Cargo.lock b/Cargo.lock index d167580cf6fa..8c22f071c97c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3854,7 +3854,7 @@ dependencies = [ [[package]] name = "swc_common" -version = "0.33.22" +version = "0.33.23" dependencies = [ "ahash 0.8.8", "anyhow", diff --git a/crates/swc_common/Cargo.toml b/crates/swc_common/Cargo.toml index 9ca175e3a680..a20c7b5e2ac7 100644 --- a/crates/swc_common/Cargo.toml +++ b/crates/swc_common/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_common" repository = "https://github.com/swc-project/swc.git" -version = "0.33.22" +version = "0.33.23" [package.metadata.docs.rs] all-features = true From 67bfcf41f59699ebb5286211fcc2cf5546f94376 Mon Sep 17 00:00:00 2001 From: sschen86 Date: Fri, 12 Apr 2024 15:21:32 +0800 Subject: [PATCH 107/172] fix(es/helpers): Add missing helpers (#8843) --- packages/helpers/esm/_identity.js | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 packages/helpers/esm/_identity.js diff --git a/packages/helpers/esm/_identity.js b/packages/helpers/esm/_identity.js new file mode 100644 index 000000000000..7e4f0d5ead19 --- /dev/null +++ b/packages/helpers/esm/_identity.js @@ -0,0 +1,3 @@ +export function _identity(x) { return x; } + +export { _identity as _ }; \ No newline at end of file From 86c22f3ffa966c2474379ca5833b60fbde409ccd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Fri, 12 Apr 2024 16:22:30 +0900 Subject: [PATCH 108/172] chore: Publish `@swc/helpers@0.5.9` --- packages/helpers/package.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/helpers/package.json b/packages/helpers/package.json index 6eb9f666531f..c637a26d182a 100644 --- a/packages/helpers/package.json +++ b/packages/helpers/package.json @@ -1,7 +1,7 @@ { "name": "@swc/helpers", "packageManager": "yarn@4.0.2", - "version": "0.5.8", + "version": "0.5.9", "description": "External helpers for the swc project.", "module": "esm/index.js", "main": "cjs/index.cjs", @@ -251,6 +251,10 @@ "import": "./esm/_get_prototype_of.js", "default": "./cjs/_get_prototype_of.cjs" }, + "./_/_identity": { + "import": "./esm/_identity.js", + "default": "./cjs/_identity.cjs" + }, "./_/_inherits": { "import": "./esm/_inherits.js", "default": "./cjs/_inherits.cjs" From 187ceb199afc1b3ef3ed08f0c35f6701bb65f0b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Fri, 12 Apr 2024 16:22:56 +0900 Subject: [PATCH 109/172] chore: Format helpers --- packages/helpers/esm/_identity.js | 6 ++++-- packages/helpers/esm/index.js | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/helpers/esm/_identity.js b/packages/helpers/esm/_identity.js index 7e4f0d5ead19..f05917b99a85 100644 --- a/packages/helpers/esm/_identity.js +++ b/packages/helpers/esm/_identity.js @@ -1,3 +1,5 @@ -export function _identity(x) { return x; } +export function _identity(x) { + return x; +} -export { _identity as _ }; \ No newline at end of file +export { _identity as _ }; diff --git a/packages/helpers/esm/index.js b/packages/helpers/esm/index.js index 9864c25f951c..377b09b19af6 100644 --- a/packages/helpers/esm/index.js +++ b/packages/helpers/esm/index.js @@ -51,6 +51,7 @@ export { _export_star } from "./_export_star.js"; export { _extends } from "./_extends.js"; export { _get } from "./_get.js"; export { _get_prototype_of } from "./_get_prototype_of.js"; +export { _identity } from "./_identity.js"; export { _inherits } from "./_inherits.js"; export { _inherits_loose } from "./_inherits_loose.js"; export { _initializer_define_property } from "./_initializer_define_property.js"; From 62c4f5efb84daa5f9e7f88bbbfddd7823bb1355d Mon Sep 17 00:00:00 2001 From: Hana Date: Fri, 12 Apr 2024 16:05:34 +0800 Subject: [PATCH 110/172] fix(es/plugin): Create `tokio` runtime only if necessary (#8845) **Description:** Create tokio runtime if it's not in an async context. **Related issue:** - https://github.com/web-infra-dev/rspack/issues/6209 This maybe related to this issue, since creating new tokio runtime consumes a lot of system resource. --- crates/swc/src/plugin.rs | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/crates/swc/src/plugin.rs b/crates/swc/src/plugin.rs index 0cf9b37c3e7f..35be19cd62e9 100644 --- a/crates/swc/src/plugin.rs +++ b/crates/swc/src/plugin.rs @@ -55,16 +55,19 @@ impl RustPlugins { return Ok(n); } - tokio::runtime::Runtime::new() - .unwrap() - .block_on(async move { - self.apply_inner(n).with_context(|| { - format!( - "failed to invoke plugin on '{:?}'", - self.metadata_context.filename - ) - }) + let fut = async move { + self.apply_inner(n).with_context(|| { + format!( + "failed to invoke plugin on '{:?}'", + self.metadata_context.filename + ) }) + }; + if let Ok(handle) = tokio::runtime::Handle::try_current() { + handle.block_on(fut) + } else { + tokio::runtime::Runtime::new().unwrap().block_on(fut) + } } #[tracing::instrument(level = "info", skip_all, name = "apply_plugins")] From 6bc4de6536254d5a8d0da9cd11fa31e33e8c5184 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Fri, 12 Apr 2024 08:07:12 +0000 Subject: [PATCH 111/172] chore: Bump crates --- CHANGELOG.md | 18 ++++++------------ Cargo.lock | 2 +- crates/swc/Cargo.toml | 2 +- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3dc4777e7d10..371a30073199 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ - **(es/compat)** Handle class fields correctly ([#8835](https://github.com/swc-project/swc/issues/8835)) ([5cc585b](https://github.com/swc-project/swc/commit/5cc585b8f3359d960420e31a91f53c761c90f3f5)) + +- **(es/helpers)** Add missing helpers ([#8843](https://github.com/swc-project/swc/issues/8843)) ([67bfcf4](https://github.com/swc-project/swc/commit/67bfcf41f59699ebb5286211fcc2cf5546f94376)) + + +- **(es/plugin)** Create `tokio` runtime only if necessary ([#8845](https://github.com/swc-project/swc/issues/8845)) ([62c4f5e](https://github.com/swc-project/swc/commit/62c4f5efb84daa5f9e7f88bbbfddd7823bb1355d)) + ### Documentation @@ -1358,22 +1364,10 @@ ## [1.3.86] - 2023-09-18 -### Miscellaneous Tasks - - - -- **(es/preset-env)** Ignore `tp` in the version of a browser version ([#7968](https://github.com/swc-project/swc/issues/7968)) ([005ddc5](https://github.com/swc-project/swc/commit/005ddc573e3752183783cc25dd6242b750f8beb5)) - ### Refactor - **(es/lint)** Remove usage of `box_patterns` ([#7966](https://github.com/swc-project/swc/issues/7966)) ([f7b5e16](https://github.com/swc-project/swc/commit/f7b5e16aef968c9c9f38f40962edf334cc3983e6)) -### Build - - - -- **(bindings/node)** Link msvc runtime statically ([#7965](https://github.com/swc-project/swc/issues/7965)) ([0759779](https://github.com/swc-project/swc/commit/07597795cc39cce527f505bc5db304ad93082494)) - diff --git a/Cargo.lock b/Cargo.lock index 8c22f071c97c..dabf9331d2fc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3705,7 +3705,7 @@ dependencies = [ [[package]] name = "swc" -version = "0.273.24" +version = "0.273.25" dependencies = [ "ansi_term", "anyhow", diff --git a/crates/swc/Cargo.toml b/crates/swc/Cargo.toml index 5fb859bcd9d3..aa72935b344f 100644 --- a/crates/swc/Cargo.toml +++ b/crates/swc/Cargo.toml @@ -9,7 +9,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc" repository = "https://github.com/swc-project/swc.git" -version = "0.273.24" +version = "0.273.25" [lib] bench = false From a7a32c4b6c2089dfbe9be2f70a0c4712e9feeef4 Mon Sep 17 00:00:00 2001 From: Austaras Date: Fri, 12 Apr 2024 16:33:01 +0800 Subject: [PATCH 112/172] fix(es/utils): Preserve optional chain effect (#8850) **Related issue:** - Closes #8844 --- .../swc_ecma_minifier/tests/fixture/issues/8844/input.js | 7 +++++++ .../tests/fixture/issues/8844/output.js | 2 ++ crates/swc_ecma_utils/src/lib.rs | 9 +-------- 3 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 crates/swc_ecma_minifier/tests/fixture/issues/8844/input.js create mode 100644 crates/swc_ecma_minifier/tests/fixture/issues/8844/output.js diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/8844/input.js b/crates/swc_ecma_minifier/tests/fixture/issues/8844/input.js new file mode 100644 index 000000000000..b74e9da5b49e --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/8844/input.js @@ -0,0 +1,7 @@ +const k = (() => { + let x; + switch (x) { + case x?.x?.(): + default: + } +})(); diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/8844/output.js b/crates/swc_ecma_minifier/tests/fixture/issues/8844/output.js new file mode 100644 index 000000000000..a6899ca3223a --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/8844/output.js @@ -0,0 +1,2 @@ +let x; +x?.x?.(); diff --git a/crates/swc_ecma_utils/src/lib.rs b/crates/swc_ecma_utils/src/lib.rs index 0db4830d7c0d..8d92575df9cb 100644 --- a/crates/swc_ecma_utils/src/lib.rs +++ b/crates/swc_ecma_utils/src/lib.rs @@ -2520,11 +2520,6 @@ impl ExprCtx { to.push(Box::new(Expr::New(e))) } Expr::Member(_) | Expr::SuperProp(_) => to.push(Box::new(expr)), - Expr::OptChain(OptChainExpr { ref base, .. }) - if matches!(&**base, OptChainBase::Member(_)) => - { - to.push(Box::new(expr)) - } // We are at here because we could not determine value of test. //TODO: Drop values if it does not have side effects. @@ -2664,9 +2659,7 @@ impl ExprCtx { | Expr::TsSatisfies(TsSatisfiesExpr { expr, .. }) => { self.extract_side_effects_to(to, *expr) } - Expr::OptChain(OptChainExpr { base: child, .. }) => { - self.extract_side_effects_to(to, (*child).into()) - } + Expr::OptChain(..) => to.push(Box::new(expr)), Expr::Invalid(..) => unreachable!(), } From fcc82a5a5be00899e4e3e271ec136713bc6a932d Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Fri, 12 Apr 2024 08:34:38 +0000 Subject: [PATCH 113/172] chore: Bump crates --- CHANGELOG.md | 11 +++-------- Cargo.lock | 2 +- crates/swc_ecma_utils/Cargo.toml | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 371a30073199..de4d15c1ddc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,9 @@ - **(es/plugin)** Create `tokio` runtime only if necessary ([#8845](https://github.com/swc-project/swc/issues/8845)) ([62c4f5e](https://github.com/swc-project/swc/commit/62c4f5efb84daa5f9e7f88bbbfddd7823bb1355d)) + +- **(es/utils)** Preserve optional chain effect ([#8850](https://github.com/swc-project/swc/issues/8850)) ([a7a32c4](https://github.com/swc-project/swc/commit/a7a32c4b6c2089dfbe9be2f70a0c4712e9feeef4)) + ### Documentation @@ -1362,12 +1365,4 @@ - **(es/minifier)** Do not inline into a template literal with sequential inliner ([#7971](https://github.com/swc-project/swc/issues/7971)) ([b3d3a7b](https://github.com/swc-project/swc/commit/b3d3a7bc7339776e57ca402e77cf3fb22c774784)) -## [1.3.86] - 2023-09-18 - -### Refactor - - - -- **(es/lint)** Remove usage of `box_patterns` ([#7966](https://github.com/swc-project/swc/issues/7966)) ([f7b5e16](https://github.com/swc-project/swc/commit/f7b5e16aef968c9c9f38f40962edf334cc3983e6)) - diff --git a/Cargo.lock b/Cargo.lock index dabf9331d2fc..fd5822fa33c6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4886,7 +4886,7 @@ dependencies = [ [[package]] name = "swc_ecma_utils" -version = "0.127.17" +version = "0.127.18" dependencies = [ "indexmap 2.1.0", "num_cpus", diff --git a/crates/swc_ecma_utils/Cargo.toml b/crates/swc_ecma_utils/Cargo.toml index 078b3dea143f..dd50f469316d 100644 --- a/crates/swc_ecma_utils/Cargo.toml +++ b/crates/swc_ecma_utils/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_utils" repository = "https://github.com/swc-project/swc.git" -version = "0.127.17" +version = "0.127.18" [package.metadata.docs.rs] all-features = true From 7a89e5da3be25d00e5cc18b46c847f0e8de54022 Mon Sep 17 00:00:00 2001 From: magic-akari Date: Sat, 13 Apr 2024 10:11:32 +0800 Subject: [PATCH 114/172] fix(es/minifier): Handle switch cases (#8854) **Related issue:** - Closes #8813 --- .../switchStatements.2.minified.js | 25 ++++++- .../tests/fixture/issues/8813/input.js | 74 +++++++++++++++++++ .../tests/fixture/issues/8813/output.js | 36 +++++++++ .../compress/functions/issue_2620_4/output.js | 10 ++- .../src/simplify/branch/mod.rs | 21 +++--- .../src/simplify/branch/tests.rs | 23 +++--- 6 files changed, 161 insertions(+), 28 deletions(-) create mode 100644 crates/swc_ecma_minifier/tests/fixture/issues/8813/input.js create mode 100644 crates/swc_ecma_minifier/tests/fixture/issues/8813/output.js diff --git a/crates/swc/tests/tsc-references/switchStatements.2.minified.js b/crates/swc/tests/tsc-references/switchStatements.2.minified.js index 62da59942486..1529c3c0e161 100644 --- a/crates/swc/tests/tsc-references/switchStatements.2.minified.js +++ b/crates/swc/tests/tsc-references/switchStatements.2.minified.js @@ -3,9 +3,30 @@ import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; import { _ as _inherits } from "@swc/helpers/_/_inherits"; import { _ as _type_of } from "@swc/helpers/_/_type_of"; import { _ as _create_super } from "@swc/helpers/_/_create_super"; -(M || (M = {})).fn = function(x) { +switch((M || (M = {})).fn = function(x) { return ""; -}, void 0 === x || _type_of(x), void 0 === M || _type_of(M), M.fn(1); +}, x){ + case "": + case 12: + case !0: + case null: + case void 0: + case new Date(12): + case {}: + case /[a-z]/: + case []: + case {}: + case { + id: 12 + }: + case [ + "a" + ]: + case void 0 === x ? "undefined" : _type_of(x): + case void 0 === M ? "undefined" : _type_of(M): + case M.fn(1): + default: +} var M, x, C = function C() { _class_call_check(this, C); }, D = function(C) { diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/8813/input.js b/crates/swc_ecma_minifier/tests/fixture/issues/8813/input.js new file mode 100644 index 000000000000..df693c4b9fd0 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/8813/input.js @@ -0,0 +1,74 @@ +const k1 = (() => { + const x = 'asdf'; + let y = "PASS 1"; + switch (x) { + case x: + default: + case y = "FAIL": + } + console.log(y); +})(); + +const k2 = (() => { + const x = 'asdf'; + let y = "PASS 2"; + switch (x) { + case x: + case y = "FAIL": + default: + } + console.log(y); +})(); + +const k3 = (() => { + const x = 'asdf'; + let y = "FAIL"; + switch (x) { + case (y = "PASS 3", x): + default: + } + console.log(y); +})(); + +const k4 = (() => { + const x = 'asdf'; + let y = "FAIL"; + switch (x) { + case y = "PASS 4": + case x: + default: + } + console.log(y); +})(); + +const k5 = (() => { + const x = 'asdf'; + let y = "FAIL"; + let z = "FAIL"; + switch (x) { + case y = "PASS 5": + case z = "PASS 5": + case x: + default: + } + console.log(y, z); +})(); + + +var c = "FAIL"; +(function () { + function f(a, NaN) { + function g() { + switch (a) { + case a: + break; + case ((c = "PASS"), NaN): + c = "FAIL" + break; + } + } + g(); + } + f(0 / 0); +})(); +console.log(c); diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/8813/output.js b/crates/swc_ecma_minifier/tests/fixture/issues/8813/output.js new file mode 100644 index 000000000000..d4efd4188d68 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/8813/output.js @@ -0,0 +1,36 @@ +(()=>{ + const x = 'asdf'; + let y = "PASS 1"; + switch(x){ + case x: + default: + case y = "FAIL": + } + console.log(y); +})(), (()=>{ + const x = 'asdf'; + let y = "PASS 2"; + switch(x){ + case x: + case y = "FAIL": + default: + } + console.log(y); +})(), console.log("PASS 3"), console.log("PASS 4"), (()=>{ + let y = "FAIL", z = "FAIL"; + switch('asdf'){ + case y = "PASS 5": + case z = "PASS 5": + default: + } + console.log(y, z); +})(); +var a, c = "FAIL"; +a = 0 / 0, function() { + switch(a){ + case a: + break; + case void (c = "PASS"): + c = "FAIL"; + } +}(), console.log(c); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/functions/issue_2620_4/output.js b/crates/swc_ecma_minifier/tests/terser/compress/functions/issue_2620_4/output.js index 3ad5c69c38c8..28d83af6891f 100644 --- a/crates/swc_ecma_minifier/tests/terser/compress/functions/issue_2620_4/output.js +++ b/crates/swc_ecma_minifier/tests/terser/compress/functions/issue_2620_4/output.js @@ -1,4 +1,10 @@ var c = "FAIL"; -var a, NaN; -a = 0, c = "PASS"; +(function(a, NaN) { + (function() { + switch(a){ + case a: + case void (c = "PASS"): + } + })(); +})(0 / 0); console.log(c); diff --git a/crates/swc_ecma_transforms_optimization/src/simplify/branch/mod.rs b/crates/swc_ecma_transforms_optimization/src/simplify/branch/mod.rs index 294a117b334d..f0d90afa9606 100644 --- a/crates/swc_ecma_transforms_optimization/src/simplify/branch/mod.rs +++ b/crates/swc_ecma_transforms_optimization/src/simplify/branch/mod.rs @@ -729,9 +729,6 @@ impl VisitMut for Remover { &Expr::Lit(Lit::Bool(Bool { value: d, .. })), ) => test == d, (&Expr::Lit(Lit::Null(..)), &Expr::Lit(Lit::Null(..))) => true, - (Expr::Ident(test), Expr::Ident(d)) => { - test.sym == d.sym && test.span.ctxt() == d.span.ctxt() - } _ => { if !test.is_nan() @@ -767,16 +764,10 @@ impl VisitMut for Remover { ignore_result(*s.discriminant, true, &self.expr_ctx).map(Box::new), ); - let mut stmts = s.cases.remove(i).cons; - let mut cases = s.cases.drain(i..); + let mut stmts = s.cases[i].cons.take(); + let mut cases = s.cases.drain((i + 1)..); for case in cases.by_ref() { - exprs.extend( - case.test - .and_then(|e| ignore_result(*e, true, &self.expr_ctx)) - .map(Box::new), - ); - let should_stop = has_unconditional_stopper(&case.cons); stmts.extend(case.cons); // @@ -968,8 +959,16 @@ impl VisitMut for Remover { .iter() .all(|case| case.test.is_none() || case.cons.is_empty()); + let is_all_case_side_effect_free = s.cases.iter().all(|case| { + case.test + .as_ref() + .map(|e| e.is_ident() || !e.may_have_side_effects(&self.expr_ctx)) + .unwrap_or(true) + }); + if is_default_last && is_all_case_empty + && is_all_case_side_effect_free && !has_conditional_stopper(&s.cases.last().unwrap().cons) { let mut exprs = vec![]; diff --git a/crates/swc_ecma_transforms_optimization/src/simplify/branch/tests.rs b/crates/swc_ecma_transforms_optimization/src/simplify/branch/tests.rs index 2781d8ff734a..c824614f8e72 100644 --- a/crates/swc_ecma_transforms_optimization/src/simplify/branch/tests.rs +++ b/crates/swc_ecma_transforms_optimization/src/simplify/branch/tests.rs @@ -867,19 +867,16 @@ fn test_optimize_switch_with_default_case() { test_same("switch (x) { default: if (a) break; bar(); }"); // Potentially foldable - test( - concat!( - "switch (x) {", - " case x:", - " foo();", - " break;", - " default:", - " if (a) { break; }", - " bar();", - "}", - ), - "x; foo()", - ); + test_same(concat!( + "switch (x) {", + " case x:", + " foo();", + " break;", + " default:", + " if (a) break;", + " bar();", + "}", + )); test( concat!( From d4b89db0477e0557a743b14e8dea5bdfcfa0e6cb Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Sat, 13 Apr 2024 02:13:18 +0000 Subject: [PATCH 115/172] chore: Bump crates --- CHANGELOG.md | 3 +++ Cargo.lock | 2 +- crates/swc_ecma_transforms_optimization/Cargo.toml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de4d15c1ddc8..9b28097b348e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ - **(es/helpers)** Add missing helpers ([#8843](https://github.com/swc-project/swc/issues/8843)) ([67bfcf4](https://github.com/swc-project/swc/commit/67bfcf41f59699ebb5286211fcc2cf5546f94376)) +- **(es/minifier)** Handle switch cases ([#8854](https://github.com/swc-project/swc/issues/8854)) ([7a89e5d](https://github.com/swc-project/swc/commit/7a89e5da3be25d00e5cc18b46c847f0e8de54022)) + + - **(es/plugin)** Create `tokio` runtime only if necessary ([#8845](https://github.com/swc-project/swc/issues/8845)) ([62c4f5e](https://github.com/swc-project/swc/commit/62c4f5efb84daa5f9e7f88bbbfddd7823bb1355d)) diff --git a/Cargo.lock b/Cargo.lock index fd5822fa33c6..83e36a9eac76 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4743,7 +4743,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_optimization" -version = "0.198.19" +version = "0.198.20" dependencies = [ "dashmap", "indexmap 2.1.0", diff --git a/crates/swc_ecma_transforms_optimization/Cargo.toml b/crates/swc_ecma_transforms_optimization/Cargo.toml index a1754628ec8b..5408c67840ad 100644 --- a/crates/swc_ecma_transforms_optimization/Cargo.toml +++ b/crates/swc_ecma_transforms_optimization/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_optimization" repository = "https://github.com/swc-project/swc.git" -version = "0.198.19" +version = "0.198.20" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] From f6ba92b033c3594c69672a33df124ecf6429f450 Mon Sep 17 00:00:00 2001 From: Austaras Date: Sat, 13 Apr 2024 10:38:10 +0800 Subject: [PATCH 116/172] fix(es/resolver): Correctly check strict mode (#8851) **Related issue:** - Closes #8842 --- .../dead_code_2_should_warn_strict/output.js | 2 +- .../output.mangleOnly.js | 2 +- .../src/resolver/mod.rs | 25 +++++++++++-------- .../swc_ecma_transforms_base/tests/fixture.rs | 12 ++++----- .../tests/resolver/function/block/input.js | 12 +++++++++ .../tests/resolver/function/block/output.js | 12 +++++++++ .../tests/resolver/issues/6310/output.js | 4 +-- .../tests/resolver/issues/7685/output.js | 2 +- .../tests/resolver/minifier/10/output.js | 2 +- .../tests/resolver/minifier/11/output.js | 2 +- 10 files changed, 52 insertions(+), 23 deletions(-) create mode 100644 crates/swc_ecma_transforms_base/tests/resolver/function/block/input.js create mode 100644 crates/swc_ecma_transforms_base/tests/resolver/function/block/output.js diff --git a/crates/swc_ecma_minifier/tests/terser/compress/dead_code/dead_code_2_should_warn_strict/output.js b/crates/swc_ecma_minifier/tests/terser/compress/dead_code/dead_code_2_should_warn_strict/output.js index dc2a7837aef9..32add590e3d2 100644 --- a/crates/swc_ecma_minifier/tests/terser/compress/dead_code/dead_code_2_should_warn_strict/output.js +++ b/crates/swc_ecma_minifier/tests/terser/compress/dead_code/dead_code_2_should_warn_strict/output.js @@ -1,6 +1,6 @@ "use strict"; function f() { - var x, g; + var x, g1; g(); x = 10; throw Error("foo"); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/dead_code/dead_code_2_should_warn_strict/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/dead_code/dead_code_2_should_warn_strict/output.mangleOnly.js index 2800760b4f53..e6063df3a82c 100644 --- a/crates/swc_ecma_minifier/tests/terser/compress/dead_code/dead_code_2_should_warn_strict/output.mangleOnly.js +++ b/crates/swc_ecma_minifier/tests/terser/compress/dead_code/dead_code_2_should_warn_strict/output.mangleOnly.js @@ -1,6 +1,6 @@ "use strict"; function n() { - o(); + g(); n = 10; throw new Error("foo"); if (n) { diff --git a/crates/swc_ecma_transforms_base/src/resolver/mod.rs b/crates/swc_ecma_transforms_base/src/resolver/mod.rs index ee704fb36ae0..5b3ae1cd178f 100644 --- a/crates/swc_ecma_transforms_base/src/resolver/mod.rs +++ b/crates/swc_ecma_transforms_base/src/resolver/mod.rs @@ -558,11 +558,14 @@ impl<'a> VisitMut for Resolver<'a> { child.mark_block(&mut s.span); let old_strict_mode = child.strict_mode; - child.strict_mode = s - .stmts - .first() - .map(|stmt| stmt.is_use_strict()) - .unwrap_or(false); + + if !child.strict_mode { + child.strict_mode = s + .stmts + .first() + .map(|stmt| stmt.is_use_strict()) + .unwrap_or(false); + } // Prevent creating new scope. s.stmts.visit_mut_with(child); child.strict_mode = old_strict_mode; @@ -901,11 +904,13 @@ impl<'a> VisitMut for Resolver<'a> { Some(body) => { self.mark_block(&mut body.span); let old_strict_mode = self.strict_mode; - self.strict_mode = body - .stmts - .first() - .map(|stmt| stmt.is_use_strict()) - .unwrap_or(false); + if !self.strict_mode { + self.strict_mode = body + .stmts + .first() + .map(|stmt| stmt.is_use_strict()) + .unwrap_or(false); + } // Prevent creating new scope. body.visit_mut_children_with(self); self.strict_mode = old_strict_mode; diff --git a/crates/swc_ecma_transforms_base/tests/fixture.rs b/crates/swc_ecma_transforms_base/tests/fixture.rs index 6b79194a1fdc..d5ef8a4328c3 100644 --- a/crates/swc_ecma_transforms_base/tests/fixture.rs +++ b/crates/swc_ecma_transforms_base/tests/fixture.rs @@ -10,7 +10,7 @@ use swc_ecma_visit::{ }; use testing::{fixture, run_test2, NormalizedOutput}; -pub fn print(cm: Lrc, module: &Module) -> String { +pub fn print(cm: Lrc, program: &Program) -> String { let mut buf = vec![]; { let mut emitter = Emitter { @@ -23,7 +23,7 @@ pub fn print(cm: Lrc, module: &Module) -> String { }; // println!("Emitting: {:?}", module); - emitter.emit_module(module).unwrap(); + emitter.emit_program(program).unwrap(); } let s = String::from_utf8_lossy(&buf); @@ -47,15 +47,15 @@ where let lexer = Lexer::new(syntax, EsVersion::latest(), StringInput::from(&*fm), None); let mut parser = Parser::new_from(lexer); - let module = parser - .parse_module() + let program = parser + .parse_program() .map_err(|err| err.into_diagnostic(&handler).emit())?; let mut folder = op(); - let module = module.fold_with(&mut folder); + let program = program.fold_with(&mut folder); - let actual = print(cm, &module); + let actual = print(cm, &program); let actual = NormalizedOutput::from(actual); actual.compare_to_file(&output).unwrap(); diff --git a/crates/swc_ecma_transforms_base/tests/resolver/function/block/input.js b/crates/swc_ecma_transforms_base/tests/resolver/function/block/input.js new file mode 100644 index 000000000000..5f97fb21ee0c --- /dev/null +++ b/crates/swc_ecma_transforms_base/tests/resolver/function/block/input.js @@ -0,0 +1,12 @@ +export function k() { + function x() { + console.log("hi"); + } + { + function x() { + console.log("merong"); + } + } + return x; +} +k(); diff --git a/crates/swc_ecma_transforms_base/tests/resolver/function/block/output.js b/crates/swc_ecma_transforms_base/tests/resolver/function/block/output.js new file mode 100644 index 000000000000..ce93ac3cf1e6 --- /dev/null +++ b/crates/swc_ecma_transforms_base/tests/resolver/function/block/output.js @@ -0,0 +1,12 @@ +export function k__2() { + function x__3() { + console.log("hi"); + } + { + function x__5() { + console.log("merong"); + } + } + return x__3; +} +k__2(); diff --git a/crates/swc_ecma_transforms_base/tests/resolver/issues/6310/output.js b/crates/swc_ecma_transforms_base/tests/resolver/issues/6310/output.js index ce7f15e2200b..fd64c79f66a5 100644 --- a/crates/swc_ecma_transforms_base/tests/resolver/issues/6310/output.js +++ b/crates/swc_ecma_transforms_base/tests/resolver/issues/6310/output.js @@ -1,4 +1,4 @@ switch(0){ - case x__3: - function x__3() {} + case x__2: + function x__2() {} } diff --git a/crates/swc_ecma_transforms_base/tests/resolver/issues/7685/output.js b/crates/swc_ecma_transforms_base/tests/resolver/issues/7685/output.js index fcfeaf2b43ae..a31e62c38bca 100644 --- a/crates/swc_ecma_transforms_base/tests/resolver/issues/7685/output.js +++ b/crates/swc_ecma_transforms_base/tests/resolver/issues/7685/output.js @@ -2,4 +2,4 @@ var NaN__2 = 1; { let NaN__3 = 1; console.log(NaN__3); -}console.log(NaN__2); +}console.log(NaN); diff --git a/crates/swc_ecma_transforms_base/tests/resolver/minifier/10/output.js b/crates/swc_ecma_transforms_base/tests/resolver/minifier/10/output.js index 1c7a9c4c44ed..ef647e6cd5ae 100644 --- a/crates/swc_ecma_transforms_base/tests/resolver/minifier/10/output.js +++ b/crates/swc_ecma_transforms_base/tests/resolver/minifier/10/output.js @@ -1,2 +1,2 @@ var NaN__2; -console.log(NaN__2.toString()); +console.log(NaN.toString()); diff --git a/crates/swc_ecma_transforms_base/tests/resolver/minifier/11/output.js b/crates/swc_ecma_transforms_base/tests/resolver/minifier/11/output.js index 9e66877fa246..3c827c9dcef3 100644 --- a/crates/swc_ecma_transforms_base/tests/resolver/minifier/11/output.js +++ b/crates/swc_ecma_transforms_base/tests/resolver/minifier/11/output.js @@ -1,2 +1,2 @@ var NaN__2 = 5; -console.log(NaN__2.toString()); +console.log(NaN.toString()); From 59d18c30b4e1fc1ab361c8f963110d05eed548c5 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Sat, 13 Apr 2024 02:39:50 +0000 Subject: [PATCH 117/172] chore: Bump crates --- CHANGELOG.md | 3 +++ Cargo.lock | 2 +- crates/swc_ecma_transforms_base/Cargo.toml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b28097b348e..7564be86228b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,9 @@ - **(es/plugin)** Create `tokio` runtime only if necessary ([#8845](https://github.com/swc-project/swc/issues/8845)) ([62c4f5e](https://github.com/swc-project/swc/commit/62c4f5efb84daa5f9e7f88bbbfddd7823bb1355d)) +- **(es/resolver)** Correctly check strict mode ([#8851](https://github.com/swc-project/swc/issues/8851)) ([f6ba92b](https://github.com/swc-project/swc/commit/f6ba92b033c3594c69672a33df124ecf6429f450)) + + - **(es/utils)** Preserve optional chain effect ([#8850](https://github.com/swc-project/swc/issues/8850)) ([a7a32c4](https://github.com/swc-project/swc/commit/a7a32c4b6c2089dfbe9be2f70a0c4712e9feeef4)) ### Documentation diff --git a/Cargo.lock b/Cargo.lock index 83e36a9eac76..f52c702a07ca 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4626,7 +4626,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_base" -version = "0.137.17" +version = "0.137.18" dependencies = [ "better_scoped_tls", "bitflags 2.5.0", diff --git a/crates/swc_ecma_transforms_base/Cargo.toml b/crates/swc_ecma_transforms_base/Cargo.toml index 2e45d76c5598..4694669fbe1d 100644 --- a/crates/swc_ecma_transforms_base/Cargo.toml +++ b/crates/swc_ecma_transforms_base/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/**/*.js"] license = "Apache-2.0" name = "swc_ecma_transforms_base" repository = "https://github.com/swc-project/swc.git" -version = "0.137.17" +version = "0.137.18" [lib] bench = false From b03669c5c4e94b616600d9027abe7b1967f7e53c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Mon, 15 Apr 2024 11:37:49 +0900 Subject: [PATCH 118/172] chore: Publish `1.4.14` with `swc_core` `v0.90.31` --- bindings/Cargo.lock | 50 +++++++++---------- bindings/binding_core_node/Cargo.toml | 2 +- bindings/binding_core_wasm/Cargo.toml | 4 +- bindings/binding_minifier_node/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 4 +- bindings/swc_cli/Cargo.toml | 2 +- package.json | 2 +- packages/minifier/package.json | 2 +- .../scripts/npm/darwin-arm64/package.json | 2 +- .../scripts/npm/darwin-x64/package.json | 2 +- .../npm/linux-arm-gnueabihf/package.json | 2 +- .../scripts/npm/linux-arm64-gnu/package.json | 2 +- .../scripts/npm/linux-arm64-musl/package.json | 2 +- .../scripts/npm/linux-x64-gnu/package.json | 2 +- .../scripts/npm/linux-x64-musl/package.json | 2 +- .../scripts/npm/win32-arm64-msvc/package.json | 2 +- .../scripts/npm/win32-ia32-msvc/package.json | 2 +- .../scripts/npm/win32-x64-msvc/package.json | 2 +- 18 files changed, 44 insertions(+), 44 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 0225958d15b2..5f956133b004 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -231,7 +231,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.4.14-nightly-20240411.1" +version = "1.4.14" dependencies = [ "anyhow", "getrandom", @@ -291,7 +291,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.4.14-nightly-20240411.1" +version = "1.4.14" dependencies = [ "anyhow", "getrandom", @@ -2961,9 +2961,9 @@ dependencies = [ [[package]] name = "swc" -version = "0.273.24" +version = "0.273.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6012330faebbde05f69bc4ca9b9104edeba68ba5475eef13172802859a601ab" +checksum = "28571cc2607038238dcfc8dc0fe43af34fa4464124b677fa752d44515bde65bd" dependencies = [ "anyhow", "base64", @@ -3074,7 +3074,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.215" +version = "0.91.216" dependencies = [ "anyhow", "swc_cli_impl", @@ -3106,9 +3106,9 @@ dependencies = [ [[package]] name = "swc_common" -version = "0.33.22" +version = "0.33.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f91d53367db183e55ecaa090c9a2b6e62ddbd1258aa2ac6c6925772eec9e2b" +checksum = "0523b2acc3b9938c51dd454956493d887cc40f0050206287f8599840010442d0" dependencies = [ "ahash 0.8.8", "anyhow", @@ -3189,9 +3189,9 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.90.30" +version = "0.90.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe7651ba172f4a82cd6f27b73e51d363e9b32aa97b9f6aab2e63e58f4df9ea62" +checksum = "06abbb96671d9fb89f051609242b6acb9ddde9e6ff6325f49fce453d96a4c533" dependencies = [ "binding_macros", "swc", @@ -3236,9 +3236,9 @@ dependencies = [ [[package]] name = "swc_ecma_codegen" -version = "0.148.14" +version = "0.148.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e318142ff1297c1d3d8f230b4f3eda8454d1420341fb098a9d9edbc373ef3c" +checksum = "5206067d7c5034e4e19e71ebce270081594eb726c108d0a0a026f7ecbb6f8abd" dependencies = [ "memchr", "num-bigint", @@ -3551,9 +3551,9 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "0.143.12" +version = "0.143.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6fc7ab256f83a9491b37a510dd1cba9d81bb306faf3cff1dacdbc897fa4869f" +checksum = "5354a20ab66c2ec5001982271b6e7c750b7fca3409888ab9703ae3d3c845fed4" dependencies = [ "either", "new_debug_unreachable", @@ -3618,9 +3618,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_base" -version = "0.137.17" +version = "0.137.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66b5818db80d8d9fcbc1d3453f1d246a7f56ea708ba136717a84a8caf0977afd" +checksum = "7a9b97f6c01ade8fde4a6088f1f0150e85345fac2c48ee12aef753510efacd3c" dependencies = [ "better_scoped_tls", "bitflags 2.5.0", @@ -3656,9 +3656,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_compat" -version = "0.163.18" +version = "0.163.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27a864b81fc36e2933f60015fc6df62e244339acde78e06e4640ec5656584f82" +checksum = "ed183e0eb761a1eddd9ef2232612bcd6790a9fb8b6dd1885b2a9ea0a2f93752c" dependencies = [ "arrayvec", "indexmap 2.1.0", @@ -3732,9 +3732,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_optimization" -version = "0.198.18" +version = "0.198.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa1a53995a9199fa11343506646d0cdce69e612a5dad47897169cf4fdf8b7fcb" +checksum = "1b991f548f08dc81ee51100f213439883a926d25320493ea28c8043642fea928" dependencies = [ "dashmap", "indexmap 2.1.0", @@ -3757,9 +3757,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_proposal" -version = "0.171.20" +version = "0.171.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac54efb40cb374c53323823da2b5f74406b8531b59a2cb689801cbf22d0057db" +checksum = "406b777bb37f3a102c65a103610ecaab5da96cd2ba96b5b0a93af150a2aee73f" dependencies = [ "either", "rustc-hash", @@ -3836,9 +3836,9 @@ dependencies = [ [[package]] name = "swc_ecma_utils" -version = "0.127.17" +version = "0.127.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624c19fdbe1807275b16560892cf7a12a9ac3f631fb10ad45aaa3eeac903e6e5" +checksum = "c498dbedc2b6f3d31d2e2378a049e0e2bb11e46d828be960ce5f4169cded264b" dependencies = [ "indexmap 2.1.0", "num_cpus", @@ -4052,9 +4052,9 @@ dependencies = [ [[package]] name = "swc_visit" -version = "0.5.12" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dcfe07ffcd4360d6bf69d75819ccf6c6db852dfbf0f35dd65e9296a2b25c070" +checksum = "0263be55289abfe9c877ffef83d877b5bdfac036ffe2de793f48f5e47e41dbae" dependencies = [ "either", "swc_visit_macros", diff --git a/bindings/binding_core_node/Cargo.toml b/bindings/binding_core_node/Cargo.toml index 42758d5c131d..bf6435c60b58 100644 --- a/bindings/binding_core_node/Cargo.toml +++ b/bindings/binding_core_node/Cargo.toml @@ -51,7 +51,7 @@ tracing-chrome = "0.5.0" tracing-futures = "0.2.5" tracing-subscriber = { version = "0.3.9", features = ["env-filter"] } -swc_core = { version = "0.90.30", features = [ +swc_core = { version = "0.90.31", features = [ "allocator_node", "ecma_ast", "ecma_codegen", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 178aefe777ad..22425d856190 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.14-nightly-20240411.1" +version = "1.4.14" [lib] bench = false @@ -35,7 +35,7 @@ anyhow = "1.0.66" getrandom = { version = "0.2.10", features = ["js"] } serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" -swc_core = { version = "0.90.30", features = [ +swc_core = { version = "0.90.31", features = [ "ecma_ast_serde", "ecma_codegen", "binding_macro_wasm", diff --git a/bindings/binding_minifier_node/Cargo.toml b/bindings/binding_minifier_node/Cargo.toml index d246141f6c32..445f932c840d 100644 --- a/bindings/binding_minifier_node/Cargo.toml +++ b/bindings/binding_minifier_node/Cargo.toml @@ -37,7 +37,7 @@ tracing-subscriber = { version = "0.3.9", features = ["env-filter"] } swc_compiler_base = { version = "0.7.20", features = ["node"] } swc_config = "0.1.12" -swc_core = { version = "0.90.30", features = [ +swc_core = { version = "0.90.31", features = [ "allocator_node", "common_concurrent", "common_sourcemap", diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index ec7cce604a15..63759a685de7 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.14-nightly-20240411.1" +version = "1.4.14" [lib] bench = false @@ -35,7 +35,7 @@ anyhow = "1.0.66" getrandom = { version = "0.2.10", features = ["js"] } serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" -swc_core = { version = "0.90.30", features = [ +swc_core = { version = "0.90.31", features = [ "ecma_ast_serde", "ecma_codegen", "binding_macro_wasm", diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 17af2ac34b3b..c77820e7c65f 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.215" +version = "0.91.216" [[bin]] bench = false diff --git a/package.json b/package.json index a45919404699..03e6ae02e052 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.4.14-nightly-20240411.1", + "version": "1.4.14", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 873010c53ff7..0f222e64aebc 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.4.14-nightly-20240411.1", + "version": "1.4.14", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index 19c89bd6087d..95e936b01d12 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.4.13", + "version": "1.4.14", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index 35677c40d5bd..d83f6b6fbdba 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.4.13", + "version": "1.4.14", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index 88df0804d362..29f5187914d3 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.4.13", + "version": "1.4.14", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index 36479d8033fd..d93720156b15 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.4.13", + "version": "1.4.14", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index 78bfee473305..8bb4a72914ad 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.4.13", + "version": "1.4.14", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index d20e8475efff..1ea9e7079966 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.4.13", + "version": "1.4.14", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index abfb5d37b890..474b6d8f25c5 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.4.13", + "version": "1.4.14", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index 511aaae5af16..ee025b2cbfe5 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.4.13", + "version": "1.4.14", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index 17b7021afae5..ebaef2d610b7 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.4.13", + "version": "1.4.14", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index 113a63afd0db..bc119396e631 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.4.13", + "version": "1.4.14", "os": [ "win32" ], From 739a92bcf069cadb91c13da9b17a7534503f7421 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Mon, 15 Apr 2024 11:37:50 +0900 Subject: [PATCH 119/172] chore: Update changelog --- CHANGELOG.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7564be86228b..99e86f0a24ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ # Changelog -## [unreleased] +## [1.4.14] - 2024-04-15 ### Bug Fixes @@ -1363,9 +1363,6 @@ -- **(bindings/type)** Update types of `jsc.experimental` ([#7972](https://github.com/swc-project/swc/issues/7972)) ([e40fccb](https://github.com/swc-project/swc/commit/e40fccb9ce2a8fc925de818c8da4b6503aab7ae3)) - - - **(es/compat)** Handle nullish in fn expr scope ([#7980](https://github.com/swc-project/swc/issues/7980)) ([5050f58](https://github.com/swc-project/swc/commit/5050f5820a43b8de7a87511070405e189eaafb5f)) From fbd32fbff323ff4116e82d2dd1d763f7f3844de2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Mon, 15 Apr 2024 14:01:36 +0900 Subject: [PATCH 120/172] fix(es/parser): Fix span of `BindingIdent` (#8859) **Related issue:** - Closes #8856 --- ...naturesWithDuplicateParameters.1.normal.js | 36 +- ...turesWithDuplicateParameters.2.minified.js | 36 +- ...tionEmitWorkWithInlineComments.1.normal.js | 2 +- .../tsc-references/parserindenter.1.normal.js | 2 +- crates/swc_ecma_parser/src/parser/pat.rs | 13 +- .../decl/decorated-class.ts.span.swc-stderr | 24 +- .../tests/span/ts/issue-8856/param.ts | 1 + .../ts/issue-8856/param.ts.span.swc-stderr | 114 ++++ .../tests/span/ts/issue-8856/var-decl.ts | 1 + .../ts/issue-8856/var-decl.ts.span.swc-stderr | 66 ++ .../span/ts/type/interface.ts.span.swc-stderr | 4 +- .../tests/tsc/1.0lib-noErrors.json | 606 +++++++++--------- ...leAndAmbientWithSameNameAndCommonRoot.json | 4 +- ...AmbientClassWithSameNameAndCommonRoot.json | 4 +- ...oduleMemberThatUsesClassTypeParameter.json | 2 +- ...nericClassStaticFunctionOfTheSameName.json | 6 +- ...nericClassStaticFunctionOfTheSameName.json | 6 +- ...taticFunctionUsingClassPrivateStatics.json | 6 +- ...tionAndExportedFunctionThatShareAName.json | 8 +- ...nAndNonExportedFunctionThatShareAName.json | 8 +- ...cVariableAndExportedVarThatShareAName.json | 8 +- ...riableAndNonExportedVarThatShareAName.json | 8 +- ...assAndModuleWithSameNameAndCommonRoot.json | 4 +- ...AndModuleWithSameNameAndCommonRootES6.json | 4 +- ...numAndModuleWithSameNameAndCommonRoot.json | 4 +- ...hExtendsInterfaceWithInaccessibleType.json | 8 +- ...lassHeritageListMemberTypeAnnotations.json | 4 +- ...cessibleTypeInTypeParameterConstraint.json | 6 +- ...pesInParameterAndReturnTypeAnnotation.json | 6 +- ...essibleTypesInParameterTypeAnnotation.json | 6 +- ...accessibleTypesInReturnTypeAnnotation.json | 6 +- ...lassHeritageListMemberTypeAnnotations.json | 4 +- ...cessibleTypeInTypeParameterConstraint.json | 4 +- ...thAccessibleTypesOnItsExportedMembers.json | 10 +- ...ccessibleTypesInMemberTypeAnnotations.json | 4 +- ...bleTypesInNestedMemberTypeAnnotations.json | 4 +- ...duleAndClassWithSameNameAndCommonRoot.json | 4 +- ...oduleAndEnumWithSameNameAndCommonRoot.json | 4 +- ...leWithExportedAndNonExportedFunctions.json | 12 +- ...WithExportedAndNonExportedImportAlias.json | 4 +- ...tedAndNonExportedClassesOfTheSameName.json | 2 +- ...AndNonExportedInterfacesOfTheSameName.json | 8 +- ...dAndNonExportedLocalVarsOfTheSameName.json | 6 +- ...chWithExportedInterfacesOfTheSameName.json | 8 +- ...achWithExportedLocalVarsOfTheSameName.json | 6 +- ...WithTheSameNameAndDifferentCommonRoot.json | 6 +- ...dulesWithTheSameNameAndSameCommonRoot.json | 6 +- .../tests/tsc/TypeGuardWithArrayUnion.json | 2 +- .../tests/tsc/TypeGuardWithEnumUnion.json | 4 +- .../tsc/accessorsAreNotContextuallyTyped.json | 4 +- .../tests/tsc/accessorsOverrideProperty4.json | 2 +- .../tests/tsc/accessorsOverrideProperty8.json | 4 +- .../tests/tsc/accessorsOverrideProperty9.json | 2 +- ...nOperatorWithConstrainedTypeParameter.json | 12 +- .../additionOperatorWithTypeParameter.json | 4 +- .../tests/tsc/ambientAccessors.json | 8 +- .../tests/tsc/ambientDeclarations.json | 8 +- .../tsc/ambientDeclarationsPatterns.json | 2 +- .../tsc/anyAssignabilityInInheritance.json | 72 +-- .../tests/tsc/anyAssignableToEveryType.json | 10 +- .../tests/tsc/anyAssignableToEveryType2.json | 2 +- .../argumentExpressionContextualTyping.json | 2 +- .../arithmeticOperatorWithTypeParameter.json | 2 +- .../tests/tsc/arrayOfFunctionTypes3.json | 24 +- .../tests/tsc/arraySpreadImportHelpers.json | 4 +- .../tests/tsc/arraySpreadInCall.json | 14 +- .../tests/tsc/arrowFunctionExpressions.json | 4 +- .../tests/tsc/asOperatorContextualType.json | 2 +- .../tsc/asiPreventsParsingAsInterface02.json | 4 +- .../tests/tsc/assignAnyToEveryType.json | 4 +- .../tests/tsc/assignEveryTypeToAny.json | 4 +- .../tests/tsc/assignFromNumberInterface2.json | 8 +- .../tests/tsc/assignFromStringInterface2.json | 62 +- ...erPropertyToPropertyDeclarationES2022.json | 8 +- ...erPropertyToPropertyDeclarationESNext.json | 8 +- .../assignmentCompatWithCallSignatures.json | 20 +- .../assignmentCompatWithCallSignatures2.json | 24 +- .../assignmentCompatWithCallSignatures3.json | 156 ++--- .../assignmentCompatWithCallSignatures4.json | 102 +-- .../assignmentCompatWithCallSignatures5.json | 80 +-- .../assignmentCompatWithCallSignatures6.json | 46 +- ...hCallSignaturesWithOptionalParameters.json | 28 +- ...tWithCallSignaturesWithRestParameters.json | 20 +- ...signmentCompatWithConstructSignatures.json | 16 +- ...ignmentCompatWithConstructSignatures2.json | 20 +- ...ignmentCompatWithConstructSignatures3.json | 156 ++--- ...ignmentCompatWithConstructSignatures4.json | 102 +-- ...ignmentCompatWithConstructSignatures5.json | 80 +-- ...ignmentCompatWithConstructSignatures6.json | 46 +- ...tructSignaturesWithOptionalParameters.json | 28 +- ...ssignmentCompatWithDiscriminatedUnion.json | 10 +- ...gnmentCompatWithGenericCallSignatures.json | 4 +- ...nmentCompatWithGenericCallSignatures2.json | 4 +- ...nmentCompatWithGenericCallSignatures3.json | 20 +- ...nmentCompatWithGenericCallSignatures4.json | 4 +- ...cCallSignaturesWithOptionalParameters.json | 48 +- .../assignmentGenericLookupTypeNarrowing.json | 4 +- .../tests/tsc/assignmentLHSIsReference.json | 4 +- .../assignmentToParenthesizedIdentifiers.json | 4 +- ...asyncGeneratorGenericNonWrappedReturn.json | 2 +- .../tests/tsc/asyncMethodWithSuper_es6.json | 8 +- ...ncUnParenthesizedArrowFunction_es2017.json | 2 +- ...asyncUnParenthesizedArrowFunction_es5.json | 2 +- ...asyncUnParenthesizedArrowFunction_es6.json | 2 +- .../tests/tsc/asyncWithVarShadowing_es6.json | 2 +- .../tsc/awaitCallExpression1_es2017.json | 24 +- .../tests/tsc/awaitCallExpression1_es5.json | 24 +- .../tests/tsc/awaitCallExpression1_es6.json | 24 +- .../tsc/awaitCallExpression2_es2017.json | 24 +- .../tests/tsc/awaitCallExpression2_es5.json | 24 +- .../tests/tsc/awaitCallExpression2_es6.json | 24 +- .../tsc/awaitCallExpression3_es2017.json | 24 +- .../tests/tsc/awaitCallExpression3_es5.json | 24 +- .../tests/tsc/awaitCallExpression3_es6.json | 24 +- .../tsc/awaitCallExpression4_es2017.json | 24 +- .../tests/tsc/awaitCallExpression4_es5.json | 24 +- .../tests/tsc/awaitCallExpression4_es6.json | 24 +- .../tsc/awaitCallExpression5_es2017.json | 24 +- .../tests/tsc/awaitCallExpression5_es5.json | 24 +- .../tests/tsc/awaitCallExpression5_es6.json | 24 +- .../tsc/awaitCallExpression6_es2017.json | 24 +- .../tests/tsc/awaitCallExpression6_es5.json | 24 +- .../tests/tsc/awaitCallExpression6_es6.json | 24 +- .../tsc/awaitCallExpression7_es2017.json | 24 +- .../tests/tsc/awaitCallExpression7_es5.json | 24 +- .../tests/tsc/awaitCallExpression7_es6.json | 24 +- .../tsc/awaitCallExpression8_es2017.json | 24 +- .../tests/tsc/awaitCallExpression8_es5.json | 24 +- .../tests/tsc/awaitCallExpression8_es6.json | 24 +- ...estCommonTypeOfConditionalExpressions.json | 6 +- ...stCommonTypeOfConditionalExpressions2.json | 12 +- .../tests/tsc/bestCommonTypeOfTuple.json | 10 +- .../tests/tsc/bivariantInferences.json | 4 +- .../tests/tsc/booleanLiteralTypes1.json | 34 +- .../tests/tsc/booleanLiteralTypes2.json | 34 +- .../tests/tsc/bundlerSyntaxRestrictions.json | 4 +- .../tests/tsc/callChain.3.json | 2 +- .../swc_ecma_parser/tests/tsc/callChain.json | 6 +- .../tests/tsc/callChainInference.json | 4 +- ...ionWithIncorrectNumberOfTypeArguments.json | 24 +- ...lGenericFunctionWithZeroTypeArguments.json | 12 +- ...llNonGenericFunctionWithTypeArguments.json | 12 +- .../tests/tsc/callOverload.json | 8 +- ...llSignatureAssignabilityInInheritance.json | 44 +- ...lSignatureAssignabilityInInheritance2.json | 156 ++--- ...lSignatureAssignabilityInInheritance3.json | 104 +-- ...lSignatureAssignabilityInInheritance4.json | 80 +-- ...lSignatureAssignabilityInInheritance5.json | 118 ++-- ...lSignatureAssignabilityInInheritance6.json | 46 +- ...eWithoutReturnTypeAnnotationInference.json | 8 +- ...lSignaturesThatDifferOnlyByReturnType.json | 16 +- ...SignaturesThatDifferOnlyByReturnType2.json | 2 +- ...SignaturesThatDifferOnlyByReturnType3.json | 8 +- ...ithAccessibilityModifiersOnParameters.json | 40 +- ...callSignaturesWithDuplicateParameters.json | 40 +- .../callSignaturesWithOptionalParameters.json | 22 +- ...callSignaturesWithOptionalParameters2.json | 60 +- .../tests/tsc/callWithMissingVoid.json | 30 +- ...ithMissingVoidUndefinedUnknownAnyInJs.json | 10 +- .../tests/tsc/callWithSpread.json | 16 +- .../tests/tsc/callWithSpread2.json | 30 +- .../tests/tsc/callWithSpread3.json | 22 +- .../tests/tsc/callWithSpread4.json | 22 +- .../tests/tsc/callWithSpread5.json | 6 +- .../tests/tsc/callWithSpreadES6.json | 16 +- .../tests/tsc/chainedPrototypeAssignment.json | 2 +- .../tsc/circularTypeofWithVarOrFunc.json | 2 +- .../tests/tsc/cjsImportInES2015.json | 2 +- .../tsc/classAbstractFactoryFunction.json | 4 +- .../classCanExtendConstructorFunction.json | 6 +- .../tsc/classConstructorAccessibility.json | 12 +- .../tsc/classConstructorAccessibility2.json | 12 +- .../tsc/classConstructorAccessibility3.json | 8 +- ...lassConstructorOverloadsAccessibility.json | 18 +- ...assConstructorParametersAccessibility.json | 8 +- ...ssConstructorParametersAccessibility2.json | 8 +- ...ssConstructorParametersAccessibility3.json | 4 +- .../tests/tsc/classExtendingClass.json | 4 +- .../tsc/classExtendingClassLikeType.json | 18 +- .../tests/tsc/classStaticBlock11.json | 2 +- .../tests/tsc/classStaticBlock17.json | 10 +- .../classWithBaseClassButNoConstructor.json | 4 +- .../tests/tsc/classWithConstructors.json | 18 +- ...nlyPublicMembersEquivalentToInterface.json | 4 +- ...lyPublicMembersEquivalentToInterface2.json | 4 +- .../tests/tsc/classWithOptionalParameter.json | 2 +- .../tests/tsc/classWithStaticMembers.json | 4 +- .../classWithTwoConstructorDefinitions.json | 6 +- .../commaOperatorOtherInvalidOperation.json | 4 +- .../tsc/commaOperatorOtherValidOperation.json | 4 +- ...omparisonOperatorWithIdenticalObjects.json | 14 +- ...sonOperatorWithIdenticalTypeParameter.json | 2 +- ...hNoRelationshipObjectsOnCallSignature.json | 22 +- ...tionshipObjectsOnConstructorSignature.json | 22 +- ...hipObjectsOnInstantiatedCallSignature.json | 26 +- ...ctsOnInstantiatedConstructorSignature.json | 26 +- ...eratorWithNoRelationshipTypeParameter.json | 4 +- ...comparisonOperatorWithOneOperandIsAny.json | 2 +- ...isonOperatorWithOneOperandIsUndefined.json | 2 +- ...ratorWithSubtypeObjectOnCallSignature.json | 34 +- ...thSubtypeObjectOnConstructorSignature.json | 34 +- ...typeObjectOnInstantiatedCallSignature.json | 34 +- ...ectOnInstantiatedConstructorSignature.json | 34 +- .../comparisonOperatorWithTypeParameter.json | 6 +- .../tsc/compoundAssignmentLHSIsReference.json | 4 +- ...xponentiationAssignmentLHSIsReference.json | 4 +- .../tests/tsc/computedPropertyNames1_ES5.json | 2 +- .../tests/tsc/computedPropertyNames1_ES6.json | 2 +- .../tsc/computedPropertyNames36_ES5.json | 2 +- .../tsc/computedPropertyNames36_ES6.json | 2 +- .../tsc/computedPropertyNames37_ES5.json | 2 +- .../tsc/computedPropertyNames37_ES6.json | 2 +- .../tsc/computedPropertyNames38_ES5.json | 2 +- .../tsc/computedPropertyNames38_ES6.json | 2 +- .../tsc/computedPropertyNames39_ES5.json | 2 +- .../tsc/computedPropertyNames39_ES6.json | 2 +- .../tsc/computedPropertyNames43_ES5.json | 2 +- .../tsc/computedPropertyNames43_ES6.json | 2 +- .../tsc/computedPropertyNames44_ES5.json | 2 +- .../tsc/computedPropertyNames44_ES6.json | 2 +- .../tsc/computedPropertyNames45_ES5.json | 2 +- .../tsc/computedPropertyNames45_ES6.json | 2 +- .../tsc/computedPropertyNames48_ES5.json | 2 +- .../tsc/computedPropertyNames48_ES6.json | 2 +- .../tests/tsc/computedPropertyNames9_ES5.json | 6 +- .../tests/tsc/computedPropertyNames9_ES6.json | 6 +- ...putedPropertyNamesContextualType1_ES5.json | 4 +- ...putedPropertyNamesContextualType1_ES6.json | 4 +- ...putedPropertyNamesContextualType2_ES5.json | 4 +- ...putedPropertyNamesContextualType2_ES6.json | 4 +- ...putedPropertyNamesContextualType3_ES5.json | 2 +- ...putedPropertyNamesContextualType3_ES6.json | 2 +- ...putedPropertyNamesContextualType6_ES5.json | 2 +- ...putedPropertyNamesContextualType6_ES6.json | 2 +- ...putedPropertyNamesContextualType7_ES5.json | 4 +- ...putedPropertyNamesContextualType7_ES6.json | 4 +- ...mputedPropertyNamesWithStaticProperty.json | 4 +- .../conditionalOperatorWithIdenticalBCT.json | 6 +- ...onditionalOperatorWithoutIdenticalBCT.json | 8 +- .../tests/tsc/conditionalTypes1.json | 64 +- .../tests/tsc/conditionalTypes2.json | 70 +- .../tsc/conditionalTypesExcessProperties.json | 4 +- .../swc_ecma_parser/tests/tsc/constEnum3.json | 4 +- .../tests/tsc/constEnumPropertyAccess1.json | 2 +- .../tests/tsc/constEnumPropertyAccess2.json | 2 +- .../tsc/constraintSatisfactionWithAny.json | 16 +- .../tsc/constraintSatisfactionWithAny2.json | 4 +- ...constraintSatisfactionWithEmptyObject.json | 8 +- ...ctSignatureAssignabilityInInheritance.json | 42 +- ...tSignatureAssignabilityInInheritance2.json | 156 ++--- ...tSignatureAssignabilityInInheritance3.json | 94 +-- ...tSignatureAssignabilityInInheritance4.json | 92 +-- ...tSignatureAssignabilityInInheritance5.json | 118 ++-- ...tSignatureAssignabilityInInheritance6.json | 46 +- ...tructSignaturesWithIdenticalOverloads.json | 60 +- .../tsc/constructSignaturesWithOverloads.json | 60 +- .../constructSignaturesWithOverloads2.json | 36 +- ...thOverloadsThatDifferOnlyByReturnType.json | 46 +- ...orFunctionTypeIsAssignableToBaseType2.json | 6 +- .../tests/tsc/constructorFunctions2.json | 2 +- ...ructorImplementationWithDefaultValues.json | 4 +- ...uctorImplementationWithDefaultValues2.json | 12 +- ...ructorOverloadsWithOptionalParameters.json | 4 +- .../tsc/constructorParameterProperties.json | 10 +- .../tsc/constructorParameterProperties2.json | 8 +- ...onstructorParameterShadowsOuterScopes.json | 4 +- ...nstructorParameterShadowsOuterScopes2.json | 6 +- .../constructorWithExpressionLessReturn.json | 4 +- .../tests/tsc/contextualIntersectionType.json | 4 +- .../tsc/contextualSignatureInstantiation.json | 34 +- .../tests/tsc/contextualThisType.json | 2 +- .../tests/tsc/contextualTypeTupleEnd.json | 20 +- ...extualTypeWithUnionTypeCallSignatures.json | 12 +- ...xtualTypeWithUnionTypeIndexSignatures.json | 4 +- .../contextualTypeWithUnionTypeMembers.json | 20 +- ...textualTypeWithUnionTypeObjectLiteral.json | 8 +- ...ntextuallyTypeAsyncFunctionReturnType.json | 30 +- .../tsc/contextuallyTypeCommaOperator01.json | 2 +- .../tsc/contextuallyTypeCommaOperator02.json | 2 +- .../tsc/contextuallyTypeCommaOperator03.json | 2 +- .../tsc/contextuallyTypeLogicalAnd01.json | 2 +- .../tsc/contextuallyTypeLogicalAnd02.json | 2 +- .../tsc/contextuallyTypeLogicalAnd03.json | 2 +- .../contextuallyTypedBindingInitializer.json | 4 +- ...tuallyTypedBindingInitializerNegative.json | 4 +- ...pedClassExpressionMethodDeclaration01.json | 4 +- ...pedClassExpressionMethodDeclaration02.json | 4 +- ...nctionExpressionsAndReturnAnnotations.json | 8 +- ...TypedObjectLiteralMethodDeclaration01.json | 4 +- .../tests/tsc/controlFlowAliasing.json | 54 +- .../tsc/controlFlowBinaryOrExpression.json | 4 +- .../tests/tsc/controlFlowCommaOperator.json | 2 +- .../tsc/controlFlowComputedPropertyNames.json | 16 +- .../tsc/controlFlowElementAccessNoCrash1.json | 2 +- .../tests/tsc/controlFlowGenericTypes.json | 66 +- .../tests/tsc/controlFlowIfStatement.json | 6 +- .../tests/tsc/controlFlowInOperator.json | 12 +- .../controlFlowInstanceOfGuardPrimitives.json | 2 +- .../tests/tsc/controlFlowIterationErrors.json | 8 +- .../tsc/controlFlowIterationErrorsAsync.json | 14 +- .../tests/tsc/controlFlowOptionalChain.json | 70 +- .../tests/tsc/controlFlowOptionalChain2.json | 20 +- .../tests/tsc/controlFlowParameter.json | 12 +- .../tests/tsc/controlFlowTruthiness.json | 6 +- .../tests/tsc/controlFlowTypeofObject.json | 14 +- .../tests/tsc/controlFlowWhileStatement.json | 2 +- .../tests/tsc/covariantCallbacks.json | 90 +-- ...declarationEmitIdentifierPredicates01.json | 2 +- ...IdentifierPredicatesWithPrivateName01.json | 2 +- .../tests/tsc/declarationEmitReadonly.json | 2 +- ...declarationEmitWorkWithInlineComments.json | 24 +- .../tests/tsc/declarationFiles.json | 10 +- .../tests/tsc/declarationsAndAssignments.json | 4 +- .../tsc/decoratedClassExportsCommonJS1.json | 2 +- .../tsc/decoratedClassExportsCommonJS2.json | 2 +- .../tsc/decoratedClassExportsSystem1.json | 2 +- .../tsc/decoratedClassExportsSystem2.json | 2 +- .../tests/tsc/decoratorMetadata.json | 4 +- .../decoratorMetadataWithTypeOnlyImport.json | 4 +- .../tsc/decoratorOnClassConstructor4.json | 2 +- .../tests/tsc/decoratorOnClassMethod11.json | 4 +- .../tsc/defaultExportWithOverloads01.json | 2 +- .../tests/tsc/defineProperty.json | 4 +- .../tsc/dependentDestructuredVariables.json | 44 +- ...structuredVariablesFromNestedPatterns.json | 4 +- ...derivedClassOverridesProtectedMembers.json | 28 +- ...erivedClassOverridesProtectedMembers2.json | 28 +- ...erivedClassOverridesProtectedMembers3.json | 46 +- .../derivedClassOverridesPublicMembers.json | 28 +- .../tests/tsc/derivedClassTransitivity.json | 4 +- .../tests/tsc/derivedClassTransitivity2.json | 10 +- .../tests/tsc/derivedClassTransitivity3.json | 10 +- .../tests/tsc/derivedClassTransitivity4.json | 4 +- ...erivedClassWithoutExplicitConstructor.json | 4 +- ...rivedClassWithoutExplicitConstructor2.json | 24 +- ...rivedClassWithoutExplicitConstructor3.json | 12 +- ...vedInterfaceDoesNotHideBaseSignatures.json | 4 +- ...sHiddenBaseCallViaSuperPropertyAccess.json | 4 +- ...ringArrayBindingPatternAndAssignment2.json | 2 +- .../tests/tsc/destructuringControlFlow.json | 6 +- ...destructuringParameterDeclaration1ES5.json | 2 +- ...uringParameterDeclaration1ES5iterable.json | 2 +- ...destructuringParameterDeclaration1ES6.json | 2 +- .../directDependenceBetweenTypeAliases.json | 2 +- .../tsc/discriminatedUnionInference.json | 2 +- .../tests/tsc/discriminatedUnionTypes1.json | 28 +- .../tests/tsc/discriminatedUnionTypes2.json | 22 +- .../tests/tsc/emitArrowFunction.json | 2 +- .../tests/tsc/emitArrowFunctionES6.json | 2 +- .../tsc/emitArrowFunctionThisCapturing.json | 2 +- .../emitArrowFunctionThisCapturingES6.json | 2 +- ...emitArrowFunctionWhenUsingArguments01.json | 2 +- ...ArrowFunctionWhenUsingArguments01_ES6.json | 2 +- ...emitArrowFunctionWhenUsingArguments19.json | 2 +- ...ArrowFunctionWhenUsingArguments19_ES6.json | 2 +- .../emitClassDeclarationOverloadInES6.json | 8 +- ...tClassDeclarationWithConstructorInES6.json | 10 +- ...tionWithExtensionAndTypeArgumentInES6.json | 6 +- ...mitClassDeclarationWithExtensionInES6.json | 6 +- ...ClassDeclarationWithGetterSetterInES6.json | 10 +- .../emitClassDeclarationWithMethodInES6.json | 16 +- ...tClassDeclarationWithThisKeywordInES6.json | 4 +- ...ationWithTypeArgumentAndOverloadInES6.json | 16 +- ...ClassDeclarationWithTypeArgumentInES6.json | 4 +- ...entiationAssignmentWithIndexingOnLHS4.json | 2 +- .../tsc/emitDefaultParametersFunction.json | 4 +- .../tsc/emitDefaultParametersFunctionES6.json | 4 +- ...itDefaultParametersFunctionExpression.json | 2 +- ...efaultParametersFunctionExpressionES6.json | 2 +- ...emitDefaultParametersFunctionProperty.json | 8 +- ...tDefaultParametersFunctionPropertyES6.json | 8 +- .../tsc/emitDefaultParametersMethod.json | 10 +- .../tsc/emitDefaultParametersMethodES6.json | 10 +- .../tests/tsc/emitRestParametersFunction.json | 4 +- .../tsc/emitRestParametersFunctionES6.json | 4 +- .../tests/tsc/emitRestParametersMethod.json | 6 +- .../tsc/emitRestParametersMethodES6.json | 6 +- .../tsc/emitStatementsBeforeSuperCall.json | 4 +- ...ementsBeforeSuperCallWithDefineFields.json | 4 +- .../tests/tsc/enumAssignability.json | 10 +- .../tsc/enumAssignabilityInInheritance.json | 74 +-- .../enumIsNotASubtypeOfAnythingButNumber.json | 2 +- .../tests/tsc/enumLiteralTypes1.json | 40 +- .../tests/tsc/enumLiteralTypes2.json | 40 +- .../tests/tsc/enumLiteralTypes3.json | 64 +- .../tests/tsc/equalityWithEnumTypes.json | 4 +- ...alityWithtNullishCoalescingAssignment.json | 2 +- .../tests/tsc/es2020IntlAPIs.json | 2 +- ...orators-classDeclaration-classSuper.6.json | 4 +- ...orators-classDeclaration-classSuper.7.json | 6 +- ...-classDeclaration-commentPreservation.json | 4 +- ...ingEmitHelpers-nonStaticPrivateSetter.json | 2 +- ...ssingEmitHelpers-staticComputedSetter.json | 2 +- ...issingEmitHelpers-staticPrivateSetter.json | 2 +- ...-classDeclaration-parameterProperties.json | 2 +- ...Decorators-classDeclaration-sourceMap.json | 4 +- ...corators-classExpression-classSuper.6.json | 4 +- ...s-classExpression-commentPreservation.json | 4 +- .../tsc/esDecorators-contextualTypes.2.json | 12 +- .../esDecorators-emitDecoratorMetadata.json | 20 +- .../tests/tsc/esDecoratorsMetadata1.json | 4 +- .../tests/tsc/esDecoratorsMetadata2.json | 4 +- .../tests/tsc/esDecoratorsMetadata3.json | 4 +- .../tests/tsc/esDecoratorsMetadata4.json | 4 +- .../tests/tsc/everyTypeAssignableToAny.json | 10 +- ...everyTypeWithAnnotationAndInitializer.json | 6 +- ...peWithAnnotationAndInvalidInitializer.json | 10 +- .../tests/tsc/everyTypeWithInitializer.json | 4 +- .../tsc/exhaustiveSwitchStatements1.json | 36 +- ...ponentiationOperatorWithTypeParameter.json | 2 +- .../tests/tsc/exportAssignTypes.json | 4 +- ...xportAssignmentConstrainedGenericType.json | 2 +- .../tsc/exportAssignmentMergedInterface.json | 4 +- .../tsc/exportAssignmentMergedModule.json | 2 +- .../tests/tsc/exportImportAlias.json | 10 +- .../tests/tsc/exportSpellingSuggestion.json | 4 +- ...rtTypeMergedWithExportStarAsNamespace.json | 2 +- .../tests/tsc/extendBooleanInterface.json | 2 +- .../tests/tsc/extendNumberInterface.json | 2 +- .../tests/tsc/extendStringInterface.json | 2 +- .../tests/tsc/for-inStatements.json | 4 +- .../tests/tsc/for-inStatementsInvalid.json | 4 +- .../tests/tsc/forStatements.json | 6 +- .../tsc/forStatementsMultipleInvalidDecl.json | 4 +- .../tsc/forStatementsMultipleValidDecl.json | 8 +- .../tsc/functionConstraintSatisfaction.json | 22 +- .../tsc/functionConstraintSatisfaction2.json | 14 +- .../tsc/functionConstraintSatisfaction3.json | 20 +- .../functionExpressionContextualTyping1.json | 50 +- .../functionExpressionContextualTyping2.json | 8 +- .../functionExpressionContextualTyping3.json | 2 +- .../tests/tsc/functionImplementations.json | 18 +- .../tests/tsc/functionLiteral.json | 10 +- .../tsc/functionLiteralForOverloads.json | 16 +- .../tsc/functionLiteralForOverloads2.json | 20 +- .../tests/tsc/functionLiterals.json | 28 +- ...nctionOverloadCompatibilityWithVoid01.json | 4 +- ...nctionOverloadCompatibilityWithVoid02.json | 4 +- ...nctionOverloadCompatibilityWithVoid03.json | 4 +- .../tests/tsc/functionOverloadErrors.json | 44 +- .../functionWithMultipleReturnStatements.json | 8 +- ...functionWithMultipleReturnStatements2.json | 2 +- .../tests/tsc/generatedContextualTyping.json | 196 +++--- .../tests/tsc/generatorImplicitAny.json | 2 +- .../tests/tsc/generatorOverloads4.json | 6 +- .../tests/tsc/generatorOverloads5.json | 6 +- .../tsc/generatorReturnTypeInference.json | 12 +- ...generatorReturnTypeInferenceNonStrict.json | 12 +- .../tests/tsc/generatorTypeCheck26.json | 2 +- .../tests/tsc/generatorTypeCheck27.json | 2 +- .../tests/tsc/generatorTypeCheck28.json | 2 +- .../tests/tsc/generatorTypeCheck29.json | 2 +- .../tests/tsc/generatorTypeCheck30.json | 2 +- .../tests/tsc/generatorTypeCheck31.json | 2 +- .../tests/tsc/generatorTypeCheck45.json | 10 +- .../tests/tsc/generatorTypeCheck46.json | 10 +- .../tests/tsc/generatorTypeCheck62.json | 16 +- .../tests/tsc/generatorTypeCheck63.json | 18 +- .../tsc/generatorYieldContextualType.json | 18 +- ...erloadedMethodWithOverloadedArguments.json | 90 +-- .../tsc/genericCallTypeArgumentInference.json | 60 +- .../tsc/genericCallWithArrayLiteralArgs.json | 2 +- ...lWithConstraintsTypeArgumentInference.json | 60 +- ...WithConstraintsTypeArgumentInference2.json | 2 +- ...ricCallWithConstructorTypedArguments5.json | 22 +- ...genericCallWithFunctionTypedArguments.json | 24 +- ...enericCallWithFunctionTypedArguments2.json | 24 +- ...enericCallWithFunctionTypedArguments3.json | 12 +- ...enericCallWithFunctionTypedArguments4.json | 12 +- ...enericCallWithFunctionTypedArguments5.json | 10 +- ...ericCallWithGenericSignatureArguments.json | 26 +- ...ricCallWithGenericSignatureArguments2.json | 76 +-- ...ricCallWithGenericSignatureArguments3.json | 34 +- .../genericCallWithNonSymmetricSubtypes.json | 8 +- .../tsc/genericCallWithObjectLiteralArgs.json | 2 +- .../tsc/genericCallWithObjectTypeArgs.json | 4 +- .../tsc/genericCallWithObjectTypeArgs2.json | 4 +- ...cCallWithObjectTypeArgsAndConstraints.json | 8 +- ...CallWithObjectTypeArgsAndConstraints2.json | 10 +- ...CallWithObjectTypeArgsAndConstraints3.json | 10 +- ...CallWithObjectTypeArgsAndConstraints4.json | 4 +- ...CallWithObjectTypeArgsAndConstraints5.json | 4 +- ...ericCallWithObjectTypeArgsAndIndexers.json | 4 +- ...llWithObjectTypeArgsAndIndexersErrors.json | 6 +- ...CallWithObjectTypeArgsAndInitializers.json | 24 +- ...llWithObjectTypeArgsAndNumericIndexer.json | 8 +- ...allWithObjectTypeArgsAndStringIndexer.json | 8 +- ...thOverloadedConstructorTypedArguments.json | 48 +- ...hOverloadedConstructorTypedArguments2.json | 42 +- ...lWithOverloadedFunctionTypedArguments.json | 38 +- ...WithOverloadedFunctionTypedArguments2.json | 34 +- ...ClassWithFunctionTypedMemberArguments.json | 36 +- ...ClassWithObjectTypeArgsAndConstraints.json | 16 +- .../tests/tsc/genericContextualTypes1.json | 84 +-- .../tests/tsc/genericContextualTypes2.json | 12 +- .../tests/tsc/genericContextualTypes3.json | 12 +- .../tests/tsc/genericFunctionParameters.json | 16 +- ...nstantiationEquivalentToObjectLiteral.json | 4 +- .../tests/tsc/genericObjectRest.json | 16 +- .../tests/tsc/genericRestArity.json | 2 +- .../tests/tsc/genericRestArityStrict.json | 2 +- .../tests/tsc/genericRestParameters1.json | 66 +- .../tests/tsc/genericRestParameters2.json | 48 +- .../tests/tsc/genericRestParameters3.json | 24 +- .../tsc/getSetAccessorContextualTyping.json | 4 +- .../tests/tsc/grammarAmbiguities.json | 4 +- .../tests/tsc/heterogeneousArrayLiterals.json | 16 +- .../tests/tsc/identicalCallSignatures.json | 16 +- .../tests/tsc/identicalCallSignatures2.json | 2 +- .../tests/tsc/identicalCallSignatures3.json | 8 +- .../tests/tsc/ifDoWhileStatements.json | 10 +- .../tests/tsc/importAliasIdentifiers.json | 4 +- .../tsc/importCallExpression2ES2020.json | 2 +- .../importCallExpressionDeclarationEmit1.json | 2 +- .../tests/tsc/importCallExpressionInAMD2.json | 2 +- .../tests/tsc/importCallExpressionInCJS2.json | 2 +- .../tests/tsc/importCallExpressionInCJS3.json | 2 +- .../tsc/importCallExpressionInSystem2.json | 2 +- .../tests/tsc/importCallExpressionInUMD2.json | 2 +- ...mportCallExpressionReturnPromiseOfAny.json | 2 +- .../tests/tsc/importStatements.json | 6 +- .../tests/tsc/importStatementsInterfaces.json | 2 +- .../tests/tsc/importTypeAmbient.json | 4 +- .../tests/tsc/importTypeGenericTypes.json | 4 +- .../tests/tsc/importTypeInJSDoc.json | 8 +- .../tests/tsc/importTypeLocal.json | 4 +- .../tests/tsc/importTypeLocalMissing.json | 4 +- .../tests/tsc/importingExportingTypes.json | 10 +- .../tsc/inOperatorWithValidOperands.json | 6 +- .../tsc/indexSignatureTypeInference.json | 4 +- .../tests/tsc/inferFromBindingPattern.json | 8 +- .../tests/tsc/inferThisType.json | 14 +- .../tests/tsc/inferTypes2.json | 8 +- .../tests/tsc/inferTypesWithExtends1.json | 10 +- .../tests/tsc/inferingFromAny.json | 46 +- ...infiniteExpansionThroughInstantiation.json | 2 +- ...infiniteExpansionThroughTypeInference.json | 2 +- .../tests/tsc/initializationOrdering1.json | 2 +- ...itializerReferencingConstructorLocals.json | 2 +- ...lizerReferencingConstructorParameters.json | 2 +- ...instanceMemberAssignsToClassPrototype.json | 2 +- .../tsc/instanceMemberInitialization.json | 2 +- ...tancePropertiesInheritedIntoClassType.json | 10 +- .../tsc/instancePropertyInClassType.json | 10 +- ...eofOperatorWithInvalidOperands.es2015.json | 4 +- ...ceofOperatorWithInvalidStaticToString.json | 6 +- ...tanceofOperatorWithLHSIsTypeParameter.json | 2 +- ...ofOperatorWithRHSHasSymbolHasInstance.json | 38 +- .../interfaceExtendsObjectIntersection.json | 2 +- ...hOverloadedCallAndConstructSignatures.json | 4 +- .../tsc/interfaceWithPropertyOfEveryType.json | 4 +- ...SpecializedCallAndConstructSignatures.json | 8 +- .../tsc/intersectionAsWeakTypeSource.json | 2 +- .../tests/tsc/intersectionNarrowing.json | 10 +- .../tests/tsc/intersectionReduction.json | 6 +- .../tests/tsc/intersectionThisTypes.json | 8 +- .../tests/tsc/intersectionTypeInference.json | 6 +- .../tests/tsc/intersectionTypeInference2.json | 6 +- .../tests/tsc/intersectionTypeMembers.json | 4 +- .../tsc/intersectionTypeOverloading.json | 4 +- .../tsc/intersectionWithUnionConstraint.json | 10 +- .../tsc/intersectionsAndEmptyObjects.json | 2 +- .../tests/tsc/intraExpressionInferences.json | 128 ++-- .../tests/tsc/intrinsicKeyword.json | 2 +- .../tests/tsc/intrinsicTypes.json | 12 +- .../tests/tsc/invalidAssignmentsToVoid.json | 2 +- .../tests/tsc/invalidBooleanAssignments.json | 2 +- .../tests/tsc/invalidEnumAssignments.json | 2 +- .../invalidMultipleVariableDeclarations.json | 4 +- .../tests/tsc/invalidNumberAssignments.json | 2 +- .../tests/tsc/invalidStringAssignments.json | 2 +- .../tsc/invalidUndefinedAssignments.json | 2 +- .../tests/tsc/invalidUndefinedValues.json | 2 +- .../tests/tsc/invalidVoidAssignments.json | 2 +- .../tests/tsc/invalidVoidValues.json | 2 +- .../tsc/isomorphicMappedTypeInference.json | 44 +- .../tests/tsc/iterableContextualTyping1.json | 2 +- .../tests/tsc/iteratorSpreadInCall.json | 2 +- .../tests/tsc/iteratorSpreadInCall10.json | 2 +- .../tests/tsc/iteratorSpreadInCall2.json | 2 +- .../tests/tsc/iteratorSpreadInCall4.json | 2 +- ...sClassImplementsGenericsSerialization.json | 2 +- .../tests/tsc/jsDeclarationsInterfaces.json | 12 +- .../tests/tsc/jsdocImportType.json | 2 +- .../tests/tsc/jsdocImportType2.json | 2 +- .../tests/tsc/jsdocLinkTag3.json | 2 +- .../tests/tsc/jsdocLinkTag4.json | 2 +- .../tsc/jsdocParseBackquotedParamName.json | 2 +- .../tests/tsc/jsdocThisType.json | 2 +- .../tests/tsc/jsdocTypeTag.json | 4 +- .../tests/tsc/keyofAndForIn.json | 12 +- .../tests/tsc/keyofAndIndexedAccess.json | 280 ++++---- .../tests/tsc/keyofAndIndexedAccess2.json | 80 +-- .../tsc/keyofAndIndexedAccessErrors.json | 50 +- .../tsc/keyofInferenceIntersectsResults.json | 8 +- ...keyofInferenceLowerPriorityThanReturn.json | 6 +- .../tests/tsc/literalTypeWidening.json | 22 +- .../tests/tsc/literalTypes1.json | 10 +- .../tests/tsc/literalTypes2.json | 40 +- .../tests/tsc/literalTypes3.json | 22 +- .../tests/tsc/localTypes1.json | 2 +- .../tests/tsc/localTypes2.json | 12 +- .../tests/tsc/localTypes3.json | 12 +- .../tests/tsc/localTypes4.json | 4 +- .../logicalAndOperatorWithTypeParameters.json | 6 +- .../tests/tsc/logicalAssignment4.json | 12 +- .../tests/tsc/logicalAssignment5.json | 24 +- .../tests/tsc/logicalAssignment6.json | 12 +- .../tests/tsc/logicalAssignment7.json | 12 +- .../tests/tsc/logicalAssignment8.json | 6 +- ...calOrExpressionIsNotContextuallyTyped.json | 2 +- .../logicalOrOperatorWithTypeParameters.json | 14 +- .../tests/tsc/looseThisTypeInFunctions.json | 20 +- .../tsc/mappedTypeAsClauseRelationships.json | 4 +- .../tests/tsc/mappedTypeAsClauses.json | 4 +- .../tests/tsc/mappedTypeConstraints.json | 10 +- .../tests/tsc/mappedTypeConstraints2.json | 32 +- .../tests/tsc/mappedTypeErrors.json | 26 +- .../tests/tsc/mappedTypeInferenceErrors.json | 2 +- .../tests/tsc/mappedTypeModifiers.json | 8 +- .../tests/tsc/mappedTypeRelationships.json | 156 ++--- .../tests/tsc/mappedTypeWithAny.json | 10 +- .../tests/tsc/mappedTypes2.json | 32 +- .../tests/tsc/mappedTypes3.json | 10 +- .../tests/tsc/mappedTypes4.json | 4 +- .../tests/tsc/mappedTypes5.json | 8 +- .../tests/tsc/mappedTypes6.json | 28 +- .../tests/tsc/mappedTypesAndObjects.json | 10 +- .../tests/tsc/mappedTypesArraysTuples.json | 20 +- ...nctionOverloadMixingStaticAndInstance.json | 8 +- .../memberFunctionsWithPrivateOverloads.json | 88 +-- .../memberFunctionsWithPublicOverloads.json | 88 +-- ...erFunctionsWithPublicPrivateOverloads.json | 130 ++-- .../tsc/methodSignaturesWithOverloads.json | 16 +- .../tsc/methodSignaturesWithOverloads2.json | 16 +- .../tests/tsc/mixinAbstractClasses.json | 2 +- ...xinAbstractClassesReturnTypeInference.json | 2 +- .../tests/tsc/mixinAccessModifiers.json | 40 +- .../tests/tsc/mixinClassesAnnotated.json | 14 +- .../tests/tsc/mixinClassesAnonymous.json | 14 +- .../tests/tsc/mixinClassesMembers.json | 4 +- .../tests/tsc/moduleExportAlias2.json | 2 +- .../tests/tsc/moduleExportAssignment7.json | 28 +- ...uleExportWithExportPropertyAssignment.json | 2 +- ...leExportWithExportPropertyAssignment2.json | 2 +- ...leExportWithExportPropertyAssignment3.json | 2 +- ...leExportWithExportPropertyAssignment4.json | 2 +- .../tsc/moduleWithStatementsOfEveryKind.json | 4 +- .../tests/tsc/namedTupleMembers.json | 8 +- .../narrowExceptionVariableInCatchClause.json | 2 +- .../tsc/narrowingConstrainedTypeVariable.json | 6 +- .../narrowingGenericTypeFromInstanceof01.json | 8 +- .../tests/tsc/neverInference.json | 24 +- .../tsc/neverIntersectionNotCallable.json | 2 +- .../tests/tsc/neverReturningFunctions1.json | 84 +-- .../swc_ecma_parser/tests/tsc/neverType.json | 18 +- .../tests/tsc/newOperatorConformance.json | 12 +- .../newOperatorErrorCases_noImplicitAny.json | 4 +- .../tests/tsc/newTargetNarrowing.json | 2 +- .../tests/tsc/newWithSpread.json | 12 +- .../tests/tsc/newWithSpreadES5.json | 12 +- .../tests/tsc/newWithSpreadES6.json | 12 +- crates/swc_ecma_parser/tests/tsc/noInfer.json | 54 +- .../tests/tsc/noUncheckedIndexedAccess.json | 6 +- .../nominalSubtypeCheckOfTypeParameter.json | 4 +- .../tsc/nonPrimitiveAndTypeVariables.json | 2 +- ...nPrimitiveConstraintOfIndexAccessType.json | 40 +- .../tests/tsc/nonPrimitiveInFunction.json | 2 +- .../tests/tsc/nonPrimitiveInGeneric.json | 6 +- .../tests/tsc/nullAssignableToEveryType.json | 10 +- ...nullIsSubtypeOfEverythingButUndefined.json | 4 +- ...rUndefinedTypeGuardIsOrderIndependent.json | 4 +- .../tests/tsc/nullishCoalescingOperator6.json | 2 +- .../tests/tsc/nullishCoalescingOperator9.json | 2 +- ...ishCoalescingOperatorInAsyncGenerator.json | 2 +- .../tests/tsc/numericLiteralTypes1.json | 40 +- .../tests/tsc/numericLiteralTypes2.json | 40 +- .../tests/tsc/numericLiteralTypes3.json | 58 +- .../tests/tsc/numericStringLiteralTypes.json | 14 +- .../tsc/objectLiteralContextualTyping.json | 6 +- ...tLiteralShorthandPropertiesAssignment.json | 14 +- ...teralShorthandPropertiesAssignmentES6.json | 14 +- ...ralShorthandPropertiesAssignmentError.json | 6 +- ...sAssignmentErrorFromMissingIdentifier.json | 8 +- ...alShorthandPropertiesFunctionArgument.json | 2 +- ...lShorthandPropertiesFunctionArgument2.json | 2 +- .../swc_ecma_parser/tests/tsc/objectRest.json | 4 +- .../tests/tsc/objectRest2.json | 6 +- .../tests/tsc/objectRestNegative.json | 2 +- .../tests/tsc/objectRestParameter.json | 4 +- .../tests/tsc/objectRestParameterES5.json | 4 +- .../tests/tsc/objectSpread.json | 34 +- .../tsc/objectSpreadRepeatedComplexity.json | 2 +- .../objectSpreadRepeatedNullCheckPerf.json | 2 +- .../tsc/objectSpreadSetonlyAccessor.json | 4 +- .../tests/tsc/objectSpreadStrictNull.json | 18 +- ...hCallSignatureAppearsToBeFunctionType.json | 8 +- ...natureHidingMembersOfExtendedFunction.json | 24 +- ...hCallSignatureHidingMembersOfFunction.json | 24 +- ...tructSignatureAppearsToBeFunctionType.json | 8 +- ...natureHidingMembersOfExtendedFunction.json | 24 +- ...tructSignatureHidingMembersOfFunction.json | 24 +- ...ursiveWrappedPropertyCheckedNominally.json | 8 +- ...ithStringAndNumberIndexSignatureToAny.json | 24 +- .../tests/tsc/objectTypesIdentity.json | 102 +-- .../tests/tsc/objectTypesIdentity2.json | 66 +- ...objectTypesIdentityWithCallSignatures.json | 128 ++-- ...bjectTypesIdentityWithCallSignatures2.json | 128 ++-- ...bjectTypesIdentityWithCallSignatures3.json | 48 +- ...ithCallSignaturesDifferingParamCounts.json | 134 ++-- ...thCallSignaturesDifferingParamCounts2.json | 56 +- ...entityWithCallSignaturesWithOverloads.json | 150 ++--- ...ctTypesIdentityWithComplexConstraints.json | 18 +- ...tTypesIdentityWithConstructSignatures.json | 108 ++-- ...TypesIdentityWithConstructSignatures2.json | 96 +-- ...nstructSignaturesDifferingParamCounts.json | 102 +-- ...ypesIdentityWithGenericCallSignatures.json | 128 ++-- ...pesIdentityWithGenericCallSignatures2.json | 142 ++-- ...cCallSignaturesDifferingByConstraints.json | 128 ++-- ...CallSignaturesDifferingByConstraints2.json | 158 ++--- ...CallSignaturesDifferingByConstraints3.json | 158 ++--- ...icCallSignaturesDifferingByReturnType.json | 128 ++-- ...cCallSignaturesDifferingByReturnType2.json | 128 ++-- ...ignaturesDifferingTypeParameterCounts.json | 128 ++-- ...gnaturesDifferingTypeParameterCounts2.json | 48 +- ...SignaturesDifferingTypeParameterNames.json | 128 ++-- ...thGenericCallSignaturesOptionalParams.json | 142 ++-- ...hGenericCallSignaturesOptionalParams2.json | 142 ++-- ...hGenericCallSignaturesOptionalParams3.json | 142 ++-- ...tructSignaturesDifferingByConstraints.json | 90 +-- ...ructSignaturesDifferingByConstraints2.json | 118 ++-- ...ructSignaturesDifferingByConstraints3.json | 118 ++-- ...structSignaturesDifferingByReturnType.json | 102 +-- ...tructSignaturesDifferingByReturnType2.json | 96 +-- ...ignaturesDifferingTypeParameterCounts.json | 90 +-- ...SignaturesDifferingTypeParameterNames.json | 90 +-- ...ericConstructSignaturesOptionalParams.json | 102 +-- ...ricConstructSignaturesOptionalParams2.json | 102 +-- ...ricConstructSignaturesOptionalParams3.json | 102 +-- ...jectTypesIdentityWithNumericIndexers1.json | 138 ++-- ...jectTypesIdentityWithNumericIndexers2.json | 138 ++-- ...jectTypesIdentityWithNumericIndexers3.json | 138 ++-- .../objectTypesIdentityWithOptionality.json | 54 +- .../tsc/objectTypesIdentityWithPrivates.json | 138 ++-- .../tsc/objectTypesIdentityWithPrivates2.json | 36 +- .../tsc/objectTypesIdentityWithPublics.json | 102 +-- ...objectTypesIdentityWithStringIndexers.json | 138 ++-- ...bjectTypesIdentityWithStringIndexers2.json | 138 ++-- .../tests/tsc/optionalChainingInference.json | 2 +- .../tests/tsc/optionalMethods.json | 6 +- .../tests/tsc/overloadResolution.json | 42 +- .../overloadResolutionClassConstructors.json | 38 +- .../tsc/overloadResolutionConstructors.json | 42 +- .../swc_ecma_parser/tests/tsc/override1.json | 18 +- .../swc_ecma_parser/tests/tsc/override19.json | 4 +- .../swc_ecma_parser/tests/tsc/override2.json | 14 +- .../swc_ecma_parser/tests/tsc/override4.json | 8 +- .../swc_ecma_parser/tests/tsc/override6.json | 8 +- .../swc_ecma_parser/tests/tsc/override8.json | 10 +- .../tests/tsc/overrideInterfaceProperty.json | 2 +- .../tests/tsc/paramTagOnCallExpression.json | 2 +- .../tsc/paramTagOnFunctionUsingArguments.json | 2 +- ...ameterInitializersForwardReferencing1.json | 2 +- ...erInitializersForwardReferencing1_es6.json | 2 +- .../tsc/parenthesizedContexualTyping1.json | 30 +- .../tsc/parenthesizedContexualTyping2.json | 18 +- .../tsc/parenthesizedContexualTyping3.json | 28 +- .../tests/tsc/parenthesizedTypes.json | 26 +- .../tests/tsc/parser536727.json | 4 +- .../tests/tsc/parserArgumentList1.json | 4 +- .../tsc/parserArrowFunctionExpression6.json | 4 +- .../tests/tsc/parserAstSpans1.json | 2 +- .../tests/tsc/parserClass1.json | 2 +- .../tests/tsc/parserClass2.json | 2 +- .../tests/tsc/parserClassDeclaration17.json | 2 +- ...rorRecovery_IncompleteMemberVariable1.json | 4 +- .../parserErrorRecovery_ParameterList6.json | 2 +- .../tsc/parserGenericsInTypeContexts1.json | 2 +- .../tsc/parserGenericsInTypeContexts2.json | 2 +- .../tsc/parserInterfaceDeclaration9.json | 6 +- .../parserMemberAccessorDeclaration15.json | 2 +- .../tests/tsc/parserModule1.json | 10 +- .../tests/tsc/parserModuleDeclaration11.json | 2 +- .../tests/tsc/parserOptionalTypeMembers1.json | 2 +- .../tests/tsc/parserOverloadOnConstants1.json | 8 +- .../tests/tsc/parserParameterList6.json | 2 +- .../tests/tsc/parserParameterList7.json | 6 +- .../tests/tsc/parserParameterList8.json | 6 +- .../tests/tsc/parserRealSource1.json | 30 +- .../tests/tsc/parserRealSource12.json | 256 ++++---- .../tests/tsc/parserRealSource13.json | 224 +++---- .../tests/tsc/parserRealSource14.json | 54 +- .../tests/tsc/parserRealSource2.json | 16 +- .../tests/tsc/parserRealSource5.json | 16 +- .../tests/tsc/parserRealSource6.json | 62 +- .../tests/tsc/parserRealSource8.json | 72 +-- .../tests/tsc/parserindenter.json | 116 ++-- ...tiallyAnnotatedFunctionInferenceError.json | 6 +- ...tedFunctionInferenceWithTypeParameter.json | 12 +- ...yAnnotatedFunctionWitoutTypeParameter.json | 6 +- .../tests/tsc/partiallyNamedTuples.json | 8 +- .../tests/tsc/primtiveTypesAreIdentical.json | 44 +- .../tests/tsc/privateNameAccessors.json | 4 +- .../tests/tsc/privateNameAndAny.json | 6 +- .../tsc/privateNameAndIndexSignature.json | 2 +- .../tsc/privateNameAndObjectRestSpread.json | 2 +- .../tsc/privateNameComputedPropertyName2.json | 2 +- .../tests/tsc/privateNameDuplicateField.json | 64 +- .../tests/tsc/privateNameES5Ban.json | 4 +- .../tests/tsc/privateNameEmitHelpers.json | 12 +- .../tests/tsc/privateNameField.json | 2 +- .../privateNameFieldDestructuredBinding.json | 2 +- ...ateNameFieldParenthesisLeftAssignment.json | 10 +- .../tsc/privateNameInInExpressionUnused.json | 2 +- .../privateNameInLhsReceiverExpression.json | 2 +- .../tests/tsc/privateNameMethod.json | 4 +- .../tsc/privateNameMethodAssignment.json | 4 +- .../tsc/privateNameSetterExprReturnValue.json | 2 +- .../tests/tsc/privateNameStaticAccessors.json | 4 +- ...ateNameStaticAccessorssDerivedClasses.json | 4 +- .../tsc/privateNameStaticEmitHelpers.json | 10 +- ...ateNameStaticFieldDestructuredBinding.json | 2 +- .../tests/tsc/privateNameStaticMethod.json | 2 +- .../privateNameStaticMethodAssignment.json | 4 +- .../privateNameStaticsAndStaticMethods.json | 10 +- .../tests/tsc/privateNameUnused.json | 4 +- .../tests/tsc/privateNamesAndMethods.json | 10 +- .../tsc/privateNamesAndStaticMethods.json | 10 +- .../tests/tsc/privateNamesAndkeyof.json | 2 +- .../tests/tsc/privateNamesAssertion.json | 8 +- .../tests/tsc/privateNamesUnique-2.json | 2 +- .../tests/tsc/privateNamesUnique-3.json | 2 +- .../tsc/privateWriteOnlyAccessorRead.json | 8 +- ...AccessOnTypeParameterWithConstraints2.json | 8 +- ...AccessOnTypeParameterWithConstraints3.json | 4 +- .../tests/tsc/propertyAccessWidening.json | 6 +- .../tsc/propertyOverridesAccessors4.json | 2 +- .../tsc/propertyOverridesAccessors5.json | 2 +- ...rtyAssignmentMergeWithInterfaceMethod.json | 6 +- .../tests/tsc/readonlyArraysAndTuples2.json | 8 +- .../tsc/readonlyConstructorAssignment.json | 10 +- .../tests/tsc/readonlyInAmbientClass.json | 4 +- .../tests/tsc/readonlyRestParameters.json | 4 +- .../tests/tsc/recursiveMappedTypes.json | 2 +- .../tests/tsc/recursiveTypeReferences1.json | 24 +- ...ecursiveTypesUsedAsFunctionParameters.json | 28 +- .../tests/tsc/recursiveTypesWithTypeof.json | 8 +- .../tsc/redefinedPararameterProperty.json | 2 +- .../tsc/relativePathToDeclarationFile.json | 2 +- .../tsc/requireAssertsFromTypescript.json | 8 +- .../tsc/restTuplesFromContextualTypes.json | 28 +- .../tests/tsc/scannerClass2.json | 2 +- .../tests/tsc/scannertest1.json | 6 +- ...IsNotSubtypeOfNonSpecializedSignature.json | 70 +- ...ureIsSubtypeOfNonSpecializedSignature.json | 100 +-- .../tsc/specializedSignatureWithOptional.json | 4 +- .../tests/tsc/spreadObjectOrFalsy.json | 14 +- .../tests/tsc/spreadOverwritesProperty.json | 4 +- .../tsc/spreadOverwritesPropertyStrict.json | 16 +- .../tests/tsc/spreadTypeVariable.json | 12 +- .../tests/tsc/spreadUnion3.json | 4 +- .../tests/tsc/staticIndexSignature6.json | 2 +- ...erAssignsToConstructorFunctionMembers.json | 2 +- .../staticMembersUsingClassTypeParameter.json | 6 +- .../tsc/staticPropertyNotInClassType.json | 8 +- .../tests/tsc/strictBindCallApply1.json | 36 +- .../tests/tsc/strictBindCallApply2.json | 2 +- .../tests/tsc/strictNullChecksNoWidening.json | 2 +- .../tsc/strictPropertyInitialization.json | 4 +- .../tests/tsc/stringEnumLiteralTypes1.json | 36 +- .../tests/tsc/stringEnumLiteralTypes2.json | 36 +- .../tests/tsc/stringEnumLiteralTypes3.json | 64 +- .../tests/tsc/stringLiteralCheckedInIf01.json | 2 +- .../tests/tsc/stringLiteralCheckedInIf02.json | 4 +- .../tests/tsc/stringLiteralType.json | 6 +- .../stringLiteralTypeIsSubtypeOfString.json | 134 ++-- .../tsc/stringLiteralTypesAndTuples01.json | 2 +- .../tests/tsc/stringLiteralTypesAsTags01.json | 16 +- .../tests/tsc/stringLiteralTypesAsTags02.json | 12 +- .../tests/tsc/stringLiteralTypesAsTags03.json | 12 +- ...teralTypesAsTypeParameterConstraint01.json | 8 +- ...teralTypesAsTypeParameterConstraint02.json | 4 +- ...iteralTypesInImplementationSignatures.json | 22 +- ...teralTypesInImplementationSignatures2.json | 32 +- ...ngLiteralTypesOverloadAssignability01.json | 8 +- ...ngLiteralTypesOverloadAssignability02.json | 8 +- ...ngLiteralTypesOverloadAssignability03.json | 8 +- ...ngLiteralTypesOverloadAssignability04.json | 8 +- ...ngLiteralTypesOverloadAssignability05.json | 10 +- .../tsc/stringLiteralTypesOverloads01.json | 16 +- .../tsc/stringLiteralTypesOverloads02.json | 16 +- .../tsc/stringLiteralTypesOverloads03.json | 16 +- .../tsc/stringLiteralTypesOverloads04.json | 4 +- .../tsc/stringLiteralTypesOverloads05.json | 10 +- .../stringLiteralTypesTypePredicates01.json | 12 +- .../tsc/stringMappingOverPatternLiterals.json | 44 +- .../tests/tsc/stringMappingReduction.json | 4 +- .../tests/tsc/subtypesOfAny.json | 2 +- .../tests/tsc/subtypesOfTypeParameter.json | 12 +- ...btypesOfTypeParameterWithConstraints2.json | 56 +- ...btypesOfTypeParameterWithConstraints3.json | 6 +- ...btypesOfTypeParameterWithConstraints4.json | 6 +- ...TypeParameterWithRecursiveConstraints.json | 6 +- .../tests/tsc/subtypesOfUnion.json | 4 +- .../tsc/subtypingWithCallSignatures.json | 14 +- .../tsc/subtypingWithCallSignatures2.json | 190 +++--- .../tsc/subtypingWithCallSignatures3.json | 116 ++-- .../tsc/subtypingWithCallSignatures4.json | 102 +-- .../tsc/subtypingWithCallSignaturesA.json | 4 +- ...hCallSignaturesWithOptionalParameters.json | 48 +- ...gWithCallSignaturesWithRestParameters.json | 78 +-- ...llSignaturesWithSpecializedSignatures.json | 56 +- .../tsc/subtypingWithConstructSignatures.json | 24 +- .../subtypingWithConstructSignatures2.json | 286 ++++----- .../subtypingWithConstructSignatures3.json | 170 ++--- .../subtypingWithConstructSignatures4.json | 150 ++--- .../subtypingWithConstructSignatures5.json | 118 ++-- .../subtypingWithConstructSignatures6.json | 46 +- ...tructSignaturesWithOptionalParameters.json | 48 +- ...ctSignaturesWithSpecializedSignatures.json | 56 +- ...cCallSignaturesWithOptionalParameters.json | 144 ++--- ...tructSignaturesWithOptionalParameters.json | 144 ++--- .../tsc/subtypingWithOptionalProperties.json | 2 +- .../superCallInConstructorWithNoBaseType.json | 2 +- .../superCallParameterContextualTyping1.json | 4 +- .../superCallParameterContextualTyping2.json | 4 +- .../superCallParameterContextualTyping3.json | 6 +- .../swc_ecma_parser/tests/tsc/superCalls.json | 4 +- .../tests/tsc/switchStatements.json | 2 +- .../switchWithConstrainedTypeVariable.json | 2 +- .../tests/tsc/symbolDeclarationEmit12.json | 4 +- .../tests/tsc/symbolDeclarationEmit3.json | 6 +- .../tests/tsc/symbolProperty13.json | 8 +- .../tests/tsc/symbolProperty14.json | 8 +- .../tests/tsc/symbolProperty15.json | 8 +- .../tests/tsc/symbolProperty16.json | 8 +- .../tests/tsc/symbolProperty18.json | 2 +- .../tests/tsc/symbolProperty20.json | 4 +- .../tests/tsc/symbolProperty21.json | 2 +- .../tests/tsc/symbolProperty22.json | 6 +- .../tests/tsc/symbolProperty39.json | 8 +- .../tests/tsc/symbolProperty40.json | 6 +- .../tests/tsc/symbolProperty41.json | 6 +- .../tests/tsc/symbolProperty42.json | 6 +- .../tests/tsc/symbolProperty43.json | 4 +- .../tests/tsc/symbolProperty47.json | 2 +- .../tests/tsc/symbolProperty61.json | 12 +- .../tsc/taggedTemplateContextualTyping1.json | 22 +- .../tsc/taggedTemplateContextualTyping2.json | 22 +- ...dTemplateStringsTypeArgumentInference.json | 86 +-- ...mplateStringsTypeArgumentInferenceES6.json | 86 +-- ...plateStringsWithIncompatibleTypedTags.json | 4 +- ...teStringsWithIncompatibleTypedTagsES6.json | 4 +- ...ringsWithManyCallAndMemberExpressions.json | 6 +- ...gsWithManyCallAndMemberExpressionsES6.json | 6 +- ...emplateStringsWithOverloadResolution1.json | 18 +- ...ateStringsWithOverloadResolution1_ES6.json | 18 +- ...emplateStringsWithOverloadResolution2.json | 16 +- ...ateStringsWithOverloadResolution2_ES6.json | 16 +- ...emplateStringsWithOverloadResolution3.json | 66 +- ...ateStringsWithOverloadResolution3_ES6.json | 66 +- ...gedTemplateStringsWithTagNamedDeclare.json | 2 +- ...TemplateStringsWithTagNamedDeclareES6.json | 2 +- ...onExpressionsInSubstitutionExpression.json | 2 +- ...xpressionsInSubstitutionExpressionES6.json | 2 +- .../taggedTemplateStringsWithTypedTags.json | 4 +- ...taggedTemplateStringsWithTypedTagsES6.json | 4 +- .../taggedTemplatesWithTypeArguments1.json | 24 +- .../tests/tsc/templateLiteralTypes2.json | 40 +- .../tests/tsc/templateLiteralTypes3.json | 60 +- .../tests/tsc/templateLiteralTypes4.json | 20 +- .../tests/tsc/templateLiteralTypes5.json | 8 +- .../tests/tsc/templateLiteralTypes6.json | 6 +- .../tests/tsc/templateLiteralTypes7.json | 8 +- .../tsc/templateLiteralTypesPatterns.json | 26 +- ...onExpressionsInSubstitutionExpression.json | 2 +- ...xpressionsInSubstitutionExpressionES6.json | 2 +- .../tests/tsc/thisTypeAccessibility.json | 22 +- .../tests/tsc/thisTypeAndConstraints.json | 8 +- .../tests/tsc/thisTypeErrors.json | 14 +- .../tests/tsc/thisTypeErrors2.json | 4 +- .../tests/tsc/thisTypeInAccessors.json | 14 +- .../tsc/thisTypeInAccessorsNegative.json | 2 +- .../tests/tsc/thisTypeInClasses.json | 10 +- .../tests/tsc/thisTypeInFunctions.json | 132 ++-- .../tests/tsc/thisTypeInFunctions2.json | 14 +- .../tests/tsc/thisTypeInFunctions3.json | 2 +- .../tests/tsc/thisTypeInFunctions4.json | 8 +- .../tests/tsc/thisTypeInInterfaces.json | 12 +- .../tests/tsc/thisTypeInObjectLiterals.json | 8 +- .../tests/tsc/thisTypeInObjectLiterals2.json | 46 +- .../tsc/thisTypeInTaggedTemplateCall.json | 4 +- .../tests/tsc/thisTypeInTypePredicate.json | 6 +- .../tests/tsc/thisTypeOptionalCall.json | 6 +- .../tests/tsc/thisTypeSyntacticContext.json | 4 +- .../tests/tsc/throwStatements.json | 4 +- ...ergedInterfacesWithDifferingOverloads.json | 34 +- ...rgedInterfacesWithDifferingOverloads2.json | 16 +- .../tests/tsc/typeAliases.json | 16 +- .../tests/tsc/typeArgumentInference.json | 62 +- ...eArgumentInferenceConstructSignatures.json | 62 +- .../tsc/typeArgumentInferenceErrors.json | 28 +- ...rgumentInferenceTransitiveConstraints.json | 6 +- .../typeArgumentInferenceWithConstraints.json | 62 +- ...ypeArgumentInferenceWithObjectLiteral.json | 10 +- ...typeArgumentsWithStringLiteralTypes01.json | 14 +- .../tsc/typeFromParamTagForFunction.json | 2 +- .../tsc/typeFromPropertyAssignment29.json | 24 +- .../tsc/typeFromPropertyAssignment31.json | 4 +- .../tsc/typeFromPropertyAssignment32.json | 4 +- .../tsc/typeFromPropertyAssignment33.json | 4 +- .../tsc/typeFromPropertyAssignment36.json | 2 +- .../tests/tsc/typeGuardFunction.json | 22 +- .../tests/tsc/typeGuardFunctionGenerics.json | 16 +- .../typeGuardFunctionOfFormThisErrors.json | 2 +- .../tests/tsc/typeGuardIntersectionTypes.json | 22 +- ...typeGuardNarrowsPrimitiveIntersection.json | 12 +- .../tsc/typeGuardNarrowsToLiteralType.json | 6 +- .../typeGuardNarrowsToLiteralTypeUnion.json | 6 +- .../tsc/typeGuardOfFormFunctionEquality.json | 12 +- .../tests/tsc/typeGuardOfFormIsType.json | 6 +- .../typeGuardOfFormIsTypeOnInterfaces.json | 6 +- .../tsc/typeGuardOfFormTypeOfFunction.json | 26 +- .../typeGuardOfFromPropNameInUnionType.json | 16 +- .../tests/tsc/typeGuardTypeOfUndefined.json | 32 +- .../tests/tsc/typeGuardsAsAssertions.json | 8 +- .../tests/tsc/typeGuardsDefeat.json | 6 +- .../tests/tsc/typeGuardsInClassAccessors.json | 8 +- .../tests/tsc/typeGuardsInClassMethods.json | 10 +- .../typeGuardsInConditionalExpression.json | 24 +- .../tests/tsc/typeGuardsInDoStatement.json | 6 +- .../tests/tsc/typeGuardsInForStatement.json | 6 +- .../tests/tsc/typeGuardsInFunction.json | 12 +- .../typeGuardsInFunctionAndModuleBlock.json | 12 +- .../tests/tsc/typeGuardsInIfStatement.json | 24 +- ...eGuardsInRightOperandOfAndAndOperator.json | 14 +- ...ypeGuardsInRightOperandOfOrOrOperator.json | 14 +- .../tests/tsc/typeGuardsInWhileStatement.json | 6 +- .../tests/tsc/typeGuardsObjectMethods.json | 4 +- .../tests/tsc/typeGuardsTypeParameters.json | 6 +- .../tests/tsc/typeGuardsWithInstanceOf.json | 2 +- ...sWithInstanceOfByConstructorSignature.json | 4 +- ...ardsWithInstanceOfBySymbolHasInstance.json | 20 +- .../tests/tsc/typeInferenceWithTupleType.json | 12 +- .../tests/tsc/typeOfThisGeneral.json | 4 +- .../tests/tsc/typeOfThisInInstanceMember.json | 2 +- .../tsc/typeOfThisInInstanceMember2.json | 2 +- .../tests/tsc/typeOfThisInStaticMembers.json | 4 +- .../tsc/typeOfThisInStaticMembers10.json | 4 +- .../tsc/typeOfThisInStaticMembers11.json | 4 +- .../tests/tsc/typeOfThisInStaticMembers5.json | 2 +- .../tsc/typeParameterAsTypeArgument.json | 4 +- ...ypeParameterAsTypeParameterConstraint.json | 8 +- ...peParameterAsTypeParameterConstraint2.json | 8 +- ...AsTypeParameterConstraintTransitively.json | 12 +- ...sTypeParameterConstraintTransitively2.json | 12 +- .../tests/tsc/typeParameterAssignability.json | 4 +- .../tsc/typeParameterAssignability2.json | 32 +- .../tsc/typeParameterAssignability3.json | 4 +- ...meterConstModifiersReverseMappedTypes.json | 8 +- ...rameterConstModifiersWithIntersection.json | 2 +- ...eterExtendsUnionConstraintDistributed.json | 4 +- ...arameterUsedAsTypeParameterConstraint.json | 16 +- ...rameterUsedAsTypeParameterConstraint2.json | 32 +- ...rameterUsedAsTypeParameterConstraint3.json | 4 +- ...rameterUsedAsTypeParameterConstraint4.json | 24 +- ...ypeParametersAreIdenticalToThemselves.json | 118 ++-- .../typeParametersAvailableInNestedScope.json | 2 +- ...typeParametersAvailableInNestedScope2.json | 8 +- ...typeParametersAvailableInNestedScope3.json | 8 +- .../tests/tsc/typePredicateASI.json | 6 +- .../tests/tsc/typeQueryOnClass.json | 8 +- .../tests/tsc/typeRelationships.json | 2 +- .../typeSatisfaction_contextualTyping1.json | 2 +- .../typeSatisfaction_contextualTyping2.json | 6 +- .../typeSatisfaction_contextualTyping3.json | 2 +- .../typeSatisfaction_ensureInterfaceImpl.json | 2 +- ...atisfaction_propertyValueConformance1.json | 4 +- ...atisfaction_propertyValueConformance2.json | 4 +- .../tests/tsc/typeofClass2.json | 10 +- .../swc_ecma_parser/tests/tsc/typeofThis.json | 4 +- .../tests/tsc/typeofTypeParameter.json | 2 +- .../tsc/typesWithPrivateConstructor.json | 6 +- .../tsc/typesWithProtectedConstructor.json | 6 +- .../tests/tsc/typesWithPublicConstructor.json | 6 +- .../typesWithSpecializedCallSignatures.json | 18 +- ...pesWithSpecializedConstructSignatures.json | 18 +- .../tsc/undefinedAssignableToEveryType.json | 10 +- .../tsc/unionAndIntersectionInference1.json | 28 +- .../tsc/unionAndIntersectionInference2.json | 4 +- .../tsc/unionAndIntersectionInference3.json | 32 +- ...ubtypeIfEveryConstituentTypeIsSubtype.json | 2 +- .../tests/tsc/unionThisTypeInFunctions.json | 10 +- .../tests/tsc/unionTypeCallSignatures.json | 68 +- .../tests/tsc/unionTypeCallSignatures2.json | 26 +- .../tests/tsc/unionTypeCallSignatures3.json | 16 +- .../tests/tsc/unionTypeCallSignatures4.json | 20 +- .../tests/tsc/unionTypeCallSignatures5.json | 10 +- .../tests/tsc/unionTypeCallSignatures6.json | 22 +- .../tests/tsc/unionTypeCallSignatures7.json | 2 +- .../tsc/unionTypeConstructSignatures.json | 68 +- .../tests/tsc/unionTypeInference.json | 36 +- .../tests/tsc/unionTypeMembers.json | 24 +- .../tests/tsc/unionTypeReduction2.json | 54 +- .../tests/tsc/unionTypesAssignability.json | 4 +- .../tests/tsc/unionsOfTupleTypes1.json | 10 +- .../tests/tsc/uniqueSymbols.json | 20 +- .../tests/tsc/uniqueSymbolsDeclarations.json | 8 +- .../tsc/uniqueSymbolsDeclarationsErrors.json | 16 +- .../tests/tsc/unknownControlFlow.json | 92 +-- .../tests/tsc/unknownType1.json | 34 +- .../tests/tsc/unknownType2.json | 22 +- .../tests/tsc/usingDeclarations.11.json | 4 +- .../validMultipleVariableDeclarations.json | 8 +- .../tests/tsc/validNullAssignments.json | 2 +- .../tests/tsc/validUndefinedAssignments.json | 2 +- .../tests/tsc/varRequireFromTypescript.json | 2 +- .../tests/tsc/variadicTuples1.json | 154 ++--- .../swc_ecma_parser/tests/tsc/variance.json | 2 +- .../tsc/voidParamAssignmentCompatibility.json | 4 +- .../tests/tsc/wideningTuples1.json | 2 +- crates/swc_ecma_parser/tests/tsc/witness.json | 20 +- .../tsc/wrappedAndRecursiveConstraints.json | 4 +- .../tsc/wrappedAndRecursiveConstraints2.json | 2 +- .../tsc/wrappedAndRecursiveConstraints3.json | 6 +- .../tsc/wrappedAndRecursiveConstraints4.json | 6 +- .../parameter-properties/input.ts.swc-stderr | 2 +- .../async-generic/input.ts.json | 2 +- .../input.ts.json | 4 +- .../class/constructor/input.ts.json | 12 +- .../typescript/class/decorators/input.ts.json | 2 +- .../class/method-generic/input.ts.json | 4 +- .../override-parameter-property/input.ts.json | 10 +- .../custom/arrow/complex-tsc/input.ts.json | 2 +- .../custom/arrow/complex/input.ts.json | 6 +- .../function/input.ts.json | 4 +- .../typescript/custom/issue-236/input.ts.json | 6 +- .../typescript/custom/issue-496/input.ts.json | 2 +- .../typescript/custom/issue-717/input.ts.json | 2 +- .../2021-02-17/case1/input.tsx.json | 4 +- .../2021-02-17/case2/input.tsx.json | 4 +- .../typescript/deno/dso/reflect/input.ts.json | 522 +++++++-------- .../es2019/from-entries/input.ts.json | 4 +- .../function/annotated/input.ts.json | 2 +- .../function/anonymous/input.ts.json | 2 +- .../function/export-default/input.ts.json | 2 +- .../function/overloads/input.ts.json | 4 +- .../function/predicate-types/input.ts.json | 8 +- .../interface/call-signature/input.ts.json | 2 +- .../construct-signature/input.ts.json | 2 +- .../interface/method-plain/input.ts.json | 2 +- .../typescript/issue-1299/ts/input.ts.json | 4 +- .../typescript/issue-1299/tsx/input.tsx.json | 4 +- .../issue-1505/case2/input.tsx.json | 4 +- .../typescript/issue-1517/case1/input.ts.json | 2 +- .../typescript/issue-1517/case2/input.ts.json | 2 +- .../typescript/issue-2343/1/input.ts.json | 2 +- .../typescript/issue-3241/1/input.tsx.json | 4 +- .../tests/typescript/issue-6430/index.ts.json | 18 +- .../typescript/issue-7186/1/input.ts.json | 4 +- .../typescript/issue-7186/2/input.tsx.json | 4 +- .../tests/typescript/issue-7187/input.ts.json | 2 +- .../tests/typescript/issue-7305/input.ts.json | 2 +- .../tests/typescript/issue-8209/input.ts.json | 2 +- .../tests/typescript/issue-8581/input.ts.json | 6 +- .../typescript/issue-8735/1/input.ts.json | 2 +- .../typescript/issue-8735/2/input.tsx.json | 2 +- .../tests/typescript/issue-913/input.ts.json | 12 +- .../regression/tsx-issue-7742/input.ts.json | 2 +- .../basic/input.ts.json | 4 +- .../types/function-generic/input.ts.json | 2 +- .../types/function-with-this/input.ts.json | 2 +- .../typescript/types/function/input.ts.json | 4 +- .../types/object-shorthand/input.ts.json | 2 +- .../variance-annotations/1/input.ts.json | 26 +- .../with_jsx/input.tsx.json | 26 +- 1176 files changed, 12531 insertions(+), 12346 deletions(-) create mode 100644 crates/swc_ecma_parser/tests/span/ts/issue-8856/param.ts create mode 100644 crates/swc_ecma_parser/tests/span/ts/issue-8856/param.ts.span.swc-stderr create mode 100644 crates/swc_ecma_parser/tests/span/ts/issue-8856/var-decl.ts create mode 100644 crates/swc_ecma_parser/tests/span/ts/issue-8856/var-decl.ts.span.swc-stderr diff --git a/crates/swc/tests/tsc-references/callSignaturesWithDuplicateParameters.1.normal.js b/crates/swc/tests/tsc-references/callSignaturesWithDuplicateParameters.1.normal.js index e07fa5c89563..966a7e2512f1 100644 --- a/crates/swc/tests/tsc-references/callSignaturesWithDuplicateParameters.1.normal.js +++ b/crates/swc/tests/tsc-references/callSignaturesWithDuplicateParameters.1.normal.js @@ -74,9 +74,9 @@ //! 7 | var f4 = (x: T, x: T) => { } //! 8 | //! 9 | function foo2(x: string, x: number) { } -//! : ^^^^|^^^^ ^^^^|^^^^ -//! : | `-- used as parameter more than once -//! : `-- previous definition here +//! : | | +//! : | `-- used as parameter more than once +//! : `-- previous definition here //! 10 | var f5 = function foo(x: string, x: number) { } //! 11 | var f6 = function (x: string, x: number) { } //! 12 | var f7 = (x: string, x: number) => { } @@ -88,9 +88,9 @@ //! 8 | //! 9 | function foo2(x: string, x: number) { } //! 10 | var f5 = function foo(x: string, x: number) { } -//! : ^^^^|^^^^ ^^^^|^^^^ -//! : | `-- used as parameter more than once -//! : `-- previous definition here +//! : | | +//! : | `-- used as parameter more than once +//! : `-- previous definition here //! 11 | var f6 = function (x: string, x: number) { } //! 12 | var f7 = (x: string, x: number) => { } //! 13 | var f8 = (x: T, y: T) => { } @@ -102,9 +102,9 @@ //! 9 | function foo2(x: string, x: number) { } //! 10 | var f5 = function foo(x: string, x: number) { } //! 11 | var f6 = function (x: string, x: number) { } -//! : ^^^^|^^^^ ^^^^|^^^^ -//! : | `-- used as parameter more than once -//! : `-- previous definition here +//! : | | +//! : | `-- used as parameter more than once +//! : `-- previous definition here //! 12 | var f7 = (x: string, x: number) => { } //! 13 | var f8 = (x: T, y: T) => { } //! `---- @@ -143,9 +143,9 @@ //! 15 | class C { //! 16 | foo(x, x) { } //! 17 | foo2(x: number, x: string) { } -//! : ^^^^|^^^^ ^^^^|^^^^ -//! : | `-- used as parameter more than once -//! : `-- previous definition here +//! : | | +//! : | `-- used as parameter more than once +//! : `-- previous definition here //! 18 | foo3(x: T, x: T) { } //! 19 | } //! `---- @@ -156,9 +156,9 @@ //! 16 | foo(x, x) { } //! 17 | foo2(x: number, x: string) { } //! 18 | foo3(x: T, x: T) { } -//! : ^^|^ ^^|^ -//! : | `-- used as parameter more than once -//! : `-- previous definition here +//! : | | +//! : | `-- used as parameter more than once +//! : `-- previous definition here //! 19 | } //! 20 | //! 21 | interface I { @@ -184,9 +184,9 @@ //! 34 | var b = { //! 35 | foo(x, x) { }, //! 36 | a: function foo(x: number, x: string) { }, -//! : ^^^^|^^^^ ^^^^|^^^^ -//! : | `-- used as parameter more than once -//! : `-- previous definition here +//! : | | +//! : | `-- used as parameter more than once +//! : `-- previous definition here //! 37 | b: (x: T, x: T) => { } //! 38 | } //! `---- diff --git a/crates/swc/tests/tsc-references/callSignaturesWithDuplicateParameters.2.minified.js b/crates/swc/tests/tsc-references/callSignaturesWithDuplicateParameters.2.minified.js index e07fa5c89563..966a7e2512f1 100644 --- a/crates/swc/tests/tsc-references/callSignaturesWithDuplicateParameters.2.minified.js +++ b/crates/swc/tests/tsc-references/callSignaturesWithDuplicateParameters.2.minified.js @@ -74,9 +74,9 @@ //! 7 | var f4 = (x: T, x: T) => { } //! 8 | //! 9 | function foo2(x: string, x: number) { } -//! : ^^^^|^^^^ ^^^^|^^^^ -//! : | `-- used as parameter more than once -//! : `-- previous definition here +//! : | | +//! : | `-- used as parameter more than once +//! : `-- previous definition here //! 10 | var f5 = function foo(x: string, x: number) { } //! 11 | var f6 = function (x: string, x: number) { } //! 12 | var f7 = (x: string, x: number) => { } @@ -88,9 +88,9 @@ //! 8 | //! 9 | function foo2(x: string, x: number) { } //! 10 | var f5 = function foo(x: string, x: number) { } -//! : ^^^^|^^^^ ^^^^|^^^^ -//! : | `-- used as parameter more than once -//! : `-- previous definition here +//! : | | +//! : | `-- used as parameter more than once +//! : `-- previous definition here //! 11 | var f6 = function (x: string, x: number) { } //! 12 | var f7 = (x: string, x: number) => { } //! 13 | var f8 = (x: T, y: T) => { } @@ -102,9 +102,9 @@ //! 9 | function foo2(x: string, x: number) { } //! 10 | var f5 = function foo(x: string, x: number) { } //! 11 | var f6 = function (x: string, x: number) { } -//! : ^^^^|^^^^ ^^^^|^^^^ -//! : | `-- used as parameter more than once -//! : `-- previous definition here +//! : | | +//! : | `-- used as parameter more than once +//! : `-- previous definition here //! 12 | var f7 = (x: string, x: number) => { } //! 13 | var f8 = (x: T, y: T) => { } //! `---- @@ -143,9 +143,9 @@ //! 15 | class C { //! 16 | foo(x, x) { } //! 17 | foo2(x: number, x: string) { } -//! : ^^^^|^^^^ ^^^^|^^^^ -//! : | `-- used as parameter more than once -//! : `-- previous definition here +//! : | | +//! : | `-- used as parameter more than once +//! : `-- previous definition here //! 18 | foo3(x: T, x: T) { } //! 19 | } //! `---- @@ -156,9 +156,9 @@ //! 16 | foo(x, x) { } //! 17 | foo2(x: number, x: string) { } //! 18 | foo3(x: T, x: T) { } -//! : ^^|^ ^^|^ -//! : | `-- used as parameter more than once -//! : `-- previous definition here +//! : | | +//! : | `-- used as parameter more than once +//! : `-- previous definition here //! 19 | } //! 20 | //! 21 | interface I { @@ -184,9 +184,9 @@ //! 34 | var b = { //! 35 | foo(x, x) { }, //! 36 | a: function foo(x: number, x: string) { }, -//! : ^^^^|^^^^ ^^^^|^^^^ -//! : | `-- used as parameter more than once -//! : `-- previous definition here +//! : | | +//! : | `-- used as parameter more than once +//! : `-- previous definition here //! 37 | b: (x: T, x: T) => { } //! 38 | } //! `---- diff --git a/crates/swc/tests/tsc-references/declarationEmitWorkWithInlineComments.1.normal.js b/crates/swc/tests/tsc-references/declarationEmitWorkWithInlineComments.1.normal.js index a9b7110e17a0..3bd7b2c2043f 100644 --- a/crates/swc/tests/tsc-references/declarationEmitWorkWithInlineComments.1.normal.js +++ b/crates/swc/tests/tsc-references/declarationEmitWorkWithInlineComments.1.normal.js @@ -2,7 +2,7 @@ import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; export var Foo = function Foo(/** @internal */ isInternal1, /** @internal */ isInternal2, /** @internal */ isInternal3, // @internal isInternal4, // nothing -/** @internal */ isInternal5, /* @internal */ isInternal6 /* trailing */ , /* @internal */ isInternal7, /** @internal */ // not work +/** @internal */ isInternal5, /* @internal */ isInternal6/* trailing */ , /* @internal */ isInternal7, /** @internal */ // not work notInternal1, // @internal /* not work */ notInternal2, /* not work */ // @internal /* not work */ notInternal3) { diff --git a/crates/swc/tests/tsc-references/parserindenter.1.normal.js b/crates/swc/tests/tsc-references/parserindenter.1.normal.js index 3cbc4f144282..453ced8b8c0c 100644 --- a/crates/swc/tests/tsc-references/parserindenter.1.normal.js +++ b/crates/swc/tests/tsc-references/parserindenter.1.normal.js @@ -380,7 +380,7 @@ var Formatting; } return null; }; - _proto.GetIndentationDelta = function GetIndentationDelta(tokenStartPosition, childTokenStartPosition /*?*/ ) { + _proto.GetIndentationDelta = function GetIndentationDelta(tokenStartPosition, childTokenStartPosition/*?*/ ) { Debug.Assert(childTokenStartPosition !== undefined, "Error: caller must pass 'null' for undefined position"); var indentationDeltaSize = this.offsetIndentationDeltas.GetValue(tokenStartPosition); if (indentationDeltaSize === null) { diff --git a/crates/swc_ecma_parser/src/parser/pat.rs b/crates/swc_ecma_parser/src/parser/pat.rs index 20a6d5c35d15..0878402b983a 100644 --- a/crates/swc_ecma_parser/src/parser/pat.rs +++ b/crates/swc_ecma_parser/src/parser/pat.rs @@ -214,11 +214,6 @@ impl Parser { ref mut span, .. }) - | Pat::Ident(BindingIdent { - ref mut type_ann, - id: Ident { ref mut span, .. }, - .. - }) | Pat::Object(ObjectPat { ref mut type_ann, ref mut span, @@ -235,6 +230,14 @@ impl Parser { } *type_ann = new_type_ann; } + + Pat::Ident(BindingIdent { + ref mut type_ann, .. + }) => { + let new_type_ann = self.try_parse_ts_type_ann()?; + *type_ann = new_type_ann; + } + Pat::Assign(AssignPat { ref mut span, .. }) => { if (self.try_parse_ts_type_ann()?).is_some() { *span = Span::new(pat_start, self.input.prev_span().hi, Default::default()); diff --git a/crates/swc_ecma_parser/tests/span/ts/decl/decorated-class.ts.span.swc-stderr b/crates/swc_ecma_parser/tests/span/ts/decl/decorated-class.ts.span.swc-stderr index 98f8da19ceb4..d71318c256f9 100644 --- a/crates/swc_ecma_parser/tests/span/ts/decl/decorated-class.ts.span.swc-stderr +++ b/crates/swc_ecma_parser/tests/span/ts/decl/decorated-class.ts.span.swc-stderr @@ -415,14 +415,14 @@ ,-[$DIR/tests/span/ts/decl/decorated-class.ts:4:1] 4 | export class CommentController { 5 | constructor(private commentService: CommentService) { } - : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + : ^^^^^^^^^^^^^^ `---- x Ident ,-[$DIR/tests/span/ts/decl/decorated-class.ts:4:1] 4 | export class CommentController { 5 | constructor(private commentService: CommentService) { } - : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + : ^^^^^^^^^^^^^^ `---- x TsTypeAnn @@ -617,7 +617,7 @@ ,-[$DIR/tests/span/ts/decl/decorated-class.ts:9:1] 9 | public updateComment( 10 | @Param('id') id: string, - : ^^^^^^^^^^ + : ^^ 11 | @Body() updateCommentDto: UpdateCommentDto, `---- @@ -625,7 +625,7 @@ ,-[$DIR/tests/span/ts/decl/decorated-class.ts:9:1] 9 | public updateComment( 10 | @Param('id') id: string, - : ^^^^^^^^^^ + : ^^ 11 | @Body() updateCommentDto: UpdateCommentDto, `---- @@ -713,7 +713,7 @@ ,-[$DIR/tests/span/ts/decl/decorated-class.ts:10:1] 10 | @Param('id') id: string, 11 | @Body() updateCommentDto: UpdateCommentDto, - : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + : ^^^^^^^^^^^^^^^^ 12 | @User() user: UserType, `---- @@ -721,7 +721,7 @@ ,-[$DIR/tests/span/ts/decl/decorated-class.ts:10:1] 10 | @Param('id') id: string, 11 | @Body() updateCommentDto: UpdateCommentDto, - : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + : ^^^^^^^^^^^^^^^^ 12 | @User() user: UserType, `---- @@ -825,7 +825,7 @@ ,-[$DIR/tests/span/ts/decl/decorated-class.ts:11:1] 11 | @Body() updateCommentDto: UpdateCommentDto, 12 | @User() user: UserType, - : ^^^^^^^^^^^^^^ + : ^^^^ 13 | ) { `---- @@ -833,7 +833,7 @@ ,-[$DIR/tests/span/ts/decl/decorated-class.ts:11:1] 11 | @Body() updateCommentDto: UpdateCommentDto, 12 | @User() user: UserType, - : ^^^^^^^^^^^^^^ + : ^^^^ 13 | ) { `---- @@ -1370,7 +1370,7 @@ ,-[$DIR/tests/span/ts/decl/decorated-class.ts:18:1] 18 | @Delete(COMMENT_DELETE_ENDPOINT) 19 | public deleteComment(@Param('id') id: string, @User() user: UserType) { - : ^^^^^^^^^^ + : ^^ 20 | return this.commentService.delete(id, user.id); `---- @@ -1378,7 +1378,7 @@ ,-[$DIR/tests/span/ts/decl/decorated-class.ts:18:1] 18 | @Delete(COMMENT_DELETE_ENDPOINT) 19 | public deleteComment(@Param('id') id: string, @User() user: UserType) { - : ^^^^^^^^^^ + : ^^ 20 | return this.commentService.delete(id, user.id); `---- @@ -1466,7 +1466,7 @@ ,-[$DIR/tests/span/ts/decl/decorated-class.ts:18:1] 18 | @Delete(COMMENT_DELETE_ENDPOINT) 19 | public deleteComment(@Param('id') id: string, @User() user: UserType) { - : ^^^^^^^^^^^^^^ + : ^^^^ 20 | return this.commentService.delete(id, user.id); `---- @@ -1474,7 +1474,7 @@ ,-[$DIR/tests/span/ts/decl/decorated-class.ts:18:1] 18 | @Delete(COMMENT_DELETE_ENDPOINT) 19 | public deleteComment(@Param('id') id: string, @User() user: UserType) { - : ^^^^^^^^^^^^^^ + : ^^^^ 20 | return this.commentService.delete(id, user.id); `---- diff --git a/crates/swc_ecma_parser/tests/span/ts/issue-8856/param.ts b/crates/swc_ecma_parser/tests/span/ts/issue-8856/param.ts new file mode 100644 index 000000000000..946702636b31 --- /dev/null +++ b/crates/swc_ecma_parser/tests/span/ts/issue-8856/param.ts @@ -0,0 +1 @@ +function b(a: number = 1) { } diff --git a/crates/swc_ecma_parser/tests/span/ts/issue-8856/param.ts.span.swc-stderr b/crates/swc_ecma_parser/tests/span/ts/issue-8856/param.ts.span.swc-stderr new file mode 100644 index 000000000000..0f75417797d9 --- /dev/null +++ b/crates/swc_ecma_parser/tests/span/ts/issue-8856/param.ts.span.swc-stderr @@ -0,0 +1,114 @@ + + x Module + ,-[$DIR/tests/span/ts/issue-8856/param.ts:1:1] + 1 | function b(a: number = 1) { } + : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + `---- + + x ModuleItem + ,-[$DIR/tests/span/ts/issue-8856/param.ts:1:1] + 1 | function b(a: number = 1) { } + : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + `---- + + x Stmt + ,-[$DIR/tests/span/ts/issue-8856/param.ts:1:1] + 1 | function b(a: number = 1) { } + : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + `---- + + x Decl + ,-[$DIR/tests/span/ts/issue-8856/param.ts:1:1] + 1 | function b(a: number = 1) { } + : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + `---- + + x FnDecl + ,-[$DIR/tests/span/ts/issue-8856/param.ts:1:1] + 1 | function b(a: number = 1) { } + : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + `---- + + x Ident + ,-[$DIR/tests/span/ts/issue-8856/param.ts:1:1] + 1 | function b(a: number = 1) { } + : ^ + `---- + + x Function + ,-[$DIR/tests/span/ts/issue-8856/param.ts:1:1] + 1 | function b(a: number = 1) { } + : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + `---- + + x Param + ,-[$DIR/tests/span/ts/issue-8856/param.ts:1:1] + 1 | function b(a: number = 1) { } + : ^^^^^^^^^^^^^ + `---- + + x Pat + ,-[$DIR/tests/span/ts/issue-8856/param.ts:1:1] + 1 | function b(a: number = 1) { } + : ^^^^^^^^^^^^^ + `---- + + x AssignPat + ,-[$DIR/tests/span/ts/issue-8856/param.ts:1:1] + 1 | function b(a: number = 1) { } + : ^^^^^^^^^^^^^ + `---- + + x Pat + ,-[$DIR/tests/span/ts/issue-8856/param.ts:1:1] + 1 | function b(a: number = 1) { } + : ^ + `---- + + x Ident + ,-[$DIR/tests/span/ts/issue-8856/param.ts:1:1] + 1 | function b(a: number = 1) { } + : ^ + `---- + + x TsTypeAnn + ,-[$DIR/tests/span/ts/issue-8856/param.ts:1:1] + 1 | function b(a: number = 1) { } + : ^^^^^^^^ + `---- + + x TsType + ,-[$DIR/tests/span/ts/issue-8856/param.ts:1:1] + 1 | function b(a: number = 1) { } + : ^^^^^^ + `---- + + x TsKeywordType + ,-[$DIR/tests/span/ts/issue-8856/param.ts:1:1] + 1 | function b(a: number = 1) { } + : ^^^^^^ + `---- + + x Expr + ,-[$DIR/tests/span/ts/issue-8856/param.ts:1:1] + 1 | function b(a: number = 1) { } + : ^ + `---- + + x Lit + ,-[$DIR/tests/span/ts/issue-8856/param.ts:1:1] + 1 | function b(a: number = 1) { } + : ^ + `---- + + x Number + ,-[$DIR/tests/span/ts/issue-8856/param.ts:1:1] + 1 | function b(a: number = 1) { } + : ^ + `---- + + x BlockStmt + ,-[$DIR/tests/span/ts/issue-8856/param.ts:1:1] + 1 | function b(a: number = 1) { } + : ^^^ + `---- diff --git a/crates/swc_ecma_parser/tests/span/ts/issue-8856/var-decl.ts b/crates/swc_ecma_parser/tests/span/ts/issue-8856/var-decl.ts new file mode 100644 index 000000000000..f6e45e43bef8 --- /dev/null +++ b/crates/swc_ecma_parser/tests/span/ts/issue-8856/var-decl.ts @@ -0,0 +1 @@ +const a: number diff --git a/crates/swc_ecma_parser/tests/span/ts/issue-8856/var-decl.ts.span.swc-stderr b/crates/swc_ecma_parser/tests/span/ts/issue-8856/var-decl.ts.span.swc-stderr new file mode 100644 index 000000000000..0ad084dd3497 --- /dev/null +++ b/crates/swc_ecma_parser/tests/span/ts/issue-8856/var-decl.ts.span.swc-stderr @@ -0,0 +1,66 @@ + + x Module + ,-[$DIR/tests/span/ts/issue-8856/var-decl.ts:1:1] + 1 | const a: number + : ^^^^^^^^^^^^^^^ + `---- + + x ModuleItem + ,-[$DIR/tests/span/ts/issue-8856/var-decl.ts:1:1] + 1 | const a: number + : ^^^^^^^^^^^^^^^ + `---- + + x Stmt + ,-[$DIR/tests/span/ts/issue-8856/var-decl.ts:1:1] + 1 | const a: number + : ^^^^^^^^^^^^^^^ + `---- + + x Decl + ,-[$DIR/tests/span/ts/issue-8856/var-decl.ts:1:1] + 1 | const a: number + : ^^^^^^^^^^^^^^^ + `---- + + x VarDecl + ,-[$DIR/tests/span/ts/issue-8856/var-decl.ts:1:1] + 1 | const a: number + : ^^^^^^^^^^^^^^^ + `---- + + x VarDeclarator + ,-[$DIR/tests/span/ts/issue-8856/var-decl.ts:1:1] + 1 | const a: number + : ^^^^^^^^^ + `---- + + x Pat + ,-[$DIR/tests/span/ts/issue-8856/var-decl.ts:1:1] + 1 | const a: number + : ^ + `---- + + x Ident + ,-[$DIR/tests/span/ts/issue-8856/var-decl.ts:1:1] + 1 | const a: number + : ^ + `---- + + x TsTypeAnn + ,-[$DIR/tests/span/ts/issue-8856/var-decl.ts:1:1] + 1 | const a: number + : ^^^^^^^^ + `---- + + x TsType + ,-[$DIR/tests/span/ts/issue-8856/var-decl.ts:1:1] + 1 | const a: number + : ^^^^^^ + `---- + + x TsKeywordType + ,-[$DIR/tests/span/ts/issue-8856/var-decl.ts:1:1] + 1 | const a: number + : ^^^^^^ + `---- diff --git a/crates/swc_ecma_parser/tests/span/ts/type/interface.ts.span.swc-stderr b/crates/swc_ecma_parser/tests/span/ts/type/interface.ts.span.swc-stderr index 769e36bad1c4..6d4271d8869b 100644 --- a/crates/swc_ecma_parser/tests/span/ts/type/interface.ts.span.swc-stderr +++ b/crates/swc_ecma_parser/tests/span/ts/type/interface.ts.span.swc-stderr @@ -96,7 +96,7 @@ ,-[$DIR/tests/span/ts/type/interface.ts:2:1] 2 | new(); 3 | (foo: string): void; - : ^^^^^^^^^^^ + : ^^^ 4 | [foo: string]: void; `---- @@ -104,7 +104,7 @@ ,-[$DIR/tests/span/ts/type/interface.ts:2:1] 2 | new(); 3 | (foo: string): void; - : ^^^^^^^^^^^ + : ^^^ 4 | [foo: string]: void; `---- diff --git a/crates/swc_ecma_parser/tests/tsc/1.0lib-noErrors.json b/crates/swc_ecma_parser/tests/tsc/1.0lib-noErrors.json index 70a7506bc5ff..1be8b5481d38 100644 --- a/crates/swc_ecma_parser/tests/tsc/1.0lib-noErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/1.0lib-noErrors.json @@ -130,7 +130,7 @@ "type": "Identifier", "span": { "start": 1156, - "end": 1165, + "end": 1157, "ctxt": 0 }, "value": "x", @@ -209,7 +209,7 @@ "type": "Identifier", "span": { "start": 1531, - "end": 1540, + "end": 1532, "ctxt": 0 }, "value": "s", @@ -245,7 +245,7 @@ "type": "Identifier", "span": { "start": 1542, - "end": 1556, + "end": 1547, "ctxt": 0 }, "value": "radix", @@ -324,7 +324,7 @@ "type": "Identifier", "span": { "start": 1723, - "end": 1737, + "end": 1729, "ctxt": 0 }, "value": "string", @@ -403,7 +403,7 @@ "type": "Identifier", "span": { "start": 1918, - "end": 1932, + "end": 1924, "ctxt": 0 }, "value": "number", @@ -482,7 +482,7 @@ "type": "Identifier", "span": { "start": 2070, - "end": 2084, + "end": 2076, "ctxt": 0 }, "value": "number", @@ -561,7 +561,7 @@ "type": "Identifier", "span": { "start": 2272, - "end": 2290, + "end": 2282, "ctxt": 0 }, "value": "encodedURI", @@ -640,7 +640,7 @@ "type": "Identifier", "span": { "start": 2520, - "end": 2547, + "end": 2539, "ctxt": 0 }, "value": "encodedURIComponent", @@ -719,7 +719,7 @@ "type": "Identifier", "span": { "start": 2719, - "end": 2730, + "end": 2722, "ctxt": 0 }, "value": "uri", @@ -798,7 +798,7 @@ "type": "Identifier", "span": { "start": 2945, - "end": 2984, + "end": 2957, "ctxt": 0 }, "value": "uriComponent", @@ -1136,7 +1136,7 @@ "type": "Identifier", "span": { "start": 3148, - "end": 3154, + "end": 3149, "ctxt": 0 }, "value": "v", @@ -1513,7 +1513,7 @@ "type": "Identifier", "span": { "start": 3816, - "end": 3825, + "end": 3817, "ctxt": 0 }, "value": "v", @@ -1581,7 +1581,7 @@ "type": "Identifier", "span": { "start": 4027, - "end": 4036, + "end": 4028, "ctxt": 0 }, "value": "v", @@ -1659,7 +1659,7 @@ "type": "Identifier", "span": { "start": 4189, - "end": 4198, + "end": 4190, "ctxt": 0 }, "value": "v", @@ -1758,7 +1758,7 @@ "type": "Identifier", "span": { "start": 4314, - "end": 4325, + "end": 4319, "ctxt": 0 }, "value": "value", @@ -1850,7 +1850,7 @@ "type": "Identifier", "span": { "start": 4354, - "end": 4364, + "end": 4359, "ctxt": 0 }, "value": "value", @@ -1969,7 +1969,7 @@ "type": "Identifier", "span": { "start": 4602, - "end": 4608, + "end": 4603, "ctxt": 0 }, "value": "o", @@ -2037,7 +2037,7 @@ "type": "Identifier", "span": { "start": 4951, - "end": 4957, + "end": 4952, "ctxt": 0 }, "value": "o", @@ -2064,7 +2064,7 @@ "type": "Identifier", "span": { "start": 4959, - "end": 4968, + "end": 4960, "ctxt": 0 }, "value": "p", @@ -2142,7 +2142,7 @@ "type": "Identifier", "span": { "start": 5371, - "end": 5377, + "end": 5372, "ctxt": 0 }, "value": "o", @@ -2218,7 +2218,7 @@ "type": "Identifier", "span": { "start": 5683, - "end": 5689, + "end": 5684, "ctxt": 0 }, "value": "o", @@ -2245,7 +2245,7 @@ "type": "Identifier", "span": { "start": 5691, - "end": 5725, + "end": 5701, "ctxt": 0 }, "value": "properties", @@ -2323,7 +2323,7 @@ "type": "Identifier", "span": { "start": 6177, - "end": 6183, + "end": 6178, "ctxt": 0 }, "value": "o", @@ -2350,7 +2350,7 @@ "type": "Identifier", "span": { "start": 6185, - "end": 6194, + "end": 6186, "ctxt": 0 }, "value": "p", @@ -2377,7 +2377,7 @@ "type": "Identifier", "span": { "start": 6196, - "end": 6226, + "end": 6206, "ctxt": 0 }, "value": "attributes", @@ -2455,7 +2455,7 @@ "type": "Identifier", "span": { "start": 6661, - "end": 6667, + "end": 6662, "ctxt": 0 }, "value": "o", @@ -2482,7 +2482,7 @@ "type": "Identifier", "span": { "start": 6669, - "end": 6702, + "end": 6679, "ctxt": 0 }, "value": "properties", @@ -2560,7 +2560,7 @@ "type": "Identifier", "span": { "start": 6912, - "end": 6918, + "end": 6913, "ctxt": 0 }, "value": "o", @@ -2628,7 +2628,7 @@ "type": "Identifier", "span": { "start": 7135, - "end": 7141, + "end": 7136, "ctxt": 0 }, "value": "o", @@ -2696,7 +2696,7 @@ "type": "Identifier", "span": { "start": 7300, - "end": 7306, + "end": 7301, "ctxt": 0 }, "value": "o", @@ -2764,7 +2764,7 @@ "type": "Identifier", "span": { "start": 7514, - "end": 7520, + "end": 7515, "ctxt": 0 }, "value": "o", @@ -2832,7 +2832,7 @@ "type": "Identifier", "span": { "start": 7745, - "end": 7751, + "end": 7746, "ctxt": 0 }, "value": "o", @@ -2900,7 +2900,7 @@ "type": "Identifier", "span": { "start": 7921, - "end": 7927, + "end": 7922, "ctxt": 0 }, "value": "o", @@ -2968,7 +2968,7 @@ "type": "Identifier", "span": { "start": 8203, - "end": 8209, + "end": 8204, "ctxt": 0 }, "value": "o", @@ -3081,7 +3081,7 @@ "type": "Identifier", "span": { "start": 8605, - "end": 8617, + "end": 8612, "ctxt": 0 }, "value": "thisArg", @@ -3108,7 +3108,7 @@ "type": "Identifier", "span": { "start": 8619, - "end": 8633, + "end": 8627, "ctxt": 0 }, "value": "argArray", @@ -3176,7 +3176,7 @@ "type": "Identifier", "span": { "start": 8897, - "end": 8909, + "end": 8904, "ctxt": 0 }, "value": "thisArg", @@ -3293,7 +3293,7 @@ "type": "Identifier", "span": { "start": 9370, - "end": 9382, + "end": 9377, "ctxt": 0 }, "value": "thisArg", @@ -4109,7 +4109,7 @@ "type": "Identifier", "span": { "start": 10108, - "end": 10119, + "end": 10111, "ctxt": 0 }, "value": "pos", @@ -4177,7 +4177,7 @@ "type": "Identifier", "span": { "start": 10376, - "end": 10389, + "end": 10381, "ctxt": 0 }, "value": "index", @@ -4335,7 +4335,7 @@ "type": "Identifier", "span": { "start": 10923, - "end": 10943, + "end": 10935, "ctxt": 0 }, "value": "searchString", @@ -4362,7 +4362,7 @@ "type": "Identifier", "span": { "start": 10945, - "end": 10962, + "end": 10953, "ctxt": 0 }, "value": "position", @@ -4430,7 +4430,7 @@ "type": "Identifier", "span": { "start": 11249, - "end": 11269, + "end": 11261, "ctxt": 0 }, "value": "searchString", @@ -4457,7 +4457,7 @@ "type": "Identifier", "span": { "start": 11271, - "end": 11288, + "end": 11279, "ctxt": 0 }, "value": "position", @@ -4525,7 +4525,7 @@ "type": "Identifier", "span": { "start": 11467, - "end": 11479, + "end": 11471, "ctxt": 0 }, "value": "that", @@ -4593,7 +4593,7 @@ "type": "Identifier", "span": { "start": 11740, - "end": 11754, + "end": 11746, "ctxt": 0 }, "value": "regexp", @@ -4669,7 +4669,7 @@ "type": "Identifier", "span": { "start": 12026, - "end": 12040, + "end": 12032, "ctxt": 0 }, "value": "regexp", @@ -4755,7 +4755,7 @@ "type": "Identifier", "span": { "start": 12406, - "end": 12425, + "end": 12417, "ctxt": 0 }, "value": "searchValue", @@ -4782,7 +4782,7 @@ "type": "Identifier", "span": { "start": 12427, - "end": 12447, + "end": 12439, "ctxt": 0 }, "value": "replaceValue", @@ -4850,7 +4850,7 @@ "type": "Identifier", "span": { "start": 12742, - "end": 12761, + "end": 12753, "ctxt": 0 }, "value": "searchValue", @@ -4877,7 +4877,7 @@ "type": "Identifier", "span": { "start": 12763, - "end": 12822, + "end": 12775, "ctxt": 0 }, "value": "replaceValue", @@ -4901,7 +4901,7 @@ "type": "Identifier", "span": { "start": 12778, - "end": 12795, + "end": 12787, "ctxt": 0 }, "value": "substring", @@ -5040,7 +5040,7 @@ "type": "Identifier", "span": { "start": 13204, - "end": 13223, + "end": 13215, "ctxt": 0 }, "value": "searchValue", @@ -5077,7 +5077,7 @@ "type": "Identifier", "span": { "start": 13225, - "end": 13245, + "end": 13237, "ctxt": 0 }, "value": "replaceValue", @@ -5145,7 +5145,7 @@ "type": "Identifier", "span": { "start": 13558, - "end": 13577, + "end": 13569, "ctxt": 0 }, "value": "searchValue", @@ -5182,7 +5182,7 @@ "type": "Identifier", "span": { "start": 13579, - "end": 13638, + "end": 13591, "ctxt": 0 }, "value": "replaceValue", @@ -5206,7 +5206,7 @@ "type": "Identifier", "span": { "start": 13594, - "end": 13611, + "end": 13603, "ctxt": 0 }, "value": "substring", @@ -5345,7 +5345,7 @@ "type": "Identifier", "span": { "start": 13826, - "end": 13840, + "end": 13832, "ctxt": 0 }, "value": "regexp", @@ -5413,7 +5413,7 @@ "type": "Identifier", "span": { "start": 14028, - "end": 14042, + "end": 14034, "ctxt": 0 }, "value": "regexp", @@ -5491,7 +5491,7 @@ "type": "Identifier", "span": { "start": 14473, - "end": 14487, + "end": 14478, "ctxt": 0 }, "value": "start", @@ -5518,7 +5518,7 @@ "type": "Identifier", "span": { "start": 14489, - "end": 14501, + "end": 14492, "ctxt": 0 }, "value": "end", @@ -5586,7 +5586,7 @@ "type": "Identifier", "span": { "start": 14912, - "end": 14929, + "end": 14921, "ctxt": 0 }, "value": "separator", @@ -5613,7 +5613,7 @@ "type": "Identifier", "span": { "start": 14931, - "end": 14945, + "end": 14936, "ctxt": 0 }, "value": "limit", @@ -5689,7 +5689,7 @@ "type": "Identifier", "span": { "start": 15367, - "end": 15384, + "end": 15376, "ctxt": 0 }, "value": "separator", @@ -5726,7 +5726,7 @@ "type": "Identifier", "span": { "start": 15386, - "end": 15400, + "end": 15391, "ctxt": 0 }, "value": "limit", @@ -5802,7 +5802,7 @@ "type": "Identifier", "span": { "start": 15900, - "end": 15913, + "end": 15905, "ctxt": 0 }, "value": "start", @@ -5829,7 +5829,7 @@ "type": "Identifier", "span": { "start": 15915, - "end": 15927, + "end": 15918, "ctxt": 0 }, "value": "end", @@ -6138,7 +6138,7 @@ "type": "Identifier", "span": { "start": 17033, - "end": 17045, + "end": 17037, "ctxt": 0 }, "value": "from", @@ -6165,7 +6165,7 @@ "type": "Identifier", "span": { "start": 17047, - "end": 17062, + "end": 17053, "ctxt": 0 }, "value": "length", @@ -6320,7 +6320,7 @@ "type": "Identifier", "span": { "start": 17264, - "end": 17275, + "end": 17269, "ctxt": 0 }, "value": "value", @@ -6385,7 +6385,7 @@ "type": "Identifier", "span": { "start": 17291, - "end": 17302, + "end": 17296, "ctxt": 0 }, "value": "value", @@ -6661,7 +6661,7 @@ "type": "Identifier", "span": { "start": 17439, - "end": 17450, + "end": 17444, "ctxt": 0 }, "value": "value", @@ -6726,7 +6726,7 @@ "type": "Identifier", "span": { "start": 17467, - "end": 17478, + "end": 17472, "ctxt": 0 }, "value": "value", @@ -6882,7 +6882,7 @@ "type": "Identifier", "span": { "start": 17738, - "end": 17752, + "end": 17743, "ctxt": 0 }, "value": "radix", @@ -6950,7 +6950,7 @@ "type": "Identifier", "span": { "start": 17978, - "end": 18001, + "end": 17992, "ctxt": 0 }, "value": "fractionDigits", @@ -7018,7 +7018,7 @@ "type": "Identifier", "span": { "start": 18242, - "end": 18265, + "end": 18256, "ctxt": 0 }, "value": "fractionDigits", @@ -7086,7 +7086,7 @@ "type": "Identifier", "span": { "start": 18543, - "end": 18561, + "end": 18552, "ctxt": 0 }, "value": "precision", @@ -7185,7 +7185,7 @@ "type": "Identifier", "span": { "start": 18719, - "end": 18730, + "end": 18724, "ctxt": 0 }, "value": "value", @@ -7250,7 +7250,7 @@ "type": "Identifier", "span": { "start": 18746, - "end": 18757, + "end": 18751, "ctxt": 0 }, "value": "value", @@ -7939,7 +7939,7 @@ "type": "Identifier", "span": { "start": 20627, - "end": 20636, + "end": 20628, "ctxt": 0 }, "value": "x", @@ -8007,7 +8007,7 @@ "type": "Identifier", "span": { "start": 20777, - "end": 20786, + "end": 20778, "ctxt": 0 }, "value": "x", @@ -8075,7 +8075,7 @@ "type": "Identifier", "span": { "start": 20905, - "end": 20914, + "end": 20906, "ctxt": 0 }, "value": "x", @@ -8143,7 +8143,7 @@ "type": "Identifier", "span": { "start": 21070, - "end": 21079, + "end": 21071, "ctxt": 0 }, "value": "x", @@ -8211,7 +8211,7 @@ "type": "Identifier", "span": { "start": 21348, - "end": 21357, + "end": 21349, "ctxt": 0 }, "value": "y", @@ -8238,7 +8238,7 @@ "type": "Identifier", "span": { "start": 21359, - "end": 21368, + "end": 21360, "ctxt": 0 }, "value": "x", @@ -8306,7 +8306,7 @@ "type": "Identifier", "span": { "start": 21528, - "end": 21537, + "end": 21529, "ctxt": 0 }, "value": "x", @@ -8374,7 +8374,7 @@ "type": "Identifier", "span": { "start": 21696, - "end": 21705, + "end": 21697, "ctxt": 0 }, "value": "x", @@ -8442,7 +8442,7 @@ "type": "Identifier", "span": { "start": 21879, - "end": 21888, + "end": 21880, "ctxt": 0 }, "value": "x", @@ -8510,7 +8510,7 @@ "type": "Identifier", "span": { "start": 22046, - "end": 22055, + "end": 22047, "ctxt": 0 }, "value": "x", @@ -8578,7 +8578,7 @@ "type": "Identifier", "span": { "start": 22191, - "end": 22200, + "end": 22192, "ctxt": 0 }, "value": "x", @@ -8826,7 +8826,7 @@ "type": "Identifier", "span": { "start": 22787, - "end": 22796, + "end": 22788, "ctxt": 0 }, "value": "x", @@ -8853,7 +8853,7 @@ "type": "Identifier", "span": { "start": 22798, - "end": 22807, + "end": 22799, "ctxt": 0 }, "value": "y", @@ -8961,7 +8961,7 @@ "type": "Identifier", "span": { "start": 23067, - "end": 23076, + "end": 23068, "ctxt": 0 }, "value": "x", @@ -9029,7 +9029,7 @@ "type": "Identifier", "span": { "start": 23232, - "end": 23241, + "end": 23233, "ctxt": 0 }, "value": "x", @@ -9097,7 +9097,7 @@ "type": "Identifier", "span": { "start": 23362, - "end": 23371, + "end": 23363, "ctxt": 0 }, "value": "x", @@ -9165,7 +9165,7 @@ "type": "Identifier", "span": { "start": 23530, - "end": 23539, + "end": 23531, "ctxt": 0 }, "value": "x", @@ -10323,7 +10323,7 @@ "type": "Identifier", "span": { "start": 26485, - "end": 26497, + "end": 26489, "ctxt": 0 }, "value": "time", @@ -10391,7 +10391,7 @@ "type": "Identifier", "span": { "start": 26685, - "end": 26695, + "end": 26687, "ctxt": 0 }, "value": "ms", @@ -10459,7 +10459,7 @@ "type": "Identifier", "span": { "start": 26909, - "end": 26919, + "end": 26911, "ctxt": 0 }, "value": "ms", @@ -10527,7 +10527,7 @@ "type": "Identifier", "span": { "start": 27162, - "end": 27173, + "end": 27165, "ctxt": 0 }, "value": "sec", @@ -10554,7 +10554,7 @@ "type": "Identifier", "span": { "start": 27175, - "end": 27186, + "end": 27177, "ctxt": 0 }, "value": "ms", @@ -10622,7 +10622,7 @@ "type": "Identifier", "span": { "start": 27452, - "end": 27463, + "end": 27455, "ctxt": 0 }, "value": "sec", @@ -10649,7 +10649,7 @@ "type": "Identifier", "span": { "start": 27465, - "end": 27476, + "end": 27467, "ctxt": 0 }, "value": "ms", @@ -10717,7 +10717,7 @@ "type": "Identifier", "span": { "start": 27783, - "end": 27794, + "end": 27786, "ctxt": 0 }, "value": "min", @@ -10744,7 +10744,7 @@ "type": "Identifier", "span": { "start": 27796, - "end": 27808, + "end": 27799, "ctxt": 0 }, "value": "sec", @@ -10771,7 +10771,7 @@ "type": "Identifier", "span": { "start": 27810, - "end": 27821, + "end": 27812, "ctxt": 0 }, "value": "ms", @@ -10839,7 +10839,7 @@ "type": "Identifier", "span": { "start": 28152, - "end": 28163, + "end": 28155, "ctxt": 0 }, "value": "min", @@ -10866,7 +10866,7 @@ "type": "Identifier", "span": { "start": 28165, - "end": 28177, + "end": 28168, "ctxt": 0 }, "value": "sec", @@ -10893,7 +10893,7 @@ "type": "Identifier", "span": { "start": 28179, - "end": 28190, + "end": 28181, "ctxt": 0 }, "value": "ms", @@ -10961,7 +10961,7 @@ "type": "Identifier", "span": { "start": 28553, - "end": 28566, + "end": 28558, "ctxt": 0 }, "value": "hours", @@ -10988,7 +10988,7 @@ "type": "Identifier", "span": { "start": 28568, - "end": 28580, + "end": 28571, "ctxt": 0 }, "value": "min", @@ -11015,7 +11015,7 @@ "type": "Identifier", "span": { "start": 28582, - "end": 28594, + "end": 28585, "ctxt": 0 }, "value": "sec", @@ -11042,7 +11042,7 @@ "type": "Identifier", "span": { "start": 28596, - "end": 28607, + "end": 28598, "ctxt": 0 }, "value": "ms", @@ -11110,7 +11110,7 @@ "type": "Identifier", "span": { "start": 28996, - "end": 29009, + "end": 29001, "ctxt": 0 }, "value": "hours", @@ -11137,7 +11137,7 @@ "type": "Identifier", "span": { "start": 29011, - "end": 29023, + "end": 29014, "ctxt": 0 }, "value": "min", @@ -11164,7 +11164,7 @@ "type": "Identifier", "span": { "start": 29025, - "end": 29037, + "end": 29028, "ctxt": 0 }, "value": "sec", @@ -11191,7 +11191,7 @@ "type": "Identifier", "span": { "start": 29039, - "end": 29050, + "end": 29041, "ctxt": 0 }, "value": "ms", @@ -11259,7 +11259,7 @@ "type": "Identifier", "span": { "start": 29243, - "end": 29255, + "end": 29247, "ctxt": 0 }, "value": "date", @@ -11327,7 +11327,7 @@ "type": "Identifier", "span": { "start": 29468, - "end": 29480, + "end": 29472, "ctxt": 0 }, "value": "date", @@ -11395,7 +11395,7 @@ "type": "Identifier", "span": { "start": 29875, - "end": 29888, + "end": 29880, "ctxt": 0 }, "value": "month", @@ -11422,7 +11422,7 @@ "type": "Identifier", "span": { "start": 29890, - "end": 29903, + "end": 29894, "ctxt": 0 }, "value": "date", @@ -11490,7 +11490,7 @@ "type": "Identifier", "span": { "start": 30315, - "end": 30328, + "end": 30320, "ctxt": 0 }, "value": "month", @@ -11517,7 +11517,7 @@ "type": "Identifier", "span": { "start": 30330, - "end": 30343, + "end": 30334, "ctxt": 0 }, "value": "date", @@ -11585,7 +11585,7 @@ "type": "Identifier", "span": { "start": 30703, - "end": 30715, + "end": 30707, "ctxt": 0 }, "value": "year", @@ -11612,7 +11612,7 @@ "type": "Identifier", "span": { "start": 30717, - "end": 30731, + "end": 30722, "ctxt": 0 }, "value": "month", @@ -11639,7 +11639,7 @@ "type": "Identifier", "span": { "start": 30733, - "end": 30746, + "end": 30737, "ctxt": 0 }, "value": "date", @@ -11707,7 +11707,7 @@ "type": "Identifier", "span": { "start": 31173, - "end": 31185, + "end": 31177, "ctxt": 0 }, "value": "year", @@ -11734,7 +11734,7 @@ "type": "Identifier", "span": { "start": 31187, - "end": 31201, + "end": 31192, "ctxt": 0 }, "value": "month", @@ -11761,7 +11761,7 @@ "type": "Identifier", "span": { "start": 31203, - "end": 31216, + "end": 31207, "ctxt": 0 }, "value": "date", @@ -11909,7 +11909,7 @@ "type": "Identifier", "span": { "start": 31586, - "end": 31595, + "end": 31589, "ctxt": 0 }, "value": "key", @@ -12045,7 +12045,7 @@ "type": "Identifier", "span": { "start": 31656, - "end": 31669, + "end": 31661, "ctxt": 0 }, "value": "value", @@ -12110,7 +12110,7 @@ "type": "Identifier", "span": { "start": 31687, - "end": 31700, + "end": 31692, "ctxt": 0 }, "value": "value", @@ -12175,7 +12175,7 @@ "type": "Identifier", "span": { "start": 31718, - "end": 31730, + "end": 31722, "ctxt": 0 }, "value": "year", @@ -12202,7 +12202,7 @@ "type": "Identifier", "span": { "start": 31732, - "end": 31745, + "end": 31737, "ctxt": 0 }, "value": "month", @@ -12229,7 +12229,7 @@ "type": "Identifier", "span": { "start": 31747, - "end": 31760, + "end": 31751, "ctxt": 0 }, "value": "date", @@ -12256,7 +12256,7 @@ "type": "Identifier", "span": { "start": 31762, - "end": 31776, + "end": 31767, "ctxt": 0 }, "value": "hours", @@ -12283,7 +12283,7 @@ "type": "Identifier", "span": { "start": 31778, - "end": 31794, + "end": 31785, "ctxt": 0 }, "value": "minutes", @@ -12310,7 +12310,7 @@ "type": "Identifier", "span": { "start": 31796, - "end": 31812, + "end": 31803, "ctxt": 0 }, "value": "seconds", @@ -12337,7 +12337,7 @@ "type": "Identifier", "span": { "start": 31814, - "end": 31825, + "end": 31816, "ctxt": 0 }, "value": "ms", @@ -12493,7 +12493,7 @@ "type": "Identifier", "span": { "start": 32060, - "end": 32069, + "end": 32061, "ctxt": 0 }, "value": "s", @@ -12561,7 +12561,7 @@ "type": "Identifier", "span": { "start": 33000, - "end": 33012, + "end": 33004, "ctxt": 0 }, "value": "year", @@ -12588,7 +12588,7 @@ "type": "Identifier", "span": { "start": 33014, - "end": 33027, + "end": 33019, "ctxt": 0 }, "value": "month", @@ -12615,7 +12615,7 @@ "type": "Identifier", "span": { "start": 33029, - "end": 33042, + "end": 33033, "ctxt": 0 }, "value": "date", @@ -12642,7 +12642,7 @@ "type": "Identifier", "span": { "start": 33044, - "end": 33058, + "end": 33049, "ctxt": 0 }, "value": "hours", @@ -12669,7 +12669,7 @@ "type": "Identifier", "span": { "start": 33060, - "end": 33076, + "end": 33067, "ctxt": 0 }, "value": "minutes", @@ -12696,7 +12696,7 @@ "type": "Identifier", "span": { "start": 33078, - "end": 33094, + "end": 33085, "ctxt": 0 }, "value": "seconds", @@ -12723,7 +12723,7 @@ "type": "Identifier", "span": { "start": 33096, - "end": 33107, + "end": 33098, "ctxt": 0 }, "value": "ms", @@ -13233,7 +13233,7 @@ "type": "Identifier", "span": { "start": 33364, - "end": 33382, + "end": 33373, "ctxt": 0 }, "value": "separator", @@ -13519,7 +13519,7 @@ "type": "Identifier", "span": { "start": 33506, - "end": 33520, + "end": 33511, "ctxt": 0 }, "value": "start", @@ -13546,7 +13546,7 @@ "type": "Identifier", "span": { "start": 33522, - "end": 33534, + "end": 33525, "ctxt": 0 }, "value": "end", @@ -13622,7 +13622,7 @@ "type": "Identifier", "span": { "start": 33556, - "end": 33600, + "end": 33565, "ctxt": 0 }, "value": "compareFn", @@ -13646,7 +13646,7 @@ "type": "Identifier", "span": { "start": 33569, - "end": 33578, + "end": 33570, "ctxt": 0 }, "value": "a", @@ -13673,7 +13673,7 @@ "type": "Identifier", "span": { "start": 33580, - "end": 33589, + "end": 33581, "ctxt": 0 }, "value": "b", @@ -13771,7 +13771,7 @@ "type": "Identifier", "span": { "start": 33624, - "end": 33637, + "end": 33629, "ctxt": 0 }, "value": "start", @@ -13847,7 +13847,7 @@ "type": "Identifier", "span": { "start": 33661, - "end": 33674, + "end": 33666, "ctxt": 0 }, "value": "start", @@ -13874,7 +13874,7 @@ "type": "Identifier", "span": { "start": 33676, - "end": 33695, + "end": 33687, "ctxt": 0 }, "value": "deleteCount", @@ -14089,7 +14089,7 @@ "type": "Identifier", "span": { "start": 33782, - "end": 33803, + "end": 33795, "ctxt": 0 }, "value": "searchElement", @@ -14116,7 +14116,7 @@ "type": "Identifier", "span": { "start": 33805, - "end": 33823, + "end": 33814, "ctxt": 0 }, "value": "fromIndex", @@ -14184,7 +14184,7 @@ "type": "Identifier", "span": { "start": 33850, - "end": 33871, + "end": 33863, "ctxt": 0 }, "value": "searchElement", @@ -14211,7 +14211,7 @@ "type": "Identifier", "span": { "start": 33873, - "end": 33891, + "end": 33882, "ctxt": 0 }, "value": "fromIndex", @@ -14279,7 +14279,7 @@ "type": "Identifier", "span": { "start": 33912, - "end": 33982, + "end": 33922, "ctxt": 0 }, "value": "callbackfn", @@ -14303,7 +14303,7 @@ "type": "Identifier", "span": { "start": 33925, - "end": 33938, + "end": 33930, "ctxt": 0 }, "value": "value", @@ -14330,7 +14330,7 @@ "type": "Identifier", "span": { "start": 33940, - "end": 33953, + "end": 33945, "ctxt": 0 }, "value": "index", @@ -14357,7 +14357,7 @@ "type": "Identifier", "span": { "start": 33955, - "end": 33970, + "end": 33960, "ctxt": 0 }, "value": "array", @@ -14414,7 +14414,7 @@ "type": "Identifier", "span": { "start": 33984, - "end": 33997, + "end": 33991, "ctxt": 0 }, "value": "thisArg", @@ -14482,7 +14482,7 @@ "type": "Identifier", "span": { "start": 34018, - "end": 34088, + "end": 34028, "ctxt": 0 }, "value": "callbackfn", @@ -14506,7 +14506,7 @@ "type": "Identifier", "span": { "start": 34031, - "end": 34044, + "end": 34036, "ctxt": 0 }, "value": "value", @@ -14533,7 +14533,7 @@ "type": "Identifier", "span": { "start": 34046, - "end": 34059, + "end": 34051, "ctxt": 0 }, "value": "index", @@ -14560,7 +14560,7 @@ "type": "Identifier", "span": { "start": 34061, - "end": 34076, + "end": 34066, "ctxt": 0 }, "value": "array", @@ -14617,7 +14617,7 @@ "type": "Identifier", "span": { "start": 34090, - "end": 34103, + "end": 34097, "ctxt": 0 }, "value": "thisArg", @@ -14685,7 +14685,7 @@ "type": "Identifier", "span": { "start": 34127, - "end": 34194, + "end": 34137, "ctxt": 0 }, "value": "callbackfn", @@ -14709,7 +14709,7 @@ "type": "Identifier", "span": { "start": 34140, - "end": 34153, + "end": 34145, "ctxt": 0 }, "value": "value", @@ -14736,7 +14736,7 @@ "type": "Identifier", "span": { "start": 34155, - "end": 34168, + "end": 34160, "ctxt": 0 }, "value": "index", @@ -14763,7 +14763,7 @@ "type": "Identifier", "span": { "start": 34170, - "end": 34185, + "end": 34175, "ctxt": 0 }, "value": "array", @@ -14820,7 +14820,7 @@ "type": "Identifier", "span": { "start": 34196, - "end": 34209, + "end": 34203, "ctxt": 0 }, "value": "thisArg", @@ -14888,7 +14888,7 @@ "type": "Identifier", "span": { "start": 34226, - "end": 34292, + "end": 34236, "ctxt": 0 }, "value": "callbackfn", @@ -14912,7 +14912,7 @@ "type": "Identifier", "span": { "start": 34239, - "end": 34252, + "end": 34244, "ctxt": 0 }, "value": "value", @@ -14939,7 +14939,7 @@ "type": "Identifier", "span": { "start": 34254, - "end": 34267, + "end": 34259, "ctxt": 0 }, "value": "index", @@ -14966,7 +14966,7 @@ "type": "Identifier", "span": { "start": 34269, - "end": 34284, + "end": 34274, "ctxt": 0 }, "value": "array", @@ -15023,7 +15023,7 @@ "type": "Identifier", "span": { "start": 34294, - "end": 34307, + "end": 34301, "ctxt": 0 }, "value": "thisArg", @@ -15099,7 +15099,7 @@ "type": "Identifier", "span": { "start": 34328, - "end": 34398, + "end": 34338, "ctxt": 0 }, "value": "callbackfn", @@ -15123,7 +15123,7 @@ "type": "Identifier", "span": { "start": 34341, - "end": 34354, + "end": 34346, "ctxt": 0 }, "value": "value", @@ -15150,7 +15150,7 @@ "type": "Identifier", "span": { "start": 34356, - "end": 34369, + "end": 34361, "ctxt": 0 }, "value": "index", @@ -15177,7 +15177,7 @@ "type": "Identifier", "span": { "start": 34371, - "end": 34386, + "end": 34376, "ctxt": 0 }, "value": "array", @@ -15234,7 +15234,7 @@ "type": "Identifier", "span": { "start": 34400, - "end": 34413, + "end": 34407, "ctxt": 0 }, "value": "thisArg", @@ -15310,7 +15310,7 @@ "type": "Identifier", "span": { "start": 34437, - "end": 34534, + "end": 34447, "ctxt": 0 }, "value": "callbackfn", @@ -15334,7 +15334,7 @@ "type": "Identifier", "span": { "start": 34450, - "end": 34468, + "end": 34463, "ctxt": 0 }, "value": "previousValue", @@ -15361,7 +15361,7 @@ "type": "Identifier", "span": { "start": 34470, - "end": 34487, + "end": 34482, "ctxt": 0 }, "value": "currentValue", @@ -15388,7 +15388,7 @@ "type": "Identifier", "span": { "start": 34489, - "end": 34509, + "end": 34501, "ctxt": 0 }, "value": "currentIndex", @@ -15415,7 +15415,7 @@ "type": "Identifier", "span": { "start": 34511, - "end": 34526, + "end": 34516, "ctxt": 0 }, "value": "array", @@ -15472,7 +15472,7 @@ "type": "Identifier", "span": { "start": 34536, - "end": 34554, + "end": 34548, "ctxt": 0 }, "value": "initialValue", @@ -15540,7 +15540,7 @@ "type": "Identifier", "span": { "start": 34578, - "end": 34675, + "end": 34588, "ctxt": 0 }, "value": "callbackfn", @@ -15564,7 +15564,7 @@ "type": "Identifier", "span": { "start": 34591, - "end": 34609, + "end": 34604, "ctxt": 0 }, "value": "previousValue", @@ -15591,7 +15591,7 @@ "type": "Identifier", "span": { "start": 34611, - "end": 34628, + "end": 34623, "ctxt": 0 }, "value": "currentValue", @@ -15618,7 +15618,7 @@ "type": "Identifier", "span": { "start": 34630, - "end": 34650, + "end": 34642, "ctxt": 0 }, "value": "currentIndex", @@ -15645,7 +15645,7 @@ "type": "Identifier", "span": { "start": 34652, - "end": 34667, + "end": 34657, "ctxt": 0 }, "value": "array", @@ -15702,7 +15702,7 @@ "type": "Identifier", "span": { "start": 34677, - "end": 34695, + "end": 34689, "ctxt": 0 }, "value": "initialValue", @@ -15801,7 +15801,7 @@ "type": "Identifier", "span": { "start": 34977, - "end": 34991, + "end": 34983, "ctxt": 0 }, "value": "string", @@ -15879,7 +15879,7 @@ "type": "Identifier", "span": { "start": 35201, - "end": 35215, + "end": 35207, "ctxt": 0 }, "value": "string", @@ -16233,7 +16233,7 @@ "type": "Identifier", "span": { "start": 36035, - "end": 36050, + "end": 36042, "ctxt": 0 }, "value": "pattern", @@ -16260,7 +16260,7 @@ "type": "Identifier", "span": { "start": 36052, - "end": 36066, + "end": 36057, "ctxt": 0 }, "value": "flags", @@ -16325,7 +16325,7 @@ "type": "Identifier", "span": { "start": 36082, - "end": 36097, + "end": 36089, "ctxt": 0 }, "value": "pattern", @@ -16352,7 +16352,7 @@ "type": "Identifier", "span": { "start": 36099, - "end": 36113, + "end": 36104, "ctxt": 0 }, "value": "flags", @@ -16990,7 +16990,7 @@ "type": "Identifier", "span": { "start": 36415, - "end": 36431, + "end": 36422, "ctxt": 0 }, "value": "message", @@ -17055,7 +17055,7 @@ "type": "Identifier", "span": { "start": 36446, - "end": 36462, + "end": 36453, "ctxt": 0 }, "value": "message", @@ -17271,7 +17271,7 @@ "type": "Identifier", "span": { "start": 36569, - "end": 36585, + "end": 36576, "ctxt": 0 }, "value": "message", @@ -17336,7 +17336,7 @@ "type": "Identifier", "span": { "start": 36604, - "end": 36620, + "end": 36611, "ctxt": 0 }, "value": "message", @@ -17552,7 +17552,7 @@ "type": "Identifier", "span": { "start": 36737, - "end": 36753, + "end": 36744, "ctxt": 0 }, "value": "message", @@ -17617,7 +17617,7 @@ "type": "Identifier", "span": { "start": 36773, - "end": 36789, + "end": 36780, "ctxt": 0 }, "value": "message", @@ -17833,7 +17833,7 @@ "type": "Identifier", "span": { "start": 36916, - "end": 36932, + "end": 36923, "ctxt": 0 }, "value": "message", @@ -17898,7 +17898,7 @@ "type": "Identifier", "span": { "start": 36956, - "end": 36972, + "end": 36963, "ctxt": 0 }, "value": "message", @@ -18114,7 +18114,7 @@ "type": "Identifier", "span": { "start": 37101, - "end": 37117, + "end": 37108, "ctxt": 0 }, "value": "message", @@ -18179,7 +18179,7 @@ "type": "Identifier", "span": { "start": 37138, - "end": 37154, + "end": 37145, "ctxt": 0 }, "value": "message", @@ -18395,7 +18395,7 @@ "type": "Identifier", "span": { "start": 37273, - "end": 37289, + "end": 37280, "ctxt": 0 }, "value": "message", @@ -18460,7 +18460,7 @@ "type": "Identifier", "span": { "start": 37308, - "end": 37324, + "end": 37315, "ctxt": 0 }, "value": "message", @@ -18676,7 +18676,7 @@ "type": "Identifier", "span": { "start": 37437, - "end": 37453, + "end": 37444, "ctxt": 0 }, "value": "message", @@ -18741,7 +18741,7 @@ "type": "Identifier", "span": { "start": 37471, - "end": 37487, + "end": 37478, "ctxt": 0 }, "value": "message", @@ -18907,7 +18907,7 @@ "type": "Identifier", "span": { "start": 37918, - "end": 37930, + "end": 37922, "ctxt": 0 }, "value": "text", @@ -18934,7 +18934,7 @@ "type": "Identifier", "span": { "start": 37932, - "end": 37971, + "end": 37939, "ctxt": 0 }, "value": "reviver", @@ -18958,7 +18958,7 @@ "type": "Identifier", "span": { "start": 37943, - "end": 37951, + "end": 37946, "ctxt": 0 }, "value": "key", @@ -18985,7 +18985,7 @@ "type": "Identifier", "span": { "start": 37953, - "end": 37963, + "end": 37958, "ctxt": 0 }, "value": "value", @@ -19075,7 +19075,7 @@ "type": "Identifier", "span": { "start": 38179, - "end": 38189, + "end": 38184, "ctxt": 0 }, "value": "value", @@ -19143,7 +19143,7 @@ "type": "Identifier", "span": { "start": 38464, - "end": 38474, + "end": 38469, "ctxt": 0 }, "value": "value", @@ -19170,7 +19170,7 @@ "type": "Identifier", "span": { "start": 38476, - "end": 38518, + "end": 38484, "ctxt": 0 }, "value": "replacer", @@ -19194,7 +19194,7 @@ "type": "Identifier", "span": { "start": 38487, - "end": 38498, + "end": 38490, "ctxt": 0 }, "value": "key", @@ -19221,7 +19221,7 @@ "type": "Identifier", "span": { "start": 38500, - "end": 38510, + "end": 38505, "ctxt": 0 }, "value": "value", @@ -19311,7 +19311,7 @@ "type": "Identifier", "span": { "start": 38788, - "end": 38798, + "end": 38793, "ctxt": 0 }, "value": "value", @@ -19338,7 +19338,7 @@ "type": "Identifier", "span": { "start": 38800, - "end": 38815, + "end": 38808, "ctxt": 0 }, "value": "replacer", @@ -19414,7 +19414,7 @@ "type": "Identifier", "span": { "start": 39225, - "end": 39235, + "end": 39230, "ctxt": 0 }, "value": "value", @@ -19441,7 +19441,7 @@ "type": "Identifier", "span": { "start": 39237, - "end": 39279, + "end": 39245, "ctxt": 0 }, "value": "replacer", @@ -19465,7 +19465,7 @@ "type": "Identifier", "span": { "start": 39248, - "end": 39259, + "end": 39251, "ctxt": 0 }, "value": "key", @@ -19492,7 +19492,7 @@ "type": "Identifier", "span": { "start": 39261, - "end": 39271, + "end": 39266, "ctxt": 0 }, "value": "value", @@ -19541,7 +19541,7 @@ "type": "Identifier", "span": { "start": 39281, - "end": 39291, + "end": 39286, "ctxt": 0 }, "value": "space", @@ -19609,7 +19609,7 @@ "type": "Identifier", "span": { "start": 39696, - "end": 39706, + "end": 39701, "ctxt": 0 }, "value": "value", @@ -19636,7 +19636,7 @@ "type": "Identifier", "span": { "start": 39708, - "end": 39723, + "end": 39716, "ctxt": 0 }, "value": "replacer", @@ -19671,7 +19671,7 @@ "type": "Identifier", "span": { "start": 39725, - "end": 39735, + "end": 39730, "ctxt": 0 }, "value": "space", @@ -20235,7 +20235,7 @@ "type": "Identifier", "span": { "start": 40788, - "end": 40806, + "end": 40797, "ctxt": 0 }, "value": "separator", @@ -20561,7 +20561,7 @@ "type": "Identifier", "span": { "start": 41477, - "end": 41491, + "end": 41482, "ctxt": 0 }, "value": "start", @@ -20588,7 +20588,7 @@ "type": "Identifier", "span": { "start": 41493, - "end": 41505, + "end": 41496, "ctxt": 0 }, "value": "end", @@ -20674,7 +20674,7 @@ "type": "Identifier", "span": { "start": 41732, - "end": 41766, + "end": 41741, "ctxt": 0 }, "value": "compareFn", @@ -20698,7 +20698,7 @@ "type": "Identifier", "span": { "start": 41745, - "end": 41749, + "end": 41746, "ctxt": 0 }, "value": "a", @@ -20735,7 +20735,7 @@ "type": "Identifier", "span": { "start": 41751, - "end": 41755, + "end": 41752, "ctxt": 0 }, "value": "b", @@ -20853,7 +20853,7 @@ "type": "Identifier", "span": { "start": 42027, - "end": 42040, + "end": 42032, "ctxt": 0 }, "value": "start", @@ -20939,7 +20939,7 @@ "type": "Identifier", "span": { "start": 42451, - "end": 42464, + "end": 42456, "ctxt": 0 }, "value": "start", @@ -20966,7 +20966,7 @@ "type": "Identifier", "span": { "start": 42466, - "end": 42485, + "end": 42477, "ctxt": 0 }, "value": "deleteCount", @@ -21211,7 +21211,7 @@ "type": "Identifier", "span": { "start": 42978, - "end": 42994, + "end": 42991, "ctxt": 0 }, "value": "searchElement", @@ -21248,7 +21248,7 @@ "type": "Identifier", "span": { "start": 42996, - "end": 43014, + "end": 43005, "ctxt": 0 }, "value": "fromIndex", @@ -21316,7 +21316,7 @@ "type": "Identifier", "span": { "start": 43351, - "end": 43367, + "end": 43364, "ctxt": 0 }, "value": "searchElement", @@ -21353,7 +21353,7 @@ "type": "Identifier", "span": { "start": 43369, - "end": 43387, + "end": 43378, "ctxt": 0 }, "value": "fromIndex", @@ -21421,7 +21421,7 @@ "type": "Identifier", "span": { "start": 43880, - "end": 43940, + "end": 43890, "ctxt": 0 }, "value": "callbackfn", @@ -21445,7 +21445,7 @@ "type": "Identifier", "span": { "start": 43893, - "end": 43901, + "end": 43898, "ctxt": 0 }, "value": "value", @@ -21482,7 +21482,7 @@ "type": "Identifier", "span": { "start": 43903, - "end": 43916, + "end": 43908, "ctxt": 0 }, "value": "index", @@ -21509,7 +21509,7 @@ "type": "Identifier", "span": { "start": 43918, - "end": 43928, + "end": 43923, "ctxt": 0 }, "value": "array", @@ -21576,7 +21576,7 @@ "type": "Identifier", "span": { "start": 43942, - "end": 43955, + "end": 43949, "ctxt": 0 }, "value": "thisArg", @@ -21644,7 +21644,7 @@ "type": "Identifier", "span": { "start": 44464, - "end": 44524, + "end": 44474, "ctxt": 0 }, "value": "callbackfn", @@ -21668,7 +21668,7 @@ "type": "Identifier", "span": { "start": 44477, - "end": 44485, + "end": 44482, "ctxt": 0 }, "value": "value", @@ -21705,7 +21705,7 @@ "type": "Identifier", "span": { "start": 44487, - "end": 44500, + "end": 44492, "ctxt": 0 }, "value": "index", @@ -21732,7 +21732,7 @@ "type": "Identifier", "span": { "start": 44502, - "end": 44512, + "end": 44507, "ctxt": 0 }, "value": "array", @@ -21799,7 +21799,7 @@ "type": "Identifier", "span": { "start": 44526, - "end": 44539, + "end": 44533, "ctxt": 0 }, "value": "thisArg", @@ -21867,7 +21867,7 @@ "type": "Identifier", "span": { "start": 44960, - "end": 45017, + "end": 44970, "ctxt": 0 }, "value": "callbackfn", @@ -21891,7 +21891,7 @@ "type": "Identifier", "span": { "start": 44973, - "end": 44981, + "end": 44978, "ctxt": 0 }, "value": "value", @@ -21928,7 +21928,7 @@ "type": "Identifier", "span": { "start": 44983, - "end": 44996, + "end": 44988, "ctxt": 0 }, "value": "index", @@ -21955,7 +21955,7 @@ "type": "Identifier", "span": { "start": 44998, - "end": 45008, + "end": 45003, "ctxt": 0 }, "value": "array", @@ -22022,7 +22022,7 @@ "type": "Identifier", "span": { "start": 45019, - "end": 45032, + "end": 45026, "ctxt": 0 }, "value": "thisArg", @@ -22090,7 +22090,7 @@ "type": "Identifier", "span": { "start": 45505, - "end": 45559, + "end": 45515, "ctxt": 0 }, "value": "callbackfn", @@ -22114,7 +22114,7 @@ "type": "Identifier", "span": { "start": 45518, - "end": 45526, + "end": 45523, "ctxt": 0 }, "value": "value", @@ -22151,7 +22151,7 @@ "type": "Identifier", "span": { "start": 45528, - "end": 45541, + "end": 45533, "ctxt": 0 }, "value": "index", @@ -22178,7 +22178,7 @@ "type": "Identifier", "span": { "start": 45543, - "end": 45553, + "end": 45548, "ctxt": 0 }, "value": "array", @@ -22255,7 +22255,7 @@ "type": "Identifier", "span": { "start": 45561, - "end": 45574, + "end": 45568, "ctxt": 0 }, "value": "thisArg", @@ -22373,7 +22373,7 @@ "type": "Identifier", "span": { "start": 46030, - "end": 46090, + "end": 46040, "ctxt": 0 }, "value": "callbackfn", @@ -22397,7 +22397,7 @@ "type": "Identifier", "span": { "start": 46043, - "end": 46051, + "end": 46048, "ctxt": 0 }, "value": "value", @@ -22434,7 +22434,7 @@ "type": "Identifier", "span": { "start": 46053, - "end": 46066, + "end": 46058, "ctxt": 0 }, "value": "index", @@ -22461,7 +22461,7 @@ "type": "Identifier", "span": { "start": 46068, - "end": 46078, + "end": 46073, "ctxt": 0 }, "value": "array", @@ -22528,7 +22528,7 @@ "type": "Identifier", "span": { "start": 46092, - "end": 46105, + "end": 46099, "ctxt": 0 }, "value": "thisArg", @@ -22614,7 +22614,7 @@ "type": "Identifier", "span": { "start": 46746, - "end": 46832, + "end": 46756, "ctxt": 0 }, "value": "callbackfn", @@ -22638,7 +22638,7 @@ "type": "Identifier", "span": { "start": 46759, - "end": 46775, + "end": 46772, "ctxt": 0 }, "value": "previousValue", @@ -22675,7 +22675,7 @@ "type": "Identifier", "span": { "start": 46777, - "end": 46792, + "end": 46789, "ctxt": 0 }, "value": "currentValue", @@ -22712,7 +22712,7 @@ "type": "Identifier", "span": { "start": 46794, - "end": 46814, + "end": 46806, "ctxt": 0 }, "value": "currentIndex", @@ -22739,7 +22739,7 @@ "type": "Identifier", "span": { "start": 46816, - "end": 46826, + "end": 46821, "ctxt": 0 }, "value": "array", @@ -22816,7 +22816,7 @@ "type": "Identifier", "span": { "start": 46834, - "end": 46850, + "end": 46846, "ctxt": 0 }, "value": "initialValue", @@ -22904,7 +22904,7 @@ "type": "Identifier", "span": { "start": 47491, - "end": 47577, + "end": 47501, "ctxt": 0 }, "value": "callbackfn", @@ -22928,7 +22928,7 @@ "type": "Identifier", "span": { "start": 47504, - "end": 47520, + "end": 47517, "ctxt": 0 }, "value": "previousValue", @@ -22965,7 +22965,7 @@ "type": "Identifier", "span": { "start": 47522, - "end": 47537, + "end": 47534, "ctxt": 0 }, "value": "currentValue", @@ -23002,7 +23002,7 @@ "type": "Identifier", "span": { "start": 47539, - "end": 47559, + "end": 47551, "ctxt": 0 }, "value": "currentIndex", @@ -23029,7 +23029,7 @@ "type": "Identifier", "span": { "start": 47561, - "end": 47571, + "end": 47566, "ctxt": 0 }, "value": "array", @@ -23106,7 +23106,7 @@ "type": "Identifier", "span": { "start": 47579, - "end": 47594, + "end": 47591, "ctxt": 0 }, "value": "initialValue", @@ -23226,7 +23226,7 @@ "type": "Identifier", "span": { "start": 48266, - "end": 48352, + "end": 48276, "ctxt": 0 }, "value": "callbackfn", @@ -23250,7 +23250,7 @@ "type": "Identifier", "span": { "start": 48279, - "end": 48295, + "end": 48292, "ctxt": 0 }, "value": "previousValue", @@ -23287,7 +23287,7 @@ "type": "Identifier", "span": { "start": 48297, - "end": 48312, + "end": 48309, "ctxt": 0 }, "value": "currentValue", @@ -23324,7 +23324,7 @@ "type": "Identifier", "span": { "start": 48314, - "end": 48334, + "end": 48326, "ctxt": 0 }, "value": "currentIndex", @@ -23351,7 +23351,7 @@ "type": "Identifier", "span": { "start": 48336, - "end": 48346, + "end": 48341, "ctxt": 0 }, "value": "array", @@ -23428,7 +23428,7 @@ "type": "Identifier", "span": { "start": 48354, - "end": 48370, + "end": 48366, "ctxt": 0 }, "value": "initialValue", @@ -23516,7 +23516,7 @@ "type": "Identifier", "span": { "start": 49044, - "end": 49130, + "end": 49054, "ctxt": 0 }, "value": "callbackfn", @@ -23540,7 +23540,7 @@ "type": "Identifier", "span": { "start": 49057, - "end": 49073, + "end": 49070, "ctxt": 0 }, "value": "previousValue", @@ -23577,7 +23577,7 @@ "type": "Identifier", "span": { "start": 49075, - "end": 49090, + "end": 49087, "ctxt": 0 }, "value": "currentValue", @@ -23614,7 +23614,7 @@ "type": "Identifier", "span": { "start": 49092, - "end": 49112, + "end": 49104, "ctxt": 0 }, "value": "currentIndex", @@ -23641,7 +23641,7 @@ "type": "Identifier", "span": { "start": 49114, - "end": 49124, + "end": 49119, "ctxt": 0 }, "value": "array", @@ -23718,7 +23718,7 @@ "type": "Identifier", "span": { "start": 49132, - "end": 49147, + "end": 49144, "ctxt": 0 }, "value": "initialValue", @@ -23976,7 +23976,7 @@ "type": "Identifier", "span": { "start": 49364, - "end": 49384, + "end": 49375, "ctxt": 0 }, "value": "arrayLength", @@ -24039,7 +24039,7 @@ "type": "Identifier", "span": { "start": 49406, - "end": 49425, + "end": 49417, "ctxt": 0 }, "value": "arrayLength", @@ -24281,7 +24281,7 @@ "type": "Identifier", "span": { "start": 49471, - "end": 49491, + "end": 49482, "ctxt": 0 }, "value": "arrayLength", @@ -24344,7 +24344,7 @@ "type": "Identifier", "span": { "start": 49509, - "end": 49528, + "end": 49520, "ctxt": 0 }, "value": "arrayLength", @@ -24599,7 +24599,7 @@ "type": "Identifier", "span": { "start": 49577, - "end": 49585, + "end": 49580, "ctxt": 0 }, "value": "arg", diff --git a/crates/swc_ecma_parser/tests/tsc/AmbientModuleAndAmbientWithSameNameAndCommonRoot.json b/crates/swc_ecma_parser/tests/tsc/AmbientModuleAndAmbientWithSameNameAndCommonRoot.json index ed5d616fc755..f71e9b8a441f 100644 --- a/crates/swc_ecma_parser/tests/tsc/AmbientModuleAndAmbientWithSameNameAndCommonRoot.json +++ b/crates/swc_ecma_parser/tests/tsc/AmbientModuleAndAmbientWithSameNameAndCommonRoot.json @@ -298,7 +298,7 @@ "type": "Identifier", "span": { "start": 255, - "end": 264, + "end": 256, "ctxt": 0 }, "value": "x", @@ -334,7 +334,7 @@ "type": "Identifier", "span": { "start": 266, - "end": 275, + "end": 267, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.json b/crates/swc_ecma_parser/tests/tsc/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.json index b1f6ac9346e4..aacfff42442f 100644 --- a/crates/swc_ecma_parser/tests/tsc/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.json +++ b/crates/swc_ecma_parser/tests/tsc/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.json @@ -301,7 +301,7 @@ "type": "Identifier", "span": { "start": 257, - "end": 266, + "end": 258, "ctxt": 0 }, "value": "x", @@ -340,7 +340,7 @@ "type": "Identifier", "span": { "start": 275, - "end": 284, + "end": 276, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.json index c66038de00ec..9ddfbb73bf59 100644 --- a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.json @@ -218,7 +218,7 @@ "type": "Identifier", "span": { "start": 117, - "end": 121, + "end": 118, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.json b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.json index 1a41321dd551..e846efc43498 100644 --- a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.json +++ b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.json @@ -157,7 +157,7 @@ "type": "Identifier", "span": { "start": 68, - "end": 73, + "end": 70, "ctxt": 0 }, "value": "id", @@ -350,7 +350,7 @@ "type": "Identifier", "span": { "start": 169, - "end": 173, + "end": 170, "ctxt": 0 }, "value": "x", @@ -396,7 +396,7 @@ "type": "Identifier", "span": { "start": 175, - "end": 179, + "end": 176, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.json b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.json index 0ae1520bca5b..f5c72ed557cc 100644 --- a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.json +++ b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.json @@ -157,7 +157,7 @@ "type": "Identifier", "span": { "start": 65, - "end": 75, + "end": 67, "ctxt": 0 }, "value": "id", @@ -308,7 +308,7 @@ "type": "Identifier", "span": { "start": 171, - "end": 175, + "end": 172, "ctxt": 0 }, "value": "x", @@ -354,7 +354,7 @@ "type": "Identifier", "span": { "start": 177, - "end": 181, + "end": 178, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.json b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.json index 5e84a08e1865..3deb849de9d9 100644 --- a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.json +++ b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.json @@ -157,7 +157,7 @@ "type": "Identifier", "span": { "start": 74, - "end": 84, + "end": 76, "ctxt": 0 }, "value": "id", @@ -327,7 +327,7 @@ "type": "Identifier", "span": { "start": 191, - "end": 195, + "end": 192, "ctxt": 0 }, "value": "x", @@ -373,7 +373,7 @@ "type": "Identifier", "span": { "start": 197, - "end": 201, + "end": 198, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.json b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.json index c7284509951d..d7a7b7022930 100644 --- a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.json +++ b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 38, - "end": 47, + "end": 39, "ctxt": 0 }, "value": "x", @@ -98,7 +98,7 @@ "type": "Identifier", "span": { "start": 56, - "end": 65, + "end": 57, "ctxt": 0 }, "value": "y", @@ -455,7 +455,7 @@ "type": "Identifier", "span": { "start": 331, - "end": 340, + "end": 332, "ctxt": 0 }, "value": "x", @@ -494,7 +494,7 @@ "type": "Identifier", "span": { "start": 349, - "end": 358, + "end": 350, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.json b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.json index a89daf32b005..06752ea1fd6f 100644 --- a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.json +++ b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 38, - "end": 47, + "end": 39, "ctxt": 0 }, "value": "x", @@ -98,7 +98,7 @@ "type": "Identifier", "span": { "start": 56, - "end": 65, + "end": 57, "ctxt": 0 }, "value": "y", @@ -449,7 +449,7 @@ "type": "Identifier", "span": { "start": 283, - "end": 292, + "end": 284, "ctxt": 0 }, "value": "x", @@ -488,7 +488,7 @@ "type": "Identifier", "span": { "start": 301, - "end": 310, + "end": 302, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.json b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.json index 866882aa5e9f..d812d3e7c95d 100644 --- a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.json +++ b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 38, - "end": 47, + "end": 39, "ctxt": 0 }, "value": "x", @@ -98,7 +98,7 @@ "type": "Identifier", "span": { "start": 56, - "end": 65, + "end": 57, "ctxt": 0 }, "value": "y", @@ -419,7 +419,7 @@ "type": "Identifier", "span": { "start": 266, - "end": 275, + "end": 267, "ctxt": 0 }, "value": "x", @@ -458,7 +458,7 @@ "type": "Identifier", "span": { "start": 284, - "end": 293, + "end": 285, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.json b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.json index d0573e4d0361..d15d233fb7d1 100644 --- a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.json +++ b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 38, - "end": 47, + "end": 39, "ctxt": 0 }, "value": "x", @@ -98,7 +98,7 @@ "type": "Identifier", "span": { "start": 56, - "end": 65, + "end": 57, "ctxt": 0 }, "value": "y", @@ -411,7 +411,7 @@ "type": "Identifier", "span": { "start": 257, - "end": 266, + "end": 258, "ctxt": 0 }, "value": "x", @@ -450,7 +450,7 @@ "type": "Identifier", "span": { "start": 275, - "end": 284, + "end": 276, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleWithSameNameAndCommonRoot.json b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleWithSameNameAndCommonRoot.json index c77a5a7f65a3..2911e3a205c8 100644 --- a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleWithSameNameAndCommonRoot.json +++ b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleWithSameNameAndCommonRoot.json @@ -109,7 +109,7 @@ "type": "Identifier", "span": { "start": 82, - "end": 91, + "end": 83, "ctxt": 0 }, "value": "x", @@ -145,7 +145,7 @@ "type": "Identifier", "span": { "start": 93, - "end": 102, + "end": 94, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleWithSameNameAndCommonRootES6.json b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleWithSameNameAndCommonRootES6.json index 05782ea19ff5..64cf68f10cfe 100644 --- a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleWithSameNameAndCommonRootES6.json +++ b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleWithSameNameAndCommonRootES6.json @@ -109,7 +109,7 @@ "type": "Identifier", "span": { "start": 98, - "end": 107, + "end": 99, "ctxt": 0 }, "value": "x", @@ -145,7 +145,7 @@ "type": "Identifier", "span": { "start": 109, - "end": 118, + "end": 110, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/EnumAndModuleWithSameNameAndCommonRoot.json b/crates/swc_ecma_parser/tests/tsc/EnumAndModuleWithSameNameAndCommonRoot.json index d875c556153f..9193810d1db8 100644 --- a/crates/swc_ecma_parser/tests/tsc/EnumAndModuleWithSameNameAndCommonRoot.json +++ b/crates/swc_ecma_parser/tests/tsc/EnumAndModuleWithSameNameAndCommonRoot.json @@ -153,7 +153,7 @@ "type": "Identifier", "span": { "start": 105, - "end": 114, + "end": 106, "ctxt": 0 }, "value": "x", @@ -192,7 +192,7 @@ "type": "Identifier", "span": { "start": 123, - "end": 132, + "end": 124, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/ExportClassWhichExtendsInterfaceWithInaccessibleType.json b/crates/swc_ecma_parser/tests/tsc/ExportClassWhichExtendsInterfaceWithInaccessibleType.json index ba782c39af8a..ce2937d7003f 100644 --- a/crates/swc_ecma_parser/tests/tsc/ExportClassWhichExtendsInterfaceWithInaccessibleType.json +++ b/crates/swc_ecma_parser/tests/tsc/ExportClassWhichExtendsInterfaceWithInaccessibleType.json @@ -168,7 +168,7 @@ "type": "Identifier", "span": { "start": 93, - "end": 101, + "end": 94, "ctxt": 0 }, "value": "p", @@ -284,7 +284,7 @@ "type": "Identifier", "span": { "start": 190, - "end": 199, + "end": 191, "ctxt": 0 }, "value": "x", @@ -323,7 +323,7 @@ "type": "Identifier", "span": { "start": 208, - "end": 217, + "end": 209, "ctxt": 0 }, "value": "y", @@ -391,7 +391,7 @@ "type": "Identifier", "span": { "start": 243, - "end": 251, + "end": 244, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.json b/crates/swc_ecma_parser/tests/tsc/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.json index 1b1531a6713f..223c34dde610 100644 --- a/crates/swc_ecma_parser/tests/tsc/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.json +++ b/crates/swc_ecma_parser/tests/tsc/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.json @@ -574,7 +574,7 @@ "type": "Identifier", "span": { "start": 328, - "end": 341, + "end": 333, "ctxt": 0 }, "value": "start", @@ -623,7 +623,7 @@ "type": "Identifier", "span": { "start": 350, - "end": 361, + "end": 353, "ctxt": 0 }, "value": "end", diff --git a/crates/swc_ecma_parser/tests/tsc/ExportClassWithInaccessibleTypeInTypeParameterConstraint.json b/crates/swc_ecma_parser/tests/tsc/ExportClassWithInaccessibleTypeInTypeParameterConstraint.json index b4e3d28814ac..84353a99b0b3 100644 --- a/crates/swc_ecma_parser/tests/tsc/ExportClassWithInaccessibleTypeInTypeParameterConstraint.json +++ b/crates/swc_ecma_parser/tests/tsc/ExportClassWithInaccessibleTypeInTypeParameterConstraint.json @@ -566,7 +566,7 @@ "type": "Identifier", "span": { "start": 321, - "end": 334, + "end": 326, "ctxt": 0 }, "value": "start", @@ -615,7 +615,7 @@ "type": "Identifier", "span": { "start": 343, - "end": 354, + "end": 346, "ctxt": 0 }, "value": "end", @@ -693,7 +693,7 @@ "type": "Identifier", "span": { "start": 389, - "end": 397, + "end": 390, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.json b/crates/swc_ecma_parser/tests/tsc/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.json index 4c4334f83773..28c078e07134 100644 --- a/crates/swc_ecma_parser/tests/tsc/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.json +++ b/crates/swc_ecma_parser/tests/tsc/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.json @@ -218,7 +218,7 @@ "type": "Identifier", "span": { "start": 134, - "end": 146, + "end": 139, "ctxt": 0 }, "value": "start", @@ -267,7 +267,7 @@ "type": "Identifier", "span": { "start": 155, - "end": 165, + "end": 158, "ctxt": 0 }, "value": "end", @@ -355,7 +355,7 @@ "type": "Identifier", "span": { "start": 209, - "end": 217, + "end": 210, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.json b/crates/swc_ecma_parser/tests/tsc/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.json index 425d611e1fdd..ebd6259b72ae 100644 --- a/crates/swc_ecma_parser/tests/tsc/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.json +++ b/crates/swc_ecma_parser/tests/tsc/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.json @@ -210,7 +210,7 @@ "type": "Identifier", "span": { "start": 127, - "end": 139, + "end": 132, "ctxt": 0 }, "value": "start", @@ -259,7 +259,7 @@ "type": "Identifier", "span": { "start": 148, - "end": 158, + "end": 151, "ctxt": 0 }, "value": "end", @@ -347,7 +347,7 @@ "type": "Identifier", "span": { "start": 202, - "end": 210, + "end": 203, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.json b/crates/swc_ecma_parser/tests/tsc/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.json index e0207e48c81c..3274174758d2 100644 --- a/crates/swc_ecma_parser/tests/tsc/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.json +++ b/crates/swc_ecma_parser/tests/tsc/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.json @@ -211,7 +211,7 @@ "type": "Identifier", "span": { "start": 127, - "end": 139, + "end": 132, "ctxt": 0 }, "value": "start", @@ -260,7 +260,7 @@ "type": "Identifier", "span": { "start": 148, - "end": 158, + "end": 151, "ctxt": 0 }, "value": "end", @@ -347,7 +347,7 @@ "type": "Identifier", "span": { "start": 202, - "end": 210, + "end": 203, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.json b/crates/swc_ecma_parser/tests/tsc/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.json index 3486ceb036ae..5e0ec05532e4 100644 --- a/crates/swc_ecma_parser/tests/tsc/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.json +++ b/crates/swc_ecma_parser/tests/tsc/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.json @@ -618,7 +618,7 @@ "type": "Identifier", "span": { "start": 326, - "end": 339, + "end": 331, "ctxt": 0 }, "value": "start", @@ -655,7 +655,7 @@ "type": "Identifier", "span": { "start": 341, - "end": 352, + "end": 344, "ctxt": 0 }, "value": "end", diff --git a/crates/swc_ecma_parser/tests/tsc/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.json b/crates/swc_ecma_parser/tests/tsc/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.json index 54ae8c933b39..a72ff59529da 100644 --- a/crates/swc_ecma_parser/tests/tsc/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.json +++ b/crates/swc_ecma_parser/tests/tsc/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.json @@ -610,7 +610,7 @@ "type": "Identifier", "span": { "start": 319, - "end": 332, + "end": 324, "ctxt": 0 }, "value": "start", @@ -647,7 +647,7 @@ "type": "Identifier", "span": { "start": 334, - "end": 345, + "end": 337, "ctxt": 0 }, "value": "end", diff --git a/crates/swc_ecma_parser/tests/tsc/ExportModuleWithAccessibleTypesOnItsExportedMembers.json b/crates/swc_ecma_parser/tests/tsc/ExportModuleWithAccessibleTypesOnItsExportedMembers.json index 55149052abdf..ebe467a9dbdb 100644 --- a/crates/swc_ecma_parser/tests/tsc/ExportModuleWithAccessibleTypesOnItsExportedMembers.json +++ b/crates/swc_ecma_parser/tests/tsc/ExportModuleWithAccessibleTypesOnItsExportedMembers.json @@ -93,7 +93,7 @@ "type": "Identifier", "span": { "start": 65, - "end": 74, + "end": 66, "ctxt": 0 }, "value": "x", @@ -132,7 +132,7 @@ "type": "Identifier", "span": { "start": 83, - "end": 92, + "end": 84, "ctxt": 0 }, "value": "y", @@ -381,7 +381,7 @@ "type": "Identifier", "span": { "start": 232, - "end": 244, + "end": 237, "ctxt": 0 }, "value": "start", @@ -427,7 +427,7 @@ "type": "Identifier", "span": { "start": 246, - "end": 256, + "end": 249, "ctxt": 0 }, "value": "end", @@ -505,7 +505,7 @@ "type": "Identifier", "span": { "start": 306, - "end": 314, + "end": 307, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.json b/crates/swc_ecma_parser/tests/tsc/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.json index 59a13e5b4cf5..991691c15e3a 100644 --- a/crates/swc_ecma_parser/tests/tsc/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.json +++ b/crates/swc_ecma_parser/tests/tsc/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.json @@ -86,7 +86,7 @@ "type": "Identifier", "span": { "start": 58, - "end": 67, + "end": 59, "ctxt": 0 }, "value": "x", @@ -125,7 +125,7 @@ "type": "Identifier", "span": { "start": 76, - "end": 85, + "end": 77, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.json b/crates/swc_ecma_parser/tests/tsc/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.json index d628cc201e17..ca74877aacd3 100644 --- a/crates/swc_ecma_parser/tests/tsc/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.json +++ b/crates/swc_ecma_parser/tests/tsc/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.json @@ -86,7 +86,7 @@ "type": "Identifier", "span": { "start": 58, - "end": 67, + "end": 59, "ctxt": 0 }, "value": "x", @@ -125,7 +125,7 @@ "type": "Identifier", "span": { "start": 76, - "end": 85, + "end": 77, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/ModuleAndClassWithSameNameAndCommonRoot.json b/crates/swc_ecma_parser/tests/tsc/ModuleAndClassWithSameNameAndCommonRoot.json index ceff91007ab2..078fe752205f 100644 --- a/crates/swc_ecma_parser/tests/tsc/ModuleAndClassWithSameNameAndCommonRoot.json +++ b/crates/swc_ecma_parser/tests/tsc/ModuleAndClassWithSameNameAndCommonRoot.json @@ -284,7 +284,7 @@ "type": "Identifier", "span": { "start": 232, - "end": 241, + "end": 233, "ctxt": 0 }, "value": "x", @@ -320,7 +320,7 @@ "type": "Identifier", "span": { "start": 243, - "end": 252, + "end": 244, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/ModuleAndEnumWithSameNameAndCommonRoot.json b/crates/swc_ecma_parser/tests/tsc/ModuleAndEnumWithSameNameAndCommonRoot.json index abc9275de8d4..2f3ee85659bd 100644 --- a/crates/swc_ecma_parser/tests/tsc/ModuleAndEnumWithSameNameAndCommonRoot.json +++ b/crates/swc_ecma_parser/tests/tsc/ModuleAndEnumWithSameNameAndCommonRoot.json @@ -93,7 +93,7 @@ "type": "Identifier", "span": { "start": 72, - "end": 81, + "end": 73, "ctxt": 0 }, "value": "x", @@ -132,7 +132,7 @@ "type": "Identifier", "span": { "start": 90, - "end": 99, + "end": 91, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/ModuleWithExportedAndNonExportedFunctions.json b/crates/swc_ecma_parser/tests/tsc/ModuleWithExportedAndNonExportedFunctions.json index 2e72b261d277..76331e2436e8 100644 --- a/crates/swc_ecma_parser/tests/tsc/ModuleWithExportedAndNonExportedFunctions.json +++ b/crates/swc_ecma_parser/tests/tsc/ModuleWithExportedAndNonExportedFunctions.json @@ -66,7 +66,7 @@ "type": "Identifier", "span": { "start": 36, - "end": 45, + "end": 37, "ctxt": 0 }, "value": "s", @@ -163,7 +163,7 @@ "type": "Identifier", "span": { "start": 107, - "end": 111, + "end": 108, "ctxt": 0 }, "value": "s", @@ -343,7 +343,7 @@ "type": "Identifier", "span": { "start": 163, - "end": 172, + "end": 164, "ctxt": 0 }, "value": "s", @@ -432,7 +432,7 @@ "type": "Identifier", "span": { "start": 229, - "end": 233, + "end": 230, "ctxt": 0 }, "value": "s", @@ -633,7 +633,7 @@ "type": "Identifier", "span": { "start": 342, - "end": 351, + "end": 343, "ctxt": 0 }, "value": "s", @@ -788,7 +788,7 @@ "type": "Identifier", "span": { "start": 397, - "end": 401, + "end": 398, "ctxt": 0 }, "value": "s", diff --git a/crates/swc_ecma_parser/tests/tsc/ModuleWithExportedAndNonExportedImportAlias.json b/crates/swc_ecma_parser/tests/tsc/ModuleWithExportedAndNonExportedImportAlias.json index 2abfc15f2501..00970c6b82d4 100644 --- a/crates/swc_ecma_parser/tests/tsc/ModuleWithExportedAndNonExportedImportAlias.json +++ b/crates/swc_ecma_parser/tests/tsc/ModuleWithExportedAndNonExportedImportAlias.json @@ -336,7 +336,7 @@ "type": "Identifier", "span": { "start": 214, - "end": 228, + "end": 219, "ctxt": 0 }, "value": "start", @@ -398,7 +398,7 @@ "type": "Identifier", "span": { "start": 237, - "end": 249, + "end": 240, "ctxt": 0 }, "value": "end", diff --git a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.json b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.json index 0c2814296bf4..a2a35c6a3720 100644 --- a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.json +++ b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.json @@ -239,7 +239,7 @@ "type": "Identifier", "span": { "start": 136, - "end": 146, + "end": 137, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.json b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.json index 2bd7e48565ae..8ac1c1fa8a74 100644 --- a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.json +++ b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.json @@ -697,7 +697,7 @@ "type": "Identifier", "span": { "start": 340, - "end": 354, + "end": 345, "ctxt": 0 }, "value": "start", @@ -747,7 +747,7 @@ "type": "Identifier", "span": { "start": 356, - "end": 368, + "end": 359, "ctxt": 0 }, "value": "end", @@ -1106,7 +1106,7 @@ "type": "Identifier", "span": { "start": 556, - "end": 566, + "end": 557, "ctxt": 0 }, "value": "s", @@ -1156,7 +1156,7 @@ "type": "Identifier", "span": { "start": 568, - "end": 578, + "end": 569, "ctxt": 0 }, "value": "e", diff --git a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.json b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.json index a877fde545ce..551db6792ba2 100644 --- a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.json +++ b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.json @@ -221,7 +221,7 @@ "type": "Identifier", "span": { "start": 182, - "end": 186, + "end": 183, "ctxt": 0 }, "value": "p", @@ -736,7 +736,7 @@ "type": "Identifier", "span": { "start": 493, - "end": 502, + "end": 495, "ctxt": 0 }, "value": "tl", @@ -785,7 +785,7 @@ "type": "Identifier", "span": { "start": 511, - "end": 520, + "end": 513, "ctxt": 0 }, "value": "br", diff --git a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.json b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.json index f31de075f46d..6f78a0ef3353 100644 --- a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.json +++ b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.json @@ -768,7 +768,7 @@ "type": "Identifier", "span": { "start": 369, - "end": 383, + "end": 374, "ctxt": 0 }, "value": "start", @@ -818,7 +818,7 @@ "type": "Identifier", "span": { "start": 385, - "end": 397, + "end": 388, "ctxt": 0 }, "value": "end", @@ -1313,7 +1313,7 @@ "type": "Identifier", "span": { "start": 622, - "end": 632, + "end": 623, "ctxt": 0 }, "value": "s", @@ -1363,7 +1363,7 @@ "type": "Identifier", "span": { "start": 634, - "end": 644, + "end": 635, "ctxt": 0 }, "value": "e", diff --git a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.json b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.json index 7d4f51353935..3b8c26579c86 100644 --- a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.json +++ b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.json @@ -228,7 +228,7 @@ "type": "Identifier", "span": { "start": 189, - "end": 193, + "end": 190, "ctxt": 0 }, "value": "p", @@ -815,7 +815,7 @@ "type": "Identifier", "span": { "start": 543, - "end": 552, + "end": 545, "ctxt": 0 }, "value": "tl", @@ -864,7 +864,7 @@ "type": "Identifier", "span": { "start": 561, - "end": 570, + "end": 563, "ctxt": 0 }, "value": "br", diff --git a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.json b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.json index 318f03e7e211..ed0112bbbe2c 100644 --- a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.json +++ b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.json @@ -255,7 +255,7 @@ "type": "Identifier", "span": { "start": 231, - "end": 235, + "end": 232, "ctxt": 0 }, "value": "p", @@ -776,7 +776,7 @@ "type": "Identifier", "span": { "start": 597, - "end": 613, + "end": 599, "ctxt": 0 }, "value": "tl", @@ -851,7 +851,7 @@ "type": "Identifier", "span": { "start": 622, - "end": 638, + "end": 624, "ctxt": 0 }, "value": "br", diff --git a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesWithTheSameNameAndSameCommonRoot.json b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesWithTheSameNameAndSameCommonRoot.json index 337be9288ccb..65031acf896e 100644 --- a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesWithTheSameNameAndSameCommonRoot.json +++ b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesWithTheSameNameAndSameCommonRoot.json @@ -221,7 +221,7 @@ "type": "Identifier", "span": { "start": 182, - "end": 186, + "end": 183, "ctxt": 0 }, "value": "p", @@ -678,7 +678,7 @@ "type": "Identifier", "span": { "start": 415, - "end": 424, + "end": 417, "ctxt": 0 }, "value": "tl", @@ -727,7 +727,7 @@ "type": "Identifier", "span": { "start": 433, - "end": 442, + "end": 435, "ctxt": 0 }, "value": "br", diff --git a/crates/swc_ecma_parser/tests/tsc/TypeGuardWithArrayUnion.json b/crates/swc_ecma_parser/tests/tsc/TypeGuardWithArrayUnion.json index 521e95556027..cb15e8f06e30 100644 --- a/crates/swc_ecma_parser/tests/tsc/TypeGuardWithArrayUnion.json +++ b/crates/swc_ecma_parser/tests/tsc/TypeGuardWithArrayUnion.json @@ -104,7 +104,7 @@ "type": "Identifier", "span": { "start": 56, - "end": 84, + "end": 63, "ctxt": 0 }, "value": "message", diff --git a/crates/swc_ecma_parser/tests/tsc/TypeGuardWithEnumUnion.json b/crates/swc_ecma_parser/tests/tsc/TypeGuardWithEnumUnion.json index ef631864f082..08e9f389ac71 100644 --- a/crates/swc_ecma_parser/tests/tsc/TypeGuardWithEnumUnion.json +++ b/crates/swc_ecma_parser/tests/tsc/TypeGuardWithEnumUnion.json @@ -111,7 +111,7 @@ "type": "Identifier", "span": { "start": 37, - "end": 54, + "end": 38, "ctxt": 0 }, "value": "x", @@ -470,7 +470,7 @@ "type": "Identifier", "span": { "start": 212, - "end": 240, + "end": 213, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/accessorsAreNotContextuallyTyped.json b/crates/swc_ecma_parser/tests/tsc/accessorsAreNotContextuallyTyped.json index 3375c18a18d1..d10139d3b614 100644 --- a/crates/swc_ecma_parser/tests/tsc/accessorsAreNotContextuallyTyped.json +++ b/crates/swc_ecma_parser/tests/tsc/accessorsAreNotContextuallyTyped.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 62, - "end": 86, + "end": 63, "ctxt": 0 }, "value": "v", @@ -81,7 +81,7 @@ "type": "Identifier", "span": { "start": 66, - "end": 75, + "end": 67, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty4.json b/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty4.json index 58c420f21356..262e9d1fdf73 100644 --- a/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty4.json +++ b/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty4.json @@ -264,7 +264,7 @@ "type": "Identifier", "span": { "start": 207, - "end": 218, + "end": 210, "ctxt": 0 }, "value": "val", diff --git a/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty8.json b/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty8.json index a5bee4b291f3..18996596e403 100644 --- a/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty8.json +++ b/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty8.json @@ -625,7 +625,7 @@ "type": "Identifier", "span": { "start": 386, - "end": 399, + "end": 396, "ctxt": 0 }, "value": "properties", @@ -671,7 +671,7 @@ "type": "Identifier", "span": { "start": 401, - "end": 418, + "end": 406, "ctxt": 0 }, "value": "klass", diff --git a/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty9.json b/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty9.json index 04d2633e58bc..a0eec77b49fc 100644 --- a/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty9.json +++ b/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty9.json @@ -791,7 +791,7 @@ "type": "Identifier", "span": { "start": 660, - "end": 681, + "end": 669, "ctxt": 0 }, "value": "baseClass", diff --git a/crates/swc_ecma_parser/tests/tsc/additionOperatorWithConstrainedTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/additionOperatorWithConstrainedTypeParameter.json index 01d12c98c4d8..f4ce05e28043 100644 --- a/crates/swc_ecma_parser/tests/tsc/additionOperatorWithConstrainedTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/additionOperatorWithConstrainedTypeParameter.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 80, - "end": 89, + "end": 81, "ctxt": 0 }, "value": "n", @@ -68,7 +68,7 @@ "type": "Identifier", "span": { "start": 91, - "end": 95, + "end": 92, "ctxt": 0 }, "value": "v", @@ -114,7 +114,7 @@ "type": "Identifier", "span": { "start": 97, - "end": 101, + "end": 98, "ctxt": 0 }, "value": "k", @@ -461,7 +461,7 @@ "type": "Identifier", "span": { "start": 235, - "end": 244, + "end": 236, "ctxt": 0 }, "value": "n", @@ -497,7 +497,7 @@ "type": "Identifier", "span": { "start": 246, - "end": 253, + "end": 248, "ctxt": 0 }, "value": "vs", @@ -551,7 +551,7 @@ "type": "Identifier", "span": { "start": 255, - "end": 259, + "end": 256, "ctxt": 0 }, "value": "k", diff --git a/crates/swc_ecma_parser/tests/tsc/additionOperatorWithTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/additionOperatorWithTypeParameter.json index 17013dd9b754..ede54f9ef930 100644 --- a/crates/swc_ecma_parser/tests/tsc/additionOperatorWithTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/additionOperatorWithTypeParameter.json @@ -92,7 +92,7 @@ "type": "Identifier", "span": { "start": 104, - "end": 108, + "end": 105, "ctxt": 0 }, "value": "t", @@ -138,7 +138,7 @@ "type": "Identifier", "span": { "start": 110, - "end": 114, + "end": 111, "ctxt": 0 }, "value": "u", diff --git a/crates/swc_ecma_parser/tests/tsc/ambientAccessors.json b/crates/swc_ecma_parser/tests/tsc/ambientAccessors.json index abc802307b4f..d4c70a3d15ca 100644 --- a/crates/swc_ecma_parser/tests/tsc/ambientAccessors.json +++ b/crates/swc_ecma_parser/tests/tsc/ambientAccessors.json @@ -111,7 +111,7 @@ "type": "Identifier", "span": { "start": 149, - "end": 162, + "end": 154, "ctxt": 0 }, "value": "value", @@ -240,7 +240,7 @@ "type": "Identifier", "span": { "start": 227, - "end": 238, + "end": 230, "ctxt": 0 }, "value": "foo", @@ -369,7 +369,7 @@ "type": "Identifier", "span": { "start": 273, - "end": 286, + "end": 278, "ctxt": 0 }, "value": "value", @@ -498,7 +498,7 @@ "type": "Identifier", "span": { "start": 337, - "end": 348, + "end": 340, "ctxt": 0 }, "value": "foo", diff --git a/crates/swc_ecma_parser/tests/tsc/ambientDeclarations.json b/crates/swc_ecma_parser/tests/tsc/ambientDeclarations.json index c06211668b33..f56983f376dd 100644 --- a/crates/swc_ecma_parser/tests/tsc/ambientDeclarations.json +++ b/crates/swc_ecma_parser/tests/tsc/ambientDeclarations.json @@ -140,7 +140,7 @@ "type": "Identifier", "span": { "start": 259, - "end": 268, + "end": 260, "ctxt": 0 }, "value": "n", @@ -219,7 +219,7 @@ "type": "Identifier", "span": { "start": 342, - "end": 351, + "end": 343, "ctxt": 0 }, "value": "n", @@ -298,7 +298,7 @@ "type": "Identifier", "span": { "start": 383, - "end": 392, + "end": 384, "ctxt": 0 }, "value": "n", @@ -334,7 +334,7 @@ "type": "Identifier", "span": { "start": 394, - "end": 403, + "end": 395, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/ambientDeclarationsPatterns.json b/crates/swc_ecma_parser/tests/tsc/ambientDeclarationsPatterns.json index 79cbcd0dfabf..be7986b9f211 100644 --- a/crates/swc_ecma_parser/tests/tsc/ambientDeclarationsPatterns.json +++ b/crates/swc_ecma_parser/tests/tsc/ambientDeclarationsPatterns.json @@ -66,7 +66,7 @@ "type": "Identifier", "span": { "start": 84, - "end": 93, + "end": 85, "ctxt": 0 }, "value": "s", diff --git a/crates/swc_ecma_parser/tests/tsc/anyAssignabilityInInheritance.json b/crates/swc_ecma_parser/tests/tsc/anyAssignabilityInInheritance.json index a9a33fed901b..3428570064a5 100644 --- a/crates/swc_ecma_parser/tests/tsc/anyAssignabilityInInheritance.json +++ b/crates/swc_ecma_parser/tests/tsc/anyAssignabilityInInheritance.json @@ -209,7 +209,7 @@ "type": "Identifier", "span": { "start": 237, - "end": 246, + "end": 238, "ctxt": 0 }, "value": "x", @@ -288,7 +288,7 @@ "type": "Identifier", "span": { "start": 279, - "end": 285, + "end": 280, "ctxt": 0 }, "value": "x", @@ -433,7 +433,7 @@ "type": "Identifier", "span": { "start": 485, - "end": 494, + "end": 486, "ctxt": 0 }, "value": "x", @@ -512,7 +512,7 @@ "type": "Identifier", "span": { "start": 527, - "end": 533, + "end": 528, "ctxt": 0 }, "value": "x", @@ -657,7 +657,7 @@ "type": "Identifier", "span": { "start": 589, - "end": 599, + "end": 590, "ctxt": 0 }, "value": "x", @@ -736,7 +736,7 @@ "type": "Identifier", "span": { "start": 633, - "end": 639, + "end": 634, "ctxt": 0 }, "value": "x", @@ -881,7 +881,7 @@ "type": "Identifier", "span": { "start": 695, - "end": 702, + "end": 696, "ctxt": 0 }, "value": "x", @@ -980,7 +980,7 @@ "type": "Identifier", "span": { "start": 733, - "end": 739, + "end": 734, "ctxt": 0 }, "value": "x", @@ -1125,7 +1125,7 @@ "type": "Identifier", "span": { "start": 795, - "end": 804, + "end": 796, "ctxt": 0 }, "value": "x", @@ -1224,7 +1224,7 @@ "type": "Identifier", "span": { "start": 837, - "end": 843, + "end": 838, "ctxt": 0 }, "value": "x", @@ -1369,7 +1369,7 @@ "type": "Identifier", "span": { "start": 899, - "end": 917, + "end": 900, "ctxt": 0 }, "value": "x", @@ -1532,7 +1532,7 @@ "type": "Identifier", "span": { "start": 959, - "end": 965, + "end": 960, "ctxt": 0 }, "value": "x", @@ -1677,7 +1677,7 @@ "type": "Identifier", "span": { "start": 1021, - "end": 1032, + "end": 1022, "ctxt": 0 }, "value": "x", @@ -1772,7 +1772,7 @@ "type": "Identifier", "span": { "start": 1067, - "end": 1073, + "end": 1068, "ctxt": 0 }, "value": "x", @@ -1989,7 +1989,7 @@ "type": "Identifier", "span": { "start": 1158, - "end": 1163, + "end": 1159, "ctxt": 0 }, "value": "x", @@ -2088,7 +2088,7 @@ "type": "Identifier", "span": { "start": 1192, - "end": 1198, + "end": 1193, "ctxt": 0 }, "value": "x", @@ -2305,7 +2305,7 @@ "type": "Identifier", "span": { "start": 1280, - "end": 1284, + "end": 1281, "ctxt": 0 }, "value": "x", @@ -2404,7 +2404,7 @@ "type": "Identifier", "span": { "start": 1313, - "end": 1319, + "end": 1314, "ctxt": 0 }, "value": "x", @@ -2663,7 +2663,7 @@ "type": "Identifier", "span": { "start": 1400, - "end": 1413, + "end": 1401, "ctxt": 0 }, "value": "x", @@ -2798,7 +2798,7 @@ "type": "Identifier", "span": { "start": 1451, - "end": 1457, + "end": 1452, "ctxt": 0 }, "value": "x", @@ -2943,7 +2943,7 @@ "type": "Identifier", "span": { "start": 1514, - "end": 1530, + "end": 1515, "ctxt": 0 }, "value": "x", @@ -3082,7 +3082,7 @@ "type": "Identifier", "span": { "start": 1571, - "end": 1577, + "end": 1572, "ctxt": 0 }, "value": "x", @@ -3227,7 +3227,7 @@ "type": "Identifier", "span": { "start": 1634, - "end": 1651, + "end": 1635, "ctxt": 0 }, "value": "x", @@ -3251,7 +3251,7 @@ "type": "Identifier", "span": { "start": 1641, - "end": 1645, + "end": 1642, "ctxt": 0 }, "value": "x", @@ -3379,7 +3379,7 @@ "type": "Identifier", "span": { "start": 1658, - "end": 1662, + "end": 1659, "ctxt": 0 }, "value": "x", @@ -3502,7 +3502,7 @@ "type": "Identifier", "span": { "start": 1693, - "end": 1699, + "end": 1694, "ctxt": 0 }, "value": "x", @@ -3688,7 +3688,7 @@ "type": "Identifier", "span": { "start": 1769, - "end": 1773, + "end": 1770, "ctxt": 0 }, "value": "x", @@ -3787,7 +3787,7 @@ "type": "Identifier", "span": { "start": 1802, - "end": 1808, + "end": 1803, "ctxt": 0 }, "value": "x", @@ -4046,7 +4046,7 @@ "type": "Identifier", "span": { "start": 1919, - "end": 1930, + "end": 1920, "ctxt": 0 }, "value": "x", @@ -4145,7 +4145,7 @@ "type": "Identifier", "span": { "start": 1966, - "end": 1972, + "end": 1967, "ctxt": 0 }, "value": "x", @@ -4442,7 +4442,7 @@ "type": "Identifier", "span": { "start": 2092, - "end": 2097, + "end": 2093, "ctxt": 0 }, "value": "x", @@ -4541,7 +4541,7 @@ "type": "Identifier", "span": { "start": 2127, - "end": 2133, + "end": 2128, "ctxt": 0 }, "value": "x", @@ -4686,7 +4686,7 @@ "type": "Identifier", "span": { "start": 2190, - "end": 2199, + "end": 2191, "ctxt": 0 }, "value": "x", @@ -4785,7 +4785,7 @@ "type": "Identifier", "span": { "start": 2233, - "end": 2239, + "end": 2234, "ctxt": 0 }, "value": "x", @@ -4930,7 +4930,7 @@ "type": "Identifier", "span": { "start": 2296, - "end": 2301, + "end": 2297, "ctxt": 0 }, "value": "x", @@ -5009,7 +5009,7 @@ "type": "Identifier", "span": { "start": 2331, - "end": 2337, + "end": 2332, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/anyAssignableToEveryType.json b/crates/swc_ecma_parser/tests/tsc/anyAssignableToEveryType.json index 3206fe35df6f..7763e7d77175 100644 --- a/crates/swc_ecma_parser/tests/tsc/anyAssignableToEveryType.json +++ b/crates/swc_ecma_parser/tests/tsc/anyAssignableToEveryType.json @@ -1090,7 +1090,7 @@ "type": "Identifier", "span": { "start": 316, - "end": 325, + "end": 317, "ctxt": 0 }, "value": "x", @@ -1474,7 +1474,7 @@ "type": "Identifier", "span": { "start": 426, - "end": 430, + "end": 427, "ctxt": 0 }, "value": "x", @@ -1747,7 +1747,7 @@ "type": "Identifier", "span": { "start": 530, - "end": 534, + "end": 531, "ctxt": 0 }, "value": "x", @@ -1793,7 +1793,7 @@ "type": "Identifier", "span": { "start": 536, - "end": 540, + "end": 537, "ctxt": 0 }, "value": "y", @@ -1839,7 +1839,7 @@ "type": "Identifier", "span": { "start": 542, - "end": 546, + "end": 543, "ctxt": 0 }, "value": "z", diff --git a/crates/swc_ecma_parser/tests/tsc/anyAssignableToEveryType2.json b/crates/swc_ecma_parser/tests/tsc/anyAssignableToEveryType2.json index c1d44869c759..7465ee2eed8b 100644 --- a/crates/swc_ecma_parser/tests/tsc/anyAssignableToEveryType2.json +++ b/crates/swc_ecma_parser/tests/tsc/anyAssignableToEveryType2.json @@ -1954,7 +1954,7 @@ "type": "Identifier", "span": { "start": 913, - "end": 917, + "end": 914, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/argumentExpressionContextualTyping.json b/crates/swc_ecma_parser/tests/tsc/argumentExpressionContextualTyping.json index fc5342cd71b7..5ba198d90f51 100644 --- a/crates/swc_ecma_parser/tests/tsc/argumentExpressionContextualTyping.json +++ b/crates/swc_ecma_parser/tests/tsc/argumentExpressionContextualTyping.json @@ -458,7 +458,7 @@ "type": "Identifier", "span": { "start": 230, - "end": 258, + "end": 231, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/arithmeticOperatorWithTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/arithmeticOperatorWithTypeParameter.json index d2f6ffd9b7e5..e597383fdce9 100644 --- a/crates/swc_ecma_parser/tests/tsc/arithmeticOperatorWithTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/arithmeticOperatorWithTypeParameter.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 76, - "end": 80, + "end": 77, "ctxt": 0 }, "value": "t", diff --git a/crates/swc_ecma_parser/tests/tsc/arrayOfFunctionTypes3.json b/crates/swc_ecma_parser/tests/tsc/arrayOfFunctionTypes3.json index c3522eed30da..00446643547a 100644 --- a/crates/swc_ecma_parser/tests/tsc/arrayOfFunctionTypes3.json +++ b/crates/swc_ecma_parser/tests/tsc/arrayOfFunctionTypes3.json @@ -448,7 +448,7 @@ "type": "Identifier", "span": { "start": 169, - "end": 178, + "end": 170, "ctxt": 0 }, "value": "x", @@ -503,7 +503,7 @@ "type": "Identifier", "span": { "start": 190, - "end": 199, + "end": 191, "ctxt": 0 }, "value": "x", @@ -608,7 +608,7 @@ "type": "Identifier", "span": { "start": 223, - "end": 232, + "end": 224, "ctxt": 0 }, "value": "x", @@ -663,7 +663,7 @@ "type": "Identifier", "span": { "start": 244, - "end": 253, + "end": 245, "ctxt": 0 }, "value": "x", @@ -768,7 +768,7 @@ "type": "Identifier", "span": { "start": 277, - "end": 286, + "end": 278, "ctxt": 0 }, "value": "x", @@ -823,7 +823,7 @@ "type": "Identifier", "span": { "start": 298, - "end": 304, + "end": 299, "ctxt": 0 }, "value": "x", @@ -1209,7 +1209,7 @@ "type": "Identifier", "span": { "start": 416, - "end": 420, + "end": 417, "ctxt": 0 }, "value": "x", @@ -1306,7 +1306,7 @@ "type": "Identifier", "span": { "start": 432, - "end": 441, + "end": 433, "ctxt": 0 }, "value": "x", @@ -1411,7 +1411,7 @@ "type": "Identifier", "span": { "start": 468, - "end": 472, + "end": 469, "ctxt": 0 }, "value": "x", @@ -1508,7 +1508,7 @@ "type": "Identifier", "span": { "start": 484, - "end": 493, + "end": 485, "ctxt": 0 }, "value": "x", @@ -1613,7 +1613,7 @@ "type": "Identifier", "span": { "start": 518, - "end": 527, + "end": 519, "ctxt": 0 }, "value": "x", @@ -1668,7 +1668,7 @@ "type": "Identifier", "span": { "start": 542, - "end": 546, + "end": 543, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/arraySpreadImportHelpers.json b/crates/swc_ecma_parser/tests/tsc/arraySpreadImportHelpers.json index 2acc7fccc812..a0c5ff94a9bc 100644 --- a/crates/swc_ecma_parser/tests/tsc/arraySpreadImportHelpers.json +++ b/crates/swc_ecma_parser/tests/tsc/arraySpreadImportHelpers.json @@ -225,7 +225,7 @@ "type": "Identifier", "span": { "start": 350, - "end": 359, + "end": 352, "ctxt": 0 }, "value": "to", @@ -269,7 +269,7 @@ "type": "Identifier", "span": { "start": 361, - "end": 372, + "end": 365, "ctxt": 0 }, "value": "from", diff --git a/crates/swc_ecma_parser/tests/tsc/arraySpreadInCall.json b/crates/swc_ecma_parser/tests/tsc/arraySpreadInCall.json index 5e8638c13e4e..940c572167fc 100644 --- a/crates/swc_ecma_parser/tests/tsc/arraySpreadInCall.json +++ b/crates/swc_ecma_parser/tests/tsc/arraySpreadInCall.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 56, - "end": 65, + "end": 57, "ctxt": 0 }, "value": "a", @@ -68,7 +68,7 @@ "type": "Identifier", "span": { "start": 67, - "end": 76, + "end": 68, "ctxt": 0 }, "value": "b", @@ -104,7 +104,7 @@ "type": "Identifier", "span": { "start": 78, - "end": 87, + "end": 79, "ctxt": 0 }, "value": "c", @@ -140,7 +140,7 @@ "type": "Identifier", "span": { "start": 89, - "end": 98, + "end": 90, "ctxt": 0 }, "value": "d", @@ -176,7 +176,7 @@ "type": "Identifier", "span": { "start": 100, - "end": 109, + "end": 101, "ctxt": 0 }, "value": "e", @@ -212,7 +212,7 @@ "type": "Identifier", "span": { "start": 111, - "end": 120, + "end": 112, "ctxt": 0 }, "value": "f", @@ -2976,7 +2976,7 @@ "type": "Identifier", "span": { "start": 1012, - "end": 1027, + "end": 1017, "ctxt": 0 }, "value": "event", diff --git a/crates/swc_ecma_parser/tests/tsc/arrowFunctionExpressions.json b/crates/swc_ecma_parser/tests/tsc/arrowFunctionExpressions.json index a9808d37f11d..b5b575ca40b7 100644 --- a/crates/swc_ecma_parser/tests/tsc/arrowFunctionExpressions.json +++ b/crates/swc_ecma_parser/tests/tsc/arrowFunctionExpressions.json @@ -664,7 +664,7 @@ "type": "Identifier", "span": { "start": 477, - "end": 483, + "end": 478, "ctxt": 0 }, "value": "n", @@ -3278,7 +3278,7 @@ "type": "Identifier", "span": { "start": 1801, - "end": 1810, + "end": 1802, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/asOperatorContextualType.json b/crates/swc_ecma_parser/tests/tsc/asOperatorContextualType.json index 93bc06c0e35e..d5ddfdd3fccc 100644 --- a/crates/swc_ecma_parser/tests/tsc/asOperatorContextualType.json +++ b/crates/swc_ecma_parser/tests/tsc/asOperatorContextualType.json @@ -96,7 +96,7 @@ "type": "Identifier", "span": { "start": 38, - "end": 47, + "end": 39, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/asiPreventsParsingAsInterface02.json b/crates/swc_ecma_parser/tests/tsc/asiPreventsParsingAsInterface02.json index 7431a7a9af3c..195c7cf4473c 100644 --- a/crates/swc_ecma_parser/tests/tsc/asiPreventsParsingAsInterface02.json +++ b/crates/swc_ecma_parser/tests/tsc/asiPreventsParsingAsInterface02.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 13, - "end": 30, + "end": 22, "ctxt": 0 }, "value": "interface", @@ -68,7 +68,7 @@ "type": "Identifier", "span": { "start": 32, - "end": 41, + "end": 33, "ctxt": 0 }, "value": "I", diff --git a/crates/swc_ecma_parser/tests/tsc/assignAnyToEveryType.json b/crates/swc_ecma_parser/tests/tsc/assignAnyToEveryType.json index 442e660e5874..2b9265d35f4a 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignAnyToEveryType.json +++ b/crates/swc_ecma_parser/tests/tsc/assignAnyToEveryType.json @@ -1071,7 +1071,7 @@ "type": "Identifier", "span": { "start": 354, - "end": 358, + "end": 355, "ctxt": 0 }, "value": "x", @@ -1318,7 +1318,7 @@ "type": "Identifier", "span": { "start": 436, - "end": 440, + "end": 437, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/assignEveryTypeToAny.json b/crates/swc_ecma_parser/tests/tsc/assignEveryTypeToAny.json index 7d8fa258b5eb..119a7bb70521 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignEveryTypeToAny.json +++ b/crates/swc_ecma_parser/tests/tsc/assignEveryTypeToAny.json @@ -1468,7 +1468,7 @@ "type": "Identifier", "span": { "start": 425, - "end": 429, + "end": 426, "ctxt": 0 }, "value": "x", @@ -1604,7 +1604,7 @@ "type": "Identifier", "span": { "start": 462, - "end": 466, + "end": 463, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/assignFromNumberInterface2.json b/crates/swc_ecma_parser/tests/tsc/assignFromNumberInterface2.json index d3f09ad1a306..505eed2848c6 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignFromNumberInterface2.json +++ b/crates/swc_ecma_parser/tests/tsc/assignFromNumberInterface2.json @@ -130,7 +130,7 @@ "type": "Identifier", "span": { "start": 81, - "end": 95, + "end": 86, "ctxt": 0 }, "value": "radix", @@ -198,7 +198,7 @@ "type": "Identifier", "span": { "start": 118, - "end": 141, + "end": 132, "ctxt": 0 }, "value": "fractionDigits", @@ -266,7 +266,7 @@ "type": "Identifier", "span": { "start": 170, - "end": 193, + "end": 184, "ctxt": 0 }, "value": "fractionDigits", @@ -334,7 +334,7 @@ "type": "Identifier", "span": { "start": 220, - "end": 238, + "end": 229, "ctxt": 0 }, "value": "precision", diff --git a/crates/swc_ecma_parser/tests/tsc/assignFromStringInterface2.json b/crates/swc_ecma_parser/tests/tsc/assignFromStringInterface2.json index de4c742b7c50..2a2d35f7969a 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignFromStringInterface2.json +++ b/crates/swc_ecma_parser/tests/tsc/assignFromStringInterface2.json @@ -210,7 +210,7 @@ "type": "Identifier", "span": { "start": 126, - "end": 137, + "end": 129, "ctxt": 0 }, "value": "pos", @@ -278,7 +278,7 @@ "type": "Identifier", "span": { "start": 163, - "end": 176, + "end": 168, "ctxt": 0 }, "value": "index", @@ -436,7 +436,7 @@ "type": "Identifier", "span": { "start": 241, - "end": 261, + "end": 253, "ctxt": 0 }, "value": "searchString", @@ -463,7 +463,7 @@ "type": "Identifier", "span": { "start": 263, - "end": 280, + "end": 271, "ctxt": 0 }, "value": "position", @@ -531,7 +531,7 @@ "type": "Identifier", "span": { "start": 307, - "end": 327, + "end": 319, "ctxt": 0 }, "value": "searchString", @@ -558,7 +558,7 @@ "type": "Identifier", "span": { "start": 329, - "end": 346, + "end": 337, "ctxt": 0 }, "value": "position", @@ -626,7 +626,7 @@ "type": "Identifier", "span": { "start": 375, - "end": 387, + "end": 379, "ctxt": 0 }, "value": "that", @@ -694,7 +694,7 @@ "type": "Identifier", "span": { "start": 408, - "end": 422, + "end": 414, "ctxt": 0 }, "value": "regexp", @@ -772,7 +772,7 @@ "type": "Identifier", "span": { "start": 453, - "end": 467, + "end": 459, "ctxt": 0 }, "value": "regexp", @@ -860,7 +860,7 @@ "type": "Identifier", "span": { "start": 500, - "end": 519, + "end": 511, "ctxt": 0 }, "value": "searchValue", @@ -887,7 +887,7 @@ "type": "Identifier", "span": { "start": 521, - "end": 541, + "end": 533, "ctxt": 0 }, "value": "replaceValue", @@ -955,7 +955,7 @@ "type": "Identifier", "span": { "start": 564, - "end": 583, + "end": 575, "ctxt": 0 }, "value": "searchValue", @@ -982,7 +982,7 @@ "type": "Identifier", "span": { "start": 585, - "end": 644, + "end": 597, "ctxt": 0 }, "value": "replaceValue", @@ -1006,7 +1006,7 @@ "type": "Identifier", "span": { "start": 600, - "end": 617, + "end": 609, "ctxt": 0 }, "value": "substring", @@ -1145,7 +1145,7 @@ "type": "Identifier", "span": { "start": 667, - "end": 686, + "end": 678, "ctxt": 0 }, "value": "searchValue", @@ -1182,7 +1182,7 @@ "type": "Identifier", "span": { "start": 688, - "end": 708, + "end": 700, "ctxt": 0 }, "value": "replaceValue", @@ -1250,7 +1250,7 @@ "type": "Identifier", "span": { "start": 731, - "end": 750, + "end": 742, "ctxt": 0 }, "value": "searchValue", @@ -1287,7 +1287,7 @@ "type": "Identifier", "span": { "start": 752, - "end": 811, + "end": 764, "ctxt": 0 }, "value": "replaceValue", @@ -1311,7 +1311,7 @@ "type": "Identifier", "span": { "start": 767, - "end": 784, + "end": 776, "ctxt": 0 }, "value": "substring", @@ -1450,7 +1450,7 @@ "type": "Identifier", "span": { "start": 833, - "end": 847, + "end": 839, "ctxt": 0 }, "value": "regexp", @@ -1518,7 +1518,7 @@ "type": "Identifier", "span": { "start": 869, - "end": 883, + "end": 875, "ctxt": 0 }, "value": "regexp", @@ -1596,7 +1596,7 @@ "type": "Identifier", "span": { "start": 904, - "end": 918, + "end": 909, "ctxt": 0 }, "value": "start", @@ -1623,7 +1623,7 @@ "type": "Identifier", "span": { "start": 920, - "end": 932, + "end": 923, "ctxt": 0 }, "value": "end", @@ -1691,7 +1691,7 @@ "type": "Identifier", "span": { "start": 953, - "end": 970, + "end": 962, "ctxt": 0 }, "value": "separator", @@ -1718,7 +1718,7 @@ "type": "Identifier", "span": { "start": 972, - "end": 986, + "end": 977, "ctxt": 0 }, "value": "limit", @@ -1794,7 +1794,7 @@ "type": "Identifier", "span": { "start": 1009, - "end": 1026, + "end": 1018, "ctxt": 0 }, "value": "separator", @@ -1831,7 +1831,7 @@ "type": "Identifier", "span": { "start": 1028, - "end": 1042, + "end": 1033, "ctxt": 0 }, "value": "limit", @@ -1907,7 +1907,7 @@ "type": "Identifier", "span": { "start": 1069, - "end": 1082, + "end": 1074, "ctxt": 0 }, "value": "start", @@ -1934,7 +1934,7 @@ "type": "Identifier", "span": { "start": 1084, - "end": 1096, + "end": 1087, "ctxt": 0 }, "value": "end", @@ -2243,7 +2243,7 @@ "type": "Identifier", "span": { "start": 1278, - "end": 1290, + "end": 1282, "ctxt": 0 }, "value": "from", @@ -2270,7 +2270,7 @@ "type": "Identifier", "span": { "start": 1292, - "end": 1307, + "end": 1298, "ctxt": 0 }, "value": "length", diff --git a/crates/swc_ecma_parser/tests/tsc/assignParameterPropertyToPropertyDeclarationES2022.json b/crates/swc_ecma_parser/tests/tsc/assignParameterPropertyToPropertyDeclarationES2022.json index 38bb3bd7ced8..5137ae7d6f5f 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignParameterPropertyToPropertyDeclarationES2022.json +++ b/crates/swc_ecma_parser/tests/tsc/assignParameterPropertyToPropertyDeclarationES2022.json @@ -482,7 +482,7 @@ "type": "Identifier", "span": { "start": 315, - "end": 326, + "end": 318, "ctxt": 0 }, "value": "foo", @@ -1052,7 +1052,7 @@ "type": "Identifier", "span": { "start": 620, - "end": 632, + "end": 624, "ctxt": 0 }, "value": "foo2", @@ -1430,7 +1430,7 @@ "type": "Identifier", "span": { "start": 810, - "end": 820, + "end": 812, "ctxt": 0 }, "value": "p1", @@ -1527,7 +1527,7 @@ "type": "Identifier", "span": { "start": 860, - "end": 865, + "end": 862, "ctxt": 0 }, "value": "p1", diff --git a/crates/swc_ecma_parser/tests/tsc/assignParameterPropertyToPropertyDeclarationESNext.json b/crates/swc_ecma_parser/tests/tsc/assignParameterPropertyToPropertyDeclarationESNext.json index 38bb3bd7ced8..5137ae7d6f5f 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignParameterPropertyToPropertyDeclarationESNext.json +++ b/crates/swc_ecma_parser/tests/tsc/assignParameterPropertyToPropertyDeclarationESNext.json @@ -482,7 +482,7 @@ "type": "Identifier", "span": { "start": 315, - "end": 326, + "end": 318, "ctxt": 0 }, "value": "foo", @@ -1052,7 +1052,7 @@ "type": "Identifier", "span": { "start": 620, - "end": 632, + "end": 624, "ctxt": 0 }, "value": "foo2", @@ -1430,7 +1430,7 @@ "type": "Identifier", "span": { "start": 810, - "end": 820, + "end": 812, "ctxt": 0 }, "value": "p1", @@ -1527,7 +1527,7 @@ "type": "Identifier", "span": { "start": 860, - "end": 865, + "end": 862, "ctxt": 0 }, "value": "p1", diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures.json index 6534faffadb9..e49729d57aab 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures.json @@ -46,7 +46,7 @@ "type": "Identifier", "span": { "start": 130, - "end": 139, + "end": 131, "ctxt": 0 }, "value": "x", @@ -204,7 +204,7 @@ "type": "Identifier", "span": { "start": 170, - "end": 179, + "end": 171, "ctxt": 0 }, "value": "x", @@ -372,7 +372,7 @@ "type": "Identifier", "span": { "start": 225, - "end": 234, + "end": 226, "ctxt": 0 }, "value": "x", @@ -530,7 +530,7 @@ "type": "Identifier", "span": { "start": 268, - "end": 277, + "end": 269, "ctxt": 0 }, "value": "x", @@ -948,7 +948,7 @@ "type": "Identifier", "span": { "start": 368, - "end": 377, + "end": 369, "ctxt": 0 }, "value": "x", @@ -1228,7 +1228,7 @@ "type": "Identifier", "span": { "start": 441, - "end": 450, + "end": 442, "ctxt": 0 }, "value": "x", @@ -1334,7 +1334,7 @@ "type": "Identifier", "span": { "start": 488, - "end": 497, + "end": 489, "ctxt": 0 }, "value": "x", @@ -1492,7 +1492,7 @@ "type": "Identifier", "span": { "start": 531, - "end": 540, + "end": 532, "ctxt": 0 }, "value": "x", @@ -1741,7 +1741,7 @@ "type": "Identifier", "span": { "start": 623, - "end": 632, + "end": 624, "ctxt": 0 }, "value": "x", @@ -2004,7 +2004,7 @@ "type": "Identifier", "span": { "start": 701, - "end": 710, + "end": 702, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures2.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures2.json index 264a41831593..5748c5fe5843 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures2.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures2.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 131, - "end": 140, + "end": 132, "ctxt": 0 }, "value": "x", @@ -230,7 +230,7 @@ "type": "Identifier", "span": { "start": 172, - "end": 181, + "end": 173, "ctxt": 0 }, "value": "x", @@ -411,7 +411,7 @@ "type": "Identifier", "span": { "start": 228, - "end": 237, + "end": 229, "ctxt": 0 }, "value": "x", @@ -582,7 +582,7 @@ "type": "Identifier", "span": { "start": 272, - "end": 281, + "end": 273, "ctxt": 0 }, "value": "x", @@ -1166,7 +1166,7 @@ "type": "Identifier", "span": { "start": 417, - "end": 426, + "end": 418, "ctxt": 0 }, "value": "x", @@ -1514,7 +1514,7 @@ "type": "Identifier", "span": { "start": 510, - "end": 519, + "end": 511, "ctxt": 0 }, "value": "x", @@ -1676,7 +1676,7 @@ "type": "Identifier", "span": { "start": 576, - "end": 585, + "end": 577, "ctxt": 0 }, "value": "x", @@ -1835,7 +1835,7 @@ "type": "Identifier", "span": { "start": 629, - "end": 638, + "end": 630, "ctxt": 0 }, "value": "x", @@ -1954,7 +1954,7 @@ "type": "Identifier", "span": { "start": 677, - "end": 686, + "end": 678, "ctxt": 0 }, "value": "x", @@ -2125,7 +2125,7 @@ "type": "Identifier", "span": { "start": 721, - "end": 730, + "end": 722, "ctxt": 0 }, "value": "x", @@ -2374,7 +2374,7 @@ "type": "Identifier", "span": { "start": 813, - "end": 822, + "end": 814, "ctxt": 0 }, "value": "x", @@ -2637,7 +2637,7 @@ "type": "Identifier", "span": { "start": 891, - "end": 900, + "end": 892, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures3.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures3.json index fee6c9792b35..4566b03b966c 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures3.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures3.json @@ -366,7 +366,7 @@ "type": "Identifier", "span": { "start": 286, - "end": 295, + "end": 287, "ctxt": 0 }, "value": "x", @@ -469,7 +469,7 @@ "type": "Identifier", "span": { "start": 319, - "end": 328, + "end": 320, "ctxt": 0 }, "value": "x", @@ -572,7 +572,7 @@ "type": "Identifier", "span": { "start": 352, - "end": 361, + "end": 353, "ctxt": 0 }, "value": "x", @@ -667,7 +667,7 @@ "type": "Identifier", "span": { "start": 381, - "end": 390, + "end": 382, "ctxt": 0 }, "value": "x", @@ -694,7 +694,7 @@ "type": "Identifier", "span": { "start": 392, - "end": 401, + "end": 393, "ctxt": 0 }, "value": "y", @@ -789,7 +789,7 @@ "type": "Identifier", "span": { "start": 423, - "end": 449, + "end": 424, "ctxt": 0 }, "value": "x", @@ -813,7 +813,7 @@ "type": "Identifier", "span": { "start": 427, - "end": 438, + "end": 430, "ctxt": 0 }, "value": "arg", @@ -930,7 +930,7 @@ "type": "Identifier", "span": { "start": 471, - "end": 496, + "end": 472, "ctxt": 0 }, "value": "x", @@ -954,7 +954,7 @@ "type": "Identifier", "span": { "start": 475, - "end": 484, + "end": 478, "ctxt": 0 }, "value": "arg", @@ -1101,7 +1101,7 @@ "type": "Identifier", "span": { "start": 516, - "end": 541, + "end": 517, "ctxt": 0 }, "value": "x", @@ -1125,7 +1125,7 @@ "type": "Identifier", "span": { "start": 520, - "end": 529, + "end": 523, "ctxt": 0 }, "value": "arg", @@ -1211,7 +1211,7 @@ "type": "Identifier", "span": { "start": 547, - "end": 554, + "end": 548, "ctxt": 0 }, "value": "r", @@ -1328,7 +1328,7 @@ "type": "Identifier", "span": { "start": 577, - "end": 602, + "end": 578, "ctxt": 0 }, "value": "x", @@ -1352,7 +1352,7 @@ "type": "Identifier", "span": { "start": 581, - "end": 590, + "end": 584, "ctxt": 0 }, "value": "arg", @@ -1421,7 +1421,7 @@ "type": "Identifier", "span": { "start": 604, - "end": 630, + "end": 605, "ctxt": 0 }, "value": "y", @@ -1445,7 +1445,7 @@ "type": "Identifier", "span": { "start": 608, - "end": 618, + "end": 612, "ctxt": 0 }, "value": "arg2", @@ -1531,7 +1531,7 @@ "type": "Identifier", "span": { "start": 636, - "end": 643, + "end": 637, "ctxt": 0 }, "value": "r", @@ -1648,7 +1648,7 @@ "type": "Identifier", "span": { "start": 666, - "end": 691, + "end": 667, "ctxt": 0 }, "value": "x", @@ -1672,7 +1672,7 @@ "type": "Identifier", "span": { "start": 670, - "end": 679, + "end": 673, "ctxt": 0 }, "value": "arg", @@ -1741,7 +1741,7 @@ "type": "Identifier", "span": { "start": 693, - "end": 719, + "end": 694, "ctxt": 0 }, "value": "y", @@ -1765,7 +1765,7 @@ "type": "Identifier", "span": { "start": 697, - "end": 707, + "end": 701, "ctxt": 0 }, "value": "arg2", @@ -1851,7 +1851,7 @@ "type": "Identifier", "span": { "start": 725, - "end": 732, + "end": 726, "ctxt": 0 }, "value": "r", @@ -2105,7 +2105,7 @@ "type": "Identifier", "span": { "start": 795, - "end": 813, + "end": 796, "ctxt": 0 }, "value": "x", @@ -2174,7 +2174,7 @@ "type": "Identifier", "span": { "start": 815, - "end": 846, + "end": 816, "ctxt": 0 }, "value": "y", @@ -2362,7 +2362,7 @@ "type": "Identifier", "span": { "start": 867, - "end": 881, + "end": 868, "ctxt": 0 }, "value": "x", @@ -2427,7 +2427,7 @@ "type": "Identifier", "span": { "start": 883, - "end": 901, + "end": 884, "ctxt": 0 }, "value": "y", @@ -2598,7 +2598,7 @@ "type": "Identifier", "span": { "start": 932, - "end": 946, + "end": 933, "ctxt": 0 }, "value": "x", @@ -2663,7 +2663,7 @@ "type": "Identifier", "span": { "start": 948, - "end": 965, + "end": 949, "ctxt": 0 }, "value": "y", @@ -2834,7 +2834,7 @@ "type": "Identifier", "span": { "start": 996, - "end": 1023, + "end": 997, "ctxt": 0 }, "value": "x", @@ -3030,7 +3030,7 @@ "type": "Identifier", "span": { "start": 1052, - "end": 1061, + "end": 1053, "ctxt": 0 }, "value": "x", @@ -3093,7 +3093,7 @@ "type": "Identifier", "span": { "start": 1079, - "end": 1088, + "end": 1080, "ctxt": 0 }, "value": "x", @@ -3206,7 +3206,7 @@ "type": "Identifier", "span": { "start": 1138, - "end": 1142, + "end": 1139, "ctxt": 0 }, "value": "x", @@ -3329,7 +3329,7 @@ "type": "Identifier", "span": { "start": 1176, - "end": 1180, + "end": 1177, "ctxt": 0 }, "value": "x", @@ -3502,7 +3502,7 @@ "type": "Identifier", "span": { "start": 1211, - "end": 1235, + "end": 1212, "ctxt": 0 }, "value": "x", @@ -3526,7 +3526,7 @@ "type": "Identifier", "span": { "start": 1215, - "end": 1224, + "end": 1216, "ctxt": 0 }, "value": "a", @@ -3611,7 +3611,7 @@ "type": "Identifier", "span": { "start": 1253, - "end": 1277, + "end": 1254, "ctxt": 0 }, "value": "x", @@ -3635,7 +3635,7 @@ "type": "Identifier", "span": { "start": 1257, - "end": 1266, + "end": 1258, "ctxt": 0 }, "value": "a", @@ -3770,7 +3770,7 @@ "type": "Identifier", "span": { "start": 1309, - "end": 1377, + "end": 1310, "ctxt": 0 }, "value": "x", @@ -3802,7 +3802,7 @@ "type": "Identifier", "span": { "start": 1323, - "end": 1332, + "end": 1324, "ctxt": 0 }, "value": "a", @@ -3857,7 +3857,7 @@ "type": "Identifier", "span": { "start": 1352, - "end": 1361, + "end": 1353, "ctxt": 0 }, "value": "a", @@ -3944,7 +3944,7 @@ "type": "Identifier", "span": { "start": 1392, - "end": 1458, + "end": 1393, "ctxt": 0 }, "value": "x", @@ -3976,7 +3976,7 @@ "type": "Identifier", "span": { "start": 1406, - "end": 1416, + "end": 1407, "ctxt": 0 }, "value": "a", @@ -4031,7 +4031,7 @@ "type": "Identifier", "span": { "start": 1437, - "end": 1444, + "end": 1438, "ctxt": 0 }, "value": "a", @@ -4180,7 +4180,7 @@ "type": "Identifier", "span": { "start": 1482, - "end": 1486, + "end": 1483, "ctxt": 0 }, "value": "x", @@ -4411,7 +4411,7 @@ "type": "Identifier", "span": { "start": 1535, - "end": 1539, + "end": 1536, "ctxt": 0 }, "value": "x", @@ -4632,7 +4632,7 @@ "type": "Identifier", "span": { "start": 1598, - "end": 1602, + "end": 1599, "ctxt": 0 }, "value": "x", @@ -4855,7 +4855,7 @@ "type": "Identifier", "span": { "start": 1656, - "end": 1660, + "end": 1657, "ctxt": 0 }, "value": "x", @@ -4892,7 +4892,7 @@ "type": "Identifier", "span": { "start": 1662, - "end": 1666, + "end": 1663, "ctxt": 0 }, "value": "y", @@ -5138,7 +5138,7 @@ "type": "Identifier", "span": { "start": 1720, - "end": 1736, + "end": 1721, "ctxt": 0 }, "value": "x", @@ -5162,7 +5162,7 @@ "type": "Identifier", "span": { "start": 1724, - "end": 1730, + "end": 1727, "ctxt": 0 }, "value": "arg", @@ -5440,7 +5440,7 @@ "type": "Identifier", "span": { "start": 1819, - "end": 1835, + "end": 1820, "ctxt": 0 }, "value": "x", @@ -5464,7 +5464,7 @@ "type": "Identifier", "span": { "start": 1823, - "end": 1829, + "end": 1826, "ctxt": 0 }, "value": "arg", @@ -5778,7 +5778,7 @@ "type": "Identifier", "span": { "start": 1918, - "end": 1934, + "end": 1919, "ctxt": 0 }, "value": "x", @@ -5802,7 +5802,7 @@ "type": "Identifier", "span": { "start": 1922, - "end": 1928, + "end": 1925, "ctxt": 0 }, "value": "arg", @@ -5979,7 +5979,7 @@ "type": "Identifier", "span": { "start": 1940, - "end": 1944, + "end": 1941, "ctxt": 0 }, "value": "r", @@ -6172,7 +6172,7 @@ "type": "Identifier", "span": { "start": 2027, - "end": 2043, + "end": 2028, "ctxt": 0 }, "value": "x", @@ -6196,7 +6196,7 @@ "type": "Identifier", "span": { "start": 2031, - "end": 2037, + "end": 2034, "ctxt": 0 }, "value": "arg", @@ -6265,7 +6265,7 @@ "type": "Identifier", "span": { "start": 2045, - "end": 2062, + "end": 2046, "ctxt": 0 }, "value": "y", @@ -6289,7 +6289,7 @@ "type": "Identifier", "span": { "start": 2049, - "end": 2056, + "end": 2053, "ctxt": 0 }, "value": "arg2", @@ -6466,7 +6466,7 @@ "type": "Identifier", "span": { "start": 2068, - "end": 2072, + "end": 2069, "ctxt": 0 }, "value": "r", @@ -6659,7 +6659,7 @@ "type": "Identifier", "span": { "start": 2154, - "end": 2170, + "end": 2155, "ctxt": 0 }, "value": "x", @@ -6683,7 +6683,7 @@ "type": "Identifier", "span": { "start": 2158, - "end": 2164, + "end": 2161, "ctxt": 0 }, "value": "arg", @@ -6752,7 +6752,7 @@ "type": "Identifier", "span": { "start": 2172, - "end": 2217, + "end": 2173, "ctxt": 0 }, "value": "y", @@ -6776,7 +6776,7 @@ "type": "Identifier", "span": { "start": 2176, - "end": 2211, + "end": 2180, "ctxt": 0 }, "value": "arg2", @@ -7026,7 +7026,7 @@ "type": "Identifier", "span": { "start": 2223, - "end": 2227, + "end": 2224, "ctxt": 0 }, "value": "r", @@ -7482,7 +7482,7 @@ "type": "Identifier", "span": { "start": 2373, - "end": 2377, + "end": 2374, "ctxt": 0 }, "value": "x", @@ -7519,7 +7519,7 @@ "type": "Identifier", "span": { "start": 2379, - "end": 2383, + "end": 2380, "ctxt": 0 }, "value": "y", @@ -7760,7 +7760,7 @@ "type": "Identifier", "span": { "start": 2459, - "end": 2473, + "end": 2460, "ctxt": 0 }, "value": "x", @@ -7825,7 +7825,7 @@ "type": "Identifier", "span": { "start": 2475, - "end": 2479, + "end": 2476, "ctxt": 0 }, "value": "y", @@ -8122,7 +8122,7 @@ "type": "Identifier", "span": { "start": 2571, - "end": 2585, + "end": 2572, "ctxt": 0 }, "value": "x", @@ -8187,7 +8187,7 @@ "type": "Identifier", "span": { "start": 2587, - "end": 2591, + "end": 2588, "ctxt": 0 }, "value": "y", @@ -8456,7 +8456,7 @@ "type": "Identifier", "span": { "start": 2647, - "end": 2664, + "end": 2648, "ctxt": 0 }, "value": "x", @@ -8772,7 +8772,7 @@ "type": "Identifier", "span": { "start": 2720, - "end": 2724, + "end": 2721, "ctxt": 0 }, "value": "x", @@ -9003,7 +9003,7 @@ "type": "Identifier", "span": { "start": 2795, - "end": 2799, + "end": 2796, "ctxt": 0 }, "value": "x", @@ -9242,7 +9242,7 @@ "type": "Identifier", "span": { "start": 2861, - "end": 2875, + "end": 2862, "ctxt": 0 }, "value": "x", @@ -9266,7 +9266,7 @@ "type": "Identifier", "span": { "start": 2865, - "end": 2869, + "end": 2866, "ctxt": 0 }, "value": "a", @@ -9529,7 +9529,7 @@ "type": "Identifier", "span": { "start": 2938, - "end": 2952, + "end": 2939, "ctxt": 0 }, "value": "x", @@ -9553,7 +9553,7 @@ "type": "Identifier", "span": { "start": 2942, - "end": 2946, + "end": 2943, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures4.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures4.json index 969d7bf01c01..53a998b93939 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures4.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures4.json @@ -420,7 +420,7 @@ "type": "Identifier", "span": { "start": 417, - "end": 426, + "end": 418, "ctxt": 0 }, "value": "x", @@ -523,7 +523,7 @@ "type": "Identifier", "span": { "start": 458, - "end": 483, + "end": 459, "ctxt": 0 }, "value": "x", @@ -547,7 +547,7 @@ "type": "Identifier", "span": { "start": 462, - "end": 471, + "end": 465, "ctxt": 0 }, "value": "arg", @@ -633,7 +633,7 @@ "type": "Identifier", "span": { "start": 489, - "end": 496, + "end": 490, "ctxt": 0 }, "value": "r", @@ -750,7 +750,7 @@ "type": "Identifier", "span": { "start": 528, - "end": 553, + "end": 529, "ctxt": 0 }, "value": "x", @@ -774,7 +774,7 @@ "type": "Identifier", "span": { "start": 532, - "end": 541, + "end": 535, "ctxt": 0 }, "value": "arg", @@ -843,7 +843,7 @@ "type": "Identifier", "span": { "start": 555, - "end": 581, + "end": 556, "ctxt": 0 }, "value": "y", @@ -867,7 +867,7 @@ "type": "Identifier", "span": { "start": 559, - "end": 569, + "end": 563, "ctxt": 0 }, "value": "arg2", @@ -953,7 +953,7 @@ "type": "Identifier", "span": { "start": 587, - "end": 594, + "end": 588, "ctxt": 0 }, "value": "r", @@ -1207,7 +1207,7 @@ "type": "Identifier", "span": { "start": 667, - "end": 685, + "end": 668, "ctxt": 0 }, "value": "x", @@ -1276,7 +1276,7 @@ "type": "Identifier", "span": { "start": 687, - "end": 718, + "end": 688, "ctxt": 0 }, "value": "y", @@ -1464,7 +1464,7 @@ "type": "Identifier", "span": { "start": 747, - "end": 761, + "end": 748, "ctxt": 0 }, "value": "x", @@ -1529,7 +1529,7 @@ "type": "Identifier", "span": { "start": 763, - "end": 781, + "end": 764, "ctxt": 0 }, "value": "y", @@ -1708,7 +1708,7 @@ "type": "Identifier", "span": { "start": 838, - "end": 847, + "end": 839, "ctxt": 0 }, "value": "x", @@ -1771,7 +1771,7 @@ "type": "Identifier", "span": { "start": 877, - "end": 886, + "end": 878, "ctxt": 0 }, "value": "x", @@ -1876,7 +1876,7 @@ "type": "Identifier", "span": { "start": 932, - "end": 959, + "end": 933, "ctxt": 0 }, "value": "x", @@ -2062,7 +2062,7 @@ "type": "Identifier", "span": { "start": 1008, - "end": 1113, + "end": 1009, "ctxt": 0 }, "value": "x", @@ -2094,7 +2094,7 @@ "type": "Identifier", "span": { "start": 1034, - "end": 1043, + "end": 1035, "ctxt": 0 }, "value": "a", @@ -2149,7 +2149,7 @@ "type": "Identifier", "span": { "start": 1075, - "end": 1085, + "end": 1076, "ctxt": 0 }, "value": "a", @@ -2236,7 +2236,7 @@ "type": "Identifier", "span": { "start": 1143, - "end": 1252, + "end": 1144, "ctxt": 0 }, "value": "x", @@ -2268,7 +2268,7 @@ "type": "Identifier", "span": { "start": 1169, - "end": 1179, + "end": 1170, "ctxt": 0 }, "value": "a", @@ -2323,7 +2323,7 @@ "type": "Identifier", "span": { "start": 1212, - "end": 1223, + "end": 1213, "ctxt": 0 }, "value": "a", @@ -2460,7 +2460,7 @@ "type": "Identifier", "span": { "start": 1317, - "end": 1436, + "end": 1318, "ctxt": 0 }, "value": "x", @@ -2492,7 +2492,7 @@ "type": "Identifier", "span": { "start": 1362, - "end": 1366, + "end": 1363, "ctxt": 0 }, "value": "a", @@ -2617,7 +2617,7 @@ "type": "Identifier", "span": { "start": 1409, - "end": 1413, + "end": 1410, "ctxt": 0 }, "value": "a", @@ -2774,7 +2774,7 @@ "type": "Identifier", "span": { "start": 1463, - "end": 1583, + "end": 1464, "ctxt": 0 }, "value": "x", @@ -2806,7 +2806,7 @@ "type": "Identifier", "span": { "start": 1509, - "end": 1513, + "end": 1510, "ctxt": 0 }, "value": "a", @@ -2931,7 +2931,7 @@ "type": "Identifier", "span": { "start": 1556, - "end": 1560, + "end": 1557, "ctxt": 0 }, "value": "a", @@ -3130,7 +3130,7 @@ "type": "Identifier", "span": { "start": 1632, - "end": 1636, + "end": 1633, "ctxt": 0 }, "value": "x", @@ -3384,7 +3384,7 @@ "type": "Identifier", "span": { "start": 1754, - "end": 1770, + "end": 1755, "ctxt": 0 }, "value": "x", @@ -3408,7 +3408,7 @@ "type": "Identifier", "span": { "start": 1758, - "end": 1764, + "end": 1761, "ctxt": 0 }, "value": "arg", @@ -3626,7 +3626,7 @@ "type": "Identifier", "span": { "start": 1776, - "end": 1780, + "end": 1777, "ctxt": 0 }, "value": "r", @@ -3819,7 +3819,7 @@ "type": "Identifier", "span": { "start": 1875, - "end": 1891, + "end": 1876, "ctxt": 0 }, "value": "x", @@ -3843,7 +3843,7 @@ "type": "Identifier", "span": { "start": 1879, - "end": 1885, + "end": 1882, "ctxt": 0 }, "value": "arg", @@ -3912,7 +3912,7 @@ "type": "Identifier", "span": { "start": 1893, - "end": 1925, + "end": 1894, "ctxt": 0 }, "value": "y", @@ -3936,7 +3936,7 @@ "type": "Identifier", "span": { "start": 1897, - "end": 1919, + "end": 1901, "ctxt": 0 }, "value": "arg2", @@ -4145,7 +4145,7 @@ "type": "Identifier", "span": { "start": 1931, - "end": 1935, + "end": 1932, "ctxt": 0 }, "value": "r", @@ -4601,7 +4601,7 @@ "type": "Identifier", "span": { "start": 2223, - "end": 2227, + "end": 2224, "ctxt": 0 }, "value": "x", @@ -4638,7 +4638,7 @@ "type": "Identifier", "span": { "start": 2229, - "end": 2233, + "end": 2230, "ctxt": 0 }, "value": "y", @@ -4879,7 +4879,7 @@ "type": "Identifier", "span": { "start": 2326, - "end": 2340, + "end": 2327, "ctxt": 0 }, "value": "x", @@ -4944,7 +4944,7 @@ "type": "Identifier", "span": { "start": 2342, - "end": 2356, + "end": 2343, "ctxt": 0 }, "value": "y", @@ -5241,7 +5241,7 @@ "type": "Identifier", "span": { "start": 2425, - "end": 2442, + "end": 2426, "ctxt": 0 }, "value": "x", @@ -5557,7 +5557,7 @@ "type": "Identifier", "span": { "start": 2525, - "end": 2542, + "end": 2526, "ctxt": 0 }, "value": "x", @@ -5881,7 +5881,7 @@ "type": "Identifier", "span": { "start": 2618, - "end": 2632, + "end": 2619, "ctxt": 0 }, "value": "x", @@ -5905,7 +5905,7 @@ "type": "Identifier", "span": { "start": 2622, - "end": 2626, + "end": 2623, "ctxt": 0 }, "value": "a", @@ -6168,7 +6168,7 @@ "type": "Identifier", "span": { "start": 2702, - "end": 2716, + "end": 2703, "ctxt": 0 }, "value": "x", @@ -6192,7 +6192,7 @@ "type": "Identifier", "span": { "start": 2706, - "end": 2710, + "end": 2707, "ctxt": 0 }, "value": "a", @@ -6475,7 +6475,7 @@ "type": "Identifier", "span": { "start": 2888, - "end": 2892, + "end": 2889, "ctxt": 0 }, "value": "x", @@ -6630,7 +6630,7 @@ "type": "Identifier", "span": { "start": 2922, - "end": 2926, + "end": 2923, "ctxt": 0 }, "value": "x", @@ -6851,7 +6851,7 @@ "type": "Identifier", "span": { "start": 3046, - "end": 3050, + "end": 3047, "ctxt": 0 }, "value": "x", @@ -6996,7 +6996,7 @@ "type": "Identifier", "span": { "start": 3085, - "end": 3089, + "end": 3086, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures5.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures5.json index c1333045fd68..055890518ebf 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures5.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures5.json @@ -366,7 +366,7 @@ "type": "Identifier", "span": { "start": 257, - "end": 261, + "end": 258, "ctxt": 0 }, "value": "x", @@ -521,7 +521,7 @@ "type": "Identifier", "span": { "start": 283, - "end": 287, + "end": 284, "ctxt": 0 }, "value": "x", @@ -666,7 +666,7 @@ "type": "Identifier", "span": { "start": 314, - "end": 318, + "end": 315, "ctxt": 0 }, "value": "x", @@ -803,7 +803,7 @@ "type": "Identifier", "span": { "start": 343, - "end": 347, + "end": 344, "ctxt": 0 }, "value": "x", @@ -840,7 +840,7 @@ "type": "Identifier", "span": { "start": 349, - "end": 353, + "end": 350, "ctxt": 0 }, "value": "y", @@ -1000,7 +1000,7 @@ "type": "Identifier", "span": { "start": 380, - "end": 396, + "end": 381, "ctxt": 0 }, "value": "x", @@ -1024,7 +1024,7 @@ "type": "Identifier", "span": { "start": 384, - "end": 390, + "end": 387, "ctxt": 0 }, "value": "arg", @@ -1226,7 +1226,7 @@ "type": "Identifier", "span": { "start": 429, - "end": 451, + "end": 430, "ctxt": 0 }, "value": "x", @@ -1250,7 +1250,7 @@ "type": "Identifier", "span": { "start": 433, - "end": 439, + "end": 436, "ctxt": 0 }, "value": "arg", @@ -1447,7 +1447,7 @@ "type": "Identifier", "span": { "start": 472, - "end": 485, + "end": 473, "ctxt": 0 }, "value": "x", @@ -1526,7 +1526,7 @@ "type": "Identifier", "span": { "start": 487, - "end": 508, + "end": 488, "ctxt": 0 }, "value": "y", @@ -1766,7 +1766,7 @@ "type": "Identifier", "span": { "start": 532, - "end": 549, + "end": 533, "ctxt": 0 }, "value": "x", @@ -2014,7 +2014,7 @@ "type": "Identifier", "span": { "start": 585, - "end": 602, + "end": 586, "ctxt": 0 }, "value": "x", @@ -2288,7 +2288,7 @@ "type": "Identifier", "span": { "start": 647, - "end": 661, + "end": 648, "ctxt": 0 }, "value": "x", @@ -2312,7 +2312,7 @@ "type": "Identifier", "span": { "start": 651, - "end": 655, + "end": 652, "ctxt": 0 }, "value": "a", @@ -2477,7 +2477,7 @@ "type": "Identifier", "span": { "start": 690, - "end": 704, + "end": 691, "ctxt": 0 }, "value": "x", @@ -2501,7 +2501,7 @@ "type": "Identifier", "span": { "start": 694, - "end": 698, + "end": 695, "ctxt": 0 }, "value": "a", @@ -2716,7 +2716,7 @@ "type": "Identifier", "span": { "start": 739, - "end": 822, + "end": 740, "ctxt": 0 }, "value": "x", @@ -2748,7 +2748,7 @@ "type": "Identifier", "span": { "start": 772, - "end": 776, + "end": 773, "ctxt": 0 }, "value": "a", @@ -2873,7 +2873,7 @@ "type": "Identifier", "span": { "start": 807, - "end": 811, + "end": 808, "ctxt": 0 }, "value": "a", @@ -3030,7 +3030,7 @@ "type": "Identifier", "span": { "start": 837, - "end": 921, + "end": 838, "ctxt": 0 }, "value": "x", @@ -3062,7 +3062,7 @@ "type": "Identifier", "span": { "start": 871, - "end": 875, + "end": 872, "ctxt": 0 }, "value": "a", @@ -3187,7 +3187,7 @@ "type": "Identifier", "span": { "start": 906, - "end": 910, + "end": 907, "ctxt": 0 }, "value": "a", @@ -3386,7 +3386,7 @@ "type": "Identifier", "span": { "start": 946, - "end": 950, + "end": 947, "ctxt": 0 }, "value": "x", @@ -3617,7 +3617,7 @@ "type": "Identifier", "span": { "start": 999, - "end": 1003, + "end": 1000, "ctxt": 0 }, "value": "x", @@ -3838,7 +3838,7 @@ "type": "Identifier", "span": { "start": 1061, - "end": 1065, + "end": 1062, "ctxt": 0 }, "value": "x", @@ -4061,7 +4061,7 @@ "type": "Identifier", "span": { "start": 1119, - "end": 1123, + "end": 1120, "ctxt": 0 }, "value": "x", @@ -4098,7 +4098,7 @@ "type": "Identifier", "span": { "start": 1125, - "end": 1129, + "end": 1126, "ctxt": 0 }, "value": "y", @@ -4334,7 +4334,7 @@ "type": "Identifier", "span": { "start": 1188, - "end": 1204, + "end": 1189, "ctxt": 0 }, "value": "x", @@ -4358,7 +4358,7 @@ "type": "Identifier", "span": { "start": 1192, - "end": 1198, + "end": 1195, "ctxt": 0 }, "value": "arg", @@ -4636,7 +4636,7 @@ "type": "Identifier", "span": { "start": 1287, - "end": 1303, + "end": 1288, "ctxt": 0 }, "value": "x", @@ -4660,7 +4660,7 @@ "type": "Identifier", "span": { "start": 1291, - "end": 1297, + "end": 1294, "ctxt": 0 }, "value": "arg", @@ -4974,7 +4974,7 @@ "type": "Identifier", "span": { "start": 1358, - "end": 1371, + "end": 1359, "ctxt": 0 }, "value": "x", @@ -5053,7 +5053,7 @@ "type": "Identifier", "span": { "start": 1373, - "end": 1394, + "end": 1374, "ctxt": 0 }, "value": "y", @@ -5392,7 +5392,7 @@ "type": "Identifier", "span": { "start": 1456, - "end": 1474, + "end": 1457, "ctxt": 0 }, "value": "x", @@ -5739,7 +5739,7 @@ "type": "Identifier", "span": { "start": 1546, - "end": 1563, + "end": 1547, "ctxt": 0 }, "value": "x", @@ -6063,7 +6063,7 @@ "type": "Identifier", "span": { "start": 1621, - "end": 1635, + "end": 1622, "ctxt": 0 }, "value": "x", @@ -6087,7 +6087,7 @@ "type": "Identifier", "span": { "start": 1625, - "end": 1629, + "end": 1626, "ctxt": 0 }, "value": "a", @@ -6350,7 +6350,7 @@ "type": "Identifier", "span": { "start": 1690, - "end": 1707, + "end": 1691, "ctxt": 0 }, "value": "x", @@ -6374,7 +6374,7 @@ "type": "Identifier", "span": { "start": 1697, - "end": 1701, + "end": 1698, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures6.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures6.json index 75d6246a8e10..0ebaf5f19129 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures6.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures6.json @@ -390,7 +390,7 @@ "type": "Identifier", "span": { "start": 275, - "end": 279, + "end": 276, "ctxt": 0 }, "value": "x", @@ -537,7 +537,7 @@ "type": "Identifier", "span": { "start": 301, - "end": 305, + "end": 302, "ctxt": 0 }, "value": "x", @@ -674,7 +674,7 @@ "type": "Identifier", "span": { "start": 332, - "end": 336, + "end": 333, "ctxt": 0 }, "value": "x", @@ -803,7 +803,7 @@ "type": "Identifier", "span": { "start": 361, - "end": 365, + "end": 362, "ctxt": 0 }, "value": "x", @@ -840,7 +840,7 @@ "type": "Identifier", "span": { "start": 367, - "end": 371, + "end": 368, "ctxt": 0 }, "value": "y", @@ -992,7 +992,7 @@ "type": "Identifier", "span": { "start": 398, - "end": 414, + "end": 399, "ctxt": 0 }, "value": "x", @@ -1016,7 +1016,7 @@ "type": "Identifier", "span": { "start": 402, - "end": 408, + "end": 405, "ctxt": 0 }, "value": "arg", @@ -1210,7 +1210,7 @@ "type": "Identifier", "span": { "start": 447, - "end": 469, + "end": 448, "ctxt": 0 }, "value": "x", @@ -1234,7 +1234,7 @@ "type": "Identifier", "span": { "start": 451, - "end": 457, + "end": 454, "ctxt": 0 }, "value": "arg", @@ -1423,7 +1423,7 @@ "type": "Identifier", "span": { "start": 490, - "end": 503, + "end": 491, "ctxt": 0 }, "value": "x", @@ -1502,7 +1502,7 @@ "type": "Identifier", "span": { "start": 505, - "end": 526, + "end": 506, "ctxt": 0 }, "value": "y", @@ -1734,7 +1734,7 @@ "type": "Identifier", "span": { "start": 550, - "end": 567, + "end": 551, "ctxt": 0 }, "value": "x", @@ -1974,7 +1974,7 @@ "type": "Identifier", "span": { "start": 603, - "end": 620, + "end": 604, "ctxt": 0 }, "value": "x", @@ -2298,7 +2298,7 @@ "type": "Identifier", "span": { "start": 655, - "end": 659, + "end": 656, "ctxt": 0 }, "value": "x", @@ -2564,7 +2564,7 @@ "type": "Identifier", "span": { "start": 700, - "end": 704, + "end": 701, "ctxt": 0 }, "value": "x", @@ -2820,7 +2820,7 @@ "type": "Identifier", "span": { "start": 754, - "end": 758, + "end": 755, "ctxt": 0 }, "value": "x", @@ -3078,7 +3078,7 @@ "type": "Identifier", "span": { "start": 803, - "end": 807, + "end": 804, "ctxt": 0 }, "value": "x", @@ -3115,7 +3115,7 @@ "type": "Identifier", "span": { "start": 809, - "end": 813, + "end": 810, "ctxt": 0 }, "value": "y", @@ -3386,7 +3386,7 @@ "type": "Identifier", "span": { "start": 864, - "end": 880, + "end": 865, "ctxt": 0 }, "value": "x", @@ -3410,7 +3410,7 @@ "type": "Identifier", "span": { "start": 868, - "end": 874, + "end": 871, "ctxt": 0 }, "value": "arg", @@ -3723,7 +3723,7 @@ "type": "Identifier", "span": { "start": 927, - "end": 940, + "end": 928, "ctxt": 0 }, "value": "x", @@ -3802,7 +3802,7 @@ "type": "Identifier", "span": { "start": 942, - "end": 963, + "end": 943, "ctxt": 0 }, "value": "y", @@ -4176,7 +4176,7 @@ "type": "Identifier", "span": { "start": 1014, - "end": 1031, + "end": 1015, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignaturesWithOptionalParameters.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignaturesWithOptionalParameters.json index 44db37006dc5..32b69c8a6232 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignaturesWithOptionalParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignaturesWithOptionalParameters.json @@ -134,7 +134,7 @@ "type": "Identifier", "span": { "start": 151, - "end": 161, + "end": 152, "ctxt": 0 }, "value": "x", @@ -221,7 +221,7 @@ "type": "Identifier", "span": { "start": 183, - "end": 192, + "end": 184, "ctxt": 0 }, "value": "x", @@ -308,7 +308,7 @@ "type": "Identifier", "span": { "start": 214, - "end": 223, + "end": 215, "ctxt": 0 }, "value": "x", @@ -335,7 +335,7 @@ "type": "Identifier", "span": { "start": 225, - "end": 235, + "end": 226, "ctxt": 0 }, "value": "y", @@ -422,7 +422,7 @@ "type": "Identifier", "span": { "start": 257, - "end": 267, + "end": 258, "ctxt": 0 }, "value": "x", @@ -449,7 +449,7 @@ "type": "Identifier", "span": { "start": 269, - "end": 279, + "end": 270, "ctxt": 0 }, "value": "y", @@ -536,7 +536,7 @@ "type": "Identifier", "span": { "start": 301, - "end": 310, + "end": 302, "ctxt": 0 }, "value": "x", @@ -563,7 +563,7 @@ "type": "Identifier", "span": { "start": 312, - "end": 321, + "end": 313, "ctxt": 0 }, "value": "y", @@ -1328,7 +1328,7 @@ "type": "Identifier", "span": { "start": 689, - "end": 699, + "end": 690, "ctxt": 0 }, "value": "x", @@ -1968,7 +1968,7 @@ "type": "Identifier", "span": { "start": 1088, - "end": 1097, + "end": 1089, "ctxt": 0 }, "value": "x", @@ -2714,7 +2714,7 @@ "type": "Identifier", "span": { "start": 1492, - "end": 1501, + "end": 1493, "ctxt": 0 }, "value": "x", @@ -2741,7 +2741,7 @@ "type": "Identifier", "span": { "start": 1503, - "end": 1513, + "end": 1504, "ctxt": 0 }, "value": "y", @@ -3514,7 +3514,7 @@ "type": "Identifier", "span": { "start": 1932, - "end": 1942, + "end": 1933, "ctxt": 0 }, "value": "x", @@ -3541,7 +3541,7 @@ "type": "Identifier", "span": { "start": 1944, - "end": 1954, + "end": 1945, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignaturesWithRestParameters.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignaturesWithRestParameters.json index 740520726e5e..f210360feabf 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignaturesWithRestParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignaturesWithRestParameters.json @@ -184,7 +184,7 @@ "type": "Identifier", "span": { "start": 180, - "end": 189, + "end": 181, "ctxt": 0 }, "value": "x", @@ -320,7 +320,7 @@ "type": "Identifier", "span": { "start": 227, - "end": 236, + "end": 228, "ctxt": 0 }, "value": "x", @@ -347,7 +347,7 @@ "type": "Identifier", "span": { "start": 238, - "end": 248, + "end": 239, "ctxt": 0 }, "value": "y", @@ -483,7 +483,7 @@ "type": "Identifier", "span": { "start": 286, - "end": 296, + "end": 287, "ctxt": 0 }, "value": "x", @@ -510,7 +510,7 @@ "type": "Identifier", "span": { "start": 298, - "end": 308, + "end": 299, "ctxt": 0 }, "value": "y", @@ -1393,7 +1393,7 @@ "type": "Identifier", "span": { "start": 906, - "end": 915, + "end": 907, "ctxt": 0 }, "value": "x", @@ -2315,7 +2315,7 @@ "type": "Identifier", "span": { "start": 1524, - "end": 1533, + "end": 1525, "ctxt": 0 }, "value": "x", @@ -2342,7 +2342,7 @@ "type": "Identifier", "span": { "start": 1535, - "end": 1545, + "end": 1536, "ctxt": 0 }, "value": "y", @@ -3195,7 +3195,7 @@ "type": "Identifier", "span": { "start": 1999, - "end": 2009, + "end": 2000, "ctxt": 0 }, "value": "x", @@ -3222,7 +3222,7 @@ "type": "Identifier", "span": { "start": 2011, - "end": 2021, + "end": 2012, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures.json index b025861ff12a..8f54f01406ee 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures.json @@ -46,7 +46,7 @@ "type": "Identifier", "span": { "start": 134, - "end": 143, + "end": 135, "ctxt": 0 }, "value": "x", @@ -204,7 +204,7 @@ "type": "Identifier", "span": { "start": 178, - "end": 187, + "end": 179, "ctxt": 0 }, "value": "x", @@ -372,7 +372,7 @@ "type": "Identifier", "span": { "start": 237, - "end": 246, + "end": 238, "ctxt": 0 }, "value": "x", @@ -530,7 +530,7 @@ "type": "Identifier", "span": { "start": 284, - "end": 293, + "end": 285, "ctxt": 0 }, "value": "x", @@ -774,7 +774,7 @@ "type": "Identifier", "span": { "start": 357, - "end": 366, + "end": 358, "ctxt": 0 }, "value": "x", @@ -932,7 +932,7 @@ "type": "Identifier", "span": { "start": 400, - "end": 409, + "end": 401, "ctxt": 0 }, "value": "x", @@ -1181,7 +1181,7 @@ "type": "Identifier", "span": { "start": 492, - "end": 501, + "end": 493, "ctxt": 0 }, "value": "x", @@ -1444,7 +1444,7 @@ "type": "Identifier", "span": { "start": 570, - "end": 579, + "end": 571, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures2.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures2.json index 71ee797c306e..d3ffc457e74c 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures2.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures2.json @@ -75,7 +75,7 @@ "type": "Identifier", "span": { "start": 137, - "end": 146, + "end": 138, "ctxt": 0 }, "value": "x", @@ -266,7 +266,7 @@ "type": "Identifier", "span": { "start": 186, - "end": 195, + "end": 187, "ctxt": 0 }, "value": "x", @@ -467,7 +467,7 @@ "type": "Identifier", "span": { "start": 250, - "end": 259, + "end": 251, "ctxt": 0 }, "value": "x", @@ -658,7 +658,7 @@ "type": "Identifier", "span": { "start": 302, - "end": 311, + "end": 303, "ctxt": 0 }, "value": "x", @@ -959,7 +959,7 @@ "type": "Identifier", "span": { "start": 394, - "end": 403, + "end": 395, "ctxt": 0 }, "value": "x", @@ -1118,7 +1118,7 @@ "type": "Identifier", "span": { "start": 447, - "end": 456, + "end": 448, "ctxt": 0 }, "value": "x", @@ -1237,7 +1237,7 @@ "type": "Identifier", "span": { "start": 495, - "end": 504, + "end": 496, "ctxt": 0 }, "value": "x", @@ -1408,7 +1408,7 @@ "type": "Identifier", "span": { "start": 539, - "end": 548, + "end": 540, "ctxt": 0 }, "value": "x", @@ -1657,7 +1657,7 @@ "type": "Identifier", "span": { "start": 631, - "end": 640, + "end": 632, "ctxt": 0 }, "value": "x", @@ -1920,7 +1920,7 @@ "type": "Identifier", "span": { "start": 709, - "end": 718, + "end": 710, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures3.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures3.json index f561216196d1..dbf1eed9630b 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures3.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures3.json @@ -366,7 +366,7 @@ "type": "Identifier", "span": { "start": 276, - "end": 285, + "end": 277, "ctxt": 0 }, "value": "x", @@ -470,7 +470,7 @@ "type": "Identifier", "span": { "start": 313, - "end": 322, + "end": 314, "ctxt": 0 }, "value": "x", @@ -574,7 +574,7 @@ "type": "Identifier", "span": { "start": 350, - "end": 359, + "end": 351, "ctxt": 0 }, "value": "x", @@ -670,7 +670,7 @@ "type": "Identifier", "span": { "start": 383, - "end": 392, + "end": 384, "ctxt": 0 }, "value": "x", @@ -697,7 +697,7 @@ "type": "Identifier", "span": { "start": 394, - "end": 403, + "end": 395, "ctxt": 0 }, "value": "y", @@ -793,7 +793,7 @@ "type": "Identifier", "span": { "start": 429, - "end": 455, + "end": 430, "ctxt": 0 }, "value": "x", @@ -817,7 +817,7 @@ "type": "Identifier", "span": { "start": 433, - "end": 444, + "end": 436, "ctxt": 0 }, "value": "arg", @@ -935,7 +935,7 @@ "type": "Identifier", "span": { "start": 481, - "end": 506, + "end": 482, "ctxt": 0 }, "value": "x", @@ -959,7 +959,7 @@ "type": "Identifier", "span": { "start": 485, - "end": 494, + "end": 488, "ctxt": 0 }, "value": "arg", @@ -1107,7 +1107,7 @@ "type": "Identifier", "span": { "start": 530, - "end": 555, + "end": 531, "ctxt": 0 }, "value": "x", @@ -1131,7 +1131,7 @@ "type": "Identifier", "span": { "start": 534, - "end": 543, + "end": 537, "ctxt": 0 }, "value": "arg", @@ -1217,7 +1217,7 @@ "type": "Identifier", "span": { "start": 561, - "end": 568, + "end": 562, "ctxt": 0 }, "value": "r", @@ -1335,7 +1335,7 @@ "type": "Identifier", "span": { "start": 595, - "end": 620, + "end": 596, "ctxt": 0 }, "value": "x", @@ -1359,7 +1359,7 @@ "type": "Identifier", "span": { "start": 599, - "end": 608, + "end": 602, "ctxt": 0 }, "value": "arg", @@ -1428,7 +1428,7 @@ "type": "Identifier", "span": { "start": 622, - "end": 648, + "end": 623, "ctxt": 0 }, "value": "y", @@ -1452,7 +1452,7 @@ "type": "Identifier", "span": { "start": 626, - "end": 636, + "end": 630, "ctxt": 0 }, "value": "arg2", @@ -1538,7 +1538,7 @@ "type": "Identifier", "span": { "start": 654, - "end": 661, + "end": 655, "ctxt": 0 }, "value": "r", @@ -1656,7 +1656,7 @@ "type": "Identifier", "span": { "start": 688, - "end": 713, + "end": 689, "ctxt": 0 }, "value": "x", @@ -1680,7 +1680,7 @@ "type": "Identifier", "span": { "start": 692, - "end": 701, + "end": 695, "ctxt": 0 }, "value": "arg", @@ -1749,7 +1749,7 @@ "type": "Identifier", "span": { "start": 715, - "end": 741, + "end": 716, "ctxt": 0 }, "value": "y", @@ -1773,7 +1773,7 @@ "type": "Identifier", "span": { "start": 719, - "end": 729, + "end": 723, "ctxt": 0 }, "value": "arg2", @@ -1859,7 +1859,7 @@ "type": "Identifier", "span": { "start": 747, - "end": 754, + "end": 748, "ctxt": 0 }, "value": "r", @@ -2115,7 +2115,7 @@ "type": "Identifier", "span": { "start": 825, - "end": 843, + "end": 826, "ctxt": 0 }, "value": "x", @@ -2184,7 +2184,7 @@ "type": "Identifier", "span": { "start": 845, - "end": 876, + "end": 846, "ctxt": 0 }, "value": "y", @@ -2373,7 +2373,7 @@ "type": "Identifier", "span": { "start": 901, - "end": 915, + "end": 902, "ctxt": 0 }, "value": "x", @@ -2438,7 +2438,7 @@ "type": "Identifier", "span": { "start": 917, - "end": 935, + "end": 918, "ctxt": 0 }, "value": "y", @@ -2610,7 +2610,7 @@ "type": "Identifier", "span": { "start": 970, - "end": 984, + "end": 971, "ctxt": 0 }, "value": "x", @@ -2675,7 +2675,7 @@ "type": "Identifier", "span": { "start": 986, - "end": 1003, + "end": 987, "ctxt": 0 }, "value": "y", @@ -2847,7 +2847,7 @@ "type": "Identifier", "span": { "start": 1038, - "end": 1065, + "end": 1039, "ctxt": 0 }, "value": "x", @@ -3044,7 +3044,7 @@ "type": "Identifier", "span": { "start": 1098, - "end": 1107, + "end": 1099, "ctxt": 0 }, "value": "x", @@ -3107,7 +3107,7 @@ "type": "Identifier", "span": { "start": 1129, - "end": 1138, + "end": 1130, "ctxt": 0 }, "value": "x", @@ -3220,7 +3220,7 @@ "type": "Identifier", "span": { "start": 1192, - "end": 1196, + "end": 1193, "ctxt": 0 }, "value": "x", @@ -3343,7 +3343,7 @@ "type": "Identifier", "span": { "start": 1234, - "end": 1238, + "end": 1235, "ctxt": 0 }, "value": "x", @@ -3516,7 +3516,7 @@ "type": "Identifier", "span": { "start": 1273, - "end": 1301, + "end": 1274, "ctxt": 0 }, "value": "x", @@ -3540,7 +3540,7 @@ "type": "Identifier", "span": { "start": 1281, - "end": 1290, + "end": 1282, "ctxt": 0 }, "value": "a", @@ -3626,7 +3626,7 @@ "type": "Identifier", "span": { "start": 1323, - "end": 1351, + "end": 1324, "ctxt": 0 }, "value": "x", @@ -3650,7 +3650,7 @@ "type": "Identifier", "span": { "start": 1331, - "end": 1340, + "end": 1332, "ctxt": 0 }, "value": "a", @@ -3786,7 +3786,7 @@ "type": "Identifier", "span": { "start": 1387, - "end": 1463, + "end": 1388, "ctxt": 0 }, "value": "x", @@ -3818,7 +3818,7 @@ "type": "Identifier", "span": { "start": 1405, - "end": 1414, + "end": 1406, "ctxt": 0 }, "value": "a", @@ -3873,7 +3873,7 @@ "type": "Identifier", "span": { "start": 1438, - "end": 1447, + "end": 1439, "ctxt": 0 }, "value": "a", @@ -3960,7 +3960,7 @@ "type": "Identifier", "span": { "start": 1482, - "end": 1556, + "end": 1483, "ctxt": 0 }, "value": "x", @@ -3992,7 +3992,7 @@ "type": "Identifier", "span": { "start": 1500, - "end": 1510, + "end": 1501, "ctxt": 0 }, "value": "a", @@ -4047,7 +4047,7 @@ "type": "Identifier", "span": { "start": 1535, - "end": 1542, + "end": 1536, "ctxt": 0 }, "value": "a", @@ -4196,7 +4196,7 @@ "type": "Identifier", "span": { "start": 1584, - "end": 1588, + "end": 1585, "ctxt": 0 }, "value": "x", @@ -4428,7 +4428,7 @@ "type": "Identifier", "span": { "start": 1641, - "end": 1645, + "end": 1642, "ctxt": 0 }, "value": "x", @@ -4650,7 +4650,7 @@ "type": "Identifier", "span": { "start": 1708, - "end": 1712, + "end": 1709, "ctxt": 0 }, "value": "x", @@ -4874,7 +4874,7 @@ "type": "Identifier", "span": { "start": 1770, - "end": 1774, + "end": 1771, "ctxt": 0 }, "value": "x", @@ -4911,7 +4911,7 @@ "type": "Identifier", "span": { "start": 1776, - "end": 1780, + "end": 1777, "ctxt": 0 }, "value": "y", @@ -5158,7 +5158,7 @@ "type": "Identifier", "span": { "start": 1838, - "end": 1854, + "end": 1839, "ctxt": 0 }, "value": "x", @@ -5182,7 +5182,7 @@ "type": "Identifier", "span": { "start": 1842, - "end": 1848, + "end": 1845, "ctxt": 0 }, "value": "arg", @@ -5461,7 +5461,7 @@ "type": "Identifier", "span": { "start": 1941, - "end": 1957, + "end": 1942, "ctxt": 0 }, "value": "x", @@ -5485,7 +5485,7 @@ "type": "Identifier", "span": { "start": 1945, - "end": 1951, + "end": 1948, "ctxt": 0 }, "value": "arg", @@ -5800,7 +5800,7 @@ "type": "Identifier", "span": { "start": 2044, - "end": 2060, + "end": 2045, "ctxt": 0 }, "value": "x", @@ -5824,7 +5824,7 @@ "type": "Identifier", "span": { "start": 2048, - "end": 2054, + "end": 2051, "ctxt": 0 }, "value": "arg", @@ -6001,7 +6001,7 @@ "type": "Identifier", "span": { "start": 2066, - "end": 2070, + "end": 2067, "ctxt": 0 }, "value": "r", @@ -6195,7 +6195,7 @@ "type": "Identifier", "span": { "start": 2157, - "end": 2173, + "end": 2158, "ctxt": 0 }, "value": "x", @@ -6219,7 +6219,7 @@ "type": "Identifier", "span": { "start": 2161, - "end": 2167, + "end": 2164, "ctxt": 0 }, "value": "arg", @@ -6288,7 +6288,7 @@ "type": "Identifier", "span": { "start": 2175, - "end": 2192, + "end": 2176, "ctxt": 0 }, "value": "y", @@ -6312,7 +6312,7 @@ "type": "Identifier", "span": { "start": 2179, - "end": 2186, + "end": 2183, "ctxt": 0 }, "value": "arg2", @@ -6489,7 +6489,7 @@ "type": "Identifier", "span": { "start": 2198, - "end": 2202, + "end": 2199, "ctxt": 0 }, "value": "r", @@ -6683,7 +6683,7 @@ "type": "Identifier", "span": { "start": 2288, - "end": 2304, + "end": 2289, "ctxt": 0 }, "value": "x", @@ -6707,7 +6707,7 @@ "type": "Identifier", "span": { "start": 2292, - "end": 2298, + "end": 2295, "ctxt": 0 }, "value": "arg", @@ -6776,7 +6776,7 @@ "type": "Identifier", "span": { "start": 2306, - "end": 2351, + "end": 2307, "ctxt": 0 }, "value": "y", @@ -6800,7 +6800,7 @@ "type": "Identifier", "span": { "start": 2310, - "end": 2345, + "end": 2314, "ctxt": 0 }, "value": "arg2", @@ -7050,7 +7050,7 @@ "type": "Identifier", "span": { "start": 2357, - "end": 2361, + "end": 2358, "ctxt": 0 }, "value": "r", @@ -7508,7 +7508,7 @@ "type": "Identifier", "span": { "start": 2515, - "end": 2519, + "end": 2516, "ctxt": 0 }, "value": "x", @@ -7545,7 +7545,7 @@ "type": "Identifier", "span": { "start": 2521, - "end": 2525, + "end": 2522, "ctxt": 0 }, "value": "y", @@ -7787,7 +7787,7 @@ "type": "Identifier", "span": { "start": 2605, - "end": 2619, + "end": 2606, "ctxt": 0 }, "value": "x", @@ -7852,7 +7852,7 @@ "type": "Identifier", "span": { "start": 2621, - "end": 2625, + "end": 2622, "ctxt": 0 }, "value": "y", @@ -8150,7 +8150,7 @@ "type": "Identifier", "span": { "start": 2721, - "end": 2735, + "end": 2722, "ctxt": 0 }, "value": "x", @@ -8215,7 +8215,7 @@ "type": "Identifier", "span": { "start": 2737, - "end": 2741, + "end": 2738, "ctxt": 0 }, "value": "y", @@ -8485,7 +8485,7 @@ "type": "Identifier", "span": { "start": 2801, - "end": 2818, + "end": 2802, "ctxt": 0 }, "value": "x", @@ -8802,7 +8802,7 @@ "type": "Identifier", "span": { "start": 2878, - "end": 2882, + "end": 2879, "ctxt": 0 }, "value": "x", @@ -9034,7 +9034,7 @@ "type": "Identifier", "span": { "start": 2957, - "end": 2961, + "end": 2958, "ctxt": 0 }, "value": "x", @@ -9274,7 +9274,7 @@ "type": "Identifier", "span": { "start": 3027, - "end": 3045, + "end": 3028, "ctxt": 0 }, "value": "x", @@ -9298,7 +9298,7 @@ "type": "Identifier", "span": { "start": 3035, - "end": 3039, + "end": 3036, "ctxt": 0 }, "value": "a", @@ -9563,7 +9563,7 @@ "type": "Identifier", "span": { "start": 3112, - "end": 3130, + "end": 3113, "ctxt": 0 }, "value": "x", @@ -9587,7 +9587,7 @@ "type": "Identifier", "span": { "start": 3120, - "end": 3124, + "end": 3121, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures4.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures4.json index 808ccef46173..bad66a303b96 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures4.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures4.json @@ -420,7 +420,7 @@ "type": "Identifier", "span": { "start": 397, - "end": 406, + "end": 398, "ctxt": 0 }, "value": "x", @@ -524,7 +524,7 @@ "type": "Identifier", "span": { "start": 442, - "end": 467, + "end": 443, "ctxt": 0 }, "value": "x", @@ -548,7 +548,7 @@ "type": "Identifier", "span": { "start": 446, - "end": 455, + "end": 449, "ctxt": 0 }, "value": "arg", @@ -634,7 +634,7 @@ "type": "Identifier", "span": { "start": 473, - "end": 480, + "end": 474, "ctxt": 0 }, "value": "r", @@ -752,7 +752,7 @@ "type": "Identifier", "span": { "start": 516, - "end": 541, + "end": 517, "ctxt": 0 }, "value": "x", @@ -776,7 +776,7 @@ "type": "Identifier", "span": { "start": 520, - "end": 529, + "end": 523, "ctxt": 0 }, "value": "arg", @@ -845,7 +845,7 @@ "type": "Identifier", "span": { "start": 543, - "end": 569, + "end": 544, "ctxt": 0 }, "value": "y", @@ -869,7 +869,7 @@ "type": "Identifier", "span": { "start": 547, - "end": 557, + "end": 551, "ctxt": 0 }, "value": "arg2", @@ -955,7 +955,7 @@ "type": "Identifier", "span": { "start": 575, - "end": 582, + "end": 576, "ctxt": 0 }, "value": "r", @@ -1211,7 +1211,7 @@ "type": "Identifier", "span": { "start": 663, - "end": 681, + "end": 664, "ctxt": 0 }, "value": "x", @@ -1280,7 +1280,7 @@ "type": "Identifier", "span": { "start": 683, - "end": 714, + "end": 684, "ctxt": 0 }, "value": "y", @@ -1469,7 +1469,7 @@ "type": "Identifier", "span": { "start": 747, - "end": 761, + "end": 748, "ctxt": 0 }, "value": "x", @@ -1534,7 +1534,7 @@ "type": "Identifier", "span": { "start": 763, - "end": 781, + "end": 764, "ctxt": 0 }, "value": "y", @@ -1714,7 +1714,7 @@ "type": "Identifier", "span": { "start": 842, - "end": 851, + "end": 843, "ctxt": 0 }, "value": "x", @@ -1777,7 +1777,7 @@ "type": "Identifier", "span": { "start": 885, - "end": 894, + "end": 886, "ctxt": 0 }, "value": "x", @@ -1882,7 +1882,7 @@ "type": "Identifier", "span": { "start": 944, - "end": 971, + "end": 945, "ctxt": 0 }, "value": "x", @@ -2069,7 +2069,7 @@ "type": "Identifier", "span": { "start": 1024, - "end": 1137, + "end": 1025, "ctxt": 0 }, "value": "x", @@ -2101,7 +2101,7 @@ "type": "Identifier", "span": { "start": 1054, - "end": 1063, + "end": 1055, "ctxt": 0 }, "value": "a", @@ -2156,7 +2156,7 @@ "type": "Identifier", "span": { "start": 1099, - "end": 1109, + "end": 1100, "ctxt": 0 }, "value": "a", @@ -2243,7 +2243,7 @@ "type": "Identifier", "span": { "start": 1171, - "end": 1288, + "end": 1172, "ctxt": 0 }, "value": "x", @@ -2275,7 +2275,7 @@ "type": "Identifier", "span": { "start": 1201, - "end": 1211, + "end": 1202, "ctxt": 0 }, "value": "a", @@ -2330,7 +2330,7 @@ "type": "Identifier", "span": { "start": 1248, - "end": 1259, + "end": 1249, "ctxt": 0 }, "value": "a", @@ -2467,7 +2467,7 @@ "type": "Identifier", "span": { "start": 1357, - "end": 1484, + "end": 1358, "ctxt": 0 }, "value": "x", @@ -2499,7 +2499,7 @@ "type": "Identifier", "span": { "start": 1406, - "end": 1410, + "end": 1407, "ctxt": 0 }, "value": "a", @@ -2624,7 +2624,7 @@ "type": "Identifier", "span": { "start": 1457, - "end": 1461, + "end": 1458, "ctxt": 0 }, "value": "a", @@ -2781,7 +2781,7 @@ "type": "Identifier", "span": { "start": 1515, - "end": 1643, + "end": 1516, "ctxt": 0 }, "value": "x", @@ -2813,7 +2813,7 @@ "type": "Identifier", "span": { "start": 1565, - "end": 1569, + "end": 1566, "ctxt": 0 }, "value": "a", @@ -2938,7 +2938,7 @@ "type": "Identifier", "span": { "start": 1616, - "end": 1620, + "end": 1617, "ctxt": 0 }, "value": "a", @@ -3137,7 +3137,7 @@ "type": "Identifier", "span": { "start": 1696, - "end": 1700, + "end": 1697, "ctxt": 0 }, "value": "x", @@ -3392,7 +3392,7 @@ "type": "Identifier", "span": { "start": 1834, - "end": 1850, + "end": 1835, "ctxt": 0 }, "value": "x", @@ -3416,7 +3416,7 @@ "type": "Identifier", "span": { "start": 1838, - "end": 1844, + "end": 1841, "ctxt": 0 }, "value": "arg", @@ -3634,7 +3634,7 @@ "type": "Identifier", "span": { "start": 1856, - "end": 1860, + "end": 1857, "ctxt": 0 }, "value": "r", @@ -3828,7 +3828,7 @@ "type": "Identifier", "span": { "start": 1971, - "end": 1987, + "end": 1972, "ctxt": 0 }, "value": "x", @@ -3852,7 +3852,7 @@ "type": "Identifier", "span": { "start": 1975, - "end": 1981, + "end": 1978, "ctxt": 0 }, "value": "arg", @@ -3921,7 +3921,7 @@ "type": "Identifier", "span": { "start": 1989, - "end": 2021, + "end": 1990, "ctxt": 0 }, "value": "y", @@ -3945,7 +3945,7 @@ "type": "Identifier", "span": { "start": 1993, - "end": 2015, + "end": 1997, "ctxt": 0 }, "value": "arg2", @@ -4154,7 +4154,7 @@ "type": "Identifier", "span": { "start": 2027, - "end": 2031, + "end": 2028, "ctxt": 0 }, "value": "r", @@ -4612,7 +4612,7 @@ "type": "Identifier", "span": { "start": 2268, - "end": 2272, + "end": 2269, "ctxt": 0 }, "value": "x", @@ -4649,7 +4649,7 @@ "type": "Identifier", "span": { "start": 2274, - "end": 2278, + "end": 2275, "ctxt": 0 }, "value": "y", @@ -4891,7 +4891,7 @@ "type": "Identifier", "span": { "start": 2387, - "end": 2401, + "end": 2388, "ctxt": 0 }, "value": "x", @@ -4956,7 +4956,7 @@ "type": "Identifier", "span": { "start": 2403, - "end": 2417, + "end": 2404, "ctxt": 0 }, "value": "y", @@ -5254,7 +5254,7 @@ "type": "Identifier", "span": { "start": 2502, - "end": 2519, + "end": 2503, "ctxt": 0 }, "value": "x", @@ -5571,7 +5571,7 @@ "type": "Identifier", "span": { "start": 2618, - "end": 2635, + "end": 2619, "ctxt": 0 }, "value": "x", @@ -5896,7 +5896,7 @@ "type": "Identifier", "span": { "start": 2727, - "end": 2741, + "end": 2728, "ctxt": 0 }, "value": "x", @@ -5920,7 +5920,7 @@ "type": "Identifier", "span": { "start": 2731, - "end": 2735, + "end": 2732, "ctxt": 0 }, "value": "a", @@ -6184,7 +6184,7 @@ "type": "Identifier", "span": { "start": 2833, - "end": 2847, + "end": 2834, "ctxt": 0 }, "value": "x", @@ -6208,7 +6208,7 @@ "type": "Identifier", "span": { "start": 2837, - "end": 2841, + "end": 2838, "ctxt": 0 }, "value": "a", @@ -6492,7 +6492,7 @@ "type": "Identifier", "span": { "start": 3041, - "end": 3045, + "end": 3042, "ctxt": 0 }, "value": "x", @@ -6648,7 +6648,7 @@ "type": "Identifier", "span": { "start": 3079, - "end": 3083, + "end": 3080, "ctxt": 0 }, "value": "x", @@ -6870,7 +6870,7 @@ "type": "Identifier", "span": { "start": 3219, - "end": 3223, + "end": 3220, "ctxt": 0 }, "value": "x", @@ -7016,7 +7016,7 @@ "type": "Identifier", "span": { "start": 3262, - "end": 3266, + "end": 3263, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures5.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures5.json index 5b99bbc7b06f..33e2f6cf5d10 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures5.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures5.json @@ -366,7 +366,7 @@ "type": "Identifier", "span": { "start": 248, - "end": 252, + "end": 249, "ctxt": 0 }, "value": "x", @@ -522,7 +522,7 @@ "type": "Identifier", "span": { "start": 278, - "end": 282, + "end": 279, "ctxt": 0 }, "value": "x", @@ -668,7 +668,7 @@ "type": "Identifier", "span": { "start": 313, - "end": 317, + "end": 314, "ctxt": 0 }, "value": "x", @@ -806,7 +806,7 @@ "type": "Identifier", "span": { "start": 347, - "end": 351, + "end": 348, "ctxt": 0 }, "value": "x", @@ -843,7 +843,7 @@ "type": "Identifier", "span": { "start": 353, - "end": 357, + "end": 354, "ctxt": 0 }, "value": "y", @@ -1004,7 +1004,7 @@ "type": "Identifier", "span": { "start": 389, - "end": 409, + "end": 390, "ctxt": 0 }, "value": "x", @@ -1028,7 +1028,7 @@ "type": "Identifier", "span": { "start": 397, - "end": 403, + "end": 400, "ctxt": 0 }, "value": "arg", @@ -1232,7 +1232,7 @@ "type": "Identifier", "span": { "start": 446, - "end": 472, + "end": 447, "ctxt": 0 }, "value": "x", @@ -1256,7 +1256,7 @@ "type": "Identifier", "span": { "start": 454, - "end": 460, + "end": 457, "ctxt": 0 }, "value": "arg", @@ -1455,7 +1455,7 @@ "type": "Identifier", "span": { "start": 497, - "end": 510, + "end": 498, "ctxt": 0 }, "value": "x", @@ -1534,7 +1534,7 @@ "type": "Identifier", "span": { "start": 512, - "end": 533, + "end": 513, "ctxt": 0 }, "value": "y", @@ -1775,7 +1775,7 @@ "type": "Identifier", "span": { "start": 561, - "end": 578, + "end": 562, "ctxt": 0 }, "value": "x", @@ -2024,7 +2024,7 @@ "type": "Identifier", "span": { "start": 618, - "end": 635, + "end": 619, "ctxt": 0 }, "value": "x", @@ -2299,7 +2299,7 @@ "type": "Identifier", "span": { "start": 684, - "end": 702, + "end": 685, "ctxt": 0 }, "value": "x", @@ -2323,7 +2323,7 @@ "type": "Identifier", "span": { "start": 692, - "end": 696, + "end": 693, "ctxt": 0 }, "value": "a", @@ -2489,7 +2489,7 @@ "type": "Identifier", "span": { "start": 735, - "end": 753, + "end": 736, "ctxt": 0 }, "value": "x", @@ -2513,7 +2513,7 @@ "type": "Identifier", "span": { "start": 743, - "end": 747, + "end": 744, "ctxt": 0 }, "value": "a", @@ -2729,7 +2729,7 @@ "type": "Identifier", "span": { "start": 792, - "end": 883, + "end": 793, "ctxt": 0 }, "value": "x", @@ -2761,7 +2761,7 @@ "type": "Identifier", "span": { "start": 829, - "end": 833, + "end": 830, "ctxt": 0 }, "value": "a", @@ -2886,7 +2886,7 @@ "type": "Identifier", "span": { "start": 868, - "end": 872, + "end": 869, "ctxt": 0 }, "value": "a", @@ -3043,7 +3043,7 @@ "type": "Identifier", "span": { "start": 902, - "end": 994, + "end": 903, "ctxt": 0 }, "value": "x", @@ -3075,7 +3075,7 @@ "type": "Identifier", "span": { "start": 940, - "end": 944, + "end": 941, "ctxt": 0 }, "value": "a", @@ -3200,7 +3200,7 @@ "type": "Identifier", "span": { "start": 979, - "end": 983, + "end": 980, "ctxt": 0 }, "value": "a", @@ -3399,7 +3399,7 @@ "type": "Identifier", "span": { "start": 1023, - "end": 1027, + "end": 1024, "ctxt": 0 }, "value": "x", @@ -3631,7 +3631,7 @@ "type": "Identifier", "span": { "start": 1080, - "end": 1084, + "end": 1081, "ctxt": 0 }, "value": "x", @@ -3853,7 +3853,7 @@ "type": "Identifier", "span": { "start": 1146, - "end": 1150, + "end": 1147, "ctxt": 0 }, "value": "x", @@ -4077,7 +4077,7 @@ "type": "Identifier", "span": { "start": 1208, - "end": 1212, + "end": 1209, "ctxt": 0 }, "value": "x", @@ -4114,7 +4114,7 @@ "type": "Identifier", "span": { "start": 1214, - "end": 1218, + "end": 1215, "ctxt": 0 }, "value": "y", @@ -4351,7 +4351,7 @@ "type": "Identifier", "span": { "start": 1281, - "end": 1301, + "end": 1282, "ctxt": 0 }, "value": "x", @@ -4375,7 +4375,7 @@ "type": "Identifier", "span": { "start": 1289, - "end": 1295, + "end": 1292, "ctxt": 0 }, "value": "arg", @@ -4655,7 +4655,7 @@ "type": "Identifier", "span": { "start": 1388, - "end": 1408, + "end": 1389, "ctxt": 0 }, "value": "x", @@ -4679,7 +4679,7 @@ "type": "Identifier", "span": { "start": 1396, - "end": 1402, + "end": 1399, "ctxt": 0 }, "value": "arg", @@ -4995,7 +4995,7 @@ "type": "Identifier", "span": { "start": 1467, - "end": 1480, + "end": 1468, "ctxt": 0 }, "value": "x", @@ -5074,7 +5074,7 @@ "type": "Identifier", "span": { "start": 1482, - "end": 1503, + "end": 1483, "ctxt": 0 }, "value": "y", @@ -5414,7 +5414,7 @@ "type": "Identifier", "span": { "start": 1569, - "end": 1587, + "end": 1570, "ctxt": 0 }, "value": "x", @@ -5762,7 +5762,7 @@ "type": "Identifier", "span": { "start": 1649, - "end": 1666, + "end": 1650, "ctxt": 0 }, "value": "x", @@ -6087,7 +6087,7 @@ "type": "Identifier", "span": { "start": 1728, - "end": 1746, + "end": 1729, "ctxt": 0 }, "value": "x", @@ -6111,7 +6111,7 @@ "type": "Identifier", "span": { "start": 1736, - "end": 1740, + "end": 1737, "ctxt": 0 }, "value": "a", @@ -6376,7 +6376,7 @@ "type": "Identifier", "span": { "start": 1805, - "end": 1826, + "end": 1806, "ctxt": 0 }, "value": "x", @@ -6400,7 +6400,7 @@ "type": "Identifier", "span": { "start": 1816, - "end": 1820, + "end": 1817, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures6.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures6.json index b863e7b10a11..2bdd0c0aa04e 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures6.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures6.json @@ -390,7 +390,7 @@ "type": "Identifier", "span": { "start": 280, - "end": 284, + "end": 281, "ctxt": 0 }, "value": "x", @@ -538,7 +538,7 @@ "type": "Identifier", "span": { "start": 310, - "end": 314, + "end": 311, "ctxt": 0 }, "value": "x", @@ -676,7 +676,7 @@ "type": "Identifier", "span": { "start": 345, - "end": 349, + "end": 346, "ctxt": 0 }, "value": "x", @@ -806,7 +806,7 @@ "type": "Identifier", "span": { "start": 379, - "end": 383, + "end": 380, "ctxt": 0 }, "value": "x", @@ -843,7 +843,7 @@ "type": "Identifier", "span": { "start": 385, - "end": 389, + "end": 386, "ctxt": 0 }, "value": "y", @@ -996,7 +996,7 @@ "type": "Identifier", "span": { "start": 421, - "end": 437, + "end": 422, "ctxt": 0 }, "value": "x", @@ -1020,7 +1020,7 @@ "type": "Identifier", "span": { "start": 425, - "end": 431, + "end": 428, "ctxt": 0 }, "value": "arg", @@ -1215,7 +1215,7 @@ "type": "Identifier", "span": { "start": 474, - "end": 496, + "end": 475, "ctxt": 0 }, "value": "x", @@ -1239,7 +1239,7 @@ "type": "Identifier", "span": { "start": 478, - "end": 484, + "end": 481, "ctxt": 0 }, "value": "arg", @@ -1429,7 +1429,7 @@ "type": "Identifier", "span": { "start": 521, - "end": 534, + "end": 522, "ctxt": 0 }, "value": "x", @@ -1508,7 +1508,7 @@ "type": "Identifier", "span": { "start": 536, - "end": 557, + "end": 537, "ctxt": 0 }, "value": "y", @@ -1741,7 +1741,7 @@ "type": "Identifier", "span": { "start": 585, - "end": 602, + "end": 586, "ctxt": 0 }, "value": "x", @@ -1982,7 +1982,7 @@ "type": "Identifier", "span": { "start": 642, - "end": 659, + "end": 643, "ctxt": 0 }, "value": "x", @@ -2307,7 +2307,7 @@ "type": "Identifier", "span": { "start": 698, - "end": 702, + "end": 699, "ctxt": 0 }, "value": "x", @@ -2574,7 +2574,7 @@ "type": "Identifier", "span": { "start": 747, - "end": 751, + "end": 748, "ctxt": 0 }, "value": "x", @@ -2831,7 +2831,7 @@ "type": "Identifier", "span": { "start": 805, - "end": 809, + "end": 806, "ctxt": 0 }, "value": "x", @@ -3090,7 +3090,7 @@ "type": "Identifier", "span": { "start": 858, - "end": 862, + "end": 859, "ctxt": 0 }, "value": "x", @@ -3127,7 +3127,7 @@ "type": "Identifier", "span": { "start": 864, - "end": 868, + "end": 865, "ctxt": 0 }, "value": "y", @@ -3399,7 +3399,7 @@ "type": "Identifier", "span": { "start": 923, - "end": 939, + "end": 924, "ctxt": 0 }, "value": "x", @@ -3423,7 +3423,7 @@ "type": "Identifier", "span": { "start": 927, - "end": 933, + "end": 930, "ctxt": 0 }, "value": "arg", @@ -3737,7 +3737,7 @@ "type": "Identifier", "span": { "start": 990, - "end": 1003, + "end": 991, "ctxt": 0 }, "value": "x", @@ -3816,7 +3816,7 @@ "type": "Identifier", "span": { "start": 1005, - "end": 1026, + "end": 1006, "ctxt": 0 }, "value": "y", @@ -4191,7 +4191,7 @@ "type": "Identifier", "span": { "start": 1081, - "end": 1098, + "end": 1082, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignaturesWithOptionalParameters.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignaturesWithOptionalParameters.json index da6718aebca5..7331e7f3826b 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignaturesWithOptionalParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignaturesWithOptionalParameters.json @@ -135,7 +135,7 @@ "type": "Identifier", "span": { "start": 159, - "end": 169, + "end": 160, "ctxt": 0 }, "value": "x", @@ -223,7 +223,7 @@ "type": "Identifier", "span": { "start": 195, - "end": 204, + "end": 196, "ctxt": 0 }, "value": "x", @@ -311,7 +311,7 @@ "type": "Identifier", "span": { "start": 230, - "end": 239, + "end": 231, "ctxt": 0 }, "value": "x", @@ -338,7 +338,7 @@ "type": "Identifier", "span": { "start": 241, - "end": 251, + "end": 242, "ctxt": 0 }, "value": "y", @@ -426,7 +426,7 @@ "type": "Identifier", "span": { "start": 277, - "end": 287, + "end": 278, "ctxt": 0 }, "value": "x", @@ -453,7 +453,7 @@ "type": "Identifier", "span": { "start": 289, - "end": 299, + "end": 290, "ctxt": 0 }, "value": "y", @@ -541,7 +541,7 @@ "type": "Identifier", "span": { "start": 325, - "end": 334, + "end": 326, "ctxt": 0 }, "value": "x", @@ -568,7 +568,7 @@ "type": "Identifier", "span": { "start": 336, - "end": 345, + "end": 337, "ctxt": 0 }, "value": "y", @@ -1126,7 +1126,7 @@ "type": "Identifier", "span": { "start": 541, - "end": 551, + "end": 542, "ctxt": 0 }, "value": "x", @@ -1558,7 +1558,7 @@ "type": "Identifier", "span": { "start": 707, - "end": 716, + "end": 708, "ctxt": 0 }, "value": "x", @@ -1990,7 +1990,7 @@ "type": "Identifier", "span": { "start": 872, - "end": 881, + "end": 873, "ctxt": 0 }, "value": "x", @@ -2017,7 +2017,7 @@ "type": "Identifier", "span": { "start": 883, - "end": 893, + "end": 884, "ctxt": 0 }, "value": "y", @@ -2449,7 +2449,7 @@ "type": "Identifier", "span": { "start": 1045, - "end": 1055, + "end": 1046, "ctxt": 0 }, "value": "x", @@ -2476,7 +2476,7 @@ "type": "Identifier", "span": { "start": 1057, - "end": 1067, + "end": 1058, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithDiscriminatedUnion.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithDiscriminatedUnion.json index fda92e837d5b..0a66945a81c9 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithDiscriminatedUnion.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithDiscriminatedUnion.json @@ -5705,7 +5705,7 @@ "type": "Identifier", "span": { "start": 3029, - "end": 3047, + "end": 3032, "ctxt": 0 }, "value": "val", @@ -5815,7 +5815,7 @@ "type": "Identifier", "span": { "start": 3081, - "end": 3124, + "end": 3093, "ctxt": 0 }, "value": "currentColor", @@ -7061,7 +7061,7 @@ "type": "Identifier", "span": { "start": 4046, - "end": 4066, + "end": 4055, "ctxt": 0 }, "value": "thingType", @@ -7390,7 +7390,7 @@ "type": "Identifier", "span": { "start": 4313, - "end": 4327, + "end": 4319, "ctxt": 0 }, "value": "action", @@ -7889,7 +7889,7 @@ "type": "Identifier", "span": { "start": 4650, - "end": 4658, + "end": 4654, "ctxt": 0 }, "value": "obj1", diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures.json index c645b431d62a..3eb3ee933b68 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures.json @@ -51,7 +51,7 @@ "type": "Identifier", "span": { "start": 149, - "end": 153, + "end": 150, "ctxt": 0 }, "value": "x", @@ -246,7 +246,7 @@ "type": "Identifier", "span": { "start": 196, - "end": 202, + "end": 197, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures2.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures2.json index 8c2a61c1a811..68f9e06243d8 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures2.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures2.json @@ -46,7 +46,7 @@ "type": "Identifier", "span": { "start": 128, - "end": 132, + "end": 129, "ctxt": 0 }, "value": "x", @@ -241,7 +241,7 @@ "type": "Identifier", "span": { "start": 178, - "end": 182, + "end": 179, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures3.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures3.json index 2190a3861a2b..ee04fed28305 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures3.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures3.json @@ -101,7 +101,7 @@ "type": "Identifier", "span": { "start": 142, - "end": 166, + "end": 143, "ctxt": 0 }, "value": "f", @@ -125,7 +125,7 @@ "type": "Identifier", "span": { "start": 146, - "end": 150, + "end": 147, "ctxt": 0 }, "value": "x", @@ -179,7 +179,7 @@ "type": "Identifier", "span": { "start": 156, - "end": 160, + "end": 157, "ctxt": 0 }, "value": "y", @@ -356,7 +356,7 @@ "type": "Identifier", "span": { "start": 185, - "end": 189, + "end": 186, "ctxt": 0 }, "value": "x", @@ -442,7 +442,7 @@ "type": "Identifier", "span": { "start": 198, - "end": 202, + "end": 199, "ctxt": 0 }, "value": "y", @@ -638,7 +638,7 @@ "type": "Identifier", "span": { "start": 226, - "end": 230, + "end": 227, "ctxt": 0 }, "value": "x", @@ -724,7 +724,7 @@ "type": "Identifier", "span": { "start": 239, - "end": 243, + "end": 240, "ctxt": 0 }, "value": "y", @@ -818,7 +818,7 @@ "type": "Identifier", "span": { "start": 254, - "end": 278, + "end": 255, "ctxt": 0 }, "value": "f", @@ -842,7 +842,7 @@ "type": "Identifier", "span": { "start": 258, - "end": 262, + "end": 259, "ctxt": 0 }, "value": "x", @@ -896,7 +896,7 @@ "type": "Identifier", "span": { "start": 268, - "end": 272, + "end": 269, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures4.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures4.json index 50a802371758..390a12c69f40 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures4.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures4.json @@ -165,7 +165,7 @@ "type": "Identifier", "span": { "start": 123, - "end": 127, + "end": 124, "ctxt": 0 }, "value": "z", @@ -348,7 +348,7 @@ "type": "Identifier", "span": { "start": 166, - "end": 170, + "end": 167, "ctxt": 0 }, "value": "z", diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.json index ef3c34652235..3740ed9a3c97 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.json @@ -163,7 +163,7 @@ "type": "Identifier", "span": { "start": 192, - "end": 197, + "end": 193, "ctxt": 0 }, "value": "x", @@ -274,7 +274,7 @@ "type": "Identifier", "span": { "start": 218, - "end": 222, + "end": 219, "ctxt": 0 }, "value": "x", @@ -385,7 +385,7 @@ "type": "Identifier", "span": { "start": 243, - "end": 247, + "end": 244, "ctxt": 0 }, "value": "x", @@ -422,7 +422,7 @@ "type": "Identifier", "span": { "start": 249, - "end": 254, + "end": 250, "ctxt": 0 }, "value": "y", @@ -533,7 +533,7 @@ "type": "Identifier", "span": { "start": 275, - "end": 280, + "end": 276, "ctxt": 0 }, "value": "x", @@ -570,7 +570,7 @@ "type": "Identifier", "span": { "start": 282, - "end": 287, + "end": 283, "ctxt": 0 }, "value": "y", @@ -2757,7 +2757,7 @@ "type": "Identifier", "span": { "start": 1697, - "end": 1702, + "end": 1698, "ctxt": 0 }, "value": "x", @@ -2900,7 +2900,7 @@ "type": "Identifier", "span": { "start": 1726, - "end": 1730, + "end": 1727, "ctxt": 0 }, "value": "x", @@ -3043,7 +3043,7 @@ "type": "Identifier", "span": { "start": 1754, - "end": 1758, + "end": 1755, "ctxt": 0 }, "value": "x", @@ -3080,7 +3080,7 @@ "type": "Identifier", "span": { "start": 1760, - "end": 1765, + "end": 1761, "ctxt": 0 }, "value": "y", @@ -3223,7 +3223,7 @@ "type": "Identifier", "span": { "start": 1789, - "end": 1794, + "end": 1790, "ctxt": 0 }, "value": "x", @@ -3260,7 +3260,7 @@ "type": "Identifier", "span": { "start": 1796, - "end": 1801, + "end": 1797, "ctxt": 0 }, "value": "y", @@ -3503,7 +3503,7 @@ "type": "Identifier", "span": { "start": 1871, - "end": 1876, + "end": 1872, "ctxt": 0 }, "value": "x", @@ -3614,7 +3614,7 @@ "type": "Identifier", "span": { "start": 1897, - "end": 1901, + "end": 1898, "ctxt": 0 }, "value": "x", @@ -3725,7 +3725,7 @@ "type": "Identifier", "span": { "start": 1922, - "end": 1926, + "end": 1923, "ctxt": 0 }, "value": "x", @@ -3762,7 +3762,7 @@ "type": "Identifier", "span": { "start": 1928, - "end": 1933, + "end": 1929, "ctxt": 0 }, "value": "y", @@ -3873,7 +3873,7 @@ "type": "Identifier", "span": { "start": 1954, - "end": 1959, + "end": 1955, "ctxt": 0 }, "value": "x", @@ -3910,7 +3910,7 @@ "type": "Identifier", "span": { "start": 1961, - "end": 1966, + "end": 1962, "ctxt": 0 }, "value": "y", @@ -6253,7 +6253,7 @@ "type": "Identifier", "span": { "start": 2695, - "end": 2700, + "end": 2696, "ctxt": 0 }, "value": "x", @@ -6396,7 +6396,7 @@ "type": "Identifier", "span": { "start": 2724, - "end": 2728, + "end": 2725, "ctxt": 0 }, "value": "x", @@ -6539,7 +6539,7 @@ "type": "Identifier", "span": { "start": 2752, - "end": 2756, + "end": 2753, "ctxt": 0 }, "value": "x", @@ -6576,7 +6576,7 @@ "type": "Identifier", "span": { "start": 2758, - "end": 2763, + "end": 2759, "ctxt": 0 }, "value": "y", @@ -6719,7 +6719,7 @@ "type": "Identifier", "span": { "start": 2787, - "end": 2792, + "end": 2788, "ctxt": 0 }, "value": "x", @@ -6756,7 +6756,7 @@ "type": "Identifier", "span": { "start": 2794, - "end": 2799, + "end": 2795, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentGenericLookupTypeNarrowing.json b/crates/swc_ecma_parser/tests/tsc/assignmentGenericLookupTypeNarrowing.json index c8dad43549ce..0a107b4b43d9 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentGenericLookupTypeNarrowing.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentGenericLookupTypeNarrowing.json @@ -248,7 +248,7 @@ "type": "Identifier", "span": { "start": 123, - "end": 127, + "end": 124, "ctxt": 0 }, "value": "x", @@ -398,7 +398,7 @@ "type": "Identifier", "span": { "start": 171, - "end": 177, + "end": 174, "ctxt": 0 }, "value": "key", diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentLHSIsReference.json b/crates/swc_ecma_parser/tests/tsc/assignmentLHSIsReference.json index 115c86a5c520..338bb64dd085 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentLHSIsReference.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentLHSIsReference.json @@ -168,7 +168,7 @@ "type": "Identifier", "span": { "start": 99, - "end": 109, + "end": 101, "ctxt": 0 }, "value": "x2", @@ -532,7 +532,7 @@ "type": "Identifier", "span": { "start": 291, - "end": 301, + "end": 293, "ctxt": 0 }, "value": "x4", diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentToParenthesizedIdentifiers.json b/crates/swc_ecma_parser/tests/tsc/assignmentToParenthesizedIdentifiers.json index 6f6d0832d3aa..b63dc8d2d3fc 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentToParenthesizedIdentifiers.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentToParenthesizedIdentifiers.json @@ -1654,7 +1654,7 @@ "type": "Identifier", "span": { "start": 685, - "end": 694, + "end": 686, "ctxt": 0 }, "value": "x", @@ -1690,7 +1690,7 @@ "type": "Identifier", "span": { "start": 696, - "end": 712, + "end": 697, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/asyncGeneratorGenericNonWrappedReturn.json b/crates/swc_ecma_parser/tests/tsc/asyncGeneratorGenericNonWrappedReturn.json index b7c4b60b3ebf..0e0a0d7f6403 100644 --- a/crates/swc_ecma_parser/tests/tsc/asyncGeneratorGenericNonWrappedReturn.json +++ b/crates/swc_ecma_parser/tests/tsc/asyncGeneratorGenericNonWrappedReturn.json @@ -39,7 +39,7 @@ "type": "Identifier", "span": { "start": 97, - "end": 101, + "end": 98, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/asyncMethodWithSuper_es6.json b/crates/swc_ecma_parser/tests/tsc/asyncMethodWithSuper_es6.json index aa19bdf31f5f..deddf3dc92d2 100644 --- a/crates/swc_ecma_parser/tests/tsc/asyncMethodWithSuper_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/asyncMethodWithSuper_es6.json @@ -4270,7 +4270,7 @@ "type": "Identifier", "span": { "start": 4454, - "end": 4460, + "end": 4455, "ctxt": 0 }, "value": "x", @@ -4425,7 +4425,7 @@ "type": "Identifier", "span": { "start": 4510, - "end": 4519, + "end": 4511, "ctxt": 0 }, "value": "x", @@ -4524,7 +4524,7 @@ "type": "Identifier", "span": { "start": 4552, - "end": 4558, + "end": 4553, "ctxt": 0 }, "value": "x", @@ -4679,7 +4679,7 @@ "type": "Identifier", "span": { "start": 4622, - "end": 4631, + "end": 4623, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/asyncUnParenthesizedArrowFunction_es2017.json b/crates/swc_ecma_parser/tests/tsc/asyncUnParenthesizedArrowFunction_es2017.json index f1f8b8784b63..e9cf0dbfe869 100644 --- a/crates/swc_ecma_parser/tests/tsc/asyncUnParenthesizedArrowFunction_es2017.json +++ b/crates/swc_ecma_parser/tests/tsc/asyncUnParenthesizedArrowFunction_es2017.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 80, - "end": 86, + "end": 81, "ctxt": 0 }, "value": "i", diff --git a/crates/swc_ecma_parser/tests/tsc/asyncUnParenthesizedArrowFunction_es5.json b/crates/swc_ecma_parser/tests/tsc/asyncUnParenthesizedArrowFunction_es5.json index b54c64a0f240..e77601d161bf 100644 --- a/crates/swc_ecma_parser/tests/tsc/asyncUnParenthesizedArrowFunction_es5.json +++ b/crates/swc_ecma_parser/tests/tsc/asyncUnParenthesizedArrowFunction_es5.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 105, - "end": 111, + "end": 106, "ctxt": 0 }, "value": "i", diff --git a/crates/swc_ecma_parser/tests/tsc/asyncUnParenthesizedArrowFunction_es6.json b/crates/swc_ecma_parser/tests/tsc/asyncUnParenthesizedArrowFunction_es6.json index 0214a17a4143..3e573166d04b 100644 --- a/crates/swc_ecma_parser/tests/tsc/asyncUnParenthesizedArrowFunction_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/asyncUnParenthesizedArrowFunction_es6.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 77, - "end": 83, + "end": 78, "ctxt": 0 }, "value": "i", diff --git a/crates/swc_ecma_parser/tests/tsc/asyncWithVarShadowing_es6.json b/crates/swc_ecma_parser/tests/tsc/asyncWithVarShadowing_es6.json index 6489ab88e7ba..d49ef5275eca 100644 --- a/crates/swc_ecma_parser/tests/tsc/asyncWithVarShadowing_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/asyncWithVarShadowing_es6.json @@ -3976,7 +3976,7 @@ "type": "Identifier", "span": { "start": 1957, - "end": 1966, + "end": 1958, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression1_es2017.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression1_es2017.json index ffeeb4ce8fda..e1d933c32baa 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression1_es2017.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression1_es2017.json @@ -158,7 +158,7 @@ "type": "Identifier", "span": { "start": 121, - "end": 134, + "end": 125, "ctxt": 0 }, "value": "arg0", @@ -194,7 +194,7 @@ "type": "Identifier", "span": { "start": 136, - "end": 149, + "end": 140, "ctxt": 0 }, "value": "arg1", @@ -230,7 +230,7 @@ "type": "Identifier", "span": { "start": 151, - "end": 164, + "end": 155, "ctxt": 0 }, "value": "arg2", @@ -349,7 +349,7 @@ "type": "Identifier", "span": { "start": 193, - "end": 206, + "end": 197, "ctxt": 0 }, "value": "arg0", @@ -376,7 +376,7 @@ "type": "Identifier", "span": { "start": 208, - "end": 221, + "end": 212, "ctxt": 0 }, "value": "arg1", @@ -403,7 +403,7 @@ "type": "Identifier", "span": { "start": 223, - "end": 236, + "end": 227, "ctxt": 0 }, "value": "arg2", @@ -533,7 +533,7 @@ "type": "Identifier", "span": { "start": 276, - "end": 289, + "end": 280, "ctxt": 0 }, "value": "arg0", @@ -560,7 +560,7 @@ "type": "Identifier", "span": { "start": 291, - "end": 304, + "end": 295, "ctxt": 0 }, "value": "arg1", @@ -587,7 +587,7 @@ "type": "Identifier", "span": { "start": 306, - "end": 319, + "end": 310, "ctxt": 0 }, "value": "arg2", @@ -733,7 +733,7 @@ "type": "Identifier", "span": { "start": 361, - "end": 374, + "end": 365, "ctxt": 0 }, "value": "arg0", @@ -760,7 +760,7 @@ "type": "Identifier", "span": { "start": 376, - "end": 389, + "end": 380, "ctxt": 0 }, "value": "arg1", @@ -787,7 +787,7 @@ "type": "Identifier", "span": { "start": 391, - "end": 404, + "end": 395, "ctxt": 0 }, "value": "arg2", diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression1_es5.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression1_es5.json index 927184668b64..c0cc3f66610c 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression1_es5.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression1_es5.json @@ -158,7 +158,7 @@ "type": "Identifier", "span": { "start": 146, - "end": 159, + "end": 150, "ctxt": 0 }, "value": "arg0", @@ -194,7 +194,7 @@ "type": "Identifier", "span": { "start": 161, - "end": 174, + "end": 165, "ctxt": 0 }, "value": "arg1", @@ -230,7 +230,7 @@ "type": "Identifier", "span": { "start": 176, - "end": 189, + "end": 180, "ctxt": 0 }, "value": "arg2", @@ -349,7 +349,7 @@ "type": "Identifier", "span": { "start": 218, - "end": 231, + "end": 222, "ctxt": 0 }, "value": "arg0", @@ -376,7 +376,7 @@ "type": "Identifier", "span": { "start": 233, - "end": 246, + "end": 237, "ctxt": 0 }, "value": "arg1", @@ -403,7 +403,7 @@ "type": "Identifier", "span": { "start": 248, - "end": 261, + "end": 252, "ctxt": 0 }, "value": "arg2", @@ -533,7 +533,7 @@ "type": "Identifier", "span": { "start": 301, - "end": 314, + "end": 305, "ctxt": 0 }, "value": "arg0", @@ -560,7 +560,7 @@ "type": "Identifier", "span": { "start": 316, - "end": 329, + "end": 320, "ctxt": 0 }, "value": "arg1", @@ -587,7 +587,7 @@ "type": "Identifier", "span": { "start": 331, - "end": 344, + "end": 335, "ctxt": 0 }, "value": "arg2", @@ -733,7 +733,7 @@ "type": "Identifier", "span": { "start": 386, - "end": 399, + "end": 390, "ctxt": 0 }, "value": "arg0", @@ -760,7 +760,7 @@ "type": "Identifier", "span": { "start": 401, - "end": 414, + "end": 405, "ctxt": 0 }, "value": "arg1", @@ -787,7 +787,7 @@ "type": "Identifier", "span": { "start": 416, - "end": 429, + "end": 420, "ctxt": 0 }, "value": "arg2", diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression1_es6.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression1_es6.json index ecca9e005877..fba0b065ff4f 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression1_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression1_es6.json @@ -158,7 +158,7 @@ "type": "Identifier", "span": { "start": 118, - "end": 131, + "end": 122, "ctxt": 0 }, "value": "arg0", @@ -194,7 +194,7 @@ "type": "Identifier", "span": { "start": 133, - "end": 146, + "end": 137, "ctxt": 0 }, "value": "arg1", @@ -230,7 +230,7 @@ "type": "Identifier", "span": { "start": 148, - "end": 161, + "end": 152, "ctxt": 0 }, "value": "arg2", @@ -349,7 +349,7 @@ "type": "Identifier", "span": { "start": 190, - "end": 203, + "end": 194, "ctxt": 0 }, "value": "arg0", @@ -376,7 +376,7 @@ "type": "Identifier", "span": { "start": 205, - "end": 218, + "end": 209, "ctxt": 0 }, "value": "arg1", @@ -403,7 +403,7 @@ "type": "Identifier", "span": { "start": 220, - "end": 233, + "end": 224, "ctxt": 0 }, "value": "arg2", @@ -533,7 +533,7 @@ "type": "Identifier", "span": { "start": 273, - "end": 286, + "end": 277, "ctxt": 0 }, "value": "arg0", @@ -560,7 +560,7 @@ "type": "Identifier", "span": { "start": 288, - "end": 301, + "end": 292, "ctxt": 0 }, "value": "arg1", @@ -587,7 +587,7 @@ "type": "Identifier", "span": { "start": 303, - "end": 316, + "end": 307, "ctxt": 0 }, "value": "arg2", @@ -733,7 +733,7 @@ "type": "Identifier", "span": { "start": 358, - "end": 371, + "end": 362, "ctxt": 0 }, "value": "arg0", @@ -760,7 +760,7 @@ "type": "Identifier", "span": { "start": 373, - "end": 386, + "end": 377, "ctxt": 0 }, "value": "arg1", @@ -787,7 +787,7 @@ "type": "Identifier", "span": { "start": 388, - "end": 401, + "end": 392, "ctxt": 0 }, "value": "arg2", diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression2_es2017.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression2_es2017.json index 27130e4d907e..f4f3d041fbd6 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression2_es2017.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression2_es2017.json @@ -158,7 +158,7 @@ "type": "Identifier", "span": { "start": 121, - "end": 134, + "end": 125, "ctxt": 0 }, "value": "arg0", @@ -194,7 +194,7 @@ "type": "Identifier", "span": { "start": 136, - "end": 149, + "end": 140, "ctxt": 0 }, "value": "arg1", @@ -230,7 +230,7 @@ "type": "Identifier", "span": { "start": 151, - "end": 164, + "end": 155, "ctxt": 0 }, "value": "arg2", @@ -349,7 +349,7 @@ "type": "Identifier", "span": { "start": 193, - "end": 206, + "end": 197, "ctxt": 0 }, "value": "arg0", @@ -376,7 +376,7 @@ "type": "Identifier", "span": { "start": 208, - "end": 221, + "end": 212, "ctxt": 0 }, "value": "arg1", @@ -403,7 +403,7 @@ "type": "Identifier", "span": { "start": 223, - "end": 236, + "end": 227, "ctxt": 0 }, "value": "arg2", @@ -533,7 +533,7 @@ "type": "Identifier", "span": { "start": 276, - "end": 289, + "end": 280, "ctxt": 0 }, "value": "arg0", @@ -560,7 +560,7 @@ "type": "Identifier", "span": { "start": 291, - "end": 304, + "end": 295, "ctxt": 0 }, "value": "arg1", @@ -587,7 +587,7 @@ "type": "Identifier", "span": { "start": 306, - "end": 319, + "end": 310, "ctxt": 0 }, "value": "arg2", @@ -733,7 +733,7 @@ "type": "Identifier", "span": { "start": 361, - "end": 374, + "end": 365, "ctxt": 0 }, "value": "arg0", @@ -760,7 +760,7 @@ "type": "Identifier", "span": { "start": 376, - "end": 389, + "end": 380, "ctxt": 0 }, "value": "arg1", @@ -787,7 +787,7 @@ "type": "Identifier", "span": { "start": 391, - "end": 404, + "end": 395, "ctxt": 0 }, "value": "arg2", diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression2_es5.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression2_es5.json index d6297f992348..cb8d4de3e953 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression2_es5.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression2_es5.json @@ -158,7 +158,7 @@ "type": "Identifier", "span": { "start": 146, - "end": 159, + "end": 150, "ctxt": 0 }, "value": "arg0", @@ -194,7 +194,7 @@ "type": "Identifier", "span": { "start": 161, - "end": 174, + "end": 165, "ctxt": 0 }, "value": "arg1", @@ -230,7 +230,7 @@ "type": "Identifier", "span": { "start": 176, - "end": 189, + "end": 180, "ctxt": 0 }, "value": "arg2", @@ -349,7 +349,7 @@ "type": "Identifier", "span": { "start": 218, - "end": 231, + "end": 222, "ctxt": 0 }, "value": "arg0", @@ -376,7 +376,7 @@ "type": "Identifier", "span": { "start": 233, - "end": 246, + "end": 237, "ctxt": 0 }, "value": "arg1", @@ -403,7 +403,7 @@ "type": "Identifier", "span": { "start": 248, - "end": 261, + "end": 252, "ctxt": 0 }, "value": "arg2", @@ -533,7 +533,7 @@ "type": "Identifier", "span": { "start": 301, - "end": 314, + "end": 305, "ctxt": 0 }, "value": "arg0", @@ -560,7 +560,7 @@ "type": "Identifier", "span": { "start": 316, - "end": 329, + "end": 320, "ctxt": 0 }, "value": "arg1", @@ -587,7 +587,7 @@ "type": "Identifier", "span": { "start": 331, - "end": 344, + "end": 335, "ctxt": 0 }, "value": "arg2", @@ -733,7 +733,7 @@ "type": "Identifier", "span": { "start": 386, - "end": 399, + "end": 390, "ctxt": 0 }, "value": "arg0", @@ -760,7 +760,7 @@ "type": "Identifier", "span": { "start": 401, - "end": 414, + "end": 405, "ctxt": 0 }, "value": "arg1", @@ -787,7 +787,7 @@ "type": "Identifier", "span": { "start": 416, - "end": 429, + "end": 420, "ctxt": 0 }, "value": "arg2", diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression2_es6.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression2_es6.json index 3d045233ac4c..49c2eb4fb741 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression2_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression2_es6.json @@ -158,7 +158,7 @@ "type": "Identifier", "span": { "start": 118, - "end": 131, + "end": 122, "ctxt": 0 }, "value": "arg0", @@ -194,7 +194,7 @@ "type": "Identifier", "span": { "start": 133, - "end": 146, + "end": 137, "ctxt": 0 }, "value": "arg1", @@ -230,7 +230,7 @@ "type": "Identifier", "span": { "start": 148, - "end": 161, + "end": 152, "ctxt": 0 }, "value": "arg2", @@ -349,7 +349,7 @@ "type": "Identifier", "span": { "start": 190, - "end": 203, + "end": 194, "ctxt": 0 }, "value": "arg0", @@ -376,7 +376,7 @@ "type": "Identifier", "span": { "start": 205, - "end": 218, + "end": 209, "ctxt": 0 }, "value": "arg1", @@ -403,7 +403,7 @@ "type": "Identifier", "span": { "start": 220, - "end": 233, + "end": 224, "ctxt": 0 }, "value": "arg2", @@ -533,7 +533,7 @@ "type": "Identifier", "span": { "start": 273, - "end": 286, + "end": 277, "ctxt": 0 }, "value": "arg0", @@ -560,7 +560,7 @@ "type": "Identifier", "span": { "start": 288, - "end": 301, + "end": 292, "ctxt": 0 }, "value": "arg1", @@ -587,7 +587,7 @@ "type": "Identifier", "span": { "start": 303, - "end": 316, + "end": 307, "ctxt": 0 }, "value": "arg2", @@ -733,7 +733,7 @@ "type": "Identifier", "span": { "start": 358, - "end": 371, + "end": 362, "ctxt": 0 }, "value": "arg0", @@ -760,7 +760,7 @@ "type": "Identifier", "span": { "start": 373, - "end": 386, + "end": 377, "ctxt": 0 }, "value": "arg1", @@ -787,7 +787,7 @@ "type": "Identifier", "span": { "start": 388, - "end": 401, + "end": 392, "ctxt": 0 }, "value": "arg2", diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression3_es2017.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression3_es2017.json index b70a57b7fc04..df891820ec68 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression3_es2017.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression3_es2017.json @@ -158,7 +158,7 @@ "type": "Identifier", "span": { "start": 121, - "end": 134, + "end": 125, "ctxt": 0 }, "value": "arg0", @@ -194,7 +194,7 @@ "type": "Identifier", "span": { "start": 136, - "end": 149, + "end": 140, "ctxt": 0 }, "value": "arg1", @@ -230,7 +230,7 @@ "type": "Identifier", "span": { "start": 151, - "end": 164, + "end": 155, "ctxt": 0 }, "value": "arg2", @@ -349,7 +349,7 @@ "type": "Identifier", "span": { "start": 193, - "end": 206, + "end": 197, "ctxt": 0 }, "value": "arg0", @@ -376,7 +376,7 @@ "type": "Identifier", "span": { "start": 208, - "end": 221, + "end": 212, "ctxt": 0 }, "value": "arg1", @@ -403,7 +403,7 @@ "type": "Identifier", "span": { "start": 223, - "end": 236, + "end": 227, "ctxt": 0 }, "value": "arg2", @@ -533,7 +533,7 @@ "type": "Identifier", "span": { "start": 276, - "end": 289, + "end": 280, "ctxt": 0 }, "value": "arg0", @@ -560,7 +560,7 @@ "type": "Identifier", "span": { "start": 291, - "end": 304, + "end": 295, "ctxt": 0 }, "value": "arg1", @@ -587,7 +587,7 @@ "type": "Identifier", "span": { "start": 306, - "end": 319, + "end": 310, "ctxt": 0 }, "value": "arg2", @@ -733,7 +733,7 @@ "type": "Identifier", "span": { "start": 361, - "end": 374, + "end": 365, "ctxt": 0 }, "value": "arg0", @@ -760,7 +760,7 @@ "type": "Identifier", "span": { "start": 376, - "end": 389, + "end": 380, "ctxt": 0 }, "value": "arg1", @@ -787,7 +787,7 @@ "type": "Identifier", "span": { "start": 391, - "end": 404, + "end": 395, "ctxt": 0 }, "value": "arg2", diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression3_es5.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression3_es5.json index aee452747918..76a34903e28a 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression3_es5.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression3_es5.json @@ -158,7 +158,7 @@ "type": "Identifier", "span": { "start": 146, - "end": 159, + "end": 150, "ctxt": 0 }, "value": "arg0", @@ -194,7 +194,7 @@ "type": "Identifier", "span": { "start": 161, - "end": 174, + "end": 165, "ctxt": 0 }, "value": "arg1", @@ -230,7 +230,7 @@ "type": "Identifier", "span": { "start": 176, - "end": 189, + "end": 180, "ctxt": 0 }, "value": "arg2", @@ -349,7 +349,7 @@ "type": "Identifier", "span": { "start": 218, - "end": 231, + "end": 222, "ctxt": 0 }, "value": "arg0", @@ -376,7 +376,7 @@ "type": "Identifier", "span": { "start": 233, - "end": 246, + "end": 237, "ctxt": 0 }, "value": "arg1", @@ -403,7 +403,7 @@ "type": "Identifier", "span": { "start": 248, - "end": 261, + "end": 252, "ctxt": 0 }, "value": "arg2", @@ -533,7 +533,7 @@ "type": "Identifier", "span": { "start": 301, - "end": 314, + "end": 305, "ctxt": 0 }, "value": "arg0", @@ -560,7 +560,7 @@ "type": "Identifier", "span": { "start": 316, - "end": 329, + "end": 320, "ctxt": 0 }, "value": "arg1", @@ -587,7 +587,7 @@ "type": "Identifier", "span": { "start": 331, - "end": 344, + "end": 335, "ctxt": 0 }, "value": "arg2", @@ -733,7 +733,7 @@ "type": "Identifier", "span": { "start": 386, - "end": 399, + "end": 390, "ctxt": 0 }, "value": "arg0", @@ -760,7 +760,7 @@ "type": "Identifier", "span": { "start": 401, - "end": 414, + "end": 405, "ctxt": 0 }, "value": "arg1", @@ -787,7 +787,7 @@ "type": "Identifier", "span": { "start": 416, - "end": 429, + "end": 420, "ctxt": 0 }, "value": "arg2", diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression3_es6.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression3_es6.json index 080b78e5b7f6..26961f081e02 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression3_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression3_es6.json @@ -158,7 +158,7 @@ "type": "Identifier", "span": { "start": 118, - "end": 131, + "end": 122, "ctxt": 0 }, "value": "arg0", @@ -194,7 +194,7 @@ "type": "Identifier", "span": { "start": 133, - "end": 146, + "end": 137, "ctxt": 0 }, "value": "arg1", @@ -230,7 +230,7 @@ "type": "Identifier", "span": { "start": 148, - "end": 161, + "end": 152, "ctxt": 0 }, "value": "arg2", @@ -349,7 +349,7 @@ "type": "Identifier", "span": { "start": 190, - "end": 203, + "end": 194, "ctxt": 0 }, "value": "arg0", @@ -376,7 +376,7 @@ "type": "Identifier", "span": { "start": 205, - "end": 218, + "end": 209, "ctxt": 0 }, "value": "arg1", @@ -403,7 +403,7 @@ "type": "Identifier", "span": { "start": 220, - "end": 233, + "end": 224, "ctxt": 0 }, "value": "arg2", @@ -533,7 +533,7 @@ "type": "Identifier", "span": { "start": 273, - "end": 286, + "end": 277, "ctxt": 0 }, "value": "arg0", @@ -560,7 +560,7 @@ "type": "Identifier", "span": { "start": 288, - "end": 301, + "end": 292, "ctxt": 0 }, "value": "arg1", @@ -587,7 +587,7 @@ "type": "Identifier", "span": { "start": 303, - "end": 316, + "end": 307, "ctxt": 0 }, "value": "arg2", @@ -733,7 +733,7 @@ "type": "Identifier", "span": { "start": 358, - "end": 371, + "end": 362, "ctxt": 0 }, "value": "arg0", @@ -760,7 +760,7 @@ "type": "Identifier", "span": { "start": 373, - "end": 386, + "end": 377, "ctxt": 0 }, "value": "arg1", @@ -787,7 +787,7 @@ "type": "Identifier", "span": { "start": 388, - "end": 401, + "end": 392, "ctxt": 0 }, "value": "arg2", diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression4_es2017.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression4_es2017.json index a1b7bdb26117..e46c86f2b1b1 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression4_es2017.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression4_es2017.json @@ -158,7 +158,7 @@ "type": "Identifier", "span": { "start": 121, - "end": 134, + "end": 125, "ctxt": 0 }, "value": "arg0", @@ -194,7 +194,7 @@ "type": "Identifier", "span": { "start": 136, - "end": 149, + "end": 140, "ctxt": 0 }, "value": "arg1", @@ -230,7 +230,7 @@ "type": "Identifier", "span": { "start": 151, - "end": 164, + "end": 155, "ctxt": 0 }, "value": "arg2", @@ -349,7 +349,7 @@ "type": "Identifier", "span": { "start": 193, - "end": 206, + "end": 197, "ctxt": 0 }, "value": "arg0", @@ -376,7 +376,7 @@ "type": "Identifier", "span": { "start": 208, - "end": 221, + "end": 212, "ctxt": 0 }, "value": "arg1", @@ -403,7 +403,7 @@ "type": "Identifier", "span": { "start": 223, - "end": 236, + "end": 227, "ctxt": 0 }, "value": "arg2", @@ -533,7 +533,7 @@ "type": "Identifier", "span": { "start": 276, - "end": 289, + "end": 280, "ctxt": 0 }, "value": "arg0", @@ -560,7 +560,7 @@ "type": "Identifier", "span": { "start": 291, - "end": 304, + "end": 295, "ctxt": 0 }, "value": "arg1", @@ -587,7 +587,7 @@ "type": "Identifier", "span": { "start": 306, - "end": 319, + "end": 310, "ctxt": 0 }, "value": "arg2", @@ -733,7 +733,7 @@ "type": "Identifier", "span": { "start": 361, - "end": 374, + "end": 365, "ctxt": 0 }, "value": "arg0", @@ -760,7 +760,7 @@ "type": "Identifier", "span": { "start": 376, - "end": 389, + "end": 380, "ctxt": 0 }, "value": "arg1", @@ -787,7 +787,7 @@ "type": "Identifier", "span": { "start": 391, - "end": 404, + "end": 395, "ctxt": 0 }, "value": "arg2", diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression4_es5.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression4_es5.json index 935cba2fa94e..e0c8eeaa15e2 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression4_es5.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression4_es5.json @@ -158,7 +158,7 @@ "type": "Identifier", "span": { "start": 146, - "end": 159, + "end": 150, "ctxt": 0 }, "value": "arg0", @@ -194,7 +194,7 @@ "type": "Identifier", "span": { "start": 161, - "end": 174, + "end": 165, "ctxt": 0 }, "value": "arg1", @@ -230,7 +230,7 @@ "type": "Identifier", "span": { "start": 176, - "end": 189, + "end": 180, "ctxt": 0 }, "value": "arg2", @@ -349,7 +349,7 @@ "type": "Identifier", "span": { "start": 218, - "end": 231, + "end": 222, "ctxt": 0 }, "value": "arg0", @@ -376,7 +376,7 @@ "type": "Identifier", "span": { "start": 233, - "end": 246, + "end": 237, "ctxt": 0 }, "value": "arg1", @@ -403,7 +403,7 @@ "type": "Identifier", "span": { "start": 248, - "end": 261, + "end": 252, "ctxt": 0 }, "value": "arg2", @@ -533,7 +533,7 @@ "type": "Identifier", "span": { "start": 301, - "end": 314, + "end": 305, "ctxt": 0 }, "value": "arg0", @@ -560,7 +560,7 @@ "type": "Identifier", "span": { "start": 316, - "end": 329, + "end": 320, "ctxt": 0 }, "value": "arg1", @@ -587,7 +587,7 @@ "type": "Identifier", "span": { "start": 331, - "end": 344, + "end": 335, "ctxt": 0 }, "value": "arg2", @@ -733,7 +733,7 @@ "type": "Identifier", "span": { "start": 386, - "end": 399, + "end": 390, "ctxt": 0 }, "value": "arg0", @@ -760,7 +760,7 @@ "type": "Identifier", "span": { "start": 401, - "end": 414, + "end": 405, "ctxt": 0 }, "value": "arg1", @@ -787,7 +787,7 @@ "type": "Identifier", "span": { "start": 416, - "end": 429, + "end": 420, "ctxt": 0 }, "value": "arg2", diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression4_es6.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression4_es6.json index f6597aa61559..6857e5b6c393 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression4_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression4_es6.json @@ -158,7 +158,7 @@ "type": "Identifier", "span": { "start": 118, - "end": 131, + "end": 122, "ctxt": 0 }, "value": "arg0", @@ -194,7 +194,7 @@ "type": "Identifier", "span": { "start": 133, - "end": 146, + "end": 137, "ctxt": 0 }, "value": "arg1", @@ -230,7 +230,7 @@ "type": "Identifier", "span": { "start": 148, - "end": 161, + "end": 152, "ctxt": 0 }, "value": "arg2", @@ -349,7 +349,7 @@ "type": "Identifier", "span": { "start": 190, - "end": 203, + "end": 194, "ctxt": 0 }, "value": "arg0", @@ -376,7 +376,7 @@ "type": "Identifier", "span": { "start": 205, - "end": 218, + "end": 209, "ctxt": 0 }, "value": "arg1", @@ -403,7 +403,7 @@ "type": "Identifier", "span": { "start": 220, - "end": 233, + "end": 224, "ctxt": 0 }, "value": "arg2", @@ -533,7 +533,7 @@ "type": "Identifier", "span": { "start": 273, - "end": 286, + "end": 277, "ctxt": 0 }, "value": "arg0", @@ -560,7 +560,7 @@ "type": "Identifier", "span": { "start": 288, - "end": 301, + "end": 292, "ctxt": 0 }, "value": "arg1", @@ -587,7 +587,7 @@ "type": "Identifier", "span": { "start": 303, - "end": 316, + "end": 307, "ctxt": 0 }, "value": "arg2", @@ -733,7 +733,7 @@ "type": "Identifier", "span": { "start": 358, - "end": 371, + "end": 362, "ctxt": 0 }, "value": "arg0", @@ -760,7 +760,7 @@ "type": "Identifier", "span": { "start": 373, - "end": 386, + "end": 377, "ctxt": 0 }, "value": "arg1", @@ -787,7 +787,7 @@ "type": "Identifier", "span": { "start": 388, - "end": 401, + "end": 392, "ctxt": 0 }, "value": "arg2", diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression5_es2017.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression5_es2017.json index 1db077a12de6..349df0371431 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression5_es2017.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression5_es2017.json @@ -158,7 +158,7 @@ "type": "Identifier", "span": { "start": 121, - "end": 134, + "end": 125, "ctxt": 0 }, "value": "arg0", @@ -194,7 +194,7 @@ "type": "Identifier", "span": { "start": 136, - "end": 149, + "end": 140, "ctxt": 0 }, "value": "arg1", @@ -230,7 +230,7 @@ "type": "Identifier", "span": { "start": 151, - "end": 164, + "end": 155, "ctxt": 0 }, "value": "arg2", @@ -349,7 +349,7 @@ "type": "Identifier", "span": { "start": 193, - "end": 206, + "end": 197, "ctxt": 0 }, "value": "arg0", @@ -376,7 +376,7 @@ "type": "Identifier", "span": { "start": 208, - "end": 221, + "end": 212, "ctxt": 0 }, "value": "arg1", @@ -403,7 +403,7 @@ "type": "Identifier", "span": { "start": 223, - "end": 236, + "end": 227, "ctxt": 0 }, "value": "arg2", @@ -533,7 +533,7 @@ "type": "Identifier", "span": { "start": 276, - "end": 289, + "end": 280, "ctxt": 0 }, "value": "arg0", @@ -560,7 +560,7 @@ "type": "Identifier", "span": { "start": 291, - "end": 304, + "end": 295, "ctxt": 0 }, "value": "arg1", @@ -587,7 +587,7 @@ "type": "Identifier", "span": { "start": 306, - "end": 319, + "end": 310, "ctxt": 0 }, "value": "arg2", @@ -733,7 +733,7 @@ "type": "Identifier", "span": { "start": 361, - "end": 374, + "end": 365, "ctxt": 0 }, "value": "arg0", @@ -760,7 +760,7 @@ "type": "Identifier", "span": { "start": 376, - "end": 389, + "end": 380, "ctxt": 0 }, "value": "arg1", @@ -787,7 +787,7 @@ "type": "Identifier", "span": { "start": 391, - "end": 404, + "end": 395, "ctxt": 0 }, "value": "arg2", diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression5_es5.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression5_es5.json index 4f47124c9d07..d6b4661446cc 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression5_es5.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression5_es5.json @@ -158,7 +158,7 @@ "type": "Identifier", "span": { "start": 146, - "end": 159, + "end": 150, "ctxt": 0 }, "value": "arg0", @@ -194,7 +194,7 @@ "type": "Identifier", "span": { "start": 161, - "end": 174, + "end": 165, "ctxt": 0 }, "value": "arg1", @@ -230,7 +230,7 @@ "type": "Identifier", "span": { "start": 176, - "end": 189, + "end": 180, "ctxt": 0 }, "value": "arg2", @@ -349,7 +349,7 @@ "type": "Identifier", "span": { "start": 218, - "end": 231, + "end": 222, "ctxt": 0 }, "value": "arg0", @@ -376,7 +376,7 @@ "type": "Identifier", "span": { "start": 233, - "end": 246, + "end": 237, "ctxt": 0 }, "value": "arg1", @@ -403,7 +403,7 @@ "type": "Identifier", "span": { "start": 248, - "end": 261, + "end": 252, "ctxt": 0 }, "value": "arg2", @@ -533,7 +533,7 @@ "type": "Identifier", "span": { "start": 301, - "end": 314, + "end": 305, "ctxt": 0 }, "value": "arg0", @@ -560,7 +560,7 @@ "type": "Identifier", "span": { "start": 316, - "end": 329, + "end": 320, "ctxt": 0 }, "value": "arg1", @@ -587,7 +587,7 @@ "type": "Identifier", "span": { "start": 331, - "end": 344, + "end": 335, "ctxt": 0 }, "value": "arg2", @@ -733,7 +733,7 @@ "type": "Identifier", "span": { "start": 386, - "end": 399, + "end": 390, "ctxt": 0 }, "value": "arg0", @@ -760,7 +760,7 @@ "type": "Identifier", "span": { "start": 401, - "end": 414, + "end": 405, "ctxt": 0 }, "value": "arg1", @@ -787,7 +787,7 @@ "type": "Identifier", "span": { "start": 416, - "end": 429, + "end": 420, "ctxt": 0 }, "value": "arg2", diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression5_es6.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression5_es6.json index fce2ca9502f7..3757cd551579 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression5_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression5_es6.json @@ -158,7 +158,7 @@ "type": "Identifier", "span": { "start": 118, - "end": 131, + "end": 122, "ctxt": 0 }, "value": "arg0", @@ -194,7 +194,7 @@ "type": "Identifier", "span": { "start": 133, - "end": 146, + "end": 137, "ctxt": 0 }, "value": "arg1", @@ -230,7 +230,7 @@ "type": "Identifier", "span": { "start": 148, - "end": 161, + "end": 152, "ctxt": 0 }, "value": "arg2", @@ -349,7 +349,7 @@ "type": "Identifier", "span": { "start": 190, - "end": 203, + "end": 194, "ctxt": 0 }, "value": "arg0", @@ -376,7 +376,7 @@ "type": "Identifier", "span": { "start": 205, - "end": 218, + "end": 209, "ctxt": 0 }, "value": "arg1", @@ -403,7 +403,7 @@ "type": "Identifier", "span": { "start": 220, - "end": 233, + "end": 224, "ctxt": 0 }, "value": "arg2", @@ -533,7 +533,7 @@ "type": "Identifier", "span": { "start": 273, - "end": 286, + "end": 277, "ctxt": 0 }, "value": "arg0", @@ -560,7 +560,7 @@ "type": "Identifier", "span": { "start": 288, - "end": 301, + "end": 292, "ctxt": 0 }, "value": "arg1", @@ -587,7 +587,7 @@ "type": "Identifier", "span": { "start": 303, - "end": 316, + "end": 307, "ctxt": 0 }, "value": "arg2", @@ -733,7 +733,7 @@ "type": "Identifier", "span": { "start": 358, - "end": 371, + "end": 362, "ctxt": 0 }, "value": "arg0", @@ -760,7 +760,7 @@ "type": "Identifier", "span": { "start": 373, - "end": 386, + "end": 377, "ctxt": 0 }, "value": "arg1", @@ -787,7 +787,7 @@ "type": "Identifier", "span": { "start": 388, - "end": 401, + "end": 392, "ctxt": 0 }, "value": "arg2", diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression6_es2017.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression6_es2017.json index f0f214b9d60c..fad11b065494 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression6_es2017.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression6_es2017.json @@ -158,7 +158,7 @@ "type": "Identifier", "span": { "start": 121, - "end": 134, + "end": 125, "ctxt": 0 }, "value": "arg0", @@ -194,7 +194,7 @@ "type": "Identifier", "span": { "start": 136, - "end": 149, + "end": 140, "ctxt": 0 }, "value": "arg1", @@ -230,7 +230,7 @@ "type": "Identifier", "span": { "start": 151, - "end": 164, + "end": 155, "ctxt": 0 }, "value": "arg2", @@ -349,7 +349,7 @@ "type": "Identifier", "span": { "start": 193, - "end": 206, + "end": 197, "ctxt": 0 }, "value": "arg0", @@ -376,7 +376,7 @@ "type": "Identifier", "span": { "start": 208, - "end": 221, + "end": 212, "ctxt": 0 }, "value": "arg1", @@ -403,7 +403,7 @@ "type": "Identifier", "span": { "start": 223, - "end": 236, + "end": 227, "ctxt": 0 }, "value": "arg2", @@ -533,7 +533,7 @@ "type": "Identifier", "span": { "start": 276, - "end": 289, + "end": 280, "ctxt": 0 }, "value": "arg0", @@ -560,7 +560,7 @@ "type": "Identifier", "span": { "start": 291, - "end": 304, + "end": 295, "ctxt": 0 }, "value": "arg1", @@ -587,7 +587,7 @@ "type": "Identifier", "span": { "start": 306, - "end": 319, + "end": 310, "ctxt": 0 }, "value": "arg2", @@ -733,7 +733,7 @@ "type": "Identifier", "span": { "start": 361, - "end": 374, + "end": 365, "ctxt": 0 }, "value": "arg0", @@ -760,7 +760,7 @@ "type": "Identifier", "span": { "start": 376, - "end": 389, + "end": 380, "ctxt": 0 }, "value": "arg1", @@ -787,7 +787,7 @@ "type": "Identifier", "span": { "start": 391, - "end": 404, + "end": 395, "ctxt": 0 }, "value": "arg2", diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression6_es5.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression6_es5.json index 99a75e21bc0a..19def506173e 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression6_es5.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression6_es5.json @@ -158,7 +158,7 @@ "type": "Identifier", "span": { "start": 146, - "end": 159, + "end": 150, "ctxt": 0 }, "value": "arg0", @@ -194,7 +194,7 @@ "type": "Identifier", "span": { "start": 161, - "end": 174, + "end": 165, "ctxt": 0 }, "value": "arg1", @@ -230,7 +230,7 @@ "type": "Identifier", "span": { "start": 176, - "end": 189, + "end": 180, "ctxt": 0 }, "value": "arg2", @@ -349,7 +349,7 @@ "type": "Identifier", "span": { "start": 218, - "end": 231, + "end": 222, "ctxt": 0 }, "value": "arg0", @@ -376,7 +376,7 @@ "type": "Identifier", "span": { "start": 233, - "end": 246, + "end": 237, "ctxt": 0 }, "value": "arg1", @@ -403,7 +403,7 @@ "type": "Identifier", "span": { "start": 248, - "end": 261, + "end": 252, "ctxt": 0 }, "value": "arg2", @@ -533,7 +533,7 @@ "type": "Identifier", "span": { "start": 301, - "end": 314, + "end": 305, "ctxt": 0 }, "value": "arg0", @@ -560,7 +560,7 @@ "type": "Identifier", "span": { "start": 316, - "end": 329, + "end": 320, "ctxt": 0 }, "value": "arg1", @@ -587,7 +587,7 @@ "type": "Identifier", "span": { "start": 331, - "end": 344, + "end": 335, "ctxt": 0 }, "value": "arg2", @@ -733,7 +733,7 @@ "type": "Identifier", "span": { "start": 386, - "end": 399, + "end": 390, "ctxt": 0 }, "value": "arg0", @@ -760,7 +760,7 @@ "type": "Identifier", "span": { "start": 401, - "end": 414, + "end": 405, "ctxt": 0 }, "value": "arg1", @@ -787,7 +787,7 @@ "type": "Identifier", "span": { "start": 416, - "end": 429, + "end": 420, "ctxt": 0 }, "value": "arg2", diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression6_es6.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression6_es6.json index 0c321d9f69c7..db394582bf60 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression6_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression6_es6.json @@ -158,7 +158,7 @@ "type": "Identifier", "span": { "start": 118, - "end": 131, + "end": 122, "ctxt": 0 }, "value": "arg0", @@ -194,7 +194,7 @@ "type": "Identifier", "span": { "start": 133, - "end": 146, + "end": 137, "ctxt": 0 }, "value": "arg1", @@ -230,7 +230,7 @@ "type": "Identifier", "span": { "start": 148, - "end": 161, + "end": 152, "ctxt": 0 }, "value": "arg2", @@ -349,7 +349,7 @@ "type": "Identifier", "span": { "start": 190, - "end": 203, + "end": 194, "ctxt": 0 }, "value": "arg0", @@ -376,7 +376,7 @@ "type": "Identifier", "span": { "start": 205, - "end": 218, + "end": 209, "ctxt": 0 }, "value": "arg1", @@ -403,7 +403,7 @@ "type": "Identifier", "span": { "start": 220, - "end": 233, + "end": 224, "ctxt": 0 }, "value": "arg2", @@ -533,7 +533,7 @@ "type": "Identifier", "span": { "start": 273, - "end": 286, + "end": 277, "ctxt": 0 }, "value": "arg0", @@ -560,7 +560,7 @@ "type": "Identifier", "span": { "start": 288, - "end": 301, + "end": 292, "ctxt": 0 }, "value": "arg1", @@ -587,7 +587,7 @@ "type": "Identifier", "span": { "start": 303, - "end": 316, + "end": 307, "ctxt": 0 }, "value": "arg2", @@ -733,7 +733,7 @@ "type": "Identifier", "span": { "start": 358, - "end": 371, + "end": 362, "ctxt": 0 }, "value": "arg0", @@ -760,7 +760,7 @@ "type": "Identifier", "span": { "start": 373, - "end": 386, + "end": 377, "ctxt": 0 }, "value": "arg1", @@ -787,7 +787,7 @@ "type": "Identifier", "span": { "start": 388, - "end": 401, + "end": 392, "ctxt": 0 }, "value": "arg2", diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression7_es2017.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression7_es2017.json index a619f520f6a4..9d026c65c5a3 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression7_es2017.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression7_es2017.json @@ -158,7 +158,7 @@ "type": "Identifier", "span": { "start": 121, - "end": 134, + "end": 125, "ctxt": 0 }, "value": "arg0", @@ -194,7 +194,7 @@ "type": "Identifier", "span": { "start": 136, - "end": 149, + "end": 140, "ctxt": 0 }, "value": "arg1", @@ -230,7 +230,7 @@ "type": "Identifier", "span": { "start": 151, - "end": 164, + "end": 155, "ctxt": 0 }, "value": "arg2", @@ -349,7 +349,7 @@ "type": "Identifier", "span": { "start": 193, - "end": 206, + "end": 197, "ctxt": 0 }, "value": "arg0", @@ -376,7 +376,7 @@ "type": "Identifier", "span": { "start": 208, - "end": 221, + "end": 212, "ctxt": 0 }, "value": "arg1", @@ -403,7 +403,7 @@ "type": "Identifier", "span": { "start": 223, - "end": 236, + "end": 227, "ctxt": 0 }, "value": "arg2", @@ -533,7 +533,7 @@ "type": "Identifier", "span": { "start": 276, - "end": 289, + "end": 280, "ctxt": 0 }, "value": "arg0", @@ -560,7 +560,7 @@ "type": "Identifier", "span": { "start": 291, - "end": 304, + "end": 295, "ctxt": 0 }, "value": "arg1", @@ -587,7 +587,7 @@ "type": "Identifier", "span": { "start": 306, - "end": 319, + "end": 310, "ctxt": 0 }, "value": "arg2", @@ -733,7 +733,7 @@ "type": "Identifier", "span": { "start": 361, - "end": 374, + "end": 365, "ctxt": 0 }, "value": "arg0", @@ -760,7 +760,7 @@ "type": "Identifier", "span": { "start": 376, - "end": 389, + "end": 380, "ctxt": 0 }, "value": "arg1", @@ -787,7 +787,7 @@ "type": "Identifier", "span": { "start": 391, - "end": 404, + "end": 395, "ctxt": 0 }, "value": "arg2", diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression7_es5.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression7_es5.json index 62b8064db299..1f3021f5ba92 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression7_es5.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression7_es5.json @@ -158,7 +158,7 @@ "type": "Identifier", "span": { "start": 146, - "end": 159, + "end": 150, "ctxt": 0 }, "value": "arg0", @@ -194,7 +194,7 @@ "type": "Identifier", "span": { "start": 161, - "end": 174, + "end": 165, "ctxt": 0 }, "value": "arg1", @@ -230,7 +230,7 @@ "type": "Identifier", "span": { "start": 176, - "end": 189, + "end": 180, "ctxt": 0 }, "value": "arg2", @@ -349,7 +349,7 @@ "type": "Identifier", "span": { "start": 218, - "end": 231, + "end": 222, "ctxt": 0 }, "value": "arg0", @@ -376,7 +376,7 @@ "type": "Identifier", "span": { "start": 233, - "end": 246, + "end": 237, "ctxt": 0 }, "value": "arg1", @@ -403,7 +403,7 @@ "type": "Identifier", "span": { "start": 248, - "end": 261, + "end": 252, "ctxt": 0 }, "value": "arg2", @@ -533,7 +533,7 @@ "type": "Identifier", "span": { "start": 301, - "end": 314, + "end": 305, "ctxt": 0 }, "value": "arg0", @@ -560,7 +560,7 @@ "type": "Identifier", "span": { "start": 316, - "end": 329, + "end": 320, "ctxt": 0 }, "value": "arg1", @@ -587,7 +587,7 @@ "type": "Identifier", "span": { "start": 331, - "end": 344, + "end": 335, "ctxt": 0 }, "value": "arg2", @@ -733,7 +733,7 @@ "type": "Identifier", "span": { "start": 386, - "end": 399, + "end": 390, "ctxt": 0 }, "value": "arg0", @@ -760,7 +760,7 @@ "type": "Identifier", "span": { "start": 401, - "end": 414, + "end": 405, "ctxt": 0 }, "value": "arg1", @@ -787,7 +787,7 @@ "type": "Identifier", "span": { "start": 416, - "end": 429, + "end": 420, "ctxt": 0 }, "value": "arg2", diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression7_es6.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression7_es6.json index b2a05d561e56..9e6d33ebe2b8 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression7_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression7_es6.json @@ -158,7 +158,7 @@ "type": "Identifier", "span": { "start": 118, - "end": 131, + "end": 122, "ctxt": 0 }, "value": "arg0", @@ -194,7 +194,7 @@ "type": "Identifier", "span": { "start": 133, - "end": 146, + "end": 137, "ctxt": 0 }, "value": "arg1", @@ -230,7 +230,7 @@ "type": "Identifier", "span": { "start": 148, - "end": 161, + "end": 152, "ctxt": 0 }, "value": "arg2", @@ -349,7 +349,7 @@ "type": "Identifier", "span": { "start": 190, - "end": 203, + "end": 194, "ctxt": 0 }, "value": "arg0", @@ -376,7 +376,7 @@ "type": "Identifier", "span": { "start": 205, - "end": 218, + "end": 209, "ctxt": 0 }, "value": "arg1", @@ -403,7 +403,7 @@ "type": "Identifier", "span": { "start": 220, - "end": 233, + "end": 224, "ctxt": 0 }, "value": "arg2", @@ -533,7 +533,7 @@ "type": "Identifier", "span": { "start": 273, - "end": 286, + "end": 277, "ctxt": 0 }, "value": "arg0", @@ -560,7 +560,7 @@ "type": "Identifier", "span": { "start": 288, - "end": 301, + "end": 292, "ctxt": 0 }, "value": "arg1", @@ -587,7 +587,7 @@ "type": "Identifier", "span": { "start": 303, - "end": 316, + "end": 307, "ctxt": 0 }, "value": "arg2", @@ -733,7 +733,7 @@ "type": "Identifier", "span": { "start": 358, - "end": 371, + "end": 362, "ctxt": 0 }, "value": "arg0", @@ -760,7 +760,7 @@ "type": "Identifier", "span": { "start": 373, - "end": 386, + "end": 377, "ctxt": 0 }, "value": "arg1", @@ -787,7 +787,7 @@ "type": "Identifier", "span": { "start": 388, - "end": 401, + "end": 392, "ctxt": 0 }, "value": "arg2", diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression8_es2017.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression8_es2017.json index 9a75f0aec2f3..6ac60f9e0813 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression8_es2017.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression8_es2017.json @@ -158,7 +158,7 @@ "type": "Identifier", "span": { "start": 121, - "end": 134, + "end": 125, "ctxt": 0 }, "value": "arg0", @@ -194,7 +194,7 @@ "type": "Identifier", "span": { "start": 136, - "end": 149, + "end": 140, "ctxt": 0 }, "value": "arg1", @@ -230,7 +230,7 @@ "type": "Identifier", "span": { "start": 151, - "end": 164, + "end": 155, "ctxt": 0 }, "value": "arg2", @@ -349,7 +349,7 @@ "type": "Identifier", "span": { "start": 193, - "end": 206, + "end": 197, "ctxt": 0 }, "value": "arg0", @@ -376,7 +376,7 @@ "type": "Identifier", "span": { "start": 208, - "end": 221, + "end": 212, "ctxt": 0 }, "value": "arg1", @@ -403,7 +403,7 @@ "type": "Identifier", "span": { "start": 223, - "end": 236, + "end": 227, "ctxt": 0 }, "value": "arg2", @@ -533,7 +533,7 @@ "type": "Identifier", "span": { "start": 276, - "end": 289, + "end": 280, "ctxt": 0 }, "value": "arg0", @@ -560,7 +560,7 @@ "type": "Identifier", "span": { "start": 291, - "end": 304, + "end": 295, "ctxt": 0 }, "value": "arg1", @@ -587,7 +587,7 @@ "type": "Identifier", "span": { "start": 306, - "end": 319, + "end": 310, "ctxt": 0 }, "value": "arg2", @@ -733,7 +733,7 @@ "type": "Identifier", "span": { "start": 361, - "end": 374, + "end": 365, "ctxt": 0 }, "value": "arg0", @@ -760,7 +760,7 @@ "type": "Identifier", "span": { "start": 376, - "end": 389, + "end": 380, "ctxt": 0 }, "value": "arg1", @@ -787,7 +787,7 @@ "type": "Identifier", "span": { "start": 391, - "end": 404, + "end": 395, "ctxt": 0 }, "value": "arg2", diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression8_es5.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression8_es5.json index 53a1129f2d60..602e10477a42 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression8_es5.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression8_es5.json @@ -158,7 +158,7 @@ "type": "Identifier", "span": { "start": 146, - "end": 159, + "end": 150, "ctxt": 0 }, "value": "arg0", @@ -194,7 +194,7 @@ "type": "Identifier", "span": { "start": 161, - "end": 174, + "end": 165, "ctxt": 0 }, "value": "arg1", @@ -230,7 +230,7 @@ "type": "Identifier", "span": { "start": 176, - "end": 189, + "end": 180, "ctxt": 0 }, "value": "arg2", @@ -349,7 +349,7 @@ "type": "Identifier", "span": { "start": 218, - "end": 231, + "end": 222, "ctxt": 0 }, "value": "arg0", @@ -376,7 +376,7 @@ "type": "Identifier", "span": { "start": 233, - "end": 246, + "end": 237, "ctxt": 0 }, "value": "arg1", @@ -403,7 +403,7 @@ "type": "Identifier", "span": { "start": 248, - "end": 261, + "end": 252, "ctxt": 0 }, "value": "arg2", @@ -533,7 +533,7 @@ "type": "Identifier", "span": { "start": 301, - "end": 314, + "end": 305, "ctxt": 0 }, "value": "arg0", @@ -560,7 +560,7 @@ "type": "Identifier", "span": { "start": 316, - "end": 329, + "end": 320, "ctxt": 0 }, "value": "arg1", @@ -587,7 +587,7 @@ "type": "Identifier", "span": { "start": 331, - "end": 344, + "end": 335, "ctxt": 0 }, "value": "arg2", @@ -733,7 +733,7 @@ "type": "Identifier", "span": { "start": 386, - "end": 399, + "end": 390, "ctxt": 0 }, "value": "arg0", @@ -760,7 +760,7 @@ "type": "Identifier", "span": { "start": 401, - "end": 414, + "end": 405, "ctxt": 0 }, "value": "arg1", @@ -787,7 +787,7 @@ "type": "Identifier", "span": { "start": 416, - "end": 429, + "end": 420, "ctxt": 0 }, "value": "arg2", diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression8_es6.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression8_es6.json index 208dd79dd7d3..e79daf1a3556 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression8_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression8_es6.json @@ -158,7 +158,7 @@ "type": "Identifier", "span": { "start": 118, - "end": 131, + "end": 122, "ctxt": 0 }, "value": "arg0", @@ -194,7 +194,7 @@ "type": "Identifier", "span": { "start": 133, - "end": 146, + "end": 137, "ctxt": 0 }, "value": "arg1", @@ -230,7 +230,7 @@ "type": "Identifier", "span": { "start": 148, - "end": 161, + "end": 152, "ctxt": 0 }, "value": "arg2", @@ -349,7 +349,7 @@ "type": "Identifier", "span": { "start": 190, - "end": 203, + "end": 194, "ctxt": 0 }, "value": "arg0", @@ -376,7 +376,7 @@ "type": "Identifier", "span": { "start": 205, - "end": 218, + "end": 209, "ctxt": 0 }, "value": "arg1", @@ -403,7 +403,7 @@ "type": "Identifier", "span": { "start": 220, - "end": 233, + "end": 224, "ctxt": 0 }, "value": "arg2", @@ -533,7 +533,7 @@ "type": "Identifier", "span": { "start": 273, - "end": 286, + "end": 277, "ctxt": 0 }, "value": "arg0", @@ -560,7 +560,7 @@ "type": "Identifier", "span": { "start": 288, - "end": 301, + "end": 292, "ctxt": 0 }, "value": "arg1", @@ -587,7 +587,7 @@ "type": "Identifier", "span": { "start": 303, - "end": 316, + "end": 307, "ctxt": 0 }, "value": "arg2", @@ -733,7 +733,7 @@ "type": "Identifier", "span": { "start": 358, - "end": 371, + "end": 362, "ctxt": 0 }, "value": "arg0", @@ -760,7 +760,7 @@ "type": "Identifier", "span": { "start": 373, - "end": 386, + "end": 377, "ctxt": 0 }, "value": "arg1", @@ -787,7 +787,7 @@ "type": "Identifier", "span": { "start": 388, - "end": 401, + "end": 392, "ctxt": 0 }, "value": "arg2", diff --git a/crates/swc_ecma_parser/tests/tsc/bestCommonTypeOfConditionalExpressions.json b/crates/swc_ecma_parser/tests/tsc/bestCommonTypeOfConditionalExpressions.json index 9284940e9469..dbaf9c2dca13 100644 --- a/crates/swc_ecma_parser/tests/tsc/bestCommonTypeOfConditionalExpressions.json +++ b/crates/swc_ecma_parser/tests/tsc/bestCommonTypeOfConditionalExpressions.json @@ -1160,7 +1160,7 @@ "type": "Identifier", "span": { "start": 629, - "end": 638, + "end": 630, "ctxt": 0 }, "value": "x", @@ -1695,7 +1695,7 @@ "type": "Identifier", "span": { "start": 932, - "end": 936, + "end": 933, "ctxt": 0 }, "value": "t", @@ -1741,7 +1741,7 @@ "type": "Identifier", "span": { "start": 938, - "end": 942, + "end": 939, "ctxt": 0 }, "value": "u", diff --git a/crates/swc_ecma_parser/tests/tsc/bestCommonTypeOfConditionalExpressions2.json b/crates/swc_ecma_parser/tests/tsc/bestCommonTypeOfConditionalExpressions2.json index e070cea1040e..6ffeadb1d811 100644 --- a/crates/swc_ecma_parser/tests/tsc/bestCommonTypeOfConditionalExpressions2.json +++ b/crates/swc_ecma_parser/tests/tsc/bestCommonTypeOfConditionalExpressions2.json @@ -581,7 +581,7 @@ "type": "Identifier", "span": { "start": 425, - "end": 429, + "end": 426, "ctxt": 0 }, "value": "t", @@ -627,7 +627,7 @@ "type": "Identifier", "span": { "start": 431, - "end": 435, + "end": 432, "ctxt": 0 }, "value": "u", @@ -809,7 +809,7 @@ "type": "Identifier", "span": { "start": 497, - "end": 501, + "end": 498, "ctxt": 0 }, "value": "t", @@ -855,7 +855,7 @@ "type": "Identifier", "span": { "start": 503, - "end": 507, + "end": 504, "ctxt": 0 }, "value": "u", @@ -1055,7 +1055,7 @@ "type": "Identifier", "span": { "start": 654, - "end": 658, + "end": 655, "ctxt": 0 }, "value": "t", @@ -1101,7 +1101,7 @@ "type": "Identifier", "span": { "start": 660, - "end": 664, + "end": 661, "ctxt": 0 }, "value": "u", diff --git a/crates/swc_ecma_parser/tests/tsc/bestCommonTypeOfTuple.json b/crates/swc_ecma_parser/tests/tsc/bestCommonTypeOfTuple.json index 6f2410ccbbc5..0ed1c01e64a2 100644 --- a/crates/swc_ecma_parser/tests/tsc/bestCommonTypeOfTuple.json +++ b/crates/swc_ecma_parser/tests/tsc/bestCommonTypeOfTuple.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 13, - "end": 22, + "end": 14, "ctxt": 0 }, "value": "x", @@ -138,7 +138,7 @@ "type": "Identifier", "span": { "start": 63, - "end": 72, + "end": 64, "ctxt": 0 }, "value": "x", @@ -244,7 +244,7 @@ "type": "Identifier", "span": { "start": 110, - "end": 119, + "end": 111, "ctxt": 0 }, "value": "x", @@ -466,7 +466,7 @@ "type": "Identifier", "span": { "start": 193, - "end": 202, + "end": 194, "ctxt": 0 }, "value": "x", @@ -530,7 +530,7 @@ "type": "Identifier", "span": { "start": 216, - "end": 225, + "end": 217, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/bivariantInferences.json b/crates/swc_ecma_parser/tests/tsc/bivariantInferences.json index 9f850665ab76..e5d6ea6f50a3 100644 --- a/crates/swc_ecma_parser/tests/tsc/bivariantInferences.json +++ b/crates/swc_ecma_parser/tests/tsc/bivariantInferences.json @@ -91,7 +91,7 @@ "type": "Identifier", "span": { "start": 83, - "end": 105, + "end": 87, "ctxt": 0 }, "value": "this", @@ -156,7 +156,7 @@ "type": "Identifier", "span": { "start": 107, - "end": 130, + "end": 112, "ctxt": 0 }, "value": "other", diff --git a/crates/swc_ecma_parser/tests/tsc/booleanLiteralTypes1.json b/crates/swc_ecma_parser/tests/tsc/booleanLiteralTypes1.json index 1df6ca722269..de8d4f8ff118 100644 --- a/crates/swc_ecma_parser/tests/tsc/booleanLiteralTypes1.json +++ b/crates/swc_ecma_parser/tests/tsc/booleanLiteralTypes1.json @@ -481,7 +481,7 @@ "type": "Identifier", "span": { "start": 161, - "end": 176, + "end": 162, "ctxt": 0 }, "value": "a", @@ -552,7 +552,7 @@ "type": "Identifier", "span": { "start": 178, - "end": 188, + "end": 179, "ctxt": 0 }, "value": "b", @@ -700,7 +700,7 @@ "type": "Identifier", "span": { "start": 229, - "end": 244, + "end": 230, "ctxt": 0 }, "value": "a", @@ -771,7 +771,7 @@ "type": "Identifier", "span": { "start": 246, - "end": 261, + "end": 247, "ctxt": 0 }, "value": "b", @@ -1051,7 +1051,7 @@ "type": "Identifier", "span": { "start": 336, - "end": 343, + "end": 337, "ctxt": 0 }, "value": "t", @@ -1095,7 +1095,7 @@ "type": "Identifier", "span": { "start": 345, - "end": 353, + "end": 346, "ctxt": 0 }, "value": "f", @@ -1521,7 +1521,7 @@ "type": "Identifier", "span": { "start": 497, - "end": 504, + "end": 498, "ctxt": 0 }, "value": "x", @@ -1608,7 +1608,7 @@ "type": "Identifier", "span": { "start": 534, - "end": 542, + "end": 535, "ctxt": 0 }, "value": "x", @@ -1695,7 +1695,7 @@ "type": "Identifier", "span": { "start": 573, - "end": 583, + "end": 574, "ctxt": 0 }, "value": "x", @@ -1774,7 +1774,7 @@ "type": "Identifier", "span": { "start": 607, - "end": 617, + "end": 608, "ctxt": 0 }, "value": "b", @@ -2042,7 +2042,7 @@ "type": "Identifier", "span": { "start": 709, - "end": 717, + "end": 710, "ctxt": 0 }, "value": "x", @@ -2172,7 +2172,7 @@ "type": "Identifier", "span": { "start": 785, - "end": 800, + "end": 786, "ctxt": 0 }, "value": "x", @@ -2373,7 +2373,7 @@ "type": "Identifier", "span": { "start": 913, - "end": 928, + "end": 914, "ctxt": 0 }, "value": "x", @@ -2616,7 +2616,7 @@ "type": "Identifier", "span": { "start": 1068, - "end": 1083, + "end": 1069, "ctxt": 0 }, "value": "x", @@ -2797,7 +2797,7 @@ "type": "Identifier", "span": { "start": 1161, - "end": 1176, + "end": 1162, "ctxt": 0 }, "value": "x", @@ -3226,7 +3226,7 @@ "type": "Identifier", "span": { "start": 1340, - "end": 1347, + "end": 1341, "ctxt": 0 }, "value": "x", @@ -3456,7 +3456,7 @@ "type": "Identifier", "span": { "start": 1458, - "end": 1465, + "end": 1459, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/booleanLiteralTypes2.json b/crates/swc_ecma_parser/tests/tsc/booleanLiteralTypes2.json index 49d70d301f5c..746c1a195756 100644 --- a/crates/swc_ecma_parser/tests/tsc/booleanLiteralTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/booleanLiteralTypes2.json @@ -481,7 +481,7 @@ "type": "Identifier", "span": { "start": 189, - "end": 204, + "end": 190, "ctxt": 0 }, "value": "a", @@ -552,7 +552,7 @@ "type": "Identifier", "span": { "start": 206, - "end": 216, + "end": 207, "ctxt": 0 }, "value": "b", @@ -700,7 +700,7 @@ "type": "Identifier", "span": { "start": 257, - "end": 272, + "end": 258, "ctxt": 0 }, "value": "a", @@ -771,7 +771,7 @@ "type": "Identifier", "span": { "start": 274, - "end": 289, + "end": 275, "ctxt": 0 }, "value": "b", @@ -1051,7 +1051,7 @@ "type": "Identifier", "span": { "start": 364, - "end": 371, + "end": 365, "ctxt": 0 }, "value": "t", @@ -1095,7 +1095,7 @@ "type": "Identifier", "span": { "start": 373, - "end": 381, + "end": 374, "ctxt": 0 }, "value": "f", @@ -1521,7 +1521,7 @@ "type": "Identifier", "span": { "start": 525, - "end": 532, + "end": 526, "ctxt": 0 }, "value": "x", @@ -1608,7 +1608,7 @@ "type": "Identifier", "span": { "start": 562, - "end": 570, + "end": 563, "ctxt": 0 }, "value": "x", @@ -1695,7 +1695,7 @@ "type": "Identifier", "span": { "start": 601, - "end": 611, + "end": 602, "ctxt": 0 }, "value": "x", @@ -1774,7 +1774,7 @@ "type": "Identifier", "span": { "start": 635, - "end": 645, + "end": 636, "ctxt": 0 }, "value": "b", @@ -2042,7 +2042,7 @@ "type": "Identifier", "span": { "start": 737, - "end": 745, + "end": 738, "ctxt": 0 }, "value": "x", @@ -2172,7 +2172,7 @@ "type": "Identifier", "span": { "start": 813, - "end": 828, + "end": 814, "ctxt": 0 }, "value": "x", @@ -2373,7 +2373,7 @@ "type": "Identifier", "span": { "start": 941, - "end": 956, + "end": 942, "ctxt": 0 }, "value": "x", @@ -2616,7 +2616,7 @@ "type": "Identifier", "span": { "start": 1096, - "end": 1111, + "end": 1097, "ctxt": 0 }, "value": "x", @@ -2797,7 +2797,7 @@ "type": "Identifier", "span": { "start": 1189, - "end": 1204, + "end": 1190, "ctxt": 0 }, "value": "x", @@ -3226,7 +3226,7 @@ "type": "Identifier", "span": { "start": 1368, - "end": 1375, + "end": 1369, "ctxt": 0 }, "value": "x", @@ -3456,7 +3456,7 @@ "type": "Identifier", "span": { "start": 1486, - "end": 1493, + "end": 1487, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/bundlerSyntaxRestrictions.json b/crates/swc_ecma_parser/tests/tsc/bundlerSyntaxRestrictions.json index 9b004c4fa525..0a82dfec46a6 100644 --- a/crates/swc_ecma_parser/tests/tsc/bundlerSyntaxRestrictions.json +++ b/crates/swc_ecma_parser/tests/tsc/bundlerSyntaxRestrictions.json @@ -183,7 +183,7 @@ "type": "Identifier", "span": { "start": 294, - "end": 306, + "end": 298, "ctxt": 0 }, "value": "path", @@ -219,7 +219,7 @@ "type": "Identifier", "span": { "start": 308, - "end": 325, + "end": 316, "ctxt": 0 }, "value": "encoding", diff --git a/crates/swc_ecma_parser/tests/tsc/callChain.3.json b/crates/swc_ecma_parser/tests/tsc/callChain.3.json index 91d374c737be..e7056c37ba8c 100644 --- a/crates/swc_ecma_parser/tests/tsc/callChain.3.json +++ b/crates/swc_ecma_parser/tests/tsc/callChain.3.json @@ -164,7 +164,7 @@ "type": "Identifier", "span": { "start": 77, - "end": 88, + "end": 80, "ctxt": 0 }, "value": "obj", diff --git a/crates/swc_ecma_parser/tests/tsc/callChain.json b/crates/swc_ecma_parser/tests/tsc/callChain.json index 9d37061be313..eccd94933c37 100644 --- a/crates/swc_ecma_parser/tests/tsc/callChain.json +++ b/crates/swc_ecma_parser/tests/tsc/callChain.json @@ -3133,7 +3133,7 @@ "type": "Identifier", "span": { "start": 694, - "end": 708, + "end": 695, "ctxt": 0 }, "value": "f", @@ -3157,7 +3157,7 @@ "type": "Identifier", "span": { "start": 698, - "end": 702, + "end": 699, "ctxt": 0 }, "value": "a", @@ -3320,7 +3320,7 @@ "type": "Identifier", "span": { "start": 739, - "end": 748, + "end": 740, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/callChainInference.json b/crates/swc_ecma_parser/tests/tsc/callChainInference.json index cf1f7a4da9fc..8d654f212ec0 100644 --- a/crates/swc_ecma_parser/tests/tsc/callChainInference.json +++ b/crates/swc_ecma_parser/tests/tsc/callChainInference.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 66, - "end": 73, + "end": 70, "ctxt": 0 }, "value": "this", @@ -96,7 +96,7 @@ "type": "Identifier", "span": { "start": 75, - "end": 87, + "end": 78, "ctxt": 0 }, "value": "arg", diff --git a/crates/swc_ecma_parser/tests/tsc/callGenericFunctionWithIncorrectNumberOfTypeArguments.json b/crates/swc_ecma_parser/tests/tsc/callGenericFunctionWithIncorrectNumberOfTypeArguments.json index 0510593a55eb..f34ca31895b9 100644 --- a/crates/swc_ecma_parser/tests/tsc/callGenericFunctionWithIncorrectNumberOfTypeArguments.json +++ b/crates/swc_ecma_parser/tests/tsc/callGenericFunctionWithIncorrectNumberOfTypeArguments.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 121, - "end": 125, + "end": 122, "ctxt": 0 }, "value": "x", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 127, - "end": 131, + "end": 128, "ctxt": 0 }, "value": "y", @@ -935,7 +935,7 @@ "type": "Identifier", "span": { "start": 367, - "end": 371, + "end": 368, "ctxt": 0 }, "value": "x", @@ -972,7 +972,7 @@ "type": "Identifier", "span": { "start": 373, - "end": 377, + "end": 374, "ctxt": 0 }, "value": "y", @@ -1362,7 +1362,7 @@ "type": "Identifier", "span": { "start": 481, - "end": 485, + "end": 482, "ctxt": 0 }, "value": "x", @@ -1408,7 +1408,7 @@ "type": "Identifier", "span": { "start": 487, - "end": 491, + "end": 488, "ctxt": 0 }, "value": "y", @@ -1912,7 +1912,7 @@ "type": "Identifier", "span": { "start": 645, - "end": 649, + "end": 646, "ctxt": 0 }, "value": "x", @@ -1949,7 +1949,7 @@ "type": "Identifier", "span": { "start": 651, - "end": 655, + "end": 652, "ctxt": 0 }, "value": "y", @@ -2428,7 +2428,7 @@ "type": "Identifier", "span": { "start": 772, - "end": 776, + "end": 773, "ctxt": 0 }, "value": "x", @@ -2474,7 +2474,7 @@ "type": "Identifier", "span": { "start": 778, - "end": 782, + "end": 779, "ctxt": 0 }, "value": "y", @@ -3033,7 +3033,7 @@ "type": "Identifier", "span": { "start": 939, - "end": 943, + "end": 940, "ctxt": 0 }, "value": "x", @@ -3070,7 +3070,7 @@ "type": "Identifier", "span": { "start": 945, - "end": 949, + "end": 946, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/callGenericFunctionWithZeroTypeArguments.json b/crates/swc_ecma_parser/tests/tsc/callGenericFunctionWithZeroTypeArguments.json index dc4facde07db..0a912403a7a3 100644 --- a/crates/swc_ecma_parser/tests/tsc/callGenericFunctionWithZeroTypeArguments.json +++ b/crates/swc_ecma_parser/tests/tsc/callGenericFunctionWithZeroTypeArguments.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 100, - "end": 104, + "end": 101, "ctxt": 0 }, "value": "x", @@ -514,7 +514,7 @@ "type": "Identifier", "span": { "start": 214, - "end": 218, + "end": 215, "ctxt": 0 }, "value": "x", @@ -735,7 +735,7 @@ "type": "Identifier", "span": { "start": 262, - "end": 266, + "end": 263, "ctxt": 0 }, "value": "x", @@ -1034,7 +1034,7 @@ "type": "Identifier", "span": { "start": 351, - "end": 355, + "end": 352, "ctxt": 0 }, "value": "x", @@ -1326,7 +1326,7 @@ "type": "Identifier", "span": { "start": 411, - "end": 415, + "end": 412, "ctxt": 0 }, "value": "x", @@ -1657,7 +1657,7 @@ "type": "Identifier", "span": { "start": 502, - "end": 506, + "end": 503, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/callNonGenericFunctionWithTypeArguments.json b/crates/swc_ecma_parser/tests/tsc/callNonGenericFunctionWithTypeArguments.json index 063b1992d336..3b43b686d829 100644 --- a/crates/swc_ecma_parser/tests/tsc/callNonGenericFunctionWithTypeArguments.json +++ b/crates/swc_ecma_parser/tests/tsc/callNonGenericFunctionWithTypeArguments.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 125, - "end": 134, + "end": 126, "ctxt": 0 }, "value": "x", @@ -414,7 +414,7 @@ "type": "Identifier", "span": { "start": 253, - "end": 262, + "end": 254, "ctxt": 0 }, "value": "x", @@ -601,7 +601,7 @@ "type": "Identifier", "span": { "start": 313, - "end": 322, + "end": 314, "ctxt": 0 }, "value": "x", @@ -850,7 +850,7 @@ "type": "Identifier", "span": { "start": 409, - "end": 418, + "end": 410, "ctxt": 0 }, "value": "x", @@ -1108,7 +1108,7 @@ "type": "Identifier", "span": { "start": 481, - "end": 490, + "end": 482, "ctxt": 0 }, "value": "x", @@ -1357,7 +1357,7 @@ "type": "Identifier", "span": { "start": 579, - "end": 588, + "end": 580, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/callOverload.json b/crates/swc_ecma_parser/tests/tsc/callOverload.json index 4da9bd268472..3f8e0db19359 100644 --- a/crates/swc_ecma_parser/tests/tsc/callOverload.json +++ b/crates/swc_ecma_parser/tests/tsc/callOverload.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 21, - "end": 27, + "end": 22, "ctxt": 0 }, "value": "x", @@ -111,7 +111,7 @@ "type": "Identifier", "span": { "start": 61, - "end": 67, + "end": 62, "ctxt": 0 }, "value": "x", @@ -147,7 +147,7 @@ "type": "Identifier", "span": { "start": 69, - "end": 75, + "end": 70, "ctxt": 0 }, "value": "y", @@ -226,7 +226,7 @@ "type": "Identifier", "span": { "start": 110, - "end": 116, + "end": 111, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance.json b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance.json index 8a4d3a9136b7..266534d089bc 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance.json @@ -73,7 +73,7 @@ "type": "Identifier", "span": { "start": 74, - "end": 83, + "end": 75, "ctxt": 0 }, "value": "x", @@ -128,7 +128,7 @@ "type": "Identifier", "span": { "start": 101, - "end": 110, + "end": 102, "ctxt": 0 }, "value": "x", @@ -155,7 +155,7 @@ "type": "Identifier", "span": { "start": 112, - "end": 121, + "end": 113, "ctxt": 0 }, "value": "y", @@ -261,7 +261,7 @@ "type": "Identifier", "span": { "start": 203, - "end": 212, + "end": 204, "ctxt": 0 }, "value": "x", @@ -316,7 +316,7 @@ "type": "Identifier", "span": { "start": 264, - "end": 273, + "end": 265, "ctxt": 0 }, "value": "x", @@ -343,7 +343,7 @@ "type": "Identifier", "span": { "start": 275, - "end": 284, + "end": 276, "ctxt": 0 }, "value": "y", @@ -398,7 +398,7 @@ "type": "Identifier", "span": { "start": 340, - "end": 344, + "end": 341, "ctxt": 0 }, "value": "x", @@ -526,7 +526,7 @@ "type": "Identifier", "span": { "start": 445, - "end": 454, + "end": 446, "ctxt": 0 }, "value": "x", @@ -632,7 +632,7 @@ "type": "Identifier", "span": { "start": 540, - "end": 549, + "end": 541, "ctxt": 0 }, "value": "x", @@ -738,7 +738,7 @@ "type": "Identifier", "span": { "start": 678, - "end": 682, + "end": 679, "ctxt": 0 }, "value": "x", @@ -925,7 +925,7 @@ "type": "Identifier", "span": { "start": 821, - "end": 830, + "end": 822, "ctxt": 0 }, "value": "x", @@ -1012,7 +1012,7 @@ "type": "Identifier", "span": { "start": 854, - "end": 863, + "end": 855, "ctxt": 0 }, "value": "x", @@ -1039,7 +1039,7 @@ "type": "Identifier", "span": { "start": 865, - "end": 874, + "end": 866, "ctxt": 0 }, "value": "y", @@ -1126,7 +1126,7 @@ "type": "Identifier", "span": { "start": 901, - "end": 905, + "end": 902, "ctxt": 0 }, "value": "x", @@ -1306,7 +1306,7 @@ "type": "Identifier", "span": { "start": 992, - "end": 1001, + "end": 993, "ctxt": 0 }, "value": "x", @@ -1393,7 +1393,7 @@ "type": "Identifier", "span": { "start": 1059, - "end": 1068, + "end": 1060, "ctxt": 0 }, "value": "x", @@ -1420,7 +1420,7 @@ "type": "Identifier", "span": { "start": 1070, - "end": 1079, + "end": 1071, "ctxt": 0 }, "value": "y", @@ -1507,7 +1507,7 @@ "type": "Identifier", "span": { "start": 1141, - "end": 1145, + "end": 1142, "ctxt": 0 }, "value": "x", @@ -1667,7 +1667,7 @@ "type": "Identifier", "span": { "start": 1251, - "end": 1260, + "end": 1252, "ctxt": 0 }, "value": "x", @@ -1754,7 +1754,7 @@ "type": "Identifier", "span": { "start": 1289, - "end": 1293, + "end": 1290, "ctxt": 0 }, "value": "x", @@ -1944,7 +1944,7 @@ "type": "Identifier", "span": { "start": 1379, - "end": 1388, + "end": 1380, "ctxt": 0 }, "value": "x", @@ -2082,7 +2082,7 @@ "type": "Identifier", "span": { "start": 1523, - "end": 1527, + "end": 1524, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance2.json b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance2.json index b254b7e0510a..42d39a0a9660 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance2.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance2.json @@ -390,7 +390,7 @@ "type": "Identifier", "span": { "start": 312, - "end": 321, + "end": 313, "ctxt": 0 }, "value": "x", @@ -485,7 +485,7 @@ "type": "Identifier", "span": { "start": 345, - "end": 354, + "end": 346, "ctxt": 0 }, "value": "x", @@ -580,7 +580,7 @@ "type": "Identifier", "span": { "start": 378, - "end": 387, + "end": 379, "ctxt": 0 }, "value": "x", @@ -667,7 +667,7 @@ "type": "Identifier", "span": { "start": 407, - "end": 416, + "end": 408, "ctxt": 0 }, "value": "x", @@ -694,7 +694,7 @@ "type": "Identifier", "span": { "start": 418, - "end": 427, + "end": 419, "ctxt": 0 }, "value": "y", @@ -781,7 +781,7 @@ "type": "Identifier", "span": { "start": 449, - "end": 475, + "end": 450, "ctxt": 0 }, "value": "x", @@ -805,7 +805,7 @@ "type": "Identifier", "span": { "start": 453, - "end": 464, + "end": 456, "ctxt": 0 }, "value": "arg", @@ -914,7 +914,7 @@ "type": "Identifier", "span": { "start": 497, - "end": 522, + "end": 498, "ctxt": 0 }, "value": "x", @@ -938,7 +938,7 @@ "type": "Identifier", "span": { "start": 501, - "end": 510, + "end": 504, "ctxt": 0 }, "value": "arg", @@ -1077,7 +1077,7 @@ "type": "Identifier", "span": { "start": 542, - "end": 567, + "end": 543, "ctxt": 0 }, "value": "x", @@ -1101,7 +1101,7 @@ "type": "Identifier", "span": { "start": 546, - "end": 555, + "end": 549, "ctxt": 0 }, "value": "arg", @@ -1187,7 +1187,7 @@ "type": "Identifier", "span": { "start": 573, - "end": 580, + "end": 574, "ctxt": 0 }, "value": "r", @@ -1296,7 +1296,7 @@ "type": "Identifier", "span": { "start": 603, - "end": 628, + "end": 604, "ctxt": 0 }, "value": "x", @@ -1320,7 +1320,7 @@ "type": "Identifier", "span": { "start": 607, - "end": 616, + "end": 610, "ctxt": 0 }, "value": "arg", @@ -1389,7 +1389,7 @@ "type": "Identifier", "span": { "start": 630, - "end": 656, + "end": 631, "ctxt": 0 }, "value": "y", @@ -1413,7 +1413,7 @@ "type": "Identifier", "span": { "start": 634, - "end": 644, + "end": 638, "ctxt": 0 }, "value": "arg2", @@ -1499,7 +1499,7 @@ "type": "Identifier", "span": { "start": 662, - "end": 669, + "end": 663, "ctxt": 0 }, "value": "r", @@ -1608,7 +1608,7 @@ "type": "Identifier", "span": { "start": 692, - "end": 717, + "end": 693, "ctxt": 0 }, "value": "x", @@ -1632,7 +1632,7 @@ "type": "Identifier", "span": { "start": 696, - "end": 705, + "end": 699, "ctxt": 0 }, "value": "arg", @@ -1701,7 +1701,7 @@ "type": "Identifier", "span": { "start": 719, - "end": 745, + "end": 720, "ctxt": 0 }, "value": "y", @@ -1725,7 +1725,7 @@ "type": "Identifier", "span": { "start": 723, - "end": 733, + "end": 727, "ctxt": 0 }, "value": "arg2", @@ -1811,7 +1811,7 @@ "type": "Identifier", "span": { "start": 751, - "end": 758, + "end": 752, "ctxt": 0 }, "value": "r", @@ -2049,7 +2049,7 @@ "type": "Identifier", "span": { "start": 821, - "end": 839, + "end": 822, "ctxt": 0 }, "value": "x", @@ -2118,7 +2118,7 @@ "type": "Identifier", "span": { "start": 841, - "end": 872, + "end": 842, "ctxt": 0 }, "value": "y", @@ -2298,7 +2298,7 @@ "type": "Identifier", "span": { "start": 893, - "end": 907, + "end": 894, "ctxt": 0 }, "value": "x", @@ -2363,7 +2363,7 @@ "type": "Identifier", "span": { "start": 909, - "end": 927, + "end": 910, "ctxt": 0 }, "value": "y", @@ -2526,7 +2526,7 @@ "type": "Identifier", "span": { "start": 958, - "end": 972, + "end": 959, "ctxt": 0 }, "value": "x", @@ -2591,7 +2591,7 @@ "type": "Identifier", "span": { "start": 974, - "end": 991, + "end": 975, "ctxt": 0 }, "value": "y", @@ -2754,7 +2754,7 @@ "type": "Identifier", "span": { "start": 1022, - "end": 1049, + "end": 1023, "ctxt": 0 }, "value": "x", @@ -2942,7 +2942,7 @@ "type": "Identifier", "span": { "start": 1082, - "end": 1091, + "end": 1083, "ctxt": 0 }, "value": "x", @@ -3005,7 +3005,7 @@ "type": "Identifier", "span": { "start": 1113, - "end": 1122, + "end": 1114, "ctxt": 0 }, "value": "x", @@ -3110,7 +3110,7 @@ "type": "Identifier", "span": { "start": 1181, - "end": 1185, + "end": 1182, "ctxt": 0 }, "value": "x", @@ -3233,7 +3233,7 @@ "type": "Identifier", "span": { "start": 1223, - "end": 1227, + "end": 1224, "ctxt": 0 }, "value": "x", @@ -3398,7 +3398,7 @@ "type": "Identifier", "span": { "start": 1267, - "end": 1291, + "end": 1268, "ctxt": 0 }, "value": "x", @@ -3422,7 +3422,7 @@ "type": "Identifier", "span": { "start": 1271, - "end": 1280, + "end": 1272, "ctxt": 0 }, "value": "a", @@ -3507,7 +3507,7 @@ "type": "Identifier", "span": { "start": 1313, - "end": 1337, + "end": 1314, "ctxt": 0 }, "value": "x", @@ -3531,7 +3531,7 @@ "type": "Identifier", "span": { "start": 1317, - "end": 1326, + "end": 1318, "ctxt": 0 }, "value": "a", @@ -3658,7 +3658,7 @@ "type": "Identifier", "span": { "start": 1377, - "end": 1457, + "end": 1378, "ctxt": 0 }, "value": "x", @@ -3690,7 +3690,7 @@ "type": "Identifier", "span": { "start": 1395, - "end": 1404, + "end": 1396, "ctxt": 0 }, "value": "a", @@ -3745,7 +3745,7 @@ "type": "Identifier", "span": { "start": 1428, - "end": 1437, + "end": 1429, "ctxt": 0 }, "value": "a", @@ -3832,7 +3832,7 @@ "type": "Identifier", "span": { "start": 1476, - "end": 1554, + "end": 1477, "ctxt": 0 }, "value": "x", @@ -3864,7 +3864,7 @@ "type": "Identifier", "span": { "start": 1494, - "end": 1504, + "end": 1495, "ctxt": 0 }, "value": "a", @@ -3919,7 +3919,7 @@ "type": "Identifier", "span": { "start": 1529, - "end": 1536, + "end": 1530, "ctxt": 0 }, "value": "a", @@ -4111,7 +4111,7 @@ "type": "Identifier", "span": { "start": 1627, - "end": 1631, + "end": 1628, "ctxt": 0 }, "value": "x", @@ -4258,7 +4258,7 @@ "type": "Identifier", "span": { "start": 1710, - "end": 1714, + "end": 1711, "ctxt": 0 }, "value": "x", @@ -4395,7 +4395,7 @@ "type": "Identifier", "span": { "start": 1747, - "end": 1751, + "end": 1748, "ctxt": 0 }, "value": "x", @@ -4534,7 +4534,7 @@ "type": "Identifier", "span": { "start": 1804, - "end": 1808, + "end": 1805, "ctxt": 0 }, "value": "x", @@ -4571,7 +4571,7 @@ "type": "Identifier", "span": { "start": 1810, - "end": 1814, + "end": 1811, "ctxt": 0 }, "value": "y", @@ -4733,7 +4733,7 @@ "type": "Identifier", "span": { "start": 1907, - "end": 1923, + "end": 1908, "ctxt": 0 }, "value": "x", @@ -4757,7 +4757,7 @@ "type": "Identifier", "span": { "start": 1911, - "end": 1917, + "end": 1914, "ctxt": 0 }, "value": "arg", @@ -4951,7 +4951,7 @@ "type": "Identifier", "span": { "start": 2037, - "end": 2053, + "end": 2038, "ctxt": 0 }, "value": "x", @@ -4975,7 +4975,7 @@ "type": "Identifier", "span": { "start": 2041, - "end": 2047, + "end": 2044, "ctxt": 0 }, "value": "arg", @@ -5205,7 +5205,7 @@ "type": "Identifier", "span": { "start": 2154, - "end": 2170, + "end": 2155, "ctxt": 0 }, "value": "x", @@ -5229,7 +5229,7 @@ "type": "Identifier", "span": { "start": 2158, - "end": 2164, + "end": 2161, "ctxt": 0 }, "value": "arg", @@ -5406,7 +5406,7 @@ "type": "Identifier", "span": { "start": 2176, - "end": 2180, + "end": 2177, "ctxt": 0 }, "value": "r", @@ -5515,7 +5515,7 @@ "type": "Identifier", "span": { "start": 2238, - "end": 2254, + "end": 2239, "ctxt": 0 }, "value": "x", @@ -5539,7 +5539,7 @@ "type": "Identifier", "span": { "start": 2242, - "end": 2248, + "end": 2245, "ctxt": 0 }, "value": "arg", @@ -5608,7 +5608,7 @@ "type": "Identifier", "span": { "start": 2256, - "end": 2273, + "end": 2257, "ctxt": 0 }, "value": "y", @@ -5632,7 +5632,7 @@ "type": "Identifier", "span": { "start": 2260, - "end": 2267, + "end": 2264, "ctxt": 0 }, "value": "arg2", @@ -5809,7 +5809,7 @@ "type": "Identifier", "span": { "start": 2279, - "end": 2283, + "end": 2280, "ctxt": 0 }, "value": "r", @@ -5918,7 +5918,7 @@ "type": "Identifier", "span": { "start": 2341, - "end": 2357, + "end": 2342, "ctxt": 0 }, "value": "x", @@ -5942,7 +5942,7 @@ "type": "Identifier", "span": { "start": 2345, - "end": 2351, + "end": 2348, "ctxt": 0 }, "value": "arg", @@ -6011,7 +6011,7 @@ "type": "Identifier", "span": { "start": 2359, - "end": 2404, + "end": 2360, "ctxt": 0 }, "value": "y", @@ -6035,7 +6035,7 @@ "type": "Identifier", "span": { "start": 2363, - "end": 2398, + "end": 2367, "ctxt": 0 }, "value": "arg2", @@ -6285,7 +6285,7 @@ "type": "Identifier", "span": { "start": 2410, - "end": 2414, + "end": 2411, "ctxt": 0 }, "value": "r", @@ -6573,7 +6573,7 @@ "type": "Identifier", "span": { "start": 2549, - "end": 2553, + "end": 2550, "ctxt": 0 }, "value": "x", @@ -6610,7 +6610,7 @@ "type": "Identifier", "span": { "start": 2555, - "end": 2559, + "end": 2556, "ctxt": 0 }, "value": "y", @@ -6767,7 +6767,7 @@ "type": "Identifier", "span": { "start": 2606, - "end": 2620, + "end": 2607, "ctxt": 0 }, "value": "x", @@ -6832,7 +6832,7 @@ "type": "Identifier", "span": { "start": 2622, - "end": 2626, + "end": 2623, "ctxt": 0 }, "value": "y", @@ -7045,7 +7045,7 @@ "type": "Identifier", "span": { "start": 2719, - "end": 2733, + "end": 2720, "ctxt": 0 }, "value": "x", @@ -7110,7 +7110,7 @@ "type": "Identifier", "span": { "start": 2735, - "end": 2739, + "end": 2736, "ctxt": 0 }, "value": "y", @@ -7295,7 +7295,7 @@ "type": "Identifier", "span": { "start": 2856, - "end": 2873, + "end": 2857, "ctxt": 0 }, "value": "x", @@ -7550,7 +7550,7 @@ "type": "Identifier", "span": { "start": 2900, - "end": 2904, + "end": 2901, "ctxt": 0 }, "value": "x", @@ -7697,7 +7697,7 @@ "type": "Identifier", "span": { "start": 2946, - "end": 2950, + "end": 2947, "ctxt": 0 }, "value": "x", @@ -7852,7 +7852,7 @@ "type": "Identifier", "span": { "start": 2984, - "end": 2998, + "end": 2985, "ctxt": 0 }, "value": "x", @@ -7876,7 +7876,7 @@ "type": "Identifier", "span": { "start": 2988, - "end": 2992, + "end": 2989, "ctxt": 0 }, "value": "a", @@ -8055,7 +8055,7 @@ "type": "Identifier", "span": { "start": 3027, - "end": 3041, + "end": 3028, "ctxt": 0 }, "value": "x", @@ -8079,7 +8079,7 @@ "type": "Identifier", "span": { "start": 3031, - "end": 3035, + "end": 3032, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance3.json b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance3.json index 8295cde91dc3..376bb35b49ed 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance3.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance3.json @@ -444,7 +444,7 @@ "type": "Identifier", "span": { "start": 462, - "end": 471, + "end": 463, "ctxt": 0 }, "value": "x", @@ -539,7 +539,7 @@ "type": "Identifier", "span": { "start": 503, - "end": 528, + "end": 504, "ctxt": 0 }, "value": "x", @@ -563,7 +563,7 @@ "type": "Identifier", "span": { "start": 507, - "end": 516, + "end": 510, "ctxt": 0 }, "value": "arg", @@ -649,7 +649,7 @@ "type": "Identifier", "span": { "start": 534, - "end": 541, + "end": 535, "ctxt": 0 }, "value": "r", @@ -758,7 +758,7 @@ "type": "Identifier", "span": { "start": 573, - "end": 598, + "end": 574, "ctxt": 0 }, "value": "x", @@ -782,7 +782,7 @@ "type": "Identifier", "span": { "start": 577, - "end": 586, + "end": 580, "ctxt": 0 }, "value": "arg", @@ -851,7 +851,7 @@ "type": "Identifier", "span": { "start": 600, - "end": 626, + "end": 601, "ctxt": 0 }, "value": "y", @@ -875,7 +875,7 @@ "type": "Identifier", "span": { "start": 604, - "end": 614, + "end": 608, "ctxt": 0 }, "value": "arg2", @@ -961,7 +961,7 @@ "type": "Identifier", "span": { "start": 632, - "end": 639, + "end": 633, "ctxt": 0 }, "value": "r", @@ -1199,7 +1199,7 @@ "type": "Identifier", "span": { "start": 712, - "end": 730, + "end": 713, "ctxt": 0 }, "value": "x", @@ -1268,7 +1268,7 @@ "type": "Identifier", "span": { "start": 732, - "end": 763, + "end": 733, "ctxt": 0 }, "value": "y", @@ -1448,7 +1448,7 @@ "type": "Identifier", "span": { "start": 792, - "end": 806, + "end": 793, "ctxt": 0 }, "value": "x", @@ -1513,7 +1513,7 @@ "type": "Identifier", "span": { "start": 808, - "end": 826, + "end": 809, "ctxt": 0 }, "value": "y", @@ -1684,7 +1684,7 @@ "type": "Identifier", "span": { "start": 883, - "end": 892, + "end": 884, "ctxt": 0 }, "value": "x", @@ -1747,7 +1747,7 @@ "type": "Identifier", "span": { "start": 922, - "end": 931, + "end": 923, "ctxt": 0 }, "value": "x", @@ -1844,7 +1844,7 @@ "type": "Identifier", "span": { "start": 977, - "end": 1004, + "end": 978, "ctxt": 0 }, "value": "x", @@ -2022,7 +2022,7 @@ "type": "Identifier", "span": { "start": 1159, - "end": 1264, + "end": 1160, "ctxt": 0 }, "value": "x", @@ -2054,7 +2054,7 @@ "type": "Identifier", "span": { "start": 1185, - "end": 1194, + "end": 1186, "ctxt": 0 }, "value": "a", @@ -2109,7 +2109,7 @@ "type": "Identifier", "span": { "start": 1226, - "end": 1236, + "end": 1227, "ctxt": 0 }, "value": "a", @@ -2196,7 +2196,7 @@ "type": "Identifier", "span": { "start": 1294, - "end": 1403, + "end": 1295, "ctxt": 0 }, "value": "x", @@ -2228,7 +2228,7 @@ "type": "Identifier", "span": { "start": 1320, - "end": 1330, + "end": 1321, "ctxt": 0 }, "value": "a", @@ -2283,7 +2283,7 @@ "type": "Identifier", "span": { "start": 1363, - "end": 1374, + "end": 1364, "ctxt": 0 }, "value": "a", @@ -2412,7 +2412,7 @@ "type": "Identifier", "span": { "start": 1468, - "end": 1587, + "end": 1469, "ctxt": 0 }, "value": "x", @@ -2444,7 +2444,7 @@ "type": "Identifier", "span": { "start": 1513, - "end": 1517, + "end": 1514, "ctxt": 0 }, "value": "a", @@ -2569,7 +2569,7 @@ "type": "Identifier", "span": { "start": 1560, - "end": 1564, + "end": 1561, "ctxt": 0 }, "value": "a", @@ -2726,7 +2726,7 @@ "type": "Identifier", "span": { "start": 1614, - "end": 1734, + "end": 1615, "ctxt": 0 }, "value": "x", @@ -2758,7 +2758,7 @@ "type": "Identifier", "span": { "start": 1660, - "end": 1664, + "end": 1661, "ctxt": 0 }, "value": "a", @@ -2883,7 +2883,7 @@ "type": "Identifier", "span": { "start": 1707, - "end": 1711, + "end": 1708, "ctxt": 0 }, "value": "a", @@ -3125,7 +3125,7 @@ "type": "Identifier", "span": { "start": 1825, - "end": 1829, + "end": 1826, "ctxt": 0 }, "value": "x", @@ -3401,7 +3401,7 @@ "type": "Identifier", "span": { "start": 2017, - "end": 2021, + "end": 2018, "ctxt": 0 }, "value": "x", @@ -3567,7 +3567,7 @@ "type": "Identifier", "span": { "start": 2291, - "end": 2307, + "end": 2292, "ctxt": 0 }, "value": "x", @@ -3591,7 +3591,7 @@ "type": "Identifier", "span": { "start": 2295, - "end": 2301, + "end": 2298, "ctxt": 0 }, "value": "arg", @@ -3809,7 +3809,7 @@ "type": "Identifier", "span": { "start": 2313, - "end": 2317, + "end": 2314, "ctxt": 0 }, "value": "r", @@ -3969,7 +3969,7 @@ "type": "Identifier", "span": { "start": 2421, - "end": 2437, + "end": 2422, "ctxt": 0 }, "value": "x", @@ -3993,7 +3993,7 @@ "type": "Identifier", "span": { "start": 2425, - "end": 2431, + "end": 2428, "ctxt": 0 }, "value": "arg", @@ -4062,7 +4062,7 @@ "type": "Identifier", "span": { "start": 2439, - "end": 2471, + "end": 2440, "ctxt": 0 }, "value": "y", @@ -4086,7 +4086,7 @@ "type": "Identifier", "span": { "start": 2443, - "end": 2465, + "end": 2447, "ctxt": 0 }, "value": "arg2", @@ -4295,7 +4295,7 @@ "type": "Identifier", "span": { "start": 2477, - "end": 2481, + "end": 2478, "ctxt": 0 }, "value": "r", @@ -4685,7 +4685,7 @@ "type": "Identifier", "span": { "start": 2777, - "end": 2781, + "end": 2778, "ctxt": 0 }, "value": "x", @@ -4722,7 +4722,7 @@ "type": "Identifier", "span": { "start": 2783, - "end": 2787, + "end": 2784, "ctxt": 0 }, "value": "y", @@ -4930,7 +4930,7 @@ "type": "Identifier", "span": { "start": 2993, - "end": 3007, + "end": 2994, "ctxt": 0 }, "value": "x", @@ -4995,7 +4995,7 @@ "type": "Identifier", "span": { "start": 3009, - "end": 3023, + "end": 3010, "ctxt": 0 }, "value": "y", @@ -5259,7 +5259,7 @@ "type": "Identifier", "span": { "start": 3155, - "end": 3172, + "end": 3156, "ctxt": 0 }, "value": "x", @@ -5542,7 +5542,7 @@ "type": "Identifier", "span": { "start": 3314, - "end": 3331, + "end": 3315, "ctxt": 0 }, "value": "x", @@ -5833,7 +5833,7 @@ "type": "Identifier", "span": { "start": 3644, - "end": 3658, + "end": 3645, "ctxt": 0 }, "value": "x", @@ -5857,7 +5857,7 @@ "type": "Identifier", "span": { "start": 3648, - "end": 3652, + "end": 3649, "ctxt": 0 }, "value": "a", @@ -6087,7 +6087,7 @@ "type": "Identifier", "span": { "start": 3733, - "end": 3747, + "end": 3734, "ctxt": 0 }, "value": "x", @@ -6111,7 +6111,7 @@ "type": "Identifier", "span": { "start": 3737, - "end": 3741, + "end": 3738, "ctxt": 0 }, "value": "a", @@ -6341,7 +6341,7 @@ "type": "Identifier", "span": { "start": 4027, - "end": 4031, + "end": 4028, "ctxt": 0 }, "value": "x", @@ -6539,7 +6539,7 @@ "type": "Identifier", "span": { "start": 4105, - "end": 4109, + "end": 4106, "ctxt": 0 }, "value": "x", @@ -6707,7 +6707,7 @@ "type": "Identifier", "span": { "start": 4234, - "end": 4238, + "end": 4235, "ctxt": 0 }, "value": "x", @@ -6895,7 +6895,7 @@ "type": "Identifier", "span": { "start": 4317, - "end": 4321, + "end": 4318, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance4.json b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance4.json index 3a30b034f0e1..39f69c5ded94 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance4.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance4.json @@ -390,7 +390,7 @@ "type": "Identifier", "span": { "start": 315, - "end": 319, + "end": 316, "ctxt": 0 }, "value": "x", @@ -537,7 +537,7 @@ "type": "Identifier", "span": { "start": 341, - "end": 345, + "end": 342, "ctxt": 0 }, "value": "x", @@ -674,7 +674,7 @@ "type": "Identifier", "span": { "start": 372, - "end": 376, + "end": 373, "ctxt": 0 }, "value": "x", @@ -803,7 +803,7 @@ "type": "Identifier", "span": { "start": 401, - "end": 405, + "end": 402, "ctxt": 0 }, "value": "x", @@ -840,7 +840,7 @@ "type": "Identifier", "span": { "start": 407, - "end": 411, + "end": 408, "ctxt": 0 }, "value": "y", @@ -992,7 +992,7 @@ "type": "Identifier", "span": { "start": 438, - "end": 454, + "end": 439, "ctxt": 0 }, "value": "x", @@ -1016,7 +1016,7 @@ "type": "Identifier", "span": { "start": 442, - "end": 448, + "end": 445, "ctxt": 0 }, "value": "arg", @@ -1210,7 +1210,7 @@ "type": "Identifier", "span": { "start": 487, - "end": 509, + "end": 488, "ctxt": 0 }, "value": "x", @@ -1234,7 +1234,7 @@ "type": "Identifier", "span": { "start": 491, - "end": 497, + "end": 494, "ctxt": 0 }, "value": "arg", @@ -1423,7 +1423,7 @@ "type": "Identifier", "span": { "start": 530, - "end": 543, + "end": 531, "ctxt": 0 }, "value": "x", @@ -1502,7 +1502,7 @@ "type": "Identifier", "span": { "start": 545, - "end": 566, + "end": 546, "ctxt": 0 }, "value": "y", @@ -1734,7 +1734,7 @@ "type": "Identifier", "span": { "start": 590, - "end": 607, + "end": 591, "ctxt": 0 }, "value": "x", @@ -1974,7 +1974,7 @@ "type": "Identifier", "span": { "start": 643, - "end": 660, + "end": 644, "ctxt": 0 }, "value": "x", @@ -2240,7 +2240,7 @@ "type": "Identifier", "span": { "start": 709, - "end": 723, + "end": 710, "ctxt": 0 }, "value": "x", @@ -2264,7 +2264,7 @@ "type": "Identifier", "span": { "start": 713, - "end": 717, + "end": 714, "ctxt": 0 }, "value": "a", @@ -2429,7 +2429,7 @@ "type": "Identifier", "span": { "start": 756, - "end": 770, + "end": 757, "ctxt": 0 }, "value": "x", @@ -2453,7 +2453,7 @@ "type": "Identifier", "span": { "start": 760, - "end": 764, + "end": 761, "ctxt": 0 }, "value": "a", @@ -2660,7 +2660,7 @@ "type": "Identifier", "span": { "start": 813, - "end": 908, + "end": 814, "ctxt": 0 }, "value": "x", @@ -2692,7 +2692,7 @@ "type": "Identifier", "span": { "start": 850, - "end": 854, + "end": 851, "ctxt": 0 }, "value": "a", @@ -2817,7 +2817,7 @@ "type": "Identifier", "span": { "start": 889, - "end": 893, + "end": 890, "ctxt": 0 }, "value": "a", @@ -2974,7 +2974,7 @@ "type": "Identifier", "span": { "start": 927, - "end": 1023, + "end": 928, "ctxt": 0 }, "value": "x", @@ -3006,7 +3006,7 @@ "type": "Identifier", "span": { "start": 965, - "end": 969, + "end": 966, "ctxt": 0 }, "value": "a", @@ -3131,7 +3131,7 @@ "type": "Identifier", "span": { "start": 1004, - "end": 1008, + "end": 1005, "ctxt": 0 }, "value": "a", @@ -3373,7 +3373,7 @@ "type": "Identifier", "span": { "start": 1096, - "end": 1100, + "end": 1097, "ctxt": 0 }, "value": "x", @@ -3520,7 +3520,7 @@ "type": "Identifier", "span": { "start": 1179, - "end": 1183, + "end": 1180, "ctxt": 0 }, "value": "x", @@ -3657,7 +3657,7 @@ "type": "Identifier", "span": { "start": 1216, - "end": 1220, + "end": 1217, "ctxt": 0 }, "value": "x", @@ -3796,7 +3796,7 @@ "type": "Identifier", "span": { "start": 1273, - "end": 1277, + "end": 1274, "ctxt": 0 }, "value": "x", @@ -3833,7 +3833,7 @@ "type": "Identifier", "span": { "start": 1279, - "end": 1283, + "end": 1280, "ctxt": 0 }, "value": "y", @@ -3985,7 +3985,7 @@ "type": "Identifier", "span": { "start": 1381, - "end": 1397, + "end": 1382, "ctxt": 0 }, "value": "x", @@ -4009,7 +4009,7 @@ "type": "Identifier", "span": { "start": 1385, - "end": 1391, + "end": 1388, "ctxt": 0 }, "value": "arg", @@ -4203,7 +4203,7 @@ "type": "Identifier", "span": { "start": 1511, - "end": 1527, + "end": 1512, "ctxt": 0 }, "value": "x", @@ -4227,7 +4227,7 @@ "type": "Identifier", "span": { "start": 1515, - "end": 1521, + "end": 1518, "ctxt": 0 }, "value": "arg", @@ -4457,7 +4457,7 @@ "type": "Identifier", "span": { "start": 1600, - "end": 1613, + "end": 1601, "ctxt": 0 }, "value": "x", @@ -4536,7 +4536,7 @@ "type": "Identifier", "span": { "start": 1615, - "end": 1636, + "end": 1616, "ctxt": 0 }, "value": "y", @@ -4791,7 +4791,7 @@ "type": "Identifier", "span": { "start": 1669, - "end": 1687, + "end": 1670, "ctxt": 0 }, "value": "x", @@ -5054,7 +5054,7 @@ "type": "Identifier", "span": { "start": 1730, - "end": 1747, + "end": 1731, "ctxt": 0 }, "value": "x", @@ -5294,7 +5294,7 @@ "type": "Identifier", "span": { "start": 1805, - "end": 1819, + "end": 1806, "ctxt": 0 }, "value": "x", @@ -5318,7 +5318,7 @@ "type": "Identifier", "span": { "start": 1809, - "end": 1813, + "end": 1810, "ctxt": 0 }, "value": "a", @@ -5497,7 +5497,7 @@ "type": "Identifier", "span": { "start": 1845, - "end": 1862, + "end": 1846, "ctxt": 0 }, "value": "x", @@ -5521,7 +5521,7 @@ "type": "Identifier", "span": { "start": 1852, - "end": 1856, + "end": 1853, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance5.json b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance5.json index 5cd05d9b610c..71392eeb132e 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance5.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance5.json @@ -390,7 +390,7 @@ "type": "Identifier", "span": { "start": 417, - "end": 426, + "end": 418, "ctxt": 0 }, "value": "x", @@ -485,7 +485,7 @@ "type": "Identifier", "span": { "start": 450, - "end": 459, + "end": 451, "ctxt": 0 }, "value": "x", @@ -580,7 +580,7 @@ "type": "Identifier", "span": { "start": 483, - "end": 492, + "end": 484, "ctxt": 0 }, "value": "x", @@ -667,7 +667,7 @@ "type": "Identifier", "span": { "start": 512, - "end": 521, + "end": 513, "ctxt": 0 }, "value": "x", @@ -694,7 +694,7 @@ "type": "Identifier", "span": { "start": 523, - "end": 532, + "end": 524, "ctxt": 0 }, "value": "y", @@ -781,7 +781,7 @@ "type": "Identifier", "span": { "start": 554, - "end": 580, + "end": 555, "ctxt": 0 }, "value": "x", @@ -805,7 +805,7 @@ "type": "Identifier", "span": { "start": 558, - "end": 569, + "end": 561, "ctxt": 0 }, "value": "arg", @@ -914,7 +914,7 @@ "type": "Identifier", "span": { "start": 602, - "end": 627, + "end": 603, "ctxt": 0 }, "value": "x", @@ -938,7 +938,7 @@ "type": "Identifier", "span": { "start": 606, - "end": 615, + "end": 609, "ctxt": 0 }, "value": "arg", @@ -1077,7 +1077,7 @@ "type": "Identifier", "span": { "start": 647, - "end": 672, + "end": 648, "ctxt": 0 }, "value": "x", @@ -1101,7 +1101,7 @@ "type": "Identifier", "span": { "start": 651, - "end": 660, + "end": 654, "ctxt": 0 }, "value": "arg", @@ -1187,7 +1187,7 @@ "type": "Identifier", "span": { "start": 678, - "end": 685, + "end": 679, "ctxt": 0 }, "value": "r", @@ -1296,7 +1296,7 @@ "type": "Identifier", "span": { "start": 708, - "end": 733, + "end": 709, "ctxt": 0 }, "value": "x", @@ -1320,7 +1320,7 @@ "type": "Identifier", "span": { "start": 712, - "end": 721, + "end": 715, "ctxt": 0 }, "value": "arg", @@ -1389,7 +1389,7 @@ "type": "Identifier", "span": { "start": 735, - "end": 761, + "end": 736, "ctxt": 0 }, "value": "y", @@ -1413,7 +1413,7 @@ "type": "Identifier", "span": { "start": 739, - "end": 749, + "end": 743, "ctxt": 0 }, "value": "arg2", @@ -1499,7 +1499,7 @@ "type": "Identifier", "span": { "start": 767, - "end": 774, + "end": 768, "ctxt": 0 }, "value": "r", @@ -1608,7 +1608,7 @@ "type": "Identifier", "span": { "start": 797, - "end": 822, + "end": 798, "ctxt": 0 }, "value": "x", @@ -1632,7 +1632,7 @@ "type": "Identifier", "span": { "start": 801, - "end": 810, + "end": 804, "ctxt": 0 }, "value": "arg", @@ -1701,7 +1701,7 @@ "type": "Identifier", "span": { "start": 824, - "end": 850, + "end": 825, "ctxt": 0 }, "value": "y", @@ -1725,7 +1725,7 @@ "type": "Identifier", "span": { "start": 828, - "end": 838, + "end": 832, "ctxt": 0 }, "value": "arg2", @@ -1811,7 +1811,7 @@ "type": "Identifier", "span": { "start": 856, - "end": 863, + "end": 857, "ctxt": 0 }, "value": "r", @@ -2049,7 +2049,7 @@ "type": "Identifier", "span": { "start": 926, - "end": 944, + "end": 927, "ctxt": 0 }, "value": "x", @@ -2118,7 +2118,7 @@ "type": "Identifier", "span": { "start": 946, - "end": 977, + "end": 947, "ctxt": 0 }, "value": "y", @@ -2298,7 +2298,7 @@ "type": "Identifier", "span": { "start": 998, - "end": 1012, + "end": 999, "ctxt": 0 }, "value": "x", @@ -2363,7 +2363,7 @@ "type": "Identifier", "span": { "start": 1014, - "end": 1032, + "end": 1015, "ctxt": 0 }, "value": "y", @@ -2526,7 +2526,7 @@ "type": "Identifier", "span": { "start": 1063, - "end": 1077, + "end": 1064, "ctxt": 0 }, "value": "x", @@ -2591,7 +2591,7 @@ "type": "Identifier", "span": { "start": 1079, - "end": 1096, + "end": 1080, "ctxt": 0 }, "value": "y", @@ -2754,7 +2754,7 @@ "type": "Identifier", "span": { "start": 1127, - "end": 1154, + "end": 1128, "ctxt": 0 }, "value": "x", @@ -2985,7 +2985,7 @@ "type": "Identifier", "span": { "start": 1205, - "end": 1209, + "end": 1206, "ctxt": 0 }, "value": "x", @@ -3183,7 +3183,7 @@ "type": "Identifier", "span": { "start": 1275, - "end": 1279, + "end": 1276, "ctxt": 0 }, "value": "x", @@ -3330,7 +3330,7 @@ "type": "Identifier", "span": { "start": 1358, - "end": 1362, + "end": 1359, "ctxt": 0 }, "value": "x", @@ -3467,7 +3467,7 @@ "type": "Identifier", "span": { "start": 1395, - "end": 1399, + "end": 1396, "ctxt": 0 }, "value": "x", @@ -3606,7 +3606,7 @@ "type": "Identifier", "span": { "start": 1452, - "end": 1456, + "end": 1453, "ctxt": 0 }, "value": "x", @@ -3643,7 +3643,7 @@ "type": "Identifier", "span": { "start": 1458, - "end": 1462, + "end": 1459, "ctxt": 0 }, "value": "y", @@ -3805,7 +3805,7 @@ "type": "Identifier", "span": { "start": 1555, - "end": 1571, + "end": 1556, "ctxt": 0 }, "value": "x", @@ -3829,7 +3829,7 @@ "type": "Identifier", "span": { "start": 1559, - "end": 1565, + "end": 1562, "ctxt": 0 }, "value": "arg", @@ -4023,7 +4023,7 @@ "type": "Identifier", "span": { "start": 1685, - "end": 1701, + "end": 1686, "ctxt": 0 }, "value": "x", @@ -4047,7 +4047,7 @@ "type": "Identifier", "span": { "start": 1689, - "end": 1695, + "end": 1692, "ctxt": 0 }, "value": "arg", @@ -4277,7 +4277,7 @@ "type": "Identifier", "span": { "start": 1802, - "end": 1818, + "end": 1803, "ctxt": 0 }, "value": "x", @@ -4301,7 +4301,7 @@ "type": "Identifier", "span": { "start": 1806, - "end": 1812, + "end": 1809, "ctxt": 0 }, "value": "arg", @@ -4478,7 +4478,7 @@ "type": "Identifier", "span": { "start": 1824, - "end": 1828, + "end": 1825, "ctxt": 0 }, "value": "r", @@ -4587,7 +4587,7 @@ "type": "Identifier", "span": { "start": 1886, - "end": 1902, + "end": 1887, "ctxt": 0 }, "value": "x", @@ -4611,7 +4611,7 @@ "type": "Identifier", "span": { "start": 1890, - "end": 1896, + "end": 1893, "ctxt": 0 }, "value": "arg", @@ -4680,7 +4680,7 @@ "type": "Identifier", "span": { "start": 1904, - "end": 1921, + "end": 1905, "ctxt": 0 }, "value": "y", @@ -4704,7 +4704,7 @@ "type": "Identifier", "span": { "start": 1908, - "end": 1915, + "end": 1912, "ctxt": 0 }, "value": "arg2", @@ -4881,7 +4881,7 @@ "type": "Identifier", "span": { "start": 1927, - "end": 1931, + "end": 1928, "ctxt": 0 }, "value": "r", @@ -4990,7 +4990,7 @@ "type": "Identifier", "span": { "start": 1989, - "end": 2005, + "end": 1990, "ctxt": 0 }, "value": "x", @@ -5014,7 +5014,7 @@ "type": "Identifier", "span": { "start": 1993, - "end": 1999, + "end": 1996, "ctxt": 0 }, "value": "arg", @@ -5083,7 +5083,7 @@ "type": "Identifier", "span": { "start": 2007, - "end": 2052, + "end": 2008, "ctxt": 0 }, "value": "y", @@ -5107,7 +5107,7 @@ "type": "Identifier", "span": { "start": 2011, - "end": 2046, + "end": 2015, "ctxt": 0 }, "value": "arg2", @@ -5357,7 +5357,7 @@ "type": "Identifier", "span": { "start": 2058, - "end": 2062, + "end": 2059, "ctxt": 0 }, "value": "r", @@ -5645,7 +5645,7 @@ "type": "Identifier", "span": { "start": 2197, - "end": 2201, + "end": 2198, "ctxt": 0 }, "value": "x", @@ -5682,7 +5682,7 @@ "type": "Identifier", "span": { "start": 2203, - "end": 2207, + "end": 2204, "ctxt": 0 }, "value": "y", @@ -5839,7 +5839,7 @@ "type": "Identifier", "span": { "start": 2254, - "end": 2268, + "end": 2255, "ctxt": 0 }, "value": "x", @@ -5904,7 +5904,7 @@ "type": "Identifier", "span": { "start": 2270, - "end": 2274, + "end": 2271, "ctxt": 0 }, "value": "y", @@ -6117,7 +6117,7 @@ "type": "Identifier", "span": { "start": 2367, - "end": 2381, + "end": 2368, "ctxt": 0 }, "value": "x", @@ -6182,7 +6182,7 @@ "type": "Identifier", "span": { "start": 2383, - "end": 2387, + "end": 2384, "ctxt": 0 }, "value": "y", @@ -6367,7 +6367,7 @@ "type": "Identifier", "span": { "start": 2504, - "end": 2521, + "end": 2505, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance6.json b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance6.json index 1c641367666f..a732209a6d4b 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance6.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance6.json @@ -390,7 +390,7 @@ "type": "Identifier", "span": { "start": 435, - "end": 439, + "end": 436, "ctxt": 0 }, "value": "x", @@ -537,7 +537,7 @@ "type": "Identifier", "span": { "start": 461, - "end": 465, + "end": 462, "ctxt": 0 }, "value": "x", @@ -674,7 +674,7 @@ "type": "Identifier", "span": { "start": 492, - "end": 496, + "end": 493, "ctxt": 0 }, "value": "x", @@ -803,7 +803,7 @@ "type": "Identifier", "span": { "start": 521, - "end": 525, + "end": 522, "ctxt": 0 }, "value": "x", @@ -840,7 +840,7 @@ "type": "Identifier", "span": { "start": 527, - "end": 531, + "end": 528, "ctxt": 0 }, "value": "y", @@ -992,7 +992,7 @@ "type": "Identifier", "span": { "start": 558, - "end": 574, + "end": 559, "ctxt": 0 }, "value": "x", @@ -1016,7 +1016,7 @@ "type": "Identifier", "span": { "start": 562, - "end": 568, + "end": 565, "ctxt": 0 }, "value": "arg", @@ -1210,7 +1210,7 @@ "type": "Identifier", "span": { "start": 607, - "end": 629, + "end": 608, "ctxt": 0 }, "value": "x", @@ -1234,7 +1234,7 @@ "type": "Identifier", "span": { "start": 611, - "end": 617, + "end": 614, "ctxt": 0 }, "value": "arg", @@ -1423,7 +1423,7 @@ "type": "Identifier", "span": { "start": 650, - "end": 663, + "end": 651, "ctxt": 0 }, "value": "x", @@ -1502,7 +1502,7 @@ "type": "Identifier", "span": { "start": 665, - "end": 686, + "end": 666, "ctxt": 0 }, "value": "y", @@ -1734,7 +1734,7 @@ "type": "Identifier", "span": { "start": 710, - "end": 727, + "end": 711, "ctxt": 0 }, "value": "x", @@ -1974,7 +1974,7 @@ "type": "Identifier", "span": { "start": 763, - "end": 780, + "end": 764, "ctxt": 0 }, "value": "x", @@ -2315,7 +2315,7 @@ "type": "Identifier", "span": { "start": 835, - "end": 839, + "end": 836, "ctxt": 0 }, "value": "x", @@ -2513,7 +2513,7 @@ "type": "Identifier", "span": { "start": 890, - "end": 894, + "end": 891, "ctxt": 0 }, "value": "x", @@ -2701,7 +2701,7 @@ "type": "Identifier", "span": { "start": 950, - "end": 954, + "end": 951, "ctxt": 0 }, "value": "x", @@ -2891,7 +2891,7 @@ "type": "Identifier", "span": { "start": 1005, - "end": 1009, + "end": 1006, "ctxt": 0 }, "value": "x", @@ -2928,7 +2928,7 @@ "type": "Identifier", "span": { "start": 1011, - "end": 1015, + "end": 1012, "ctxt": 0 }, "value": "y", @@ -3140,7 +3140,7 @@ "type": "Identifier", "span": { "start": 1072, - "end": 1088, + "end": 1073, "ctxt": 0 }, "value": "x", @@ -3164,7 +3164,7 @@ "type": "Identifier", "span": { "start": 1076, - "end": 1082, + "end": 1079, "ctxt": 0 }, "value": "arg", @@ -3418,7 +3418,7 @@ "type": "Identifier", "span": { "start": 1141, - "end": 1154, + "end": 1142, "ctxt": 0 }, "value": "x", @@ -3497,7 +3497,7 @@ "type": "Identifier", "span": { "start": 1156, - "end": 1177, + "end": 1157, "ctxt": 0 }, "value": "y", @@ -3812,7 +3812,7 @@ "type": "Identifier", "span": { "start": 1230, - "end": 1247, + "end": 1231, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/callSignatureWithoutReturnTypeAnnotationInference.json b/crates/swc_ecma_parser/tests/tsc/callSignatureWithoutReturnTypeAnnotationInference.json index 048920b2675d..33beb5e9a1fc 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignatureWithoutReturnTypeAnnotationInference.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignatureWithoutReturnTypeAnnotationInference.json @@ -451,7 +451,7 @@ "type": "Identifier", "span": { "start": 328, - "end": 332, + "end": 329, "ctxt": 0 }, "value": "x", @@ -1205,7 +1205,7 @@ "type": "Identifier", "span": { "start": 709, - "end": 718, + "end": 710, "ctxt": 0 }, "value": "x", @@ -1456,7 +1456,7 @@ "type": "Identifier", "span": { "start": 811, - "end": 820, + "end": 812, "ctxt": 0 }, "value": "x", @@ -1743,7 +1743,7 @@ "type": "Identifier", "span": { "start": 921, - "end": 930, + "end": 922, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/callSignaturesThatDifferOnlyByReturnType.json b/crates/swc_ecma_parser/tests/tsc/callSignaturesThatDifferOnlyByReturnType.json index 3380ca472ffa..cedc9cca8241 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignaturesThatDifferOnlyByReturnType.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignaturesThatDifferOnlyByReturnType.json @@ -124,7 +124,7 @@ "type": "Identifier", "span": { "start": 227, - "end": 231, + "end": 228, "ctxt": 0 }, "value": "x", @@ -221,7 +221,7 @@ "type": "Identifier", "span": { "start": 250, - "end": 254, + "end": 251, "ctxt": 0 }, "value": "x", @@ -349,7 +349,7 @@ "type": "Identifier", "span": { "start": 300, - "end": 304, + "end": 301, "ctxt": 0 }, "value": "x", @@ -446,7 +446,7 @@ "type": "Identifier", "span": { "start": 323, - "end": 327, + "end": 324, "ctxt": 0 }, "value": "x", @@ -606,7 +606,7 @@ "type": "Identifier", "span": { "start": 373, - "end": 377, + "end": 374, "ctxt": 0 }, "value": "x", @@ -671,7 +671,7 @@ "type": "Identifier", "span": { "start": 393, - "end": 397, + "end": 394, "ctxt": 0 }, "value": "x", @@ -940,7 +940,7 @@ "type": "Identifier", "span": { "start": 496, - "end": 500, + "end": 497, "ctxt": 0 }, "value": "x", @@ -1037,7 +1037,7 @@ "type": "Identifier", "span": { "start": 519, - "end": 523, + "end": 520, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/callSignaturesThatDifferOnlyByReturnType2.json b/crates/swc_ecma_parser/tests/tsc/callSignaturesThatDifferOnlyByReturnType2.json index f677b25b6d81..548542343d14 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignaturesThatDifferOnlyByReturnType2.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignaturesThatDifferOnlyByReturnType2.json @@ -91,7 +91,7 @@ "type": "Identifier", "span": { "start": 201, - "end": 210, + "end": 202, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/callSignaturesThatDifferOnlyByReturnType3.json b/crates/swc_ecma_parser/tests/tsc/callSignaturesThatDifferOnlyByReturnType3.json index 7137922a9c8c..16d4ccd29f8c 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignaturesThatDifferOnlyByReturnType3.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignaturesThatDifferOnlyByReturnType3.json @@ -46,7 +46,7 @@ "type": "Identifier", "span": { "start": 202, - "end": 211, + "end": 203, "ctxt": 0 }, "value": "x", @@ -132,7 +132,7 @@ "type": "Identifier", "span": { "start": 244, - "end": 253, + "end": 245, "ctxt": 0 }, "value": "x", @@ -250,7 +250,7 @@ "type": "Identifier", "span": { "start": 290, - "end": 299, + "end": 291, "ctxt": 0 }, "value": "x", @@ -368,7 +368,7 @@ "type": "Identifier", "span": { "start": 336, - "end": 345, + "end": 337, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/callSignaturesWithAccessibilityModifiersOnParameters.json b/crates/swc_ecma_parser/tests/tsc/callSignaturesWithAccessibilityModifiersOnParameters.json index cf2ae5ad878d..d18d9380901c 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignaturesWithAccessibilityModifiersOnParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignaturesWithAccessibilityModifiersOnParameters.json @@ -548,7 +548,7 @@ "type": "Identifier", "span": { "start": 289, - "end": 298, + "end": 290, "ctxt": 0 }, "value": "x", @@ -584,7 +584,7 @@ "type": "Identifier", "span": { "start": 307, - "end": 316, + "end": 308, "ctxt": 0 }, "value": "y", @@ -682,7 +682,7 @@ "type": "Identifier", "span": { "start": 352, - "end": 361, + "end": 353, "ctxt": 0 }, "value": "x", @@ -718,7 +718,7 @@ "type": "Identifier", "span": { "start": 370, - "end": 379, + "end": 371, "ctxt": 0 }, "value": "y", @@ -811,7 +811,7 @@ "type": "Identifier", "span": { "start": 412, - "end": 421, + "end": 413, "ctxt": 0 }, "value": "x", @@ -847,7 +847,7 @@ "type": "Identifier", "span": { "start": 430, - "end": 439, + "end": 431, "ctxt": 0 }, "value": "y", @@ -1304,7 +1304,7 @@ "type": "Identifier", "span": { "start": 606, - "end": 615, + "end": 607, "ctxt": 0 }, "value": "x", @@ -1340,7 +1340,7 @@ "type": "Identifier", "span": { "start": 625, - "end": 634, + "end": 626, "ctxt": 0 }, "value": "y", @@ -1423,7 +1423,7 @@ "type": "Identifier", "span": { "start": 659, - "end": 663, + "end": 660, "ctxt": 0 }, "value": "x", @@ -1469,7 +1469,7 @@ "type": "Identifier", "span": { "start": 673, - "end": 677, + "end": 674, "ctxt": 0 }, "value": "y", @@ -1644,7 +1644,7 @@ "type": "Identifier", "span": { "start": 740, - "end": 749, + "end": 741, "ctxt": 0 }, "value": "x", @@ -1671,7 +1671,7 @@ "type": "Identifier", "span": { "start": 758, - "end": 767, + "end": 759, "ctxt": 0 }, "value": "y", @@ -1770,7 +1770,7 @@ "type": "Identifier", "span": { "start": 815, - "end": 824, + "end": 816, "ctxt": 0 }, "value": "x", @@ -1797,7 +1797,7 @@ "type": "Identifier", "span": { "start": 826, - "end": 835, + "end": 827, "ctxt": 0 }, "value": "y", @@ -1849,7 +1849,7 @@ "type": "Identifier", "span": { "start": 850, - "end": 854, + "end": 851, "ctxt": 0 }, "value": "x", @@ -1886,7 +1886,7 @@ "type": "Identifier", "span": { "start": 864, - "end": 868, + "end": 865, "ctxt": 0 }, "value": "y", @@ -2071,7 +2071,7 @@ "type": "Identifier", "span": { "start": 930, - "end": 939, + "end": 931, "ctxt": 0 }, "value": "x", @@ -2098,7 +2098,7 @@ "type": "Identifier", "span": { "start": 948, - "end": 957, + "end": 949, "ctxt": 0 }, "value": "y", @@ -2281,7 +2281,7 @@ "type": "Identifier", "span": { "start": 1020, - "end": 1029, + "end": 1021, "ctxt": 0 }, "value": "x", @@ -2317,7 +2317,7 @@ "type": "Identifier", "span": { "start": 1039, - "end": 1048, + "end": 1040, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/callSignaturesWithDuplicateParameters.json b/crates/swc_ecma_parser/tests/tsc/callSignaturesWithDuplicateParameters.json index bd55357661a6..e483fe7dab13 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignaturesWithDuplicateParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignaturesWithDuplicateParameters.json @@ -548,7 +548,7 @@ "type": "Identifier", "span": { "start": 204, - "end": 213, + "end": 205, "ctxt": 0 }, "value": "x", @@ -584,7 +584,7 @@ "type": "Identifier", "span": { "start": 215, - "end": 224, + "end": 216, "ctxt": 0 }, "value": "x", @@ -682,7 +682,7 @@ "type": "Identifier", "span": { "start": 252, - "end": 261, + "end": 253, "ctxt": 0 }, "value": "x", @@ -718,7 +718,7 @@ "type": "Identifier", "span": { "start": 263, - "end": 272, + "end": 264, "ctxt": 0 }, "value": "x", @@ -811,7 +811,7 @@ "type": "Identifier", "span": { "start": 297, - "end": 306, + "end": 298, "ctxt": 0 }, "value": "x", @@ -847,7 +847,7 @@ "type": "Identifier", "span": { "start": 308, - "end": 317, + "end": 309, "ctxt": 0 }, "value": "x", @@ -1304,7 +1304,7 @@ "type": "Identifier", "span": { "start": 432, - "end": 441, + "end": 433, "ctxt": 0 }, "value": "x", @@ -1340,7 +1340,7 @@ "type": "Identifier", "span": { "start": 443, - "end": 452, + "end": 444, "ctxt": 0 }, "value": "x", @@ -1423,7 +1423,7 @@ "type": "Identifier", "span": { "start": 470, - "end": 474, + "end": 471, "ctxt": 0 }, "value": "x", @@ -1469,7 +1469,7 @@ "type": "Identifier", "span": { "start": 476, - "end": 480, + "end": 477, "ctxt": 0 }, "value": "x", @@ -1644,7 +1644,7 @@ "type": "Identifier", "span": { "start": 520, - "end": 529, + "end": 521, "ctxt": 0 }, "value": "x", @@ -1671,7 +1671,7 @@ "type": "Identifier", "span": { "start": 531, - "end": 540, + "end": 532, "ctxt": 0 }, "value": "x", @@ -1770,7 +1770,7 @@ "type": "Identifier", "span": { "start": 566, - "end": 575, + "end": 567, "ctxt": 0 }, "value": "x", @@ -1797,7 +1797,7 @@ "type": "Identifier", "span": { "start": 577, - "end": 586, + "end": 578, "ctxt": 0 }, "value": "x", @@ -1849,7 +1849,7 @@ "type": "Identifier", "span": { "start": 601, - "end": 605, + "end": 602, "ctxt": 0 }, "value": "x", @@ -1886,7 +1886,7 @@ "type": "Identifier", "span": { "start": 607, - "end": 611, + "end": 608, "ctxt": 0 }, "value": "x", @@ -2071,7 +2071,7 @@ "type": "Identifier", "span": { "start": 650, - "end": 659, + "end": 651, "ctxt": 0 }, "value": "x", @@ -2098,7 +2098,7 @@ "type": "Identifier", "span": { "start": 661, - "end": 670, + "end": 662, "ctxt": 0 }, "value": "x", @@ -2281,7 +2281,7 @@ "type": "Identifier", "span": { "start": 726, - "end": 735, + "end": 727, "ctxt": 0 }, "value": "x", @@ -2317,7 +2317,7 @@ "type": "Identifier", "span": { "start": 737, - "end": 746, + "end": 738, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/callSignaturesWithOptionalParameters.json b/crates/swc_ecma_parser/tests/tsc/callSignaturesWithOptionalParameters.json index 8c3d11c5eee8..d18b45f7f7ca 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignaturesWithOptionalParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignaturesWithOptionalParameters.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 77, - "end": 87, + "end": 78, "ctxt": 0 }, "value": "x", @@ -130,7 +130,7 @@ "type": "Identifier", "span": { "start": 114, - "end": 124, + "end": 115, "ctxt": 0 }, "value": "x", @@ -576,7 +576,7 @@ "type": "Identifier", "span": { "start": 233, - "end": 243, + "end": 234, "ctxt": 0 }, "value": "x", @@ -840,7 +840,7 @@ "type": "Identifier", "span": { "start": 301, - "end": 311, + "end": 302, "ctxt": 0 }, "value": "x", @@ -892,7 +892,7 @@ "type": "Identifier", "span": { "start": 322, - "end": 331, + "end": 323, "ctxt": 0 }, "value": "x", @@ -919,7 +919,7 @@ "type": "Identifier", "span": { "start": 333, - "end": 343, + "end": 334, "ctxt": 0 }, "value": "y", @@ -1264,7 +1264,7 @@ "type": "Identifier", "span": { "start": 408, - "end": 418, + "end": 409, "ctxt": 0 }, "value": "x", @@ -1316,7 +1316,7 @@ "type": "Identifier", "span": { "start": 429, - "end": 439, + "end": 430, "ctxt": 0 }, "value": "x", @@ -1589,7 +1589,7 @@ "type": "Identifier", "span": { "start": 494, - "end": 504, + "end": 495, "ctxt": 0 }, "value": "x", @@ -1671,7 +1671,7 @@ "type": "Identifier", "span": { "start": 531, - "end": 540, + "end": 532, "ctxt": 0 }, "value": "x", @@ -1707,7 +1707,7 @@ "type": "Identifier", "span": { "start": 542, - "end": 552, + "end": 543, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/callSignaturesWithOptionalParameters2.json b/crates/swc_ecma_parser/tests/tsc/callSignaturesWithOptionalParameters2.json index 1ae2a28afdcb..c972e754db4d 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignaturesWithOptionalParameters2.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignaturesWithOptionalParameters2.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 77, - "end": 87, + "end": 78, "ctxt": 0 }, "value": "x", @@ -95,7 +95,7 @@ "type": "Identifier", "span": { "start": 103, - "end": 113, + "end": 104, "ctxt": 0 }, "value": "x", @@ -236,7 +236,7 @@ "type": "Identifier", "span": { "start": 150, - "end": 159, + "end": 151, "ctxt": 0 }, "value": "x", @@ -299,7 +299,7 @@ "type": "Identifier", "span": { "start": 176, - "end": 185, + "end": 177, "ctxt": 0 }, "value": "x", @@ -335,7 +335,7 @@ "type": "Identifier", "span": { "start": 187, - "end": 197, + "end": 188, "ctxt": 0 }, "value": "y", @@ -398,7 +398,7 @@ "type": "Identifier", "span": { "start": 214, - "end": 223, + "end": 215, "ctxt": 0 }, "value": "x", @@ -434,7 +434,7 @@ "type": "Identifier", "span": { "start": 225, - "end": 235, + "end": 226, "ctxt": 0 }, "value": "y", @@ -627,7 +627,7 @@ "type": "Identifier", "span": { "start": 282, - "end": 292, + "end": 283, "ctxt": 0 }, "value": "x", @@ -702,7 +702,7 @@ "type": "Identifier", "span": { "start": 303, - "end": 313, + "end": 304, "ctxt": 0 }, "value": "x", @@ -785,7 +785,7 @@ "type": "Identifier", "span": { "start": 329, - "end": 338, + "end": 330, "ctxt": 0 }, "value": "x", @@ -860,7 +860,7 @@ "type": "Identifier", "span": { "start": 350, - "end": 359, + "end": 351, "ctxt": 0 }, "value": "x", @@ -896,7 +896,7 @@ "type": "Identifier", "span": { "start": 361, - "end": 371, + "end": 362, "ctxt": 0 }, "value": "y", @@ -971,7 +971,7 @@ "type": "Identifier", "span": { "start": 383, - "end": 392, + "end": 384, "ctxt": 0 }, "value": "x", @@ -1007,7 +1007,7 @@ "type": "Identifier", "span": { "start": 394, - "end": 404, + "end": 395, "ctxt": 0 }, "value": "y", @@ -1404,7 +1404,7 @@ "type": "Identifier", "span": { "start": 488, - "end": 498, + "end": 489, "ctxt": 0 }, "value": "x", @@ -1443,7 +1443,7 @@ "type": "Identifier", "span": { "start": 506, - "end": 516, + "end": 507, "ctxt": 0 }, "value": "x", @@ -1470,7 +1470,7 @@ "type": "Identifier", "span": { "start": 518, - "end": 528, + "end": 519, "ctxt": 0 }, "value": "y", @@ -1522,7 +1522,7 @@ "type": "Identifier", "span": { "start": 539, - "end": 548, + "end": 540, "ctxt": 0 }, "value": "x", @@ -1549,7 +1549,7 @@ "type": "Identifier", "span": { "start": 550, - "end": 560, + "end": 551, "ctxt": 0 }, "value": "y", @@ -1601,7 +1601,7 @@ "type": "Identifier", "span": { "start": 571, - "end": 580, + "end": 572, "ctxt": 0 }, "value": "x", @@ -1628,7 +1628,7 @@ "type": "Identifier", "span": { "start": 582, - "end": 592, + "end": 583, "ctxt": 0 }, "value": "y", @@ -1655,7 +1655,7 @@ "type": "Identifier", "span": { "start": 594, - "end": 604, + "end": 595, "ctxt": 0 }, "value": "z", @@ -2141,7 +2141,7 @@ "type": "Identifier", "span": { "start": 694, - "end": 704, + "end": 695, "ctxt": 0 }, "value": "x", @@ -2180,7 +2180,7 @@ "type": "Identifier", "span": { "start": 712, - "end": 722, + "end": 713, "ctxt": 0 }, "value": "x", @@ -2207,7 +2207,7 @@ "type": "Identifier", "span": { "start": 724, - "end": 734, + "end": 725, "ctxt": 0 }, "value": "y", @@ -2259,7 +2259,7 @@ "type": "Identifier", "span": { "start": 745, - "end": 754, + "end": 746, "ctxt": 0 }, "value": "x", @@ -2286,7 +2286,7 @@ "type": "Identifier", "span": { "start": 756, - "end": 766, + "end": 757, "ctxt": 0 }, "value": "y", @@ -2338,7 +2338,7 @@ "type": "Identifier", "span": { "start": 777, - "end": 786, + "end": 778, "ctxt": 0 }, "value": "x", @@ -2365,7 +2365,7 @@ "type": "Identifier", "span": { "start": 788, - "end": 798, + "end": 789, "ctxt": 0 }, "value": "y", @@ -2392,7 +2392,7 @@ "type": "Identifier", "span": { "start": 800, - "end": 810, + "end": 801, "ctxt": 0 }, "value": "z", diff --git a/crates/swc_ecma_parser/tests/tsc/callWithMissingVoid.json b/crates/swc_ecma_parser/tests/tsc/callWithMissingVoid.json index 580d870091b6..9a41adc0ea1e 100644 --- a/crates/swc_ecma_parser/tests/tsc/callWithMissingVoid.json +++ b/crates/swc_ecma_parser/tests/tsc/callWithMissingVoid.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 52, - "end": 56, + "end": 53, "ctxt": 0 }, "value": "t", @@ -944,7 +944,7 @@ "type": "Identifier", "span": { "start": 700, - "end": 747, + "end": 708, "ctxt": 0 }, "value": "executor", @@ -968,7 +968,7 @@ "type": "Identifier", "span": { "start": 711, - "end": 738, + "end": 718, "ctxt": 0 }, "value": "resolve", @@ -992,7 +992,7 @@ "type": "Identifier", "span": { "start": 721, - "end": 729, + "end": 726, "ctxt": 0 }, "value": "value", @@ -1642,7 +1642,7 @@ "type": "Identifier", "span": { "start": 1187, - "end": 1196, + "end": 1188, "ctxt": 0 }, "value": "x", @@ -1678,7 +1678,7 @@ "type": "Identifier", "span": { "start": 1198, - "end": 1207, + "end": 1199, "ctxt": 0 }, "value": "y", @@ -1714,7 +1714,7 @@ "type": "Identifier", "span": { "start": 1209, - "end": 1216, + "end": 1210, "ctxt": 0 }, "value": "z", @@ -1975,7 +1975,7 @@ "type": "Identifier", "span": { "start": 1313, - "end": 1322, + "end": 1314, "ctxt": 0 }, "value": "x", @@ -2011,7 +2011,7 @@ "type": "Identifier", "span": { "start": 1324, - "end": 1333, + "end": 1325, "ctxt": 0 }, "value": "y", @@ -2047,7 +2047,7 @@ "type": "Identifier", "span": { "start": 1335, - "end": 1342, + "end": 1336, "ctxt": 0 }, "value": "z", @@ -2083,7 +2083,7 @@ "type": "Identifier", "span": { "start": 1344, - "end": 1356, + "end": 1348, "ctxt": 0 }, "value": "what", @@ -2434,7 +2434,7 @@ "type": "Identifier", "span": { "start": 1493, - "end": 1509, + "end": 1494, "ctxt": 0 }, "value": "x", @@ -2489,7 +2489,7 @@ "type": "Identifier", "span": { "start": 1511, - "end": 1518, + "end": 1512, "ctxt": 0 }, "value": "y", @@ -2525,7 +2525,7 @@ "type": "Identifier", "span": { "start": 1520, - "end": 1545, + "end": 1521, "ctxt": 0 }, "value": "z", @@ -2860,7 +2860,7 @@ "type": "Identifier", "span": { "start": 1708, - "end": 1741, + "end": 1715, "ctxt": 0 }, "value": "handler", diff --git a/crates/swc_ecma_parser/tests/tsc/callWithMissingVoidUndefinedUnknownAnyInJs.json b/crates/swc_ecma_parser/tests/tsc/callWithMissingVoidUndefinedUnknownAnyInJs.json index 4cdae99c956d..874b2a09030d 100644 --- a/crates/swc_ecma_parser/tests/tsc/callWithMissingVoidUndefinedUnknownAnyInJs.json +++ b/crates/swc_ecma_parser/tests/tsc/callWithMissingVoidUndefinedUnknownAnyInJs.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 112, - "end": 119, + "end": 113, "ctxt": 0 }, "value": "p", @@ -111,7 +111,7 @@ "type": "Identifier", "span": { "start": 148, - "end": 160, + "end": 149, "ctxt": 0 }, "value": "p", @@ -190,7 +190,7 @@ "type": "Identifier", "span": { "start": 189, - "end": 199, + "end": 190, "ctxt": 0 }, "value": "p", @@ -269,7 +269,7 @@ "type": "Identifier", "span": { "start": 228, - "end": 234, + "end": 229, "ctxt": 0 }, "value": "p", @@ -407,7 +407,7 @@ "type": "Identifier", "span": { "start": 263, - "end": 267, + "end": 264, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/callWithSpread.json b/crates/swc_ecma_parser/tests/tsc/callWithSpread.json index 2a7018878a6f..5d96669a23c0 100644 --- a/crates/swc_ecma_parser/tests/tsc/callWithSpread.json +++ b/crates/swc_ecma_parser/tests/tsc/callWithSpread.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 23, - "end": 32, + "end": 24, "ctxt": 0 }, "value": "x", @@ -86,7 +86,7 @@ "type": "Identifier", "span": { "start": 34, - "end": 43, + "end": 35, "ctxt": 0 }, "value": "y", @@ -217,7 +217,7 @@ "type": "Identifier", "span": { "start": 81, - "end": 90, + "end": 82, "ctxt": 0 }, "value": "x", @@ -253,7 +253,7 @@ "type": "Identifier", "span": { "start": 92, - "end": 101, + "end": 93, "ctxt": 0 }, "value": "y", @@ -3012,7 +3012,7 @@ "type": "Identifier", "span": { "start": 792, - "end": 801, + "end": 793, "ctxt": 0 }, "value": "x", @@ -3048,7 +3048,7 @@ "type": "Identifier", "span": { "start": 803, - "end": 812, + "end": 804, "ctxt": 0 }, "value": "y", @@ -3334,7 +3334,7 @@ "type": "Identifier", "span": { "start": 900, - "end": 909, + "end": 901, "ctxt": 0 }, "value": "x", @@ -3370,7 +3370,7 @@ "type": "Identifier", "span": { "start": 911, - "end": 920, + "end": 912, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/callWithSpread2.json b/crates/swc_ecma_parser/tests/tsc/callWithSpread2.json index 7174800e7f3e..506b36c2f9fb 100644 --- a/crates/swc_ecma_parser/tests/tsc/callWithSpread2.json +++ b/crates/swc_ecma_parser/tests/tsc/callWithSpread2.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 22, - "end": 32, + "end": 23, "ctxt": 0 }, "value": "a", @@ -68,7 +68,7 @@ "type": "Identifier", "span": { "start": 34, - "end": 44, + "end": 35, "ctxt": 0 }, "value": "b", @@ -147,7 +147,7 @@ "type": "Identifier", "span": { "start": 76, - "end": 95, + "end": 77, "ctxt": 0 }, "value": "a", @@ -202,7 +202,7 @@ "type": "Identifier", "span": { "start": 97, - "end": 116, + "end": 98, "ctxt": 0 }, "value": "b", @@ -300,7 +300,7 @@ "type": "Identifier", "span": { "start": 149, - "end": 158, + "end": 150, "ctxt": 0 }, "value": "s", @@ -336,7 +336,7 @@ "type": "Identifier", "span": { "start": 160, - "end": 170, + "end": 161, "ctxt": 0 }, "value": "a", @@ -372,7 +372,7 @@ "type": "Identifier", "span": { "start": 172, - "end": 182, + "end": 173, "ctxt": 0 }, "value": "b", @@ -451,7 +451,7 @@ "type": "Identifier", "span": { "start": 213, - "end": 222, + "end": 214, "ctxt": 0 }, "value": "s", @@ -487,7 +487,7 @@ "type": "Identifier", "span": { "start": 224, - "end": 234, + "end": 225, "ctxt": 0 }, "value": "a", @@ -523,7 +523,7 @@ "type": "Identifier", "span": { "start": 236, - "end": 246, + "end": 237, "ctxt": 0 }, "value": "b", @@ -660,7 +660,7 @@ "type": "Identifier", "span": { "start": 299, - "end": 308, + "end": 300, "ctxt": 0 }, "value": "s", @@ -781,7 +781,7 @@ "type": "Identifier", "span": { "start": 376, - "end": 385, + "end": 377, "ctxt": 0 }, "value": "s", @@ -817,7 +817,7 @@ "type": "Identifier", "span": { "start": 387, - "end": 396, + "end": 388, "ctxt": 0 }, "value": "n", @@ -853,7 +853,7 @@ "type": "Identifier", "span": { "start": 398, - "end": 408, + "end": 399, "ctxt": 0 }, "value": "a", @@ -889,7 +889,7 @@ "type": "Identifier", "span": { "start": 410, - "end": 420, + "end": 411, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/tsc/callWithSpread3.json b/crates/swc_ecma_parser/tests/tsc/callWithSpread3.json index 81b3c608a13c..699745f1a054 100644 --- a/crates/swc_ecma_parser/tests/tsc/callWithSpread3.json +++ b/crates/swc_ecma_parser/tests/tsc/callWithSpread3.json @@ -576,7 +576,7 @@ "type": "Identifier", "span": { "start": 260, - "end": 269, + "end": 261, "ctxt": 0 }, "value": "a", @@ -612,7 +612,7 @@ "type": "Identifier", "span": { "start": 271, - "end": 280, + "end": 272, "ctxt": 0 }, "value": "b", @@ -691,7 +691,7 @@ "type": "Identifier", "span": { "start": 311, - "end": 320, + "end": 312, "ctxt": 0 }, "value": "a", @@ -727,7 +727,7 @@ "type": "Identifier", "span": { "start": 322, - "end": 331, + "end": 323, "ctxt": 0 }, "value": "b", @@ -864,7 +864,7 @@ "type": "Identifier", "span": { "start": 379, - "end": 388, + "end": 380, "ctxt": 0 }, "value": "a", @@ -900,7 +900,7 @@ "type": "Identifier", "span": { "start": 390, - "end": 399, + "end": 391, "ctxt": 0 }, "value": "b", @@ -1037,7 +1037,7 @@ "type": "Identifier", "span": { "start": 445, - "end": 454, + "end": 446, "ctxt": 0 }, "value": "a", @@ -1073,7 +1073,7 @@ "type": "Identifier", "span": { "start": 456, - "end": 465, + "end": 457, "ctxt": 0 }, "value": "b", @@ -1109,7 +1109,7 @@ "type": "Identifier", "span": { "start": 467, - "end": 476, + "end": 468, "ctxt": 0 }, "value": "c", @@ -1145,7 +1145,7 @@ "type": "Identifier", "span": { "start": 478, - "end": 487, + "end": 479, "ctxt": 0 }, "value": "d", @@ -1181,7 +1181,7 @@ "type": "Identifier", "span": { "start": 489, - "end": 498, + "end": 490, "ctxt": 0 }, "value": "e", diff --git a/crates/swc_ecma_parser/tests/tsc/callWithSpread4.json b/crates/swc_ecma_parser/tests/tsc/callWithSpread4.json index 77eab6b93fde..62cb9f1932ca 100644 --- a/crates/swc_ecma_parser/tests/tsc/callWithSpread4.json +++ b/crates/swc_ecma_parser/tests/tsc/callWithSpread4.json @@ -313,7 +313,7 @@ "type": "Identifier", "span": { "start": 144, - "end": 149, + "end": 146, "ctxt": 0 }, "value": "s1", @@ -350,7 +350,7 @@ "type": "Identifier", "span": { "start": 151, - "end": 157, + "end": 153, "ctxt": 0 }, "value": "s2", @@ -387,7 +387,7 @@ "type": "Identifier", "span": { "start": 159, - "end": 165, + "end": 161, "ctxt": 0 }, "value": "s3", @@ -424,7 +424,7 @@ "type": "Identifier", "span": { "start": 167, - "end": 173, + "end": 169, "ctxt": 0 }, "value": "s4", @@ -461,7 +461,7 @@ "type": "Identifier", "span": { "start": 175, - "end": 180, + "end": 177, "ctxt": 0 }, "value": "s5", @@ -554,7 +554,7 @@ "type": "Identifier", "span": { "start": 203, - "end": 237, + "end": 210, "ctxt": 0 }, "value": "streams", @@ -723,7 +723,7 @@ "type": "Identifier", "span": { "start": 260, - "end": 265, + "end": 262, "ctxt": 0 }, "value": "s1", @@ -760,7 +760,7 @@ "type": "Identifier", "span": { "start": 267, - "end": 277, + "end": 269, "ctxt": 0 }, "value": "s2", @@ -1343,7 +1343,7 @@ "type": "Identifier", "span": { "start": 447, - "end": 455, + "end": 450, "ctxt": 0 }, "value": "inp", @@ -1580,7 +1580,7 @@ "type": "Identifier", "span": { "start": 591, - "end": 597, + "end": 592, "ctxt": 0 }, "value": "x", @@ -1616,7 +1616,7 @@ "type": "Identifier", "span": { "start": 599, - "end": 614, + "end": 600, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/callWithSpread5.json b/crates/swc_ecma_parser/tests/tsc/callWithSpread5.json index 1155484f8a06..ae5940f582ea 100644 --- a/crates/swc_ecma_parser/tests/tsc/callWithSpread5.json +++ b/crates/swc_ecma_parser/tests/tsc/callWithSpread5.json @@ -353,7 +353,7 @@ "type": "Identifier", "span": { "start": 158, - "end": 167, + "end": 159, "ctxt": 0 }, "value": "a", @@ -389,7 +389,7 @@ "type": "Identifier", "span": { "start": 169, - "end": 178, + "end": 170, "ctxt": 0 }, "value": "b", @@ -425,7 +425,7 @@ "type": "Identifier", "span": { "start": 180, - "end": 190, + "end": 182, "ctxt": 0 }, "value": "bb", diff --git a/crates/swc_ecma_parser/tests/tsc/callWithSpreadES6.json b/crates/swc_ecma_parser/tests/tsc/callWithSpreadES6.json index b8a7257846fc..d33fa7de9f56 100644 --- a/crates/swc_ecma_parser/tests/tsc/callWithSpreadES6.json +++ b/crates/swc_ecma_parser/tests/tsc/callWithSpreadES6.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 40, - "end": 49, + "end": 41, "ctxt": 0 }, "value": "x", @@ -86,7 +86,7 @@ "type": "Identifier", "span": { "start": 51, - "end": 60, + "end": 52, "ctxt": 0 }, "value": "y", @@ -191,7 +191,7 @@ "type": "Identifier", "span": { "start": 95, - "end": 104, + "end": 96, "ctxt": 0 }, "value": "x", @@ -227,7 +227,7 @@ "type": "Identifier", "span": { "start": 106, - "end": 115, + "end": 107, "ctxt": 0 }, "value": "y", @@ -1948,7 +1948,7 @@ "type": "Identifier", "span": { "start": 554, - "end": 563, + "end": 555, "ctxt": 0 }, "value": "x", @@ -1984,7 +1984,7 @@ "type": "Identifier", "span": { "start": 565, - "end": 574, + "end": 566, "ctxt": 0 }, "value": "y", @@ -2270,7 +2270,7 @@ "type": "Identifier", "span": { "start": 662, - "end": 671, + "end": 663, "ctxt": 0 }, "value": "x", @@ -2306,7 +2306,7 @@ "type": "Identifier", "span": { "start": 673, - "end": 682, + "end": 674, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/chainedPrototypeAssignment.json b/crates/swc_ecma_parser/tests/tsc/chainedPrototypeAssignment.json index 4daaef2722cd..17fa86f43882 100644 --- a/crates/swc_ecma_parser/tests/tsc/chainedPrototypeAssignment.json +++ b/crates/swc_ecma_parser/tests/tsc/chainedPrototypeAssignment.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 128, - "end": 140, + "end": 132, "ctxt": 0 }, "value": "name", diff --git a/crates/swc_ecma_parser/tests/tsc/circularTypeofWithVarOrFunc.json b/crates/swc_ecma_parser/tests/tsc/circularTypeofWithVarOrFunc.json index 901140e28f71..0647aadf9cb0 100644 --- a/crates/swc_ecma_parser/tests/tsc/circularTypeofWithVarOrFunc.json +++ b/crates/swc_ecma_parser/tests/tsc/circularTypeofWithVarOrFunc.json @@ -576,7 +576,7 @@ "type": "Identifier", "span": { "start": 398, - "end": 410, + "end": 403, "ctxt": 0 }, "value": "input", diff --git a/crates/swc_ecma_parser/tests/tsc/cjsImportInES2015.json b/crates/swc_ecma_parser/tests/tsc/cjsImportInES2015.json index 4e671edab883..aff48ed92075 100644 --- a/crates/swc_ecma_parser/tests/tsc/cjsImportInES2015.json +++ b/crates/swc_ecma_parser/tests/tsc/cjsImportInES2015.json @@ -123,7 +123,7 @@ "type": "Identifier", "span": { "start": 271, - "end": 288, + "end": 274, "ctxt": 0 }, "value": "err", diff --git a/crates/swc_ecma_parser/tests/tsc/classAbstractFactoryFunction.json b/crates/swc_ecma_parser/tests/tsc/classAbstractFactoryFunction.json index 57ee42e3bede..7c3ca45d6289 100644 --- a/crates/swc_ecma_parser/tests/tsc/classAbstractFactoryFunction.json +++ b/crates/swc_ecma_parser/tests/tsc/classAbstractFactoryFunction.json @@ -93,7 +93,7 @@ "type": "Identifier", "span": { "start": 58, - "end": 75, + "end": 65, "ctxt": 0 }, "value": "Factory", @@ -203,7 +203,7 @@ "type": "Identifier", "span": { "start": 114, - "end": 131, + "end": 121, "ctxt": 0 }, "value": "Factory", diff --git a/crates/swc_ecma_parser/tests/tsc/classCanExtendConstructorFunction.json b/crates/swc_ecma_parser/tests/tsc/classCanExtendConstructorFunction.json index 44b555a765b9..89c3328de5fe 100644 --- a/crates/swc_ecma_parser/tests/tsc/classCanExtendConstructorFunction.json +++ b/crates/swc_ecma_parser/tests/tsc/classCanExtendConstructorFunction.json @@ -1334,7 +1334,7 @@ "type": "Identifier", "span": { "start": 1428, - "end": 1447, + "end": 1439, "ctxt": 0 }, "value": "numberEaten", @@ -1579,7 +1579,7 @@ "type": "Identifier", "span": { "start": 1637, - "end": 1650, + "end": 1644, "ctxt": 0 }, "value": "drunkOO", @@ -1696,7 +1696,7 @@ "type": "Identifier", "span": { "start": 1779, - "end": 1803, + "end": 1785, "ctxt": 0 }, "value": "others", diff --git a/crates/swc_ecma_parser/tests/tsc/classConstructorAccessibility.json b/crates/swc_ecma_parser/tests/tsc/classConstructorAccessibility.json index cdac73f4fda7..8d542aa80156 100644 --- a/crates/swc_ecma_parser/tests/tsc/classConstructorAccessibility.json +++ b/crates/swc_ecma_parser/tests/tsc/classConstructorAccessibility.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 64, - "end": 73, + "end": 65, "ctxt": 0 }, "value": "x", @@ -156,7 +156,7 @@ "type": "Identifier", "span": { "start": 123, - "end": 132, + "end": 124, "ctxt": 0 }, "value": "x", @@ -253,7 +253,7 @@ "type": "Identifier", "span": { "start": 184, - "end": 193, + "end": 185, "ctxt": 0 }, "value": "x", @@ -575,7 +575,7 @@ "type": "Identifier", "span": { "start": 343, - "end": 347, + "end": 344, "ctxt": 0 }, "value": "x", @@ -714,7 +714,7 @@ "type": "Identifier", "span": { "start": 412, - "end": 416, + "end": 413, "ctxt": 0 }, "value": "x", @@ -853,7 +853,7 @@ "type": "Identifier", "span": { "start": 483, - "end": 487, + "end": 484, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/classConstructorAccessibility2.json b/crates/swc_ecma_parser/tests/tsc/classConstructorAccessibility2.json index 55c4380725f2..9f7477f3f7fe 100644 --- a/crates/swc_ecma_parser/tests/tsc/classConstructorAccessibility2.json +++ b/crates/swc_ecma_parser/tests/tsc/classConstructorAccessibility2.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 68, - "end": 77, + "end": 69, "ctxt": 0 }, "value": "x", @@ -245,7 +245,7 @@ "type": "Identifier", "span": { "start": 172, - "end": 181, + "end": 173, "ctxt": 0 }, "value": "x", @@ -431,7 +431,7 @@ "type": "Identifier", "span": { "start": 274, - "end": 283, + "end": 275, "ctxt": 0 }, "value": "x", @@ -706,7 +706,7 @@ "type": "Identifier", "span": { "start": 431, - "end": 440, + "end": 432, "ctxt": 0 }, "value": "x", @@ -1120,7 +1120,7 @@ "type": "Identifier", "span": { "start": 648, - "end": 657, + "end": 649, "ctxt": 0 }, "value": "x", @@ -1534,7 +1534,7 @@ "type": "Identifier", "span": { "start": 886, - "end": 895, + "end": 887, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/classConstructorAccessibility3.json b/crates/swc_ecma_parser/tests/tsc/classConstructorAccessibility3.json index e0e31dd150d3..60dc17032711 100644 --- a/crates/swc_ecma_parser/tests/tsc/classConstructorAccessibility3.json +++ b/crates/swc_ecma_parser/tests/tsc/classConstructorAccessibility3.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 60, - "end": 69, + "end": 61, "ctxt": 0 }, "value": "x", @@ -156,7 +156,7 @@ "type": "Identifier", "span": { "start": 120, - "end": 129, + "end": 121, "ctxt": 0 }, "value": "x", @@ -253,7 +253,7 @@ "type": "Identifier", "span": { "start": 183, - "end": 192, + "end": 184, "ctxt": 0 }, "value": "x", @@ -350,7 +350,7 @@ "type": "Identifier", "span": { "start": 245, - "end": 254, + "end": 246, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/classConstructorOverloadsAccessibility.json b/crates/swc_ecma_parser/tests/tsc/classConstructorOverloadsAccessibility.json index 9a63ac1b61f4..18540e10210e 100644 --- a/crates/swc_ecma_parser/tests/tsc/classConstructorOverloadsAccessibility.json +++ b/crates/swc_ecma_parser/tests/tsc/classConstructorOverloadsAccessibility.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 54, - "end": 64, + "end": 55, "ctxt": 0 }, "value": "a", @@ -115,7 +115,7 @@ "type": "Identifier", "span": { "start": 98, - "end": 107, + "end": 99, "ctxt": 0 }, "value": "a", @@ -174,7 +174,7 @@ "type": "Identifier", "span": { "start": 139, - "end": 148, + "end": 140, "ctxt": 0 }, "value": "a", @@ -290,7 +290,7 @@ "type": "Identifier", "span": { "start": 218, - "end": 227, + "end": 219, "ctxt": 0 }, "value": "a", @@ -349,7 +349,7 @@ "type": "Identifier", "span": { "start": 251, - "end": 260, + "end": 252, "ctxt": 0 }, "value": "a", @@ -465,7 +465,7 @@ "type": "Identifier", "span": { "start": 322, - "end": 331, + "end": 323, "ctxt": 0 }, "value": "a", @@ -524,7 +524,7 @@ "type": "Identifier", "span": { "start": 356, - "end": 365, + "end": 357, "ctxt": 0 }, "value": "a", @@ -640,7 +640,7 @@ "type": "Identifier", "span": { "start": 427, - "end": 436, + "end": 428, "ctxt": 0 }, "value": "a", @@ -699,7 +699,7 @@ "type": "Identifier", "span": { "start": 451, - "end": 460, + "end": 452, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/classConstructorParametersAccessibility.json b/crates/swc_ecma_parser/tests/tsc/classConstructorParametersAccessibility.json index 1ca92b459ab6..9a798426d919 100644 --- a/crates/swc_ecma_parser/tests/tsc/classConstructorParametersAccessibility.json +++ b/crates/swc_ecma_parser/tests/tsc/classConstructorParametersAccessibility.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 35, - "end": 44, + "end": 36, "ctxt": 0 }, "value": "x", @@ -251,7 +251,7 @@ "type": "Identifier", "span": { "start": 112, - "end": 121, + "end": 113, "ctxt": 0 }, "value": "p", @@ -443,7 +443,7 @@ "type": "Identifier", "span": { "start": 203, - "end": 212, + "end": 204, "ctxt": 0 }, "value": "p", @@ -632,7 +632,7 @@ "type": "Identifier", "span": { "start": 300, - "end": 309, + "end": 301, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/classConstructorParametersAccessibility2.json b/crates/swc_ecma_parser/tests/tsc/classConstructorParametersAccessibility2.json index 9a5b138e622b..05b989124d17 100644 --- a/crates/swc_ecma_parser/tests/tsc/classConstructorParametersAccessibility2.json +++ b/crates/swc_ecma_parser/tests/tsc/classConstructorParametersAccessibility2.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 35, - "end": 45, + "end": 36, "ctxt": 0 }, "value": "x", @@ -251,7 +251,7 @@ "type": "Identifier", "span": { "start": 113, - "end": 123, + "end": 114, "ctxt": 0 }, "value": "p", @@ -443,7 +443,7 @@ "type": "Identifier", "span": { "start": 205, - "end": 215, + "end": 206, "ctxt": 0 }, "value": "p", @@ -632,7 +632,7 @@ "type": "Identifier", "span": { "start": 303, - "end": 312, + "end": 304, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/classConstructorParametersAccessibility3.json b/crates/swc_ecma_parser/tests/tsc/classConstructorParametersAccessibility3.json index 08d57c1cce26..afe08836b6bc 100644 --- a/crates/swc_ecma_parser/tests/tsc/classConstructorParametersAccessibility3.json +++ b/crates/swc_ecma_parser/tests/tsc/classConstructorParametersAccessibility3.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 40, - "end": 49, + "end": 41, "ctxt": 0 }, "value": "p", @@ -156,7 +156,7 @@ "type": "Identifier", "span": { "start": 110, - "end": 119, + "end": 111, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/classExtendingClass.json b/crates/swc_ecma_parser/tests/tsc/classExtendingClass.json index 4bd03d8e7f86..358242dcbeb1 100644 --- a/crates/swc_ecma_parser/tests/tsc/classExtendingClass.json +++ b/crates/swc_ecma_parser/tests/tsc/classExtendingClass.json @@ -676,7 +676,7 @@ "type": "Identifier", "span": { "start": 228, - "end": 232, + "end": 229, "ctxt": 0 }, "value": "x", @@ -769,7 +769,7 @@ "type": "Identifier", "span": { "start": 258, - "end": 262, + "end": 259, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/classExtendingClassLikeType.json b/crates/swc_ecma_parser/tests/tsc/classExtendingClassLikeType.json index e72cb96f6d44..d02999e836cf 100644 --- a/crates/swc_ecma_parser/tests/tsc/classExtendingClassLikeType.json +++ b/crates/swc_ecma_parser/tests/tsc/classExtendingClassLikeType.json @@ -296,7 +296,7 @@ "type": "Identifier", "span": { "start": 166, - "end": 175, + "end": 167, "ctxt": 0 }, "value": "x", @@ -323,7 +323,7 @@ "type": "Identifier", "span": { "start": 177, - "end": 186, + "end": 178, "ctxt": 0 }, "value": "y", @@ -415,7 +415,7 @@ "type": "Identifier", "span": { "start": 223, - "end": 227, + "end": 224, "ctxt": 0 }, "value": "x", @@ -569,7 +569,7 @@ "type": "Identifier", "span": { "start": 254, - "end": 258, + "end": 255, "ctxt": 0 }, "value": "x", @@ -606,7 +606,7 @@ "type": "Identifier", "span": { "start": 260, - "end": 264, + "end": 261, "ctxt": 0 }, "value": "y", @@ -760,7 +760,7 @@ "type": "Identifier", "span": { "start": 294, - "end": 298, + "end": 295, "ctxt": 0 }, "value": "x", @@ -797,7 +797,7 @@ "type": "Identifier", "span": { "start": 300, - "end": 304, + "end": 301, "ctxt": 0 }, "value": "y", @@ -1931,7 +1931,7 @@ "type": "Identifier", "span": { "start": 940, - "end": 949, + "end": 941, "ctxt": 0 }, "value": "x", @@ -2023,7 +2023,7 @@ "type": "Identifier", "span": { "start": 983, - "end": 992, + "end": 984, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/classStaticBlock11.json b/crates/swc_ecma_parser/tests/tsc/classStaticBlock11.json index 3720fffeab1b..24aad8ab4d28 100644 --- a/crates/swc_ecma_parser/tests/tsc/classStaticBlock11.json +++ b/crates/swc_ecma_parser/tests/tsc/classStaticBlock11.json @@ -133,7 +133,7 @@ "type": "Identifier", "span": { "start": 80, - "end": 89, + "end": 81, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/classStaticBlock17.json b/crates/swc_ecma_parser/tests/tsc/classStaticBlock17.json index 4c2b63c8b350..b2417f7ea53a 100644 --- a/crates/swc_ecma_parser/tests/tsc/classStaticBlock17.json +++ b/crates/swc_ecma_parser/tests/tsc/classStaticBlock17.json @@ -72,7 +72,7 @@ "type": "Identifier", "span": { "start": 41, - "end": 45, + "end": 42, "ctxt": 0 }, "value": "o", @@ -150,7 +150,7 @@ "type": "Identifier", "span": { "start": 61, - "end": 65, + "end": 62, "ctxt": 0 }, "value": "o", @@ -187,7 +187,7 @@ "type": "Identifier", "span": { "start": 67, - "end": 76, + "end": 68, "ctxt": 0 }, "value": "v", @@ -340,7 +340,7 @@ "type": "Identifier", "span": { "start": 128, - "end": 137, + "end": 129, "ctxt": 0 }, "value": "v", @@ -886,7 +886,7 @@ "type": "Identifier", "span": { "start": 343, - "end": 347, + "end": 344, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/classWithBaseClassButNoConstructor.json b/crates/swc_ecma_parser/tests/tsc/classWithBaseClassButNoConstructor.json index d86172dc539d..e879dbc8880d 100644 --- a/crates/swc_ecma_parser/tests/tsc/classWithBaseClassButNoConstructor.json +++ b/crates/swc_ecma_parser/tests/tsc/classWithBaseClassButNoConstructor.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 30, - "end": 39, + "end": 31, "ctxt": 0 }, "value": "x", @@ -391,7 +391,7 @@ "type": "Identifier", "span": { "start": 189, - "end": 193, + "end": 190, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/classWithConstructors.json b/crates/swc_ecma_parser/tests/tsc/classWithConstructors.json index c2da808ccfb9..64d6dedc6ea2 100644 --- a/crates/swc_ecma_parser/tests/tsc/classWithConstructors.json +++ b/crates/swc_ecma_parser/tests/tsc/classWithConstructors.json @@ -83,7 +83,7 @@ "type": "Identifier", "span": { "start": 55, - "end": 64, + "end": 56, "ctxt": 0 }, "value": "x", @@ -295,7 +295,7 @@ "type": "Identifier", "span": { "start": 173, - "end": 182, + "end": 174, "ctxt": 0 }, "value": "x", @@ -354,7 +354,7 @@ "type": "Identifier", "span": { "start": 205, - "end": 214, + "end": 206, "ctxt": 0 }, "value": "x", @@ -413,7 +413,7 @@ "type": "Identifier", "span": { "start": 237, - "end": 243, + "end": 238, "ctxt": 0 }, "value": "x", @@ -940,7 +940,7 @@ "type": "Identifier", "span": { "start": 525, - "end": 529, + "end": 526, "ctxt": 0 }, "value": "x", @@ -1194,7 +1194,7 @@ "type": "Identifier", "span": { "start": 643, - "end": 647, + "end": 644, "ctxt": 0 }, "value": "x", @@ -1263,7 +1263,7 @@ "type": "Identifier", "span": { "start": 670, - "end": 674, + "end": 671, "ctxt": 0 }, "value": "x", @@ -1309,7 +1309,7 @@ "type": "Identifier", "span": { "start": 676, - "end": 680, + "end": 677, "ctxt": 0 }, "value": "y", @@ -1378,7 +1378,7 @@ "type": "Identifier", "span": { "start": 703, - "end": 709, + "end": 704, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/classWithOnlyPublicMembersEquivalentToInterface.json b/crates/swc_ecma_parser/tests/tsc/classWithOnlyPublicMembersEquivalentToInterface.json index 90e2d16299ed..a51dc3d52c58 100644 --- a/crates/swc_ecma_parser/tests/tsc/classWithOnlyPublicMembersEquivalentToInterface.json +++ b/crates/swc_ecma_parser/tests/tsc/classWithOnlyPublicMembersEquivalentToInterface.json @@ -102,7 +102,7 @@ "type": "Identifier", "span": { "start": 85, - "end": 94, + "end": 86, "ctxt": 0 }, "value": "a", @@ -597,7 +597,7 @@ "type": "Identifier", "span": { "start": 281, - "end": 290, + "end": 282, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/tsc/classWithOnlyPublicMembersEquivalentToInterface2.json b/crates/swc_ecma_parser/tests/tsc/classWithOnlyPublicMembersEquivalentToInterface2.json index 5d62f455a445..2f99df5ed616 100644 --- a/crates/swc_ecma_parser/tests/tsc/classWithOnlyPublicMembersEquivalentToInterface2.json +++ b/crates/swc_ecma_parser/tests/tsc/classWithOnlyPublicMembersEquivalentToInterface2.json @@ -102,7 +102,7 @@ "type": "Identifier", "span": { "start": 85, - "end": 94, + "end": 86, "ctxt": 0 }, "value": "a", @@ -642,7 +642,7 @@ "type": "Identifier", "span": { "start": 343, - "end": 352, + "end": 344, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/tsc/classWithOptionalParameter.json b/crates/swc_ecma_parser/tests/tsc/classWithOptionalParameter.json index 1e0c179be305..c7dff1a01289 100644 --- a/crates/swc_ecma_parser/tests/tsc/classWithOptionalParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/classWithOptionalParameter.json @@ -230,7 +230,7 @@ "type": "Identifier", "span": { "start": 138, - "end": 142, + "end": 139, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/classWithStaticMembers.json b/crates/swc_ecma_parser/tests/tsc/classWithStaticMembers.json index 2493e2cbb2a7..b8de11922914 100644 --- a/crates/swc_ecma_parser/tests/tsc/classWithStaticMembers.json +++ b/crates/swc_ecma_parser/tests/tsc/classWithStaticMembers.json @@ -254,7 +254,7 @@ "type": "Identifier", "span": { "start": 124, - "end": 133, + "end": 125, "ctxt": 0 }, "value": "a", @@ -293,7 +293,7 @@ "type": "Identifier", "span": { "start": 143, - "end": 152, + "end": 144, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/tsc/classWithTwoConstructorDefinitions.json b/crates/swc_ecma_parser/tests/tsc/classWithTwoConstructorDefinitions.json index 40d80a6a6a23..7590eb83c768 100644 --- a/crates/swc_ecma_parser/tests/tsc/classWithTwoConstructorDefinitions.json +++ b/crates/swc_ecma_parser/tests/tsc/classWithTwoConstructorDefinitions.json @@ -164,7 +164,7 @@ "type": "Identifier", "span": { "start": 106, - "end": 110, + "end": 107, "ctxt": 0 }, "value": "x", @@ -241,7 +241,7 @@ "type": "Identifier", "span": { "start": 141, - "end": 145, + "end": 142, "ctxt": 0 }, "value": "x", @@ -287,7 +287,7 @@ "type": "Identifier", "span": { "start": 147, - "end": 151, + "end": 148, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/commaOperatorOtherInvalidOperation.json b/crates/swc_ecma_parser/tests/tsc/commaOperatorOtherInvalidOperation.json index 9c5a4b562096..a02095a3e156 100644 --- a/crates/swc_ecma_parser/tests/tsc/commaOperatorOtherInvalidOperation.json +++ b/crates/swc_ecma_parser/tests/tsc/commaOperatorOtherInvalidOperation.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 129, - "end": 138, + "end": 130, "ctxt": 0 }, "value": "x", @@ -68,7 +68,7 @@ "type": "Identifier", "span": { "start": 140, - "end": 149, + "end": 141, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/commaOperatorOtherValidOperation.json b/crates/swc_ecma_parser/tests/tsc/commaOperatorOtherValidOperation.json index fc15269ba063..c8e7fb84ab71 100644 --- a/crates/swc_ecma_parser/tests/tsc/commaOperatorOtherValidOperation.json +++ b/crates/swc_ecma_parser/tests/tsc/commaOperatorOtherValidOperation.json @@ -200,7 +200,7 @@ "type": "Identifier", "span": { "start": 171, - "end": 180, + "end": 172, "ctxt": 0 }, "value": "x", @@ -236,7 +236,7 @@ "type": "Identifier", "span": { "start": 182, - "end": 191, + "end": 183, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithIdenticalObjects.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithIdenticalObjects.json index b55da632f983..5ee68e0aea4e 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithIdenticalObjects.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithIdenticalObjects.json @@ -292,7 +292,7 @@ "type": "Identifier", "span": { "start": 134, - "end": 143, + "end": 135, "ctxt": 0 }, "value": "a", @@ -670,7 +670,7 @@ "type": "Identifier", "span": { "start": 317, - "end": 326, + "end": 318, "ctxt": 0 }, "value": "b", @@ -858,7 +858,7 @@ "type": "Identifier", "span": { "start": 419, - "end": 428, + "end": 420, "ctxt": 0 }, "value": "b", @@ -1073,7 +1073,7 @@ "type": "Identifier", "span": { "start": 539, - "end": 548, + "end": 540, "ctxt": 0 }, "value": "a", @@ -1172,7 +1172,7 @@ "type": "Identifier", "span": { "start": 578, - "end": 587, + "end": 579, "ctxt": 0 }, "value": "a", @@ -1258,7 +1258,7 @@ "type": "Identifier", "span": { "start": 621, - "end": 630, + "end": 622, "ctxt": 0 }, "value": "a", @@ -1354,7 +1354,7 @@ "type": "Identifier", "span": { "start": 659, - "end": 668, + "end": 660, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithIdenticalTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithIdenticalTypeParameter.json index 7532efda525c..535076035c62 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithIdenticalTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithIdenticalTypeParameter.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 17, - "end": 21, + "end": 18, "ctxt": 0 }, "value": "t", diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.json index 987643b4736e..15961c5f7485 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.json @@ -484,7 +484,7 @@ "type": "Identifier", "span": { "start": 192, - "end": 201, + "end": 193, "ctxt": 0 }, "value": "a", @@ -511,7 +511,7 @@ "type": "Identifier", "span": { "start": 203, - "end": 212, + "end": 204, "ctxt": 0 }, "value": "b", @@ -629,7 +629,7 @@ "type": "Identifier", "span": { "start": 236, - "end": 245, + "end": 237, "ctxt": 0 }, "value": "a", @@ -747,7 +747,7 @@ "type": "Identifier", "span": { "start": 270, - "end": 277, + "end": 271, "ctxt": 0 }, "value": "a", @@ -784,7 +784,7 @@ "type": "Identifier", "span": { "start": 279, - "end": 288, + "end": 280, "ctxt": 0 }, "value": "b", @@ -902,7 +902,7 @@ "type": "Identifier", "span": { "start": 312, - "end": 322, + "end": 313, "ctxt": 0 }, "value": "a", @@ -939,7 +939,7 @@ "type": "Identifier", "span": { "start": 324, - "end": 331, + "end": 325, "ctxt": 0 }, "value": "b", @@ -1267,7 +1267,7 @@ "type": "Identifier", "span": { "start": 402, - "end": 410, + "end": 403, "ctxt": 0 }, "value": "a", @@ -1395,7 +1395,7 @@ "type": "Identifier", "span": { "start": 434, - "end": 439, + "end": 435, "ctxt": 0 }, "value": "a", @@ -1823,7 +1823,7 @@ "type": "Identifier", "span": { "start": 537, - "end": 541, + "end": 538, "ctxt": 0 }, "value": "t", @@ -1993,7 +1993,7 @@ "type": "Identifier", "span": { "start": 565, - "end": 571, + "end": 566, "ctxt": 0 }, "value": "t", diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.json index 4e87bb2aa972..3a4393025a19 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.json @@ -471,7 +471,7 @@ "type": "Identifier", "span": { "start": 194, - "end": 203, + "end": 195, "ctxt": 0 }, "value": "a", @@ -498,7 +498,7 @@ "type": "Identifier", "span": { "start": 205, - "end": 214, + "end": 206, "ctxt": 0 }, "value": "b", @@ -613,7 +613,7 @@ "type": "Identifier", "span": { "start": 240, - "end": 249, + "end": 241, "ctxt": 0 }, "value": "a", @@ -728,7 +728,7 @@ "type": "Identifier", "span": { "start": 276, - "end": 283, + "end": 277, "ctxt": 0 }, "value": "a", @@ -765,7 +765,7 @@ "type": "Identifier", "span": { "start": 285, - "end": 294, + "end": 286, "ctxt": 0 }, "value": "b", @@ -880,7 +880,7 @@ "type": "Identifier", "span": { "start": 320, - "end": 330, + "end": 321, "ctxt": 0 }, "value": "a", @@ -917,7 +917,7 @@ "type": "Identifier", "span": { "start": 332, - "end": 339, + "end": 333, "ctxt": 0 }, "value": "b", @@ -1216,7 +1216,7 @@ "type": "Identifier", "span": { "start": 416, - "end": 424, + "end": 417, "ctxt": 0 }, "value": "a", @@ -1341,7 +1341,7 @@ "type": "Identifier", "span": { "start": 450, - "end": 455, + "end": 451, "ctxt": 0 }, "value": "a", @@ -1760,7 +1760,7 @@ "type": "Identifier", "span": { "start": 559, - "end": 563, + "end": 560, "ctxt": 0 }, "value": "t", @@ -1917,7 +1917,7 @@ "type": "Identifier", "span": { "start": 589, - "end": 595, + "end": 590, "ctxt": 0 }, "value": "t", diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.json index a07a8ecf2277..e81b3df34df7 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.json @@ -297,7 +297,7 @@ "type": "Identifier", "span": { "start": 144, - "end": 148, + "end": 145, "ctxt": 0 }, "value": "x", @@ -557,7 +557,7 @@ "type": "Identifier", "span": { "start": 199, - "end": 203, + "end": 200, "ctxt": 0 }, "value": "x", @@ -727,7 +727,7 @@ "type": "Identifier", "span": { "start": 224, - "end": 233, + "end": 225, "ctxt": 0 }, "value": "x", @@ -845,7 +845,7 @@ "type": "Identifier", "span": { "start": 263, - "end": 268, + "end": 264, "ctxt": 0 }, "value": "x", @@ -1015,7 +1015,7 @@ "type": "Identifier", "span": { "start": 289, - "end": 299, + "end": 290, "ctxt": 0 }, "value": "x", @@ -1465,7 +1465,7 @@ "type": "Identifier", "span": { "start": 403, - "end": 407, + "end": 404, "ctxt": 0 }, "value": "x", @@ -1502,7 +1502,7 @@ "type": "Identifier", "span": { "start": 409, - "end": 413, + "end": 410, "ctxt": 0 }, "value": "y", @@ -1672,7 +1672,7 @@ "type": "Identifier", "span": { "start": 434, - "end": 443, + "end": 435, "ctxt": 0 }, "value": "x", @@ -1699,7 +1699,7 @@ "type": "Identifier", "span": { "start": 445, - "end": 454, + "end": 446, "ctxt": 0 }, "value": "y", @@ -1817,7 +1817,7 @@ "type": "Identifier", "span": { "start": 497, - "end": 501, + "end": 498, "ctxt": 0 }, "value": "x", @@ -1854,7 +1854,7 @@ "type": "Identifier", "span": { "start": 503, - "end": 507, + "end": 504, "ctxt": 0 }, "value": "y", @@ -2065,7 +2065,7 @@ "type": "Identifier", "span": { "start": 528, - "end": 535, + "end": 529, "ctxt": 0 }, "value": "x", @@ -2102,7 +2102,7 @@ "type": "Identifier", "span": { "start": 537, - "end": 541, + "end": 538, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.json index 61c770cd6a40..21c996d24bbf 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.json @@ -284,7 +284,7 @@ "type": "Identifier", "span": { "start": 146, - "end": 150, + "end": 147, "ctxt": 0 }, "value": "x", @@ -518,7 +518,7 @@ "type": "Identifier", "span": { "start": 205, - "end": 209, + "end": 206, "ctxt": 0 }, "value": "x", @@ -675,7 +675,7 @@ "type": "Identifier", "span": { "start": 232, - "end": 241, + "end": 233, "ctxt": 0 }, "value": "x", @@ -780,7 +780,7 @@ "type": "Identifier", "span": { "start": 273, - "end": 278, + "end": 274, "ctxt": 0 }, "value": "x", @@ -937,7 +937,7 @@ "type": "Identifier", "span": { "start": 301, - "end": 311, + "end": 302, "ctxt": 0 }, "value": "x", @@ -1348,7 +1348,7 @@ "type": "Identifier", "span": { "start": 421, - "end": 425, + "end": 422, "ctxt": 0 }, "value": "x", @@ -1385,7 +1385,7 @@ "type": "Identifier", "span": { "start": 427, - "end": 431, + "end": 428, "ctxt": 0 }, "value": "y", @@ -1542,7 +1542,7 @@ "type": "Identifier", "span": { "start": 454, - "end": 463, + "end": 455, "ctxt": 0 }, "value": "x", @@ -1569,7 +1569,7 @@ "type": "Identifier", "span": { "start": 465, - "end": 474, + "end": 466, "ctxt": 0 }, "value": "y", @@ -1674,7 +1674,7 @@ "type": "Identifier", "span": { "start": 519, - "end": 523, + "end": 520, "ctxt": 0 }, "value": "x", @@ -1711,7 +1711,7 @@ "type": "Identifier", "span": { "start": 525, - "end": 529, + "end": 526, "ctxt": 0 }, "value": "y", @@ -1909,7 +1909,7 @@ "type": "Identifier", "span": { "start": 552, - "end": 559, + "end": 553, "ctxt": 0 }, "value": "x", @@ -1946,7 +1946,7 @@ "type": "Identifier", "span": { "start": 561, - "end": 565, + "end": 562, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipTypeParameter.json index 4ec318662837..f06c7ba53aad 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipTypeParameter.json @@ -514,7 +514,7 @@ "type": "Identifier", "span": { "start": 146, - "end": 150, + "end": 147, "ctxt": 0 }, "value": "t", @@ -560,7 +560,7 @@ "type": "Identifier", "span": { "start": 152, - "end": 156, + "end": 153, "ctxt": 0 }, "value": "u", diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithOneOperandIsAny.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithOneOperandIsAny.json index 5e27200c8084..3632d7690b79 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithOneOperandIsAny.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithOneOperandIsAny.json @@ -160,7 +160,7 @@ "type": "Identifier", "span": { "start": 50, - "end": 54, + "end": 51, "ctxt": 0 }, "value": "t", diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithOneOperandIsUndefined.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithOneOperandIsUndefined.json index 98c365cc5539..77e9cd8e1a6a 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithOneOperandIsUndefined.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithOneOperandIsUndefined.json @@ -170,7 +170,7 @@ "type": "Identifier", "span": { "start": 63, - "end": 67, + "end": 64, "ctxt": 0 }, "value": "t", diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnCallSignature.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnCallSignature.json index d59af94e1938..1a05f72a71e4 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnCallSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnCallSignature.json @@ -405,7 +405,7 @@ "type": "Identifier", "span": { "start": 155, - "end": 164, + "end": 156, "ctxt": 0 }, "value": "a", @@ -432,7 +432,7 @@ "type": "Identifier", "span": { "start": 166, - "end": 175, + "end": 167, "ctxt": 0 }, "value": "b", @@ -550,7 +550,7 @@ "type": "Identifier", "span": { "start": 199, - "end": 208, + "end": 200, "ctxt": 0 }, "value": "a", @@ -577,7 +577,7 @@ "type": "Identifier", "span": { "start": 210, - "end": 219, + "end": 211, "ctxt": 0 }, "value": "b", @@ -695,7 +695,7 @@ "type": "Identifier", "span": { "start": 244, - "end": 253, + "end": 245, "ctxt": 0 }, "value": "a", @@ -722,7 +722,7 @@ "type": "Identifier", "span": { "start": 255, - "end": 264, + "end": 256, "ctxt": 0 }, "value": "b", @@ -840,7 +840,7 @@ "type": "Identifier", "span": { "start": 288, - "end": 297, + "end": 289, "ctxt": 0 }, "value": "a", @@ -958,7 +958,7 @@ "type": "Identifier", "span": { "start": 322, - "end": 331, + "end": 323, "ctxt": 0 }, "value": "a", @@ -985,7 +985,7 @@ "type": "Identifier", "span": { "start": 333, - "end": 342, + "end": 334, "ctxt": 0 }, "value": "b", @@ -1193,7 +1193,7 @@ "type": "Identifier", "span": { "start": 391, - "end": 398, + "end": 392, "ctxt": 0 }, "value": "a", @@ -1321,7 +1321,7 @@ "type": "Identifier", "span": { "start": 422, - "end": 432, + "end": 423, "ctxt": 0 }, "value": "a", @@ -1449,7 +1449,7 @@ "type": "Identifier", "span": { "start": 457, - "end": 467, + "end": 458, "ctxt": 0 }, "value": "a", @@ -1486,7 +1486,7 @@ "type": "Identifier", "span": { "start": 469, - "end": 476, + "end": 470, "ctxt": 0 }, "value": "b", @@ -1614,7 +1614,7 @@ "type": "Identifier", "span": { "start": 500, - "end": 507, + "end": 501, "ctxt": 0 }, "value": "a", @@ -1651,7 +1651,7 @@ "type": "Identifier", "span": { "start": 509, - "end": 519, + "end": 510, "ctxt": 0 }, "value": "b", @@ -2369,7 +2369,7 @@ "type": "Identifier", "span": { "start": 695, - "end": 703, + "end": 696, "ctxt": 0 }, "value": "a", @@ -2497,7 +2497,7 @@ "type": "Identifier", "span": { "start": 728, - "end": 739, + "end": 729, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnConstructorSignature.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnConstructorSignature.json index 27932db4db07..d314c25ddc8f 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnConstructorSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnConstructorSignature.json @@ -386,7 +386,7 @@ "type": "Identifier", "span": { "start": 161, - "end": 170, + "end": 162, "ctxt": 0 }, "value": "a", @@ -413,7 +413,7 @@ "type": "Identifier", "span": { "start": 172, - "end": 181, + "end": 173, "ctxt": 0 }, "value": "b", @@ -528,7 +528,7 @@ "type": "Identifier", "span": { "start": 207, - "end": 216, + "end": 208, "ctxt": 0 }, "value": "a", @@ -555,7 +555,7 @@ "type": "Identifier", "span": { "start": 218, - "end": 227, + "end": 219, "ctxt": 0 }, "value": "b", @@ -670,7 +670,7 @@ "type": "Identifier", "span": { "start": 254, - "end": 263, + "end": 255, "ctxt": 0 }, "value": "a", @@ -697,7 +697,7 @@ "type": "Identifier", "span": { "start": 265, - "end": 274, + "end": 266, "ctxt": 0 }, "value": "b", @@ -812,7 +812,7 @@ "type": "Identifier", "span": { "start": 300, - "end": 309, + "end": 301, "ctxt": 0 }, "value": "a", @@ -927,7 +927,7 @@ "type": "Identifier", "span": { "start": 336, - "end": 345, + "end": 337, "ctxt": 0 }, "value": "a", @@ -954,7 +954,7 @@ "type": "Identifier", "span": { "start": 347, - "end": 356, + "end": 348, "ctxt": 0 }, "value": "b", @@ -1156,7 +1156,7 @@ "type": "Identifier", "span": { "start": 409, - "end": 416, + "end": 410, "ctxt": 0 }, "value": "a", @@ -1281,7 +1281,7 @@ "type": "Identifier", "span": { "start": 442, - "end": 452, + "end": 443, "ctxt": 0 }, "value": "a", @@ -1406,7 +1406,7 @@ "type": "Identifier", "span": { "start": 479, - "end": 489, + "end": 480, "ctxt": 0 }, "value": "a", @@ -1443,7 +1443,7 @@ "type": "Identifier", "span": { "start": 491, - "end": 498, + "end": 492, "ctxt": 0 }, "value": "b", @@ -1568,7 +1568,7 @@ "type": "Identifier", "span": { "start": 524, - "end": 531, + "end": 525, "ctxt": 0 }, "value": "a", @@ -1605,7 +1605,7 @@ "type": "Identifier", "span": { "start": 533, - "end": 543, + "end": 534, "ctxt": 0 }, "value": "b", @@ -1904,7 +1904,7 @@ "type": "Identifier", "span": { "start": 626, - "end": 634, + "end": 627, "ctxt": 0 }, "value": "a", @@ -2029,7 +2029,7 @@ "type": "Identifier", "span": { "start": 660, - "end": 671, + "end": 661, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.json index 8d311800a7b1..5be00095742e 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.json @@ -225,7 +225,7 @@ "type": "Identifier", "span": { "start": 109, - "end": 113, + "end": 110, "ctxt": 0 }, "value": "x", @@ -395,7 +395,7 @@ "type": "Identifier", "span": { "start": 134, - "end": 143, + "end": 135, "ctxt": 0 }, "value": "x", @@ -513,7 +513,7 @@ "type": "Identifier", "span": { "start": 173, - "end": 177, + "end": 174, "ctxt": 0 }, "value": "x", @@ -683,7 +683,7 @@ "type": "Identifier", "span": { "start": 198, - "end": 207, + "end": 199, "ctxt": 0 }, "value": "x", @@ -710,7 +710,7 @@ "type": "Identifier", "span": { "start": 209, - "end": 218, + "end": 210, "ctxt": 0 }, "value": "y", @@ -828,7 +828,7 @@ "type": "Identifier", "span": { "start": 251, - "end": 255, + "end": 252, "ctxt": 0 }, "value": "x", @@ -865,7 +865,7 @@ "type": "Identifier", "span": { "start": 257, - "end": 261, + "end": 258, "ctxt": 0 }, "value": "y", @@ -1058,7 +1058,7 @@ "type": "Identifier", "span": { "start": 282, - "end": 291, + "end": 283, "ctxt": 0 }, "value": "x", @@ -1085,7 +1085,7 @@ "type": "Identifier", "span": { "start": 293, - "end": 302, + "end": 294, "ctxt": 0 }, "value": "y", @@ -1203,7 +1203,7 @@ "type": "Identifier", "span": { "start": 332, - "end": 337, + "end": 333, "ctxt": 0 }, "value": "x", @@ -1373,7 +1373,7 @@ "type": "Identifier", "span": { "start": 358, - "end": 368, + "end": 359, "ctxt": 0 }, "value": "x", @@ -1823,7 +1823,7 @@ "type": "Identifier", "span": { "start": 472, - "end": 476, + "end": 473, "ctxt": 0 }, "value": "x", @@ -1860,7 +1860,7 @@ "type": "Identifier", "span": { "start": 478, - "end": 482, + "end": 479, "ctxt": 0 }, "value": "y", @@ -2030,7 +2030,7 @@ "type": "Identifier", "span": { "start": 503, - "end": 512, + "end": 504, "ctxt": 0 }, "value": "x", @@ -2057,7 +2057,7 @@ "type": "Identifier", "span": { "start": 514, - "end": 523, + "end": 515, "ctxt": 0 }, "value": "y", @@ -2175,7 +2175,7 @@ "type": "Identifier", "span": { "start": 595, - "end": 602, + "end": 596, "ctxt": 0 }, "value": "x", @@ -2212,7 +2212,7 @@ "type": "Identifier", "span": { "start": 604, - "end": 614, + "end": 605, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.json index 6a34af851624..5bae7d6fc712 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.json @@ -212,7 +212,7 @@ "type": "Identifier", "span": { "start": 111, - "end": 115, + "end": 112, "ctxt": 0 }, "value": "x", @@ -369,7 +369,7 @@ "type": "Identifier", "span": { "start": 138, - "end": 147, + "end": 139, "ctxt": 0 }, "value": "x", @@ -474,7 +474,7 @@ "type": "Identifier", "span": { "start": 179, - "end": 183, + "end": 180, "ctxt": 0 }, "value": "x", @@ -631,7 +631,7 @@ "type": "Identifier", "span": { "start": 206, - "end": 215, + "end": 207, "ctxt": 0 }, "value": "x", @@ -658,7 +658,7 @@ "type": "Identifier", "span": { "start": 217, - "end": 226, + "end": 218, "ctxt": 0 }, "value": "y", @@ -763,7 +763,7 @@ "type": "Identifier", "span": { "start": 261, - "end": 265, + "end": 262, "ctxt": 0 }, "value": "x", @@ -800,7 +800,7 @@ "type": "Identifier", "span": { "start": 267, - "end": 271, + "end": 268, "ctxt": 0 }, "value": "y", @@ -980,7 +980,7 @@ "type": "Identifier", "span": { "start": 294, - "end": 303, + "end": 295, "ctxt": 0 }, "value": "x", @@ -1007,7 +1007,7 @@ "type": "Identifier", "span": { "start": 305, - "end": 314, + "end": 306, "ctxt": 0 }, "value": "y", @@ -1112,7 +1112,7 @@ "type": "Identifier", "span": { "start": 346, - "end": 351, + "end": 347, "ctxt": 0 }, "value": "x", @@ -1269,7 +1269,7 @@ "type": "Identifier", "span": { "start": 374, - "end": 384, + "end": 375, "ctxt": 0 }, "value": "x", @@ -1680,7 +1680,7 @@ "type": "Identifier", "span": { "start": 494, - "end": 498, + "end": 495, "ctxt": 0 }, "value": "x", @@ -1717,7 +1717,7 @@ "type": "Identifier", "span": { "start": 500, - "end": 504, + "end": 501, "ctxt": 0 }, "value": "y", @@ -1874,7 +1874,7 @@ "type": "Identifier", "span": { "start": 527, - "end": 536, + "end": 528, "ctxt": 0 }, "value": "x", @@ -1901,7 +1901,7 @@ "type": "Identifier", "span": { "start": 538, - "end": 547, + "end": 539, "ctxt": 0 }, "value": "y", @@ -2006,7 +2006,7 @@ "type": "Identifier", "span": { "start": 623, - "end": 630, + "end": 624, "ctxt": 0 }, "value": "x", @@ -2043,7 +2043,7 @@ "type": "Identifier", "span": { "start": 632, - "end": 642, + "end": 633, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithTypeParameter.json index 3a8711c49009..ca52c40c01e3 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithTypeParameter.json @@ -140,7 +140,7 @@ "type": "Identifier", "span": { "start": 78, - "end": 82, + "end": 79, "ctxt": 0 }, "value": "t", @@ -186,7 +186,7 @@ "type": "Identifier", "span": { "start": 84, - "end": 88, + "end": 85, "ctxt": 0 }, "value": "u", @@ -232,7 +232,7 @@ "type": "Identifier", "span": { "start": 90, - "end": 94, + "end": 91, "ctxt": 0 }, "value": "v", diff --git a/crates/swc_ecma_parser/tests/tsc/compoundAssignmentLHSIsReference.json b/crates/swc_ecma_parser/tests/tsc/compoundAssignmentLHSIsReference.json index efd1690f7a56..5c1062a24c7d 100644 --- a/crates/swc_ecma_parser/tests/tsc/compoundAssignmentLHSIsReference.json +++ b/crates/swc_ecma_parser/tests/tsc/compoundAssignmentLHSIsReference.json @@ -190,7 +190,7 @@ "type": "Identifier", "span": { "start": 108, - "end": 118, + "end": 110, "ctxt": 0 }, "value": "x2", @@ -755,7 +755,7 @@ "type": "Identifier", "span": { "start": 369, - "end": 379, + "end": 371, "ctxt": 0 }, "value": "x4", diff --git a/crates/swc_ecma_parser/tests/tsc/compoundExponentiationAssignmentLHSIsReference.json b/crates/swc_ecma_parser/tests/tsc/compoundExponentiationAssignmentLHSIsReference.json index d783161091fd..b41660d84a18 100644 --- a/crates/swc_ecma_parser/tests/tsc/compoundExponentiationAssignmentLHSIsReference.json +++ b/crates/swc_ecma_parser/tests/tsc/compoundExponentiationAssignmentLHSIsReference.json @@ -168,7 +168,7 @@ "type": "Identifier", "span": { "start": 101, - "end": 111, + "end": 103, "ctxt": 0 }, "value": "x2", @@ -532,7 +532,7 @@ "type": "Identifier", "span": { "start": 301, - "end": 311, + "end": 303, "ctxt": 0 }, "value": "x4", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames1_ES5.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames1_ES5.json index 3b4e40f31f12..129e091e7af1 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames1_ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames1_ES5.json @@ -165,7 +165,7 @@ "type": "Identifier", "span": { "start": 75, - "end": 84, + "end": 76, "ctxt": 0 }, "value": "v", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames1_ES6.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames1_ES6.json index 3b4e40f31f12..129e091e7af1 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames1_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames1_ES6.json @@ -165,7 +165,7 @@ "type": "Identifier", "span": { "start": 75, - "end": 84, + "end": 76, "ctxt": 0 }, "value": "v", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames36_ES5.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames36_ES5.json index 00bd42b48a1b..32b3fcebf521 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames36_ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames36_ES5.json @@ -355,7 +355,7 @@ "type": "Identifier", "span": { "start": 170, - "end": 177, + "end": 171, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames36_ES6.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames36_ES6.json index 00bd42b48a1b..32b3fcebf521 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames36_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames36_ES6.json @@ -355,7 +355,7 @@ "type": "Identifier", "span": { "start": 170, - "end": 177, + "end": 171, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames37_ES5.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames37_ES5.json index f74a205c61e9..b757657a92d5 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames37_ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames37_ES5.json @@ -355,7 +355,7 @@ "type": "Identifier", "span": { "start": 170, - "end": 177, + "end": 171, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames37_ES6.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames37_ES6.json index f74a205c61e9..b757657a92d5 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames37_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames37_ES6.json @@ -355,7 +355,7 @@ "type": "Identifier", "span": { "start": 170, - "end": 177, + "end": 171, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames38_ES5.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames38_ES5.json index 956cdc2b5d6c..00f011a025db 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames38_ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames38_ES5.json @@ -393,7 +393,7 @@ "type": "Identifier", "span": { "start": 170, - "end": 177, + "end": 171, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames38_ES6.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames38_ES6.json index 956cdc2b5d6c..00f011a025db 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames38_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames38_ES6.json @@ -393,7 +393,7 @@ "type": "Identifier", "span": { "start": 170, - "end": 177, + "end": 171, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames39_ES5.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames39_ES5.json index 4f0fe222d68f..eaf00601869e 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames39_ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames39_ES5.json @@ -393,7 +393,7 @@ "type": "Identifier", "span": { "start": 170, - "end": 177, + "end": 171, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames39_ES6.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames39_ES6.json index 4f0fe222d68f..eaf00601869e 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames39_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames39_ES6.json @@ -393,7 +393,7 @@ "type": "Identifier", "span": { "start": 170, - "end": 177, + "end": 171, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames43_ES5.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames43_ES5.json index f6daefad0fe1..b2ecf1579811 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames43_ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames43_ES5.json @@ -382,7 +382,7 @@ "type": "Identifier", "span": { "start": 192, - "end": 199, + "end": 193, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames43_ES6.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames43_ES6.json index f6daefad0fe1..b2ecf1579811 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames43_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames43_ES6.json @@ -382,7 +382,7 @@ "type": "Identifier", "span": { "start": 192, - "end": 199, + "end": 193, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames44_ES5.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames44_ES5.json index 0a442fcb2444..c62e36b77d26 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames44_ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames44_ES5.json @@ -382,7 +382,7 @@ "type": "Identifier", "span": { "start": 165, - "end": 171, + "end": 166, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames44_ES6.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames44_ES6.json index 0a442fcb2444..c62e36b77d26 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames44_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames44_ES6.json @@ -382,7 +382,7 @@ "type": "Identifier", "span": { "start": 165, - "end": 171, + "end": 166, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames45_ES5.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames45_ES5.json index 320559b58f1a..89cec3435721 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames45_ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames45_ES5.json @@ -382,7 +382,7 @@ "type": "Identifier", "span": { "start": 252, - "end": 258, + "end": 253, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames45_ES6.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames45_ES6.json index 320559b58f1a..89cec3435721 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames45_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames45_ES6.json @@ -382,7 +382,7 @@ "type": "Identifier", "span": { "start": 252, - "end": 258, + "end": 253, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames48_ES5.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames48_ES5.json index 4bd8a3d38e0a..6b58a6af5d3e 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames48_ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames48_ES5.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 52, - "end": 73, + "end": 53, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames48_ES6.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames48_ES6.json index 4bd8a3d38e0a..6b58a6af5d3e 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames48_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames48_ES6.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 52, - "end": 73, + "end": 53, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames9_ES5.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames9_ES5.json index 87a7d1852905..0ffed447c7ec 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames9_ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames9_ES5.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 28, - "end": 37, + "end": 29, "ctxt": 0 }, "value": "s", @@ -111,7 +111,7 @@ "type": "Identifier", "span": { "start": 59, - "end": 68, + "end": 60, "ctxt": 0 }, "value": "n", @@ -190,7 +190,7 @@ "type": "Identifier", "span": { "start": 93, - "end": 97, + "end": 94, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames9_ES6.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames9_ES6.json index 87a7d1852905..0ffed447c7ec 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames9_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames9_ES6.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 28, - "end": 37, + "end": 29, "ctxt": 0 }, "value": "s", @@ -111,7 +111,7 @@ "type": "Identifier", "span": { "start": 59, - "end": 68, + "end": 60, "ctxt": 0 }, "value": "n", @@ -190,7 +190,7 @@ "type": "Identifier", "span": { "start": 93, - "end": 97, + "end": 94, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType1_ES5.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType1_ES5.json index c3ac98f63517..d1f8942c1cc2 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType1_ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType1_ES5.json @@ -84,7 +84,7 @@ "type": "Identifier", "span": { "start": 49, - "end": 58, + "end": 50, "ctxt": 0 }, "value": "x", @@ -186,7 +186,7 @@ "type": "Identifier", "span": { "start": 89, - "end": 95, + "end": 90, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType1_ES6.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType1_ES6.json index c3ac98f63517..d1f8942c1cc2 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType1_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType1_ES6.json @@ -84,7 +84,7 @@ "type": "Identifier", "span": { "start": 49, - "end": 58, + "end": 50, "ctxt": 0 }, "value": "x", @@ -186,7 +186,7 @@ "type": "Identifier", "span": { "start": 89, - "end": 95, + "end": 90, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType2_ES5.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType2_ES5.json index 5744077241d2..3e510a4b5e85 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType2_ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType2_ES5.json @@ -84,7 +84,7 @@ "type": "Identifier", "span": { "start": 49, - "end": 55, + "end": 50, "ctxt": 0 }, "value": "x", @@ -186,7 +186,7 @@ "type": "Identifier", "span": { "start": 105, - "end": 114, + "end": 106, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType2_ES6.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType2_ES6.json index 5744077241d2..3e510a4b5e85 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType2_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType2_ES6.json @@ -84,7 +84,7 @@ "type": "Identifier", "span": { "start": 49, - "end": 55, + "end": 50, "ctxt": 0 }, "value": "x", @@ -186,7 +186,7 @@ "type": "Identifier", "span": { "start": 105, - "end": 114, + "end": 106, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType3_ES5.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType3_ES5.json index 84e8206e1831..9a9b45e3879d 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType3_ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType3_ES5.json @@ -84,7 +84,7 @@ "type": "Identifier", "span": { "start": 49, - "end": 58, + "end": 50, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType3_ES6.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType3_ES6.json index 84e8206e1831..9a9b45e3879d 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType3_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType3_ES6.json @@ -84,7 +84,7 @@ "type": "Identifier", "span": { "start": 49, - "end": 58, + "end": 50, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType6_ES5.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType6_ES5.json index 995b27d09a34..bb77cadfee98 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType6_ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType6_ES5.json @@ -161,7 +161,7 @@ "type": "Identifier", "span": { "start": 81, - "end": 90, + "end": 84, "ctxt": 0 }, "value": "obj", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType6_ES6.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType6_ES6.json index 995b27d09a34..bb77cadfee98 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType6_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType6_ES6.json @@ -161,7 +161,7 @@ "type": "Identifier", "span": { "start": 81, - "end": 90, + "end": 84, "ctxt": 0 }, "value": "obj", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType7_ES5.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType7_ES5.json index cff4e22d7971..7d8f689829dd 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType7_ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType7_ES5.json @@ -290,7 +290,7 @@ "type": "Identifier", "span": { "start": 120, - "end": 129, + "end": 123, "ctxt": 0 }, "value": "obj", @@ -449,7 +449,7 @@ "type": "Identifier", "span": { "start": 157, - "end": 166, + "end": 160, "ctxt": 0 }, "value": "obj", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType7_ES6.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType7_ES6.json index cff4e22d7971..7d8f689829dd 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType7_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType7_ES6.json @@ -290,7 +290,7 @@ "type": "Identifier", "span": { "start": 120, - "end": 129, + "end": 123, "ctxt": 0 }, "value": "obj", @@ -449,7 +449,7 @@ "type": "Identifier", "span": { "start": 157, - "end": 166, + "end": 160, "ctxt": 0 }, "value": "obj", diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesWithStaticProperty.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesWithStaticProperty.json index ebbad757b840..cb121b29e023 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesWithStaticProperty.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesWithStaticProperty.json @@ -212,7 +212,7 @@ "type": "Identifier", "span": { "start": 138, - "end": 147, + "end": 139, "ctxt": 0 }, "value": "x", @@ -605,7 +605,7 @@ "type": "Identifier", "span": { "start": 327, - "end": 336, + "end": 328, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/conditionalOperatorWithIdenticalBCT.json b/crates/swc_ecma_parser/tests/tsc/conditionalOperatorWithIdenticalBCT.json index 819a06d46098..7ec1ea557d5a 100644 --- a/crates/swc_ecma_parser/tests/tsc/conditionalOperatorWithIdenticalBCT.json +++ b/crates/swc_ecma_parser/tests/tsc/conditionalOperatorWithIdenticalBCT.json @@ -1149,7 +1149,7 @@ "type": "Identifier", "span": { "start": 612, - "end": 616, + "end": 613, "ctxt": 0 }, "value": "t", @@ -1949,7 +1949,7 @@ "type": "Identifier", "span": { "start": 1032, - "end": 1036, + "end": 1033, "ctxt": 0 }, "value": "t", @@ -2271,7 +2271,7 @@ "type": "Identifier", "span": { "start": 1220, - "end": 1224, + "end": 1221, "ctxt": 0 }, "value": "t", diff --git a/crates/swc_ecma_parser/tests/tsc/conditionalOperatorWithoutIdenticalBCT.json b/crates/swc_ecma_parser/tests/tsc/conditionalOperatorWithoutIdenticalBCT.json index 56bfde5cacd3..08201cdc8b57 100644 --- a/crates/swc_ecma_parser/tests/tsc/conditionalOperatorWithoutIdenticalBCT.json +++ b/crates/swc_ecma_parser/tests/tsc/conditionalOperatorWithoutIdenticalBCT.json @@ -1004,7 +1004,7 @@ "type": "Identifier", "span": { "start": 570, - "end": 574, + "end": 571, "ctxt": 0 }, "value": "t", @@ -1231,7 +1231,7 @@ "type": "Identifier", "span": { "start": 652, - "end": 656, + "end": 653, "ctxt": 0 }, "value": "t", @@ -1458,7 +1458,7 @@ "type": "Identifier", "span": { "start": 734, - "end": 738, + "end": 735, "ctxt": 0 }, "value": "t", @@ -1685,7 +1685,7 @@ "type": "Identifier", "span": { "start": 818, - "end": 822, + "end": 819, "ctxt": 0 }, "value": "t", diff --git a/crates/swc_ecma_parser/tests/tsc/conditionalTypes1.json b/crates/swc_ecma_parser/tests/tsc/conditionalTypes1.json index b4c0aa4f3782..004278310864 100644 --- a/crates/swc_ecma_parser/tests/tsc/conditionalTypes1.json +++ b/crates/swc_ecma_parser/tests/tsc/conditionalTypes1.json @@ -893,7 +893,7 @@ "type": "Identifier", "span": { "start": 539, - "end": 543, + "end": 540, "ctxt": 0 }, "value": "x", @@ -939,7 +939,7 @@ "type": "Identifier", "span": { "start": 545, - "end": 562, + "end": 546, "ctxt": 0 }, "value": "y", @@ -1157,7 +1157,7 @@ "type": "Identifier", "span": { "start": 643, - "end": 647, + "end": 644, "ctxt": 0 }, "value": "x", @@ -1203,7 +1203,7 @@ "type": "Identifier", "span": { "start": 649, - "end": 666, + "end": 650, "ctxt": 0 }, "value": "y", @@ -1564,7 +1564,7 @@ "type": "Identifier", "span": { "start": 778, - "end": 800, + "end": 779, "ctxt": 0 }, "value": "x", @@ -1675,7 +1675,7 @@ "type": "Identifier", "span": { "start": 802, - "end": 837, + "end": 803, "ctxt": 0 }, "value": "y", @@ -1958,7 +1958,7 @@ "type": "Identifier", "span": { "start": 925, - "end": 934, + "end": 926, "ctxt": 0 }, "value": "x", @@ -2031,7 +2031,7 @@ "type": "Identifier", "span": { "start": 936, - "end": 958, + "end": 937, "ctxt": 0 }, "value": "y", @@ -3752,7 +3752,7 @@ "type": "Identifier", "span": { "start": 1663, - "end": 1667, + "end": 1664, "ctxt": 0 }, "value": "p", @@ -6448,7 +6448,7 @@ "type": "Identifier", "span": { "start": 3004, - "end": 3019, + "end": 3011, "ctxt": 0 }, "value": "newName", @@ -7450,7 +7450,7 @@ "type": "Identifier", "span": { "start": 3455, - "end": 3459, + "end": 3456, "ctxt": 0 }, "value": "x", @@ -7496,7 +7496,7 @@ "type": "Identifier", "span": { "start": 3461, - "end": 3485, + "end": 3462, "ctxt": 0 }, "value": "y", @@ -7570,7 +7570,7 @@ "type": "Identifier", "span": { "start": 3487, - "end": 3514, + "end": 3488, "ctxt": 0 }, "value": "z", @@ -7940,7 +7940,7 @@ "type": "Identifier", "span": { "start": 3642, - "end": 3652, + "end": 3643, "ctxt": 0 }, "value": "x", @@ -7995,7 +7995,7 @@ "type": "Identifier", "span": { "start": 3654, - "end": 3681, + "end": 3655, "ctxt": 0 }, "value": "y", @@ -8069,7 +8069,7 @@ "type": "Identifier", "span": { "start": 3683, - "end": 3713, + "end": 3684, "ctxt": 0 }, "value": "z", @@ -9047,7 +9047,7 @@ "type": "Identifier", "span": { "start": 4148, - "end": 4172, + "end": 4152, "ctxt": 0 }, "value": "part", @@ -9985,7 +9985,7 @@ "type": "Identifier", "span": { "start": 4595, - "end": 4603, + "end": 4600, "ctxt": 0 }, "value": "value", @@ -10327,7 +10327,7 @@ "type": "Identifier", "span": { "start": 4737, - "end": 4746, + "end": 4738, "ctxt": 0 }, "value": "n", @@ -10363,7 +10363,7 @@ "type": "Identifier", "span": { "start": 4748, - "end": 4758, + "end": 4749, "ctxt": 0 }, "value": "b", @@ -10399,7 +10399,7 @@ "type": "Identifier", "span": { "start": 4760, - "end": 4779, + "end": 4761, "ctxt": 0 }, "value": "x", @@ -10454,7 +10454,7 @@ "type": "Identifier", "span": { "start": 4781, - "end": 4785, + "end": 4782, "ctxt": 0 }, "value": "y", @@ -10869,7 +10869,7 @@ "type": "Identifier", "span": { "start": 5013, - "end": 5017, + "end": 5014, "ctxt": 0 }, "value": "x", @@ -10915,7 +10915,7 @@ "type": "Identifier", "span": { "start": 5019, - "end": 5031, + "end": 5020, "ctxt": 0 }, "value": "y", @@ -15712,7 +15712,7 @@ "type": "Identifier", "span": { "start": 7111, - "end": 7149, + "end": 7112, "ctxt": 0 }, "value": "x", @@ -15985,7 +15985,7 @@ "type": "Identifier", "span": { "start": 7214, - "end": 7252, + "end": 7215, "ctxt": 0 }, "value": "x", @@ -26200,7 +26200,7 @@ "type": "Identifier", "span": { "start": 10951, - "end": 10955, + "end": 10952, "ctxt": 0 }, "value": "o", @@ -26246,7 +26246,7 @@ "type": "Identifier", "span": { "start": 10957, - "end": 10979, + "end": 10958, "ctxt": 0 }, "value": "a", @@ -26754,7 +26754,7 @@ "type": "Identifier", "span": { "start": 11139, - "end": 11143, + "end": 11140, "ctxt": 0 }, "value": "a", @@ -26867,7 +26867,7 @@ "type": "Identifier", "span": { "start": 11186, - "end": 11190, + "end": 11187, "ctxt": 0 }, "value": "a", @@ -27034,7 +27034,7 @@ "type": "Identifier", "span": { "start": 11255, - "end": 11259, + "end": 11256, "ctxt": 0 }, "value": "a", @@ -27157,7 +27157,7 @@ "type": "Identifier", "span": { "start": 11298, - "end": 11302, + "end": 11299, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/conditionalTypes2.json b/crates/swc_ecma_parser/tests/tsc/conditionalTypes2.json index 90d93b738396..44ce9a284e7d 100644 --- a/crates/swc_ecma_parser/tests/tsc/conditionalTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/conditionalTypes2.json @@ -537,7 +537,7 @@ "type": "Identifier", "span": { "start": 284, - "end": 299, + "end": 285, "ctxt": 0 }, "value": "a", @@ -611,7 +611,7 @@ "type": "Identifier", "span": { "start": 301, - "end": 316, + "end": 302, "ctxt": 0 }, "value": "b", @@ -870,7 +870,7 @@ "type": "Identifier", "span": { "start": 383, - "end": 402, + "end": 384, "ctxt": 0 }, "value": "a", @@ -944,7 +944,7 @@ "type": "Identifier", "span": { "start": 404, - "end": 423, + "end": 405, "ctxt": 0 }, "value": "b", @@ -1203,7 +1203,7 @@ "type": "Identifier", "span": { "start": 490, - "end": 505, + "end": 491, "ctxt": 0 }, "value": "a", @@ -1277,7 +1277,7 @@ "type": "Identifier", "span": { "start": 507, - "end": 522, + "end": 508, "ctxt": 0 }, "value": "b", @@ -1536,7 +1536,7 @@ "type": "Identifier", "span": { "start": 656, - "end": 664, + "end": 661, "ctxt": 0 }, "value": "value", @@ -1796,7 +1796,7 @@ "type": "Identifier", "span": { "start": 766, - "end": 773, + "end": 770, "ctxt": 0 }, "value": "item", @@ -2009,7 +2009,7 @@ "type": "Identifier", "span": { "start": 874, - "end": 878, + "end": 875, "ctxt": 0 }, "value": "x", @@ -2312,7 +2312,7 @@ "type": "Identifier", "span": { "start": 984, - "end": 1022, + "end": 985, "ctxt": 0 }, "value": "x", @@ -2519,7 +2519,7 @@ "type": "Identifier", "span": { "start": 1086, - "end": 1124, + "end": 1087, "ctxt": 0 }, "value": "x", @@ -2881,7 +2881,7 @@ "type": "Identifier", "span": { "start": 1268, - "end": 1299, + "end": 1269, "ctxt": 0 }, "value": "x", @@ -3043,7 +3043,7 @@ "type": "Identifier", "span": { "start": 1332, - "end": 1363, + "end": 1333, "ctxt": 0 }, "value": "x", @@ -3432,7 +3432,7 @@ "type": "Identifier", "span": { "start": 1462, - "end": 1494, + "end": 1463, "ctxt": 0 }, "value": "x", @@ -3572,7 +3572,7 @@ "type": "Identifier", "span": { "start": 1496, - "end": 1520, + "end": 1497, "ctxt": 0 }, "value": "y", @@ -3694,7 +3694,7 @@ "type": "Identifier", "span": { "start": 1522, - "end": 1546, + "end": 1523, "ctxt": 0 }, "value": "z", @@ -4000,7 +4000,7 @@ "type": "Identifier", "span": { "start": 1614, - "end": 1646, + "end": 1615, "ctxt": 0 }, "value": "x", @@ -4140,7 +4140,7 @@ "type": "Identifier", "span": { "start": 1648, - "end": 1672, + "end": 1649, "ctxt": 0 }, "value": "y", @@ -4262,7 +4262,7 @@ "type": "Identifier", "span": { "start": 1674, - "end": 1698, + "end": 1675, "ctxt": 0 }, "value": "z", @@ -5121,7 +5121,7 @@ "type": "Identifier", "span": { "start": 2063, - "end": 2086, + "end": 2072, "ctxt": 0 }, "value": "predicate", @@ -5145,7 +5145,7 @@ "type": "Identifier", "span": { "start": 2074, - "end": 2077, + "end": 2075, "ctxt": 0 }, "value": "v", @@ -5515,7 +5515,7 @@ "type": "Identifier", "span": { "start": 2139, - "end": 2163, + "end": 2148, "ctxt": 0 }, "value": "predicate", @@ -5539,7 +5539,7 @@ "type": "Identifier", "span": { "start": 2150, - "end": 2153, + "end": 2151, "ctxt": 0 }, "value": "x", @@ -5775,7 +5775,7 @@ "type": "Identifier", "span": { "start": 2217, - "end": 2241, + "end": 2226, "ctxt": 0 }, "value": "predicate", @@ -5799,7 +5799,7 @@ "type": "Identifier", "span": { "start": 2228, - "end": 2231, + "end": 2229, "ctxt": 0 }, "value": "v", @@ -6691,7 +6691,7 @@ "type": "Identifier", "span": { "start": 2493, - "end": 2517, + "end": 2498, "ctxt": 0 }, "value": "value", @@ -6799,7 +6799,7 @@ "type": "Identifier", "span": { "start": 2556, - "end": 2571, + "end": 2561, "ctxt": 0 }, "value": "value", @@ -6888,7 +6888,7 @@ "type": "Identifier", "span": { "start": 2600, - "end": 2608, + "end": 2605, "ctxt": 0 }, "value": "value", @@ -12469,7 +12469,7 @@ "type": "Identifier", "span": { "start": 4879, - "end": 4911, + "end": 4888, "ctxt": 0 }, "value": "_response", @@ -12618,7 +12618,7 @@ "type": "Identifier", "span": { "start": 4985, - "end": 5027, + "end": 4999, "ctxt": 0 }, "value": "functionToCall", @@ -12813,7 +12813,7 @@ "type": "Identifier", "span": { "start": 5078, - "end": 5112, + "end": 5086, "ctxt": 0 }, "value": "response", @@ -13422,7 +13422,7 @@ "type": "Identifier", "span": { "start": 5415, - "end": 5460, + "end": 5419, "ctxt": 0 }, "value": "name", @@ -14115,7 +14115,7 @@ "type": "Identifier", "span": { "start": 5835, - "end": 5850, + "end": 5836, "ctxt": 0 }, "value": "x", @@ -14222,7 +14222,7 @@ "type": "Identifier", "span": { "start": 5882, - "end": 5905, + "end": 5883, "ctxt": 0 }, "value": "f", @@ -14246,7 +14246,7 @@ "type": "Identifier", "span": { "start": 5886, - "end": 5896, + "end": 5887, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/conditionalTypesExcessProperties.json b/crates/swc_ecma_parser/tests/tsc/conditionalTypesExcessProperties.json index a51a5c11e0de..d33ba2d009df 100644 --- a/crates/swc_ecma_parser/tests/tsc/conditionalTypesExcessProperties.json +++ b/crates/swc_ecma_parser/tests/tsc/conditionalTypesExcessProperties.json @@ -301,7 +301,7 @@ "type": "Identifier", "span": { "start": 146, - "end": 150, + "end": 147, "ctxt": 0 }, "value": "a", @@ -347,7 +347,7 @@ "type": "Identifier", "span": { "start": 152, - "end": 168, + "end": 154, "ctxt": 0 }, "value": "sa", diff --git a/crates/swc_ecma_parser/tests/tsc/constEnum3.json b/crates/swc_ecma_parser/tests/tsc/constEnum3.json index f9d6b9064c86..06217cd5bd82 100644 --- a/crates/swc_ecma_parser/tests/tsc/constEnum3.json +++ b/crates/swc_ecma_parser/tests/tsc/constEnum3.json @@ -140,7 +140,7 @@ "type": "Identifier", "span": { "start": 89, - "end": 100, + "end": 90, "ctxt": 0 }, "value": "f", @@ -221,7 +221,7 @@ "type": "Identifier", "span": { "start": 118, - "end": 132, + "end": 119, "ctxt": 0 }, "value": "f", diff --git a/crates/swc_ecma_parser/tests/tsc/constEnumPropertyAccess1.json b/crates/swc_ecma_parser/tests/tsc/constEnumPropertyAccess1.json index 51c213111ab3..1f178d0fbff4 100644 --- a/crates/swc_ecma_parser/tests/tsc/constEnumPropertyAccess1.json +++ b/crates/swc_ecma_parser/tests/tsc/constEnumPropertyAccess1.json @@ -768,7 +768,7 @@ "type": "Identifier", "span": { "start": 532, - "end": 541, + "end": 533, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/constEnumPropertyAccess2.json b/crates/swc_ecma_parser/tests/tsc/constEnumPropertyAccess2.json index 6f8efe95b55b..58305d180d46 100644 --- a/crates/swc_ecma_parser/tests/tsc/constEnumPropertyAccess2.json +++ b/crates/swc_ecma_parser/tests/tsc/constEnumPropertyAccess2.json @@ -429,7 +429,7 @@ "type": "Identifier", "span": { "start": 465, - "end": 469, + "end": 466, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithAny.json b/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithAny.json index 5829f1e60b68..d6aa053b816a 100644 --- a/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithAny.json +++ b/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithAny.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 125, - "end": 129, + "end": 126, "ctxt": 0 }, "value": "x", @@ -206,7 +206,7 @@ "type": "Identifier", "span": { "start": 190, - "end": 194, + "end": 191, "ctxt": 0 }, "value": "x", @@ -412,7 +412,7 @@ "type": "Identifier", "span": { "start": 316, - "end": 320, + "end": 317, "ctxt": 0 }, "value": "x", @@ -521,7 +521,7 @@ "type": "Identifier", "span": { "start": 301, - "end": 305, + "end": 302, "ctxt": 0 }, "value": "x", @@ -1079,7 +1079,7 @@ "type": "Identifier", "span": { "start": 629, - "end": 633, + "end": 630, "ctxt": 0 }, "value": "x", @@ -1386,7 +1386,7 @@ "type": "Identifier", "span": { "start": 745, - "end": 749, + "end": 746, "ctxt": 0 }, "value": "x", @@ -1725,7 +1725,7 @@ "type": "Identifier", "span": { "start": 981, - "end": 985, + "end": 982, "ctxt": 0 }, "value": "x", @@ -1815,7 +1815,7 @@ "type": "Identifier", "span": { "start": 945, - "end": 948, + "end": 946, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithAny2.json b/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithAny2.json index e6dd17abad50..dae181b13808 100644 --- a/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithAny2.json +++ b/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithAny2.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 239, - "end": 243, + "end": 240, "ctxt": 0 }, "value": "y", @@ -139,7 +139,7 @@ "type": "Identifier", "span": { "start": 227, - "end": 231, + "end": 228, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithEmptyObject.json b/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithEmptyObject.json index 0444925d892a..c044bdaa38ed 100644 --- a/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithEmptyObject.json +++ b/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithEmptyObject.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 117, - "end": 121, + "end": 118, "ctxt": 0 }, "value": "x", @@ -361,7 +361,7 @@ "type": "Identifier", "span": { "start": 225, - "end": 229, + "end": 226, "ctxt": 0 }, "value": "x", @@ -765,7 +765,7 @@ "type": "Identifier", "span": { "start": 363, - "end": 367, + "end": 364, "ctxt": 0 }, "value": "x", @@ -1084,7 +1084,7 @@ "type": "Identifier", "span": { "start": 470, - "end": 474, + "end": 471, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance.json b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance.json index 5ec6d322677a..ebfee3bb9302 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance.json +++ b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance.json @@ -73,7 +73,7 @@ "type": "Identifier", "span": { "start": 146, - "end": 155, + "end": 147, "ctxt": 0 }, "value": "x", @@ -128,7 +128,7 @@ "type": "Identifier", "span": { "start": 191, - "end": 200, + "end": 192, "ctxt": 0 }, "value": "x", @@ -155,7 +155,7 @@ "type": "Identifier", "span": { "start": 202, - "end": 211, + "end": 203, "ctxt": 0 }, "value": "y", @@ -261,7 +261,7 @@ "type": "Identifier", "span": { "start": 299, - "end": 308, + "end": 300, "ctxt": 0 }, "value": "x", @@ -316,7 +316,7 @@ "type": "Identifier", "span": { "start": 388, - "end": 397, + "end": 389, "ctxt": 0 }, "value": "x", @@ -343,7 +343,7 @@ "type": "Identifier", "span": { "start": 399, - "end": 408, + "end": 400, "ctxt": 0 }, "value": "y", @@ -429,7 +429,7 @@ "type": "Identifier", "span": { "start": 562, - "end": 571, + "end": 563, "ctxt": 0 }, "value": "x", @@ -535,7 +535,7 @@ "type": "Identifier", "span": { "start": 661, - "end": 670, + "end": 662, "ctxt": 0 }, "value": "x", @@ -641,7 +641,7 @@ "type": "Identifier", "span": { "start": 805, - "end": 809, + "end": 806, "ctxt": 0 }, "value": "x", @@ -828,7 +828,7 @@ "type": "Identifier", "span": { "start": 957, - "end": 966, + "end": 958, "ctxt": 0 }, "value": "x", @@ -916,7 +916,7 @@ "type": "Identifier", "span": { "start": 994, - "end": 1003, + "end": 995, "ctxt": 0 }, "value": "x", @@ -943,7 +943,7 @@ "type": "Identifier", "span": { "start": 1005, - "end": 1014, + "end": 1006, "ctxt": 0 }, "value": "y", @@ -1031,7 +1031,7 @@ "type": "Identifier", "span": { "start": 1045, - "end": 1049, + "end": 1046, "ctxt": 0 }, "value": "x", @@ -1355,7 +1355,7 @@ "type": "Identifier", "span": { "start": 1182, - "end": 1191, + "end": 1183, "ctxt": 0 }, "value": "x", @@ -1443,7 +1443,7 @@ "type": "Identifier", "span": { "start": 1253, - "end": 1262, + "end": 1254, "ctxt": 0 }, "value": "x", @@ -1470,7 +1470,7 @@ "type": "Identifier", "span": { "start": 1264, - "end": 1273, + "end": 1265, "ctxt": 0 }, "value": "y", @@ -1558,7 +1558,7 @@ "type": "Identifier", "span": { "start": 1339, - "end": 1343, + "end": 1340, "ctxt": 0 }, "value": "x", @@ -1719,7 +1719,7 @@ "type": "Identifier", "span": { "start": 1453, - "end": 1462, + "end": 1454, "ctxt": 0 }, "value": "x", @@ -1807,7 +1807,7 @@ "type": "Identifier", "span": { "start": 1495, - "end": 1499, + "end": 1496, "ctxt": 0 }, "value": "x", @@ -1998,7 +1998,7 @@ "type": "Identifier", "span": { "start": 1589, - "end": 1598, + "end": 1590, "ctxt": 0 }, "value": "x", @@ -2137,7 +2137,7 @@ "type": "Identifier", "span": { "start": 1737, - "end": 1741, + "end": 1738, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance2.json b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance2.json index 71c513963e01..a0c7a1f92299 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance2.json +++ b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance2.json @@ -390,7 +390,7 @@ "type": "Identifier", "span": { "start": 316, - "end": 325, + "end": 317, "ctxt": 0 }, "value": "x", @@ -486,7 +486,7 @@ "type": "Identifier", "span": { "start": 353, - "end": 362, + "end": 354, "ctxt": 0 }, "value": "x", @@ -582,7 +582,7 @@ "type": "Identifier", "span": { "start": 390, - "end": 399, + "end": 391, "ctxt": 0 }, "value": "x", @@ -670,7 +670,7 @@ "type": "Identifier", "span": { "start": 423, - "end": 432, + "end": 424, "ctxt": 0 }, "value": "x", @@ -697,7 +697,7 @@ "type": "Identifier", "span": { "start": 434, - "end": 443, + "end": 435, "ctxt": 0 }, "value": "y", @@ -785,7 +785,7 @@ "type": "Identifier", "span": { "start": 469, - "end": 495, + "end": 470, "ctxt": 0 }, "value": "x", @@ -809,7 +809,7 @@ "type": "Identifier", "span": { "start": 473, - "end": 484, + "end": 476, "ctxt": 0 }, "value": "arg", @@ -919,7 +919,7 @@ "type": "Identifier", "span": { "start": 521, - "end": 546, + "end": 522, "ctxt": 0 }, "value": "x", @@ -943,7 +943,7 @@ "type": "Identifier", "span": { "start": 525, - "end": 534, + "end": 528, "ctxt": 0 }, "value": "arg", @@ -1083,7 +1083,7 @@ "type": "Identifier", "span": { "start": 570, - "end": 595, + "end": 571, "ctxt": 0 }, "value": "x", @@ -1107,7 +1107,7 @@ "type": "Identifier", "span": { "start": 574, - "end": 583, + "end": 577, "ctxt": 0 }, "value": "arg", @@ -1193,7 +1193,7 @@ "type": "Identifier", "span": { "start": 601, - "end": 608, + "end": 602, "ctxt": 0 }, "value": "r", @@ -1303,7 +1303,7 @@ "type": "Identifier", "span": { "start": 635, - "end": 660, + "end": 636, "ctxt": 0 }, "value": "x", @@ -1327,7 +1327,7 @@ "type": "Identifier", "span": { "start": 639, - "end": 648, + "end": 642, "ctxt": 0 }, "value": "arg", @@ -1396,7 +1396,7 @@ "type": "Identifier", "span": { "start": 662, - "end": 688, + "end": 663, "ctxt": 0 }, "value": "y", @@ -1420,7 +1420,7 @@ "type": "Identifier", "span": { "start": 666, - "end": 676, + "end": 670, "ctxt": 0 }, "value": "arg2", @@ -1506,7 +1506,7 @@ "type": "Identifier", "span": { "start": 694, - "end": 701, + "end": 695, "ctxt": 0 }, "value": "r", @@ -1616,7 +1616,7 @@ "type": "Identifier", "span": { "start": 728, - "end": 753, + "end": 729, "ctxt": 0 }, "value": "x", @@ -1640,7 +1640,7 @@ "type": "Identifier", "span": { "start": 732, - "end": 741, + "end": 735, "ctxt": 0 }, "value": "arg", @@ -1709,7 +1709,7 @@ "type": "Identifier", "span": { "start": 755, - "end": 781, + "end": 756, "ctxt": 0 }, "value": "y", @@ -1733,7 +1733,7 @@ "type": "Identifier", "span": { "start": 759, - "end": 769, + "end": 763, "ctxt": 0 }, "value": "arg2", @@ -1819,7 +1819,7 @@ "type": "Identifier", "span": { "start": 787, - "end": 794, + "end": 788, "ctxt": 0 }, "value": "r", @@ -2059,7 +2059,7 @@ "type": "Identifier", "span": { "start": 865, - "end": 883, + "end": 866, "ctxt": 0 }, "value": "x", @@ -2128,7 +2128,7 @@ "type": "Identifier", "span": { "start": 885, - "end": 916, + "end": 886, "ctxt": 0 }, "value": "y", @@ -2309,7 +2309,7 @@ "type": "Identifier", "span": { "start": 941, - "end": 955, + "end": 942, "ctxt": 0 }, "value": "x", @@ -2374,7 +2374,7 @@ "type": "Identifier", "span": { "start": 957, - "end": 975, + "end": 958, "ctxt": 0 }, "value": "y", @@ -2538,7 +2538,7 @@ "type": "Identifier", "span": { "start": 1010, - "end": 1024, + "end": 1011, "ctxt": 0 }, "value": "x", @@ -2603,7 +2603,7 @@ "type": "Identifier", "span": { "start": 1026, - "end": 1043, + "end": 1027, "ctxt": 0 }, "value": "y", @@ -2767,7 +2767,7 @@ "type": "Identifier", "span": { "start": 1078, - "end": 1105, + "end": 1079, "ctxt": 0 }, "value": "x", @@ -2956,7 +2956,7 @@ "type": "Identifier", "span": { "start": 1142, - "end": 1151, + "end": 1143, "ctxt": 0 }, "value": "x", @@ -3019,7 +3019,7 @@ "type": "Identifier", "span": { "start": 1177, - "end": 1186, + "end": 1178, "ctxt": 0 }, "value": "x", @@ -3124,7 +3124,7 @@ "type": "Identifier", "span": { "start": 1249, - "end": 1253, + "end": 1250, "ctxt": 0 }, "value": "x", @@ -3247,7 +3247,7 @@ "type": "Identifier", "span": { "start": 1295, - "end": 1299, + "end": 1296, "ctxt": 0 }, "value": "x", @@ -3412,7 +3412,7 @@ "type": "Identifier", "span": { "start": 1343, - "end": 1371, + "end": 1344, "ctxt": 0 }, "value": "x", @@ -3436,7 +3436,7 @@ "type": "Identifier", "span": { "start": 1351, - "end": 1360, + "end": 1352, "ctxt": 0 }, "value": "a", @@ -3522,7 +3522,7 @@ "type": "Identifier", "span": { "start": 1397, - "end": 1425, + "end": 1398, "ctxt": 0 }, "value": "x", @@ -3546,7 +3546,7 @@ "type": "Identifier", "span": { "start": 1405, - "end": 1414, + "end": 1406, "ctxt": 0 }, "value": "a", @@ -3674,7 +3674,7 @@ "type": "Identifier", "span": { "start": 1469, - "end": 1557, + "end": 1470, "ctxt": 0 }, "value": "x", @@ -3706,7 +3706,7 @@ "type": "Identifier", "span": { "start": 1491, - "end": 1500, + "end": 1492, "ctxt": 0 }, "value": "a", @@ -3761,7 +3761,7 @@ "type": "Identifier", "span": { "start": 1528, - "end": 1537, + "end": 1529, "ctxt": 0 }, "value": "a", @@ -3848,7 +3848,7 @@ "type": "Identifier", "span": { "start": 1580, - "end": 1666, + "end": 1581, "ctxt": 0 }, "value": "x", @@ -3880,7 +3880,7 @@ "type": "Identifier", "span": { "start": 1602, - "end": 1612, + "end": 1603, "ctxt": 0 }, "value": "a", @@ -3935,7 +3935,7 @@ "type": "Identifier", "span": { "start": 1641, - "end": 1648, + "end": 1642, "ctxt": 0 }, "value": "a", @@ -4127,7 +4127,7 @@ "type": "Identifier", "span": { "start": 1743, - "end": 1747, + "end": 1744, "ctxt": 0 }, "value": "x", @@ -4275,7 +4275,7 @@ "type": "Identifier", "span": { "start": 1830, - "end": 1834, + "end": 1831, "ctxt": 0 }, "value": "x", @@ -4413,7 +4413,7 @@ "type": "Identifier", "span": { "start": 1871, - "end": 1875, + "end": 1872, "ctxt": 0 }, "value": "x", @@ -4553,7 +4553,7 @@ "type": "Identifier", "span": { "start": 1932, - "end": 1936, + "end": 1933, "ctxt": 0 }, "value": "x", @@ -4590,7 +4590,7 @@ "type": "Identifier", "span": { "start": 1938, - "end": 1942, + "end": 1939, "ctxt": 0 }, "value": "y", @@ -4753,7 +4753,7 @@ "type": "Identifier", "span": { "start": 2039, - "end": 2055, + "end": 2040, "ctxt": 0 }, "value": "x", @@ -4777,7 +4777,7 @@ "type": "Identifier", "span": { "start": 2043, - "end": 2049, + "end": 2046, "ctxt": 0 }, "value": "arg", @@ -4972,7 +4972,7 @@ "type": "Identifier", "span": { "start": 2173, - "end": 2189, + "end": 2174, "ctxt": 0 }, "value": "x", @@ -4996,7 +4996,7 @@ "type": "Identifier", "span": { "start": 2177, - "end": 2183, + "end": 2180, "ctxt": 0 }, "value": "arg", @@ -5227,7 +5227,7 @@ "type": "Identifier", "span": { "start": 2294, - "end": 2310, + "end": 2295, "ctxt": 0 }, "value": "x", @@ -5251,7 +5251,7 @@ "type": "Identifier", "span": { "start": 2298, - "end": 2304, + "end": 2301, "ctxt": 0 }, "value": "arg", @@ -5428,7 +5428,7 @@ "type": "Identifier", "span": { "start": 2316, - "end": 2320, + "end": 2317, "ctxt": 0 }, "value": "r", @@ -5538,7 +5538,7 @@ "type": "Identifier", "span": { "start": 2382, - "end": 2398, + "end": 2383, "ctxt": 0 }, "value": "x", @@ -5562,7 +5562,7 @@ "type": "Identifier", "span": { "start": 2386, - "end": 2392, + "end": 2389, "ctxt": 0 }, "value": "arg", @@ -5631,7 +5631,7 @@ "type": "Identifier", "span": { "start": 2400, - "end": 2417, + "end": 2401, "ctxt": 0 }, "value": "y", @@ -5655,7 +5655,7 @@ "type": "Identifier", "span": { "start": 2404, - "end": 2411, + "end": 2408, "ctxt": 0 }, "value": "arg2", @@ -5832,7 +5832,7 @@ "type": "Identifier", "span": { "start": 2423, - "end": 2427, + "end": 2424, "ctxt": 0 }, "value": "r", @@ -5942,7 +5942,7 @@ "type": "Identifier", "span": { "start": 2489, - "end": 2505, + "end": 2490, "ctxt": 0 }, "value": "x", @@ -5966,7 +5966,7 @@ "type": "Identifier", "span": { "start": 2493, - "end": 2499, + "end": 2496, "ctxt": 0 }, "value": "arg", @@ -6035,7 +6035,7 @@ "type": "Identifier", "span": { "start": 2507, - "end": 2552, + "end": 2508, "ctxt": 0 }, "value": "y", @@ -6059,7 +6059,7 @@ "type": "Identifier", "span": { "start": 2511, - "end": 2546, + "end": 2515, "ctxt": 0 }, "value": "arg2", @@ -6309,7 +6309,7 @@ "type": "Identifier", "span": { "start": 2558, - "end": 2562, + "end": 2559, "ctxt": 0 }, "value": "r", @@ -6599,7 +6599,7 @@ "type": "Identifier", "span": { "start": 2705, - "end": 2709, + "end": 2706, "ctxt": 0 }, "value": "x", @@ -6636,7 +6636,7 @@ "type": "Identifier", "span": { "start": 2711, - "end": 2715, + "end": 2712, "ctxt": 0 }, "value": "y", @@ -6794,7 +6794,7 @@ "type": "Identifier", "span": { "start": 2766, - "end": 2780, + "end": 2767, "ctxt": 0 }, "value": "x", @@ -6859,7 +6859,7 @@ "type": "Identifier", "span": { "start": 2782, - "end": 2786, + "end": 2783, "ctxt": 0 }, "value": "y", @@ -7073,7 +7073,7 @@ "type": "Identifier", "span": { "start": 2883, - "end": 2897, + "end": 2884, "ctxt": 0 }, "value": "x", @@ -7138,7 +7138,7 @@ "type": "Identifier", "span": { "start": 2899, - "end": 2903, + "end": 2900, "ctxt": 0 }, "value": "y", @@ -7324,7 +7324,7 @@ "type": "Identifier", "span": { "start": 3024, - "end": 3041, + "end": 3025, "ctxt": 0 }, "value": "x", @@ -7580,7 +7580,7 @@ "type": "Identifier", "span": { "start": 3072, - "end": 3076, + "end": 3073, "ctxt": 0 }, "value": "x", @@ -7728,7 +7728,7 @@ "type": "Identifier", "span": { "start": 3122, - "end": 3126, + "end": 3123, "ctxt": 0 }, "value": "x", @@ -7884,7 +7884,7 @@ "type": "Identifier", "span": { "start": 3164, - "end": 3182, + "end": 3165, "ctxt": 0 }, "value": "x", @@ -7908,7 +7908,7 @@ "type": "Identifier", "span": { "start": 3172, - "end": 3176, + "end": 3173, "ctxt": 0 }, "value": "a", @@ -8089,7 +8089,7 @@ "type": "Identifier", "span": { "start": 3215, - "end": 3233, + "end": 3216, "ctxt": 0 }, "value": "x", @@ -8113,7 +8113,7 @@ "type": "Identifier", "span": { "start": 3223, - "end": 3227, + "end": 3224, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance3.json b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance3.json index d35c789f5ef1..c2ba517ca78e 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance3.json +++ b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance3.json @@ -444,7 +444,7 @@ "type": "Identifier", "span": { "start": 466, - "end": 475, + "end": 467, "ctxt": 0 }, "value": "x", @@ -540,7 +540,7 @@ "type": "Identifier", "span": { "start": 511, - "end": 536, + "end": 512, "ctxt": 0 }, "value": "x", @@ -564,7 +564,7 @@ "type": "Identifier", "span": { "start": 515, - "end": 524, + "end": 518, "ctxt": 0 }, "value": "arg", @@ -650,7 +650,7 @@ "type": "Identifier", "span": { "start": 542, - "end": 549, + "end": 543, "ctxt": 0 }, "value": "r", @@ -760,7 +760,7 @@ "type": "Identifier", "span": { "start": 585, - "end": 610, + "end": 586, "ctxt": 0 }, "value": "x", @@ -784,7 +784,7 @@ "type": "Identifier", "span": { "start": 589, - "end": 598, + "end": 592, "ctxt": 0 }, "value": "arg", @@ -853,7 +853,7 @@ "type": "Identifier", "span": { "start": 612, - "end": 638, + "end": 613, "ctxt": 0 }, "value": "y", @@ -877,7 +877,7 @@ "type": "Identifier", "span": { "start": 616, - "end": 626, + "end": 620, "ctxt": 0 }, "value": "arg2", @@ -963,7 +963,7 @@ "type": "Identifier", "span": { "start": 644, - "end": 651, + "end": 645, "ctxt": 0 }, "value": "r", @@ -1203,7 +1203,7 @@ "type": "Identifier", "span": { "start": 732, - "end": 750, + "end": 733, "ctxt": 0 }, "value": "x", @@ -1272,7 +1272,7 @@ "type": "Identifier", "span": { "start": 752, - "end": 783, + "end": 753, "ctxt": 0 }, "value": "y", @@ -1453,7 +1453,7 @@ "type": "Identifier", "span": { "start": 816, - "end": 830, + "end": 817, "ctxt": 0 }, "value": "x", @@ -1518,7 +1518,7 @@ "type": "Identifier", "span": { "start": 832, - "end": 850, + "end": 833, "ctxt": 0 }, "value": "y", @@ -1690,7 +1690,7 @@ "type": "Identifier", "span": { "start": 911, - "end": 920, + "end": 912, "ctxt": 0 }, "value": "x", @@ -1753,7 +1753,7 @@ "type": "Identifier", "span": { "start": 954, - "end": 963, + "end": 955, "ctxt": 0 }, "value": "x", @@ -1850,7 +1850,7 @@ "type": "Identifier", "span": { "start": 1013, - "end": 1040, + "end": 1014, "ctxt": 0 }, "value": "x", @@ -2029,7 +2029,7 @@ "type": "Identifier", "span": { "start": 1199, - "end": 1312, + "end": 1200, "ctxt": 0 }, "value": "x", @@ -2061,7 +2061,7 @@ "type": "Identifier", "span": { "start": 1229, - "end": 1238, + "end": 1230, "ctxt": 0 }, "value": "a", @@ -2116,7 +2116,7 @@ "type": "Identifier", "span": { "start": 1274, - "end": 1284, + "end": 1275, "ctxt": 0 }, "value": "a", @@ -2203,7 +2203,7 @@ "type": "Identifier", "span": { "start": 1346, - "end": 1463, + "end": 1347, "ctxt": 0 }, "value": "x", @@ -2235,7 +2235,7 @@ "type": "Identifier", "span": { "start": 1376, - "end": 1386, + "end": 1377, "ctxt": 0 }, "value": "a", @@ -2290,7 +2290,7 @@ "type": "Identifier", "span": { "start": 1423, - "end": 1434, + "end": 1424, "ctxt": 0 }, "value": "a", @@ -2462,7 +2462,7 @@ "type": "Identifier", "span": { "start": 1562, - "end": 1566, + "end": 1563, "ctxt": 0 }, "value": "x", @@ -2739,7 +2739,7 @@ "type": "Identifier", "span": { "start": 1758, - "end": 1762, + "end": 1759, "ctxt": 0 }, "value": "x", @@ -2906,7 +2906,7 @@ "type": "Identifier", "span": { "start": 2036, - "end": 2052, + "end": 2037, "ctxt": 0 }, "value": "x", @@ -2930,7 +2930,7 @@ "type": "Identifier", "span": { "start": 2040, - "end": 2046, + "end": 2043, "ctxt": 0 }, "value": "arg", @@ -3148,7 +3148,7 @@ "type": "Identifier", "span": { "start": 2058, - "end": 2062, + "end": 2059, "ctxt": 0 }, "value": "r", @@ -3309,7 +3309,7 @@ "type": "Identifier", "span": { "start": 2170, - "end": 2186, + "end": 2171, "ctxt": 0 }, "value": "x", @@ -3333,7 +3333,7 @@ "type": "Identifier", "span": { "start": 2174, - "end": 2180, + "end": 2177, "ctxt": 0 }, "value": "arg", @@ -3402,7 +3402,7 @@ "type": "Identifier", "span": { "start": 2188, - "end": 2220, + "end": 2189, "ctxt": 0 }, "value": "y", @@ -3426,7 +3426,7 @@ "type": "Identifier", "span": { "start": 2192, - "end": 2214, + "end": 2196, "ctxt": 0 }, "value": "arg2", @@ -3635,7 +3635,7 @@ "type": "Identifier", "span": { "start": 2226, - "end": 2230, + "end": 2227, "ctxt": 0 }, "value": "r", @@ -4027,7 +4027,7 @@ "type": "Identifier", "span": { "start": 2534, - "end": 2538, + "end": 2535, "ctxt": 0 }, "value": "x", @@ -4064,7 +4064,7 @@ "type": "Identifier", "span": { "start": 2540, - "end": 2544, + "end": 2541, "ctxt": 0 }, "value": "y", @@ -4273,7 +4273,7 @@ "type": "Identifier", "span": { "start": 2754, - "end": 2768, + "end": 2755, "ctxt": 0 }, "value": "x", @@ -4338,7 +4338,7 @@ "type": "Identifier", "span": { "start": 2770, - "end": 2784, + "end": 2771, "ctxt": 0 }, "value": "y", @@ -4603,7 +4603,7 @@ "type": "Identifier", "span": { "start": 2920, - "end": 2937, + "end": 2921, "ctxt": 0 }, "value": "x", @@ -4887,7 +4887,7 @@ "type": "Identifier", "span": { "start": 3083, - "end": 3100, + "end": 3084, "ctxt": 0 }, "value": "x", @@ -5179,7 +5179,7 @@ "type": "Identifier", "span": { "start": 3417, - "end": 3435, + "end": 3418, "ctxt": 0 }, "value": "x", @@ -5203,7 +5203,7 @@ "type": "Identifier", "span": { "start": 3425, - "end": 3429, + "end": 3426, "ctxt": 0 }, "value": "a", @@ -5445,7 +5445,7 @@ "type": "Identifier", "span": { "start": 3601, - "end": 3605, + "end": 3602, "ctxt": 0 }, "value": "x", @@ -5644,7 +5644,7 @@ "type": "Identifier", "span": { "start": 3683, - "end": 3687, + "end": 3684, "ctxt": 0 }, "value": "x", @@ -5813,7 +5813,7 @@ "type": "Identifier", "span": { "start": 3816, - "end": 3820, + "end": 3817, "ctxt": 0 }, "value": "x", @@ -6002,7 +6002,7 @@ "type": "Identifier", "span": { "start": 3903, - "end": 3907, + "end": 3904, "ctxt": 0 }, "value": "x", @@ -6189,7 +6189,7 @@ "type": "Identifier", "span": { "start": 4083, - "end": 4087, + "end": 4084, "ctxt": 0 }, "value": "x", @@ -6312,7 +6312,7 @@ "type": "Identifier", "span": { "start": 4137, - "end": 4141, + "end": 4138, "ctxt": 0 }, "value": "x", @@ -6520,7 +6520,7 @@ "type": "Identifier", "span": { "start": 4251, - "end": 4255, + "end": 4252, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance4.json b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance4.json index 7985b6ca0a54..9ac8d2d97557 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance4.json +++ b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance4.json @@ -390,7 +390,7 @@ "type": "Identifier", "span": { "start": 319, - "end": 323, + "end": 320, "ctxt": 0 }, "value": "x", @@ -538,7 +538,7 @@ "type": "Identifier", "span": { "start": 349, - "end": 353, + "end": 350, "ctxt": 0 }, "value": "x", @@ -676,7 +676,7 @@ "type": "Identifier", "span": { "start": 384, - "end": 388, + "end": 385, "ctxt": 0 }, "value": "x", @@ -806,7 +806,7 @@ "type": "Identifier", "span": { "start": 418, - "end": 422, + "end": 419, "ctxt": 0 }, "value": "x", @@ -843,7 +843,7 @@ "type": "Identifier", "span": { "start": 424, - "end": 428, + "end": 425, "ctxt": 0 }, "value": "y", @@ -996,7 +996,7 @@ "type": "Identifier", "span": { "start": 460, - "end": 476, + "end": 461, "ctxt": 0 }, "value": "x", @@ -1020,7 +1020,7 @@ "type": "Identifier", "span": { "start": 464, - "end": 470, + "end": 467, "ctxt": 0 }, "value": "arg", @@ -1215,7 +1215,7 @@ "type": "Identifier", "span": { "start": 513, - "end": 535, + "end": 514, "ctxt": 0 }, "value": "x", @@ -1239,7 +1239,7 @@ "type": "Identifier", "span": { "start": 517, - "end": 523, + "end": 520, "ctxt": 0 }, "value": "arg", @@ -1429,7 +1429,7 @@ "type": "Identifier", "span": { "start": 560, - "end": 573, + "end": 561, "ctxt": 0 }, "value": "x", @@ -1508,7 +1508,7 @@ "type": "Identifier", "span": { "start": 575, - "end": 596, + "end": 576, "ctxt": 0 }, "value": "y", @@ -1741,7 +1741,7 @@ "type": "Identifier", "span": { "start": 624, - "end": 641, + "end": 625, "ctxt": 0 }, "value": "x", @@ -1982,7 +1982,7 @@ "type": "Identifier", "span": { "start": 681, - "end": 698, + "end": 682, "ctxt": 0 }, "value": "x", @@ -2249,7 +2249,7 @@ "type": "Identifier", "span": { "start": 748, - "end": 752, + "end": 749, "ctxt": 0 }, "value": "x", @@ -2382,7 +2382,7 @@ "type": "Identifier", "span": { "start": 792, - "end": 796, + "end": 793, "ctxt": 0 }, "value": "x", @@ -2557,7 +2557,7 @@ "type": "Identifier", "span": { "start": 854, - "end": 858, + "end": 855, "ctxt": 0 }, "value": "x", @@ -2680,7 +2680,7 @@ "type": "Identifier", "span": { "start": 900, - "end": 904, + "end": 901, "ctxt": 0 }, "value": "x", @@ -2845,7 +2845,7 @@ "type": "Identifier", "span": { "start": 967, - "end": 985, + "end": 968, "ctxt": 0 }, "value": "x", @@ -2869,7 +2869,7 @@ "type": "Identifier", "span": { "start": 975, - "end": 979, + "end": 976, "ctxt": 0 }, "value": "a", @@ -3035,7 +3035,7 @@ "type": "Identifier", "span": { "start": 1022, - "end": 1040, + "end": 1023, "ctxt": 0 }, "value": "x", @@ -3059,7 +3059,7 @@ "type": "Identifier", "span": { "start": 1030, - "end": 1034, + "end": 1031, "ctxt": 0 }, "value": "a", @@ -3267,7 +3267,7 @@ "type": "Identifier", "span": { "start": 1079, - "end": 1182, + "end": 1080, "ctxt": 0 }, "value": "x", @@ -3299,7 +3299,7 @@ "type": "Identifier", "span": { "start": 1120, - "end": 1124, + "end": 1121, "ctxt": 0 }, "value": "a", @@ -3424,7 +3424,7 @@ "type": "Identifier", "span": { "start": 1163, - "end": 1167, + "end": 1164, "ctxt": 0 }, "value": "a", @@ -3581,7 +3581,7 @@ "type": "Identifier", "span": { "start": 1205, - "end": 1309, + "end": 1206, "ctxt": 0 }, "value": "x", @@ -3613,7 +3613,7 @@ "type": "Identifier", "span": { "start": 1243, - "end": 1247, + "end": 1244, "ctxt": 0 }, "value": "a", @@ -3738,7 +3738,7 @@ "type": "Identifier", "span": { "start": 1290, - "end": 1294, + "end": 1291, "ctxt": 0 }, "value": "a", @@ -3980,7 +3980,7 @@ "type": "Identifier", "span": { "start": 1386, - "end": 1390, + "end": 1387, "ctxt": 0 }, "value": "x", @@ -4128,7 +4128,7 @@ "type": "Identifier", "span": { "start": 1473, - "end": 1477, + "end": 1474, "ctxt": 0 }, "value": "x", @@ -4266,7 +4266,7 @@ "type": "Identifier", "span": { "start": 1514, - "end": 1518, + "end": 1515, "ctxt": 0 }, "value": "x", @@ -4406,7 +4406,7 @@ "type": "Identifier", "span": { "start": 1575, - "end": 1579, + "end": 1576, "ctxt": 0 }, "value": "x", @@ -4443,7 +4443,7 @@ "type": "Identifier", "span": { "start": 1581, - "end": 1585, + "end": 1582, "ctxt": 0 }, "value": "y", @@ -4596,7 +4596,7 @@ "type": "Identifier", "span": { "start": 1687, - "end": 1703, + "end": 1688, "ctxt": 0 }, "value": "x", @@ -4620,7 +4620,7 @@ "type": "Identifier", "span": { "start": 1691, - "end": 1697, + "end": 1694, "ctxt": 0 }, "value": "arg", @@ -4815,7 +4815,7 @@ "type": "Identifier", "span": { "start": 1821, - "end": 1837, + "end": 1822, "ctxt": 0 }, "value": "x", @@ -4839,7 +4839,7 @@ "type": "Identifier", "span": { "start": 1825, - "end": 1831, + "end": 1828, "ctxt": 0 }, "value": "arg", @@ -5070,7 +5070,7 @@ "type": "Identifier", "span": { "start": 1914, - "end": 1927, + "end": 1915, "ctxt": 0 }, "value": "x", @@ -5149,7 +5149,7 @@ "type": "Identifier", "span": { "start": 1929, - "end": 1950, + "end": 1930, "ctxt": 0 }, "value": "y", @@ -5405,7 +5405,7 @@ "type": "Identifier", "span": { "start": 1987, - "end": 2005, + "end": 1988, "ctxt": 0 }, "value": "x", @@ -5669,7 +5669,7 @@ "type": "Identifier", "span": { "start": 2052, - "end": 2069, + "end": 2053, "ctxt": 0 }, "value": "x", @@ -5910,7 +5910,7 @@ "type": "Identifier", "span": { "start": 2144, - "end": 2148, + "end": 2145, "ctxt": 0 }, "value": "x", @@ -6076,7 +6076,7 @@ "type": "Identifier", "span": { "start": 2223, - "end": 2227, + "end": 2224, "ctxt": 0 }, "value": "x", @@ -6232,7 +6232,7 @@ "type": "Identifier", "span": { "start": 2307, - "end": 2325, + "end": 2308, "ctxt": 0 }, "value": "x", @@ -6256,7 +6256,7 @@ "type": "Identifier", "span": { "start": 2315, - "end": 2319, + "end": 2316, "ctxt": 0 }, "value": "a", @@ -6455,7 +6455,7 @@ "type": "Identifier", "span": { "start": 2355, - "end": 2389, + "end": 2356, "ctxt": 0 }, "value": "x", @@ -6479,7 +6479,7 @@ "type": "Identifier", "span": { "start": 2379, - "end": 2383, + "end": 2380, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance5.json b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance5.json index c81525c264fe..f9885758a414 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance5.json +++ b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance5.json @@ -390,7 +390,7 @@ "type": "Identifier", "span": { "start": 426, - "end": 435, + "end": 427, "ctxt": 0 }, "value": "x", @@ -486,7 +486,7 @@ "type": "Identifier", "span": { "start": 463, - "end": 472, + "end": 464, "ctxt": 0 }, "value": "x", @@ -582,7 +582,7 @@ "type": "Identifier", "span": { "start": 500, - "end": 509, + "end": 501, "ctxt": 0 }, "value": "x", @@ -670,7 +670,7 @@ "type": "Identifier", "span": { "start": 533, - "end": 542, + "end": 534, "ctxt": 0 }, "value": "x", @@ -697,7 +697,7 @@ "type": "Identifier", "span": { "start": 544, - "end": 553, + "end": 545, "ctxt": 0 }, "value": "y", @@ -785,7 +785,7 @@ "type": "Identifier", "span": { "start": 579, - "end": 605, + "end": 580, "ctxt": 0 }, "value": "x", @@ -809,7 +809,7 @@ "type": "Identifier", "span": { "start": 583, - "end": 594, + "end": 586, "ctxt": 0 }, "value": "arg", @@ -919,7 +919,7 @@ "type": "Identifier", "span": { "start": 631, - "end": 656, + "end": 632, "ctxt": 0 }, "value": "x", @@ -943,7 +943,7 @@ "type": "Identifier", "span": { "start": 635, - "end": 644, + "end": 638, "ctxt": 0 }, "value": "arg", @@ -1083,7 +1083,7 @@ "type": "Identifier", "span": { "start": 680, - "end": 705, + "end": 681, "ctxt": 0 }, "value": "x", @@ -1107,7 +1107,7 @@ "type": "Identifier", "span": { "start": 684, - "end": 693, + "end": 687, "ctxt": 0 }, "value": "arg", @@ -1193,7 +1193,7 @@ "type": "Identifier", "span": { "start": 711, - "end": 718, + "end": 712, "ctxt": 0 }, "value": "r", @@ -1303,7 +1303,7 @@ "type": "Identifier", "span": { "start": 745, - "end": 770, + "end": 746, "ctxt": 0 }, "value": "x", @@ -1327,7 +1327,7 @@ "type": "Identifier", "span": { "start": 749, - "end": 758, + "end": 752, "ctxt": 0 }, "value": "arg", @@ -1396,7 +1396,7 @@ "type": "Identifier", "span": { "start": 772, - "end": 798, + "end": 773, "ctxt": 0 }, "value": "y", @@ -1420,7 +1420,7 @@ "type": "Identifier", "span": { "start": 776, - "end": 786, + "end": 780, "ctxt": 0 }, "value": "arg2", @@ -1506,7 +1506,7 @@ "type": "Identifier", "span": { "start": 804, - "end": 811, + "end": 805, "ctxt": 0 }, "value": "r", @@ -1616,7 +1616,7 @@ "type": "Identifier", "span": { "start": 838, - "end": 863, + "end": 839, "ctxt": 0 }, "value": "x", @@ -1640,7 +1640,7 @@ "type": "Identifier", "span": { "start": 842, - "end": 851, + "end": 845, "ctxt": 0 }, "value": "arg", @@ -1709,7 +1709,7 @@ "type": "Identifier", "span": { "start": 865, - "end": 891, + "end": 866, "ctxt": 0 }, "value": "y", @@ -1733,7 +1733,7 @@ "type": "Identifier", "span": { "start": 869, - "end": 879, + "end": 873, "ctxt": 0 }, "value": "arg2", @@ -1819,7 +1819,7 @@ "type": "Identifier", "span": { "start": 897, - "end": 904, + "end": 898, "ctxt": 0 }, "value": "r", @@ -2059,7 +2059,7 @@ "type": "Identifier", "span": { "start": 975, - "end": 993, + "end": 976, "ctxt": 0 }, "value": "x", @@ -2128,7 +2128,7 @@ "type": "Identifier", "span": { "start": 995, - "end": 1026, + "end": 996, "ctxt": 0 }, "value": "y", @@ -2309,7 +2309,7 @@ "type": "Identifier", "span": { "start": 1051, - "end": 1065, + "end": 1052, "ctxt": 0 }, "value": "x", @@ -2374,7 +2374,7 @@ "type": "Identifier", "span": { "start": 1067, - "end": 1085, + "end": 1068, "ctxt": 0 }, "value": "y", @@ -2538,7 +2538,7 @@ "type": "Identifier", "span": { "start": 1120, - "end": 1134, + "end": 1121, "ctxt": 0 }, "value": "x", @@ -2603,7 +2603,7 @@ "type": "Identifier", "span": { "start": 1136, - "end": 1153, + "end": 1137, "ctxt": 0 }, "value": "y", @@ -2767,7 +2767,7 @@ "type": "Identifier", "span": { "start": 1188, - "end": 1215, + "end": 1189, "ctxt": 0 }, "value": "x", @@ -2999,7 +2999,7 @@ "type": "Identifier", "span": { "start": 1270, - "end": 1274, + "end": 1271, "ctxt": 0 }, "value": "x", @@ -3198,7 +3198,7 @@ "type": "Identifier", "span": { "start": 1344, - "end": 1348, + "end": 1345, "ctxt": 0 }, "value": "x", @@ -3346,7 +3346,7 @@ "type": "Identifier", "span": { "start": 1431, - "end": 1435, + "end": 1432, "ctxt": 0 }, "value": "x", @@ -3484,7 +3484,7 @@ "type": "Identifier", "span": { "start": 1472, - "end": 1476, + "end": 1473, "ctxt": 0 }, "value": "x", @@ -3624,7 +3624,7 @@ "type": "Identifier", "span": { "start": 1533, - "end": 1537, + "end": 1534, "ctxt": 0 }, "value": "x", @@ -3661,7 +3661,7 @@ "type": "Identifier", "span": { "start": 1539, - "end": 1543, + "end": 1540, "ctxt": 0 }, "value": "y", @@ -3824,7 +3824,7 @@ "type": "Identifier", "span": { "start": 1640, - "end": 1656, + "end": 1641, "ctxt": 0 }, "value": "x", @@ -3848,7 +3848,7 @@ "type": "Identifier", "span": { "start": 1644, - "end": 1650, + "end": 1647, "ctxt": 0 }, "value": "arg", @@ -4043,7 +4043,7 @@ "type": "Identifier", "span": { "start": 1774, - "end": 1790, + "end": 1775, "ctxt": 0 }, "value": "x", @@ -4067,7 +4067,7 @@ "type": "Identifier", "span": { "start": 1778, - "end": 1784, + "end": 1781, "ctxt": 0 }, "value": "arg", @@ -4298,7 +4298,7 @@ "type": "Identifier", "span": { "start": 1895, - "end": 1911, + "end": 1896, "ctxt": 0 }, "value": "x", @@ -4322,7 +4322,7 @@ "type": "Identifier", "span": { "start": 1899, - "end": 1905, + "end": 1902, "ctxt": 0 }, "value": "arg", @@ -4499,7 +4499,7 @@ "type": "Identifier", "span": { "start": 1917, - "end": 1921, + "end": 1918, "ctxt": 0 }, "value": "r", @@ -4609,7 +4609,7 @@ "type": "Identifier", "span": { "start": 1983, - "end": 1999, + "end": 1984, "ctxt": 0 }, "value": "x", @@ -4633,7 +4633,7 @@ "type": "Identifier", "span": { "start": 1987, - "end": 1993, + "end": 1990, "ctxt": 0 }, "value": "arg", @@ -4702,7 +4702,7 @@ "type": "Identifier", "span": { "start": 2001, - "end": 2018, + "end": 2002, "ctxt": 0 }, "value": "y", @@ -4726,7 +4726,7 @@ "type": "Identifier", "span": { "start": 2005, - "end": 2012, + "end": 2009, "ctxt": 0 }, "value": "arg2", @@ -4903,7 +4903,7 @@ "type": "Identifier", "span": { "start": 2024, - "end": 2028, + "end": 2025, "ctxt": 0 }, "value": "r", @@ -5013,7 +5013,7 @@ "type": "Identifier", "span": { "start": 2090, - "end": 2106, + "end": 2091, "ctxt": 0 }, "value": "x", @@ -5037,7 +5037,7 @@ "type": "Identifier", "span": { "start": 2094, - "end": 2100, + "end": 2097, "ctxt": 0 }, "value": "arg", @@ -5106,7 +5106,7 @@ "type": "Identifier", "span": { "start": 2108, - "end": 2153, + "end": 2109, "ctxt": 0 }, "value": "y", @@ -5130,7 +5130,7 @@ "type": "Identifier", "span": { "start": 2112, - "end": 2147, + "end": 2116, "ctxt": 0 }, "value": "arg2", @@ -5380,7 +5380,7 @@ "type": "Identifier", "span": { "start": 2159, - "end": 2163, + "end": 2160, "ctxt": 0 }, "value": "r", @@ -5670,7 +5670,7 @@ "type": "Identifier", "span": { "start": 2306, - "end": 2310, + "end": 2307, "ctxt": 0 }, "value": "x", @@ -5707,7 +5707,7 @@ "type": "Identifier", "span": { "start": 2312, - "end": 2316, + "end": 2313, "ctxt": 0 }, "value": "y", @@ -5865,7 +5865,7 @@ "type": "Identifier", "span": { "start": 2367, - "end": 2381, + "end": 2368, "ctxt": 0 }, "value": "x", @@ -5930,7 +5930,7 @@ "type": "Identifier", "span": { "start": 2383, - "end": 2387, + "end": 2384, "ctxt": 0 }, "value": "y", @@ -6144,7 +6144,7 @@ "type": "Identifier", "span": { "start": 2484, - "end": 2498, + "end": 2485, "ctxt": 0 }, "value": "x", @@ -6209,7 +6209,7 @@ "type": "Identifier", "span": { "start": 2500, - "end": 2504, + "end": 2501, "ctxt": 0 }, "value": "y", @@ -6395,7 +6395,7 @@ "type": "Identifier", "span": { "start": 2625, - "end": 2642, + "end": 2626, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance6.json b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance6.json index fc912c21b26f..c65bf11dff80 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance6.json +++ b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance6.json @@ -390,7 +390,7 @@ "type": "Identifier", "span": { "start": 444, - "end": 448, + "end": 445, "ctxt": 0 }, "value": "x", @@ -538,7 +538,7 @@ "type": "Identifier", "span": { "start": 474, - "end": 478, + "end": 475, "ctxt": 0 }, "value": "x", @@ -676,7 +676,7 @@ "type": "Identifier", "span": { "start": 509, - "end": 513, + "end": 510, "ctxt": 0 }, "value": "x", @@ -806,7 +806,7 @@ "type": "Identifier", "span": { "start": 543, - "end": 547, + "end": 544, "ctxt": 0 }, "value": "x", @@ -843,7 +843,7 @@ "type": "Identifier", "span": { "start": 549, - "end": 553, + "end": 550, "ctxt": 0 }, "value": "y", @@ -996,7 +996,7 @@ "type": "Identifier", "span": { "start": 585, - "end": 601, + "end": 586, "ctxt": 0 }, "value": "x", @@ -1020,7 +1020,7 @@ "type": "Identifier", "span": { "start": 589, - "end": 595, + "end": 592, "ctxt": 0 }, "value": "arg", @@ -1215,7 +1215,7 @@ "type": "Identifier", "span": { "start": 638, - "end": 660, + "end": 639, "ctxt": 0 }, "value": "x", @@ -1239,7 +1239,7 @@ "type": "Identifier", "span": { "start": 642, - "end": 648, + "end": 645, "ctxt": 0 }, "value": "arg", @@ -1429,7 +1429,7 @@ "type": "Identifier", "span": { "start": 685, - "end": 698, + "end": 686, "ctxt": 0 }, "value": "x", @@ -1508,7 +1508,7 @@ "type": "Identifier", "span": { "start": 700, - "end": 721, + "end": 701, "ctxt": 0 }, "value": "y", @@ -1741,7 +1741,7 @@ "type": "Identifier", "span": { "start": 749, - "end": 766, + "end": 750, "ctxt": 0 }, "value": "x", @@ -1982,7 +1982,7 @@ "type": "Identifier", "span": { "start": 806, - "end": 823, + "end": 807, "ctxt": 0 }, "value": "x", @@ -2324,7 +2324,7 @@ "type": "Identifier", "span": { "start": 882, - "end": 886, + "end": 883, "ctxt": 0 }, "value": "x", @@ -2523,7 +2523,7 @@ "type": "Identifier", "span": { "start": 941, - "end": 945, + "end": 942, "ctxt": 0 }, "value": "x", @@ -2712,7 +2712,7 @@ "type": "Identifier", "span": { "start": 1005, - "end": 1009, + "end": 1006, "ctxt": 0 }, "value": "x", @@ -2903,7 +2903,7 @@ "type": "Identifier", "span": { "start": 1064, - "end": 1068, + "end": 1065, "ctxt": 0 }, "value": "x", @@ -2940,7 +2940,7 @@ "type": "Identifier", "span": { "start": 1070, - "end": 1074, + "end": 1071, "ctxt": 0 }, "value": "y", @@ -3153,7 +3153,7 @@ "type": "Identifier", "span": { "start": 1135, - "end": 1151, + "end": 1136, "ctxt": 0 }, "value": "x", @@ -3177,7 +3177,7 @@ "type": "Identifier", "span": { "start": 1139, - "end": 1145, + "end": 1142, "ctxt": 0 }, "value": "arg", @@ -3432,7 +3432,7 @@ "type": "Identifier", "span": { "start": 1208, - "end": 1221, + "end": 1209, "ctxt": 0 }, "value": "x", @@ -3511,7 +3511,7 @@ "type": "Identifier", "span": { "start": 1223, - "end": 1244, + "end": 1224, "ctxt": 0 }, "value": "y", @@ -3827,7 +3827,7 @@ "type": "Identifier", "span": { "start": 1301, - "end": 1318, + "end": 1302, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithIdenticalOverloads.json b/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithIdenticalOverloads.json index 19a98c787085..98fbfa439e3a 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithIdenticalOverloads.json +++ b/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithIdenticalOverloads.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 98, - "end": 107, + "end": 99, "ctxt": 0 }, "value": "x", @@ -92,7 +92,7 @@ "type": "Identifier", "span": { "start": 109, - "end": 118, + "end": 110, "ctxt": 0 }, "value": "y", @@ -151,7 +151,7 @@ "type": "Identifier", "span": { "start": 137, - "end": 146, + "end": 138, "ctxt": 0 }, "value": "x", @@ -187,7 +187,7 @@ "type": "Identifier", "span": { "start": 148, - "end": 157, + "end": 149, "ctxt": 0 }, "value": "y", @@ -246,7 +246,7 @@ "type": "Identifier", "span": { "start": 185, - "end": 194, + "end": 186, "ctxt": 0 }, "value": "x", @@ -419,7 +419,7 @@ "type": "Identifier", "span": { "start": 257, - "end": 261, + "end": 258, "ctxt": 0 }, "value": "x", @@ -465,7 +465,7 @@ "type": "Identifier", "span": { "start": 263, - "end": 272, + "end": 264, "ctxt": 0 }, "value": "y", @@ -524,7 +524,7 @@ "type": "Identifier", "span": { "start": 291, - "end": 295, + "end": 292, "ctxt": 0 }, "value": "x", @@ -570,7 +570,7 @@ "type": "Identifier", "span": { "start": 297, - "end": 306, + "end": 298, "ctxt": 0 }, "value": "y", @@ -629,7 +629,7 @@ "type": "Identifier", "span": { "start": 334, - "end": 338, + "end": 335, "ctxt": 0 }, "value": "x", @@ -834,7 +834,7 @@ "type": "Identifier", "span": { "start": 395, - "end": 404, + "end": 396, "ctxt": 0 }, "value": "x", @@ -861,7 +861,7 @@ "type": "Identifier", "span": { "start": 406, - "end": 415, + "end": 407, "ctxt": 0 }, "value": "y", @@ -926,7 +926,7 @@ "type": "Identifier", "span": { "start": 430, - "end": 439, + "end": 431, "ctxt": 0 }, "value": "x", @@ -953,7 +953,7 @@ "type": "Identifier", "span": { "start": 441, - "end": 450, + "end": 442, "ctxt": 0 }, "value": "y", @@ -1219,7 +1219,7 @@ "type": "Identifier", "span": { "start": 529, - "end": 533, + "end": 530, "ctxt": 0 }, "value": "x", @@ -1256,7 +1256,7 @@ "type": "Identifier", "span": { "start": 535, - "end": 544, + "end": 536, "ctxt": 0 }, "value": "y", @@ -1349,7 +1349,7 @@ "type": "Identifier", "span": { "start": 563, - "end": 567, + "end": 564, "ctxt": 0 }, "value": "x", @@ -1386,7 +1386,7 @@ "type": "Identifier", "span": { "start": 569, - "end": 578, + "end": 570, "ctxt": 0 }, "value": "y", @@ -1479,7 +1479,7 @@ "type": "Identifier", "span": { "start": 609, - "end": 613, + "end": 610, "ctxt": 0 }, "value": "x", @@ -1516,7 +1516,7 @@ "type": "Identifier", "span": { "start": 615, - "end": 624, + "end": 616, "ctxt": 0 }, "value": "y", @@ -1641,7 +1641,7 @@ "type": "Identifier", "span": { "start": 646, - "end": 650, + "end": 647, "ctxt": 0 }, "value": "x", @@ -1678,7 +1678,7 @@ "type": "Identifier", "span": { "start": 652, - "end": 661, + "end": 653, "ctxt": 0 }, "value": "y", @@ -2003,7 +2003,7 @@ "type": "Identifier", "span": { "start": 746, - "end": 755, + "end": 747, "ctxt": 0 }, "value": "x", @@ -2030,7 +2030,7 @@ "type": "Identifier", "span": { "start": 757, - "end": 766, + "end": 758, "ctxt": 0 }, "value": "y", @@ -2095,7 +2095,7 @@ "type": "Identifier", "span": { "start": 781, - "end": 790, + "end": 782, "ctxt": 0 }, "value": "x", @@ -2122,7 +2122,7 @@ "type": "Identifier", "span": { "start": 792, - "end": 801, + "end": 793, "ctxt": 0 }, "value": "y", @@ -2316,7 +2316,7 @@ "type": "Identifier", "span": { "start": 864, - "end": 868, + "end": 865, "ctxt": 0 }, "value": "x", @@ -2353,7 +2353,7 @@ "type": "Identifier", "span": { "start": 870, - "end": 879, + "end": 871, "ctxt": 0 }, "value": "y", @@ -2478,7 +2478,7 @@ "type": "Identifier", "span": { "start": 901, - "end": 905, + "end": 902, "ctxt": 0 }, "value": "x", @@ -2515,7 +2515,7 @@ "type": "Identifier", "span": { "start": 907, - "end": 916, + "end": 908, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithOverloads.json b/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithOverloads.json index dde51eec4ad9..15310603b71a 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithOverloads.json +++ b/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithOverloads.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 94, - "end": 103, + "end": 95, "ctxt": 0 }, "value": "x", @@ -92,7 +92,7 @@ "type": "Identifier", "span": { "start": 105, - "end": 115, + "end": 106, "ctxt": 0 }, "value": "y", @@ -151,7 +151,7 @@ "type": "Identifier", "span": { "start": 134, - "end": 143, + "end": 135, "ctxt": 0 }, "value": "x", @@ -187,7 +187,7 @@ "type": "Identifier", "span": { "start": 145, - "end": 154, + "end": 146, "ctxt": 0 }, "value": "y", @@ -246,7 +246,7 @@ "type": "Identifier", "span": { "start": 173, - "end": 182, + "end": 174, "ctxt": 0 }, "value": "x", @@ -419,7 +419,7 @@ "type": "Identifier", "span": { "start": 245, - "end": 249, + "end": 246, "ctxt": 0 }, "value": "x", @@ -465,7 +465,7 @@ "type": "Identifier", "span": { "start": 251, - "end": 261, + "end": 252, "ctxt": 0 }, "value": "y", @@ -524,7 +524,7 @@ "type": "Identifier", "span": { "start": 280, - "end": 284, + "end": 281, "ctxt": 0 }, "value": "x", @@ -570,7 +570,7 @@ "type": "Identifier", "span": { "start": 286, - "end": 295, + "end": 287, "ctxt": 0 }, "value": "y", @@ -629,7 +629,7 @@ "type": "Identifier", "span": { "start": 314, - "end": 318, + "end": 315, "ctxt": 0 }, "value": "x", @@ -834,7 +834,7 @@ "type": "Identifier", "span": { "start": 374, - "end": 383, + "end": 375, "ctxt": 0 }, "value": "x", @@ -861,7 +861,7 @@ "type": "Identifier", "span": { "start": 385, - "end": 395, + "end": 386, "ctxt": 0 }, "value": "y", @@ -926,7 +926,7 @@ "type": "Identifier", "span": { "start": 409, - "end": 418, + "end": 410, "ctxt": 0 }, "value": "x", @@ -953,7 +953,7 @@ "type": "Identifier", "span": { "start": 420, - "end": 429, + "end": 421, "ctxt": 0 }, "value": "y", @@ -1219,7 +1219,7 @@ "type": "Identifier", "span": { "start": 499, - "end": 503, + "end": 500, "ctxt": 0 }, "value": "x", @@ -1256,7 +1256,7 @@ "type": "Identifier", "span": { "start": 505, - "end": 515, + "end": 506, "ctxt": 0 }, "value": "y", @@ -1349,7 +1349,7 @@ "type": "Identifier", "span": { "start": 534, - "end": 538, + "end": 535, "ctxt": 0 }, "value": "x", @@ -1386,7 +1386,7 @@ "type": "Identifier", "span": { "start": 540, - "end": 549, + "end": 541, "ctxt": 0 }, "value": "y", @@ -1479,7 +1479,7 @@ "type": "Identifier", "span": { "start": 571, - "end": 575, + "end": 572, "ctxt": 0 }, "value": "x", @@ -1516,7 +1516,7 @@ "type": "Identifier", "span": { "start": 577, - "end": 587, + "end": 578, "ctxt": 0 }, "value": "y", @@ -1641,7 +1641,7 @@ "type": "Identifier", "span": { "start": 609, - "end": 613, + "end": 610, "ctxt": 0 }, "value": "x", @@ -1678,7 +1678,7 @@ "type": "Identifier", "span": { "start": 615, - "end": 624, + "end": 616, "ctxt": 0 }, "value": "y", @@ -2003,7 +2003,7 @@ "type": "Identifier", "span": { "start": 700, - "end": 709, + "end": 701, "ctxt": 0 }, "value": "x", @@ -2030,7 +2030,7 @@ "type": "Identifier", "span": { "start": 711, - "end": 721, + "end": 712, "ctxt": 0 }, "value": "y", @@ -2095,7 +2095,7 @@ "type": "Identifier", "span": { "start": 735, - "end": 744, + "end": 736, "ctxt": 0 }, "value": "x", @@ -2122,7 +2122,7 @@ "type": "Identifier", "span": { "start": 746, - "end": 755, + "end": 747, "ctxt": 0 }, "value": "y", @@ -2316,7 +2316,7 @@ "type": "Identifier", "span": { "start": 808, - "end": 812, + "end": 809, "ctxt": 0 }, "value": "x", @@ -2353,7 +2353,7 @@ "type": "Identifier", "span": { "start": 814, - "end": 824, + "end": 815, "ctxt": 0 }, "value": "y", @@ -2478,7 +2478,7 @@ "type": "Identifier", "span": { "start": 845, - "end": 849, + "end": 846, "ctxt": 0 }, "value": "x", @@ -2515,7 +2515,7 @@ "type": "Identifier", "span": { "start": 851, - "end": 860, + "end": 852, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithOverloads2.json b/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithOverloads2.json index eb63b3986577..d948f1ea63fa 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithOverloads2.json +++ b/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithOverloads2.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 131, - "end": 140, + "end": 132, "ctxt": 0 }, "value": "x", @@ -92,7 +92,7 @@ "type": "Identifier", "span": { "start": 142, - "end": 152, + "end": 143, "ctxt": 0 }, "value": "y", @@ -151,7 +151,7 @@ "type": "Identifier", "span": { "start": 171, - "end": 180, + "end": 172, "ctxt": 0 }, "value": "x", @@ -187,7 +187,7 @@ "type": "Identifier", "span": { "start": 182, - "end": 191, + "end": 183, "ctxt": 0 }, "value": "y", @@ -246,7 +246,7 @@ "type": "Identifier", "span": { "start": 210, - "end": 219, + "end": 211, "ctxt": 0 }, "value": "x", @@ -499,7 +499,7 @@ "type": "Identifier", "span": { "start": 317, - "end": 321, + "end": 318, "ctxt": 0 }, "value": "x", @@ -545,7 +545,7 @@ "type": "Identifier", "span": { "start": 323, - "end": 333, + "end": 324, "ctxt": 0 }, "value": "y", @@ -604,7 +604,7 @@ "type": "Identifier", "span": { "start": 352, - "end": 356, + "end": 353, "ctxt": 0 }, "value": "x", @@ -650,7 +650,7 @@ "type": "Identifier", "span": { "start": 358, - "end": 367, + "end": 359, "ctxt": 0 }, "value": "y", @@ -709,7 +709,7 @@ "type": "Identifier", "span": { "start": 386, - "end": 390, + "end": 387, "ctxt": 0 }, "value": "x", @@ -994,7 +994,7 @@ "type": "Identifier", "span": { "start": 504, - "end": 513, + "end": 505, "ctxt": 0 }, "value": "x", @@ -1021,7 +1021,7 @@ "type": "Identifier", "span": { "start": 515, - "end": 525, + "end": 516, "ctxt": 0 }, "value": "y", @@ -1086,7 +1086,7 @@ "type": "Identifier", "span": { "start": 540, - "end": 549, + "end": 541, "ctxt": 0 }, "value": "x", @@ -1113,7 +1113,7 @@ "type": "Identifier", "span": { "start": 551, - "end": 560, + "end": 552, "ctxt": 0 }, "value": "y", @@ -1241,7 +1241,7 @@ "type": "Identifier", "span": { "start": 595, - "end": 599, + "end": 596, "ctxt": 0 }, "value": "x", @@ -1278,7 +1278,7 @@ "type": "Identifier", "span": { "start": 601, - "end": 611, + "end": 602, "ctxt": 0 }, "value": "y", @@ -1371,7 +1371,7 @@ "type": "Identifier", "span": { "start": 630, - "end": 634, + "end": 631, "ctxt": 0 }, "value": "x", @@ -1408,7 +1408,7 @@ "type": "Identifier", "span": { "start": 636, - "end": 645, + "end": 637, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithOverloadsThatDifferOnlyByReturnType.json b/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithOverloadsThatDifferOnlyByReturnType.json index 761004f6e1a6..ddea905fb99a 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithOverloadsThatDifferOnlyByReturnType.json +++ b/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithOverloadsThatDifferOnlyByReturnType.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 101, - "end": 110, + "end": 102, "ctxt": 0 }, "value": "x", @@ -150,7 +150,7 @@ "type": "Identifier", "span": { "start": 149, - "end": 153, + "end": 150, "ctxt": 0 }, "value": "x", @@ -196,7 +196,7 @@ "type": "Identifier", "span": { "start": 155, - "end": 165, + "end": 156, "ctxt": 0 }, "value": "y", @@ -312,7 +312,7 @@ "type": "Identifier", "span": { "start": 196, - "end": 205, + "end": 197, "ctxt": 0 }, "value": "x", @@ -339,7 +339,7 @@ "type": "Identifier", "span": { "start": 207, - "end": 216, + "end": 208, "ctxt": 0 }, "value": "y", @@ -404,7 +404,7 @@ "type": "Identifier", "span": { "start": 230, - "end": 239, + "end": 231, "ctxt": 0 }, "value": "x", @@ -431,7 +431,7 @@ "type": "Identifier", "span": { "start": 241, - "end": 250, + "end": 242, "ctxt": 0 }, "value": "y", @@ -577,7 +577,7 @@ "type": "Identifier", "span": { "start": 304, - "end": 308, + "end": 305, "ctxt": 0 }, "value": "x", @@ -614,7 +614,7 @@ "type": "Identifier", "span": { "start": 310, - "end": 319, + "end": 311, "ctxt": 0 }, "value": "y", @@ -697,7 +697,7 @@ "type": "Identifier", "span": { "start": 343, - "end": 347, + "end": 344, "ctxt": 0 }, "value": "x", @@ -734,7 +734,7 @@ "type": "Identifier", "span": { "start": 349, - "end": 358, + "end": 350, "ctxt": 0 }, "value": "y", @@ -799,7 +799,7 @@ "type": "Identifier", "span": { "start": 385, - "end": 389, + "end": 386, "ctxt": 0 }, "value": "x", @@ -836,7 +836,7 @@ "type": "Identifier", "span": { "start": 391, - "end": 400, + "end": 392, "ctxt": 0 }, "value": "y", @@ -961,7 +961,7 @@ "type": "Identifier", "span": { "start": 422, - "end": 426, + "end": 423, "ctxt": 0 }, "value": "x", @@ -998,7 +998,7 @@ "type": "Identifier", "span": { "start": 428, - "end": 437, + "end": 429, "ctxt": 0 }, "value": "y", @@ -1139,7 +1139,7 @@ "type": "Identifier", "span": { "start": 474, - "end": 483, + "end": 475, "ctxt": 0 }, "value": "x", @@ -1166,7 +1166,7 @@ "type": "Identifier", "span": { "start": 485, - "end": 494, + "end": 486, "ctxt": 0 }, "value": "y", @@ -1249,7 +1249,7 @@ "type": "Identifier", "span": { "start": 518, - "end": 527, + "end": 519, "ctxt": 0 }, "value": "x", @@ -1276,7 +1276,7 @@ "type": "Identifier", "span": { "start": 529, - "end": 538, + "end": 530, "ctxt": 0 }, "value": "y", @@ -1391,7 +1391,7 @@ "type": "Identifier", "span": { "start": 577, - "end": 581, + "end": 578, "ctxt": 0 }, "value": "x", @@ -1428,7 +1428,7 @@ "type": "Identifier", "span": { "start": 583, - "end": 592, + "end": 584, "ctxt": 0 }, "value": "y", @@ -1553,7 +1553,7 @@ "type": "Identifier", "span": { "start": 614, - "end": 618, + "end": 615, "ctxt": 0 }, "value": "x", @@ -1590,7 +1590,7 @@ "type": "Identifier", "span": { "start": 620, - "end": 629, + "end": 621, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/constructorFunctionTypeIsAssignableToBaseType2.json b/crates/swc_ecma_parser/tests/tsc/constructorFunctionTypeIsAssignableToBaseType2.json index 93827265e158..49fc296fed54 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructorFunctionTypeIsAssignableToBaseType2.json +++ b/crates/swc_ecma_parser/tests/tsc/constructorFunctionTypeIsAssignableToBaseType2.json @@ -153,7 +153,7 @@ "type": "Identifier", "span": { "start": 179, - "end": 188, + "end": 180, "ctxt": 0 }, "value": "x", @@ -344,7 +344,7 @@ "type": "Identifier", "span": { "start": 302, - "end": 311, + "end": 303, "ctxt": 0 }, "value": "x", @@ -575,7 +575,7 @@ "type": "Identifier", "span": { "start": 493, - "end": 499, + "end": 494, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/constructorFunctions2.json b/crates/swc_ecma_parser/tests/tsc/constructorFunctions2.json index 960563719174..b3e51b01802b 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructorFunctions2.json +++ b/crates/swc_ecma_parser/tests/tsc/constructorFunctions2.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 124, - "end": 134, + "end": 126, "ctxt": 0 }, "value": "id", diff --git a/crates/swc_ecma_parser/tests/tsc/constructorImplementationWithDefaultValues.json b/crates/swc_ecma_parser/tests/tsc/constructorImplementationWithDefaultValues.json index f70edeb362c9..303a0df4d7b0 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructorImplementationWithDefaultValues.json +++ b/crates/swc_ecma_parser/tests/tsc/constructorImplementationWithDefaultValues.json @@ -288,7 +288,7 @@ "type": "Identifier", "span": { "start": 133, - "end": 136, + "end": 134, "ctxt": 0 }, "value": "x", @@ -526,7 +526,7 @@ "type": "Identifier", "span": { "start": 237, - "end": 241, + "end": 238, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/constructorImplementationWithDefaultValues2.json b/crates/swc_ecma_parser/tests/tsc/constructorImplementationWithDefaultValues2.json index e535f06585cc..04b236dc53ed 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructorImplementationWithDefaultValues2.json +++ b/crates/swc_ecma_parser/tests/tsc/constructorImplementationWithDefaultValues2.json @@ -109,7 +109,7 @@ "type": "Identifier", "span": { "start": 54, - "end": 63, + "end": 55, "ctxt": 0 }, "value": "x", @@ -257,7 +257,7 @@ "type": "Identifier", "span": { "start": 140, - "end": 144, + "end": 141, "ctxt": 0 }, "value": "x", @@ -303,7 +303,7 @@ "type": "Identifier", "span": { "start": 146, - "end": 150, + "end": 147, "ctxt": 0 }, "value": "y", @@ -379,7 +379,7 @@ "type": "Identifier", "span": { "start": 169, - "end": 173, + "end": 170, "ctxt": 0 }, "value": "x", @@ -446,7 +446,7 @@ "type": "Identifier", "span": { "start": 186, - "end": 190, + "end": 187, "ctxt": 0 }, "value": "y", @@ -709,7 +709,7 @@ "type": "Identifier", "span": { "start": 297, - "end": 301, + "end": 298, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/constructorOverloadsWithOptionalParameters.json b/crates/swc_ecma_parser/tests/tsc/constructorOverloadsWithOptionalParameters.json index 99641c3d82ce..ffbaaa95c42d 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructorOverloadsWithOptionalParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/constructorOverloadsWithOptionalParameters.json @@ -121,7 +121,7 @@ "type": "Identifier", "span": { "start": 48, - "end": 57, + "end": 49, "ctxt": 0 }, "value": "y", @@ -310,7 +310,7 @@ "type": "Identifier", "span": { "start": 140, - "end": 149, + "end": 141, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/constructorParameterProperties.json b/crates/swc_ecma_parser/tests/tsc/constructorParameterProperties.json index b6a7deedad4e..a376d99d1516 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructorParameterProperties.json +++ b/crates/swc_ecma_parser/tests/tsc/constructorParameterProperties.json @@ -104,7 +104,7 @@ "type": "Identifier", "span": { "start": 50, - "end": 59, + "end": 51, "ctxt": 0 }, "value": "x", @@ -143,7 +143,7 @@ "type": "Identifier", "span": { "start": 71, - "end": 80, + "end": 72, "ctxt": 0 }, "value": "z", @@ -531,7 +531,7 @@ "type": "Identifier", "span": { "start": 198, - "end": 202, + "end": 199, "ctxt": 0 }, "value": "a", @@ -580,7 +580,7 @@ "type": "Identifier", "span": { "start": 212, - "end": 216, + "end": 213, "ctxt": 0 }, "value": "x", @@ -629,7 +629,7 @@ "type": "Identifier", "span": { "start": 228, - "end": 232, + "end": 229, "ctxt": 0 }, "value": "z", diff --git a/crates/swc_ecma_parser/tests/tsc/constructorParameterProperties2.json b/crates/swc_ecma_parser/tests/tsc/constructorParameterProperties2.json index 1523c260a949..5bf44fd43f0c 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructorParameterProperties2.json +++ b/crates/swc_ecma_parser/tests/tsc/constructorParameterProperties2.json @@ -101,7 +101,7 @@ "type": "Identifier", "span": { "start": 42, - "end": 51, + "end": 43, "ctxt": 0 }, "value": "y", @@ -362,7 +362,7 @@ "type": "Identifier", "span": { "start": 138, - "end": 147, + "end": 139, "ctxt": 0 }, "value": "y", @@ -623,7 +623,7 @@ "type": "Identifier", "span": { "start": 239, - "end": 248, + "end": 240, "ctxt": 0 }, "value": "y", @@ -884,7 +884,7 @@ "type": "Identifier", "span": { "start": 351, - "end": 360, + "end": 352, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/constructorParameterShadowsOuterScopes.json b/crates/swc_ecma_parser/tests/tsc/constructorParameterShadowsOuterScopes.json index 01e1ec73ed25..ab14ab55cd79 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructorParameterShadowsOuterScopes.json +++ b/crates/swc_ecma_parser/tests/tsc/constructorParameterShadowsOuterScopes.json @@ -136,7 +136,7 @@ "type": "Identifier", "span": { "start": 515, - "end": 524, + "end": 516, "ctxt": 0 }, "value": "x", @@ -349,7 +349,7 @@ "type": "Identifier", "span": { "start": 690, - "end": 699, + "end": 691, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/constructorParameterShadowsOuterScopes2.json b/crates/swc_ecma_parser/tests/tsc/constructorParameterShadowsOuterScopes2.json index cf2a6e686ee0..0784fff8cbfd 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructorParameterShadowsOuterScopes2.json +++ b/crates/swc_ecma_parser/tests/tsc/constructorParameterShadowsOuterScopes2.json @@ -136,7 +136,7 @@ "type": "Identifier", "span": { "start": 667, - "end": 676, + "end": 668, "ctxt": 0 }, "value": "x", @@ -310,7 +310,7 @@ "type": "Identifier", "span": { "start": 743, - "end": 752, + "end": 744, "ctxt": 0 }, "value": "x", @@ -485,7 +485,7 @@ "type": "Identifier", "span": { "start": 832, - "end": 841, + "end": 833, "ctxt": 0 }, "value": "z", diff --git a/crates/swc_ecma_parser/tests/tsc/constructorWithExpressionLessReturn.json b/crates/swc_ecma_parser/tests/tsc/constructorWithExpressionLessReturn.json index 9784aaf273f6..7d3065b9687b 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructorWithExpressionLessReturn.json +++ b/crates/swc_ecma_parser/tests/tsc/constructorWithExpressionLessReturn.json @@ -238,7 +238,7 @@ "type": "Identifier", "span": { "start": 159, - "end": 168, + "end": 160, "ctxt": 0 }, "value": "x", @@ -345,7 +345,7 @@ "type": "Identifier", "span": { "start": 233, - "end": 237, + "end": 234, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/contextualIntersectionType.json b/crates/swc_ecma_parser/tests/tsc/contextualIntersectionType.json index 5628d0f0125c..3a8c6cac34ad 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextualIntersectionType.json +++ b/crates/swc_ecma_parser/tests/tsc/contextualIntersectionType.json @@ -96,7 +96,7 @@ "type": "Identifier", "span": { "start": 14, - "end": 23, + "end": 15, "ctxt": 0 }, "value": "s", @@ -193,7 +193,7 @@ "type": "Identifier", "span": { "start": 45, - "end": 54, + "end": 46, "ctxt": 0 }, "value": "n", diff --git a/crates/swc_ecma_parser/tests/tsc/contextualSignatureInstantiation.json b/crates/swc_ecma_parser/tests/tsc/contextualSignatureInstantiation.json index 967c38ae3dcf..679dc174d09e 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextualSignatureInstantiation.json +++ b/crates/swc_ecma_parser/tests/tsc/contextualSignatureInstantiation.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 520, - "end": 551, + "end": 522, "ctxt": 0 }, "value": "cb", @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 525, - "end": 534, + "end": 526, "ctxt": 0 }, "value": "x", @@ -83,7 +83,7 @@ "type": "Identifier", "span": { "start": 536, - "end": 545, + "end": 537, "ctxt": 0 }, "value": "y", @@ -236,7 +236,7 @@ "type": "Identifier", "span": { "start": 587, - "end": 591, + "end": 588, "ctxt": 0 }, "value": "x", @@ -282,7 +282,7 @@ "type": "Identifier", "span": { "start": 593, - "end": 597, + "end": 594, "ctxt": 0 }, "value": "y", @@ -328,7 +328,7 @@ "type": "Identifier", "span": { "start": 599, - "end": 620, + "end": 601, "ctxt": 0 }, "value": "cb", @@ -352,7 +352,7 @@ "type": "Identifier", "span": { "start": 604, - "end": 608, + "end": 605, "ctxt": 0 }, "value": "x", @@ -389,7 +389,7 @@ "type": "Identifier", "span": { "start": 610, - "end": 614, + "end": 611, "ctxt": 0 }, "value": "y", @@ -598,7 +598,7 @@ "type": "Identifier", "span": { "start": 653, - "end": 657, + "end": 654, "ctxt": 0 }, "value": "x", @@ -644,7 +644,7 @@ "type": "Identifier", "span": { "start": 659, - "end": 663, + "end": 660, "ctxt": 0 }, "value": "y", @@ -690,7 +690,7 @@ "type": "Identifier", "span": { "start": 665, - "end": 686, + "end": 667, "ctxt": 0 }, "value": "cb", @@ -714,7 +714,7 @@ "type": "Identifier", "span": { "start": 670, - "end": 674, + "end": 671, "ctxt": 0 }, "value": "x", @@ -751,7 +751,7 @@ "type": "Identifier", "span": { "start": 676, - "end": 680, + "end": 677, "ctxt": 0 }, "value": "y", @@ -937,7 +937,7 @@ "type": "Identifier", "span": { "start": 715, - "end": 719, + "end": 716, "ctxt": 0 }, "value": "x", @@ -983,7 +983,7 @@ "type": "Identifier", "span": { "start": 721, - "end": 725, + "end": 722, "ctxt": 0 }, "value": "y", @@ -1114,7 +1114,7 @@ "type": "Identifier", "span": { "start": 756, - "end": 760, + "end": 757, "ctxt": 0 }, "value": "x", @@ -1160,7 +1160,7 @@ "type": "Identifier", "span": { "start": 762, - "end": 766, + "end": 763, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/contextualThisType.json b/crates/swc_ecma_parser/tests/tsc/contextualThisType.json index bca3ff9bc1bf..f5153365d0c3 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextualThisType.json +++ b/crates/swc_ecma_parser/tests/tsc/contextualThisType.json @@ -75,7 +75,7 @@ "type": "Identifier", "span": { "start": 23, - "end": 30, + "end": 24, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/contextualTypeTupleEnd.json b/crates/swc_ecma_parser/tests/tsc/contextualTypeTupleEnd.json index 48c49d5c6fce..7fffc20fa9de 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextualTypeTupleEnd.json +++ b/crates/swc_ecma_parser/tests/tsc/contextualTypeTupleEnd.json @@ -74,7 +74,7 @@ "type": "Identifier", "span": { "start": 55, - "end": 66, + "end": 58, "ctxt": 0 }, "value": "arg", @@ -141,7 +141,7 @@ "type": "Identifier", "span": { "start": 81, - "end": 92, + "end": 84, "ctxt": 0 }, "value": "arg", @@ -214,7 +214,7 @@ "type": "Identifier", "span": { "start": 126, - "end": 135, + "end": 127, "ctxt": 0 }, "value": "x", @@ -293,7 +293,7 @@ "type": "Identifier", "span": { "start": 165, - "end": 174, + "end": 166, "ctxt": 0 }, "value": "x", @@ -1649,7 +1649,7 @@ "type": "Identifier", "span": { "start": 559, - "end": 571, + "end": 564, "ctxt": 0 }, "value": "state", @@ -2106,7 +2106,7 @@ "type": "Identifier", "span": { "start": 808, - "end": 814, + "end": 809, "ctxt": 0 }, "value": "x", @@ -2584,7 +2584,7 @@ "type": "Identifier", "span": { "start": 985, - "end": 994, + "end": 986, "ctxt": 0 }, "value": "n", @@ -2651,7 +2651,7 @@ "type": "Identifier", "span": { "start": 1009, - "end": 1015, + "end": 1010, "ctxt": 0 }, "value": "x", @@ -3027,7 +3027,7 @@ "type": "Identifier", "span": { "start": 1174, - "end": 1185, + "end": 1177, "ctxt": 0 }, "value": "arg", @@ -3094,7 +3094,7 @@ "type": "Identifier", "span": { "start": 1200, - "end": 1211, + "end": 1203, "ctxt": 0 }, "value": "arg", diff --git a/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeCallSignatures.json b/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeCallSignatures.json index 4b9a886886f3..2370d927bd55 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeCallSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeCallSignatures.json @@ -118,7 +118,7 @@ "type": "Identifier", "span": { "start": 618, - "end": 627, + "end": 619, "ctxt": 0 }, "value": "a", @@ -204,7 +204,7 @@ "type": "Identifier", "span": { "start": 678, - "end": 687, + "end": 679, "ctxt": 0 }, "value": "a", @@ -290,7 +290,7 @@ "type": "Identifier", "span": { "start": 738, - "end": 747, + "end": 739, "ctxt": 0 }, "value": "b", @@ -376,7 +376,7 @@ "type": "Identifier", "span": { "start": 798, - "end": 807, + "end": 799, "ctxt": 0 }, "value": "a", @@ -431,7 +431,7 @@ "type": "Identifier", "span": { "start": 823, - "end": 832, + "end": 824, "ctxt": 0 }, "value": "a", @@ -458,7 +458,7 @@ "type": "Identifier", "span": { "start": 834, - "end": 843, + "end": 835, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeIndexSignatures.json b/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeIndexSignatures.json index 7142a94c1e28..5c9cfa821171 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeIndexSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeIndexSignatures.json @@ -46,7 +46,7 @@ "type": "Identifier", "span": { "start": 228, - "end": 237, + "end": 229, "ctxt": 0 }, "value": "a", @@ -132,7 +132,7 @@ "type": "Identifier", "span": { "start": 277, - "end": 286, + "end": 278, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeMembers.json b/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeMembers.json index 2fa82b02bd5a..485cb3ce7582 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeMembers.json +++ b/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeMembers.json @@ -91,7 +91,7 @@ "type": "Identifier", "span": { "start": 241, - "end": 250, + "end": 242, "ctxt": 0 }, "value": "a", @@ -200,7 +200,7 @@ "type": "Identifier", "span": { "start": 327, - "end": 331, + "end": 328, "ctxt": 0 }, "value": "a", @@ -288,7 +288,7 @@ "type": "Identifier", "span": { "start": 357, - "end": 366, + "end": 358, "ctxt": 0 }, "value": "a", @@ -460,7 +460,7 @@ "type": "Identifier", "span": { "start": 448, - "end": 457, + "end": 449, "ctxt": 0 }, "value": "a", @@ -569,7 +569,7 @@ "type": "Identifier", "span": { "start": 534, - "end": 538, + "end": 535, "ctxt": 0 }, "value": "a", @@ -657,7 +657,7 @@ "type": "Identifier", "span": { "start": 564, - "end": 573, + "end": 565, "ctxt": 0 }, "value": "a", @@ -3124,7 +3124,7 @@ "type": "Identifier", "span": { "start": 2432, - "end": 2441, + "end": 2433, "ctxt": 0 }, "value": "a", @@ -3151,7 +3151,7 @@ "type": "Identifier", "span": { "start": 2443, - "end": 2452, + "end": 2444, "ctxt": 0 }, "value": "b", @@ -3291,7 +3291,7 @@ "type": "Identifier", "span": { "start": 2558, - "end": 2567, + "end": 2559, "ctxt": 0 }, "value": "a", @@ -3318,7 +3318,7 @@ "type": "Identifier", "span": { "start": 2569, - "end": 2578, + "end": 2570, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeObjectLiteral.json b/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeObjectLiteral.json index 813dfdd0e9fc..0d5d4377cf5f 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeObjectLiteral.json +++ b/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeObjectLiteral.json @@ -2153,7 +2153,7 @@ "type": "Identifier", "span": { "start": 1497, - "end": 1506, + "end": 1498, "ctxt": 0 }, "value": "a", @@ -2180,7 +2180,7 @@ "type": "Identifier", "span": { "start": 1508, - "end": 1517, + "end": 1509, "ctxt": 0 }, "value": "b", @@ -2279,7 +2279,7 @@ "type": "Identifier", "span": { "start": 1582, - "end": 1591, + "end": 1583, "ctxt": 0 }, "value": "a", @@ -2306,7 +2306,7 @@ "type": "Identifier", "span": { "start": 1593, - "end": 1602, + "end": 1594, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/tsc/contextuallyTypeAsyncFunctionReturnType.json b/crates/swc_ecma_parser/tests/tsc/contextuallyTypeAsyncFunctionReturnType.json index 07d5094a9fe9..f1e7d4395baa 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextuallyTypeAsyncFunctionReturnType.json +++ b/crates/swc_ecma_parser/tests/tsc/contextuallyTypeAsyncFunctionReturnType.json @@ -892,7 +892,7 @@ "type": "Identifier", "span": { "start": 543, - "end": 552, + "end": 546, "ctxt": 0 }, "value": "err", @@ -967,7 +967,7 @@ "type": "Identifier", "span": { "start": 576, - "end": 589, + "end": 580, "ctxt": 0 }, "value": "this", @@ -1004,7 +1004,7 @@ "type": "Identifier", "span": { "start": 591, - "end": 601, + "end": 595, "ctxt": 0 }, "value": "done", @@ -1089,7 +1089,7 @@ "type": "Identifier", "span": { "start": 630, - "end": 643, + "end": 634, "ctxt": 0 }, "value": "this", @@ -1211,7 +1211,7 @@ "type": "Identifier", "span": { "start": 695, - "end": 703, + "end": 697, "ctxt": 0 }, "value": "fn", @@ -1276,7 +1276,7 @@ "type": "Identifier", "span": { "start": 715, - "end": 728, + "end": 717, "ctxt": 0 }, "value": "fn", @@ -1341,7 +1341,7 @@ "type": "Identifier", "span": { "start": 740, - "end": 753, + "end": 745, "ctxt": 0 }, "value": "title", @@ -1368,7 +1368,7 @@ "type": "Identifier", "span": { "start": 755, - "end": 764, + "end": 757, "ctxt": 0 }, "value": "fn", @@ -1433,7 +1433,7 @@ "type": "Identifier", "span": { "start": 776, - "end": 789, + "end": 781, "ctxt": 0 }, "value": "title", @@ -1460,7 +1460,7 @@ "type": "Identifier", "span": { "start": 791, - "end": 805, + "end": 793, "ctxt": 0 }, "value": "fn", @@ -1862,7 +1862,7 @@ "type": "Identifier", "span": { "start": 1030, - "end": 1045, + "end": 1037, "ctxt": 0 }, "value": "rootPid", @@ -1898,7 +1898,7 @@ "type": "Identifier", "span": { "start": 1049, - "end": 1090, + "end": 1057, "ctxt": 0 }, "value": "callback", @@ -1922,7 +1922,7 @@ "type": "Identifier", "span": { "start": 1060, - "end": 1081, + "end": 1064, "ctxt": 0 }, "value": "tree", @@ -2595,7 +2595,7 @@ "type": "Identifier", "span": { "start": 1520, - "end": 1542, + "end": 1525, "ctxt": 0 }, "value": "local", @@ -2741,7 +2741,7 @@ "type": "Identifier", "span": { "start": 1611, - "end": 1644, + "end": 1625, "ctxt": 0 }, "value": "fromExtensions", diff --git a/crates/swc_ecma_parser/tests/tsc/contextuallyTypeCommaOperator01.json b/crates/swc_ecma_parser/tests/tsc/contextuallyTypeCommaOperator01.json index 74247bf4d7e7..7317e038c395 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextuallyTypeCommaOperator01.json +++ b/crates/swc_ecma_parser/tests/tsc/contextuallyTypeCommaOperator01.json @@ -51,7 +51,7 @@ "type": "Identifier", "span": { "start": 65, - "end": 74, + "end": 66, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/contextuallyTypeCommaOperator02.json b/crates/swc_ecma_parser/tests/tsc/contextuallyTypeCommaOperator02.json index 1a7fde3ea024..677f95bbaf43 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextuallyTypeCommaOperator02.json +++ b/crates/swc_ecma_parser/tests/tsc/contextuallyTypeCommaOperator02.json @@ -51,7 +51,7 @@ "type": "Identifier", "span": { "start": 65, - "end": 74, + "end": 66, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/contextuallyTypeCommaOperator03.json b/crates/swc_ecma_parser/tests/tsc/contextuallyTypeCommaOperator03.json index 6c95c5b94dfc..29074d08d814 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextuallyTypeCommaOperator03.json +++ b/crates/swc_ecma_parser/tests/tsc/contextuallyTypeCommaOperator03.json @@ -51,7 +51,7 @@ "type": "Identifier", "span": { "start": 65, - "end": 74, + "end": 66, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/contextuallyTypeLogicalAnd01.json b/crates/swc_ecma_parser/tests/tsc/contextuallyTypeLogicalAnd01.json index 4bf44f067a04..0b3bd0b61501 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextuallyTypeLogicalAnd01.json +++ b/crates/swc_ecma_parser/tests/tsc/contextuallyTypeLogicalAnd01.json @@ -51,7 +51,7 @@ "type": "Identifier", "span": { "start": 34, - "end": 43, + "end": 35, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/contextuallyTypeLogicalAnd02.json b/crates/swc_ecma_parser/tests/tsc/contextuallyTypeLogicalAnd02.json index 48d6abe96bb9..8bf4038dd0bb 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextuallyTypeLogicalAnd02.json +++ b/crates/swc_ecma_parser/tests/tsc/contextuallyTypeLogicalAnd02.json @@ -51,7 +51,7 @@ "type": "Identifier", "span": { "start": 34, - "end": 43, + "end": 35, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/contextuallyTypeLogicalAnd03.json b/crates/swc_ecma_parser/tests/tsc/contextuallyTypeLogicalAnd03.json index 6b938a9723dd..47944d34c82b 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextuallyTypeLogicalAnd03.json +++ b/crates/swc_ecma_parser/tests/tsc/contextuallyTypeLogicalAnd03.json @@ -51,7 +51,7 @@ "type": "Identifier", "span": { "start": 34, - "end": 43, + "end": 35, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/contextuallyTypedBindingInitializer.json b/crates/swc_ecma_parser/tests/tsc/contextuallyTypedBindingInitializer.json index 94c859d67a88..348c1723a9bd 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextuallyTypedBindingInitializer.json +++ b/crates/swc_ecma_parser/tests/tsc/contextuallyTypedBindingInitializer.json @@ -75,7 +75,7 @@ "type": "Identifier", "span": { "start": 53, - "end": 62, + "end": 54, "ctxt": 0 }, "value": "x", @@ -1438,7 +1438,7 @@ "type": "Identifier", "span": { "start": 607, - "end": 616, + "end": 608, "ctxt": 0 }, "value": "s", diff --git a/crates/swc_ecma_parser/tests/tsc/contextuallyTypedBindingInitializerNegative.json b/crates/swc_ecma_parser/tests/tsc/contextuallyTypedBindingInitializerNegative.json index c13a20a4a3cf..0bcaca3d2c18 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextuallyTypedBindingInitializerNegative.json +++ b/crates/swc_ecma_parser/tests/tsc/contextuallyTypedBindingInitializerNegative.json @@ -75,7 +75,7 @@ "type": "Identifier", "span": { "start": 53, - "end": 62, + "end": 54, "ctxt": 0 }, "value": "x", @@ -886,7 +886,7 @@ "type": "Identifier", "span": { "start": 392, - "end": 401, + "end": 393, "ctxt": 0 }, "value": "s", diff --git a/crates/swc_ecma_parser/tests/tsc/contextuallyTypedClassExpressionMethodDeclaration01.json b/crates/swc_ecma_parser/tests/tsc/contextuallyTypedClassExpressionMethodDeclaration01.json index 8a0399329322..226ac5d86efa 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextuallyTypedClassExpressionMethodDeclaration01.json +++ b/crates/swc_ecma_parser/tests/tsc/contextuallyTypedClassExpressionMethodDeclaration01.json @@ -203,7 +203,7 @@ "type": "Identifier", "span": { "start": 131, - "end": 137, + "end": 134, "ctxt": 0 }, "value": "arg", @@ -281,7 +281,7 @@ "type": "Identifier", "span": { "start": 158, - "end": 164, + "end": 161, "ctxt": 0 }, "value": "arg", diff --git a/crates/swc_ecma_parser/tests/tsc/contextuallyTypedClassExpressionMethodDeclaration02.json b/crates/swc_ecma_parser/tests/tsc/contextuallyTypedClassExpressionMethodDeclaration02.json index b6df92c335ed..afd4e9c84eff 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextuallyTypedClassExpressionMethodDeclaration02.json +++ b/crates/swc_ecma_parser/tests/tsc/contextuallyTypedClassExpressionMethodDeclaration02.json @@ -271,7 +271,7 @@ "type": "Identifier", "span": { "start": 167, - "end": 173, + "end": 170, "ctxt": 0 }, "value": "arg", @@ -349,7 +349,7 @@ "type": "Identifier", "span": { "start": 194, - "end": 200, + "end": 197, "ctxt": 0 }, "value": "arg", diff --git a/crates/swc_ecma_parser/tests/tsc/contextuallyTypedFunctionExpressionsAndReturnAnnotations.json b/crates/swc_ecma_parser/tests/tsc/contextuallyTypedFunctionExpressionsAndReturnAnnotations.json index d0eaf3aa8ac1..514187c1bf3d 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextuallyTypedFunctionExpressionsAndReturnAnnotations.json +++ b/crates/swc_ecma_parser/tests/tsc/contextuallyTypedFunctionExpressionsAndReturnAnnotations.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 22, - "end": 60, + "end": 23, "ctxt": 0 }, "value": "x", @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 26, - "end": 35, + "end": 27, "ctxt": 0 }, "value": "y", @@ -100,7 +100,7 @@ "type": "Identifier", "span": { "start": 41, - "end": 51, + "end": 43, "ctxt": 0 }, "value": "y2", @@ -340,7 +340,7 @@ "type": "Identifier", "span": { "start": 146, - "end": 156, + "end": 148, "ctxt": 0 }, "value": "y2", diff --git a/crates/swc_ecma_parser/tests/tsc/contextuallyTypedObjectLiteralMethodDeclaration01.json b/crates/swc_ecma_parser/tests/tsc/contextuallyTypedObjectLiteralMethodDeclaration01.json index 4a8b22a00f3b..9bf8131f9bfb 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextuallyTypedObjectLiteralMethodDeclaration01.json +++ b/crates/swc_ecma_parser/tests/tsc/contextuallyTypedObjectLiteralMethodDeclaration01.json @@ -203,7 +203,7 @@ "type": "Identifier", "span": { "start": 131, - "end": 137, + "end": 134, "ctxt": 0 }, "value": "arg", @@ -281,7 +281,7 @@ "type": "Identifier", "span": { "start": 158, - "end": 164, + "end": 161, "ctxt": 0 }, "value": "arg", diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowAliasing.json b/crates/swc_ecma_parser/tests/tsc/controlFlowAliasing.json index 1d7a28886341..f288c34f2ccc 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowAliasing.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowAliasing.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 103, - "end": 121, + "end": 104, "ctxt": 0 }, "value": "x", @@ -347,7 +347,7 @@ "type": "Identifier", "span": { "start": 282, - "end": 292, + "end": 283, "ctxt": 0 }, "value": "x", @@ -576,7 +576,7 @@ "type": "Identifier", "span": { "start": 409, - "end": 437, + "end": 410, "ctxt": 0 }, "value": "x", @@ -1008,7 +1008,7 @@ "type": "Identifier", "span": { "start": 664, - "end": 692, + "end": 665, "ctxt": 0 }, "value": "x", @@ -1482,7 +1482,7 @@ "type": "Identifier", "span": { "start": 966, - "end": 994, + "end": 967, "ctxt": 0 }, "value": "x", @@ -1724,7 +1724,7 @@ "type": "Identifier", "span": { "start": 1104, - "end": 1140, + "end": 1107, "ctxt": 0 }, "value": "obj", @@ -2050,7 +2050,7 @@ "type": "Identifier", "span": { "start": 1265, - "end": 1301, + "end": 1268, "ctxt": 0 }, "value": "obj", @@ -2437,7 +2437,7 @@ "type": "Identifier", "span": { "start": 1504, - "end": 1535, + "end": 1507, "ctxt": 0 }, "value": "obj", @@ -2765,7 +2765,7 @@ "type": "Identifier", "span": { "start": 1662, - "end": 1693, + "end": 1665, "ctxt": 0 }, "value": "obj", @@ -3144,7 +3144,7 @@ "type": "Identifier", "span": { "start": 1893, - "end": 1957, + "end": 1896, "ctxt": 0 }, "value": "obj", @@ -3608,7 +3608,7 @@ "type": "Identifier", "span": { "start": 2089, - "end": 2153, + "end": 2092, "ctxt": 0 }, "value": "obj", @@ -4088,7 +4088,7 @@ "type": "Identifier", "span": { "start": 2396, - "end": 2460, + "end": 2399, "ctxt": 0 }, "value": "obj", @@ -4552,7 +4552,7 @@ "type": "Identifier", "span": { "start": 2674, - "end": 2738, + "end": 2677, "ctxt": 0 }, "value": "obj", @@ -5054,7 +5054,7 @@ "type": "Identifier", "span": { "start": 3001, - "end": 3065, + "end": 3004, "ctxt": 0 }, "value": "arg", @@ -5560,7 +5560,7 @@ "type": "Identifier", "span": { "start": 3218, - "end": 3282, + "end": 3221, "ctxt": 0 }, "value": "arg", @@ -6066,7 +6066,7 @@ "type": "Identifier", "span": { "start": 3433, - "end": 3517, + "end": 3438, "ctxt": 0 }, "value": "outer", @@ -6626,7 +6626,7 @@ "type": "Identifier", "span": { "start": 3667, - "end": 3742, + "end": 3672, "ctxt": 0 }, "value": "outer", @@ -7186,7 +7186,7 @@ "type": "Identifier", "span": { "start": 3972, - "end": 4037, + "end": 3975, "ctxt": 0 }, "value": "obj", @@ -7787,7 +7787,7 @@ "type": "Identifier", "span": { "start": 4281, - "end": 4345, + "end": 4284, "ctxt": 0 }, "value": "obj", @@ -8251,7 +8251,7 @@ "type": "Identifier", "span": { "start": 4475, - "end": 4539, + "end": 4478, "ctxt": 0 }, "value": "obj", @@ -8718,7 +8718,7 @@ "type": "Identifier", "span": { "start": 4668, - "end": 4732, + "end": 4671, "ctxt": 0 }, "value": "obj", @@ -9189,7 +9189,7 @@ "type": "Identifier", "span": { "start": 4861, - "end": 4925, + "end": 4864, "ctxt": 0 }, "value": "obj", @@ -9704,7 +9704,7 @@ "type": "Identifier", "span": { "start": 5094, - "end": 5112, + "end": 5095, "ctxt": 0 }, "value": "x", @@ -10166,7 +10166,7 @@ "type": "Identifier", "span": { "start": 5393, - "end": 5411, + "end": 5394, "ctxt": 0 }, "value": "x", @@ -10701,7 +10701,7 @@ "type": "Identifier", "span": { "start": 5867, - "end": 5933, + "end": 5870, "ctxt": 0 }, "value": "obj", @@ -11474,7 +11474,7 @@ "type": "Identifier", "span": { "start": 6240, - "end": 6249, + "end": 6243, "ctxt": 0 }, "value": "obj", @@ -12279,7 +12279,7 @@ "type": "Identifier", "span": { "start": 6736, - "end": 6744, + "end": 6741, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowBinaryOrExpression.json b/crates/swc_ecma_parser/tests/tsc/controlFlowBinaryOrExpression.json index 39e0508f5936..7a20978cdc1b 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowBinaryOrExpression.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowBinaryOrExpression.json @@ -550,7 +550,7 @@ "type": "Identifier", "span": { "start": 283, - "end": 297, + "end": 292, "ctxt": 0 }, "value": "sourceObj", @@ -666,7 +666,7 @@ "type": "Identifier", "span": { "start": 357, - "end": 371, + "end": 366, "ctxt": 0 }, "value": "sourceObj", diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowCommaOperator.json b/crates/swc_ecma_parser/tests/tsc/controlFlowCommaOperator.json index fc258f65ef4a..5d2e169e4b64 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowCommaOperator.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowCommaOperator.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 12, - "end": 40, + "end": 13, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowComputedPropertyNames.json b/crates/swc_ecma_parser/tests/tsc/controlFlowComputedPropertyNames.json index 2a11a61d8e21..553d02a681bd 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowComputedPropertyNames.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowComputedPropertyNames.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 48, - "end": 76, + "end": 51, "ctxt": 0 }, "value": "obj", @@ -105,7 +105,7 @@ "type": "Identifier", "span": { "start": 78, - "end": 89, + "end": 81, "ctxt": 0 }, "value": "key", @@ -332,7 +332,7 @@ "type": "Identifier", "span": { "start": 186, - "end": 225, + "end": 189, "ctxt": 0 }, "value": "obj", @@ -424,7 +424,7 @@ "type": "Identifier", "span": { "start": 227, - "end": 238, + "end": 230, "ctxt": 0 }, "value": "key", @@ -1209,7 +1209,7 @@ "type": "Identifier", "span": { "start": 585, - "end": 595, + "end": 588, "ctxt": 0 }, "value": "obj", @@ -1255,7 +1255,7 @@ "type": "Identifier", "span": { "start": 597, - "end": 613, + "end": 600, "ctxt": 0 }, "value": "key", @@ -1730,7 +1730,7 @@ "type": "Identifier", "span": { "start": 866, - "end": 900, + "end": 869, "ctxt": 0 }, "value": "obj", @@ -1832,7 +1832,7 @@ "type": "Identifier", "span": { "start": 902, - "end": 908, + "end": 905, "ctxt": 0 }, "value": "key", diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowElementAccessNoCrash1.json b/crates/swc_ecma_parser/tests/tsc/controlFlowElementAccessNoCrash1.json index e10631f8eb61..6ada279976d4 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowElementAccessNoCrash1.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowElementAccessNoCrash1.json @@ -510,7 +510,7 @@ "type": "Identifier", "span": { "start": 387, - "end": 408, + "end": 392, "ctxt": 0 }, "value": "input", diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowGenericTypes.json b/crates/swc_ecma_parser/tests/tsc/controlFlowGenericTypes.json index a7333cd5cc97..c0a13cad951f 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowGenericTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowGenericTypes.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 61, - "end": 65, + "end": 62, "ctxt": 0 }, "value": "x", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 67, - "end": 78, + "end": 68, "ctxt": 0 }, "value": "y", @@ -166,7 +166,7 @@ "type": "Identifier", "span": { "start": 80, - "end": 86, + "end": 81, "ctxt": 0 }, "value": "z", @@ -759,7 +759,7 @@ "type": "Identifier", "span": { "start": 327, - "end": 367, + "end": 328, "ctxt": 0 }, "value": "x", @@ -1197,7 +1197,7 @@ "type": "Identifier", "span": { "start": 526, - "end": 532, + "end": 527, "ctxt": 0 }, "value": "x", @@ -1331,7 +1331,7 @@ "type": "Identifier", "span": { "start": 583, - "end": 593, + "end": 584, "ctxt": 0 }, "value": "x", @@ -1437,7 +1437,7 @@ "type": "Identifier", "span": { "start": 638, - "end": 647, + "end": 639, "ctxt": 0 }, "value": "x", @@ -1596,7 +1596,7 @@ "type": "Identifier", "span": { "start": 696, - "end": 700, + "end": 697, "ctxt": 0 }, "value": "x", @@ -1870,7 +1870,7 @@ "type": "Identifier", "span": { "start": 793, - "end": 797, + "end": 794, "ctxt": 0 }, "value": "x", @@ -2153,7 +2153,7 @@ "type": "Identifier", "span": { "start": 897, - "end": 901, + "end": 898, "ctxt": 0 }, "value": "x", @@ -2436,7 +2436,7 @@ "type": "Identifier", "span": { "start": 1005, - "end": 1009, + "end": 1006, "ctxt": 0 }, "value": "x", @@ -2710,7 +2710,7 @@ "type": "Identifier", "span": { "start": 1121, - "end": 1129, + "end": 1124, "ctxt": 0 }, "value": "val", @@ -2805,7 +2805,7 @@ "type": "Identifier", "span": { "start": 1193, - "end": 1202, + "end": 1198, "ctxt": 0 }, "value": "value", @@ -4539,7 +4539,7 @@ "type": "Identifier", "span": { "start": 2020, - "end": 2029, + "end": 2026, "ctxt": 0 }, "value": "object", @@ -4871,7 +4871,7 @@ "type": "Identifier", "span": { "start": 2185, - "end": 2191, + "end": 2188, "ctxt": 0 }, "value": "key", @@ -4917,7 +4917,7 @@ "type": "Identifier", "span": { "start": 2193, - "end": 2199, + "end": 2196, "ctxt": 0 }, "value": "obj", @@ -5566,7 +5566,7 @@ "type": "Identifier", "span": { "start": 2484, - "end": 2501, + "end": 2498, "ctxt": 0 }, "value": "emittingObject", @@ -5612,7 +5612,7 @@ "type": "Identifier", "span": { "start": 2503, - "end": 2522, + "end": 2512, "ctxt": 0 }, "value": "eventName", @@ -5993,7 +5993,7 @@ "type": "Identifier", "span": { "start": 2950, - "end": 2956, + "end": 2953, "ctxt": 0 }, "value": "obj", @@ -6039,7 +6039,7 @@ "type": "Identifier", "span": { "start": 2958, - "end": 2964, + "end": 2961, "ctxt": 0 }, "value": "key", @@ -6358,7 +6358,7 @@ "type": "Identifier", "span": { "start": 3095, - "end": 3101, + "end": 3098, "ctxt": 0 }, "value": "obj", @@ -6404,7 +6404,7 @@ "type": "Identifier", "span": { "start": 3103, - "end": 3109, + "end": 3106, "ctxt": 0 }, "value": "key", @@ -6787,7 +6787,7 @@ "type": "Identifier", "span": { "start": 3252, - "end": 3258, + "end": 3255, "ctxt": 0 }, "value": "obj", @@ -6833,7 +6833,7 @@ "type": "Identifier", "span": { "start": 3260, - "end": 3266, + "end": 3263, "ctxt": 0 }, "value": "key", @@ -7995,7 +7995,7 @@ "type": "Identifier", "span": { "start": 3970, - "end": 3974, + "end": 3971, "ctxt": 0 }, "value": "x", @@ -8041,7 +8041,7 @@ "type": "Identifier", "span": { "start": 3976, - "end": 3989, + "end": 3977, "ctxt": 0 }, "value": "y", @@ -8482,7 +8482,7 @@ "type": "Identifier", "span": { "start": 4137, - "end": 4167, + "end": 4141, "ctxt": 0 }, "value": "_row", @@ -8647,7 +8647,7 @@ "type": "Identifier", "span": { "start": 4204, - "end": 4224, + "end": 4207, "ctxt": 0 }, "value": "row", @@ -9173,7 +9173,7 @@ "type": "Identifier", "span": { "start": 4509, - "end": 4532, + "end": 4516, "ctxt": 0 }, "value": "control", @@ -9238,7 +9238,7 @@ "type": "Identifier", "span": { "start": 4534, - "end": 4540, + "end": 4537, "ctxt": 0 }, "value": "key", @@ -9284,7 +9284,7 @@ "type": "Identifier", "span": { "start": 4542, - "end": 4553, + "end": 4547, "ctxt": 0 }, "value": "value", @@ -9918,7 +9918,7 @@ "type": "Identifier", "span": { "start": 4790, - "end": 4807, + "end": 4796, "ctxt": 0 }, "value": "column", @@ -9992,7 +9992,7 @@ "type": "Identifier", "span": { "start": 4809, - "end": 4829, + "end": 4812, "ctxt": 0 }, "value": "key", diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowIfStatement.json b/crates/swc_ecma_parser/tests/tsc/controlFlowIfStatement.json index ed1107b25e78..b32a4a67a326 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowIfStatement.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowIfStatement.json @@ -927,7 +927,7 @@ "type": "Identifier", "span": { "start": 547, - "end": 563, + "end": 551, "ctxt": 0 }, "value": "data", @@ -1230,7 +1230,7 @@ "type": "Identifier", "span": { "start": 714, - "end": 730, + "end": 718, "ctxt": 0 }, "value": "data", @@ -1627,7 +1627,7 @@ "type": "Identifier", "span": { "start": 909, - "end": 924, + "end": 910, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowInOperator.json b/crates/swc_ecma_parser/tests/tsc/controlFlowInOperator.json index 62917dd8b92d..9a54273822d0 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowInOperator.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowInOperator.json @@ -740,7 +740,7 @@ "type": "Identifier", "span": { "start": 402, - "end": 424, + "end": 404, "ctxt": 0 }, "value": "id", @@ -795,7 +795,7 @@ "type": "Identifier", "span": { "start": 428, - "end": 462, + "end": 435, "ctxt": 0 }, "value": "seenIDs", @@ -1458,7 +1458,7 @@ "type": "Identifier", "span": { "start": 778, - "end": 797, + "end": 780, "ctxt": 0 }, "value": "id", @@ -1513,7 +1513,7 @@ "type": "Identifier", "span": { "start": 799, - "end": 814, + "end": 806, "ctxt": 0 }, "value": "seenIDs", @@ -1855,7 +1855,7 @@ "type": "Identifier", "span": { "start": 956, - "end": 975, + "end": 958, "ctxt": 0 }, "value": "id", @@ -1910,7 +1910,7 @@ "type": "Identifier", "span": { "start": 977, - "end": 992, + "end": 984, "ctxt": 0 }, "value": "seenIDs", diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowInstanceOfGuardPrimitives.json b/crates/swc_ecma_parser/tests/tsc/controlFlowInstanceOfGuardPrimitives.json index b25fb3f238f0..868fc340f062 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowInstanceOfGuardPrimitives.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowInstanceOfGuardPrimitives.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 22, - "end": 51, + "end": 27, "ctxt": 0 }, "value": "thing", diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowIterationErrors.json b/crates/swc_ecma_parser/tests/tsc/controlFlowIterationErrors.json index 85d8a00e9e22..692a98641bd3 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowIterationErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowIterationErrors.json @@ -81,7 +81,7 @@ "type": "Identifier", "span": { "start": 59, - "end": 68, + "end": 60, "ctxt": 0 }, "value": "s", @@ -741,7 +741,7 @@ "type": "Identifier", "span": { "start": 381, - "end": 390, + "end": 382, "ctxt": 0 }, "value": "x", @@ -820,7 +820,7 @@ "type": "Identifier", "span": { "start": 422, - "end": 431, + "end": 423, "ctxt": 0 }, "value": "x", @@ -1451,7 +1451,7 @@ "type": "Identifier", "span": { "start": 725, - "end": 743, + "end": 726, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowIterationErrorsAsync.json b/crates/swc_ecma_parser/tests/tsc/controlFlowIterationErrorsAsync.json index eefc863cf4f3..dfbc9da1d719 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowIterationErrorsAsync.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowIterationErrorsAsync.json @@ -81,7 +81,7 @@ "type": "Identifier", "span": { "start": 91, - "end": 100, + "end": 92, "ctxt": 0 }, "value": "s", @@ -757,7 +757,7 @@ "type": "Identifier", "span": { "start": 437, - "end": 446, + "end": 438, "ctxt": 0 }, "value": "x", @@ -864,7 +864,7 @@ "type": "Identifier", "span": { "start": 487, - "end": 496, + "end": 488, "ctxt": 0 }, "value": "x", @@ -1539,7 +1539,7 @@ "type": "Identifier", "span": { "start": 829, - "end": 847, + "end": 830, "ctxt": 0 }, "value": "x", @@ -2920,7 +2920,7 @@ "type": "Identifier", "span": { "start": 1551, - "end": 1572, + "end": 1552, "ctxt": 0 }, "value": "_", @@ -3401,7 +3401,7 @@ "type": "Identifier", "span": { "start": 1853, - "end": 1874, + "end": 1854, "ctxt": 0 }, "value": "x", @@ -3775,7 +3775,7 @@ "type": "Identifier", "span": { "start": 2089, - "end": 2126, + "end": 2094, "ctxt": 0 }, "value": "input", diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowOptionalChain.json b/crates/swc_ecma_parser/tests/tsc/controlFlowOptionalChain.json index 0bb1dc01b988..6c4414e978f2 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowOptionalChain.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowOptionalChain.json @@ -1055,7 +1055,7 @@ "type": "Identifier", "span": { "start": 417, - "end": 423, + "end": 418, "ctxt": 0 }, "value": "x", @@ -1582,7 +1582,7 @@ "type": "Identifier", "span": { "start": 621, - "end": 627, + "end": 622, "ctxt": 0 }, "value": "x", @@ -5994,7 +5994,7 @@ "type": "Identifier", "span": { "start": 1840, - "end": 1848, + "end": 1845, "ctxt": 0 }, "value": "value", @@ -6196,7 +6196,7 @@ "type": "Identifier", "span": { "start": 1911, - "end": 1925, + "end": 1916, "ctxt": 0 }, "value": "value", @@ -6342,7 +6342,7 @@ "type": "Identifier", "span": { "start": 1998, - "end": 2012, + "end": 2003, "ctxt": 0 }, "value": "value", @@ -6542,7 +6542,7 @@ "type": "Identifier", "span": { "start": 2110, - "end": 2120, + "end": 2111, "ctxt": 0 }, "value": "x", @@ -7273,7 +7273,7 @@ "type": "Identifier", "span": { "start": 2485, - "end": 2505, + "end": 2486, "ctxt": 0 }, "value": "o", @@ -7338,7 +7338,7 @@ "type": "Identifier", "span": { "start": 2507, - "end": 2520, + "end": 2512, "ctxt": 0 }, "value": "value", @@ -8146,7 +8146,7 @@ "type": "Identifier", "span": { "start": 2849, - "end": 2864, + "end": 2850, "ctxt": 0 }, "value": "o", @@ -8211,7 +8211,7 @@ "type": "Identifier", "span": { "start": 2866, - "end": 2879, + "end": 2871, "ctxt": 0 }, "value": "value", @@ -9019,7 +9019,7 @@ "type": "Identifier", "span": { "start": 3208, - "end": 3228, + "end": 3209, "ctxt": 0 }, "value": "o", @@ -9084,7 +9084,7 @@ "type": "Identifier", "span": { "start": 3230, - "end": 3255, + "end": 3235, "ctxt": 0 }, "value": "value", @@ -9911,7 +9911,7 @@ "type": "Identifier", "span": { "start": 3645, - "end": 3665, + "end": 3646, "ctxt": 0 }, "value": "o", @@ -9976,7 +9976,7 @@ "type": "Identifier", "span": { "start": 3667, - "end": 3687, + "end": 3672, "ctxt": 0 }, "value": "value", @@ -10803,7 +10803,7 @@ "type": "Identifier", "span": { "start": 4046, - "end": 4066, + "end": 4047, "ctxt": 0 }, "value": "o", @@ -11640,7 +11640,7 @@ "type": "Identifier", "span": { "start": 4420, - "end": 4440, + "end": 4421, "ctxt": 0 }, "value": "o", @@ -12465,7 +12465,7 @@ "type": "Identifier", "span": { "start": 4793, - "end": 4808, + "end": 4794, "ctxt": 0 }, "value": "o", @@ -12934,7 +12934,7 @@ "type": "Identifier", "span": { "start": 4996, - "end": 5016, + "end": 4997, "ctxt": 0 }, "value": "o", @@ -12999,7 +12999,7 @@ "type": "Identifier", "span": { "start": 5018, - "end": 5031, + "end": 5023, "ctxt": 0 }, "value": "value", @@ -13695,7 +13695,7 @@ "type": "Identifier", "span": { "start": 5414, - "end": 5434, + "end": 5415, "ctxt": 0 }, "value": "o", @@ -13760,7 +13760,7 @@ "type": "Identifier", "span": { "start": 5436, - "end": 5450, + "end": 5441, "ctxt": 0 }, "value": "value", @@ -14456,7 +14456,7 @@ "type": "Identifier", "span": { "start": 5872, - "end": 5892, + "end": 5873, "ctxt": 0 }, "value": "o", @@ -15181,7 +15181,7 @@ "type": "Identifier", "span": { "start": 6290, - "end": 6310, + "end": 6291, "ctxt": 0 }, "value": "o", @@ -15788,7 +15788,7 @@ "type": "Identifier", "span": { "start": 6572, - "end": 6587, + "end": 6573, "ctxt": 0 }, "value": "o", @@ -16395,7 +16395,7 @@ "type": "Identifier", "span": { "start": 6849, - "end": 6869, + "end": 6850, "ctxt": 0 }, "value": "o", @@ -17156,7 +17156,7 @@ "type": "Identifier", "span": { "start": 7291, - "end": 7311, + "end": 7292, "ctxt": 0 }, "value": "o", @@ -17917,7 +17917,7 @@ "type": "Identifier", "span": { "start": 7756, - "end": 7766, + "end": 7757, "ctxt": 0 }, "value": "x", @@ -18007,7 +18007,7 @@ "type": "Identifier", "span": { "start": 7814, - "end": 7818, + "end": 7815, "ctxt": 0 }, "value": "x", @@ -18193,7 +18193,7 @@ "type": "Identifier", "span": { "start": 7864, - "end": 7884, + "end": 7865, "ctxt": 0 }, "value": "o", @@ -18945,7 +18945,7 @@ "type": "Identifier", "span": { "start": 8190, - "end": 8210, + "end": 8191, "ctxt": 0 }, "value": "o", @@ -19344,7 +19344,7 @@ "type": "Identifier", "span": { "start": 8508, - "end": 8528, + "end": 8509, "ctxt": 0 }, "value": "o", @@ -20025,7 +20025,7 @@ "type": "Identifier", "span": { "start": 8985, - "end": 8998, + "end": 8990, "ctxt": 0 }, "value": "shape", @@ -20591,7 +20591,7 @@ "type": "Identifier", "span": { "start": 9347, - "end": 9357, + "end": 9348, "ctxt": 0 }, "value": "f", @@ -21001,7 +21001,7 @@ "type": "Identifier", "span": { "start": 9614, - "end": 9656, + "end": 9632, "ctxt": 0 }, "value": "someOptionalObject", @@ -22216,7 +22216,7 @@ "type": "Identifier", "span": { "start": 10346, - "end": 10356, + "end": 10349, "ctxt": 0 }, "value": "obj", diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowOptionalChain2.json b/crates/swc_ecma_parser/tests/tsc/controlFlowOptionalChain2.json index 8ff9f6bdd5f2..6b217fb90f19 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowOptionalChain2.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowOptionalChain2.json @@ -233,7 +233,7 @@ "type": "Identifier", "span": { "start": 116, - "end": 138, + "end": 119, "ctxt": 0 }, "value": "arg", @@ -518,7 +518,7 @@ "type": "Identifier", "span": { "start": 244, - "end": 261, + "end": 247, "ctxt": 0 }, "value": "arg", @@ -1175,7 +1175,7 @@ "type": "Identifier", "span": { "start": 461, - "end": 481, + "end": 462, "ctxt": 0 }, "value": "x", @@ -1415,7 +1415,7 @@ "type": "Identifier", "span": { "start": 600, - "end": 620, + "end": 601, "ctxt": 0 }, "value": "x", @@ -1655,7 +1655,7 @@ "type": "Identifier", "span": { "start": 739, - "end": 754, + "end": 740, "ctxt": 0 }, "value": "x", @@ -1895,7 +1895,7 @@ "type": "Identifier", "span": { "start": 868, - "end": 883, + "end": 869, "ctxt": 0 }, "value": "x", @@ -2135,7 +2135,7 @@ "type": "Identifier", "span": { "start": 997, - "end": 1017, + "end": 998, "ctxt": 0 }, "value": "x", @@ -2373,7 +2373,7 @@ "type": "Identifier", "span": { "start": 1139, - "end": 1159, + "end": 1140, "ctxt": 0 }, "value": "x", @@ -2611,7 +2611,7 @@ "type": "Identifier", "span": { "start": 1273, - "end": 1288, + "end": 1274, "ctxt": 0 }, "value": "x", @@ -2849,7 +2849,7 @@ "type": "Identifier", "span": { "start": 1405, - "end": 1420, + "end": 1406, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowParameter.json b/crates/swc_ecma_parser/tests/tsc/controlFlowParameter.json index ce58dbb30ae3..1ded9332bacc 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowParameter.json @@ -39,7 +39,7 @@ "type": "Identifier", "span": { "start": 75, - "end": 92, + "end": 83, "ctxt": 0 }, "value": "required", @@ -255,7 +255,7 @@ "type": "Identifier", "span": { "start": 233, - "end": 263, + "end": 234, "ctxt": 0 }, "value": "a", @@ -326,7 +326,7 @@ "type": "Identifier", "span": { "start": 267, - "end": 284, + "end": 275, "ctxt": 0 }, "value": "required", @@ -503,7 +503,7 @@ "type": "Identifier", "span": { "start": 382, - "end": 412, + "end": 383, "ctxt": 0 }, "value": "a", @@ -585,7 +585,7 @@ "type": "Identifier", "span": { "start": 420, - "end": 437, + "end": 428, "ctxt": 0 }, "value": "required", @@ -762,7 +762,7 @@ "type": "Identifier", "span": { "start": 524, - "end": 554, + "end": 525, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowTruthiness.json b/crates/swc_ecma_parser/tests/tsc/controlFlowTruthiness.json index 2b194115f406..c1700435e29c 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowTruthiness.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowTruthiness.json @@ -1602,7 +1602,7 @@ "type": "Identifier", "span": { "start": 1173, - "end": 1178, + "end": 1174, "ctxt": 0 }, "value": "x", @@ -1748,7 +1748,7 @@ "type": "Identifier", "span": { "start": 1270, - "end": 1274, + "end": 1271, "ctxt": 0 }, "value": "x", @@ -1936,7 +1936,7 @@ "type": "Identifier", "span": { "start": 1381, - "end": 1385, + "end": 1382, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowTypeofObject.json b/crates/swc_ecma_parser/tests/tsc/controlFlowTypeofObject.json index 31d5d0cabe75..48117f63b751 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowTypeofObject.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowTypeofObject.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 62, - "end": 71, + "end": 63, "ctxt": 0 }, "value": "x", @@ -111,7 +111,7 @@ "type": "Identifier", "span": { "start": 93, - "end": 103, + "end": 94, "ctxt": 0 }, "value": "x", @@ -329,7 +329,7 @@ "type": "Identifier", "span": { "start": 213, - "end": 223, + "end": 214, "ctxt": 0 }, "value": "x", @@ -555,7 +555,7 @@ "type": "Identifier", "span": { "start": 341, - "end": 351, + "end": 342, "ctxt": 0 }, "value": "x", @@ -781,7 +781,7 @@ "type": "Identifier", "span": { "start": 468, - "end": 478, + "end": 469, "ctxt": 0 }, "value": "x", @@ -1009,7 +1009,7 @@ "type": "Identifier", "span": { "start": 600, - "end": 610, + "end": 601, "ctxt": 0 }, "value": "x", @@ -1337,7 +1337,7 @@ "type": "Identifier", "span": { "start": 829, - "end": 839, + "end": 830, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowWhileStatement.json b/crates/swc_ecma_parser/tests/tsc/controlFlowWhileStatement.json index de2e8ff25756..1699225f3aa9 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowWhileStatement.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowWhileStatement.json @@ -2450,7 +2450,7 @@ "type": "Identifier", "span": { "start": 1558, - "end": 1576, + "end": 1559, "ctxt": 0 }, "value": "s", diff --git a/crates/swc_ecma_parser/tests/tsc/covariantCallbacks.json b/crates/swc_ecma_parser/tests/tsc/covariantCallbacks.json index 5ba08277798e..0301ea79a490 100644 --- a/crates/swc_ecma_parser/tests/tsc/covariantCallbacks.json +++ b/crates/swc_ecma_parser/tests/tsc/covariantCallbacks.json @@ -91,7 +91,7 @@ "type": "Identifier", "span": { "start": 122, - "end": 144, + "end": 124, "ctxt": 0 }, "value": "cb", @@ -115,7 +115,7 @@ "type": "Identifier", "span": { "start": 127, - "end": 135, + "end": 132, "ctxt": 0 }, "value": "value", @@ -391,7 +391,7 @@ "type": "Identifier", "span": { "start": 232, - "end": 239, + "end": 233, "ctxt": 0 }, "value": "a", @@ -465,7 +465,7 @@ "type": "Identifier", "span": { "start": 241, - "end": 248, + "end": 242, "ctxt": 0 }, "value": "b", @@ -651,7 +651,7 @@ "type": "Identifier", "span": { "start": 299, - "end": 312, + "end": 300, "ctxt": 0 }, "value": "a", @@ -725,7 +725,7 @@ "type": "Identifier", "span": { "start": 314, - "end": 327, + "end": 315, "ctxt": 0 }, "value": "b", @@ -938,7 +938,7 @@ "type": "Identifier", "span": { "start": 397, - "end": 418, + "end": 399, "ctxt": 0 }, "value": "cb", @@ -962,7 +962,7 @@ "type": "Identifier", "span": { "start": 402, - "end": 409, + "end": 406, "ctxt": 0 }, "value": "item", @@ -1093,7 +1093,7 @@ "type": "Identifier", "span": { "start": 461, - "end": 482, + "end": 463, "ctxt": 0 }, "value": "cb", @@ -1117,7 +1117,7 @@ "type": "Identifier", "span": { "start": 466, - "end": 473, + "end": 470, "ctxt": 0 }, "value": "item", @@ -1221,7 +1221,7 @@ "type": "Identifier", "span": { "start": 507, - "end": 516, + "end": 508, "ctxt": 0 }, "value": "a", @@ -1267,7 +1267,7 @@ "type": "Identifier", "span": { "start": 518, - "end": 527, + "end": 519, "ctxt": 0 }, "value": "b", @@ -1452,7 +1452,7 @@ "type": "Identifier", "span": { "start": 597, - "end": 621, + "end": 599, "ctxt": 0 }, "value": "cb", @@ -1476,7 +1476,7 @@ "type": "Identifier", "span": { "start": 602, - "end": 609, + "end": 606, "ctxt": 0 }, "value": "item", @@ -1607,7 +1607,7 @@ "type": "Identifier", "span": { "start": 664, - "end": 685, + "end": 666, "ctxt": 0 }, "value": "cb", @@ -1631,7 +1631,7 @@ "type": "Identifier", "span": { "start": 669, - "end": 676, + "end": 673, "ctxt": 0 }, "value": "item", @@ -1735,7 +1735,7 @@ "type": "Identifier", "span": { "start": 710, - "end": 719, + "end": 711, "ctxt": 0 }, "value": "a", @@ -1781,7 +1781,7 @@ "type": "Identifier", "span": { "start": 721, - "end": 730, + "end": 722, "ctxt": 0 }, "value": "b", @@ -1966,7 +1966,7 @@ "type": "Identifier", "span": { "start": 800, - "end": 821, + "end": 802, "ctxt": 0 }, "value": "cb", @@ -1990,7 +1990,7 @@ "type": "Identifier", "span": { "start": 805, - "end": 812, + "end": 809, "ctxt": 0 }, "value": "item", @@ -2121,7 +2121,7 @@ "type": "Identifier", "span": { "start": 864, - "end": 899, + "end": 866, "ctxt": 0 }, "value": "cb", @@ -2145,7 +2145,7 @@ "type": "Identifier", "span": { "start": 869, - "end": 876, + "end": 873, "ctxt": 0 }, "value": "item", @@ -2182,7 +2182,7 @@ "type": "Identifier", "span": { "start": 878, - "end": 890, + "end": 885, "ctxt": 0 }, "value": "context", @@ -2276,7 +2276,7 @@ "type": "Identifier", "span": { "start": 924, - "end": 933, + "end": 925, "ctxt": 0 }, "value": "a", @@ -2322,7 +2322,7 @@ "type": "Identifier", "span": { "start": 935, - "end": 944, + "end": 936, "ctxt": 0 }, "value": "b", @@ -2507,7 +2507,7 @@ "type": "Identifier", "span": { "start": 1014, - "end": 1032, + "end": 1016, "ctxt": 0 }, "value": "cb", @@ -2531,7 +2531,7 @@ "type": "Identifier", "span": { "start": 1019, - "end": 1026, + "end": 1023, "ctxt": 0 }, "value": "item", @@ -2672,7 +2672,7 @@ "type": "Identifier", "span": { "start": 1075, - "end": 1093, + "end": 1077, "ctxt": 0 }, "value": "cb", @@ -2696,7 +2696,7 @@ "type": "Identifier", "span": { "start": 1080, - "end": 1087, + "end": 1084, "ctxt": 0 }, "value": "item", @@ -2810,7 +2810,7 @@ "type": "Identifier", "span": { "start": 1118, - "end": 1127, + "end": 1119, "ctxt": 0 }, "value": "a", @@ -2856,7 +2856,7 @@ "type": "Identifier", "span": { "start": 1129, - "end": 1138, + "end": 1130, "ctxt": 0 }, "value": "b", @@ -3072,7 +3072,7 @@ "type": "Identifier", "span": { "start": 1221, - "end": 1229, + "end": 1226, "ctxt": 0 }, "value": "value", @@ -3428,7 +3428,7 @@ "type": "Identifier", "span": { "start": 1346, - "end": 1356, + "end": 1347, "ctxt": 0 }, "value": "x", @@ -3551,7 +3551,7 @@ "type": "Identifier", "span": { "start": 1392, - "end": 1401, + "end": 1393, "ctxt": 0 }, "value": "x", @@ -3764,7 +3764,7 @@ "type": "Identifier", "span": { "start": 1459, - "end": 1467, + "end": 1464, "ctxt": 0 }, "value": "value", @@ -3904,7 +3904,7 @@ "type": "Identifier", "span": { "start": 1500, - "end": 1508, + "end": 1505, "ctxt": 0 }, "value": "value", @@ -4030,7 +4030,7 @@ "type": "Identifier", "span": { "start": 1545, - "end": 1555, + "end": 1546, "ctxt": 0 }, "value": "x", @@ -4153,7 +4153,7 @@ "type": "Identifier", "span": { "start": 1593, - "end": 1602, + "end": 1594, "ctxt": 0 }, "value": "x", @@ -4366,7 +4366,7 @@ "type": "Identifier", "span": { "start": 1665, - "end": 1673, + "end": 1670, "ctxt": 0 }, "value": "value", @@ -4542,7 +4542,7 @@ "type": "Identifier", "span": { "start": 1720, - "end": 1730, + "end": 1721, "ctxt": 0 }, "value": "x", @@ -4665,7 +4665,7 @@ "type": "Identifier", "span": { "start": 1768, - "end": 1777, + "end": 1769, "ctxt": 0 }, "value": "x", @@ -4878,7 +4878,7 @@ "type": "Identifier", "span": { "start": 1843, - "end": 1851, + "end": 1848, "ctxt": 0 }, "value": "value", @@ -5068,7 +5068,7 @@ "type": "Identifier", "span": { "start": 1896, - "end": 1904, + "end": 1901, "ctxt": 0 }, "value": "value", @@ -5244,7 +5244,7 @@ "type": "Identifier", "span": { "start": 1951, - "end": 1961, + "end": 1952, "ctxt": 0 }, "value": "x", @@ -5367,7 +5367,7 @@ "type": "Identifier", "span": { "start": 1999, - "end": 2008, + "end": 2000, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/declarationEmitIdentifierPredicates01.json b/crates/swc_ecma_parser/tests/tsc/declarationEmitIdentifierPredicates01.json index fd09b6716c87..dc72907e6261 100644 --- a/crates/swc_ecma_parser/tests/tsc/declarationEmitIdentifierPredicates01.json +++ b/crates/swc_ecma_parser/tests/tsc/declarationEmitIdentifierPredicates01.json @@ -39,7 +39,7 @@ "type": "Identifier", "span": { "start": 63, - "end": 69, + "end": 64, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/declarationEmitIdentifierPredicatesWithPrivateName01.json b/crates/swc_ecma_parser/tests/tsc/declarationEmitIdentifierPredicatesWithPrivateName01.json index 6a5a4b71a889..ab254177c833 100644 --- a/crates/swc_ecma_parser/tests/tsc/declarationEmitIdentifierPredicatesWithPrivateName01.json +++ b/crates/swc_ecma_parser/tests/tsc/declarationEmitIdentifierPredicatesWithPrivateName01.json @@ -111,7 +111,7 @@ "type": "Identifier", "span": { "start": 95, - "end": 101, + "end": 96, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/declarationEmitReadonly.json b/crates/swc_ecma_parser/tests/tsc/declarationEmitReadonly.json index b3d805aec441..8f4720151ca8 100644 --- a/crates/swc_ecma_parser/tests/tsc/declarationEmitReadonly.json +++ b/crates/swc_ecma_parser/tests/tsc/declarationEmitReadonly.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 59, - "end": 68, + "end": 60, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/declarationEmitWorkWithInlineComments.json b/crates/swc_ecma_parser/tests/tsc/declarationEmitWorkWithInlineComments.json index 63cd9f1979be..d9991090fd41 100644 --- a/crates/swc_ecma_parser/tests/tsc/declarationEmitWorkWithInlineComments.json +++ b/crates/swc_ecma_parser/tests/tsc/declarationEmitWorkWithInlineComments.json @@ -66,7 +66,7 @@ "type": "Identifier", "span": { "start": 113, - "end": 132, + "end": 124, "ctxt": 0 }, "value": "isInternal1", @@ -105,7 +105,7 @@ "type": "Identifier", "span": { "start": 162, - "end": 181, + "end": 173, "ctxt": 0 }, "value": "isInternal2", @@ -144,7 +144,7 @@ "type": "Identifier", "span": { "start": 211, - "end": 230, + "end": 222, "ctxt": 0 }, "value": "isInternal3", @@ -183,7 +183,7 @@ "type": "Identifier", "span": { "start": 260, - "end": 279, + "end": 271, "ctxt": 0 }, "value": "isInternal4", @@ -222,7 +222,7 @@ "type": "Identifier", "span": { "start": 328, - "end": 347, + "end": 339, "ctxt": 0 }, "value": "isInternal5", @@ -261,7 +261,7 @@ "type": "Identifier", "span": { "start": 376, - "end": 395, + "end": 387, "ctxt": 0 }, "value": "isInternal6", @@ -300,7 +300,7 @@ "type": "Identifier", "span": { "start": 439, - "end": 458, + "end": 450, "ctxt": 0 }, "value": "isInternal7", @@ -339,7 +339,7 @@ "type": "Identifier", "span": { "start": 504, - "end": 524, + "end": 516, "ctxt": 0 }, "value": "notInternal1", @@ -378,7 +378,7 @@ "type": "Identifier", "span": { "start": 573, - "end": 593, + "end": 585, "ctxt": 0 }, "value": "notInternal2", @@ -417,7 +417,7 @@ "type": "Identifier", "span": { "start": 661, - "end": 681, + "end": 673, "ctxt": 0 }, "value": "notInternal3", @@ -522,7 +522,7 @@ "type": "Identifier", "span": { "start": 750, - "end": 769, + "end": 761, "ctxt": 0 }, "value": "isInternal1", @@ -627,7 +627,7 @@ "type": "Identifier", "span": { "start": 837, - "end": 855, + "end": 847, "ctxt": 0 }, "value": "isInternal", diff --git a/crates/swc_ecma_parser/tests/tsc/declarationFiles.json b/crates/swc_ecma_parser/tests/tsc/declarationFiles.json index f3aaed9c6685..23a812e95d1d 100644 --- a/crates/swc_ecma_parser/tests/tsc/declarationFiles.json +++ b/crates/swc_ecma_parser/tests/tsc/declarationFiles.json @@ -101,7 +101,7 @@ "type": "Identifier", "span": { "start": 54, - "end": 61, + "end": 55, "ctxt": 0 }, "value": "x", @@ -216,7 +216,7 @@ "type": "Identifier", "span": { "start": 107, - "end": 114, + "end": 108, "ctxt": 0 }, "value": "x", @@ -898,7 +898,7 @@ "type": "Identifier", "span": { "start": 319, - "end": 326, + "end": 320, "ctxt": 0 }, "value": "x", @@ -987,7 +987,7 @@ "type": "Identifier", "span": { "start": 349, - "end": 356, + "end": 350, "ctxt": 0 }, "value": "x", @@ -1265,7 +1265,7 @@ "type": "Identifier", "span": { "start": 426, - "end": 432, + "end": 427, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/declarationsAndAssignments.json b/crates/swc_ecma_parser/tests/tsc/declarationsAndAssignments.json index eca139c00830..62a7b65ae80e 100644 --- a/crates/swc_ecma_parser/tests/tsc/declarationsAndAssignments.json +++ b/crates/swc_ecma_parser/tests/tsc/declarationsAndAssignments.json @@ -8597,7 +8597,7 @@ "type": "Identifier", "span": { "start": 3325, - "end": 3352, + "end": 3326, "ctxt": 0 }, "value": "v", @@ -9838,7 +9838,7 @@ "type": "Identifier", "span": { "start": 3723, - "end": 3751, + "end": 3724, "ctxt": 0 }, "value": "v", diff --git a/crates/swc_ecma_parser/tests/tsc/decoratedClassExportsCommonJS1.json b/crates/swc_ecma_parser/tests/tsc/decoratedClassExportsCommonJS1.json index 3afb34a25ad2..aaba77e06520 100644 --- a/crates/swc_ecma_parser/tests/tsc/decoratedClassExportsCommonJS1.json +++ b/crates/swc_ecma_parser/tests/tsc/decoratedClassExportsCommonJS1.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 151, - "end": 157, + "end": 152, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/decoratedClassExportsCommonJS2.json b/crates/swc_ecma_parser/tests/tsc/decoratedClassExportsCommonJS2.json index 6f65146400c6..2e17d785c851 100644 --- a/crates/swc_ecma_parser/tests/tsc/decoratedClassExportsCommonJS2.json +++ b/crates/swc_ecma_parser/tests/tsc/decoratedClassExportsCommonJS2.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 151, - "end": 157, + "end": 152, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/decoratedClassExportsSystem1.json b/crates/swc_ecma_parser/tests/tsc/decoratedClassExportsSystem1.json index 6ddfb1dde957..7e5092bb726d 100644 --- a/crates/swc_ecma_parser/tests/tsc/decoratedClassExportsSystem1.json +++ b/crates/swc_ecma_parser/tests/tsc/decoratedClassExportsSystem1.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 149, - "end": 155, + "end": 150, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/decoratedClassExportsSystem2.json b/crates/swc_ecma_parser/tests/tsc/decoratedClassExportsSystem2.json index d75cacf7a861..3eca87fa0ff6 100644 --- a/crates/swc_ecma_parser/tests/tsc/decoratedClassExportsSystem2.json +++ b/crates/swc_ecma_parser/tests/tsc/decoratedClassExportsSystem2.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 149, - "end": 155, + "end": 150, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/decoratorMetadata.json b/crates/swc_ecma_parser/tests/tsc/decoratorMetadata.json index 50c5abefbcf0..4344f23506b3 100644 --- a/crates/swc_ecma_parser/tests/tsc/decoratorMetadata.json +++ b/crates/swc_ecma_parser/tests/tsc/decoratorMetadata.json @@ -201,7 +201,7 @@ "type": "Identifier", "span": { "start": 305, - "end": 321, + "end": 312, "ctxt": 0 }, "value": "Service", @@ -279,7 +279,7 @@ "type": "Identifier", "span": { "start": 358, - "end": 365, + "end": 359, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/decoratorMetadataWithTypeOnlyImport.json b/crates/swc_ecma_parser/tests/tsc/decoratorMetadataWithTypeOnlyImport.json index 60b2843a5a28..39e1078de7d6 100644 --- a/crates/swc_ecma_parser/tests/tsc/decoratorMetadataWithTypeOnlyImport.json +++ b/crates/swc_ecma_parser/tests/tsc/decoratorMetadataWithTypeOnlyImport.json @@ -204,7 +204,7 @@ "type": "Identifier", "span": { "start": 306, - "end": 322, + "end": 313, "ctxt": 0 }, "value": "Service", @@ -282,7 +282,7 @@ "type": "Identifier", "span": { "start": 359, - "end": 366, + "end": 360, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/decoratorOnClassConstructor4.json b/crates/swc_ecma_parser/tests/tsc/decoratorOnClassConstructor4.json index 37a8e42404ab..07b7c67ea6bb 100644 --- a/crates/swc_ecma_parser/tests/tsc/decoratorOnClassConstructor4.json +++ b/crates/swc_ecma_parser/tests/tsc/decoratorOnClassConstructor4.json @@ -169,7 +169,7 @@ "type": "Identifier", "span": { "start": 175, - "end": 184, + "end": 176, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/decoratorOnClassMethod11.json b/crates/swc_ecma_parser/tests/tsc/decoratorOnClassMethod11.json index 8b9cd3f6e1a8..2b44643c5232 100644 --- a/crates/swc_ecma_parser/tests/tsc/decoratorOnClassMethod11.json +++ b/crates/swc_ecma_parser/tests/tsc/decoratorOnClassMethod11.json @@ -84,7 +84,7 @@ "type": "Identifier", "span": { "start": 93, - "end": 107, + "end": 99, "ctxt": 0 }, "value": "target", @@ -130,7 +130,7 @@ "type": "Identifier", "span": { "start": 109, - "end": 120, + "end": 112, "ctxt": 0 }, "value": "key", diff --git a/crates/swc_ecma_parser/tests/tsc/defaultExportWithOverloads01.json b/crates/swc_ecma_parser/tests/tsc/defaultExportWithOverloads01.json index 13c428264bbd..5bd0e0d6aed2 100644 --- a/crates/swc_ecma_parser/tests/tsc/defaultExportWithOverloads01.json +++ b/crates/swc_ecma_parser/tests/tsc/defaultExportWithOverloads01.json @@ -71,7 +71,7 @@ "type": "Identifier", "span": { "start": 94, - "end": 103, + "end": 95, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/defineProperty.json b/crates/swc_ecma_parser/tests/tsc/defineProperty.json index d27a8451056b..ff414eacb304 100644 --- a/crates/swc_ecma_parser/tests/tsc/defineProperty.json +++ b/crates/swc_ecma_parser/tests/tsc/defineProperty.json @@ -376,7 +376,7 @@ "type": "Identifier", "span": { "start": 201, - "end": 210, + "end": 202, "ctxt": 0 }, "value": "y", @@ -695,7 +695,7 @@ "type": "Identifier", "span": { "start": 364, - "end": 374, + "end": 366, "ctxt": 0 }, "value": "ka", diff --git a/crates/swc_ecma_parser/tests/tsc/dependentDestructuredVariables.json b/crates/swc_ecma_parser/tests/tsc/dependentDestructuredVariables.json index 76addbdf935f..2aeedeea49d8 100644 --- a/crates/swc_ecma_parser/tests/tsc/dependentDestructuredVariables.json +++ b/crates/swc_ecma_parser/tests/tsc/dependentDestructuredVariables.json @@ -575,7 +575,7 @@ "type": "Identifier", "span": { "start": 347, - "end": 361, + "end": 353, "ctxt": 0 }, "value": "action", @@ -1611,7 +1611,7 @@ "type": "Identifier", "span": { "start": 1006, - "end": 1010, + "end": 1007, "ctxt": 0 }, "value": "t", @@ -2624,7 +2624,7 @@ "type": "Identifier", "span": { "start": 1509, - "end": 1524, + "end": 1515, "ctxt": 0 }, "value": "action", @@ -3006,7 +3006,7 @@ "type": "Identifier", "span": { "start": 1749, - "end": 1764, + "end": 1755, "ctxt": 0 }, "value": "action", @@ -5468,7 +5468,7 @@ "type": "Identifier", "span": { "start": 3076, - "end": 3080, + "end": 3077, "ctxt": 0 }, "value": "t", @@ -5589,7 +5589,7 @@ "type": "Identifier", "span": { "start": 3125, - "end": 3136, + "end": 3126, "ctxt": 0 }, "value": "t", @@ -5738,7 +5738,7 @@ "type": "Identifier", "span": { "start": 3169, - "end": 3178, + "end": 3171, "ctxt": 0 }, "value": "ab", @@ -7067,7 +7067,7 @@ "type": "Identifier", "span": { "start": 3885, - "end": 3912, + "end": 3887, "ctxt": 0 }, "value": "cb", @@ -8303,7 +8303,7 @@ "type": "Identifier", "span": { "start": 4476, - "end": 4488, + "end": 4480, "ctxt": 0 }, "value": "path", @@ -8339,7 +8339,7 @@ "type": "Identifier", "span": { "start": 4490, - "end": 4579, + "end": 4498, "ctxt": 0 }, "value": "callback", @@ -10053,7 +10053,7 @@ "type": "Identifier", "span": { "start": 5345, - "end": 5354, + "end": 5346, "ctxt": 0 }, "value": "e", @@ -10174,7 +10174,7 @@ "type": "Identifier", "span": { "start": 5390, - "end": 5399, + "end": 5391, "ctxt": 0 }, "value": "e", @@ -10692,7 +10692,7 @@ "type": "Identifier", "span": { "start": 5616, - "end": 5625, + "end": 5617, "ctxt": 0 }, "value": "e", @@ -10813,7 +10813,7 @@ "type": "Identifier", "span": { "start": 5661, - "end": 5670, + "end": 5662, "ctxt": 0 }, "value": "e", @@ -11359,7 +11359,7 @@ "type": "Identifier", "span": { "start": 5909, - "end": 5918, + "end": 5910, "ctxt": 0 }, "value": "e", @@ -11480,7 +11480,7 @@ "type": "Identifier", "span": { "start": 5954, - "end": 5963, + "end": 5955, "ctxt": 0 }, "value": "e", @@ -12044,7 +12044,7 @@ "type": "Identifier", "span": { "start": 6210, - "end": 6219, + "end": 6211, "ctxt": 0 }, "value": "e", @@ -12165,7 +12165,7 @@ "type": "Identifier", "span": { "start": 6255, - "end": 6264, + "end": 6256, "ctxt": 0 }, "value": "e", @@ -13635,7 +13635,7 @@ "type": "Identifier", "span": { "start": 7067, - "end": 7102, + "end": 7068, "ctxt": 0 }, "value": "x", @@ -14021,7 +14021,7 @@ "type": "Identifier", "span": { "start": 7316, - "end": 7383, + "end": 7317, "ctxt": 0 }, "value": "x", @@ -15154,7 +15154,7 @@ "type": "Identifier", "span": { "start": 8050, - "end": 8058, + "end": 8055, "ctxt": 0 }, "value": "event", @@ -15200,7 +15200,7 @@ "type": "Identifier", "span": { "start": 8060, - "end": 8104, + "end": 8068, "ctxt": 0 }, "value": "listener", diff --git a/crates/swc_ecma_parser/tests/tsc/dependentDestructuredVariablesFromNestedPatterns.json b/crates/swc_ecma_parser/tests/tsc/dependentDestructuredVariablesFromNestedPatterns.json index 12954244b700..a50a11840690 100644 --- a/crates/swc_ecma_parser/tests/tsc/dependentDestructuredVariablesFromNestedPatterns.json +++ b/crates/swc_ecma_parser/tests/tsc/dependentDestructuredVariablesFromNestedPatterns.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 86, - "end": 133, + "end": 89, "ctxt": 0 }, "value": "arg", @@ -644,7 +644,7 @@ "type": "Identifier", "span": { "start": 391, - "end": 402, + "end": 393, "ctxt": 0 }, "value": "fn", diff --git a/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesProtectedMembers.json b/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesProtectedMembers.json index 776d1aeb627c..46ab61d9f0a0 100644 --- a/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesProtectedMembers.json +++ b/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesProtectedMembers.json @@ -335,7 +335,7 @@ "type": "Identifier", "span": { "start": 136, - "end": 147, + "end": 137, "ctxt": 0 }, "value": "a", @@ -493,7 +493,7 @@ "type": "Identifier", "span": { "start": 209, - "end": 220, + "end": 210, "ctxt": 0 }, "value": "v", @@ -592,7 +592,7 @@ "type": "Identifier", "span": { "start": 244, - "end": 255, + "end": 245, "ctxt": 0 }, "value": "a", @@ -742,7 +742,7 @@ "type": "Identifier", "span": { "start": 324, - "end": 335, + "end": 325, "ctxt": 0 }, "value": "a", @@ -900,7 +900,7 @@ "type": "Identifier", "span": { "start": 411, - "end": 422, + "end": 412, "ctxt": 0 }, "value": "v", @@ -999,7 +999,7 @@ "type": "Identifier", "span": { "start": 453, - "end": 464, + "end": 454, "ctxt": 0 }, "value": "a", @@ -1093,7 +1093,7 @@ "type": "Identifier", "span": { "start": 492, - "end": 503, + "end": 493, "ctxt": 0 }, "value": "a", @@ -1253,7 +1253,7 @@ "type": "Identifier", "span": { "start": 584, - "end": 595, + "end": 585, "ctxt": 0 }, "value": "a", @@ -1411,7 +1411,7 @@ "type": "Identifier", "span": { "start": 657, - "end": 668, + "end": 658, "ctxt": 0 }, "value": "v", @@ -1510,7 +1510,7 @@ "type": "Identifier", "span": { "start": 692, - "end": 703, + "end": 693, "ctxt": 0 }, "value": "a", @@ -1660,7 +1660,7 @@ "type": "Identifier", "span": { "start": 772, - "end": 783, + "end": 773, "ctxt": 0 }, "value": "a", @@ -1818,7 +1818,7 @@ "type": "Identifier", "span": { "start": 859, - "end": 870, + "end": 860, "ctxt": 0 }, "value": "a", @@ -1917,7 +1917,7 @@ "type": "Identifier", "span": { "start": 901, - "end": 912, + "end": 902, "ctxt": 0 }, "value": "a", @@ -2011,7 +2011,7 @@ "type": "Identifier", "span": { "start": 940, - "end": 951, + "end": 941, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesProtectedMembers2.json b/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesProtectedMembers2.json index 6f36eb6fe5e5..83979c7c2e58 100644 --- a/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesProtectedMembers2.json +++ b/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesProtectedMembers2.json @@ -335,7 +335,7 @@ "type": "Identifier", "span": { "start": 135, - "end": 146, + "end": 136, "ctxt": 0 }, "value": "a", @@ -493,7 +493,7 @@ "type": "Identifier", "span": { "start": 208, - "end": 219, + "end": 209, "ctxt": 0 }, "value": "v", @@ -592,7 +592,7 @@ "type": "Identifier", "span": { "start": 243, - "end": 254, + "end": 244, "ctxt": 0 }, "value": "a", @@ -742,7 +742,7 @@ "type": "Identifier", "span": { "start": 324, - "end": 335, + "end": 325, "ctxt": 0 }, "value": "a", @@ -900,7 +900,7 @@ "type": "Identifier", "span": { "start": 411, - "end": 422, + "end": 412, "ctxt": 0 }, "value": "v", @@ -999,7 +999,7 @@ "type": "Identifier", "span": { "start": 453, - "end": 464, + "end": 454, "ctxt": 0 }, "value": "a", @@ -1093,7 +1093,7 @@ "type": "Identifier", "span": { "start": 489, - "end": 500, + "end": 490, "ctxt": 0 }, "value": "a", @@ -1253,7 +1253,7 @@ "type": "Identifier", "span": { "start": 619, - "end": 630, + "end": 620, "ctxt": 0 }, "value": "a", @@ -1411,7 +1411,7 @@ "type": "Identifier", "span": { "start": 672, - "end": 683, + "end": 673, "ctxt": 0 }, "value": "v", @@ -1510,7 +1510,7 @@ "type": "Identifier", "span": { "start": 697, - "end": 708, + "end": 698, "ctxt": 0 }, "value": "a", @@ -1660,7 +1660,7 @@ "type": "Identifier", "span": { "start": 757, - "end": 768, + "end": 758, "ctxt": 0 }, "value": "a", @@ -1818,7 +1818,7 @@ "type": "Identifier", "span": { "start": 824, - "end": 835, + "end": 825, "ctxt": 0 }, "value": "a", @@ -1917,7 +1917,7 @@ "type": "Identifier", "span": { "start": 856, - "end": 867, + "end": 857, "ctxt": 0 }, "value": "a", @@ -2011,7 +2011,7 @@ "type": "Identifier", "span": { "start": 895, - "end": 906, + "end": 896, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesProtectedMembers3.json b/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesProtectedMembers3.json index dcfd87d83c29..5596c20496fd 100644 --- a/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesProtectedMembers3.json +++ b/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesProtectedMembers3.json @@ -335,7 +335,7 @@ "type": "Identifier", "span": { "start": 116, - "end": 127, + "end": 117, "ctxt": 0 }, "value": "a", @@ -493,7 +493,7 @@ "type": "Identifier", "span": { "start": 169, - "end": 180, + "end": 170, "ctxt": 0 }, "value": "v", @@ -592,7 +592,7 @@ "type": "Identifier", "span": { "start": 194, - "end": 205, + "end": 195, "ctxt": 0 }, "value": "a", @@ -742,7 +742,7 @@ "type": "Identifier", "span": { "start": 254, - "end": 265, + "end": 255, "ctxt": 0 }, "value": "a", @@ -900,7 +900,7 @@ "type": "Identifier", "span": { "start": 321, - "end": 332, + "end": 322, "ctxt": 0 }, "value": "v", @@ -999,7 +999,7 @@ "type": "Identifier", "span": { "start": 353, - "end": 364, + "end": 354, "ctxt": 0 }, "value": "a", @@ -1093,7 +1093,7 @@ "type": "Identifier", "span": { "start": 392, - "end": 403, + "end": 393, "ctxt": 0 }, "value": "a", @@ -1252,7 +1252,7 @@ "type": "Identifier", "span": { "start": 552, - "end": 563, + "end": 553, "ctxt": 0 }, "value": "a", @@ -1407,7 +1407,7 @@ "type": "Identifier", "span": { "start": 628, - "end": 639, + "end": 629, "ctxt": 0 }, "value": "a", @@ -1499,7 +1499,7 @@ "type": "Identifier", "span": { "start": 661, - "end": 672, + "end": 662, "ctxt": 0 }, "value": "a", @@ -1718,7 +1718,7 @@ "type": "Identifier", "span": { "start": 773, - "end": 784, + "end": 774, "ctxt": 0 }, "value": "a", @@ -1873,7 +1873,7 @@ "type": "Identifier", "span": { "start": 853, - "end": 864, + "end": 854, "ctxt": 0 }, "value": "v", @@ -1965,7 +1965,7 @@ "type": "Identifier", "span": { "start": 886, - "end": 897, + "end": 887, "ctxt": 0 }, "value": "a", @@ -2126,7 +2126,7 @@ "type": "Identifier", "span": { "start": 964, - "end": 975, + "end": 965, "ctxt": 0 }, "value": "a", @@ -2220,7 +2220,7 @@ "type": "Identifier", "span": { "start": 1003, - "end": 1014, + "end": 1004, "ctxt": 0 }, "value": "a", @@ -2429,7 +2429,7 @@ "type": "Identifier", "span": { "start": 1113, - "end": 1124, + "end": 1114, "ctxt": 0 }, "value": "a", @@ -2584,7 +2584,7 @@ "type": "Identifier", "span": { "start": 1196, - "end": 1207, + "end": 1197, "ctxt": 0 }, "value": "a", @@ -2676,7 +2676,7 @@ "type": "Identifier", "span": { "start": 1229, - "end": 1240, + "end": 1230, "ctxt": 0 }, "value": "a", @@ -2895,7 +2895,7 @@ "type": "Identifier", "span": { "start": 1348, - "end": 1359, + "end": 1349, "ctxt": 0 }, "value": "a", @@ -3050,7 +3050,7 @@ "type": "Identifier", "span": { "start": 1435, - "end": 1446, + "end": 1436, "ctxt": 0 }, "value": "v", @@ -3142,7 +3142,7 @@ "type": "Identifier", "span": { "start": 1468, - "end": 1479, + "end": 1469, "ctxt": 0 }, "value": "a", @@ -3303,7 +3303,7 @@ "type": "Identifier", "span": { "start": 1554, - "end": 1565, + "end": 1555, "ctxt": 0 }, "value": "a", @@ -3397,7 +3397,7 @@ "type": "Identifier", "span": { "start": 1593, - "end": 1604, + "end": 1594, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesPublicMembers.json b/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesPublicMembers.json index bbc37be5f301..13274bebbb87 100644 --- a/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesPublicMembers.json +++ b/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesPublicMembers.json @@ -335,7 +335,7 @@ "type": "Identifier", "span": { "start": 99, - "end": 110, + "end": 100, "ctxt": 0 }, "value": "a", @@ -493,7 +493,7 @@ "type": "Identifier", "span": { "start": 152, - "end": 163, + "end": 153, "ctxt": 0 }, "value": "v", @@ -592,7 +592,7 @@ "type": "Identifier", "span": { "start": 177, - "end": 188, + "end": 178, "ctxt": 0 }, "value": "a", @@ -742,7 +742,7 @@ "type": "Identifier", "span": { "start": 237, - "end": 248, + "end": 238, "ctxt": 0 }, "value": "a", @@ -900,7 +900,7 @@ "type": "Identifier", "span": { "start": 304, - "end": 315, + "end": 305, "ctxt": 0 }, "value": "v", @@ -999,7 +999,7 @@ "type": "Identifier", "span": { "start": 336, - "end": 347, + "end": 337, "ctxt": 0 }, "value": "a", @@ -1093,7 +1093,7 @@ "type": "Identifier", "span": { "start": 375, - "end": 386, + "end": 376, "ctxt": 0 }, "value": "a", @@ -1253,7 +1253,7 @@ "type": "Identifier", "span": { "start": 447, - "end": 458, + "end": 448, "ctxt": 0 }, "value": "a", @@ -1411,7 +1411,7 @@ "type": "Identifier", "span": { "start": 500, - "end": 511, + "end": 501, "ctxt": 0 }, "value": "v", @@ -1510,7 +1510,7 @@ "type": "Identifier", "span": { "start": 525, - "end": 536, + "end": 526, "ctxt": 0 }, "value": "a", @@ -1660,7 +1660,7 @@ "type": "Identifier", "span": { "start": 585, - "end": 596, + "end": 586, "ctxt": 0 }, "value": "a", @@ -1818,7 +1818,7 @@ "type": "Identifier", "span": { "start": 652, - "end": 663, + "end": 653, "ctxt": 0 }, "value": "a", @@ -1917,7 +1917,7 @@ "type": "Identifier", "span": { "start": 684, - "end": 695, + "end": 685, "ctxt": 0 }, "value": "a", @@ -2011,7 +2011,7 @@ "type": "Identifier", "span": { "start": 723, - "end": 734, + "end": 724, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/derivedClassTransitivity.json b/crates/swc_ecma_parser/tests/tsc/derivedClassTransitivity.json index ac168dbe14b1..f3c30520d722 100644 --- a/crates/swc_ecma_parser/tests/tsc/derivedClassTransitivity.json +++ b/crates/swc_ecma_parser/tests/tsc/derivedClassTransitivity.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 121, - "end": 130, + "end": 122, "ctxt": 0 }, "value": "x", @@ -249,7 +249,7 @@ "type": "Identifier", "span": { "start": 229, - "end": 239, + "end": 230, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/derivedClassTransitivity2.json b/crates/swc_ecma_parser/tests/tsc/derivedClassTransitivity2.json index 5da14dffe310..fccf8ffb9374 100644 --- a/crates/swc_ecma_parser/tests/tsc/derivedClassTransitivity2.json +++ b/crates/swc_ecma_parser/tests/tsc/derivedClassTransitivity2.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 121, - "end": 130, + "end": 122, "ctxt": 0 }, "value": "x", @@ -93,7 +93,7 @@ "type": "Identifier", "span": { "start": 132, - "end": 141, + "end": 133, "ctxt": 0 }, "value": "y", @@ -203,7 +203,7 @@ "type": "Identifier", "span": { "start": 178, - "end": 187, + "end": 179, "ctxt": 0 }, "value": "x", @@ -322,7 +322,7 @@ "type": "Identifier", "span": { "start": 249, - "end": 258, + "end": 250, "ctxt": 0 }, "value": "x", @@ -358,7 +358,7 @@ "type": "Identifier", "span": { "start": 260, - "end": 270, + "end": 261, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/derivedClassTransitivity3.json b/crates/swc_ecma_parser/tests/tsc/derivedClassTransitivity3.json index 2e85b2dbd817..f2458cb8b6e0 100644 --- a/crates/swc_ecma_parser/tests/tsc/derivedClassTransitivity3.json +++ b/crates/swc_ecma_parser/tests/tsc/derivedClassTransitivity3.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 124, - "end": 128, + "end": 125, "ctxt": 0 }, "value": "x", @@ -103,7 +103,7 @@ "type": "Identifier", "span": { "start": 130, - "end": 134, + "end": 131, "ctxt": 0 }, "value": "y", @@ -255,7 +255,7 @@ "type": "Identifier", "span": { "start": 177, - "end": 181, + "end": 178, "ctxt": 0 }, "value": "x", @@ -444,7 +444,7 @@ "type": "Identifier", "span": { "start": 249, - "end": 253, + "end": 250, "ctxt": 0 }, "value": "x", @@ -490,7 +490,7 @@ "type": "Identifier", "span": { "start": 255, - "end": 265, + "end": 256, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/derivedClassTransitivity4.json b/crates/swc_ecma_parser/tests/tsc/derivedClassTransitivity4.json index 9e42e3aa05ea..c5eccc4874a1 100644 --- a/crates/swc_ecma_parser/tests/tsc/derivedClassTransitivity4.json +++ b/crates/swc_ecma_parser/tests/tsc/derivedClassTransitivity4.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 152, - "end": 161, + "end": 153, "ctxt": 0 }, "value": "x", @@ -249,7 +249,7 @@ "type": "Identifier", "span": { "start": 277, - "end": 287, + "end": 278, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/derivedClassWithoutExplicitConstructor.json b/crates/swc_ecma_parser/tests/tsc/derivedClassWithoutExplicitConstructor.json index 678f42ed3453..b5ff4ca7264b 100644 --- a/crates/swc_ecma_parser/tests/tsc/derivedClassWithoutExplicitConstructor.json +++ b/crates/swc_ecma_parser/tests/tsc/derivedClassWithoutExplicitConstructor.json @@ -94,7 +94,7 @@ "type": "Identifier", "span": { "start": 41, - "end": 50, + "end": 42, "ctxt": 0 }, "value": "x", @@ -527,7 +527,7 @@ "type": "Identifier", "span": { "start": 232, - "end": 236, + "end": 233, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/derivedClassWithoutExplicitConstructor2.json b/crates/swc_ecma_parser/tests/tsc/derivedClassWithoutExplicitConstructor2.json index acc7d589c268..872961a37da4 100644 --- a/crates/swc_ecma_parser/tests/tsc/derivedClassWithoutExplicitConstructor2.json +++ b/crates/swc_ecma_parser/tests/tsc/derivedClassWithoutExplicitConstructor2.json @@ -94,7 +94,7 @@ "type": "Identifier", "span": { "start": 41, - "end": 50, + "end": 42, "ctxt": 0 }, "value": "x", @@ -130,7 +130,7 @@ "type": "Identifier", "span": { "start": 52, - "end": 62, + "end": 53, "ctxt": 0 }, "value": "y", @@ -166,7 +166,7 @@ "type": "Identifier", "span": { "start": 64, - "end": 74, + "end": 65, "ctxt": 0 }, "value": "z", @@ -225,7 +225,7 @@ "type": "Identifier", "span": { "start": 93, - "end": 102, + "end": 94, "ctxt": 0 }, "value": "x", @@ -261,7 +261,7 @@ "type": "Identifier", "span": { "start": 104, - "end": 114, + "end": 105, "ctxt": 0 }, "value": "y", @@ -320,7 +320,7 @@ "type": "Identifier", "span": { "start": 133, - "end": 142, + "end": 134, "ctxt": 0 }, "value": "x", @@ -924,7 +924,7 @@ "type": "Identifier", "span": { "start": 383, - "end": 387, + "end": 384, "ctxt": 0 }, "value": "x", @@ -970,7 +970,7 @@ "type": "Identifier", "span": { "start": 389, - "end": 394, + "end": 390, "ctxt": 0 }, "value": "y", @@ -1016,7 +1016,7 @@ "type": "Identifier", "span": { "start": 396, - "end": 401, + "end": 397, "ctxt": 0 }, "value": "z", @@ -1085,7 +1085,7 @@ "type": "Identifier", "span": { "start": 420, - "end": 424, + "end": 421, "ctxt": 0 }, "value": "x", @@ -1131,7 +1131,7 @@ "type": "Identifier", "span": { "start": 426, - "end": 431, + "end": 427, "ctxt": 0 }, "value": "y", @@ -1200,7 +1200,7 @@ "type": "Identifier", "span": { "start": 450, - "end": 454, + "end": 451, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/derivedClassWithoutExplicitConstructor3.json b/crates/swc_ecma_parser/tests/tsc/derivedClassWithoutExplicitConstructor3.json index 13e99ac923d4..37732c28a787 100644 --- a/crates/swc_ecma_parser/tests/tsc/derivedClassWithoutExplicitConstructor3.json +++ b/crates/swc_ecma_parser/tests/tsc/derivedClassWithoutExplicitConstructor3.json @@ -94,7 +94,7 @@ "type": "Identifier", "span": { "start": 105, - "end": 114, + "end": 106, "ctxt": 0 }, "value": "x", @@ -280,7 +280,7 @@ "type": "Identifier", "span": { "start": 192, - "end": 201, + "end": 193, "ctxt": 0 }, "value": "y", @@ -316,7 +316,7 @@ "type": "Identifier", "span": { "start": 203, - "end": 212, + "end": 204, "ctxt": 0 }, "value": "z", @@ -877,7 +877,7 @@ "type": "Identifier", "span": { "start": 467, - "end": 471, + "end": 468, "ctxt": 0 }, "value": "x", @@ -1129,7 +1129,7 @@ "type": "Identifier", "span": { "start": 551, - "end": 555, + "end": 552, "ctxt": 0 }, "value": "y", @@ -1175,7 +1175,7 @@ "type": "Identifier", "span": { "start": 557, - "end": 561, + "end": 558, "ctxt": 0 }, "value": "z", diff --git a/crates/swc_ecma_parser/tests/tsc/derivedInterfaceDoesNotHideBaseSignatures.json b/crates/swc_ecma_parser/tests/tsc/derivedInterfaceDoesNotHideBaseSignatures.json index ee29b45e5c54..568fd14339e8 100644 --- a/crates/swc_ecma_parser/tests/tsc/derivedInterfaceDoesNotHideBaseSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/derivedInterfaceDoesNotHideBaseSignatures.json @@ -73,7 +73,7 @@ "type": "Identifier", "span": { "start": 151, - "end": 160, + "end": 152, "ctxt": 0 }, "value": "x", @@ -206,7 +206,7 @@ "type": "Identifier", "span": { "start": 232, - "end": 241, + "end": 233, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.json b/crates/swc_ecma_parser/tests/tsc/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.json index ea18132fac06..f2692f7e2e86 100644 --- a/crates/swc_ecma_parser/tests/tsc/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.json +++ b/crates/swc_ecma_parser/tests/tsc/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 22, - "end": 38, + "end": 23, "ctxt": 0 }, "value": "x", @@ -284,7 +284,7 @@ "type": "Identifier", "span": { "start": 124, - "end": 151, + "end": 125, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringArrayBindingPatternAndAssignment2.json b/crates/swc_ecma_parser/tests/tsc/destructuringArrayBindingPatternAndAssignment2.json index b21cde86aa88..c09a0e83e60d 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringArrayBindingPatternAndAssignment2.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringArrayBindingPatternAndAssignment2.json @@ -1271,7 +1271,7 @@ "type": "Identifier", "span": { "start": 1277, - "end": 1288, + "end": 1280, "ctxt": 0 }, "value": "idx", diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringControlFlow.json b/crates/swc_ecma_parser/tests/tsc/destructuringControlFlow.json index bbcd96ec80d5..9779496611a6 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringControlFlow.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringControlFlow.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 31, - "end": 50, + "end": 34, "ctxt": 0 }, "value": "obj", @@ -358,7 +358,7 @@ "type": "Identifier", "span": { "start": 207, - "end": 237, + "end": 210, "ctxt": 0 }, "value": "obj", @@ -1134,7 +1134,7 @@ "type": "Identifier", "span": { "start": 540, - "end": 571, + "end": 543, "ctxt": 0 }, "value": "obj", diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES5.json b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES5.json index ce966356e12f..39f6bf19dbf3 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES5.json @@ -232,7 +232,7 @@ "type": "Identifier", "span": { "start": 379, - "end": 406, + "end": 380, "ctxt": 0 }, "value": "o", diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES5iterable.json b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES5iterable.json index f6c8f807a507..39301bf5e925 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES5iterable.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES5iterable.json @@ -232,7 +232,7 @@ "type": "Identifier", "span": { "start": 408, - "end": 435, + "end": 409, "ctxt": 0 }, "value": "o", diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES6.json b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES6.json index 166d5601ece3..77594b92d5b5 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES6.json @@ -232,7 +232,7 @@ "type": "Identifier", "span": { "start": 428, - "end": 455, + "end": 429, "ctxt": 0 }, "value": "o", diff --git a/crates/swc_ecma_parser/tests/tsc/directDependenceBetweenTypeAliases.json b/crates/swc_ecma_parser/tests/tsc/directDependenceBetweenTypeAliases.json index a59f01e5bd3e..4ca955b48099 100644 --- a/crates/swc_ecma_parser/tests/tsc/directDependenceBetweenTypeAliases.json +++ b/crates/swc_ecma_parser/tests/tsc/directDependenceBetweenTypeAliases.json @@ -1201,7 +1201,7 @@ "type": "Identifier", "span": { "start": 905, - "end": 911, + "end": 906, "ctxt": 0 }, "value": "v", diff --git a/crates/swc_ecma_parser/tests/tsc/discriminatedUnionInference.json b/crates/swc_ecma_parser/tests/tsc/discriminatedUnionInference.json index ba64191d0b37..194efddc3834 100644 --- a/crates/swc_ecma_parser/tests/tsc/discriminatedUnionInference.json +++ b/crates/swc_ecma_parser/tests/tsc/discriminatedUnionInference.json @@ -1037,7 +1037,7 @@ "type": "Identifier", "span": { "start": 370, - "end": 383, + "end": 374, "ctxt": 0 }, "value": "item", diff --git a/crates/swc_ecma_parser/tests/tsc/discriminatedUnionTypes1.json b/crates/swc_ecma_parser/tests/tsc/discriminatedUnionTypes1.json index d53c005f0eb0..27adeda788d8 100644 --- a/crates/swc_ecma_parser/tests/tsc/discriminatedUnionTypes1.json +++ b/crates/swc_ecma_parser/tests/tsc/discriminatedUnionTypes1.json @@ -526,7 +526,7 @@ "type": "Identifier", "span": { "start": 268, - "end": 276, + "end": 269, "ctxt": 0 }, "value": "s", @@ -1087,7 +1087,7 @@ "type": "Identifier", "span": { "start": 570, - "end": 578, + "end": 571, "ctxt": 0 }, "value": "s", @@ -1523,7 +1523,7 @@ "type": "Identifier", "span": { "start": 795, - "end": 803, + "end": 796, "ctxt": 0 }, "value": "x", @@ -1672,7 +1672,7 @@ "type": "Identifier", "span": { "start": 880, - "end": 888, + "end": 881, "ctxt": 0 }, "value": "s", @@ -2161,7 +2161,7 @@ "type": "Identifier", "span": { "start": 1139, - "end": 1147, + "end": 1140, "ctxt": 0 }, "value": "s", @@ -2959,7 +2959,7 @@ "type": "Identifier", "span": { "start": 1485, - "end": 1495, + "end": 1486, "ctxt": 0 }, "value": "m", @@ -3235,7 +3235,7 @@ "type": "Identifier", "span": { "start": 1715, - "end": 1725, + "end": 1716, "ctxt": 0 }, "value": "m", @@ -3410,7 +3410,7 @@ "type": "Identifier", "span": { "start": 1850, - "end": 1860, + "end": 1851, "ctxt": 0 }, "value": "m", @@ -3576,7 +3576,7 @@ "type": "Identifier", "span": { "start": 1932, - "end": 1942, + "end": 1933, "ctxt": 0 }, "value": "m", @@ -3622,7 +3622,7 @@ "type": "Identifier", "span": { "start": 1944, - "end": 1956, + "end": 1945, "ctxt": 0 }, "value": "x", @@ -3815,7 +3815,7 @@ "type": "Identifier", "span": { "start": 2060, - "end": 2070, + "end": 2061, "ctxt": 0 }, "value": "m", @@ -4058,7 +4058,7 @@ "type": "Identifier", "span": { "start": 2335, - "end": 2345, + "end": 2336, "ctxt": 0 }, "value": "m", @@ -4292,7 +4292,7 @@ "type": "Identifier", "span": { "start": 2618, - "end": 2628, + "end": 2619, "ctxt": 0 }, "value": "m", @@ -4478,7 +4478,7 @@ "type": "Identifier", "span": { "start": 2789, - "end": 2799, + "end": 2790, "ctxt": 0 }, "value": "m", diff --git a/crates/swc_ecma_parser/tests/tsc/discriminatedUnionTypes2.json b/crates/swc_ecma_parser/tests/tsc/discriminatedUnionTypes2.json index 820d339108e9..e9aaddff2d75 100644 --- a/crates/swc_ecma_parser/tests/tsc/discriminatedUnionTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/discriminatedUnionTypes2.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 32, - "end": 120, + "end": 33, "ctxt": 0 }, "value": "x", @@ -643,7 +643,7 @@ "type": "Identifier", "span": { "start": 268, - "end": 356, + "end": 269, "ctxt": 0 }, "value": "x", @@ -1221,7 +1221,7 @@ "type": "Identifier", "span": { "start": 549, - "end": 601, + "end": 550, "ctxt": 0 }, "value": "x", @@ -1583,7 +1583,7 @@ "type": "Identifier", "span": { "start": 670, - "end": 714, + "end": 671, "ctxt": 0 }, "value": "x", @@ -2218,7 +2218,7 @@ "type": "Identifier", "span": { "start": 854, - "end": 871, + "end": 855, "ctxt": 0 }, "value": "x", @@ -3033,7 +3033,7 @@ "type": "Identifier", "span": { "start": 1239, - "end": 1265, + "end": 1246, "ctxt": 0 }, "value": "carrier", @@ -3868,7 +3868,7 @@ "type": "Identifier", "span": { "start": 1617, - "end": 1625, + "end": 1620, "ctxt": 0 }, "value": "foo", @@ -4042,7 +4042,7 @@ "type": "Identifier", "span": { "start": 1713, - "end": 1721, + "end": 1716, "ctxt": 0 }, "value": "foo", @@ -4684,7 +4684,7 @@ "type": "Identifier", "span": { "start": 1998, - "end": 2020, + "end": 2005, "ctxt": 0 }, "value": "problem", @@ -5312,7 +5312,7 @@ "type": "Identifier", "span": { "start": 2285, - "end": 2321, + "end": 2286, "ctxt": 0 }, "value": "x", @@ -5611,7 +5611,7 @@ "type": "Identifier", "span": { "start": 2452, - "end": 2511, + "end": 2453, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/emitArrowFunction.json b/crates/swc_ecma_parser/tests/tsc/emitArrowFunction.json index 5bd78126c66b..8b9ed48101c2 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitArrowFunction.json +++ b/crates/swc_ecma_parser/tests/tsc/emitArrowFunction.json @@ -467,7 +467,7 @@ "type": "Identifier", "span": { "start": 182, - "end": 201, + "end": 186, "ctxt": 0 }, "value": "func", diff --git a/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionES6.json b/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionES6.json index 290ec180d937..9cefda54c9ef 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionES6.json @@ -467,7 +467,7 @@ "type": "Identifier", "span": { "start": 180, - "end": 199, + "end": 184, "ctxt": 0 }, "value": "func", diff --git a/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionThisCapturing.json b/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionThisCapturing.json index 1a16663887ef..408fc787e918 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionThisCapturing.json +++ b/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionThisCapturing.json @@ -276,7 +276,7 @@ "type": "Identifier", "span": { "start": 115, - "end": 134, + "end": 119, "ctxt": 0 }, "value": "func", diff --git a/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionThisCapturingES6.json b/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionThisCapturingES6.json index 66b1d64e6440..d82d4982b664 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionThisCapturingES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionThisCapturingES6.json @@ -276,7 +276,7 @@ "type": "Identifier", "span": { "start": 115, - "end": 134, + "end": 119, "ctxt": 0 }, "value": "func", diff --git a/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments01.json b/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments01.json index aaf8e21f3a48..88d7a84e7944 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments01.json +++ b/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments01.json @@ -469,7 +469,7 @@ "type": "Identifier", "span": { "start": 238, - "end": 259, + "end": 247, "ctxt": 0 }, "value": "inputFunc", diff --git a/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments01_ES6.json b/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments01_ES6.json index aaf8e21f3a48..88d7a84e7944 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments01_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments01_ES6.json @@ -469,7 +469,7 @@ "type": "Identifier", "span": { "start": 238, - "end": 259, + "end": 247, "ctxt": 0 }, "value": "inputFunc", diff --git a/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments19.json b/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments19.json index 10bf9b4a6fc6..097a4f6f24fa 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments19.json +++ b/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments19.json @@ -269,7 +269,7 @@ "type": "Identifier", "span": { "start": 406, - "end": 412, + "end": 407, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments19_ES6.json b/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments19_ES6.json index 10bf9b4a6fc6..097a4f6f24fa 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments19_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments19_ES6.json @@ -269,7 +269,7 @@ "type": "Identifier", "span": { "start": 406, - "end": 412, + "end": 407, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationOverloadInES6.json b/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationOverloadInES6.json index 7625eefaff5e..2c0ea509f9d1 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationOverloadInES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationOverloadInES6.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 43, - "end": 49, + "end": 44, "ctxt": 0 }, "value": "y", @@ -115,7 +115,7 @@ "type": "Identifier", "span": { "start": 67, - "end": 76, + "end": 68, "ctxt": 0 }, "value": "x", @@ -209,7 +209,7 @@ "type": "Identifier", "span": { "start": 115, - "end": 121, + "end": 116, "ctxt": 0 }, "value": "y", @@ -268,7 +268,7 @@ "type": "Identifier", "span": { "start": 139, - "end": 148, + "end": 140, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithConstructorInES6.json b/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithConstructorInES6.json index ab4a3eadeabe..ac59116fe08c 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithConstructorInES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithConstructorInES6.json @@ -101,7 +101,7 @@ "type": "Identifier", "span": { "start": 58, - "end": 67, + "end": 59, "ctxt": 0 }, "value": "x", @@ -169,7 +169,7 @@ "type": "Identifier", "span": { "start": 85, - "end": 91, + "end": 86, "ctxt": 0 }, "value": "a", @@ -460,7 +460,7 @@ "type": "Identifier", "span": { "start": 196, - "end": 205, + "end": 197, "ctxt": 0 }, "value": "x", @@ -743,7 +743,7 @@ "type": "Identifier", "span": { "start": 292, - "end": 301, + "end": 293, "ctxt": 0 }, "value": "z", @@ -779,7 +779,7 @@ "type": "Identifier", "span": { "start": 303, - "end": 312, + "end": 304, "ctxt": 0 }, "value": "v", diff --git a/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithExtensionAndTypeArgumentInES6.json b/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithExtensionAndTypeArgumentInES6.json index 16a9b1261499..dd8b5603b176 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithExtensionAndTypeArgumentInES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithExtensionAndTypeArgumentInES6.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 46, - "end": 50, + "end": 47, "ctxt": 0 }, "value": "a", @@ -245,7 +245,7 @@ "type": "Identifier", "span": { "start": 132, - "end": 138, + "end": 133, "ctxt": 0 }, "value": "a", @@ -304,7 +304,7 @@ "type": "Identifier", "span": { "start": 156, - "end": 165, + "end": 157, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithExtensionInES6.json b/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithExtensionInES6.json index 698658518972..6efb61bfcadf 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithExtensionInES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithExtensionInES6.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 35, - "end": 44, + "end": 36, "ctxt": 0 }, "value": "a", @@ -251,7 +251,7 @@ "type": "Identifier", "span": { "start": 102, - "end": 111, + "end": 103, "ctxt": 0 }, "value": "a", @@ -287,7 +287,7 @@ "type": "Identifier", "span": { "start": 113, - "end": 121, + "end": 114, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithGetterSetterInES6.json b/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithGetterSetterInES6.json index cb86ab33c2f2..6554660c33b1 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithGetterSetterInES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithGetterSetterInES6.json @@ -507,7 +507,7 @@ "type": "Identifier", "span": { "start": 362, - "end": 368, + "end": 363, "ctxt": 0 }, "value": "x", @@ -598,7 +598,7 @@ "type": "Identifier", "span": { "start": 404, - "end": 413, + "end": 405, "ctxt": 0 }, "value": "y", @@ -681,7 +681,7 @@ "type": "Identifier", "span": { "start": 436, - "end": 445, + "end": 437, "ctxt": 0 }, "value": "a", @@ -764,7 +764,7 @@ "type": "Identifier", "span": { "start": 470, - "end": 479, + "end": 471, "ctxt": 0 }, "value": "b", @@ -855,7 +855,7 @@ "type": "Identifier", "span": { "start": 517, - "end": 526, + "end": 518, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithMethodInES6.json b/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithMethodInES6.json index 37622d38bb4a..0d9146883641 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithMethodInES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithMethodInES6.json @@ -210,7 +210,7 @@ "type": "Identifier", "span": { "start": 108, - "end": 117, + "end": 109, "ctxt": 0 }, "value": "a", @@ -301,7 +301,7 @@ "type": "Identifier", "span": { "start": 145, - "end": 154, + "end": 146, "ctxt": 0 }, "value": "a", @@ -516,7 +516,7 @@ "type": "Identifier", "span": { "start": 239, - "end": 245, + "end": 240, "ctxt": 0 }, "value": "a", @@ -552,7 +552,7 @@ "type": "Identifier", "span": { "start": 247, - "end": 256, + "end": 248, "ctxt": 0 }, "value": "x", @@ -732,7 +732,7 @@ "type": "Identifier", "span": { "start": 362, - "end": 371, + "end": 363, "ctxt": 0 }, "value": "a", @@ -823,7 +823,7 @@ "type": "Identifier", "span": { "start": 406, - "end": 415, + "end": 407, "ctxt": 0 }, "value": "a", @@ -1066,7 +1066,7 @@ "type": "Identifier", "span": { "start": 532, - "end": 541, + "end": 533, "ctxt": 0 }, "value": "a", @@ -1149,7 +1149,7 @@ "type": "Identifier", "span": { "start": 562, - "end": 571, + "end": 563, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithThisKeywordInES6.json b/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithThisKeywordInES6.json index ba9d6c23e978..d2dc70128964 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithThisKeywordInES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithThisKeywordInES6.json @@ -179,7 +179,7 @@ "type": "Identifier", "span": { "start": 101, - "end": 110, + "end": 102, "ctxt": 0 }, "value": "a", @@ -466,7 +466,7 @@ "type": "Identifier", "span": { "start": 213, - "end": 222, + "end": 214, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithTypeArgumentAndOverloadInES6.json b/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithTypeArgumentAndOverloadInES6.json index 2175db910e2c..57599b483bed 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithTypeArgumentAndOverloadInES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithTypeArgumentAndOverloadInES6.json @@ -166,7 +166,7 @@ "type": "Identifier", "span": { "start": 67, - "end": 73, + "end": 68, "ctxt": 0 }, "value": "a", @@ -225,7 +225,7 @@ "type": "Identifier", "span": { "start": 91, - "end": 97, + "end": 92, "ctxt": 0 }, "value": "a", @@ -261,7 +261,7 @@ "type": "Identifier", "span": { "start": 98, - "end": 102, + "end": 99, "ctxt": 0 }, "value": "b", @@ -330,7 +330,7 @@ "type": "Identifier", "span": { "start": 120, - "end": 124, + "end": 121, "ctxt": 0 }, "value": "a", @@ -462,7 +462,7 @@ "type": "Identifier", "span": { "start": 150, - "end": 154, + "end": 151, "ctxt": 0 }, "value": "a", @@ -547,7 +547,7 @@ "type": "Identifier", "span": { "start": 164, - "end": 170, + "end": 165, "ctxt": 0 }, "value": "a", @@ -622,7 +622,7 @@ "type": "Identifier", "span": { "start": 180, - "end": 189, + "end": 181, "ctxt": 0 }, "value": "b", @@ -911,7 +911,7 @@ "type": "Identifier", "span": { "start": 298, - "end": 302, + "end": 299, "ctxt": 0 }, "value": "c", diff --git a/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithTypeArgumentInES6.json b/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithTypeArgumentInES6.json index 67e1e5fcfd2b..2b50954f46b8 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithTypeArgumentInES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithTypeArgumentInES6.json @@ -166,7 +166,7 @@ "type": "Identifier", "span": { "start": 66, - "end": 70, + "end": 67, "ctxt": 0 }, "value": "a", @@ -512,7 +512,7 @@ "type": "Identifier", "span": { "start": 193, - "end": 197, + "end": 194, "ctxt": 0 }, "value": "c", diff --git a/crates/swc_ecma_parser/tests/tsc/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.json b/crates/swc_ecma_parser/tests/tsc/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.json index 36f705c6efb5..43d8f5080f97 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.json +++ b/crates/swc_ecma_parser/tests/tsc/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.json @@ -74,7 +74,7 @@ "type": "Identifier", "span": { "start": 63, - "end": 74, + "end": 66, "ctxt": 0 }, "value": "max", diff --git a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunction.json b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunction.json index 9c7f8625d28b..e641584754c3 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunction.json +++ b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunction.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 30, - "end": 39, + "end": 31, "ctxt": 0 }, "value": "x", @@ -141,7 +141,7 @@ "type": "Identifier", "span": { "start": 66, - "end": 75, + "end": 67, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionES6.json b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionES6.json index 03b909d1a1f5..16dbe06f2c81 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionES6.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 29, - "end": 38, + "end": 30, "ctxt": 0 }, "value": "x", @@ -141,7 +141,7 @@ "type": "Identifier", "span": { "start": 65, - "end": 74, + "end": 66, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionExpression.json b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionExpression.json index e3fadf784f0a..ffa7c1b204c3 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionExpression.json +++ b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionExpression.json @@ -817,7 +817,7 @@ "type": "Identifier", "span": { "start": 321, - "end": 332, + "end": 324, "ctxt": 0 }, "value": "num", diff --git a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionExpressionES6.json b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionExpressionES6.json index 6247e87c3310..eaf1749eeaa1 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionExpressionES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionExpressionES6.json @@ -817,7 +817,7 @@ "type": "Identifier", "span": { "start": 320, - "end": 331, + "end": 323, "ctxt": 0 }, "value": "num", diff --git a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionProperty.json b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionProperty.json index 5b4fecbc9523..1e43483f65fa 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionProperty.json +++ b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionProperty.json @@ -245,7 +245,7 @@ "type": "Identifier", "span": { "start": 100, - "end": 109, + "end": 101, "ctxt": 0 }, "value": "x", @@ -281,7 +281,7 @@ "type": "Identifier", "span": { "start": 111, - "end": 120, + "end": 112, "ctxt": 0 }, "value": "z", @@ -389,7 +389,7 @@ "type": "Identifier", "span": { "start": 150, - "end": 159, + "end": 151, "ctxt": 0 }, "value": "x", @@ -425,7 +425,7 @@ "type": "Identifier", "span": { "start": 161, - "end": 170, + "end": 162, "ctxt": 0 }, "value": "z", diff --git a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionPropertyES6.json b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionPropertyES6.json index 962447c5bf24..f246d553dfbd 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionPropertyES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionPropertyES6.json @@ -245,7 +245,7 @@ "type": "Identifier", "span": { "start": 99, - "end": 108, + "end": 100, "ctxt": 0 }, "value": "x", @@ -281,7 +281,7 @@ "type": "Identifier", "span": { "start": 110, - "end": 119, + "end": 111, "ctxt": 0 }, "value": "z", @@ -389,7 +389,7 @@ "type": "Identifier", "span": { "start": 149, - "end": 158, + "end": 150, "ctxt": 0 }, "value": "x", @@ -425,7 +425,7 @@ "type": "Identifier", "span": { "start": 160, - "end": 169, + "end": 161, "ctxt": 0 }, "value": "z", diff --git a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersMethod.json b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersMethod.json index 8e676e0962b8..1ff44848e5a6 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersMethod.json +++ b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersMethod.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 43, - "end": 53, + "end": 44, "ctxt": 0 }, "value": "t", @@ -92,7 +92,7 @@ "type": "Identifier", "span": { "start": 55, - "end": 64, + "end": 56, "ctxt": 0 }, "value": "z", @@ -128,7 +128,7 @@ "type": "Identifier", "span": { "start": 66, - "end": 75, + "end": 67, "ctxt": 0 }, "value": "x", @@ -234,7 +234,7 @@ "type": "Identifier", "span": { "start": 110, - "end": 119, + "end": 111, "ctxt": 0 }, "value": "x", @@ -354,7 +354,7 @@ "type": "Identifier", "span": { "start": 152, - "end": 161, + "end": 153, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersMethodES6.json b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersMethodES6.json index 0c1cccbdd3ce..94cd601d9a8b 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersMethodES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersMethodES6.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 42, - "end": 52, + "end": 43, "ctxt": 0 }, "value": "t", @@ -92,7 +92,7 @@ "type": "Identifier", "span": { "start": 54, - "end": 63, + "end": 55, "ctxt": 0 }, "value": "z", @@ -128,7 +128,7 @@ "type": "Identifier", "span": { "start": 65, - "end": 74, + "end": 66, "ctxt": 0 }, "value": "x", @@ -234,7 +234,7 @@ "type": "Identifier", "span": { "start": 109, - "end": 118, + "end": 110, "ctxt": 0 }, "value": "x", @@ -354,7 +354,7 @@ "type": "Identifier", "span": { "start": 151, - "end": 160, + "end": 152, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/emitRestParametersFunction.json b/crates/swc_ecma_parser/tests/tsc/emitRestParametersFunction.json index f080d2c61f1f..ea08e3db3d26 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitRestParametersFunction.json +++ b/crates/swc_ecma_parser/tests/tsc/emitRestParametersFunction.json @@ -101,7 +101,7 @@ "type": "Identifier", "span": { "start": 56, - "end": 65, + "end": 57, "ctxt": 0 }, "value": "x", @@ -137,7 +137,7 @@ "type": "Identifier", "span": { "start": 67, - "end": 76, + "end": 68, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/emitRestParametersFunctionES6.json b/crates/swc_ecma_parser/tests/tsc/emitRestParametersFunctionES6.json index f080d2c61f1f..ea08e3db3d26 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitRestParametersFunctionES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitRestParametersFunctionES6.json @@ -101,7 +101,7 @@ "type": "Identifier", "span": { "start": 56, - "end": 65, + "end": 57, "ctxt": 0 }, "value": "x", @@ -137,7 +137,7 @@ "type": "Identifier", "span": { "start": 67, - "end": 76, + "end": 68, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/emitRestParametersMethod.json b/crates/swc_ecma_parser/tests/tsc/emitRestParametersMethod.json index 476a1ebe7e9c..19ac57a3d026 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitRestParametersMethod.json +++ b/crates/swc_ecma_parser/tests/tsc/emitRestParametersMethod.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 43, - "end": 55, + "end": 47, "ctxt": 0 }, "value": "name", @@ -239,7 +239,7 @@ "type": "Identifier", "span": { "start": 114, - "end": 123, + "end": 115, "ctxt": 0 }, "value": "x", @@ -529,7 +529,7 @@ "type": "Identifier", "span": { "start": 224, - "end": 233, + "end": 225, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/emitRestParametersMethodES6.json b/crates/swc_ecma_parser/tests/tsc/emitRestParametersMethodES6.json index 476a1ebe7e9c..19ac57a3d026 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitRestParametersMethodES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitRestParametersMethodES6.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 43, - "end": 55, + "end": 47, "ctxt": 0 }, "value": "name", @@ -239,7 +239,7 @@ "type": "Identifier", "span": { "start": 114, - "end": 123, + "end": 115, "ctxt": 0 }, "value": "x", @@ -529,7 +529,7 @@ "type": "Identifier", "span": { "start": 224, - "end": 233, + "end": 225, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/emitStatementsBeforeSuperCall.json b/crates/swc_ecma_parser/tests/tsc/emitStatementsBeforeSuperCall.json index b47fb03dec3b..941a5932b360 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitStatementsBeforeSuperCall.json +++ b/crates/swc_ecma_parser/tests/tsc/emitStatementsBeforeSuperCall.json @@ -85,7 +85,7 @@ "type": "Identifier", "span": { "start": 137, - "end": 146, + "end": 138, "ctxt": 0 }, "value": "p", @@ -361,7 +361,7 @@ "type": "Identifier", "span": { "start": 331, - "end": 340, + "end": 332, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/emitStatementsBeforeSuperCallWithDefineFields.json b/crates/swc_ecma_parser/tests/tsc/emitStatementsBeforeSuperCallWithDefineFields.json index 17c44b4f24f1..b80e9c07dd6e 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitStatementsBeforeSuperCallWithDefineFields.json +++ b/crates/swc_ecma_parser/tests/tsc/emitStatementsBeforeSuperCallWithDefineFields.json @@ -85,7 +85,7 @@ "type": "Identifier", "span": { "start": 136, - "end": 145, + "end": 137, "ctxt": 0 }, "value": "p", @@ -361,7 +361,7 @@ "type": "Identifier", "span": { "start": 302, - "end": 311, + "end": 303, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/enumAssignability.json b/crates/swc_ecma_parser/tests/tsc/enumAssignability.json index 0d598a1484dd..ca282fb84a69 100644 --- a/crates/swc_ecma_parser/tests/tsc/enumAssignability.json +++ b/crates/swc_ecma_parser/tests/tsc/enumAssignability.json @@ -1476,7 +1476,7 @@ "type": "Identifier", "span": { "start": 620, - "end": 629, + "end": 621, "ctxt": 0 }, "value": "x", @@ -1822,7 +1822,7 @@ "type": "Identifier", "span": { "start": 742, - "end": 746, + "end": 743, "ctxt": 0 }, "value": "x", @@ -2095,7 +2095,7 @@ "type": "Identifier", "span": { "start": 885, - "end": 889, + "end": 886, "ctxt": 0 }, "value": "x", @@ -2141,7 +2141,7 @@ "type": "Identifier", "span": { "start": 891, - "end": 895, + "end": 892, "ctxt": 0 }, "value": "y", @@ -2187,7 +2187,7 @@ "type": "Identifier", "span": { "start": 897, - "end": 901, + "end": 898, "ctxt": 0 }, "value": "z", diff --git a/crates/swc_ecma_parser/tests/tsc/enumAssignabilityInInheritance.json b/crates/swc_ecma_parser/tests/tsc/enumAssignabilityInInheritance.json index 2145b31ca709..dfac35df02c3 100644 --- a/crates/swc_ecma_parser/tests/tsc/enumAssignabilityInInheritance.json +++ b/crates/swc_ecma_parser/tests/tsc/enumAssignabilityInInheritance.json @@ -221,7 +221,7 @@ "type": "Identifier", "span": { "start": 227, - "end": 231, + "end": 228, "ctxt": 0 }, "value": "x", @@ -320,7 +320,7 @@ "type": "Identifier", "span": { "start": 258, - "end": 267, + "end": 259, "ctxt": 0 }, "value": "x", @@ -399,7 +399,7 @@ "type": "Identifier", "span": { "start": 299, - "end": 305, + "end": 300, "ctxt": 0 }, "value": "x", @@ -709,7 +709,7 @@ "type": "Identifier", "span": { "start": 418, - "end": 427, + "end": 419, "ctxt": 0 }, "value": "x", @@ -788,7 +788,7 @@ "type": "Identifier", "span": { "start": 460, - "end": 464, + "end": 461, "ctxt": 0 }, "value": "x", @@ -971,7 +971,7 @@ "type": "Identifier", "span": { "start": 514, - "end": 524, + "end": 515, "ctxt": 0 }, "value": "x", @@ -1050,7 +1050,7 @@ "type": "Identifier", "span": { "start": 558, - "end": 562, + "end": 559, "ctxt": 0 }, "value": "x", @@ -1233,7 +1233,7 @@ "type": "Identifier", "span": { "start": 612, - "end": 619, + "end": 613, "ctxt": 0 }, "value": "x", @@ -1332,7 +1332,7 @@ "type": "Identifier", "span": { "start": 650, - "end": 654, + "end": 651, "ctxt": 0 }, "value": "x", @@ -1515,7 +1515,7 @@ "type": "Identifier", "span": { "start": 704, - "end": 713, + "end": 705, "ctxt": 0 }, "value": "x", @@ -1614,7 +1614,7 @@ "type": "Identifier", "span": { "start": 746, - "end": 750, + "end": 747, "ctxt": 0 }, "value": "x", @@ -1797,7 +1797,7 @@ "type": "Identifier", "span": { "start": 800, - "end": 818, + "end": 801, "ctxt": 0 }, "value": "x", @@ -1960,7 +1960,7 @@ "type": "Identifier", "span": { "start": 860, - "end": 864, + "end": 861, "ctxt": 0 }, "value": "x", @@ -2143,7 +2143,7 @@ "type": "Identifier", "span": { "start": 914, - "end": 925, + "end": 915, "ctxt": 0 }, "value": "x", @@ -2238,7 +2238,7 @@ "type": "Identifier", "span": { "start": 960, - "end": 964, + "end": 961, "ctxt": 0 }, "value": "x", @@ -2493,7 +2493,7 @@ "type": "Identifier", "span": { "start": 1044, - "end": 1049, + "end": 1045, "ctxt": 0 }, "value": "x", @@ -2592,7 +2592,7 @@ "type": "Identifier", "span": { "start": 1078, - "end": 1082, + "end": 1079, "ctxt": 0 }, "value": "x", @@ -2847,7 +2847,7 @@ "type": "Identifier", "span": { "start": 1157, - "end": 1161, + "end": 1158, "ctxt": 0 }, "value": "x", @@ -2946,7 +2946,7 @@ "type": "Identifier", "span": { "start": 1189, - "end": 1193, + "end": 1190, "ctxt": 0 }, "value": "x", @@ -3243,7 +3243,7 @@ "type": "Identifier", "span": { "start": 1268, - "end": 1281, + "end": 1269, "ctxt": 0 }, "value": "x", @@ -3378,7 +3378,7 @@ "type": "Identifier", "span": { "start": 1319, - "end": 1323, + "end": 1320, "ctxt": 0 }, "value": "x", @@ -3561,7 +3561,7 @@ "type": "Identifier", "span": { "start": 1375, - "end": 1391, + "end": 1376, "ctxt": 0 }, "value": "x", @@ -3700,7 +3700,7 @@ "type": "Identifier", "span": { "start": 1432, - "end": 1436, + "end": 1433, "ctxt": 0 }, "value": "x", @@ -3883,7 +3883,7 @@ "type": "Identifier", "span": { "start": 1488, - "end": 1505, + "end": 1489, "ctxt": 0 }, "value": "x", @@ -3907,7 +3907,7 @@ "type": "Identifier", "span": { "start": 1495, - "end": 1499, + "end": 1496, "ctxt": 0 }, "value": "x", @@ -4035,7 +4035,7 @@ "type": "Identifier", "span": { "start": 1512, - "end": 1516, + "end": 1513, "ctxt": 0 }, "value": "x", @@ -4158,7 +4158,7 @@ "type": "Identifier", "span": { "start": 1547, - "end": 1551, + "end": 1548, "ctxt": 0 }, "value": "x", @@ -4382,7 +4382,7 @@ "type": "Identifier", "span": { "start": 1617, - "end": 1622, + "end": 1618, "ctxt": 0 }, "value": "x", @@ -4481,7 +4481,7 @@ "type": "Identifier", "span": { "start": 1652, - "end": 1656, + "end": 1653, "ctxt": 0 }, "value": "x", @@ -4778,7 +4778,7 @@ "type": "Identifier", "span": { "start": 1762, - "end": 1773, + "end": 1763, "ctxt": 0 }, "value": "x", @@ -4877,7 +4877,7 @@ "type": "Identifier", "span": { "start": 1809, - "end": 1813, + "end": 1810, "ctxt": 0 }, "value": "x", @@ -5212,7 +5212,7 @@ "type": "Identifier", "span": { "start": 1928, - "end": 1933, + "end": 1929, "ctxt": 0 }, "value": "x", @@ -5311,7 +5311,7 @@ "type": "Identifier", "span": { "start": 1963, - "end": 1967, + "end": 1964, "ctxt": 0 }, "value": "x", @@ -5494,7 +5494,7 @@ "type": "Identifier", "span": { "start": 2019, - "end": 2028, + "end": 2020, "ctxt": 0 }, "value": "x", @@ -5593,7 +5593,7 @@ "type": "Identifier", "span": { "start": 2062, - "end": 2066, + "end": 2063, "ctxt": 0 }, "value": "x", @@ -5776,7 +5776,7 @@ "type": "Identifier", "span": { "start": 2118, - "end": 2123, + "end": 2119, "ctxt": 0 }, "value": "x", @@ -5855,7 +5855,7 @@ "type": "Identifier", "span": { "start": 2153, - "end": 2157, + "end": 2154, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/enumIsNotASubtypeOfAnythingButNumber.json b/crates/swc_ecma_parser/tests/tsc/enumIsNotASubtypeOfAnythingButNumber.json index 507fee5b18a4..a0db9c7d70a5 100644 --- a/crates/swc_ecma_parser/tests/tsc/enumIsNotASubtypeOfAnythingButNumber.json +++ b/crates/swc_ecma_parser/tests/tsc/enumIsNotASubtypeOfAnythingButNumber.json @@ -2115,7 +2115,7 @@ "type": "Identifier", "span": { "start": 869, - "end": 873, + "end": 870, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/enumLiteralTypes1.json b/crates/swc_ecma_parser/tests/tsc/enumLiteralTypes1.json index 6dd77917e0a9..2a2bfa719ce2 100644 --- a/crates/swc_ecma_parser/tests/tsc/enumLiteralTypes1.json +++ b/crates/swc_ecma_parser/tests/tsc/enumLiteralTypes1.json @@ -814,7 +814,7 @@ "type": "Identifier", "span": { "start": 315, - "end": 323, + "end": 316, "ctxt": 0 }, "value": "a", @@ -860,7 +860,7 @@ "type": "Identifier", "span": { "start": 325, - "end": 340, + "end": 326, "ctxt": 0 }, "value": "b", @@ -906,7 +906,7 @@ "type": "Identifier", "span": { "start": 342, - "end": 351, + "end": 343, "ctxt": 0 }, "value": "c", @@ -1102,7 +1102,7 @@ "type": "Identifier", "span": { "start": 403, - "end": 416, + "end": 404, "ctxt": 0 }, "value": "a", @@ -1161,7 +1161,7 @@ "type": "Identifier", "span": { "start": 418, - "end": 426, + "end": 419, "ctxt": 0 }, "value": "b", @@ -2372,7 +2372,7 @@ "type": "Identifier", "span": { "start": 805, - "end": 818, + "end": 806, "ctxt": 0 }, "value": "a", @@ -2431,7 +2431,7 @@ "type": "Identifier", "span": { "start": 820, - "end": 828, + "end": 821, "ctxt": 0 }, "value": "b", @@ -2569,7 +2569,7 @@ "type": "Identifier", "span": { "start": 872, - "end": 885, + "end": 873, "ctxt": 0 }, "value": "x", @@ -2671,7 +2671,7 @@ "type": "Identifier", "span": { "start": 915, - "end": 927, + "end": 916, "ctxt": 0 }, "value": "x", @@ -2773,7 +2773,7 @@ "type": "Identifier", "span": { "start": 958, - "end": 967, + "end": 959, "ctxt": 0 }, "value": "x", @@ -2862,7 +2862,7 @@ "type": "Identifier", "span": { "start": 991, - "end": 999, + "end": 992, "ctxt": 0 }, "value": "a", @@ -2908,7 +2908,7 @@ "type": "Identifier", "span": { "start": 1001, - "end": 1016, + "end": 1002, "ctxt": 0 }, "value": "b", @@ -2954,7 +2954,7 @@ "type": "Identifier", "span": { "start": 1018, - "end": 1027, + "end": 1019, "ctxt": 0 }, "value": "c", @@ -3402,7 +3402,7 @@ "type": "Identifier", "span": { "start": 1167, - "end": 1175, + "end": 1168, "ctxt": 0 }, "value": "x", @@ -3532,7 +3532,7 @@ "type": "Identifier", "span": { "start": 1243, - "end": 1251, + "end": 1244, "ctxt": 0 }, "value": "x", @@ -3746,7 +3746,7 @@ "type": "Identifier", "span": { "start": 1374, - "end": 1382, + "end": 1375, "ctxt": 0 }, "value": "x", @@ -4002,7 +4002,7 @@ "type": "Identifier", "span": { "start": 1532, - "end": 1547, + "end": 1533, "ctxt": 0 }, "value": "x", @@ -4158,7 +4158,7 @@ "type": "Identifier", "span": { "start": 1625, - "end": 1640, + "end": 1626, "ctxt": 0 }, "value": "x", @@ -4611,7 +4611,7 @@ "type": "Identifier", "span": { "start": 1820, - "end": 1827, + "end": 1821, "ctxt": 0 }, "value": "x", @@ -4879,7 +4879,7 @@ "type": "Identifier", "span": { "start": 1948, - "end": 1955, + "end": 1949, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/enumLiteralTypes2.json b/crates/swc_ecma_parser/tests/tsc/enumLiteralTypes2.json index 53ccc2c7c5f4..44db6dcb8887 100644 --- a/crates/swc_ecma_parser/tests/tsc/enumLiteralTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/enumLiteralTypes2.json @@ -814,7 +814,7 @@ "type": "Identifier", "span": { "start": 343, - "end": 351, + "end": 344, "ctxt": 0 }, "value": "a", @@ -860,7 +860,7 @@ "type": "Identifier", "span": { "start": 353, - "end": 368, + "end": 354, "ctxt": 0 }, "value": "b", @@ -906,7 +906,7 @@ "type": "Identifier", "span": { "start": 370, - "end": 379, + "end": 371, "ctxt": 0 }, "value": "c", @@ -1102,7 +1102,7 @@ "type": "Identifier", "span": { "start": 431, - "end": 444, + "end": 432, "ctxt": 0 }, "value": "a", @@ -1161,7 +1161,7 @@ "type": "Identifier", "span": { "start": 446, - "end": 461, + "end": 447, "ctxt": 0 }, "value": "b", @@ -2372,7 +2372,7 @@ "type": "Identifier", "span": { "start": 840, - "end": 853, + "end": 841, "ctxt": 0 }, "value": "a", @@ -2431,7 +2431,7 @@ "type": "Identifier", "span": { "start": 855, - "end": 870, + "end": 856, "ctxt": 0 }, "value": "b", @@ -2569,7 +2569,7 @@ "type": "Identifier", "span": { "start": 914, - "end": 927, + "end": 915, "ctxt": 0 }, "value": "x", @@ -2671,7 +2671,7 @@ "type": "Identifier", "span": { "start": 957, - "end": 969, + "end": 958, "ctxt": 0 }, "value": "x", @@ -2773,7 +2773,7 @@ "type": "Identifier", "span": { "start": 1000, - "end": 1009, + "end": 1001, "ctxt": 0 }, "value": "x", @@ -2862,7 +2862,7 @@ "type": "Identifier", "span": { "start": 1033, - "end": 1041, + "end": 1034, "ctxt": 0 }, "value": "a", @@ -2908,7 +2908,7 @@ "type": "Identifier", "span": { "start": 1043, - "end": 1058, + "end": 1044, "ctxt": 0 }, "value": "b", @@ -2954,7 +2954,7 @@ "type": "Identifier", "span": { "start": 1060, - "end": 1069, + "end": 1061, "ctxt": 0 }, "value": "c", @@ -3402,7 +3402,7 @@ "type": "Identifier", "span": { "start": 1209, - "end": 1217, + "end": 1210, "ctxt": 0 }, "value": "x", @@ -3532,7 +3532,7 @@ "type": "Identifier", "span": { "start": 1285, - "end": 1293, + "end": 1286, "ctxt": 0 }, "value": "x", @@ -3746,7 +3746,7 @@ "type": "Identifier", "span": { "start": 1416, - "end": 1424, + "end": 1417, "ctxt": 0 }, "value": "x", @@ -4002,7 +4002,7 @@ "type": "Identifier", "span": { "start": 1574, - "end": 1589, + "end": 1575, "ctxt": 0 }, "value": "x", @@ -4158,7 +4158,7 @@ "type": "Identifier", "span": { "start": 1667, - "end": 1682, + "end": 1668, "ctxt": 0 }, "value": "x", @@ -4611,7 +4611,7 @@ "type": "Identifier", "span": { "start": 1862, - "end": 1869, + "end": 1863, "ctxt": 0 }, "value": "x", @@ -4879,7 +4879,7 @@ "type": "Identifier", "span": { "start": 1990, - "end": 1997, + "end": 1991, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/enumLiteralTypes3.json b/crates/swc_ecma_parser/tests/tsc/enumLiteralTypes3.json index b7f8c0ea729d..5f650644ec6f 100644 --- a/crates/swc_ecma_parser/tests/tsc/enumLiteralTypes3.json +++ b/crates/swc_ecma_parser/tests/tsc/enumLiteralTypes3.json @@ -485,7 +485,7 @@ "type": "Identifier", "span": { "start": 213, - "end": 219, + "end": 214, "ctxt": 0 }, "value": "a", @@ -531,7 +531,7 @@ "type": "Identifier", "span": { "start": 221, - "end": 229, + "end": 222, "ctxt": 0 }, "value": "b", @@ -577,7 +577,7 @@ "type": "Identifier", "span": { "start": 231, - "end": 246, + "end": 232, "ctxt": 0 }, "value": "c", @@ -623,7 +623,7 @@ "type": "Identifier", "span": { "start": 248, - "end": 257, + "end": 249, "ctxt": 0 }, "value": "d", @@ -857,7 +857,7 @@ "type": "Identifier", "span": { "start": 320, - "end": 326, + "end": 321, "ctxt": 0 }, "value": "a", @@ -903,7 +903,7 @@ "type": "Identifier", "span": { "start": 328, - "end": 336, + "end": 329, "ctxt": 0 }, "value": "b", @@ -949,7 +949,7 @@ "type": "Identifier", "span": { "start": 338, - "end": 353, + "end": 339, "ctxt": 0 }, "value": "c", @@ -995,7 +995,7 @@ "type": "Identifier", "span": { "start": 355, - "end": 364, + "end": 356, "ctxt": 0 }, "value": "d", @@ -1229,7 +1229,7 @@ "type": "Identifier", "span": { "start": 427, - "end": 433, + "end": 428, "ctxt": 0 }, "value": "a", @@ -1275,7 +1275,7 @@ "type": "Identifier", "span": { "start": 435, - "end": 443, + "end": 436, "ctxt": 0 }, "value": "b", @@ -1321,7 +1321,7 @@ "type": "Identifier", "span": { "start": 445, - "end": 460, + "end": 446, "ctxt": 0 }, "value": "c", @@ -1367,7 +1367,7 @@ "type": "Identifier", "span": { "start": 462, - "end": 471, + "end": 463, "ctxt": 0 }, "value": "d", @@ -1601,7 +1601,7 @@ "type": "Identifier", "span": { "start": 534, - "end": 540, + "end": 535, "ctxt": 0 }, "value": "a", @@ -1647,7 +1647,7 @@ "type": "Identifier", "span": { "start": 542, - "end": 550, + "end": 543, "ctxt": 0 }, "value": "b", @@ -1693,7 +1693,7 @@ "type": "Identifier", "span": { "start": 552, - "end": 567, + "end": 553, "ctxt": 0 }, "value": "c", @@ -1739,7 +1739,7 @@ "type": "Identifier", "span": { "start": 569, - "end": 578, + "end": 570, "ctxt": 0 }, "value": "d", @@ -1973,7 +1973,7 @@ "type": "Identifier", "span": { "start": 641, - "end": 647, + "end": 642, "ctxt": 0 }, "value": "a", @@ -2019,7 +2019,7 @@ "type": "Identifier", "span": { "start": 649, - "end": 657, + "end": 650, "ctxt": 0 }, "value": "b", @@ -2065,7 +2065,7 @@ "type": "Identifier", "span": { "start": 659, - "end": 674, + "end": 660, "ctxt": 0 }, "value": "c", @@ -2111,7 +2111,7 @@ "type": "Identifier", "span": { "start": 676, - "end": 685, + "end": 677, "ctxt": 0 }, "value": "d", @@ -2865,7 +2865,7 @@ "type": "Identifier", "span": { "start": 956, - "end": 962, + "end": 957, "ctxt": 0 }, "value": "a", @@ -2911,7 +2911,7 @@ "type": "Identifier", "span": { "start": 964, - "end": 972, + "end": 965, "ctxt": 0 }, "value": "b", @@ -2957,7 +2957,7 @@ "type": "Identifier", "span": { "start": 974, - "end": 989, + "end": 975, "ctxt": 0 }, "value": "c", @@ -3003,7 +3003,7 @@ "type": "Identifier", "span": { "start": 991, - "end": 1000, + "end": 992, "ctxt": 0 }, "value": "d", @@ -3745,7 +3745,7 @@ "type": "Identifier", "span": { "start": 1295, - "end": 1301, + "end": 1296, "ctxt": 0 }, "value": "a", @@ -3791,7 +3791,7 @@ "type": "Identifier", "span": { "start": 1303, - "end": 1311, + "end": 1304, "ctxt": 0 }, "value": "b", @@ -3837,7 +3837,7 @@ "type": "Identifier", "span": { "start": 1313, - "end": 1328, + "end": 1314, "ctxt": 0 }, "value": "c", @@ -3883,7 +3883,7 @@ "type": "Identifier", "span": { "start": 1330, - "end": 1339, + "end": 1331, "ctxt": 0 }, "value": "d", @@ -4557,7 +4557,7 @@ "type": "Identifier", "span": { "start": 1567, - "end": 1573, + "end": 1568, "ctxt": 0 }, "value": "x", @@ -4871,7 +4871,7 @@ "type": "Identifier", "span": { "start": 1743, - "end": 1751, + "end": 1744, "ctxt": 0 }, "value": "x", @@ -5185,7 +5185,7 @@ "type": "Identifier", "span": { "start": 1923, - "end": 1938, + "end": 1924, "ctxt": 0 }, "value": "x", @@ -5499,7 +5499,7 @@ "type": "Identifier", "span": { "start": 2117, - "end": 2126, + "end": 2118, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/equalityWithEnumTypes.json b/crates/swc_ecma_parser/tests/tsc/equalityWithEnumTypes.json index 9357607d6cf0..697e39855492 100644 --- a/crates/swc_ecma_parser/tests/tsc/equalityWithEnumTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/equalityWithEnumTypes.json @@ -226,7 +226,7 @@ "type": "Identifier", "span": { "start": 152, - "end": 157, + "end": 153, "ctxt": 0 }, "value": "v", @@ -572,7 +572,7 @@ "type": "Identifier", "span": { "start": 340, - "end": 345, + "end": 341, "ctxt": 0 }, "value": "v", diff --git a/crates/swc_ecma_parser/tests/tsc/equalityWithtNullishCoalescingAssignment.json b/crates/swc_ecma_parser/tests/tsc/equalityWithtNullishCoalescingAssignment.json index 9afbb74b9ba4..81ea44739b1b 100644 --- a/crates/swc_ecma_parser/tests/tsc/equalityWithtNullishCoalescingAssignment.json +++ b/crates/swc_ecma_parser/tests/tsc/equalityWithtNullishCoalescingAssignment.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 38, - "end": 49, + "end": 39, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/es2020IntlAPIs.json b/crates/swc_ecma_parser/tests/tsc/es2020IntlAPIs.json index b227e5629bb7..605744e22a36 100644 --- a/crates/swc_ecma_parser/tests/tsc/es2020IntlAPIs.json +++ b/crates/swc_ecma_parser/tests/tsc/es2020IntlAPIs.json @@ -140,7 +140,7 @@ "type": "Identifier", "span": { "start": 223, - "end": 237, + "end": 229, "ctxt": 0 }, "value": "locale", diff --git a/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-classSuper.6.json b/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-classSuper.6.json index 3f7c4c710518..d726ea730ba6 100644 --- a/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-classSuper.6.json +++ b/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-classSuper.6.json @@ -560,7 +560,7 @@ "type": "Identifier", "span": { "start": 383, - "end": 392, + "end": 384, "ctxt": 0 }, "value": "v", @@ -1035,7 +1035,7 @@ "type": "Identifier", "span": { "start": 584, - "end": 593, + "end": 585, "ctxt": 0 }, "value": "v", diff --git a/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-classSuper.7.json b/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-classSuper.7.json index 0e79b9d1a139..208d6cf46295 100644 --- a/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-classSuper.7.json +++ b/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-classSuper.7.json @@ -334,7 +334,7 @@ "type": "Identifier", "span": { "start": 228, - "end": 239, + "end": 234, "ctxt": 0 }, "value": "method", @@ -370,7 +370,7 @@ "type": "Identifier", "span": { "start": 241, - "end": 254, + "end": 249, "ctxt": 0 }, "value": "_context", @@ -432,7 +432,7 @@ "type": "Identifier", "span": { "start": 281, - "end": 290, + "end": 285, "ctxt": 0 }, "value": "this", diff --git a/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-commentPreservation.json b/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-commentPreservation.json index 95a4d056b4e0..2342e1a5064c 100644 --- a/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-commentPreservation.json +++ b/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-commentPreservation.json @@ -328,7 +328,7 @@ "type": "Identifier", "span": { "start": 404, - "end": 417, + "end": 409, "ctxt": 0 }, "value": "value", @@ -803,7 +803,7 @@ "type": "Identifier", "span": { "start": 790, - "end": 803, + "end": 795, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateSetter.json b/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateSetter.json index fe98d2036111..aa27f3f07f3c 100644 --- a/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateSetter.json +++ b/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateSetter.json @@ -126,7 +126,7 @@ "type": "Identifier", "span": { "start": 268, - "end": 281, + "end": 273, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-missingEmitHelpers-staticComputedSetter.json b/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-missingEmitHelpers-staticComputedSetter.json index 1177a7d8ed25..06fc303b5d10 100644 --- a/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-missingEmitHelpers-staticComputedSetter.json +++ b/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-missingEmitHelpers-staticComputedSetter.json @@ -175,7 +175,7 @@ "type": "Identifier", "span": { "start": 286, - "end": 299, + "end": 291, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateSetter.json b/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateSetter.json index ada585e564d5..5c15cda89105 100644 --- a/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateSetter.json +++ b/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateSetter.json @@ -126,7 +126,7 @@ "type": "Identifier", "span": { "start": 275, - "end": 288, + "end": 280, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-parameterProperties.json b/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-parameterProperties.json index ef7d931be817..d7d18392a668 100644 --- a/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-parameterProperties.json +++ b/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-parameterProperties.json @@ -108,7 +108,7 @@ "type": "Identifier", "span": { "start": 184, - "end": 199, + "end": 191, "ctxt": 0 }, "value": "message", diff --git a/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-sourceMap.json b/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-sourceMap.json index c1d2754df896..eec2ab2e1e0c 100644 --- a/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-sourceMap.json +++ b/crates/swc_ecma_parser/tests/tsc/esDecorators-classDeclaration-sourceMap.json @@ -328,7 +328,7 @@ "type": "Identifier", "span": { "start": 274, - "end": 287, + "end": 279, "ctxt": 0 }, "value": "value", @@ -803,7 +803,7 @@ "type": "Identifier", "span": { "start": 495, - "end": 508, + "end": 500, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/esDecorators-classExpression-classSuper.6.json b/crates/swc_ecma_parser/tests/tsc/esDecorators-classExpression-classSuper.6.json index ae86226efdfe..452d7a8912d6 100644 --- a/crates/swc_ecma_parser/tests/tsc/esDecorators-classExpression-classSuper.6.json +++ b/crates/swc_ecma_parser/tests/tsc/esDecorators-classExpression-classSuper.6.json @@ -573,7 +573,7 @@ "type": "Identifier", "span": { "start": 384, - "end": 393, + "end": 385, "ctxt": 0 }, "value": "v", @@ -1048,7 +1048,7 @@ "type": "Identifier", "span": { "start": 585, - "end": 594, + "end": 586, "ctxt": 0 }, "value": "v", diff --git a/crates/swc_ecma_parser/tests/tsc/esDecorators-classExpression-commentPreservation.json b/crates/swc_ecma_parser/tests/tsc/esDecorators-classExpression-commentPreservation.json index ca9318bf4adf..102cfee5097a 100644 --- a/crates/swc_ecma_parser/tests/tsc/esDecorators-classExpression-commentPreservation.json +++ b/crates/swc_ecma_parser/tests/tsc/esDecorators-classExpression-commentPreservation.json @@ -341,7 +341,7 @@ "type": "Identifier", "span": { "start": 379, - "end": 392, + "end": 384, "ctxt": 0 }, "value": "value", @@ -816,7 +816,7 @@ "type": "Identifier", "span": { "start": 765, - "end": 778, + "end": 770, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/esDecorators-contextualTypes.2.json b/crates/swc_ecma_parser/tests/tsc/esDecorators-contextualTypes.2.json index eb8c19cca14f..a88a7fb8acd6 100644 --- a/crates/swc_ecma_parser/tests/tsc/esDecorators-contextualTypes.2.json +++ b/crates/swc_ecma_parser/tests/tsc/esDecorators-contextualTypes.2.json @@ -353,7 +353,7 @@ "type": "Identifier", "span": { "start": 311, - "end": 325, + "end": 317, "ctxt": 0 }, "value": "source", @@ -461,7 +461,7 @@ "type": "Identifier", "span": { "start": 388, - "end": 433, + "end": 394, "ctxt": 0 }, "value": "target", @@ -485,7 +485,7 @@ "type": "Identifier", "span": { "start": 397, - "end": 407, + "end": 401, "ctxt": 0 }, "value": "this", @@ -614,7 +614,7 @@ "type": "Identifier", "span": { "start": 443, - "end": 524, + "end": 450, "ctxt": 0 }, "value": "context", @@ -682,7 +682,7 @@ "type": "Identifier", "span": { "start": 487, - "end": 497, + "end": 491, "ctxt": 0 }, "value": "this", @@ -1483,7 +1483,7 @@ "type": "Identifier", "span": { "start": 534, - "end": 544, + "end": 538, "ctxt": 0 }, "value": "this", diff --git a/crates/swc_ecma_parser/tests/tsc/esDecorators-emitDecoratorMetadata.json b/crates/swc_ecma_parser/tests/tsc/esDecorators-emitDecoratorMetadata.json index a4d1c66b25e3..73bba5dbc6cb 100644 --- a/crates/swc_ecma_parser/tests/tsc/esDecorators-emitDecoratorMetadata.json +++ b/crates/swc_ecma_parser/tests/tsc/esDecorators-emitDecoratorMetadata.json @@ -124,7 +124,7 @@ "type": "Identifier", "span": { "start": 180, - "end": 189, + "end": 181, "ctxt": 0 }, "value": "x", @@ -192,7 +192,7 @@ "type": "Identifier", "span": { "start": 215, - "end": 224, + "end": 216, "ctxt": 0 }, "value": "x", @@ -294,7 +294,7 @@ "type": "Identifier", "span": { "start": 249, - "end": 258, + "end": 250, "ctxt": 0 }, "value": "x", @@ -460,7 +460,7 @@ "type": "Identifier", "span": { "start": 316, - "end": 325, + "end": 317, "ctxt": 0 }, "value": "x", @@ -562,7 +562,7 @@ "type": "Identifier", "span": { "start": 357, - "end": 366, + "end": 358, "ctxt": 0 }, "value": "x", @@ -786,7 +786,7 @@ "type": "Identifier", "span": { "start": 438, - "end": 447, + "end": 439, "ctxt": 0 }, "value": "x", @@ -854,7 +854,7 @@ "type": "Identifier", "span": { "start": 473, - "end": 482, + "end": 474, "ctxt": 0 }, "value": "x", @@ -956,7 +956,7 @@ "type": "Identifier", "span": { "start": 507, - "end": 516, + "end": 508, "ctxt": 0 }, "value": "x", @@ -1122,7 +1122,7 @@ "type": "Identifier", "span": { "start": 574, - "end": 583, + "end": 575, "ctxt": 0 }, "value": "x", @@ -1224,7 +1224,7 @@ "type": "Identifier", "span": { "start": 615, - "end": 624, + "end": 616, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/esDecoratorsMetadata1.json b/crates/swc_ecma_parser/tests/tsc/esDecoratorsMetadata1.json index 778d6682ca5e..9cc96c1686f2 100644 --- a/crates/swc_ecma_parser/tests/tsc/esDecoratorsMetadata1.json +++ b/crates/swc_ecma_parser/tests/tsc/esDecoratorsMetadata1.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 108, - "end": 119, + "end": 111, "ctxt": 0 }, "value": "key", @@ -68,7 +68,7 @@ "type": "Identifier", "span": { "start": 121, - "end": 134, + "end": 126, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/esDecoratorsMetadata2.json b/crates/swc_ecma_parser/tests/tsc/esDecoratorsMetadata2.json index 9a21c3ec8f67..51896506049e 100644 --- a/crates/swc_ecma_parser/tests/tsc/esDecoratorsMetadata2.json +++ b/crates/swc_ecma_parser/tests/tsc/esDecoratorsMetadata2.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 108, - "end": 119, + "end": 111, "ctxt": 0 }, "value": "key", @@ -68,7 +68,7 @@ "type": "Identifier", "span": { "start": 121, - "end": 134, + "end": 126, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/esDecoratorsMetadata3.json b/crates/swc_ecma_parser/tests/tsc/esDecoratorsMetadata3.json index 5a6c30b0c8d3..987289e0e1e9 100644 --- a/crates/swc_ecma_parser/tests/tsc/esDecoratorsMetadata3.json +++ b/crates/swc_ecma_parser/tests/tsc/esDecoratorsMetadata3.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 114, - "end": 125, + "end": 117, "ctxt": 0 }, "value": "key", @@ -68,7 +68,7 @@ "type": "Identifier", "span": { "start": 127, - "end": 140, + "end": 132, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/esDecoratorsMetadata4.json b/crates/swc_ecma_parser/tests/tsc/esDecoratorsMetadata4.json index d3e0fd53c661..af2d24e867ed 100644 --- a/crates/swc_ecma_parser/tests/tsc/esDecoratorsMetadata4.json +++ b/crates/swc_ecma_parser/tests/tsc/esDecoratorsMetadata4.json @@ -84,7 +84,7 @@ "type": "Identifier", "span": { "start": 149, - "end": 160, + "end": 152, "ctxt": 0 }, "value": "key", @@ -120,7 +120,7 @@ "type": "Identifier", "span": { "start": 162, - "end": 175, + "end": 167, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/everyTypeAssignableToAny.json b/crates/swc_ecma_parser/tests/tsc/everyTypeAssignableToAny.json index 6555285fd0a7..ae37447942eb 100644 --- a/crates/swc_ecma_parser/tests/tsc/everyTypeAssignableToAny.json +++ b/crates/swc_ecma_parser/tests/tsc/everyTypeAssignableToAny.json @@ -1000,7 +1000,7 @@ "type": "Identifier", "span": { "start": 276, - "end": 285, + "end": 277, "ctxt": 0 }, "value": "x", @@ -1243,7 +1243,7 @@ "type": "Identifier", "span": { "start": 350, - "end": 354, + "end": 351, "ctxt": 0 }, "value": "x", @@ -2173,7 +2173,7 @@ "type": "Identifier", "span": { "start": 573, - "end": 577, + "end": 574, "ctxt": 0 }, "value": "x", @@ -2219,7 +2219,7 @@ "type": "Identifier", "span": { "start": 579, - "end": 583, + "end": 580, "ctxt": 0 }, "value": "y", @@ -2265,7 +2265,7 @@ "type": "Identifier", "span": { "start": 585, - "end": 589, + "end": 586, "ctxt": 0 }, "value": "z", diff --git a/crates/swc_ecma_parser/tests/tsc/everyTypeWithAnnotationAndInitializer.json b/crates/swc_ecma_parser/tests/tsc/everyTypeWithAnnotationAndInitializer.json index 4895e755d215..9d4af6084276 100644 --- a/crates/swc_ecma_parser/tests/tsc/everyTypeWithAnnotationAndInitializer.json +++ b/crates/swc_ecma_parser/tests/tsc/everyTypeWithAnnotationAndInitializer.json @@ -504,7 +504,7 @@ "type": "Identifier", "span": { "start": 157, - "end": 166, + "end": 158, "ctxt": 0 }, "value": "x", @@ -724,7 +724,7 @@ "type": "Identifier", "span": { "start": 276, - "end": 285, + "end": 277, "ctxt": 0 }, "value": "x", @@ -1878,7 +1878,7 @@ "type": "Identifier", "span": { "start": 792, - "end": 801, + "end": 793, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/everyTypeWithAnnotationAndInvalidInitializer.json b/crates/swc_ecma_parser/tests/tsc/everyTypeWithAnnotationAndInvalidInitializer.json index dac8a6c7adc2..7d6cd13860d3 100644 --- a/crates/swc_ecma_parser/tests/tsc/everyTypeWithAnnotationAndInvalidInitializer.json +++ b/crates/swc_ecma_parser/tests/tsc/everyTypeWithAnnotationAndInvalidInitializer.json @@ -504,7 +504,7 @@ "type": "Identifier", "span": { "start": 157, - "end": 166, + "end": 158, "ctxt": 0 }, "value": "x", @@ -610,7 +610,7 @@ "type": "Identifier", "span": { "start": 203, - "end": 212, + "end": 204, "ctxt": 0 }, "value": "x", @@ -849,7 +849,7 @@ "type": "Identifier", "span": { "start": 327, - "end": 336, + "end": 328, "ctxt": 0 }, "value": "x", @@ -1101,7 +1101,7 @@ "type": "Identifier", "span": { "start": 456, - "end": 465, + "end": 457, "ctxt": 0 }, "value": "x", @@ -2021,7 +2021,7 @@ "type": "Identifier", "span": { "start": 865, - "end": 874, + "end": 866, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/everyTypeWithInitializer.json b/crates/swc_ecma_parser/tests/tsc/everyTypeWithInitializer.json index 29316c920cd4..82762f2b5e85 100644 --- a/crates/swc_ecma_parser/tests/tsc/everyTypeWithInitializer.json +++ b/crates/swc_ecma_parser/tests/tsc/everyTypeWithInitializer.json @@ -504,7 +504,7 @@ "type": "Identifier", "span": { "start": 157, - "end": 166, + "end": 158, "ctxt": 0 }, "value": "x", @@ -724,7 +724,7 @@ "type": "Identifier", "span": { "start": 276, - "end": 285, + "end": 277, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/exhaustiveSwitchStatements1.json b/crates/swc_ecma_parser/tests/tsc/exhaustiveSwitchStatements1.json index dc114deb138c..b478760cd126 100644 --- a/crates/swc_ecma_parser/tests/tsc/exhaustiveSwitchStatements1.json +++ b/crates/swc_ecma_parser/tests/tsc/exhaustiveSwitchStatements1.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 85, - "end": 93, + "end": 86, "ctxt": 0 }, "value": "x", @@ -344,7 +344,7 @@ "type": "Identifier", "span": { "start": 300, - "end": 308, + "end": 301, "ctxt": 0 }, "value": "x", @@ -674,7 +674,7 @@ "type": "Identifier", "span": { "start": 462, - "end": 470, + "end": 463, "ctxt": 0 }, "value": "x", @@ -992,7 +992,7 @@ "type": "Identifier", "span": { "start": 717, - "end": 721, + "end": 718, "ctxt": 0 }, "value": "e", @@ -1222,7 +1222,7 @@ "type": "Identifier", "span": { "start": 824, - "end": 828, + "end": 825, "ctxt": 0 }, "value": "e", @@ -2140,7 +2140,7 @@ "type": "Identifier", "span": { "start": 1305, - "end": 1313, + "end": 1306, "ctxt": 0 }, "value": "s", @@ -2932,7 +2932,7 @@ "type": "Identifier", "span": { "start": 1665, - "end": 1673, + "end": 1666, "ctxt": 0 }, "value": "s", @@ -3737,7 +3737,7 @@ "type": "Identifier", "span": { "start": 2100, - "end": 2109, + "end": 2101, "ctxt": 0 }, "value": "e", @@ -4092,7 +4092,7 @@ "type": "Identifier", "span": { "start": 2263, - "end": 2272, + "end": 2264, "ctxt": 0 }, "value": "e", @@ -4505,7 +4505,7 @@ "type": "Identifier", "span": { "start": 2473, - "end": 2482, + "end": 2474, "ctxt": 0 }, "value": "e", @@ -5503,7 +5503,7 @@ "type": "Identifier", "span": { "start": 3063, - "end": 3073, + "end": 3065, "ctxt": 0 }, "value": "s1", @@ -5549,7 +5549,7 @@ "type": "Identifier", "span": { "start": 3075, - "end": 3085, + "end": 3077, "ctxt": 0 }, "value": "s2", @@ -5886,7 +5886,7 @@ "type": "Identifier", "span": { "start": 3455, - "end": 3465, + "end": 3457, "ctxt": 0 }, "value": "s1", @@ -5932,7 +5932,7 @@ "type": "Identifier", "span": { "start": 3467, - "end": 3477, + "end": 3469, "ctxt": 0 }, "value": "s2", @@ -6240,7 +6240,7 @@ "type": "Identifier", "span": { "start": 3799, - "end": 3811, + "end": 3804, "ctxt": 0 }, "value": "value", @@ -7490,7 +7490,7 @@ "type": "Identifier", "span": { "start": 4537, - "end": 4541, + "end": 4538, "ctxt": 0 }, "value": "o", @@ -7536,7 +7536,7 @@ "type": "Identifier", "span": { "start": 4543, - "end": 4547, + "end": 4544, "ctxt": 0 }, "value": "k", @@ -7927,7 +7927,7 @@ "type": "Identifier", "span": { "start": 4739, - "end": 4743, + "end": 4740, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/exponentiationOperatorWithTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/exponentiationOperatorWithTypeParameter.json index 4b5793d25d1d..40a3bf03fa5f 100644 --- a/crates/swc_ecma_parser/tests/tsc/exponentiationOperatorWithTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/exponentiationOperatorWithTypeParameter.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 76, - "end": 80, + "end": 77, "ctxt": 0 }, "value": "t", diff --git a/crates/swc_ecma_parser/tests/tsc/exportAssignTypes.json b/crates/swc_ecma_parser/tests/tsc/exportAssignTypes.json index e0a0ddaf22a5..239389725bf9 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportAssignTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/exportAssignTypes.json @@ -454,7 +454,7 @@ "type": "Identifier", "span": { "start": 379, - "end": 383, + "end": 380, "ctxt": 0 }, "value": "a", @@ -1267,7 +1267,7 @@ "type": "Identifier", "span": { "start": 893, - "end": 898, + "end": 895, "ctxt": 0 }, "value": "p1", diff --git a/crates/swc_ecma_parser/tests/tsc/exportAssignmentConstrainedGenericType.json b/crates/swc_ecma_parser/tests/tsc/exportAssignmentConstrainedGenericType.json index 110b223d42e4..829890213ff8 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportAssignmentConstrainedGenericType.json +++ b/crates/swc_ecma_parser/tests/tsc/exportAssignmentConstrainedGenericType.json @@ -111,7 +111,7 @@ "type": "Identifier", "span": { "start": 113, - "end": 117, + "end": 114, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/exportAssignmentMergedInterface.json b/crates/swc_ecma_parser/tests/tsc/exportAssignmentMergedInterface.json index 2a9c9b68acd5..e7bd57f627cf 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportAssignmentMergedInterface.json +++ b/crates/swc_ecma_parser/tests/tsc/exportAssignmentMergedInterface.json @@ -46,7 +46,7 @@ "type": "Identifier", "span": { "start": 58, - "end": 67, + "end": 59, "ctxt": 0 }, "value": "a", @@ -173,7 +173,7 @@ "type": "Identifier", "span": { "start": 108, - "end": 117, + "end": 109, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/exportAssignmentMergedModule.json b/crates/swc_ecma_parser/tests/tsc/exportAssignmentMergedModule.json index 330b2aee4c1a..2094f421750c 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportAssignmentMergedModule.json +++ b/crates/swc_ecma_parser/tests/tsc/exportAssignmentMergedModule.json @@ -206,7 +206,7 @@ "type": "Identifier", "span": { "start": 151, - "end": 160, + "end": 152, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/exportImportAlias.json b/crates/swc_ecma_parser/tests/tsc/exportImportAlias.json index 192c1f59d7a9..f95bc39b9574 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportImportAlias.json +++ b/crates/swc_ecma_parser/tests/tsc/exportImportAlias.json @@ -143,7 +143,7 @@ "type": "Identifier", "span": { "start": 124, - "end": 133, + "end": 125, "ctxt": 0 }, "value": "x", @@ -182,7 +182,7 @@ "type": "Identifier", "span": { "start": 142, - "end": 151, + "end": 143, "ctxt": 0 }, "value": "y", @@ -1087,7 +1087,7 @@ "type": "Identifier", "span": { "start": 566, - "end": 575, + "end": 567, "ctxt": 0 }, "value": "x", @@ -1126,7 +1126,7 @@ "type": "Identifier", "span": { "start": 584, - "end": 593, + "end": 585, "ctxt": 0 }, "value": "y", @@ -1638,7 +1638,7 @@ "type": "Identifier", "span": { "start": 835, - "end": 847, + "end": 839, "ctxt": 0 }, "value": "name", diff --git a/crates/swc_ecma_parser/tests/tsc/exportSpellingSuggestion.json b/crates/swc_ecma_parser/tests/tsc/exportSpellingSuggestion.json index ec16a5b7b5ac..c28f6f21d035 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportSpellingSuggestion.json +++ b/crates/swc_ecma_parser/tests/tsc/exportSpellingSuggestion.json @@ -39,7 +39,7 @@ "type": "Identifier", "span": { "start": 48, - "end": 56, + "end": 49, "ctxt": 0 }, "value": "x", @@ -75,7 +75,7 @@ "type": "Identifier", "span": { "start": 58, - "end": 69, + "end": 61, "ctxt": 0 }, "value": "msg", diff --git a/crates/swc_ecma_parser/tests/tsc/exportTypeMergedWithExportStarAsNamespace.json b/crates/swc_ecma_parser/tests/tsc/exportTypeMergedWithExportStarAsNamespace.json index 3168b1aa39a2..787ccb5293e6 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportTypeMergedWithExportStarAsNamespace.json +++ b/crates/swc_ecma_parser/tests/tsc/exportTypeMergedWithExportStarAsNamespace.json @@ -538,7 +538,7 @@ "type": "Identifier", "span": { "start": 307, - "end": 315, + "end": 312, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/extendBooleanInterface.json b/crates/swc_ecma_parser/tests/tsc/extendBooleanInterface.json index 5fca56ee4067..a8e6c8a5f66d 100644 --- a/crates/swc_ecma_parser/tests/tsc/extendBooleanInterface.json +++ b/crates/swc_ecma_parser/tests/tsc/extendBooleanInterface.json @@ -99,7 +99,7 @@ "type": "Identifier", "span": { "start": 64, - "end": 68, + "end": 65, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/extendNumberInterface.json b/crates/swc_ecma_parser/tests/tsc/extendNumberInterface.json index f6179645a074..f3938ebef318 100644 --- a/crates/swc_ecma_parser/tests/tsc/extendNumberInterface.json +++ b/crates/swc_ecma_parser/tests/tsc/extendNumberInterface.json @@ -99,7 +99,7 @@ "type": "Identifier", "span": { "start": 63, - "end": 66, + "end": 64, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/extendStringInterface.json b/crates/swc_ecma_parser/tests/tsc/extendStringInterface.json index 2ca3eee88308..eca7fcb807ba 100644 --- a/crates/swc_ecma_parser/tests/tsc/extendStringInterface.json +++ b/crates/swc_ecma_parser/tests/tsc/extendStringInterface.json @@ -99,7 +99,7 @@ "type": "Identifier", "span": { "start": 63, - "end": 66, + "end": 64, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/for-inStatements.json b/crates/swc_ecma_parser/tests/tsc/for-inStatements.json index 7bf03e8e9fcc..7b6432b780b3 100644 --- a/crates/swc_ecma_parser/tests/tsc/for-inStatements.json +++ b/crates/swc_ecma_parser/tests/tsc/for-inStatements.json @@ -1570,7 +1570,7 @@ "type": "Identifier", "span": { "start": 537, - "end": 546, + "end": 538, "ctxt": 0 }, "value": "x", @@ -1606,7 +1606,7 @@ "type": "Identifier", "span": { "start": 548, - "end": 557, + "end": 549, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/for-inStatementsInvalid.json b/crates/swc_ecma_parser/tests/tsc/for-inStatementsInvalid.json index 4543f24c4327..a799c0b061a0 100644 --- a/crates/swc_ecma_parser/tests/tsc/for-inStatementsInvalid.json +++ b/crates/swc_ecma_parser/tests/tsc/for-inStatementsInvalid.json @@ -1352,7 +1352,7 @@ "type": "Identifier", "span": { "start": 492, - "end": 501, + "end": 493, "ctxt": 0 }, "value": "x", @@ -1388,7 +1388,7 @@ "type": "Identifier", "span": { "start": 503, - "end": 512, + "end": 504, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/forStatements.json b/crates/swc_ecma_parser/tests/tsc/forStatements.json index c67e72837a4c..76d69266778d 100644 --- a/crates/swc_ecma_parser/tests/tsc/forStatements.json +++ b/crates/swc_ecma_parser/tests/tsc/forStatements.json @@ -504,7 +504,7 @@ "type": "Identifier", "span": { "start": 189, - "end": 198, + "end": 190, "ctxt": 0 }, "value": "x", @@ -724,7 +724,7 @@ "type": "Identifier", "span": { "start": 308, - "end": 317, + "end": 309, "ctxt": 0 }, "value": "x", @@ -2132,7 +2132,7 @@ "type": "Identifier", "span": { "start": 933, - "end": 942, + "end": 934, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/forStatementsMultipleInvalidDecl.json b/crates/swc_ecma_parser/tests/tsc/forStatementsMultipleInvalidDecl.json index d7b413610abf..60c09ddb5737 100644 --- a/crates/swc_ecma_parser/tests/tsc/forStatementsMultipleInvalidDecl.json +++ b/crates/swc_ecma_parser/tests/tsc/forStatementsMultipleInvalidDecl.json @@ -630,7 +630,7 @@ "type": "Identifier", "span": { "start": 251, - "end": 260, + "end": 252, "ctxt": 0 }, "value": "x", @@ -850,7 +850,7 @@ "type": "Identifier", "span": { "start": 370, - "end": 379, + "end": 371, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/forStatementsMultipleValidDecl.json b/crates/swc_ecma_parser/tests/tsc/forStatementsMultipleValidDecl.json index 4ef0cf2b1d99..fec626363147 100644 --- a/crates/swc_ecma_parser/tests/tsc/forStatementsMultipleValidDecl.json +++ b/crates/swc_ecma_parser/tests/tsc/forStatementsMultipleValidDecl.json @@ -1406,7 +1406,7 @@ "type": "Identifier", "span": { "start": 682, - "end": 691, + "end": 683, "ctxt": 0 }, "value": "s", @@ -1640,7 +1640,7 @@ "type": "Identifier", "span": { "start": 769, - "end": 778, + "end": 770, "ctxt": 0 }, "value": "s", @@ -1762,7 +1762,7 @@ "type": "Identifier", "span": { "start": 814, - "end": 823, + "end": 815, "ctxt": 0 }, "value": "s", @@ -1888,7 +1888,7 @@ "type": "Identifier", "span": { "start": 859, - "end": 868, + "end": 860, "ctxt": 0 }, "value": "s", diff --git a/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction.json b/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction.json index 7971dd6f1ce0..8231b64b6f92 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction.json +++ b/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 99, - "end": 103, + "end": 100, "ctxt": 0 }, "value": "x", @@ -1107,7 +1107,7 @@ "type": "Identifier", "span": { "start": 434, - "end": 445, + "end": 435, "ctxt": 0 }, "value": "x", @@ -1523,7 +1523,7 @@ "type": "Identifier", "span": { "start": 554, - "end": 558, + "end": 555, "ctxt": 0 }, "value": "x", @@ -1833,7 +1833,7 @@ "type": "Identifier", "span": { "start": 630, - "end": 634, + "end": 631, "ctxt": 0 }, "value": "x", @@ -1990,7 +1990,7 @@ "type": "Identifier", "span": { "start": 660, - "end": 664, + "end": 661, "ctxt": 0 }, "value": "x", @@ -2147,7 +2147,7 @@ "type": "Identifier", "span": { "start": 686, - "end": 690, + "end": 687, "ctxt": 0 }, "value": "x", @@ -2254,7 +2254,7 @@ "type": "Identifier", "span": { "start": 700, - "end": 704, + "end": 701, "ctxt": 0 }, "value": "x", @@ -2291,7 +2291,7 @@ "type": "Identifier", "span": { "start": 706, - "end": 710, + "end": 707, "ctxt": 0 }, "value": "y", @@ -2608,7 +2608,7 @@ "type": "Identifier", "span": { "start": 776, - "end": 780, + "end": 777, "ctxt": 0 }, "value": "x", @@ -3605,7 +3605,7 @@ "type": "Identifier", "span": { "start": 1100, - "end": 1104, + "end": 1101, "ctxt": 0 }, "value": "x", @@ -3651,7 +3651,7 @@ "type": "Identifier", "span": { "start": 1106, - "end": 1110, + "end": 1107, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction2.json b/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction2.json index 550c07a36b3e..0a63397cd042 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction2.json +++ b/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction2.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 139, - "end": 143, + "end": 140, "ctxt": 0 }, "value": "x", @@ -384,7 +384,7 @@ "type": "Identifier", "span": { "start": 257, - "end": 261, + "end": 258, "ctxt": 0 }, "value": "x", @@ -495,7 +495,7 @@ "type": "Identifier", "span": { "start": 235, - "end": 244, + "end": 236, "ctxt": 0 }, "value": "x", @@ -695,7 +695,7 @@ "type": "Identifier", "span": { "start": 325, - "end": 334, + "end": 326, "ctxt": 0 }, "value": "x", @@ -914,7 +914,7 @@ "type": "Identifier", "span": { "start": 395, - "end": 399, + "end": 396, "ctxt": 0 }, "value": "x", @@ -2074,7 +2074,7 @@ "type": "Identifier", "span": { "start": 773, - "end": 777, + "end": 774, "ctxt": 0 }, "value": "x", @@ -2120,7 +2120,7 @@ "type": "Identifier", "span": { "start": 779, - "end": 783, + "end": 780, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction3.json b/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction3.json index 90492afb1ed2..0682892532af 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction3.json +++ b/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction3.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 112, - "end": 116, + "end": 113, "ctxt": 0 }, "value": "x", @@ -143,7 +143,7 @@ "type": "Identifier", "span": { "start": 90, - "end": 99, + "end": 91, "ctxt": 0 }, "value": "x", @@ -1059,7 +1059,7 @@ "type": "Identifier", "span": { "start": 416, - "end": 425, + "end": 417, "ctxt": 0 }, "value": "x", @@ -1335,7 +1335,7 @@ "type": "Identifier", "span": { "start": 500, - "end": 504, + "end": 501, "ctxt": 0 }, "value": "x", @@ -1645,7 +1645,7 @@ "type": "Identifier", "span": { "start": 576, - "end": 580, + "end": 577, "ctxt": 0 }, "value": "x", @@ -1802,7 +1802,7 @@ "type": "Identifier", "span": { "start": 606, - "end": 610, + "end": 607, "ctxt": 0 }, "value": "x", @@ -1959,7 +1959,7 @@ "type": "Identifier", "span": { "start": 632, - "end": 636, + "end": 633, "ctxt": 0 }, "value": "x", @@ -2066,7 +2066,7 @@ "type": "Identifier", "span": { "start": 646, - "end": 650, + "end": 647, "ctxt": 0 }, "value": "x", @@ -2103,7 +2103,7 @@ "type": "Identifier", "span": { "start": 652, - "end": 656, + "end": 653, "ctxt": 0 }, "value": "y", @@ -2271,7 +2271,7 @@ "type": "Identifier", "span": { "start": 691, - "end": 695, + "end": 692, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/functionExpressionContextualTyping1.json b/crates/swc_ecma_parser/tests/tsc/functionExpressionContextualTyping1.json index d28a006b785d..3d180b604958 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionExpressionContextualTyping1.json +++ b/crates/swc_ecma_parser/tests/tsc/functionExpressionContextualTyping1.json @@ -111,7 +111,7 @@ "type": "Identifier", "span": { "start": 434, - "end": 443, + "end": 435, "ctxt": 0 }, "value": "n", @@ -138,7 +138,7 @@ "type": "Identifier", "span": { "start": 445, - "end": 454, + "end": 446, "ctxt": 0 }, "value": "s", @@ -447,7 +447,7 @@ "type": "Identifier", "span": { "start": 569, - "end": 585, + "end": 570, "ctxt": 0 }, "value": "c", @@ -693,7 +693,7 @@ "type": "Identifier", "span": { "start": 1088, - "end": 1097, + "end": 1089, "ctxt": 0 }, "value": "s", @@ -720,7 +720,7 @@ "type": "Identifier", "span": { "start": 1099, - "end": 1109, + "end": 1100, "ctxt": 0 }, "value": "w", @@ -783,7 +783,7 @@ "type": "Identifier", "span": { "start": 1124, - "end": 1133, + "end": 1125, "ctxt": 0 }, "value": "s", @@ -810,7 +810,7 @@ "type": "Identifier", "span": { "start": 1135, - "end": 1145, + "end": 1136, "ctxt": 0 }, "value": "w", @@ -1015,7 +1015,7 @@ "type": "Identifier", "span": { "start": 1201, - "end": 1210, + "end": 1202, "ctxt": 0 }, "value": "n", @@ -1042,7 +1042,7 @@ "type": "Identifier", "span": { "start": 1212, - "end": 1221, + "end": 1213, "ctxt": 0 }, "value": "s", @@ -1343,7 +1343,7 @@ "type": "Identifier", "span": { "start": 1322, - "end": 1334, + "end": 1326, "ctxt": 0 }, "value": "name", @@ -1370,7 +1370,7 @@ "type": "Identifier", "span": { "start": 1336, - "end": 1347, + "end": 1339, "ctxt": 0 }, "value": "num", @@ -1397,7 +1397,7 @@ "type": "Identifier", "span": { "start": 1349, - "end": 1361, + "end": 1352, "ctxt": 0 }, "value": "boo", @@ -1565,7 +1565,7 @@ "type": "Identifier", "span": { "start": 1410, - "end": 1414, + "end": 1411, "ctxt": 0 }, "value": "n", @@ -1740,7 +1740,7 @@ "type": "Identifier", "span": { "start": 1474, - "end": 1479, + "end": 1475, "ctxt": 0 }, "value": "n", @@ -1920,7 +1920,7 @@ "type": "Identifier", "span": { "start": 1711, - "end": 1720, + "end": 1712, "ctxt": 0 }, "value": "s", @@ -1947,7 +1947,7 @@ "type": "Identifier", "span": { "start": 1722, - "end": 1732, + "end": 1723, "ctxt": 0 }, "value": "w", @@ -2010,7 +2010,7 @@ "type": "Identifier", "span": { "start": 1747, - "end": 1756, + "end": 1748, "ctxt": 0 }, "value": "n", @@ -2123,7 +2123,7 @@ "type": "Identifier", "span": { "start": 1780, - "end": 1789, + "end": 1781, "ctxt": 0 }, "value": "s", @@ -2150,7 +2150,7 @@ "type": "Identifier", "span": { "start": 1791, - "end": 1801, + "end": 1792, "ctxt": 0 }, "value": "w", @@ -2213,7 +2213,7 @@ "type": "Identifier", "span": { "start": 1816, - "end": 1825, + "end": 1817, "ctxt": 0 }, "value": "s", @@ -2240,7 +2240,7 @@ "type": "Identifier", "span": { "start": 1827, - "end": 1836, + "end": 1828, "ctxt": 0 }, "value": "w", @@ -2708,7 +2708,7 @@ "type": "Identifier", "span": { "start": 2204, - "end": 2208, + "end": 2205, "ctxt": 0 }, "value": "j", @@ -2745,7 +2745,7 @@ "type": "Identifier", "span": { "start": 2210, - "end": 2214, + "end": 2211, "ctxt": 0 }, "value": "k", @@ -2873,7 +2873,7 @@ "type": "Identifier", "span": { "start": 2232, - "end": 2241, + "end": 2233, "ctxt": 0 }, "value": "j", @@ -2900,7 +2900,7 @@ "type": "Identifier", "span": { "start": 2242, - "end": 2246, + "end": 2243, "ctxt": 0 }, "value": "k", diff --git a/crates/swc_ecma_parser/tests/tsc/functionExpressionContextualTyping2.json b/crates/swc_ecma_parser/tests/tsc/functionExpressionContextualTyping2.json index b4191784daf9..26feba650cb1 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionExpressionContextualTyping2.json +++ b/crates/swc_ecma_parser/tests/tsc/functionExpressionContextualTyping2.json @@ -51,7 +51,7 @@ "type": "Identifier", "span": { "start": 672, - "end": 681, + "end": 673, "ctxt": 0 }, "value": "n", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 683, - "end": 692, + "end": 684, "ctxt": 0 }, "value": "s", @@ -207,7 +207,7 @@ "type": "Identifier", "span": { "start": 726, - "end": 735, + "end": 727, "ctxt": 0 }, "value": "n", @@ -234,7 +234,7 @@ "type": "Identifier", "span": { "start": 737, - "end": 746, + "end": 738, "ctxt": 0 }, "value": "s", diff --git a/crates/swc_ecma_parser/tests/tsc/functionExpressionContextualTyping3.json b/crates/swc_ecma_parser/tests/tsc/functionExpressionContextualTyping3.json index 06a3ece5cf7f..f83b9448ba0c 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionExpressionContextualTyping3.json +++ b/crates/swc_ecma_parser/tests/tsc/functionExpressionContextualTyping3.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 58, - "end": 75, + "end": 63, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/functionImplementations.json b/crates/swc_ecma_parser/tests/tsc/functionImplementations.json index e13af5cd3995..3b94db5d6531 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionImplementations.json +++ b/crates/swc_ecma_parser/tests/tsc/functionImplementations.json @@ -1351,7 +1351,7 @@ "type": "Identifier", "span": { "start": 1442, - "end": 1446, + "end": 1443, "ctxt": 0 }, "value": "x", @@ -1529,7 +1529,7 @@ "type": "Identifier", "span": { "start": 1603, - "end": 1607, + "end": 1604, "ctxt": 0 }, "value": "x", @@ -2923,7 +2923,7 @@ "type": "Identifier", "span": { "start": 3348, - "end": 3357, + "end": 3349, "ctxt": 0 }, "value": "n", @@ -3340,7 +3340,7 @@ "type": "Identifier", "span": { "start": 3931, - "end": 3940, + "end": 3932, "ctxt": 0 }, "value": "x", @@ -3600,7 +3600,7 @@ "type": "Identifier", "span": { "start": 4079, - "end": 4088, + "end": 4080, "ctxt": 0 }, "value": "x", @@ -3785,7 +3785,7 @@ "type": "Identifier", "span": { "start": 4200, - "end": 4209, + "end": 4201, "ctxt": 0 }, "value": "x", @@ -3998,7 +3998,7 @@ "type": "Identifier", "span": { "start": 4348, - "end": 4357, + "end": 4349, "ctxt": 0 }, "value": "x", @@ -4183,7 +4183,7 @@ "type": "Identifier", "span": { "start": 4487, - "end": 4496, + "end": 4488, "ctxt": 0 }, "value": "x", @@ -4368,7 +4368,7 @@ "type": "Identifier", "span": { "start": 4628, - "end": 4637, + "end": 4629, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/functionLiteral.json b/crates/swc_ecma_parser/tests/tsc/functionLiteral.json index 2575c59fa4b0..4d2ccaa86692 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionLiteral.json +++ b/crates/swc_ecma_parser/tests/tsc/functionLiteral.json @@ -191,7 +191,7 @@ "type": "Identifier", "span": { "start": 99, - "end": 108, + "end": 100, "ctxt": 0 }, "value": "x", @@ -288,7 +288,7 @@ "type": "Identifier", "span": { "start": 130, - "end": 139, + "end": 131, "ctxt": 0 }, "value": "x", @@ -391,7 +391,7 @@ "type": "Identifier", "span": { "start": 166, - "end": 170, + "end": 167, "ctxt": 0 }, "value": "x", @@ -640,7 +640,7 @@ "type": "Identifier", "span": { "start": 210, - "end": 219, + "end": 211, "ctxt": 0 }, "value": "x", @@ -737,7 +737,7 @@ "type": "Identifier", "span": { "start": 245, - "end": 254, + "end": 246, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/functionLiteralForOverloads.json b/crates/swc_ecma_parser/tests/tsc/functionLiteralForOverloads.json index 861e3425de71..2217133dbcb7 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionLiteralForOverloads.json +++ b/crates/swc_ecma_parser/tests/tsc/functionLiteralForOverloads.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 66, - "end": 75, + "end": 67, "ctxt": 0 }, "value": "x", @@ -114,7 +114,7 @@ "type": "Identifier", "span": { "start": 91, - "end": 100, + "end": 92, "ctxt": 0 }, "value": "x", @@ -253,7 +253,7 @@ "type": "Identifier", "span": { "start": 144, - "end": 153, + "end": 145, "ctxt": 0 }, "value": "x", @@ -340,7 +340,7 @@ "type": "Identifier", "span": { "start": 172, - "end": 181, + "end": 173, "ctxt": 0 }, "value": "x", @@ -511,7 +511,7 @@ "type": "Identifier", "span": { "start": 225, - "end": 229, + "end": 226, "ctxt": 0 }, "value": "x", @@ -608,7 +608,7 @@ "type": "Identifier", "span": { "start": 248, - "end": 252, + "end": 249, "ctxt": 0 }, "value": "x", @@ -789,7 +789,7 @@ "type": "Identifier", "span": { "start": 296, - "end": 305, + "end": 297, "ctxt": 0 }, "value": "x", @@ -886,7 +886,7 @@ "type": "Identifier", "span": { "start": 319, - "end": 328, + "end": 320, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/functionLiteralForOverloads2.json b/crates/swc_ecma_parser/tests/tsc/functionLiteralForOverloads2.json index ca3393b0c563..dfba87b620a6 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionLiteralForOverloads2.json +++ b/crates/swc_ecma_parser/tests/tsc/functionLiteralForOverloads2.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 90, - "end": 99, + "end": 91, "ctxt": 0 }, "value": "x", @@ -115,7 +115,7 @@ "type": "Identifier", "span": { "start": 118, - "end": 127, + "end": 119, "ctxt": 0 }, "value": "x", @@ -252,7 +252,7 @@ "type": "Identifier", "span": { "start": 185, - "end": 194, + "end": 186, "ctxt": 0 }, "value": "x", @@ -311,7 +311,7 @@ "type": "Identifier", "span": { "start": 213, - "end": 222, + "end": 214, "ctxt": 0 }, "value": "x", @@ -483,7 +483,7 @@ "type": "Identifier", "span": { "start": 268, - "end": 277, + "end": 269, "ctxt": 0 }, "value": "x", @@ -548,7 +548,7 @@ "type": "Identifier", "span": { "start": 291, - "end": 300, + "end": 292, "ctxt": 0 }, "value": "x", @@ -672,7 +672,7 @@ "type": "Identifier", "span": { "start": 335, - "end": 344, + "end": 336, "ctxt": 0 }, "value": "x", @@ -769,7 +769,7 @@ "type": "Identifier", "span": { "start": 361, - "end": 370, + "end": 362, "ctxt": 0 }, "value": "x", @@ -925,7 +925,7 @@ "type": "Identifier", "span": { "start": 405, - "end": 414, + "end": 406, "ctxt": 0 }, "value": "x", @@ -1050,7 +1050,7 @@ "type": "Identifier", "span": { "start": 434, - "end": 443, + "end": 435, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/functionLiterals.json b/crates/swc_ecma_parser/tests/tsc/functionLiterals.json index b635b4b82740..1657421f38d9 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionLiterals.json +++ b/crates/swc_ecma_parser/tests/tsc/functionLiterals.json @@ -72,7 +72,7 @@ "type": "Identifier", "span": { "start": 140, - "end": 149, + "end": 141, "ctxt": 0 }, "value": "x", @@ -156,7 +156,7 @@ "type": "Identifier", "span": { "start": 200, - "end": 209, + "end": 201, "ctxt": 0 }, "value": "x", @@ -251,7 +251,7 @@ "type": "Identifier", "span": { "start": 265, - "end": 274, + "end": 266, "ctxt": 0 }, "value": "x", @@ -812,7 +812,7 @@ "type": "Identifier", "span": { "start": 462, - "end": 471, + "end": 463, "ctxt": 0 }, "value": "x", @@ -880,7 +880,7 @@ "type": "Identifier", "span": { "start": 492, - "end": 501, + "end": 493, "ctxt": 0 }, "value": "s", @@ -972,7 +972,7 @@ "type": "Identifier", "span": { "start": 534, - "end": 543, + "end": 535, "ctxt": 0 }, "value": "x", @@ -1027,7 +1027,7 @@ "type": "Identifier", "span": { "start": 563, - "end": 572, + "end": 564, "ctxt": 0 }, "value": "s", @@ -1296,7 +1296,7 @@ "type": "Identifier", "span": { "start": 689, - "end": 693, + "end": 690, "ctxt": 0 }, "value": "x", @@ -1422,7 +1422,7 @@ "type": "Identifier", "span": { "start": 747, - "end": 751, + "end": 748, "ctxt": 0 }, "value": "x", @@ -1559,7 +1559,7 @@ "type": "Identifier", "span": { "start": 810, - "end": 814, + "end": 811, "ctxt": 0 }, "value": "x", @@ -2162,7 +2162,7 @@ "type": "Identifier", "span": { "start": 1018, - "end": 1022, + "end": 1019, "ctxt": 0 }, "value": "x", @@ -2272,7 +2272,7 @@ "type": "Identifier", "span": { "start": 1046, - "end": 1050, + "end": 1047, "ctxt": 0 }, "value": "s", @@ -2406,7 +2406,7 @@ "type": "Identifier", "span": { "start": 1086, - "end": 1090, + "end": 1087, "ctxt": 0 }, "value": "x", @@ -2503,7 +2503,7 @@ "type": "Identifier", "span": { "start": 1113, - "end": 1117, + "end": 1114, "ctxt": 0 }, "value": "s", diff --git a/crates/swc_ecma_parser/tests/tsc/functionOverloadCompatibilityWithVoid01.json b/crates/swc_ecma_parser/tests/tsc/functionOverloadCompatibilityWithVoid01.json index 37d4b271d6fc..c84aac4c3e01 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionOverloadCompatibilityWithVoid01.json +++ b/crates/swc_ecma_parser/tests/tsc/functionOverloadCompatibilityWithVoid01.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 12, - "end": 21, + "end": 13, "ctxt": 0 }, "value": "x", @@ -111,7 +111,7 @@ "type": "Identifier", "span": { "start": 43, - "end": 52, + "end": 44, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/functionOverloadCompatibilityWithVoid02.json b/crates/swc_ecma_parser/tests/tsc/functionOverloadCompatibilityWithVoid02.json index c42ad81afed1..0adf8576343b 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionOverloadCompatibilityWithVoid02.json +++ b/crates/swc_ecma_parser/tests/tsc/functionOverloadCompatibilityWithVoid02.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 12, - "end": 21, + "end": 13, "ctxt": 0 }, "value": "x", @@ -111,7 +111,7 @@ "type": "Identifier", "span": { "start": 41, - "end": 50, + "end": 42, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/functionOverloadCompatibilityWithVoid03.json b/crates/swc_ecma_parser/tests/tsc/functionOverloadCompatibilityWithVoid03.json index 055d0ab2e822..a7dae885793d 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionOverloadCompatibilityWithVoid03.json +++ b/crates/swc_ecma_parser/tests/tsc/functionOverloadCompatibilityWithVoid03.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 12, - "end": 21, + "end": 13, "ctxt": 0 }, "value": "x", @@ -111,7 +111,7 @@ "type": "Identifier", "span": { "start": 41, - "end": 50, + "end": 42, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/functionOverloadErrors.json b/crates/swc_ecma_parser/tests/tsc/functionOverloadErrors.json index e152b1c125b5..d173b829b922 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionOverloadErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/functionOverloadErrors.json @@ -217,7 +217,7 @@ "type": "Identifier", "span": { "start": 217, - "end": 228, + "end": 218, "ctxt": 0 }, "value": "n", @@ -288,7 +288,7 @@ "type": "Identifier", "span": { "start": 245, - "end": 261, + "end": 246, "ctxt": 0 }, "value": "n", @@ -413,7 +413,7 @@ "type": "Identifier", "span": { "start": 370, - "end": 379, + "end": 371, "ctxt": 0 }, "value": "x", @@ -492,7 +492,7 @@ "type": "Identifier", "span": { "start": 403, - "end": 412, + "end": 404, "ctxt": 0 }, "value": "y", @@ -723,7 +723,7 @@ "type": "Identifier", "span": { "start": 585, - "end": 592, + "end": 586, "ctxt": 0 }, "value": "x", @@ -905,7 +905,7 @@ "type": "Identifier", "span": { "start": 733, - "end": 740, + "end": 734, "ctxt": 0 }, "value": "x", @@ -941,7 +941,7 @@ "type": "Identifier", "span": { "start": 742, - "end": 749, + "end": 743, "ctxt": 0 }, "value": "y", @@ -977,7 +977,7 @@ "type": "Identifier", "span": { "start": 751, - "end": 758, + "end": 752, "ctxt": 0 }, "value": "z", @@ -1074,7 +1074,7 @@ "type": "Identifier", "span": { "start": 858, - "end": 867, + "end": 859, "ctxt": 0 }, "value": "n", @@ -1169,7 +1169,7 @@ "type": "Identifier", "span": { "start": 886, - "end": 895, + "end": 887, "ctxt": 0 }, "value": "n", @@ -1298,7 +1298,7 @@ "type": "Identifier", "span": { "start": 1035, - "end": 1039, + "end": 1036, "ctxt": 0 }, "value": "n", @@ -1403,7 +1403,7 @@ "type": "Identifier", "span": { "start": 1058, - "end": 1062, + "end": 1059, "ctxt": 0 }, "value": "n", @@ -2397,7 +2397,7 @@ "type": "Identifier", "span": { "start": 1844, - "end": 1853, + "end": 1845, "ctxt": 0 }, "value": "s", @@ -2518,7 +2518,7 @@ "type": "Identifier", "span": { "start": 1883, - "end": 1892, + "end": 1884, "ctxt": 0 }, "value": "s", @@ -2740,7 +2740,7 @@ "type": "Identifier", "span": { "start": 2024, - "end": 2033, + "end": 2025, "ctxt": 0 }, "value": "n", @@ -2837,7 +2837,7 @@ "type": "Identifier", "span": { "start": 2078, - "end": 2087, + "end": 2079, "ctxt": 0 }, "value": "n", @@ -3005,7 +3005,7 @@ "type": "Identifier", "span": { "start": 2235, - "end": 2244, + "end": 2236, "ctxt": 0 }, "value": "s", @@ -3128,7 +3128,7 @@ "type": "Identifier", "span": { "start": 2307, - "end": 2316, + "end": 2308, "ctxt": 0 }, "value": "s", @@ -3251,7 +3251,7 @@ "type": "Identifier", "span": { "start": 2454, - "end": 2463, + "end": 2455, "ctxt": 0 }, "value": "n", @@ -3322,7 +3322,7 @@ "type": "Identifier", "span": { "start": 2602, - "end": 2611, + "end": 2603, "ctxt": 0 }, "value": "n", @@ -3385,7 +3385,7 @@ "type": "Identifier", "span": { "start": 2628, - "end": 2637, + "end": 2629, "ctxt": 0 }, "value": "n", @@ -3456,7 +3456,7 @@ "type": "Identifier", "span": { "start": 2748, - "end": 2757, + "end": 2749, "ctxt": 0 }, "value": "n", diff --git a/crates/swc_ecma_parser/tests/tsc/functionWithMultipleReturnStatements.json b/crates/swc_ecma_parser/tests/tsc/functionWithMultipleReturnStatements.json index bd6947869bb6..fa376e0781d9 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionWithMultipleReturnStatements.json +++ b/crates/swc_ecma_parser/tests/tsc/functionWithMultipleReturnStatements.json @@ -610,7 +610,7 @@ "type": "Identifier", "span": { "start": 687, - "end": 691, + "end": 688, "ctxt": 0 }, "value": "x", @@ -656,7 +656,7 @@ "type": "Identifier", "span": { "start": 693, - "end": 696, + "end": 694, "ctxt": 0 }, "value": "y", @@ -866,7 +866,7 @@ "type": "Identifier", "span": { "start": 815, - "end": 819, + "end": 816, "ctxt": 0 }, "value": "x", @@ -912,7 +912,7 @@ "type": "Identifier", "span": { "start": 821, - "end": 825, + "end": 822, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/functionWithMultipleReturnStatements2.json b/crates/swc_ecma_parser/tests/tsc/functionWithMultipleReturnStatements2.json index 68b55caf4560..46874abcfd9e 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionWithMultipleReturnStatements2.json +++ b/crates/swc_ecma_parser/tests/tsc/functionWithMultipleReturnStatements2.json @@ -516,7 +516,7 @@ "type": "Identifier", "span": { "start": 588, - "end": 592, + "end": 589, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/generatedContextualTyping.json b/crates/swc_ecma_parser/tests/tsc/generatedContextualTyping.json index 0444a3eb03d6..2424d5e20740 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatedContextualTyping.json +++ b/crates/swc_ecma_parser/tests/tsc/generatedContextualTyping.json @@ -277,7 +277,7 @@ "type": "Identifier", "span": { "start": 172, - "end": 178, + "end": 173, "ctxt": 0 }, "value": "n", @@ -1970,7 +1970,7 @@ "type": "Identifier", "span": { "start": 719, - "end": 728, + "end": 720, "ctxt": 0 }, "value": "s", @@ -4215,7 +4215,7 @@ "type": "Identifier", "span": { "start": 1452, - "end": 1461, + "end": 1453, "ctxt": 0 }, "value": "s", @@ -6377,7 +6377,7 @@ "type": "Identifier", "span": { "start": 2286, - "end": 2295, + "end": 2287, "ctxt": 0 }, "value": "s", @@ -8539,7 +8539,7 @@ "type": "Identifier", "span": { "start": 3117, - "end": 3126, + "end": 3118, "ctxt": 0 }, "value": "s", @@ -10701,7 +10701,7 @@ "type": "Identifier", "span": { "start": 3947, - "end": 3956, + "end": 3948, "ctxt": 0 }, "value": "s", @@ -12863,7 +12863,7 @@ "type": "Identifier", "span": { "start": 4865, - "end": 4874, + "end": 4866, "ctxt": 0 }, "value": "s", @@ -15025,7 +15025,7 @@ "type": "Identifier", "span": { "start": 5780, - "end": 5789, + "end": 5781, "ctxt": 0 }, "value": "s", @@ -15372,7 +15372,7 @@ "type": "Identifier", "span": { "start": 5950, - "end": 5968, + "end": 5954, "ctxt": 0 }, "value": "parm", @@ -15559,7 +15559,7 @@ "type": "Identifier", "span": { "start": 6017, - "end": 6035, + "end": 6021, "ctxt": 0 }, "value": "parm", @@ -15766,7 +15766,7 @@ "type": "Identifier", "span": { "start": 6100, - "end": 6118, + "end": 6104, "ctxt": 0 }, "value": "parm", @@ -15982,7 +15982,7 @@ "type": "Identifier", "span": { "start": 6189, - "end": 6210, + "end": 6193, "ctxt": 0 }, "value": "parm", @@ -16179,7 +16179,7 @@ "type": "Identifier", "span": { "start": 6259, - "end": 6280, + "end": 6263, "ctxt": 0 }, "value": "parm", @@ -16396,7 +16396,7 @@ "type": "Identifier", "span": { "start": 6345, - "end": 6366, + "end": 6349, "ctxt": 0 }, "value": "parm", @@ -16622,7 +16622,7 @@ "type": "Identifier", "span": { "start": 6437, - "end": 6449, + "end": 6441, "ctxt": 0 }, "value": "parm", @@ -16778,7 +16778,7 @@ "type": "Identifier", "span": { "start": 6492, - "end": 6509, + "end": 6496, "ctxt": 0 }, "value": "parm", @@ -16954,7 +16954,7 @@ "type": "Identifier", "span": { "start": 6552, - "end": 6580, + "end": 6556, "ctxt": 0 }, "value": "parm", @@ -17159,7 +17159,7 @@ "type": "Identifier", "span": { "start": 6623, - "end": 6642, + "end": 6627, "ctxt": 0 }, "value": "parm", @@ -17380,7 +17380,7 @@ "type": "Identifier", "span": { "start": 6693, - "end": 6717, + "end": 6697, "ctxt": 0 }, "value": "parm", @@ -17404,7 +17404,7 @@ "type": "Identifier", "span": { "start": 6700, - "end": 6709, + "end": 6701, "ctxt": 0 }, "value": "s", @@ -17664,7 +17664,7 @@ "type": "Identifier", "span": { "start": 6788, - "end": 6806, + "end": 6792, "ctxt": 0 }, "value": "parm", @@ -17909,7 +17909,7 @@ "type": "Identifier", "span": { "start": 6883, - "end": 6901, + "end": 6887, "ctxt": 0 }, "value": "parm", @@ -18099,7 +18099,7 @@ "type": "Identifier", "span": { "start": 6957, - "end": 6975, + "end": 6961, "ctxt": 0 }, "value": "parm", @@ -18309,7 +18309,7 @@ "type": "Identifier", "span": { "start": 7047, - "end": 7065, + "end": 7051, "ctxt": 0 }, "value": "parm", @@ -18528,7 +18528,7 @@ "type": "Identifier", "span": { "start": 7144, - "end": 7165, + "end": 7148, "ctxt": 0 }, "value": "parm", @@ -18728,7 +18728,7 @@ "type": "Identifier", "span": { "start": 7222, - "end": 7243, + "end": 7226, "ctxt": 0 }, "value": "parm", @@ -18948,7 +18948,7 @@ "type": "Identifier", "span": { "start": 7316, - "end": 7337, + "end": 7320, "ctxt": 0 }, "value": "parm", @@ -19177,7 +19177,7 @@ "type": "Identifier", "span": { "start": 7416, - "end": 7428, + "end": 7420, "ctxt": 0 }, "value": "parm", @@ -19336,7 +19336,7 @@ "type": "Identifier", "span": { "start": 7479, - "end": 7496, + "end": 7483, "ctxt": 0 }, "value": "parm", @@ -19515,7 +19515,7 @@ "type": "Identifier", "span": { "start": 7547, - "end": 7575, + "end": 7551, "ctxt": 0 }, "value": "parm", @@ -19723,7 +19723,7 @@ "type": "Identifier", "span": { "start": 7626, - "end": 7645, + "end": 7630, "ctxt": 0 }, "value": "parm", @@ -19947,7 +19947,7 @@ "type": "Identifier", "span": { "start": 7704, - "end": 7728, + "end": 7708, "ctxt": 0 }, "value": "parm", @@ -19971,7 +19971,7 @@ "type": "Identifier", "span": { "start": 7711, - "end": 7720, + "end": 7712, "ctxt": 0 }, "value": "s", @@ -20234,7 +20234,7 @@ "type": "Identifier", "span": { "start": 7807, - "end": 7825, + "end": 7811, "ctxt": 0 }, "value": "parm", @@ -20479,7 +20479,7 @@ "type": "Identifier", "span": { "start": 7904, - "end": 7922, + "end": 7908, "ctxt": 0 }, "value": "parm", @@ -20669,7 +20669,7 @@ "type": "Identifier", "span": { "start": 7980, - "end": 7998, + "end": 7984, "ctxt": 0 }, "value": "parm", @@ -20879,7 +20879,7 @@ "type": "Identifier", "span": { "start": 8072, - "end": 8090, + "end": 8076, "ctxt": 0 }, "value": "parm", @@ -21098,7 +21098,7 @@ "type": "Identifier", "span": { "start": 8170, - "end": 8191, + "end": 8174, "ctxt": 0 }, "value": "parm", @@ -21298,7 +21298,7 @@ "type": "Identifier", "span": { "start": 8249, - "end": 8270, + "end": 8253, "ctxt": 0 }, "value": "parm", @@ -21518,7 +21518,7 @@ "type": "Identifier", "span": { "start": 8344, - "end": 8365, + "end": 8348, "ctxt": 0 }, "value": "parm", @@ -21747,7 +21747,7 @@ "type": "Identifier", "span": { "start": 8445, - "end": 8457, + "end": 8449, "ctxt": 0 }, "value": "parm", @@ -21906,7 +21906,7 @@ "type": "Identifier", "span": { "start": 8509, - "end": 8526, + "end": 8513, "ctxt": 0 }, "value": "parm", @@ -22085,7 +22085,7 @@ "type": "Identifier", "span": { "start": 8578, - "end": 8606, + "end": 8582, "ctxt": 0 }, "value": "parm", @@ -22293,7 +22293,7 @@ "type": "Identifier", "span": { "start": 8658, - "end": 8677, + "end": 8662, "ctxt": 0 }, "value": "parm", @@ -22517,7 +22517,7 @@ "type": "Identifier", "span": { "start": 8737, - "end": 8761, + "end": 8741, "ctxt": 0 }, "value": "parm", @@ -22541,7 +22541,7 @@ "type": "Identifier", "span": { "start": 8744, - "end": 8753, + "end": 8745, "ctxt": 0 }, "value": "s", @@ -22804,7 +22804,7 @@ "type": "Identifier", "span": { "start": 8841, - "end": 8859, + "end": 8845, "ctxt": 0 }, "value": "parm", @@ -23022,7 +23022,7 @@ "type": "Identifier", "span": { "start": 8919, - "end": 8937, + "end": 8923, "ctxt": 0 }, "value": "parm", @@ -23186,7 +23186,7 @@ "type": "Identifier", "span": { "start": 8974, - "end": 8992, + "end": 8978, "ctxt": 0 }, "value": "parm", @@ -23370,7 +23370,7 @@ "type": "Identifier", "span": { "start": 9045, - "end": 9063, + "end": 9049, "ctxt": 0 }, "value": "parm", @@ -23563,7 +23563,7 @@ "type": "Identifier", "span": { "start": 9122, - "end": 9143, + "end": 9126, "ctxt": 0 }, "value": "parm", @@ -23737,7 +23737,7 @@ "type": "Identifier", "span": { "start": 9180, - "end": 9201, + "end": 9184, "ctxt": 0 }, "value": "parm", @@ -23931,7 +23931,7 @@ "type": "Identifier", "span": { "start": 9254, - "end": 9275, + "end": 9258, "ctxt": 0 }, "value": "parm", @@ -24134,7 +24134,7 @@ "type": "Identifier", "span": { "start": 9334, - "end": 9346, + "end": 9338, "ctxt": 0 }, "value": "parm", @@ -24267,7 +24267,7 @@ "type": "Identifier", "span": { "start": 9377, - "end": 9394, + "end": 9381, "ctxt": 0 }, "value": "parm", @@ -24420,7 +24420,7 @@ "type": "Identifier", "span": { "start": 9425, - "end": 9453, + "end": 9429, "ctxt": 0 }, "value": "parm", @@ -24602,7 +24602,7 @@ "type": "Identifier", "span": { "start": 9484, - "end": 9503, + "end": 9488, "ctxt": 0 }, "value": "parm", @@ -24800,7 +24800,7 @@ "type": "Identifier", "span": { "start": 9542, - "end": 9566, + "end": 9546, "ctxt": 0 }, "value": "parm", @@ -24824,7 +24824,7 @@ "type": "Identifier", "span": { "start": 9549, - "end": 9558, + "end": 9550, "ctxt": 0 }, "value": "s", @@ -25061,7 +25061,7 @@ "type": "Identifier", "span": { "start": 9625, - "end": 9643, + "end": 9629, "ctxt": 0 }, "value": "parm", @@ -27003,7 +27003,7 @@ "type": "Identifier", "span": { "start": 10348, - "end": 10357, + "end": 10349, "ctxt": 0 }, "value": "s", @@ -29786,7 +29786,7 @@ "type": "Identifier", "span": { "start": 11443, - "end": 11452, + "end": 11444, "ctxt": 0 }, "value": "s", @@ -32177,7 +32177,7 @@ "type": "Identifier", "span": { "start": 12417, - "end": 12426, + "end": 12418, "ctxt": 0 }, "value": "s", @@ -34671,7 +34671,7 @@ "type": "Identifier", "span": { "start": 13369, - "end": 13378, + "end": 13370, "ctxt": 0 }, "value": "s", @@ -36970,7 +36970,7 @@ "type": "Identifier", "span": { "start": 14176, - "end": 14185, + "end": 14177, "ctxt": 0 }, "value": "s", @@ -39303,7 +39303,7 @@ "type": "Identifier", "span": { "start": 15023, - "end": 15032, + "end": 15024, "ctxt": 0 }, "value": "s", @@ -44326,7 +44326,7 @@ "type": "Identifier", "span": { "start": 16697, - "end": 16706, + "end": 16698, "ctxt": 0 }, "value": "s", @@ -46957,7 +46957,7 @@ "type": "Identifier", "span": { "start": 17478, - "end": 17487, + "end": 17479, "ctxt": 0 }, "value": "s", @@ -55454,7 +55454,7 @@ "type": "Identifier", "span": { "start": 20437, - "end": 20446, + "end": 20438, "ctxt": 0 }, "value": "s", @@ -57864,7 +57864,7 @@ "type": "Identifier", "span": { "start": 21332, - "end": 21341, + "end": 21333, "ctxt": 0 }, "value": "s", @@ -60074,7 +60074,7 @@ "type": "Identifier", "span": { "start": 22174, - "end": 22183, + "end": 22175, "ctxt": 0 }, "value": "s", @@ -60527,7 +60527,7 @@ "type": "Identifier", "span": { "start": 22346, - "end": 22361, + "end": 22347, "ctxt": 0 }, "value": "n", @@ -60723,7 +60723,7 @@ "type": "Identifier", "span": { "start": 22404, - "end": 22419, + "end": 22405, "ctxt": 0 }, "value": "n", @@ -60939,7 +60939,7 @@ "type": "Identifier", "span": { "start": 22478, - "end": 22493, + "end": 22479, "ctxt": 0 }, "value": "n", @@ -61164,7 +61164,7 @@ "type": "Identifier", "span": { "start": 22558, - "end": 22576, + "end": 22559, "ctxt": 0 }, "value": "n", @@ -61370,7 +61370,7 @@ "type": "Identifier", "span": { "start": 22619, - "end": 22637, + "end": 22620, "ctxt": 0 }, "value": "n", @@ -61596,7 +61596,7 @@ "type": "Identifier", "span": { "start": 22696, - "end": 22714, + "end": 22697, "ctxt": 0 }, "value": "n", @@ -61831,7 +61831,7 @@ "type": "Identifier", "span": { "start": 22779, - "end": 22788, + "end": 22780, "ctxt": 0 }, "value": "n", @@ -61996,7 +61996,7 @@ "type": "Identifier", "span": { "start": 22825, - "end": 22839, + "end": 22826, "ctxt": 0 }, "value": "n", @@ -62181,7 +62181,7 @@ "type": "Identifier", "span": { "start": 22876, - "end": 22901, + "end": 22877, "ctxt": 0 }, "value": "n", @@ -62395,7 +62395,7 @@ "type": "Identifier", "span": { "start": 22938, - "end": 22954, + "end": 22939, "ctxt": 0 }, "value": "n", @@ -62625,7 +62625,7 @@ "type": "Identifier", "span": { "start": 22999, - "end": 23020, + "end": 23000, "ctxt": 0 }, "value": "n", @@ -62649,7 +62649,7 @@ "type": "Identifier", "span": { "start": 23003, - "end": 23012, + "end": 23004, "ctxt": 0 }, "value": "s", @@ -62918,7 +62918,7 @@ "type": "Identifier", "span": { "start": 23085, - "end": 23100, + "end": 23086, "ctxt": 0 }, "value": "n", @@ -65345,7 +65345,7 @@ "type": "Identifier", "span": { "start": 23809, - "end": 23818, + "end": 23810, "ctxt": 0 }, "value": "s", @@ -65877,7 +65877,7 @@ "type": "Identifier", "span": { "start": 23976, - "end": 23991, + "end": 23977, "ctxt": 0 }, "value": "n", @@ -66087,7 +66087,7 @@ "type": "Identifier", "span": { "start": 24040, - "end": 24055, + "end": 24041, "ctxt": 0 }, "value": "n", @@ -66317,7 +66317,7 @@ "type": "Identifier", "span": { "start": 24120, - "end": 24135, + "end": 24121, "ctxt": 0 }, "value": "n", @@ -66556,7 +66556,7 @@ "type": "Identifier", "span": { "start": 24206, - "end": 24224, + "end": 24207, "ctxt": 0 }, "value": "n", @@ -66776,7 +66776,7 @@ "type": "Identifier", "span": { "start": 24273, - "end": 24291, + "end": 24274, "ctxt": 0 }, "value": "n", @@ -67016,7 +67016,7 @@ "type": "Identifier", "span": { "start": 24356, - "end": 24374, + "end": 24357, "ctxt": 0 }, "value": "n", @@ -67265,7 +67265,7 @@ "type": "Identifier", "span": { "start": 24445, - "end": 24454, + "end": 24446, "ctxt": 0 }, "value": "n", @@ -67444,7 +67444,7 @@ "type": "Identifier", "span": { "start": 24497, - "end": 24511, + "end": 24498, "ctxt": 0 }, "value": "n", @@ -67643,7 +67643,7 @@ "type": "Identifier", "span": { "start": 24554, - "end": 24579, + "end": 24555, "ctxt": 0 }, "value": "n", @@ -67871,7 +67871,7 @@ "type": "Identifier", "span": { "start": 24622, - "end": 24638, + "end": 24623, "ctxt": 0 }, "value": "n", @@ -68115,7 +68115,7 @@ "type": "Identifier", "span": { "start": 24689, - "end": 24710, + "end": 24690, "ctxt": 0 }, "value": "n", @@ -68139,7 +68139,7 @@ "type": "Identifier", "span": { "start": 24693, - "end": 24702, + "end": 24694, "ctxt": 0 }, "value": "s", @@ -68422,7 +68422,7 @@ "type": "Identifier", "span": { "start": 24781, - "end": 24796, + "end": 24782, "ctxt": 0 }, "value": "n", diff --git a/crates/swc_ecma_parser/tests/tsc/generatorImplicitAny.json b/crates/swc_ecma_parser/tests/tsc/generatorImplicitAny.json index 6a2f0fd4e671..d65e853e5d0c 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorImplicitAny.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorImplicitAny.json @@ -108,7 +108,7 @@ "type": "Identifier", "span": { "start": 227, - "end": 235, + "end": 232, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/generatorOverloads4.json b/crates/swc_ecma_parser/tests/tsc/generatorOverloads4.json index 0a2b5784e2ef..58f64e357d12 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorOverloads4.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorOverloads4.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 32, - "end": 41, + "end": 33, "ctxt": 0 }, "value": "s", @@ -176,7 +176,7 @@ "type": "Identifier", "span": { "start": 65, - "end": 74, + "end": 66, "ctxt": 0 }, "value": "s", @@ -295,7 +295,7 @@ "type": "Identifier", "span": { "start": 99, - "end": 105, + "end": 100, "ctxt": 0 }, "value": "s", diff --git a/crates/swc_ecma_parser/tests/tsc/generatorOverloads5.json b/crates/swc_ecma_parser/tests/tsc/generatorOverloads5.json index 9d8843936891..3421023a50f8 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorOverloads5.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorOverloads5.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 42, - "end": 51, + "end": 43, "ctxt": 0 }, "value": "s", @@ -166,7 +166,7 @@ "type": "Identifier", "span": { "start": 84, - "end": 93, + "end": 85, "ctxt": 0 }, "value": "s", @@ -273,7 +273,7 @@ "type": "Identifier", "span": { "start": 127, - "end": 133, + "end": 128, "ctxt": 0 }, "value": "s", diff --git a/crates/swc_ecma_parser/tests/tsc/generatorReturnTypeInference.json b/crates/swc_ecma_parser/tests/tsc/generatorReturnTypeInference.json index df627b8c78dc..00af87936c28 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorReturnTypeInference.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorReturnTypeInference.json @@ -1257,7 +1257,7 @@ "type": "Identifier", "span": { "start": 1439, - "end": 1448, + "end": 1440, "ctxt": 0 }, "value": "x", @@ -1336,7 +1336,7 @@ "type": "Identifier", "span": { "start": 1477, - "end": 1486, + "end": 1478, "ctxt": 0 }, "value": "x", @@ -1525,7 +1525,7 @@ "type": "Identifier", "span": { "start": 1600, - "end": 1604, + "end": 1601, "ctxt": 0 }, "value": "x", @@ -2559,7 +2559,7 @@ "type": "Identifier", "span": { "start": 2443, - "end": 2447, + "end": 2444, "ctxt": 0 }, "value": "x", @@ -2768,7 +2768,7 @@ "type": "Identifier", "span": { "start": 2540, - "end": 2544, + "end": 2541, "ctxt": 0 }, "value": "x", @@ -2814,7 +2814,7 @@ "type": "Identifier", "span": { "start": 2546, - "end": 2550, + "end": 2547, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/generatorReturnTypeInferenceNonStrict.json b/crates/swc_ecma_parser/tests/tsc/generatorReturnTypeInferenceNonStrict.json index cbf95c84bb1d..1351879eda20 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorReturnTypeInferenceNonStrict.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorReturnTypeInferenceNonStrict.json @@ -1257,7 +1257,7 @@ "type": "Identifier", "span": { "start": 1610, - "end": 1619, + "end": 1611, "ctxt": 0 }, "value": "x", @@ -1336,7 +1336,7 @@ "type": "Identifier", "span": { "start": 1648, - "end": 1657, + "end": 1649, "ctxt": 0 }, "value": "x", @@ -1525,7 +1525,7 @@ "type": "Identifier", "span": { "start": 1771, - "end": 1775, + "end": 1772, "ctxt": 0 }, "value": "x", @@ -2559,7 +2559,7 @@ "type": "Identifier", "span": { "start": 2624, - "end": 2628, + "end": 2625, "ctxt": 0 }, "value": "x", @@ -2768,7 +2768,7 @@ "type": "Identifier", "span": { "start": 2721, - "end": 2725, + "end": 2722, "ctxt": 0 }, "value": "x", @@ -2814,7 +2814,7 @@ "type": "Identifier", "span": { "start": 2727, - "end": 2731, + "end": 2728, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck26.json b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck26.json index d7bdde5c07ad..3b7a01202912 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck26.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck26.json @@ -297,7 +297,7 @@ "type": "Identifier", "span": { "start": 49, - "end": 58, + "end": 50, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck27.json b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck27.json index 16e5fe989c4a..4f8d6f7c0824 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck27.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck27.json @@ -205,7 +205,7 @@ "type": "Identifier", "span": { "start": 49, - "end": 58, + "end": 50, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck28.json b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck28.json index 3938bd59ce3c..50da7036d1b8 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck28.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck28.json @@ -240,7 +240,7 @@ "type": "Identifier", "span": { "start": 49, - "end": 58, + "end": 50, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck29.json b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck29.json index 93c02a8db8de..120175ce70f5 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck29.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck29.json @@ -230,7 +230,7 @@ "type": "Identifier", "span": { "start": 51, - "end": 60, + "end": 52, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck30.json b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck30.json index 93c02a8db8de..120175ce70f5 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck30.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck30.json @@ -230,7 +230,7 @@ "type": "Identifier", "span": { "start": 51, - "end": 60, + "end": 52, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck31.json b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck31.json index f8bfe7c48780..1f7d9b832df3 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck31.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck31.json @@ -246,7 +246,7 @@ "type": "Identifier", "span": { "start": 57, - "end": 66, + "end": 58, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck45.json b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck45.json index cb0c603f5f3c..9df786227b74 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck45.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck45.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 43, - "end": 47, + "end": 44, "ctxt": 0 }, "value": "x", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 49, - "end": 81, + "end": 52, "ctxt": 0 }, "value": "fun", @@ -143,7 +143,7 @@ "type": "Identifier", "span": { "start": 70, - "end": 74, + "end": 71, "ctxt": 0 }, "value": "x", @@ -226,7 +226,7 @@ "type": "Identifier", "span": { "start": 83, - "end": 100, + "end": 87, "ctxt": 0 }, "value": "fun2", @@ -250,7 +250,7 @@ "type": "Identifier", "span": { "start": 90, - "end": 94, + "end": 91, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck46.json b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck46.json index 2424bd860040..c10e5c3cdef8 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck46.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck46.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 43, - "end": 47, + "end": 44, "ctxt": 0 }, "value": "x", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 49, - "end": 81, + "end": 52, "ctxt": 0 }, "value": "fun", @@ -143,7 +143,7 @@ "type": "Identifier", "span": { "start": 70, - "end": 74, + "end": 71, "ctxt": 0 }, "value": "x", @@ -226,7 +226,7 @@ "type": "Identifier", "span": { "start": 83, - "end": 100, + "end": 87, "ctxt": 0 }, "value": "fun2", @@ -250,7 +250,7 @@ "type": "Identifier", "span": { "start": 90, - "end": 94, + "end": 91, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck62.json b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck62.json index d711c1780014..a249b44939b7 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck62.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck62.json @@ -119,7 +119,7 @@ "type": "Identifier", "span": { "start": 185, - "end": 202, + "end": 194, "ctxt": 0 }, "value": "stratName", @@ -155,7 +155,7 @@ "type": "Identifier", "span": { "start": 204, - "end": 250, + "end": 207, "ctxt": 0 }, "value": "gen", @@ -179,7 +179,7 @@ "type": "Identifier", "span": { "start": 210, - "end": 214, + "end": 211, "ctxt": 0 }, "value": "a", @@ -632,7 +632,7 @@ "type": "Identifier", "span": { "start": 254, - "end": 258, + "end": 255, "ctxt": 0 }, "value": "a", @@ -824,7 +824,7 @@ "type": "Identifier", "span": { "start": 539, - "end": 543, + "end": 540, "ctxt": 0 }, "value": "a", @@ -1176,7 +1176,7 @@ "type": "Identifier", "span": { "start": 721, - "end": 733, + "end": 726, "ctxt": 0 }, "value": "state", @@ -1397,7 +1397,7 @@ "type": "Identifier", "span": { "start": 831, - "end": 843, + "end": 836, "ctxt": 0 }, "value": "state", @@ -1627,7 +1627,7 @@ "type": "Identifier", "span": { "start": 941, - "end": 953, + "end": 946, "ctxt": 0 }, "value": "state", diff --git a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck63.json b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck63.json index 3aebebec660f..d2f58f48a35f 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck63.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck63.json @@ -119,7 +119,7 @@ "type": "Identifier", "span": { "start": 185, - "end": 202, + "end": 194, "ctxt": 0 }, "value": "stratName", @@ -155,7 +155,7 @@ "type": "Identifier", "span": { "start": 204, - "end": 250, + "end": 207, "ctxt": 0 }, "value": "gen", @@ -179,7 +179,7 @@ "type": "Identifier", "span": { "start": 210, - "end": 214, + "end": 211, "ctxt": 0 }, "value": "a", @@ -632,7 +632,7 @@ "type": "Identifier", "span": { "start": 254, - "end": 258, + "end": 255, "ctxt": 0 }, "value": "a", @@ -824,7 +824,7 @@ "type": "Identifier", "span": { "start": 539, - "end": 543, + "end": 540, "ctxt": 0 }, "value": "a", @@ -1176,7 +1176,7 @@ "type": "Identifier", "span": { "start": 721, - "end": 733, + "end": 726, "ctxt": 0 }, "value": "state", @@ -1424,7 +1424,7 @@ "type": "Identifier", "span": { "start": 845, - "end": 857, + "end": 850, "ctxt": 0 }, "value": "state", @@ -1626,7 +1626,7 @@ "type": "Identifier", "span": { "start": 938, - "end": 950, + "end": 943, "ctxt": 0 }, "value": "state", @@ -1847,7 +1847,7 @@ "type": "Identifier", "span": { "start": 1045, - "end": 1057, + "end": 1050, "ctxt": 0 }, "value": "state", diff --git a/crates/swc_ecma_parser/tests/tsc/generatorYieldContextualType.json b/crates/swc_ecma_parser/tests/tsc/generatorYieldContextualType.json index 67485e4bb668..b6786921efbd 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorYieldContextualType.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorYieldContextualType.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 83, - "end": 112, + "end": 86, "ctxt": 0 }, "value": "gen", @@ -472,7 +472,7 @@ "type": "Identifier", "span": { "start": 213, - "end": 268, + "end": 216, "ctxt": 0 }, "value": "gen", @@ -1139,7 +1139,7 @@ "type": "Identifier", "span": { "start": 471, - "end": 491, + "end": 476, "ctxt": 0 }, "value": "value", @@ -3974,7 +3974,7 @@ "type": "Identifier", "span": { "start": 2074, - "end": 2082, + "end": 2079, "ctxt": 0 }, "value": "_step", @@ -4020,7 +4020,7 @@ "type": "Identifier", "span": { "start": 2086, - "end": 2110, + "end": 2092, "ctxt": 0 }, "value": "_state", @@ -4066,7 +4066,7 @@ "type": "Identifier", "span": { "start": 2114, - "end": 2153, + "end": 2124, "ctxt": 0 }, "value": "_selection", @@ -4353,7 +4353,7 @@ "type": "Identifier", "span": { "start": 2260, - "end": 2282, + "end": 2264, "ctxt": 0 }, "value": "step", @@ -4585,7 +4585,7 @@ "type": "Identifier", "span": { "start": 2458, - "end": 2470, + "end": 2463, "ctxt": 0 }, "value": "state", @@ -4631,7 +4631,7 @@ "type": "Identifier", "span": { "start": 2472, - "end": 2489, + "end": 2480, "ctxt": 0 }, "value": "_context", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallToOverloadedMethodWithOverloadedArguments.json b/crates/swc_ecma_parser/tests/tsc/genericCallToOverloadedMethodWithOverloadedArguments.json index aae01118aced..097deccabcf9 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallToOverloadedMethodWithOverloadedArguments.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallToOverloadedMethodWithOverloadedArguments.json @@ -118,7 +118,7 @@ "type": "Identifier", "span": { "start": 57, - "end": 81, + "end": 59, "ctxt": 0 }, "value": "cb", @@ -142,7 +142,7 @@ "type": "Identifier", "span": { "start": 62, - "end": 66, + "end": 63, "ctxt": 0 }, "value": "x", @@ -354,7 +354,7 @@ "type": "Identifier", "span": { "start": 137, - "end": 146, + "end": 138, "ctxt": 0 }, "value": "n", @@ -711,7 +711,7 @@ "type": "Identifier", "span": { "start": 354, - "end": 378, + "end": 356, "ctxt": 0 }, "value": "cb", @@ -735,7 +735,7 @@ "type": "Identifier", "span": { "start": 359, - "end": 363, + "end": 360, "ctxt": 0 }, "value": "x", @@ -947,7 +947,7 @@ "type": "Identifier", "span": { "start": 434, - "end": 443, + "end": 435, "ctxt": 0 }, "value": "n", @@ -1054,7 +1054,7 @@ "type": "Identifier", "span": { "start": 497, - "end": 506, + "end": 498, "ctxt": 0 }, "value": "s", @@ -1411,7 +1411,7 @@ "type": "Identifier", "span": { "start": 714, - "end": 738, + "end": 716, "ctxt": 0 }, "value": "cb", @@ -1435,7 +1435,7 @@ "type": "Identifier", "span": { "start": 719, - "end": 723, + "end": 720, "ctxt": 0 }, "value": "x", @@ -1643,7 +1643,7 @@ "type": "Identifier", "span": { "start": 769, - "end": 793, + "end": 771, "ctxt": 0 }, "value": "cb", @@ -1667,7 +1667,7 @@ "type": "Identifier", "span": { "start": 774, - "end": 778, + "end": 775, "ctxt": 0 }, "value": "x", @@ -1764,7 +1764,7 @@ "type": "Identifier", "span": { "start": 795, - "end": 829, + "end": 800, "ctxt": 0 }, "value": "error", @@ -1788,7 +1788,7 @@ "type": "Identifier", "span": { "start": 804, - "end": 814, + "end": 809, "ctxt": 0 }, "value": "error", @@ -1990,7 +1990,7 @@ "type": "Identifier", "span": { "start": 885, - "end": 894, + "end": 886, "ctxt": 0 }, "value": "n", @@ -2347,7 +2347,7 @@ "type": "Identifier", "span": { "start": 1102, - "end": 1126, + "end": 1104, "ctxt": 0 }, "value": "cb", @@ -2371,7 +2371,7 @@ "type": "Identifier", "span": { "start": 1107, - "end": 1111, + "end": 1108, "ctxt": 0 }, "value": "x", @@ -2579,7 +2579,7 @@ "type": "Identifier", "span": { "start": 1157, - "end": 1181, + "end": 1159, "ctxt": 0 }, "value": "cb", @@ -2603,7 +2603,7 @@ "type": "Identifier", "span": { "start": 1162, - "end": 1166, + "end": 1163, "ctxt": 0 }, "value": "x", @@ -2700,7 +2700,7 @@ "type": "Identifier", "span": { "start": 1183, - "end": 1217, + "end": 1188, "ctxt": 0 }, "value": "error", @@ -2724,7 +2724,7 @@ "type": "Identifier", "span": { "start": 1192, - "end": 1202, + "end": 1197, "ctxt": 0 }, "value": "error", @@ -2926,7 +2926,7 @@ "type": "Identifier", "span": { "start": 1273, - "end": 1282, + "end": 1274, "ctxt": 0 }, "value": "n", @@ -3033,7 +3033,7 @@ "type": "Identifier", "span": { "start": 1336, - "end": 1345, + "end": 1337, "ctxt": 0 }, "value": "s", @@ -3390,7 +3390,7 @@ "type": "Identifier", "span": { "start": 1553, - "end": 1577, + "end": 1555, "ctxt": 0 }, "value": "cb", @@ -3414,7 +3414,7 @@ "type": "Identifier", "span": { "start": 1558, - "end": 1562, + "end": 1559, "ctxt": 0 }, "value": "x", @@ -3622,7 +3622,7 @@ "type": "Identifier", "span": { "start": 1608, - "end": 1632, + "end": 1610, "ctxt": 0 }, "value": "cb", @@ -3646,7 +3646,7 @@ "type": "Identifier", "span": { "start": 1613, - "end": 1617, + "end": 1614, "ctxt": 0 }, "value": "x", @@ -3743,7 +3743,7 @@ "type": "Identifier", "span": { "start": 1634, - "end": 1668, + "end": 1639, "ctxt": 0 }, "value": "error", @@ -3767,7 +3767,7 @@ "type": "Identifier", "span": { "start": 1643, - "end": 1653, + "end": 1648, "ctxt": 0 }, "value": "error", @@ -3965,7 +3965,7 @@ "type": "Identifier", "span": { "start": 1699, - "end": 1723, + "end": 1701, "ctxt": 0 }, "value": "cb", @@ -3989,7 +3989,7 @@ "type": "Identifier", "span": { "start": 1704, - "end": 1708, + "end": 1705, "ctxt": 0 }, "value": "x", @@ -4086,7 +4086,7 @@ "type": "Identifier", "span": { "start": 1725, - "end": 1750, + "end": 1730, "ctxt": 0 }, "value": "error", @@ -4110,7 +4110,7 @@ "type": "Identifier", "span": { "start": 1734, - "end": 1744, + "end": 1739, "ctxt": 0 }, "value": "error", @@ -4169,7 +4169,7 @@ "type": "Identifier", "span": { "start": 1752, - "end": 1790, + "end": 1760, "ctxt": 0 }, "value": "progress", @@ -4193,7 +4193,7 @@ "type": "Identifier", "span": { "start": 1764, - "end": 1781, + "end": 1776, "ctxt": 0 }, "value": "preservation", @@ -4357,7 +4357,7 @@ "type": "Identifier", "span": { "start": 1846, - "end": 1855, + "end": 1847, "ctxt": 0 }, "value": "n", @@ -4464,7 +4464,7 @@ "type": "Identifier", "span": { "start": 1909, - "end": 1918, + "end": 1910, "ctxt": 0 }, "value": "s", @@ -4821,7 +4821,7 @@ "type": "Identifier", "span": { "start": 2126, - "end": 2150, + "end": 2128, "ctxt": 0 }, "value": "cb", @@ -4845,7 +4845,7 @@ "type": "Identifier", "span": { "start": 2131, - "end": 2135, + "end": 2132, "ctxt": 0 }, "value": "x", @@ -5053,7 +5053,7 @@ "type": "Identifier", "span": { "start": 2181, - "end": 2205, + "end": 2183, "ctxt": 0 }, "value": "cb", @@ -5077,7 +5077,7 @@ "type": "Identifier", "span": { "start": 2186, - "end": 2190, + "end": 2187, "ctxt": 0 }, "value": "x", @@ -5174,7 +5174,7 @@ "type": "Identifier", "span": { "start": 2207, - "end": 2241, + "end": 2212, "ctxt": 0 }, "value": "error", @@ -5198,7 +5198,7 @@ "type": "Identifier", "span": { "start": 2216, - "end": 2226, + "end": 2221, "ctxt": 0 }, "value": "error", @@ -5400,7 +5400,7 @@ "type": "Identifier", "span": { "start": 2297, - "end": 2306, + "end": 2298, "ctxt": 0 }, "value": "n", @@ -5507,7 +5507,7 @@ "type": "Identifier", "span": { "start": 2360, - "end": 2369, + "end": 2361, "ctxt": 0 }, "value": "s", @@ -5614,7 +5614,7 @@ "type": "Identifier", "span": { "start": 2423, - "end": 2433, + "end": 2424, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallTypeArgumentInference.json b/crates/swc_ecma_parser/tests/tsc/genericCallTypeArgumentInference.json index 521c09863487..de977a14a709 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallTypeArgumentInference.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallTypeArgumentInference.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 81, - "end": 85, + "end": 82, "ctxt": 0 }, "value": "t", @@ -230,7 +230,7 @@ "type": "Identifier", "span": { "start": 154, - "end": 158, + "end": 155, "ctxt": 0 }, "value": "t", @@ -276,7 +276,7 @@ "type": "Identifier", "span": { "start": 160, - "end": 164, + "end": 161, "ctxt": 0 }, "value": "u", @@ -431,7 +431,7 @@ "type": "Identifier", "span": { "start": 206, - "end": 210, + "end": 207, "ctxt": 0 }, "value": "u", @@ -817,7 +817,7 @@ "type": "Identifier", "span": { "start": 342, - "end": 346, + "end": 343, "ctxt": 0 }, "value": "t", @@ -866,7 +866,7 @@ "type": "Identifier", "span": { "start": 355, - "end": 359, + "end": 356, "ctxt": 0 }, "value": "u", @@ -944,7 +944,7 @@ "type": "Identifier", "span": { "start": 378, - "end": 382, + "end": 379, "ctxt": 0 }, "value": "t", @@ -990,7 +990,7 @@ "type": "Identifier", "span": { "start": 384, - "end": 388, + "end": 385, "ctxt": 0 }, "value": "u", @@ -1102,7 +1102,7 @@ "type": "Identifier", "span": { "start": 426, - "end": 430, + "end": 427, "ctxt": 0 }, "value": "t", @@ -1148,7 +1148,7 @@ "type": "Identifier", "span": { "start": 432, - "end": 436, + "end": 433, "ctxt": 0 }, "value": "u", @@ -1260,7 +1260,7 @@ "type": "Identifier", "span": { "start": 477, - "end": 481, + "end": 478, "ctxt": 0 }, "value": "t", @@ -1306,7 +1306,7 @@ "type": "Identifier", "span": { "start": 483, - "end": 487, + "end": 484, "ctxt": 0 }, "value": "u", @@ -1450,7 +1450,7 @@ "type": "Identifier", "span": { "start": 528, - "end": 532, + "end": 529, "ctxt": 0 }, "value": "t", @@ -1496,7 +1496,7 @@ "type": "Identifier", "span": { "start": 534, - "end": 538, + "end": 535, "ctxt": 0 }, "value": "u", @@ -1640,7 +1640,7 @@ "type": "Identifier", "span": { "start": 581, - "end": 585, + "end": 582, "ctxt": 0 }, "value": "t", @@ -1686,7 +1686,7 @@ "type": "Identifier", "span": { "start": 587, - "end": 591, + "end": 588, "ctxt": 0 }, "value": "u", @@ -2032,7 +2032,7 @@ "type": "Identifier", "span": { "start": 697, - "end": 701, + "end": 698, "ctxt": 0 }, "value": "u", @@ -3348,7 +3348,7 @@ "type": "Identifier", "span": { "start": 1121, - "end": 1125, + "end": 1122, "ctxt": 0 }, "value": "t", @@ -3385,7 +3385,7 @@ "type": "Identifier", "span": { "start": 1127, - "end": 1131, + "end": 1128, "ctxt": 0 }, "value": "u", @@ -3447,7 +3447,7 @@ "type": "Identifier", "span": { "start": 1142, - "end": 1146, + "end": 1143, "ctxt": 0 }, "value": "t", @@ -3484,7 +3484,7 @@ "type": "Identifier", "span": { "start": 1148, - "end": 1152, + "end": 1149, "ctxt": 0 }, "value": "u", @@ -3572,7 +3572,7 @@ "type": "Identifier", "span": { "start": 1167, - "end": 1171, + "end": 1168, "ctxt": 0 }, "value": "t", @@ -3609,7 +3609,7 @@ "type": "Identifier", "span": { "start": 1173, - "end": 1177, + "end": 1174, "ctxt": 0 }, "value": "u", @@ -3697,7 +3697,7 @@ "type": "Identifier", "span": { "start": 1195, - "end": 1199, + "end": 1196, "ctxt": 0 }, "value": "t", @@ -3734,7 +3734,7 @@ "type": "Identifier", "span": { "start": 1201, - "end": 1205, + "end": 1202, "ctxt": 0 }, "value": "u", @@ -3854,7 +3854,7 @@ "type": "Identifier", "span": { "start": 1223, - "end": 1227, + "end": 1224, "ctxt": 0 }, "value": "t", @@ -3891,7 +3891,7 @@ "type": "Identifier", "span": { "start": 1229, - "end": 1233, + "end": 1230, "ctxt": 0 }, "value": "u", @@ -4011,7 +4011,7 @@ "type": "Identifier", "span": { "start": 1254, - "end": 1258, + "end": 1255, "ctxt": 0 }, "value": "t", @@ -4048,7 +4048,7 @@ "type": "Identifier", "span": { "start": 1260, - "end": 1264, + "end": 1261, "ctxt": 0 }, "value": "u", @@ -4296,7 +4296,7 @@ "type": "Identifier", "span": { "start": 1306, - "end": 1310, + "end": 1307, "ctxt": 0 }, "value": "u", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithArrayLiteralArgs.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithArrayLiteralArgs.json index d3e59b2a8b42..cf92acc70f6c 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithArrayLiteralArgs.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithArrayLiteralArgs.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 17, - "end": 21, + "end": 18, "ctxt": 0 }, "value": "t", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithConstraintsTypeArgumentInference.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithConstraintsTypeArgumentInference.json index 5d4b81567b32..6c53ad0e56ae 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithConstraintsTypeArgumentInference.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithConstraintsTypeArgumentInference.json @@ -443,7 +443,7 @@ "type": "Identifier", "span": { "start": 279, - "end": 283, + "end": 280, "ctxt": 0 }, "value": "t", @@ -725,7 +725,7 @@ "type": "Identifier", "span": { "start": 407, - "end": 411, + "end": 408, "ctxt": 0 }, "value": "t", @@ -771,7 +771,7 @@ "type": "Identifier", "span": { "start": 413, - "end": 417, + "end": 414, "ctxt": 0 }, "value": "u", @@ -962,7 +962,7 @@ "type": "Identifier", "span": { "start": 488, - "end": 492, + "end": 489, "ctxt": 0 }, "value": "u", @@ -1560,7 +1560,7 @@ "type": "Identifier", "span": { "start": 736, - "end": 740, + "end": 737, "ctxt": 0 }, "value": "t", @@ -1609,7 +1609,7 @@ "type": "Identifier", "span": { "start": 749, - "end": 753, + "end": 750, "ctxt": 0 }, "value": "u", @@ -1687,7 +1687,7 @@ "type": "Identifier", "span": { "start": 772, - "end": 776, + "end": 773, "ctxt": 0 }, "value": "t", @@ -1733,7 +1733,7 @@ "type": "Identifier", "span": { "start": 778, - "end": 782, + "end": 779, "ctxt": 0 }, "value": "u", @@ -1845,7 +1845,7 @@ "type": "Identifier", "span": { "start": 820, - "end": 824, + "end": 821, "ctxt": 0 }, "value": "t", @@ -1891,7 +1891,7 @@ "type": "Identifier", "span": { "start": 826, - "end": 830, + "end": 827, "ctxt": 0 }, "value": "u", @@ -2003,7 +2003,7 @@ "type": "Identifier", "span": { "start": 887, - "end": 891, + "end": 888, "ctxt": 0 }, "value": "t", @@ -2049,7 +2049,7 @@ "type": "Identifier", "span": { "start": 893, - "end": 897, + "end": 894, "ctxt": 0 }, "value": "u", @@ -2211,7 +2211,7 @@ "type": "Identifier", "span": { "start": 955, - "end": 959, + "end": 956, "ctxt": 0 }, "value": "t", @@ -2257,7 +2257,7 @@ "type": "Identifier", "span": { "start": 961, - "end": 965, + "end": 962, "ctxt": 0 }, "value": "u", @@ -2419,7 +2419,7 @@ "type": "Identifier", "span": { "start": 1042, - "end": 1046, + "end": 1043, "ctxt": 0 }, "value": "t", @@ -2465,7 +2465,7 @@ "type": "Identifier", "span": { "start": 1048, - "end": 1052, + "end": 1049, "ctxt": 0 }, "value": "u", @@ -2883,7 +2883,7 @@ "type": "Identifier", "span": { "start": 1220, - "end": 1224, + "end": 1221, "ctxt": 0 }, "value": "u", @@ -4443,7 +4443,7 @@ "type": "Identifier", "span": { "start": 1743, - "end": 1747, + "end": 1744, "ctxt": 0 }, "value": "t", @@ -4480,7 +4480,7 @@ "type": "Identifier", "span": { "start": 1749, - "end": 1753, + "end": 1750, "ctxt": 0 }, "value": "u", @@ -4542,7 +4542,7 @@ "type": "Identifier", "span": { "start": 1764, - "end": 1768, + "end": 1765, "ctxt": 0 }, "value": "t", @@ -4579,7 +4579,7 @@ "type": "Identifier", "span": { "start": 1770, - "end": 1774, + "end": 1771, "ctxt": 0 }, "value": "u", @@ -4667,7 +4667,7 @@ "type": "Identifier", "span": { "start": 1789, - "end": 1793, + "end": 1790, "ctxt": 0 }, "value": "t", @@ -4704,7 +4704,7 @@ "type": "Identifier", "span": { "start": 1795, - "end": 1799, + "end": 1796, "ctxt": 0 }, "value": "u", @@ -4792,7 +4792,7 @@ "type": "Identifier", "span": { "start": 1833, - "end": 1837, + "end": 1834, "ctxt": 0 }, "value": "t", @@ -4829,7 +4829,7 @@ "type": "Identifier", "span": { "start": 1839, - "end": 1843, + "end": 1840, "ctxt": 0 }, "value": "u", @@ -4967,7 +4967,7 @@ "type": "Identifier", "span": { "start": 1878, - "end": 1882, + "end": 1879, "ctxt": 0 }, "value": "t", @@ -5004,7 +5004,7 @@ "type": "Identifier", "span": { "start": 1884, - "end": 1888, + "end": 1885, "ctxt": 0 }, "value": "u", @@ -5142,7 +5142,7 @@ "type": "Identifier", "span": { "start": 1942, - "end": 1946, + "end": 1943, "ctxt": 0 }, "value": "t", @@ -5179,7 +5179,7 @@ "type": "Identifier", "span": { "start": 1948, - "end": 1952, + "end": 1949, "ctxt": 0 }, "value": "u", @@ -5499,7 +5499,7 @@ "type": "Identifier", "span": { "start": 2056, - "end": 2060, + "end": 2057, "ctxt": 0 }, "value": "u", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithConstraintsTypeArgumentInference2.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithConstraintsTypeArgumentInference2.json index 0d1677762a00..5f964704cf40 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithConstraintsTypeArgumentInference2.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithConstraintsTypeArgumentInference2.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 111, - "end": 115, + "end": 112, "ctxt": 0 }, "value": "t", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithConstructorTypedArguments5.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithConstructorTypedArguments5.json index 35641fa134d8..d41d0f60e78b 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithConstructorTypedArguments5.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithConstructorTypedArguments5.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 176, - "end": 203, + "end": 179, "ctxt": 0 }, "value": "arg", @@ -93,7 +93,7 @@ "type": "Identifier", "span": { "start": 191, - "end": 195, + "end": 192, "ctxt": 0 }, "value": "t", @@ -382,7 +382,7 @@ "type": "Identifier", "span": { "start": 261, - "end": 265, + "end": 262, "ctxt": 0 }, "value": "x", @@ -628,7 +628,7 @@ "type": "Identifier", "span": { "start": 353, - "end": 357, + "end": 354, "ctxt": 0 }, "value": "x", @@ -665,7 +665,7 @@ "type": "Identifier", "span": { "start": 359, - "end": 363, + "end": 360, "ctxt": 0 }, "value": "y", @@ -911,7 +911,7 @@ "type": "Identifier", "span": { "start": 428, - "end": 437, + "end": 429, "ctxt": 0 }, "value": "x", @@ -938,7 +938,7 @@ "type": "Identifier", "span": { "start": 439, - "end": 448, + "end": 440, "ctxt": 0 }, "value": "y", @@ -1086,7 +1086,7 @@ "type": "Identifier", "span": { "start": 513, - "end": 547, + "end": 516, "ctxt": 0 }, "value": "arg", @@ -1147,7 +1147,7 @@ "type": "Identifier", "span": { "start": 528, - "end": 532, + "end": 529, "ctxt": 0 }, "value": "t", @@ -1184,7 +1184,7 @@ "type": "Identifier", "span": { "start": 534, - "end": 539, + "end": 536, "ctxt": 0 }, "value": "t2", @@ -1550,7 +1550,7 @@ "type": "Identifier", "span": { "start": 652, - "end": 661, + "end": 653, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments.json index c4b76c735a09..264f89baf06f 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 172, - "end": 186, + "end": 173, "ctxt": 0 }, "value": "x", @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 176, - "end": 180, + "end": 177, "ctxt": 0 }, "value": "a", @@ -649,7 +649,7 @@ "type": "Identifier", "span": { "start": 349, - "end": 353, + "end": 350, "ctxt": 0 }, "value": "x", @@ -695,7 +695,7 @@ "type": "Identifier", "span": { "start": 355, - "end": 370, + "end": 357, "ctxt": 0 }, "value": "cb", @@ -719,7 +719,7 @@ "type": "Identifier", "span": { "start": 360, - "end": 364, + "end": 361, "ctxt": 0 }, "value": "a", @@ -981,7 +981,7 @@ "type": "Identifier", "span": { "start": 425, - "end": 429, + "end": 426, "ctxt": 0 }, "value": "a", @@ -1414,7 +1414,7 @@ "type": "Identifier", "span": { "start": 636, - "end": 640, + "end": 637, "ctxt": 0 }, "value": "x", @@ -1460,7 +1460,7 @@ "type": "Identifier", "span": { "start": 642, - "end": 657, + "end": 644, "ctxt": 0 }, "value": "cb", @@ -1484,7 +1484,7 @@ "type": "Identifier", "span": { "start": 647, - "end": 651, + "end": 648, "ctxt": 0 }, "value": "a", @@ -1562,7 +1562,7 @@ "type": "Identifier", "span": { "start": 659, - "end": 663, + "end": 660, "ctxt": 0 }, "value": "y", @@ -2206,7 +2206,7 @@ "type": "Identifier", "span": { "start": 877, - "end": 881, + "end": 878, "ctxt": 0 }, "value": "t", @@ -2252,7 +2252,7 @@ "type": "Identifier", "span": { "start": 883, - "end": 887, + "end": 884, "ctxt": 0 }, "value": "u", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments2.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments2.json index 04fa8b28f600..1fc18c5d1fc7 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments2.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments2.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 183, - "end": 200, + "end": 184, "ctxt": 0 }, "value": "x", @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 190, - "end": 194, + "end": 191, "ctxt": 0 }, "value": "a", @@ -257,7 +257,7 @@ "type": "Identifier", "span": { "start": 257, - "end": 261, + "end": 258, "ctxt": 0 }, "value": "x", @@ -427,7 +427,7 @@ "type": "Identifier", "span": { "start": 296, - "end": 300, + "end": 297, "ctxt": 0 }, "value": "x", @@ -682,7 +682,7 @@ "type": "Identifier", "span": { "start": 359, - "end": 363, + "end": 360, "ctxt": 0 }, "value": "x", @@ -1094,7 +1094,7 @@ "type": "Identifier", "span": { "start": 505, - "end": 509, + "end": 506, "ctxt": 0 }, "value": "x", @@ -1140,7 +1140,7 @@ "type": "Identifier", "span": { "start": 511, - "end": 529, + "end": 513, "ctxt": 0 }, "value": "cb", @@ -1164,7 +1164,7 @@ "type": "Identifier", "span": { "start": 519, - "end": 523, + "end": 520, "ctxt": 0 }, "value": "a", @@ -1719,7 +1719,7 @@ "type": "Identifier", "span": { "start": 716, - "end": 720, + "end": 717, "ctxt": 0 }, "value": "x", @@ -1765,7 +1765,7 @@ "type": "Identifier", "span": { "start": 722, - "end": 740, + "end": 724, "ctxt": 0 }, "value": "cb", @@ -1789,7 +1789,7 @@ "type": "Identifier", "span": { "start": 730, - "end": 734, + "end": 731, "ctxt": 0 }, "value": "a", @@ -1868,7 +1868,7 @@ "type": "Identifier", "span": { "start": 742, - "end": 746, + "end": 743, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments3.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments3.json index 4524becef9de..adf4ecd1ea79 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments3.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments3.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 106, - "end": 116, + "end": 107, "ctxt": 0 }, "value": "x", @@ -114,7 +114,7 @@ "type": "Identifier", "span": { "start": 133, - "end": 142, + "end": 134, "ctxt": 0 }, "value": "x", @@ -192,7 +192,7 @@ "type": "Identifier", "span": { "start": 173, - "end": 188, + "end": 175, "ctxt": 0 }, "value": "cb", @@ -216,7 +216,7 @@ "type": "Identifier", "span": { "start": 178, - "end": 182, + "end": 179, "ctxt": 0 }, "value": "x", @@ -555,7 +555,7 @@ "type": "Identifier", "span": { "start": 340, - "end": 350, + "end": 341, "ctxt": 0 }, "value": "x", @@ -652,7 +652,7 @@ "type": "Identifier", "span": { "start": 364, - "end": 368, + "end": 365, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments4.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments4.json index 81fef7b2c6c8..0a771ceb33de 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments4.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments4.json @@ -203,7 +203,7 @@ "type": "Identifier", "span": { "start": 157, - "end": 167, + "end": 158, "ctxt": 0 }, "value": "x", @@ -268,7 +268,7 @@ "type": "Identifier", "span": { "start": 181, - "end": 190, + "end": 182, "ctxt": 0 }, "value": "x", @@ -356,7 +356,7 @@ "type": "Identifier", "span": { "start": 219, - "end": 237, + "end": 221, "ctxt": 0 }, "value": "cb", @@ -380,7 +380,7 @@ "type": "Identifier", "span": { "start": 227, - "end": 231, + "end": 228, "ctxt": 0 }, "value": "x", @@ -720,7 +720,7 @@ "type": "Identifier", "span": { "start": 383, - "end": 393, + "end": 384, "ctxt": 0 }, "value": "x", @@ -817,7 +817,7 @@ "type": "Identifier", "span": { "start": 410, - "end": 414, + "end": 411, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments5.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments5.json index c83aedf64b79..5adf420f3a3d 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments5.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments5.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 176, - "end": 200, + "end": 179, "ctxt": 0 }, "value": "arg", @@ -93,7 +93,7 @@ "type": "Identifier", "span": { "start": 188, - "end": 192, + "end": 189, "ctxt": 0 }, "value": "t", @@ -905,7 +905,7 @@ "type": "Identifier", "span": { "start": 452, - "end": 483, + "end": 455, "ctxt": 0 }, "value": "arg", @@ -966,7 +966,7 @@ "type": "Identifier", "span": { "start": 464, - "end": 468, + "end": 465, "ctxt": 0 }, "value": "t", @@ -1003,7 +1003,7 @@ "type": "Identifier", "span": { "start": 470, - "end": 475, + "end": 472, "ctxt": 0 }, "value": "t2", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithGenericSignatureArguments.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithGenericSignatureArguments.json index 99844ef8bc37..4b3adf98ea9c 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithGenericSignatureArguments.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithGenericSignatureArguments.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 322, - "end": 336, + "end": 323, "ctxt": 0 }, "value": "a", @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 326, - "end": 330, + "end": 327, "ctxt": 0 }, "value": "x", @@ -134,7 +134,7 @@ "type": "Identifier", "span": { "start": 338, - "end": 352, + "end": 339, "ctxt": 0 }, "value": "b", @@ -158,7 +158,7 @@ "type": "Identifier", "span": { "start": 342, - "end": 346, + "end": 343, "ctxt": 0 }, "value": "x", @@ -284,7 +284,7 @@ "type": "Identifier", "span": { "start": 368, - "end": 372, + "end": 369, "ctxt": 0 }, "value": "x", @@ -1691,7 +1691,7 @@ "type": "Identifier", "span": { "start": 973, - "end": 977, + "end": 974, "ctxt": 0 }, "value": "x", @@ -2115,7 +2115,7 @@ "type": "Identifier", "span": { "start": 1121, - "end": 1125, + "end": 1122, "ctxt": 0 }, "value": "x", @@ -2621,7 +2621,7 @@ "type": "Identifier", "span": { "start": 1340, - "end": 1354, + "end": 1341, "ctxt": 0 }, "value": "a", @@ -2645,7 +2645,7 @@ "type": "Identifier", "span": { "start": 1344, - "end": 1348, + "end": 1345, "ctxt": 0 }, "value": "x", @@ -2723,7 +2723,7 @@ "type": "Identifier", "span": { "start": 1356, - "end": 1370, + "end": 1357, "ctxt": 0 }, "value": "b", @@ -2747,7 +2747,7 @@ "type": "Identifier", "span": { "start": 1360, - "end": 1364, + "end": 1361, "ctxt": 0 }, "value": "x", @@ -2873,7 +2873,7 @@ "type": "Identifier", "span": { "start": 1386, - "end": 1390, + "end": 1387, "ctxt": 0 }, "value": "x", @@ -3044,7 +3044,7 @@ "type": "Identifier", "span": { "start": 1449, - "end": 1453, + "end": 1450, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithGenericSignatureArguments2.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithGenericSignatureArguments2.json index 8495748d4917..5c120ff1dcb1 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithGenericSignatureArguments2.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithGenericSignatureArguments2.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 341, - "end": 355, + "end": 342, "ctxt": 0 }, "value": "a", @@ -83,7 +83,7 @@ "type": "Identifier", "span": { "start": 345, - "end": 349, + "end": 346, "ctxt": 0 }, "value": "x", @@ -161,7 +161,7 @@ "type": "Identifier", "span": { "start": 357, - "end": 371, + "end": 358, "ctxt": 0 }, "value": "b", @@ -185,7 +185,7 @@ "type": "Identifier", "span": { "start": 361, - "end": 365, + "end": 362, "ctxt": 0 }, "value": "x", @@ -311,7 +311,7 @@ "type": "Identifier", "span": { "start": 391, - "end": 395, + "end": 392, "ctxt": 0 }, "value": "x", @@ -483,7 +483,7 @@ "type": "Identifier", "span": { "start": 441, - "end": 446, + "end": 442, "ctxt": 0 }, "value": "x", @@ -687,7 +687,7 @@ "type": "Identifier", "span": { "start": 535, - "end": 539, + "end": 536, "ctxt": 0 }, "value": "x", @@ -1142,7 +1142,7 @@ "type": "Identifier", "span": { "start": 747, - "end": 761, + "end": 748, "ctxt": 0 }, "value": "a", @@ -1166,7 +1166,7 @@ "type": "Identifier", "span": { "start": 751, - "end": 755, + "end": 752, "ctxt": 0 }, "value": "x", @@ -1244,7 +1244,7 @@ "type": "Identifier", "span": { "start": 763, - "end": 777, + "end": 764, "ctxt": 0 }, "value": "b", @@ -1268,7 +1268,7 @@ "type": "Identifier", "span": { "start": 767, - "end": 771, + "end": 768, "ctxt": 0 }, "value": "x", @@ -1394,7 +1394,7 @@ "type": "Identifier", "span": { "start": 797, - "end": 801, + "end": 798, "ctxt": 0 }, "value": "x", @@ -1565,7 +1565,7 @@ "type": "Identifier", "span": { "start": 872, - "end": 876, + "end": 873, "ctxt": 0 }, "value": "x", @@ -2089,7 +2089,7 @@ "type": "Identifier", "span": { "start": 1080, - "end": 1084, + "end": 1081, "ctxt": 0 }, "value": "x", @@ -2135,7 +2135,7 @@ "type": "Identifier", "span": { "start": 1086, - "end": 1100, + "end": 1087, "ctxt": 0 }, "value": "a", @@ -2159,7 +2159,7 @@ "type": "Identifier", "span": { "start": 1090, - "end": 1094, + "end": 1091, "ctxt": 0 }, "value": "x", @@ -2237,7 +2237,7 @@ "type": "Identifier", "span": { "start": 1102, - "end": 1116, + "end": 1103, "ctxt": 0 }, "value": "b", @@ -2261,7 +2261,7 @@ "type": "Identifier", "span": { "start": 1106, - "end": 1110, + "end": 1107, "ctxt": 0 }, "value": "x", @@ -2387,7 +2387,7 @@ "type": "Identifier", "span": { "start": 1136, - "end": 1140, + "end": 1137, "ctxt": 0 }, "value": "x", @@ -2766,7 +2766,7 @@ "type": "Identifier", "span": { "start": 1268, - "end": 1282, + "end": 1269, "ctxt": 0 }, "value": "a", @@ -2790,7 +2790,7 @@ "type": "Identifier", "span": { "start": 1272, - "end": 1276, + "end": 1273, "ctxt": 0 }, "value": "x", @@ -2868,7 +2868,7 @@ "type": "Identifier", "span": { "start": 1284, - "end": 1298, + "end": 1285, "ctxt": 0 }, "value": "b", @@ -2892,7 +2892,7 @@ "type": "Identifier", "span": { "start": 1288, - "end": 1292, + "end": 1289, "ctxt": 0 }, "value": "x", @@ -3018,7 +3018,7 @@ "type": "Identifier", "span": { "start": 1318, - "end": 1322, + "end": 1319, "ctxt": 0 }, "value": "x", @@ -3213,7 +3213,7 @@ "type": "Identifier", "span": { "start": 1368, - "end": 1373, + "end": 1369, "ctxt": 0 }, "value": "x", @@ -3417,7 +3417,7 @@ "type": "Identifier", "span": { "start": 1462, - "end": 1466, + "end": 1463, "ctxt": 0 }, "value": "x", @@ -3872,7 +3872,7 @@ "type": "Identifier", "span": { "start": 1636, - "end": 1650, + "end": 1637, "ctxt": 0 }, "value": "a", @@ -3896,7 +3896,7 @@ "type": "Identifier", "span": { "start": 1640, - "end": 1644, + "end": 1641, "ctxt": 0 }, "value": "x", @@ -3974,7 +3974,7 @@ "type": "Identifier", "span": { "start": 1652, - "end": 1666, + "end": 1653, "ctxt": 0 }, "value": "b", @@ -3998,7 +3998,7 @@ "type": "Identifier", "span": { "start": 1656, - "end": 1660, + "end": 1657, "ctxt": 0 }, "value": "x", @@ -4124,7 +4124,7 @@ "type": "Identifier", "span": { "start": 1686, - "end": 1690, + "end": 1687, "ctxt": 0 }, "value": "x", @@ -4336,7 +4336,7 @@ "type": "Identifier", "span": { "start": 1761, - "end": 1765, + "end": 1762, "ctxt": 0 }, "value": "x", @@ -4860,7 +4860,7 @@ "type": "Identifier", "span": { "start": 1927, - "end": 1931, + "end": 1928, "ctxt": 0 }, "value": "x", @@ -4906,7 +4906,7 @@ "type": "Identifier", "span": { "start": 1933, - "end": 1947, + "end": 1934, "ctxt": 0 }, "value": "a", @@ -4930,7 +4930,7 @@ "type": "Identifier", "span": { "start": 1937, - "end": 1941, + "end": 1938, "ctxt": 0 }, "value": "x", @@ -5008,7 +5008,7 @@ "type": "Identifier", "span": { "start": 1949, - "end": 1963, + "end": 1950, "ctxt": 0 }, "value": "b", @@ -5032,7 +5032,7 @@ "type": "Identifier", "span": { "start": 1953, - "end": 1957, + "end": 1954, "ctxt": 0 }, "value": "x", @@ -5158,7 +5158,7 @@ "type": "Identifier", "span": { "start": 1983, - "end": 1987, + "end": 1984, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithGenericSignatureArguments3.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithGenericSignatureArguments3.json index b9c05343d9b8..9d44ce9aa805 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithGenericSignatureArguments3.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithGenericSignatureArguments3.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 322, - "end": 326, + "end": 323, "ctxt": 0 }, "value": "x", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 328, - "end": 342, + "end": 329, "ctxt": 0 }, "value": "a", @@ -102,7 +102,7 @@ "type": "Identifier", "span": { "start": 332, - "end": 336, + "end": 333, "ctxt": 0 }, "value": "x", @@ -180,7 +180,7 @@ "type": "Identifier", "span": { "start": 344, - "end": 358, + "end": 345, "ctxt": 0 }, "value": "b", @@ -204,7 +204,7 @@ "type": "Identifier", "span": { "start": 348, - "end": 352, + "end": 349, "ctxt": 0 }, "value": "x", @@ -330,7 +330,7 @@ "type": "Identifier", "span": { "start": 374, - "end": 378, + "end": 375, "ctxt": 0 }, "value": "x", @@ -1783,7 +1783,7 @@ "type": "Identifier", "span": { "start": 944, - "end": 948, + "end": 945, "ctxt": 0 }, "value": "x", @@ -1829,7 +1829,7 @@ "type": "Identifier", "span": { "start": 950, - "end": 964, + "end": 951, "ctxt": 0 }, "value": "a", @@ -1853,7 +1853,7 @@ "type": "Identifier", "span": { "start": 954, - "end": 958, + "end": 955, "ctxt": 0 }, "value": "x", @@ -1931,7 +1931,7 @@ "type": "Identifier", "span": { "start": 966, - "end": 980, + "end": 967, "ctxt": 0 }, "value": "b", @@ -1955,7 +1955,7 @@ "type": "Identifier", "span": { "start": 970, - "end": 974, + "end": 971, "ctxt": 0 }, "value": "x", @@ -2081,7 +2081,7 @@ "type": "Identifier", "span": { "start": 996, - "end": 1000, + "end": 997, "ctxt": 0 }, "value": "x", @@ -2738,7 +2738,7 @@ "type": "Identifier", "span": { "start": 1234, - "end": 1243, + "end": 1235, "ctxt": 0 }, "value": "a", @@ -2885,7 +2885,7 @@ "type": "Identifier", "span": { "start": 1281, - "end": 1290, + "end": 1282, "ctxt": 0 }, "value": "y", @@ -3036,7 +3036,7 @@ "type": "Identifier", "span": { "start": 1330, - "end": 1339, + "end": 1331, "ctxt": 0 }, "value": "z", @@ -3202,7 +3202,7 @@ "type": "Identifier", "span": { "start": 1392, - "end": 1401, + "end": 1393, "ctxt": 0 }, "value": "y", @@ -3353,7 +3353,7 @@ "type": "Identifier", "span": { "start": 1442, - "end": 1451, + "end": 1443, "ctxt": 0 }, "value": "z", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithNonSymmetricSubtypes.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithNonSymmetricSubtypes.json index 91543418ccaa..3263890abbc4 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithNonSymmetricSubtypes.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithNonSymmetricSubtypes.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 235, - "end": 239, + "end": 236, "ctxt": 0 }, "value": "x", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 241, - "end": 245, + "end": 242, "ctxt": 0 }, "value": "y", @@ -1366,7 +1366,7 @@ "type": "Identifier", "span": { "start": 763, - "end": 772, + "end": 764, "ctxt": 0 }, "value": "x", @@ -1471,7 +1471,7 @@ "type": "Identifier", "span": { "start": 794, - "end": 803, + "end": 795, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectLiteralArgs.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectLiteralArgs.json index 377ce63378a9..07062cbd0566 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectLiteralArgs.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectLiteralArgs.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 17, - "end": 38, + "end": 18, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgs.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgs.json index 7a98f5f96496..fba3e9f3f736 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgs.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgs.json @@ -290,7 +290,7 @@ "type": "Identifier", "span": { "start": 115, - "end": 122, + "end": 116, "ctxt": 0 }, "value": "t", @@ -364,7 +364,7 @@ "type": "Identifier", "span": { "start": 124, - "end": 132, + "end": 126, "ctxt": 0 }, "value": "t2", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgs2.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgs2.json index a600acd92405..985f3837a1d6 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgs2.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgs2.json @@ -266,7 +266,7 @@ "type": "Identifier", "span": { "start": 184, - "end": 201, + "end": 185, "ctxt": 0 }, "value": "a", @@ -876,7 +876,7 @@ "type": "Identifier", "span": { "start": 395, - "end": 412, + "end": 396, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints.json index 0981b611175b..731a02dc07ce 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints.json @@ -335,7 +335,7 @@ "type": "Identifier", "span": { "start": 246, - "end": 253, + "end": 247, "ctxt": 0 }, "value": "t", @@ -409,7 +409,7 @@ "type": "Identifier", "span": { "start": 255, - "end": 263, + "end": 257, "ctxt": 0 }, "value": "t2", @@ -996,7 +996,7 @@ "type": "Identifier", "span": { "start": 412, - "end": 419, + "end": 413, "ctxt": 0 }, "value": "t", @@ -1070,7 +1070,7 @@ "type": "Identifier", "span": { "start": 421, - "end": 429, + "end": 423, "ctxt": 0 }, "value": "t2", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints2.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints2.json index 46edcd2f1c58..28f4fce59b3a 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints2.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints2.json @@ -185,7 +185,7 @@ "type": "Identifier", "span": { "start": 215, - "end": 236, + "end": 216, "ctxt": 0 }, "value": "x", @@ -865,7 +865,7 @@ "type": "Identifier", "span": { "start": 437, - "end": 444, + "end": 438, "ctxt": 0 }, "value": "x", @@ -1255,7 +1255,7 @@ "type": "Identifier", "span": { "start": 543, - "end": 547, + "end": 544, "ctxt": 0 }, "value": "x", @@ -1301,7 +1301,7 @@ "type": "Identifier", "span": { "start": 549, - "end": 563, + "end": 550, "ctxt": 0 }, "value": "y", @@ -1325,7 +1325,7 @@ "type": "Identifier", "span": { "start": 553, - "end": 557, + "end": 554, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints3.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints3.json index 673d8da1f2dc..15d90f795b43 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints3.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints3.json @@ -266,7 +266,7 @@ "type": "Identifier", "span": { "start": 240, - "end": 257, + "end": 241, "ctxt": 0 }, "value": "a", @@ -700,7 +700,7 @@ "type": "Identifier", "span": { "start": 451, - "end": 455, + "end": 452, "ctxt": 0 }, "value": "a", @@ -1307,7 +1307,7 @@ "type": "Identifier", "span": { "start": 640, - "end": 654, + "end": 641, "ctxt": 0 }, "value": "y", @@ -1331,7 +1331,7 @@ "type": "Identifier", "span": { "start": 644, - "end": 648, + "end": 645, "ctxt": 0 }, "value": "a", @@ -1409,7 +1409,7 @@ "type": "Identifier", "span": { "start": 656, - "end": 660, + "end": 657, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints4.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints4.json index da28d95adf07..0c9fa1d6a2e9 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints4.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints4.json @@ -221,7 +221,7 @@ "type": "Identifier", "span": { "start": 189, - "end": 193, + "end": 190, "ctxt": 0 }, "value": "t", @@ -267,7 +267,7 @@ "type": "Identifier", "span": { "start": 195, - "end": 200, + "end": 197, "ctxt": 0 }, "value": "t2", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints5.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints5.json index dfeacd113adc..512939791009 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints5.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints5.json @@ -221,7 +221,7 @@ "type": "Identifier", "span": { "start": 189, - "end": 193, + "end": 190, "ctxt": 0 }, "value": "t", @@ -267,7 +267,7 @@ "type": "Identifier", "span": { "start": 195, - "end": 200, + "end": 197, "ctxt": 0 }, "value": "t2", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndIndexers.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndIndexers.json index ac7f05935f56..5320a4ceda68 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndIndexers.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndIndexers.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 92, - "end": 96, + "end": 93, "ctxt": 0 }, "value": "x", @@ -412,7 +412,7 @@ "type": "Identifier", "span": { "start": 225, - "end": 231, + "end": 228, "ctxt": 0 }, "value": "arg", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndIndexersErrors.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndIndexersErrors.json index 707c6047578d..12493e91c560 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndIndexersErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndIndexersErrors.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 85, - "end": 89, + "end": 86, "ctxt": 0 }, "value": "x", @@ -164,7 +164,7 @@ "type": "Identifier", "span": { "start": 128, - "end": 134, + "end": 131, "ctxt": 0 }, "value": "arg", @@ -526,7 +526,7 @@ "type": "Identifier", "span": { "start": 349, - "end": 355, + "end": 352, "ctxt": 0 }, "value": "arg", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndInitializers.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndInitializers.json index cde21f784b81..62aa694f807a 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndInitializers.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndInitializers.json @@ -39,7 +39,7 @@ "type": "Identifier", "span": { "start": 64, - "end": 68, + "end": 65, "ctxt": 0 }, "value": "x", @@ -187,7 +187,7 @@ "type": "Identifier", "span": { "start": 114, - "end": 118, + "end": 115, "ctxt": 0 }, "value": "x", @@ -337,7 +337,7 @@ "type": "Identifier", "span": { "start": 184, - "end": 188, + "end": 185, "ctxt": 0 }, "value": "x", @@ -479,7 +479,7 @@ "type": "Identifier", "span": { "start": 237, - "end": 241, + "end": 238, "ctxt": 0 }, "value": "x", @@ -532,7 +532,7 @@ "type": "Identifier", "span": { "start": 243, - "end": 247, + "end": 244, "ctxt": 0 }, "value": "y", @@ -697,7 +697,7 @@ "type": "Identifier", "span": { "start": 296, - "end": 300, + "end": 297, "ctxt": 0 }, "value": "x", @@ -750,7 +750,7 @@ "type": "Identifier", "span": { "start": 302, - "end": 306, + "end": 303, "ctxt": 0 }, "value": "y", @@ -915,7 +915,7 @@ "type": "Identifier", "span": { "start": 365, - "end": 369, + "end": 366, "ctxt": 0 }, "value": "x", @@ -961,7 +961,7 @@ "type": "Identifier", "span": { "start": 371, - "end": 375, + "end": 372, "ctxt": 0 }, "value": "y", @@ -1014,7 +1014,7 @@ "type": "Identifier", "span": { "start": 377, - "end": 381, + "end": 378, "ctxt": 0 }, "value": "z", @@ -1220,7 +1220,7 @@ "type": "Identifier", "span": { "start": 443, - "end": 447, + "end": 444, "ctxt": 0 }, "value": "x", @@ -1273,7 +1273,7 @@ "type": "Identifier", "span": { "start": 449, - "end": 453, + "end": 450, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndNumericIndexer.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndNumericIndexer.json index cb9c588cdb75..0fc9fafd188a 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndNumericIndexer.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndNumericIndexer.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 92, - "end": 96, + "end": 93, "ctxt": 0 }, "value": "x", @@ -346,7 +346,7 @@ "type": "Identifier", "span": { "start": 182, - "end": 188, + "end": 185, "ctxt": 0 }, "value": "arg", @@ -642,7 +642,7 @@ "type": "Identifier", "span": { "start": 284, - "end": 290, + "end": 287, "ctxt": 0 }, "value": "arg", @@ -1024,7 +1024,7 @@ "type": "Identifier", "span": { "start": 416, - "end": 422, + "end": 419, "ctxt": 0 }, "value": "arg", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndStringIndexer.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndStringIndexer.json index 839690ad35c3..1b6f398a99f2 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndStringIndexer.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndStringIndexer.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 92, - "end": 96, + "end": 93, "ctxt": 0 }, "value": "x", @@ -346,7 +346,7 @@ "type": "Identifier", "span": { "start": 182, - "end": 188, + "end": 185, "ctxt": 0 }, "value": "arg", @@ -642,7 +642,7 @@ "type": "Identifier", "span": { "start": 284, - "end": 290, + "end": 287, "ctxt": 0 }, "value": "arg", @@ -1050,7 +1050,7 @@ "type": "Identifier", "span": { "start": 431, - "end": 437, + "end": 434, "ctxt": 0 }, "value": "arg", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedConstructorTypedArguments.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedConstructorTypedArguments.json index 1a87c08212d3..73a0fe91045a 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedConstructorTypedArguments.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedConstructorTypedArguments.json @@ -86,7 +86,7 @@ "type": "Identifier", "span": { "start": 241, - "end": 251, + "end": 242, "ctxt": 0 }, "value": "x", @@ -141,7 +141,7 @@ "type": "Identifier", "span": { "start": 275, - "end": 284, + "end": 276, "ctxt": 0 }, "value": "x", @@ -219,7 +219,7 @@ "type": "Identifier", "span": { "start": 320, - "end": 332, + "end": 322, "ctxt": 0 }, "value": "cb", @@ -434,7 +434,7 @@ "type": "Identifier", "span": { "start": 414, - "end": 418, + "end": 415, "ctxt": 0 }, "value": "x", @@ -660,7 +660,7 @@ "type": "Identifier", "span": { "start": 498, - "end": 542, + "end": 500, "ctxt": 0 }, "value": "cb", @@ -692,7 +692,7 @@ "type": "Identifier", "span": { "start": 508, - "end": 512, + "end": 509, "ctxt": 0 }, "value": "x", @@ -757,7 +757,7 @@ "type": "Identifier", "span": { "start": 527, - "end": 536, + "end": 528, "ctxt": 0 }, "value": "x", @@ -940,7 +940,7 @@ "type": "Identifier", "span": { "start": 598, - "end": 608, + "end": 599, "ctxt": 0 }, "value": "x", @@ -995,7 +995,7 @@ "type": "Identifier", "span": { "start": 632, - "end": 641, + "end": 633, "ctxt": 0 }, "value": "x", @@ -1166,7 +1166,7 @@ "type": "Identifier", "span": { "start": 741, - "end": 745, + "end": 742, "ctxt": 0 }, "value": "x", @@ -1263,7 +1263,7 @@ "type": "Identifier", "span": { "start": 763, - "end": 772, + "end": 764, "ctxt": 0 }, "value": "x", @@ -1449,7 +1449,7 @@ "type": "Identifier", "span": { "start": 867, - "end": 918, + "end": 869, "ctxt": 0 }, "value": "cb", @@ -1481,7 +1481,7 @@ "type": "Identifier", "span": { "start": 877, - "end": 881, + "end": 878, "ctxt": 0 }, "value": "x", @@ -1546,7 +1546,7 @@ "type": "Identifier", "span": { "start": 896, - "end": 900, + "end": 897, "ctxt": 0 }, "value": "x", @@ -1583,7 +1583,7 @@ "type": "Identifier", "span": { "start": 902, - "end": 907, + "end": 903, "ctxt": 0 }, "value": "y", @@ -1871,7 +1871,7 @@ "type": "Identifier", "span": { "start": 1074, - "end": 1077, + "end": 1075, "ctxt": 0 }, "value": "x", @@ -1917,7 +1917,7 @@ "type": "Identifier", "span": { "start": 1079, - "end": 1130, + "end": 1081, "ctxt": 0 }, "value": "cb", @@ -1949,7 +1949,7 @@ "type": "Identifier", "span": { "start": 1089, - "end": 1093, + "end": 1090, "ctxt": 0 }, "value": "x", @@ -2014,7 +2014,7 @@ "type": "Identifier", "span": { "start": 1108, - "end": 1112, + "end": 1109, "ctxt": 0 }, "value": "x", @@ -2051,7 +2051,7 @@ "type": "Identifier", "span": { "start": 1114, - "end": 1119, + "end": 1115, "ctxt": 0 }, "value": "y", @@ -2313,7 +2313,7 @@ "type": "Identifier", "span": { "start": 1258, - "end": 1262, + "end": 1259, "ctxt": 0 }, "value": "x", @@ -2410,7 +2410,7 @@ "type": "Identifier", "span": { "start": 1277, - "end": 1286, + "end": 1278, "ctxt": 0 }, "value": "x", @@ -2557,7 +2557,7 @@ "type": "Identifier", "span": { "start": 1316, - "end": 1320, + "end": 1317, "ctxt": 0 }, "value": "x", @@ -2654,7 +2654,7 @@ "type": "Identifier", "span": { "start": 1338, - "end": 1347, + "end": 1339, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedConstructorTypedArguments2.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedConstructorTypedArguments2.json index c9d7e0c7ce95..b0b59143186f 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedConstructorTypedArguments2.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedConstructorTypedArguments2.json @@ -86,7 +86,7 @@ "type": "Identifier", "span": { "start": 241, - "end": 251, + "end": 242, "ctxt": 0 }, "value": "x", @@ -141,7 +141,7 @@ "type": "Identifier", "span": { "start": 275, - "end": 284, + "end": 276, "ctxt": 0 }, "value": "x", @@ -219,7 +219,7 @@ "type": "Identifier", "span": { "start": 320, - "end": 332, + "end": 322, "ctxt": 0 }, "value": "cb", @@ -346,7 +346,7 @@ "type": "Identifier", "span": { "start": 386, - "end": 390, + "end": 387, "ctxt": 0 }, "value": "x", @@ -595,7 +595,7 @@ "type": "Identifier", "span": { "start": 475, - "end": 519, + "end": 477, "ctxt": 0 }, "value": "cb", @@ -627,7 +627,7 @@ "type": "Identifier", "span": { "start": 485, - "end": 489, + "end": 486, "ctxt": 0 }, "value": "x", @@ -692,7 +692,7 @@ "type": "Identifier", "span": { "start": 504, - "end": 513, + "end": 505, "ctxt": 0 }, "value": "x", @@ -875,7 +875,7 @@ "type": "Identifier", "span": { "start": 570, - "end": 574, + "end": 571, "ctxt": 0 }, "value": "x", @@ -1071,7 +1071,7 @@ "type": "Identifier", "span": { "start": 632, - "end": 683, + "end": 634, "ctxt": 0 }, "value": "cb", @@ -1103,7 +1103,7 @@ "type": "Identifier", "span": { "start": 642, - "end": 646, + "end": 643, "ctxt": 0 }, "value": "x", @@ -1168,7 +1168,7 @@ "type": "Identifier", "span": { "start": 661, - "end": 665, + "end": 662, "ctxt": 0 }, "value": "x", @@ -1205,7 +1205,7 @@ "type": "Identifier", "span": { "start": 667, - "end": 672, + "end": 668, "ctxt": 0 }, "value": "y", @@ -1388,7 +1388,7 @@ "type": "Identifier", "span": { "start": 734, - "end": 738, + "end": 735, "ctxt": 0 }, "value": "x", @@ -1425,7 +1425,7 @@ "type": "Identifier", "span": { "start": 740, - "end": 744, + "end": 741, "ctxt": 0 }, "value": "y", @@ -1611,7 +1611,7 @@ "type": "Identifier", "span": { "start": 811, - "end": 814, + "end": 812, "ctxt": 0 }, "value": "x", @@ -1657,7 +1657,7 @@ "type": "Identifier", "span": { "start": 816, - "end": 867, + "end": 818, "ctxt": 0 }, "value": "cb", @@ -1689,7 +1689,7 @@ "type": "Identifier", "span": { "start": 826, - "end": 830, + "end": 827, "ctxt": 0 }, "value": "x", @@ -1754,7 +1754,7 @@ "type": "Identifier", "span": { "start": 845, - "end": 849, + "end": 846, "ctxt": 0 }, "value": "x", @@ -1791,7 +1791,7 @@ "type": "Identifier", "span": { "start": 851, - "end": 856, + "end": 852, "ctxt": 0 }, "value": "y", @@ -2053,7 +2053,7 @@ "type": "Identifier", "span": { "start": 949, - "end": 953, + "end": 950, "ctxt": 0 }, "value": "x", @@ -2150,7 +2150,7 @@ "type": "Identifier", "span": { "start": 971, - "end": 980, + "end": 972, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedFunctionTypedArguments.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedFunctionTypedArguments.json index 0af039f1d7d4..784df9885b1e 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedFunctionTypedArguments.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedFunctionTypedArguments.json @@ -86,7 +86,7 @@ "type": "Identifier", "span": { "start": 238, - "end": 248, + "end": 239, "ctxt": 0 }, "value": "x", @@ -141,7 +141,7 @@ "type": "Identifier", "span": { "start": 269, - "end": 278, + "end": 270, "ctxt": 0 }, "value": "x", @@ -219,7 +219,7 @@ "type": "Identifier", "span": { "start": 314, - "end": 326, + "end": 316, "ctxt": 0 }, "value": "cb", @@ -655,7 +655,7 @@ "type": "Identifier", "span": { "start": 493, - "end": 531, + "end": 495, "ctxt": 0 }, "value": "cb", @@ -687,7 +687,7 @@ "type": "Identifier", "span": { "start": 500, - "end": 504, + "end": 501, "ctxt": 0 }, "value": "x", @@ -752,7 +752,7 @@ "type": "Identifier", "span": { "start": 516, - "end": 525, + "end": 517, "ctxt": 0 }, "value": "x", @@ -1026,7 +1026,7 @@ "type": "Identifier", "span": { "start": 709, - "end": 713, + "end": 710, "ctxt": 0 }, "value": "x", @@ -1123,7 +1123,7 @@ "type": "Identifier", "span": { "start": 728, - "end": 737, + "end": 729, "ctxt": 0 }, "value": "x", @@ -1309,7 +1309,7 @@ "type": "Identifier", "span": { "start": 820, - "end": 865, + "end": 822, "ctxt": 0 }, "value": "cb", @@ -1341,7 +1341,7 @@ "type": "Identifier", "span": { "start": 827, - "end": 831, + "end": 828, "ctxt": 0 }, "value": "x", @@ -1406,7 +1406,7 @@ "type": "Identifier", "span": { "start": 843, - "end": 847, + "end": 844, "ctxt": 0 }, "value": "x", @@ -1443,7 +1443,7 @@ "type": "Identifier", "span": { "start": 849, - "end": 854, + "end": 850, "ctxt": 0 }, "value": "y", @@ -2025,7 +2025,7 @@ "type": "Identifier", "span": { "start": 1190, - "end": 1193, + "end": 1191, "ctxt": 0 }, "value": "x", @@ -2071,7 +2071,7 @@ "type": "Identifier", "span": { "start": 1195, - "end": 1240, + "end": 1197, "ctxt": 0 }, "value": "cb", @@ -2103,7 +2103,7 @@ "type": "Identifier", "span": { "start": 1202, - "end": 1206, + "end": 1203, "ctxt": 0 }, "value": "x", @@ -2168,7 +2168,7 @@ "type": "Identifier", "span": { "start": 1218, - "end": 1222, + "end": 1219, "ctxt": 0 }, "value": "x", @@ -2205,7 +2205,7 @@ "type": "Identifier", "span": { "start": 1224, - "end": 1229, + "end": 1225, "ctxt": 0 }, "value": "y", @@ -2654,7 +2654,7 @@ "type": "Identifier", "span": { "start": 1548, - "end": 1552, + "end": 1549, "ctxt": 0 }, "value": "x", @@ -2751,7 +2751,7 @@ "type": "Identifier", "span": { "start": 1567, - "end": 1576, + "end": 1568, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedFunctionTypedArguments2.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedFunctionTypedArguments2.json index 1259cd01edb7..efdfce0ee71f 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedFunctionTypedArguments2.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedFunctionTypedArguments2.json @@ -86,7 +86,7 @@ "type": "Identifier", "span": { "start": 238, - "end": 248, + "end": 239, "ctxt": 0 }, "value": "x", @@ -141,7 +141,7 @@ "type": "Identifier", "span": { "start": 269, - "end": 278, + "end": 270, "ctxt": 0 }, "value": "x", @@ -219,7 +219,7 @@ "type": "Identifier", "span": { "start": 314, - "end": 326, + "end": 316, "ctxt": 0 }, "value": "cb", @@ -598,7 +598,7 @@ "type": "Identifier", "span": { "start": 471, - "end": 509, + "end": 473, "ctxt": 0 }, "value": "cb", @@ -630,7 +630,7 @@ "type": "Identifier", "span": { "start": 478, - "end": 482, + "end": 479, "ctxt": 0 }, "value": "x", @@ -695,7 +695,7 @@ "type": "Identifier", "span": { "start": 494, - "end": 503, + "end": 495, "ctxt": 0 }, "value": "x", @@ -1000,7 +1000,7 @@ "type": "Identifier", "span": { "start": 602, - "end": 647, + "end": 604, "ctxt": 0 }, "value": "cb", @@ -1032,7 +1032,7 @@ "type": "Identifier", "span": { "start": 609, - "end": 613, + "end": 610, "ctxt": 0 }, "value": "x", @@ -1097,7 +1097,7 @@ "type": "Identifier", "span": { "start": 625, - "end": 629, + "end": 626, "ctxt": 0 }, "value": "x", @@ -1134,7 +1134,7 @@ "type": "Identifier", "span": { "start": 631, - "end": 636, + "end": 632, "ctxt": 0 }, "value": "y", @@ -1476,7 +1476,7 @@ "type": "Identifier", "span": { "start": 751, - "end": 754, + "end": 752, "ctxt": 0 }, "value": "x", @@ -1522,7 +1522,7 @@ "type": "Identifier", "span": { "start": 756, - "end": 801, + "end": 758, "ctxt": 0 }, "value": "cb", @@ -1554,7 +1554,7 @@ "type": "Identifier", "span": { "start": 763, - "end": 767, + "end": 764, "ctxt": 0 }, "value": "x", @@ -1619,7 +1619,7 @@ "type": "Identifier", "span": { "start": 779, - "end": 783, + "end": 780, "ctxt": 0 }, "value": "x", @@ -1656,7 +1656,7 @@ "type": "Identifier", "span": { "start": 785, - "end": 790, + "end": 786, "ctxt": 0 }, "value": "y", @@ -2001,7 +2001,7 @@ "type": "Identifier", "span": { "start": 893, - "end": 897, + "end": 894, "ctxt": 0 }, "value": "x", @@ -2098,7 +2098,7 @@ "type": "Identifier", "span": { "start": 912, - "end": 921, + "end": 913, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/genericClassWithFunctionTypedMemberArguments.json b/crates/swc_ecma_parser/tests/tsc/genericClassWithFunctionTypedMemberArguments.json index be36f7c816f7..7289fe8d5703 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericClassWithFunctionTypedMemberArguments.json +++ b/crates/swc_ecma_parser/tests/tsc/genericClassWithFunctionTypedMemberArguments.json @@ -84,7 +84,7 @@ "type": "Identifier", "span": { "start": 212, - "end": 226, + "end": 213, "ctxt": 0 }, "value": "x", @@ -108,7 +108,7 @@ "type": "Identifier", "span": { "start": 216, - "end": 220, + "end": 217, "ctxt": 0 }, "value": "a", @@ -896,7 +896,7 @@ "type": "Identifier", "span": { "start": 468, - "end": 482, + "end": 469, "ctxt": 0 }, "value": "x", @@ -920,7 +920,7 @@ "type": "Identifier", "span": { "start": 472, - "end": 476, + "end": 473, "ctxt": 0 }, "value": "a", @@ -1521,7 +1521,7 @@ "type": "Identifier", "span": { "start": 712, - "end": 716, + "end": 713, "ctxt": 0 }, "value": "x", @@ -1567,7 +1567,7 @@ "type": "Identifier", "span": { "start": 718, - "end": 733, + "end": 720, "ctxt": 0 }, "value": "cb", @@ -1591,7 +1591,7 @@ "type": "Identifier", "span": { "start": 723, - "end": 727, + "end": 724, "ctxt": 0 }, "value": "a", @@ -1994,7 +1994,7 @@ "type": "Identifier", "span": { "start": 838, - "end": 842, + "end": 839, "ctxt": 0 }, "value": "a", @@ -2488,7 +2488,7 @@ "type": "Identifier", "span": { "start": 1085, - "end": 1089, + "end": 1086, "ctxt": 0 }, "value": "x", @@ -2534,7 +2534,7 @@ "type": "Identifier", "span": { "start": 1091, - "end": 1106, + "end": 1093, "ctxt": 0 }, "value": "cb", @@ -2558,7 +2558,7 @@ "type": "Identifier", "span": { "start": 1096, - "end": 1100, + "end": 1097, "ctxt": 0 }, "value": "a", @@ -2636,7 +2636,7 @@ "type": "Identifier", "span": { "start": 1108, - "end": 1112, + "end": 1109, "ctxt": 0 }, "value": "y", @@ -3297,7 +3297,7 @@ "type": "Identifier", "span": { "start": 1354, - "end": 1358, + "end": 1355, "ctxt": 0 }, "value": "x", @@ -3343,7 +3343,7 @@ "type": "Identifier", "span": { "start": 1360, - "end": 1375, + "end": 1362, "ctxt": 0 }, "value": "cb", @@ -3367,7 +3367,7 @@ "type": "Identifier", "span": { "start": 1365, - "end": 1369, + "end": 1366, "ctxt": 0 }, "value": "a", @@ -3445,7 +3445,7 @@ "type": "Identifier", "span": { "start": 1377, - "end": 1381, + "end": 1378, "ctxt": 0 }, "value": "y", @@ -3779,7 +3779,7 @@ "type": "Identifier", "span": { "start": 1485, - "end": 1489, + "end": 1486, "ctxt": 0 }, "value": "t", @@ -3825,7 +3825,7 @@ "type": "Identifier", "span": { "start": 1491, - "end": 1495, + "end": 1492, "ctxt": 0 }, "value": "u", diff --git a/crates/swc_ecma_parser/tests/tsc/genericClassWithObjectTypeArgsAndConstraints.json b/crates/swc_ecma_parser/tests/tsc/genericClassWithObjectTypeArgsAndConstraints.json index 7203912c2c5b..0aa404b82640 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericClassWithObjectTypeArgsAndConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/genericClassWithObjectTypeArgsAndConstraints.json @@ -387,7 +387,7 @@ "type": "Identifier", "span": { "start": 299, - "end": 306, + "end": 300, "ctxt": 0 }, "value": "t", @@ -461,7 +461,7 @@ "type": "Identifier", "span": { "start": 308, - "end": 316, + "end": 310, "ctxt": 0 }, "value": "t2", @@ -1365,7 +1365,7 @@ "type": "Identifier", "span": { "start": 581, - "end": 588, + "end": 582, "ctxt": 0 }, "value": "t", @@ -1439,7 +1439,7 @@ "type": "Identifier", "span": { "start": 590, - "end": 598, + "end": 592, "ctxt": 0 }, "value": "t2", @@ -2160,7 +2160,7 @@ "type": "Identifier", "span": { "start": 842, - "end": 849, + "end": 843, "ctxt": 0 }, "value": "t", @@ -2225,7 +2225,7 @@ "type": "Identifier", "span": { "start": 851, - "end": 859, + "end": 853, "ctxt": 0 }, "value": "t2", @@ -3018,7 +3018,7 @@ "type": "Identifier", "span": { "start": 1076, - "end": 1083, + "end": 1077, "ctxt": 0 }, "value": "t", @@ -3083,7 +3083,7 @@ "type": "Identifier", "span": { "start": 1085, - "end": 1093, + "end": 1087, "ctxt": 0 }, "value": "t2", diff --git a/crates/swc_ecma_parser/tests/tsc/genericContextualTypes1.json b/crates/swc_ecma_parser/tests/tsc/genericContextualTypes1.json index 74cde6ea5ef3..0b7a3d164a3e 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericContextualTypes1.json +++ b/crates/swc_ecma_parser/tests/tsc/genericContextualTypes1.json @@ -145,7 +145,7 @@ "type": "Identifier", "span": { "start": 98, - "end": 112, + "end": 99, "ctxt": 0 }, "value": "f", @@ -169,7 +169,7 @@ "type": "Identifier", "span": { "start": 102, - "end": 106, + "end": 103, "ctxt": 0 }, "value": "a", @@ -320,7 +320,7 @@ "type": "Identifier", "span": { "start": 116, - "end": 120, + "end": 117, "ctxt": 0 }, "value": "a", @@ -411,7 +411,7 @@ "type": "Identifier", "span": { "start": 163, - "end": 177, + "end": 164, "ctxt": 0 }, "value": "f", @@ -435,7 +435,7 @@ "type": "Identifier", "span": { "start": 167, - "end": 171, + "end": 168, "ctxt": 0 }, "value": "a", @@ -513,7 +513,7 @@ "type": "Identifier", "span": { "start": 179, - "end": 193, + "end": 180, "ctxt": 0 }, "value": "g", @@ -537,7 +537,7 @@ "type": "Identifier", "span": { "start": 183, - "end": 187, + "end": 184, "ctxt": 0 }, "value": "b", @@ -711,7 +711,7 @@ "type": "Identifier", "span": { "start": 197, - "end": 201, + "end": 198, "ctxt": 0 }, "value": "a", @@ -802,7 +802,7 @@ "type": "Identifier", "span": { "start": 235, - "end": 239, + "end": 236, "ctxt": 0 }, "value": "a", @@ -941,7 +941,7 @@ "type": "Identifier", "span": { "start": 275, - "end": 281, + "end": 276, "ctxt": 0 }, "value": "a", @@ -1080,7 +1080,7 @@ "type": "Identifier", "span": { "start": 312, - "end": 316, + "end": 313, "ctxt": 0 }, "value": "x", @@ -1239,7 +1239,7 @@ "type": "Identifier", "span": { "start": 354, - "end": 363, + "end": 355, "ctxt": 0 }, "value": "x", @@ -1398,7 +1398,7 @@ "type": "Identifier", "span": { "start": 397, - "end": 403, + "end": 398, "ctxt": 0 }, "value": "a", @@ -1452,7 +1452,7 @@ "type": "Identifier", "span": { "start": 405, - "end": 419, + "end": 406, "ctxt": 0 }, "value": "f", @@ -1476,7 +1476,7 @@ "type": "Identifier", "span": { "start": 409, - "end": 413, + "end": 410, "ctxt": 0 }, "value": "x", @@ -1670,7 +1670,7 @@ "type": "Identifier", "span": { "start": 457, - "end": 461, + "end": 458, "ctxt": 0 }, "value": "x", @@ -1801,7 +1801,7 @@ "type": "Identifier", "span": { "start": 495, - "end": 499, + "end": 496, "ctxt": 0 }, "value": "a", @@ -1847,7 +1847,7 @@ "type": "Identifier", "span": { "start": 501, - "end": 505, + "end": 502, "ctxt": 0 }, "value": "b", @@ -2048,7 +2048,7 @@ "type": "Identifier", "span": { "start": 548, - "end": 568, + "end": 549, "ctxt": 0 }, "value": "f", @@ -2072,7 +2072,7 @@ "type": "Identifier", "span": { "start": 552, - "end": 556, + "end": 553, "ctxt": 0 }, "value": "x", @@ -2109,7 +2109,7 @@ "type": "Identifier", "span": { "start": 558, - "end": 562, + "end": 559, "ctxt": 0 }, "value": "y", @@ -2283,7 +2283,7 @@ "type": "Identifier", "span": { "start": 572, - "end": 576, + "end": 573, "ctxt": 0 }, "value": "y", @@ -2320,7 +2320,7 @@ "type": "Identifier", "span": { "start": 578, - "end": 582, + "end": 579, "ctxt": 0 }, "value": "x", @@ -2430,7 +2430,7 @@ "type": "Identifier", "span": { "start": 606, - "end": 610, + "end": 607, "ctxt": 0 }, "value": "x", @@ -2594,7 +2594,7 @@ "type": "Identifier", "span": { "start": 642, - "end": 646, + "end": 643, "ctxt": 0 }, "value": "x", @@ -2796,7 +2796,7 @@ "type": "Identifier", "span": { "start": 682, - "end": 686, + "end": 683, "ctxt": 0 }, "value": "x", @@ -2984,7 +2984,7 @@ "type": "Identifier", "span": { "start": 724, - "end": 728, + "end": 725, "ctxt": 0 }, "value": "x", @@ -3210,7 +3210,7 @@ "type": "Identifier", "span": { "start": 771, - "end": 775, + "end": 772, "ctxt": 0 }, "value": "x", @@ -3537,7 +3537,7 @@ "type": "Identifier", "span": { "start": 842, - "end": 846, + "end": 843, "ctxt": 0 }, "value": "x", @@ -3766,7 +3766,7 @@ "type": "Identifier", "span": { "start": 897, - "end": 908, + "end": 898, "ctxt": 0 }, "value": "x", @@ -4093,7 +4093,7 @@ "type": "Identifier", "span": { "start": 972, - "end": 983, + "end": 973, "ctxt": 0 }, "value": "x", @@ -4341,7 +4341,7 @@ "type": "Identifier", "span": { "start": 1045, - "end": 1049, + "end": 1046, "ctxt": 0 }, "value": "x", @@ -4646,7 +4646,7 @@ "type": "Identifier", "span": { "start": 1110, - "end": 1114, + "end": 1111, "ctxt": 0 }, "value": "x", @@ -4899,7 +4899,7 @@ "type": "Identifier", "span": { "start": 1169, - "end": 1180, + "end": 1170, "ctxt": 0 }, "value": "a", @@ -5086,7 +5086,7 @@ "type": "Identifier", "span": { "start": 1236, - "end": 1242, + "end": 1237, "ctxt": 0 }, "value": "a", @@ -5328,7 +5328,7 @@ "type": "Identifier", "span": { "start": 1290, - "end": 1296, + "end": 1291, "ctxt": 0 }, "value": "a", @@ -5524,7 +5524,7 @@ "type": "Identifier", "span": { "start": 1342, - "end": 1348, + "end": 1343, "ctxt": 0 }, "value": "a", @@ -5791,7 +5791,7 @@ "type": "Identifier", "span": { "start": 1409, - "end": 1420, + "end": 1410, "ctxt": 0 }, "value": "a", @@ -5997,7 +5997,7 @@ "type": "Identifier", "span": { "start": 1504, - "end": 1510, + "end": 1505, "ctxt": 0 }, "value": "a", @@ -6291,7 +6291,7 @@ "type": "Identifier", "span": { "start": 1572, - "end": 1576, + "end": 1573, "ctxt": 0 }, "value": "b", @@ -6328,7 +6328,7 @@ "type": "Identifier", "span": { "start": 1578, - "end": 1582, + "end": 1579, "ctxt": 0 }, "value": "a", @@ -6564,7 +6564,7 @@ "type": "Identifier", "span": { "start": 1644, - "end": 1648, + "end": 1645, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/genericContextualTypes2.json b/crates/swc_ecma_parser/tests/tsc/genericContextualTypes2.json index a81b6d00057c..bb48e41ea1d0 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericContextualTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/genericContextualTypes2.json @@ -209,7 +209,7 @@ "type": "Identifier", "span": { "start": 130, - "end": 147, + "end": 137, "ctxt": 0 }, "value": "context", @@ -637,7 +637,7 @@ "type": "Identifier", "span": { "start": 315, - "end": 328, + "end": 318, "ctxt": 0 }, "value": "ctx", @@ -847,7 +847,7 @@ "type": "Identifier", "span": { "start": 410, - "end": 423, + "end": 413, "ctxt": 0 }, "value": "arg", @@ -884,7 +884,7 @@ "type": "Identifier", "span": { "start": 425, - "end": 445, + "end": 429, "ctxt": 0 }, "value": "meta", @@ -997,7 +997,7 @@ "type": "Identifier", "span": { "start": 496, - "end": 544, + "end": 506, "ctxt": 0 }, "value": "assignment", @@ -1404,7 +1404,7 @@ "type": "Identifier", "span": { "start": 699, - "end": 723, + "end": 705, "ctxt": 0 }, "value": "config", diff --git a/crates/swc_ecma_parser/tests/tsc/genericContextualTypes3.json b/crates/swc_ecma_parser/tests/tsc/genericContextualTypes3.json index e1e923891d52..f7772e697239 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericContextualTypes3.json +++ b/crates/swc_ecma_parser/tests/tsc/genericContextualTypes3.json @@ -209,7 +209,7 @@ "type": "Identifier", "span": { "start": 130, - "end": 147, + "end": 137, "ctxt": 0 }, "value": "context", @@ -637,7 +637,7 @@ "type": "Identifier", "span": { "start": 315, - "end": 328, + "end": 318, "ctxt": 0 }, "value": "ctx", @@ -818,7 +818,7 @@ "type": "Identifier", "span": { "start": 404, - "end": 417, + "end": 407, "ctxt": 0 }, "value": "arg", @@ -855,7 +855,7 @@ "type": "Identifier", "span": { "start": 419, - "end": 439, + "end": 423, "ctxt": 0 }, "value": "meta", @@ -965,7 +965,7 @@ "type": "Identifier", "span": { "start": 488, - "end": 536, + "end": 498, "ctxt": 0 }, "value": "assignment", @@ -1372,7 +1372,7 @@ "type": "Identifier", "span": { "start": 691, - "end": 715, + "end": 697, "ctxt": 0 }, "value": "config", diff --git a/crates/swc_ecma_parser/tests/tsc/genericFunctionParameters.json b/crates/swc_ecma_parser/tests/tsc/genericFunctionParameters.json index bdc6c998fc16..483c6a71a890 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericFunctionParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/genericFunctionParameters.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 64, - "end": 82, + "end": 66, "ctxt": 0 }, "value": "cb", @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 72, - "end": 76, + "end": 73, "ctxt": 0 }, "value": "x", @@ -251,7 +251,7 @@ "type": "Identifier", "span": { "start": 111, - "end": 144, + "end": 113, "ctxt": 0 }, "value": "cb", @@ -275,7 +275,7 @@ "type": "Identifier", "span": { "start": 134, - "end": 138, + "end": 135, "ctxt": 0 }, "value": "x", @@ -478,7 +478,7 @@ "type": "Identifier", "span": { "start": 173, - "end": 208, + "end": 175, "ctxt": 0 }, "value": "cb", @@ -502,7 +502,7 @@ "type": "Identifier", "span": { "start": 198, - "end": 202, + "end": 199, "ctxt": 0 }, "value": "x", @@ -1035,7 +1035,7 @@ "type": "Identifier", "span": { "start": 355, - "end": 388, + "end": 357, "ctxt": 0 }, "value": "go", @@ -1059,7 +1059,7 @@ "type": "Identifier", "span": { "start": 363, - "end": 382, + "end": 366, "ctxt": 0 }, "value": "ops", diff --git a/crates/swc_ecma_parser/tests/tsc/genericInstantiationEquivalentToObjectLiteral.json b/crates/swc_ecma_parser/tests/tsc/genericInstantiationEquivalentToObjectLiteral.json index ccf0f2605733..be1633dde708 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericInstantiationEquivalentToObjectLiteral.json +++ b/crates/swc_ecma_parser/tests/tsc/genericInstantiationEquivalentToObjectLiteral.json @@ -514,7 +514,7 @@ "type": "Identifier", "span": { "start": 162, - "end": 175, + "end": 163, "ctxt": 0 }, "value": "x", @@ -689,7 +689,7 @@ "type": "Identifier", "span": { "start": 204, - "end": 231, + "end": 205, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/genericObjectRest.json b/crates/swc_ecma_parser/tests/tsc/genericObjectRest.json index a017484128b3..832ebf8f0982 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericObjectRest.json +++ b/crates/swc_ecma_parser/tests/tsc/genericObjectRest.json @@ -74,7 +74,7 @@ "type": "Identifier", "span": { "start": 102, - "end": 108, + "end": 105, "ctxt": 0 }, "value": "obj", @@ -951,7 +951,7 @@ "type": "Identifier", "span": { "start": 412, - "end": 418, + "end": 415, "ctxt": 0 }, "value": "obj", @@ -1288,7 +1288,7 @@ "type": "Identifier", "span": { "start": 525, - "end": 531, + "end": 528, "ctxt": 0 }, "value": "obj", @@ -1334,7 +1334,7 @@ "type": "Identifier", "span": { "start": 533, - "end": 539, + "end": 535, "ctxt": 0 }, "value": "k1", @@ -1380,7 +1380,7 @@ "type": "Identifier", "span": { "start": 541, - "end": 547, + "end": 543, "ctxt": 0 }, "value": "k2", @@ -1879,7 +1879,7 @@ "type": "Identifier", "span": { "start": 708, - "end": 717, + "end": 711, "ctxt": 0 }, "value": "obj", @@ -1925,7 +1925,7 @@ "type": "Identifier", "span": { "start": 719, - "end": 725, + "end": 721, "ctxt": 0 }, "value": "k1", @@ -1971,7 +1971,7 @@ "type": "Identifier", "span": { "start": 727, - "end": 733, + "end": 729, "ctxt": 0 }, "value": "k2", diff --git a/crates/swc_ecma_parser/tests/tsc/genericRestArity.json b/crates/swc_ecma_parser/tests/tsc/genericRestArity.json index 213cb1d9c22e..b6131b81ec2f 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericRestArity.json +++ b/crates/swc_ecma_parser/tests/tsc/genericRestArity.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 72, - "end": 102, + "end": 79, "ctxt": 0 }, "value": "handler", diff --git a/crates/swc_ecma_parser/tests/tsc/genericRestArityStrict.json b/crates/swc_ecma_parser/tests/tsc/genericRestArityStrict.json index 3f5118d8d505..4d982e5e2f1b 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericRestArityStrict.json +++ b/crates/swc_ecma_parser/tests/tsc/genericRestArityStrict.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 90, - "end": 120, + "end": 97, "ctxt": 0 }, "value": "handler", diff --git a/crates/swc_ecma_parser/tests/tsc/genericRestParameters1.json b/crates/swc_ecma_parser/tests/tsc/genericRestParameters1.json index a6abe607075f..5de2d21ce956 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericRestParameters1.json +++ b/crates/swc_ecma_parser/tests/tsc/genericRestParameters1.json @@ -215,7 +215,7 @@ "type": "Identifier", "span": { "start": 117, - "end": 127, + "end": 119, "ctxt": 0 }, "value": "x0", @@ -242,7 +242,7 @@ "type": "Identifier", "span": { "start": 129, - "end": 139, + "end": 131, "ctxt": 0 }, "value": "x1", @@ -269,7 +269,7 @@ "type": "Identifier", "span": { "start": 141, - "end": 152, + "end": 143, "ctxt": 0 }, "value": "x2", @@ -3090,7 +3090,7 @@ "type": "Identifier", "span": { "start": 1476, - "end": 1480, + "end": 1477, "ctxt": 0 }, "value": "u", @@ -3136,7 +3136,7 @@ "type": "Identifier", "span": { "start": 1482, - "end": 1486, + "end": 1483, "ctxt": 0 }, "value": "v", @@ -4568,7 +4568,7 @@ "type": "Identifier", "span": { "start": 2265, - "end": 2269, + "end": 2266, "ctxt": 0 }, "value": "u", @@ -4614,7 +4614,7 @@ "type": "Identifier", "span": { "start": 2271, - "end": 2275, + "end": 2272, "ctxt": 0 }, "value": "v", @@ -5122,7 +5122,7 @@ "type": "Identifier", "span": { "start": 2482, - "end": 2502, + "end": 2483, "ctxt": 0 }, "value": "f", @@ -5451,7 +5451,7 @@ "type": "Identifier", "span": { "start": 2583, - "end": 2590, + "end": 2587, "ctxt": 0 }, "value": "args", @@ -5497,7 +5497,7 @@ "type": "Identifier", "span": { "start": 2592, - "end": 2612, + "end": 2593, "ctxt": 0 }, "value": "f", @@ -5766,7 +5766,7 @@ "type": "Identifier", "span": { "start": 2663, - "end": 2672, + "end": 2664, "ctxt": 0 }, "value": "a", @@ -5802,7 +5802,7 @@ "type": "Identifier", "span": { "start": 2674, - "end": 2683, + "end": 2675, "ctxt": 0 }, "value": "b", @@ -5900,7 +5900,7 @@ "type": "Identifier", "span": { "start": 2730, - "end": 2734, + "end": 2731, "ctxt": 0 }, "value": "a", @@ -5946,7 +5946,7 @@ "type": "Identifier", "span": { "start": 2736, - "end": 2740, + "end": 2737, "ctxt": 0 }, "value": "b", @@ -7074,7 +7074,7 @@ "type": "Identifier", "span": { "start": 3233, - "end": 3259, + "end": 3234, "ctxt": 0 }, "value": "f", @@ -7098,7 +7098,7 @@ "type": "Identifier", "span": { "start": 3237, - "end": 3241, + "end": 3238, "ctxt": 0 }, "value": "x", @@ -7227,7 +7227,7 @@ "type": "Identifier", "span": { "start": 3261, - "end": 3265, + "end": 3262, "ctxt": 0 }, "value": "x", @@ -7546,7 +7546,7 @@ "type": "Identifier", "span": { "start": 3334, - "end": 3343, + "end": 3335, "ctxt": 0 }, "value": "x", @@ -7573,7 +7573,7 @@ "type": "Identifier", "span": { "start": 3345, - "end": 3354, + "end": 3346, "ctxt": 0 }, "value": "y", @@ -7600,7 +7600,7 @@ "type": "Identifier", "span": { "start": 3356, - "end": 3366, + "end": 3357, "ctxt": 0 }, "value": "z", @@ -8129,7 +8129,7 @@ "type": "Identifier", "span": { "start": 3642, - "end": 3651, + "end": 3643, "ctxt": 0 }, "value": "x", @@ -8156,7 +8156,7 @@ "type": "Identifier", "span": { "start": 3653, - "end": 3663, + "end": 3654, "ctxt": 0 }, "value": "y", @@ -8183,7 +8183,7 @@ "type": "Identifier", "span": { "start": 3665, - "end": 3676, + "end": 3666, "ctxt": 0 }, "value": "z", @@ -8888,7 +8888,7 @@ "type": "Identifier", "span": { "start": 4040, - "end": 4044, + "end": 4041, "ctxt": 0 }, "value": "x", @@ -9069,7 +9069,7 @@ "type": "Identifier", "span": { "start": 4023, - "end": 4027, + "end": 4024, "ctxt": 0 }, "value": "x", @@ -9392,7 +9392,7 @@ "type": "Identifier", "span": { "start": 4184, - "end": 4193, + "end": 4185, "ctxt": 0 }, "value": "x", @@ -9419,7 +9419,7 @@ "type": "Identifier", "span": { "start": 4195, - "end": 4204, + "end": 4196, "ctxt": 0 }, "value": "y", @@ -9446,7 +9446,7 @@ "type": "Identifier", "span": { "start": 4206, - "end": 4216, + "end": 4207, "ctxt": 0 }, "value": "z", @@ -9721,7 +9721,7 @@ "type": "Identifier", "span": { "start": 4335, - "end": 4344, + "end": 4336, "ctxt": 0 }, "value": "x", @@ -9748,7 +9748,7 @@ "type": "Identifier", "span": { "start": 4346, - "end": 4355, + "end": 4347, "ctxt": 0 }, "value": "y", @@ -9775,7 +9775,7 @@ "type": "Identifier", "span": { "start": 4357, - "end": 4367, + "end": 4358, "ctxt": 0 }, "value": "z", @@ -11157,7 +11157,7 @@ "type": "Identifier", "span": { "start": 4925, - "end": 4929, + "end": 4926, "ctxt": 0 }, "value": "e", @@ -12246,7 +12246,7 @@ "type": "Identifier", "span": { "start": 5299, - "end": 5307, + "end": 5300, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/genericRestParameters2.json b/crates/swc_ecma_parser/tests/tsc/genericRestParameters2.json index 3c330fe4d2ef..08175a9e25eb 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericRestParameters2.json +++ b/crates/swc_ecma_parser/tests/tsc/genericRestParameters2.json @@ -570,7 +570,7 @@ "type": "Identifier", "span": { "start": 268, - "end": 277, + "end": 269, "ctxt": 0 }, "value": "a", @@ -743,7 +743,7 @@ "type": "Identifier", "span": { "start": 331, - "end": 340, + "end": 332, "ctxt": 0 }, "value": "a", @@ -770,7 +770,7 @@ "type": "Identifier", "span": { "start": 342, - "end": 351, + "end": 343, "ctxt": 0 }, "value": "b", @@ -925,7 +925,7 @@ "type": "Identifier", "span": { "start": 397, - "end": 406, + "end": 398, "ctxt": 0 }, "value": "a", @@ -952,7 +952,7 @@ "type": "Identifier", "span": { "start": 408, - "end": 417, + "end": 409, "ctxt": 0 }, "value": "b", @@ -979,7 +979,7 @@ "type": "Identifier", "span": { "start": 419, - "end": 429, + "end": 420, "ctxt": 0 }, "value": "c", @@ -1074,7 +1074,7 @@ "type": "Identifier", "span": { "start": 458, - "end": 467, + "end": 459, "ctxt": 0 }, "value": "a", @@ -1101,7 +1101,7 @@ "type": "Identifier", "span": { "start": 469, - "end": 478, + "end": 470, "ctxt": 0 }, "value": "b", @@ -1128,7 +1128,7 @@ "type": "Identifier", "span": { "start": 480, - "end": 490, + "end": 481, "ctxt": 0 }, "value": "c", @@ -1444,7 +1444,7 @@ "type": "Identifier", "span": { "start": 595, - "end": 604, + "end": 596, "ctxt": 0 }, "value": "a", @@ -1633,7 +1633,7 @@ "type": "Identifier", "span": { "start": 663, - "end": 672, + "end": 664, "ctxt": 0 }, "value": "a", @@ -1660,7 +1660,7 @@ "type": "Identifier", "span": { "start": 674, - "end": 683, + "end": 675, "ctxt": 0 }, "value": "b", @@ -1831,7 +1831,7 @@ "type": "Identifier", "span": { "start": 734, - "end": 743, + "end": 735, "ctxt": 0 }, "value": "a", @@ -1858,7 +1858,7 @@ "type": "Identifier", "span": { "start": 745, - "end": 754, + "end": 746, "ctxt": 0 }, "value": "b", @@ -5663,7 +5663,7 @@ "type": "Identifier", "span": { "start": 1968, - "end": 1977, + "end": 1969, "ctxt": 0 }, "value": "x", @@ -5690,7 +5690,7 @@ "type": "Identifier", "span": { "start": 1979, - "end": 1988, + "end": 1980, "ctxt": 0 }, "value": "y", @@ -6030,7 +6030,7 @@ "type": "Identifier", "span": { "start": 2129, - "end": 2138, + "end": 2130, "ctxt": 0 }, "value": "x", @@ -6057,7 +6057,7 @@ "type": "Identifier", "span": { "start": 2140, - "end": 2149, + "end": 2141, "ctxt": 0 }, "value": "y", @@ -6447,7 +6447,7 @@ "type": "Identifier", "span": { "start": 2307, - "end": 2316, + "end": 2308, "ctxt": 0 }, "value": "x", @@ -6762,7 +6762,7 @@ "type": "Identifier", "span": { "start": 2422, - "end": 2435, + "end": 2426, "ctxt": 0 }, "value": "head", @@ -7077,7 +7077,7 @@ "type": "Identifier", "span": { "start": 2510, - "end": 2519, + "end": 2511, "ctxt": 0 }, "value": "x", @@ -7104,7 +7104,7 @@ "type": "Identifier", "span": { "start": 2521, - "end": 2530, + "end": 2522, "ctxt": 0 }, "value": "y", @@ -7381,7 +7381,7 @@ "type": "Identifier", "span": { "start": 2615, - "end": 2624, + "end": 2616, "ctxt": 0 }, "value": "x", @@ -7408,7 +7408,7 @@ "type": "Identifier", "span": { "start": 2626, - "end": 2635, + "end": 2627, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/genericRestParameters3.json b/crates/swc_ecma_parser/tests/tsc/genericRestParameters3.json index b8ad9169c624..21bc2467b6c6 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericRestParameters3.json +++ b/crates/swc_ecma_parser/tests/tsc/genericRestParameters3.json @@ -51,7 +51,7 @@ "type": "Identifier", "span": { "start": 58, - "end": 67, + "end": 59, "ctxt": 0 }, "value": "x", @@ -262,7 +262,7 @@ "type": "Identifier", "span": { "start": 134, - "end": 143, + "end": 135, "ctxt": 0 }, "value": "x", @@ -289,7 +289,7 @@ "type": "Identifier", "span": { "start": 145, - "end": 154, + "end": 146, "ctxt": 0 }, "value": "y", @@ -384,7 +384,7 @@ "type": "Identifier", "span": { "start": 182, - "end": 191, + "end": 183, "ctxt": 0 }, "value": "x", @@ -411,7 +411,7 @@ "type": "Identifier", "span": { "start": 193, - "end": 202, + "end": 194, "ctxt": 0 }, "value": "y", @@ -438,7 +438,7 @@ "type": "Identifier", "span": { "start": 204, - "end": 214, + "end": 205, "ctxt": 0 }, "value": "z", @@ -2101,7 +2101,7 @@ "type": "Identifier", "span": { "start": 894, - "end": 918, + "end": 896, "ctxt": 0 }, "value": "cb", @@ -4059,7 +4059,7 @@ "type": "Identifier", "span": { "start": 1791, - "end": 1800, + "end": 1792, "ctxt": 0 }, "value": "x", @@ -4468,7 +4468,7 @@ "type": "Identifier", "span": { "start": 2020, - "end": 2029, + "end": 2021, "ctxt": 0 }, "value": "x", @@ -4718,7 +4718,7 @@ "type": "Identifier", "span": { "start": 2128, - "end": 2185, + "end": 2130, "ctxt": 0 }, "value": "s1", @@ -4933,7 +4933,7 @@ "type": "Identifier", "span": { "start": 2187, - "end": 2233, + "end": 2189, "ctxt": 0 }, "value": "s2", @@ -4957,7 +4957,7 @@ "type": "Identifier", "span": { "start": 2192, - "end": 2201, + "end": 2193, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/getSetAccessorContextualTyping.json b/crates/swc_ecma_parser/tests/tsc/getSetAccessorContextualTyping.json index c462184be854..3cc722116ade 100644 --- a/crates/swc_ecma_parser/tests/tsc/getSetAccessorContextualTyping.json +++ b/crates/swc_ecma_parser/tests/tsc/getSetAccessorContextualTyping.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 307, - "end": 316, + "end": 308, "ctxt": 0 }, "value": "x", @@ -483,7 +483,7 @@ "type": "Identifier", "span": { "start": 578, - "end": 587, + "end": 579, "ctxt": 0 }, "value": "z", diff --git a/crates/swc_ecma_parser/tests/tsc/grammarAmbiguities.json b/crates/swc_ecma_parser/tests/tsc/grammarAmbiguities.json index 0e0777ee324c..4e0d1941e814 100644 --- a/crates/swc_ecma_parser/tests/tsc/grammarAmbiguities.json +++ b/crates/swc_ecma_parser/tests/tsc/grammarAmbiguities.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 12, - "end": 18, + "end": 13, "ctxt": 0 }, "value": "n", @@ -120,7 +120,7 @@ "type": "Identifier", "span": { "start": 54, - "end": 60, + "end": 55, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/heterogeneousArrayLiterals.json b/crates/swc_ecma_parser/tests/tsc/heterogeneousArrayLiterals.json index 645ca5d6e24f..76991e75927c 100644 --- a/crates/swc_ecma_parser/tests/tsc/heterogeneousArrayLiterals.json +++ b/crates/swc_ecma_parser/tests/tsc/heterogeneousArrayLiterals.json @@ -3297,7 +3297,7 @@ "type": "Identifier", "span": { "start": 1682, - "end": 1686, + "end": 1683, "ctxt": 0 }, "value": "t", @@ -3343,7 +3343,7 @@ "type": "Identifier", "span": { "start": 1688, - "end": 1692, + "end": 1689, "ctxt": 0 }, "value": "u", @@ -3962,7 +3962,7 @@ "type": "Identifier", "span": { "start": 1962, - "end": 1966, + "end": 1963, "ctxt": 0 }, "value": "t", @@ -4008,7 +4008,7 @@ "type": "Identifier", "span": { "start": 1968, - "end": 1972, + "end": 1969, "ctxt": 0 }, "value": "u", @@ -4935,7 +4935,7 @@ "type": "Identifier", "span": { "start": 2390, - "end": 2394, + "end": 2391, "ctxt": 0 }, "value": "t", @@ -4981,7 +4981,7 @@ "type": "Identifier", "span": { "start": 2396, - "end": 2400, + "end": 2397, "ctxt": 0 }, "value": "u", @@ -5908,7 +5908,7 @@ "type": "Identifier", "span": { "start": 2812, - "end": 2816, + "end": 2813, "ctxt": 0 }, "value": "t", @@ -5954,7 +5954,7 @@ "type": "Identifier", "span": { "start": 2818, - "end": 2822, + "end": 2819, "ctxt": 0 }, "value": "u", diff --git a/crates/swc_ecma_parser/tests/tsc/identicalCallSignatures.json b/crates/swc_ecma_parser/tests/tsc/identicalCallSignatures.json index cce26949d529..402b5b0da34f 100644 --- a/crates/swc_ecma_parser/tests/tsc/identicalCallSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/identicalCallSignatures.json @@ -85,7 +85,7 @@ "type": "Identifier", "span": { "start": 173, - "end": 179, + "end": 174, "ctxt": 0 }, "value": "x", @@ -140,7 +140,7 @@ "type": "Identifier", "span": { "start": 198, - "end": 202, + "end": 199, "ctxt": 0 }, "value": "x", @@ -247,7 +247,7 @@ "type": "Identifier", "span": { "start": 216, - "end": 220, + "end": 217, "ctxt": 0 }, "value": "x", @@ -417,7 +417,7 @@ "type": "Identifier", "span": { "start": 261, - "end": 265, + "end": 262, "ctxt": 0 }, "value": "x", @@ -492,7 +492,7 @@ "type": "Identifier", "span": { "start": 276, - "end": 280, + "end": 277, "ctxt": 0 }, "value": "x", @@ -650,7 +650,7 @@ "type": "Identifier", "span": { "start": 329, - "end": 335, + "end": 330, "ctxt": 0 }, "value": "x", @@ -705,7 +705,7 @@ "type": "Identifier", "span": { "start": 354, - "end": 358, + "end": 355, "ctxt": 0 }, "value": "x", @@ -812,7 +812,7 @@ "type": "Identifier", "span": { "start": 372, - "end": 376, + "end": 373, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/identicalCallSignatures2.json b/crates/swc_ecma_parser/tests/tsc/identicalCallSignatures2.json index 0ff44b23d535..c52faab1e734 100644 --- a/crates/swc_ecma_parser/tests/tsc/identicalCallSignatures2.json +++ b/crates/swc_ecma_parser/tests/tsc/identicalCallSignatures2.json @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 194, - "end": 203, + "end": 195, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/identicalCallSignatures3.json b/crates/swc_ecma_parser/tests/tsc/identicalCallSignatures3.json index aa798742e18e..eded98596364 100644 --- a/crates/swc_ecma_parser/tests/tsc/identicalCallSignatures3.json +++ b/crates/swc_ecma_parser/tests/tsc/identicalCallSignatures3.json @@ -46,7 +46,7 @@ "type": "Identifier", "span": { "start": 230, - "end": 239, + "end": 231, "ctxt": 0 }, "value": "x", @@ -132,7 +132,7 @@ "type": "Identifier", "span": { "start": 272, - "end": 281, + "end": 273, "ctxt": 0 }, "value": "x", @@ -250,7 +250,7 @@ "type": "Identifier", "span": { "start": 318, - "end": 327, + "end": 319, "ctxt": 0 }, "value": "x", @@ -368,7 +368,7 @@ "type": "Identifier", "span": { "start": 364, - "end": 373, + "end": 365, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/ifDoWhileStatements.json b/crates/swc_ecma_parser/tests/tsc/ifDoWhileStatements.json index 5220052932ec..1e45305422e1 100644 --- a/crates/swc_ecma_parser/tests/tsc/ifDoWhileStatements.json +++ b/crates/swc_ecma_parser/tests/tsc/ifDoWhileStatements.json @@ -630,7 +630,7 @@ "type": "Identifier", "span": { "start": 251, - "end": 260, + "end": 252, "ctxt": 0 }, "value": "x", @@ -736,7 +736,7 @@ "type": "Identifier", "span": { "start": 297, - "end": 306, + "end": 298, "ctxt": 0 }, "value": "x", @@ -975,7 +975,7 @@ "type": "Identifier", "span": { "start": 421, - "end": 430, + "end": 422, "ctxt": 0 }, "value": "x", @@ -1227,7 +1227,7 @@ "type": "Identifier", "span": { "start": 550, - "end": 559, + "end": 551, "ctxt": 0 }, "value": "x", @@ -4328,7 +4328,7 @@ "type": "Identifier", "span": { "start": 2062, - "end": 2072, + "end": 2063, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/importAliasIdentifiers.json b/crates/swc_ecma_parser/tests/tsc/importAliasIdentifiers.json index d4e93adad6a1..8de23ebece39 100644 --- a/crates/swc_ecma_parser/tests/tsc/importAliasIdentifiers.json +++ b/crates/swc_ecma_parser/tests/tsc/importAliasIdentifiers.json @@ -93,7 +93,7 @@ "type": "Identifier", "span": { "start": 70, - "end": 79, + "end": 71, "ctxt": 0 }, "value": "x", @@ -132,7 +132,7 @@ "type": "Identifier", "span": { "start": 88, - "end": 97, + "end": 89, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/importCallExpression2ES2020.json b/crates/swc_ecma_parser/tests/tsc/importCallExpression2ES2020.json index a2884ed6789e..a343ef4404a2 100644 --- a/crates/swc_ecma_parser/tests/tsc/importCallExpression2ES2020.json +++ b/crates/swc_ecma_parser/tests/tsc/importCallExpression2ES2020.json @@ -132,7 +132,7 @@ "type": "Identifier", "span": { "start": 141, - "end": 156, + "end": 142, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/importCallExpressionDeclarationEmit1.json b/crates/swc_ecma_parser/tests/tsc/importCallExpressionDeclarationEmit1.json index aa839f1ba44c..5828a9f7d6a7 100644 --- a/crates/swc_ecma_parser/tests/tsc/importCallExpressionDeclarationEmit1.json +++ b/crates/swc_ecma_parser/tests/tsc/importCallExpressionDeclarationEmit1.json @@ -570,7 +570,7 @@ "type": "Identifier", "span": { "start": 424, - "end": 436, + "end": 428, "ctxt": 0 }, "value": "path", diff --git a/crates/swc_ecma_parser/tests/tsc/importCallExpressionInAMD2.json b/crates/swc_ecma_parser/tests/tsc/importCallExpressionInAMD2.json index 7d358d64dbb4..f159e4a22e2e 100644 --- a/crates/swc_ecma_parser/tests/tsc/importCallExpressionInAMD2.json +++ b/crates/swc_ecma_parser/tests/tsc/importCallExpressionInAMD2.json @@ -132,7 +132,7 @@ "type": "Identifier", "span": { "start": 222, - "end": 237, + "end": 223, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/importCallExpressionInCJS2.json b/crates/swc_ecma_parser/tests/tsc/importCallExpressionInCJS2.json index 12013118e0f9..d8f20a98d0d8 100644 --- a/crates/swc_ecma_parser/tests/tsc/importCallExpressionInCJS2.json +++ b/crates/swc_ecma_parser/tests/tsc/importCallExpressionInCJS2.json @@ -154,7 +154,7 @@ "type": "Identifier", "span": { "start": 209, - "end": 230, + "end": 216, "ctxt": 0 }, "value": "promise", diff --git a/crates/swc_ecma_parser/tests/tsc/importCallExpressionInCJS3.json b/crates/swc_ecma_parser/tests/tsc/importCallExpressionInCJS3.json index 992163782910..6df901ef0b9b 100644 --- a/crates/swc_ecma_parser/tests/tsc/importCallExpressionInCJS3.json +++ b/crates/swc_ecma_parser/tests/tsc/importCallExpressionInCJS3.json @@ -132,7 +132,7 @@ "type": "Identifier", "span": { "start": 227, - "end": 242, + "end": 228, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/importCallExpressionInSystem2.json b/crates/swc_ecma_parser/tests/tsc/importCallExpressionInSystem2.json index 4366d684d00f..1ad1299a0399 100644 --- a/crates/swc_ecma_parser/tests/tsc/importCallExpressionInSystem2.json +++ b/crates/swc_ecma_parser/tests/tsc/importCallExpressionInSystem2.json @@ -132,7 +132,7 @@ "type": "Identifier", "span": { "start": 225, - "end": 240, + "end": 226, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/importCallExpressionInUMD2.json b/crates/swc_ecma_parser/tests/tsc/importCallExpressionInUMD2.json index 7d358d64dbb4..f159e4a22e2e 100644 --- a/crates/swc_ecma_parser/tests/tsc/importCallExpressionInUMD2.json +++ b/crates/swc_ecma_parser/tests/tsc/importCallExpressionInUMD2.json @@ -132,7 +132,7 @@ "type": "Identifier", "span": { "start": 222, - "end": 237, + "end": 223, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/importCallExpressionReturnPromiseOfAny.json b/crates/swc_ecma_parser/tests/tsc/importCallExpressionReturnPromiseOfAny.json index a78f7bad8d6a..ceb12026f418 100644 --- a/crates/swc_ecma_parser/tests/tsc/importCallExpressionReturnPromiseOfAny.json +++ b/crates/swc_ecma_parser/tests/tsc/importCallExpressionReturnPromiseOfAny.json @@ -1323,7 +1323,7 @@ "type": "Identifier", "span": { "start": 875, - "end": 896, + "end": 886, "ctxt": 0 }, "value": "directories", diff --git a/crates/swc_ecma_parser/tests/tsc/importStatements.json b/crates/swc_ecma_parser/tests/tsc/importStatements.json index 86ae263b25a1..fce017df5fe1 100644 --- a/crates/swc_ecma_parser/tests/tsc/importStatements.json +++ b/crates/swc_ecma_parser/tests/tsc/importStatements.json @@ -93,7 +93,7 @@ "type": "Identifier", "span": { "start": 64, - "end": 73, + "end": 65, "ctxt": 0 }, "value": "x", @@ -132,7 +132,7 @@ "type": "Identifier", "span": { "start": 82, - "end": 91, + "end": 83, "ctxt": 0 }, "value": "y", @@ -853,7 +853,7 @@ "type": "Identifier", "span": { "start": 562, - "end": 572, + "end": 563, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/importStatementsInterfaces.json b/crates/swc_ecma_parser/tests/tsc/importStatementsInterfaces.json index 393159e902f0..77c2700b6d9b 100644 --- a/crates/swc_ecma_parser/tests/tsc/importStatementsInterfaces.json +++ b/crates/swc_ecma_parser/tests/tsc/importStatementsInterfaces.json @@ -935,7 +935,7 @@ "type": "Identifier", "span": { "start": 570, - "end": 582, + "end": 571, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/importTypeAmbient.json b/crates/swc_ecma_parser/tests/tsc/importTypeAmbient.json index 30d224b889d3..1f66981964a8 100644 --- a/crates/swc_ecma_parser/tests/tsc/importTypeAmbient.json +++ b/crates/swc_ecma_parser/tests/tsc/importTypeAmbient.json @@ -713,7 +713,7 @@ "type": "Identifier", "span": { "start": 480, - "end": 492, + "end": 485, "ctxt": 0 }, "value": "input", @@ -1131,7 +1131,7 @@ "type": "Identifier", "span": { "start": 626, - "end": 637, + "end": 631, "ctxt": 0 }, "value": "input", diff --git a/crates/swc_ecma_parser/tests/tsc/importTypeGenericTypes.json b/crates/swc_ecma_parser/tests/tsc/importTypeGenericTypes.json index 175965ad7fef..c03111bacfd4 100644 --- a/crates/swc_ecma_parser/tests/tsc/importTypeGenericTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/importTypeGenericTypes.json @@ -842,7 +842,7 @@ "type": "Identifier", "span": { "start": 436, - "end": 451, + "end": 441, "ctxt": 0 }, "value": "input", @@ -1759,7 +1759,7 @@ "type": "Identifier", "span": { "start": 753, - "end": 764, + "end": 758, "ctxt": 0 }, "value": "input", diff --git a/crates/swc_ecma_parser/tests/tsc/importTypeInJSDoc.json b/crates/swc_ecma_parser/tests/tsc/importTypeInJSDoc.json index 75ebaade2253..e4dc555331bd 100644 --- a/crates/swc_ecma_parser/tests/tsc/importTypeInJSDoc.json +++ b/crates/swc_ecma_parser/tests/tsc/importTypeInJSDoc.json @@ -109,7 +109,7 @@ "type": "Identifier", "span": { "start": 168, - "end": 177, + "end": 169, "ctxt": 0 }, "value": "x", @@ -264,7 +264,7 @@ "type": "Identifier", "span": { "start": 256, - "end": 265, + "end": 257, "ctxt": 0 }, "value": "x", @@ -291,7 +291,7 @@ "type": "Identifier", "span": { "start": 267, - "end": 277, + "end": 268, "ctxt": 0 }, "value": "y", @@ -375,7 +375,7 @@ "type": "Identifier", "span": { "start": 304, - "end": 318, + "end": 305, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/importTypeLocal.json b/crates/swc_ecma_parser/tests/tsc/importTypeLocal.json index 73fdb5d3236a..73ae65c0c9f6 100644 --- a/crates/swc_ecma_parser/tests/tsc/importTypeLocal.json +++ b/crates/swc_ecma_parser/tests/tsc/importTypeLocal.json @@ -565,7 +565,7 @@ "type": "Identifier", "span": { "start": 374, - "end": 386, + "end": 379, "ctxt": 0 }, "value": "input", @@ -1159,7 +1159,7 @@ "type": "Identifier", "span": { "start": 620, - "end": 631, + "end": 625, "ctxt": 0 }, "value": "input", diff --git a/crates/swc_ecma_parser/tests/tsc/importTypeLocalMissing.json b/crates/swc_ecma_parser/tests/tsc/importTypeLocalMissing.json index aca5a1d64c69..15a457aad634 100644 --- a/crates/swc_ecma_parser/tests/tsc/importTypeLocalMissing.json +++ b/crates/swc_ecma_parser/tests/tsc/importTypeLocalMissing.json @@ -565,7 +565,7 @@ "type": "Identifier", "span": { "start": 374, - "end": 386, + "end": 379, "ctxt": 0 }, "value": "input", @@ -1304,7 +1304,7 @@ "type": "Identifier", "span": { "start": 674, - "end": 685, + "end": 679, "ctxt": 0 }, "value": "input", diff --git a/crates/swc_ecma_parser/tests/tsc/importingExportingTypes.json b/crates/swc_ecma_parser/tests/tsc/importingExportingTypes.json index f996cb6e7a86..5a2a89663edf 100644 --- a/crates/swc_ecma_parser/tests/tsc/importingExportingTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/importingExportingTypes.json @@ -104,7 +104,7 @@ "type": "Identifier", "span": { "start": 195, - "end": 207, + "end": 199, "ctxt": 0 }, "value": "path", @@ -140,7 +140,7 @@ "type": "Identifier", "span": { "start": 209, - "end": 218, + "end": 213, "ctxt": 0 }, "value": "data", @@ -176,7 +176,7 @@ "type": "Identifier", "span": { "start": 220, - "end": 245, + "end": 227, "ctxt": 0 }, "value": "options", @@ -222,7 +222,7 @@ "type": "Identifier", "span": { "start": 247, - "end": 277, + "end": 255, "ctxt": 0 }, "value": "callback", @@ -246,7 +246,7 @@ "type": "Identifier", "span": { "start": 258, - "end": 268, + "end": 261, "ctxt": 0 }, "value": "err", diff --git a/crates/swc_ecma_parser/tests/tsc/inOperatorWithValidOperands.json b/crates/swc_ecma_parser/tests/tsc/inOperatorWithValidOperands.json index 7c483f1f2446..2c6b8427fd13 100644 --- a/crates/swc_ecma_parser/tests/tsc/inOperatorWithValidOperands.json +++ b/crates/swc_ecma_parser/tests/tsc/inOperatorWithValidOperands.json @@ -902,7 +902,7 @@ "type": "Identifier", "span": { "start": 541, - "end": 545, + "end": 542, "ctxt": 0 }, "value": "t", @@ -1077,7 +1077,7 @@ "type": "Identifier", "span": { "start": 599, - "end": 607, + "end": 600, "ctxt": 0 }, "value": "t", @@ -1304,7 +1304,7 @@ "type": "Identifier", "span": { "start": 659, - "end": 672, + "end": 660, "ctxt": 0 }, "value": "t", diff --git a/crates/swc_ecma_parser/tests/tsc/indexSignatureTypeInference.json b/crates/swc_ecma_parser/tests/tsc/indexSignatureTypeInference.json index 7726b2794477..31b9e10e7727 100644 --- a/crates/swc_ecma_parser/tests/tsc/indexSignatureTypeInference.json +++ b/crates/swc_ecma_parser/tests/tsc/indexSignatureTypeInference.json @@ -290,7 +290,7 @@ "type": "Identifier", "span": { "start": 142, - "end": 162, + "end": 148, "ctxt": 0 }, "value": "object", @@ -457,7 +457,7 @@ "type": "Identifier", "span": { "start": 207, - "end": 227, + "end": 213, "ctxt": 0 }, "value": "object", diff --git a/crates/swc_ecma_parser/tests/tsc/inferFromBindingPattern.json b/crates/swc_ecma_parser/tests/tsc/inferFromBindingPattern.json index 6df70bd7a2e0..968578153849 100644 --- a/crates/swc_ecma_parser/tests/tsc/inferFromBindingPattern.json +++ b/crates/swc_ecma_parser/tests/tsc/inferFromBindingPattern.json @@ -892,7 +892,7 @@ "type": "Identifier", "span": { "start": 438, - "end": 444, + "end": 441, "ctxt": 0 }, "value": "obj", @@ -1241,7 +1241,7 @@ "type": "Identifier", "span": { "start": 587, - "end": 617, + "end": 592, "ctxt": 0 }, "value": "props", @@ -1740,7 +1740,7 @@ "type": "Identifier", "span": { "start": 838, - "end": 845, + "end": 841, "ctxt": 0 }, "value": "arg", @@ -1890,7 +1890,7 @@ "type": "Identifier", "span": { "start": 891, - "end": 898, + "end": 894, "ctxt": 0 }, "value": "arg", diff --git a/crates/swc_ecma_parser/tests/tsc/inferThisType.json b/crates/swc_ecma_parser/tests/tsc/inferThisType.json index bdd52e9cff12..3506e9fd2f33 100644 --- a/crates/swc_ecma_parser/tests/tsc/inferThisType.json +++ b/crates/swc_ecma_parser/tests/tsc/inferThisType.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 23, - "end": 43, + "end": 24, "ctxt": 0 }, "value": "g", @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 27, - "end": 34, + "end": 31, "ctxt": 0 }, "value": "this", @@ -209,7 +209,7 @@ "type": "Identifier", "span": { "start": 67, - "end": 79, + "end": 71, "ctxt": 0 }, "value": "this", @@ -393,7 +393,7 @@ "type": "Identifier", "span": { "start": 155, - "end": 168, + "end": 159, "ctxt": 0 }, "value": "this", @@ -583,7 +583,7 @@ "type": "Identifier", "span": { "start": 230, - "end": 242, + "end": 234, "ctxt": 0 }, "value": "this", @@ -719,7 +719,7 @@ "type": "Identifier", "span": { "start": 302, - "end": 315, + "end": 306, "ctxt": 0 }, "value": "this", @@ -919,7 +919,7 @@ "type": "Identifier", "span": { "start": 371, - "end": 383, + "end": 375, "ctxt": 0 }, "value": "this", diff --git a/crates/swc_ecma_parser/tests/tsc/inferTypes2.json b/crates/swc_ecma_parser/tests/tsc/inferTypes2.json index f2f98bcd86e2..323813f83033 100644 --- a/crates/swc_ecma_parser/tests/tsc/inferTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/inferTypes2.json @@ -39,7 +39,7 @@ "type": "Identifier", "span": { "start": 95, - "end": 101, + "end": 98, "ctxt": 0 }, "value": "obj", @@ -263,7 +263,7 @@ "type": "Identifier", "span": { "start": 164, - "end": 170, + "end": 167, "ctxt": 0 }, "value": "obj", @@ -593,7 +593,7 @@ "type": "Identifier", "span": { "start": 296, - "end": 302, + "end": 299, "ctxt": 0 }, "value": "obj", @@ -956,7 +956,7 @@ "type": "Identifier", "span": { "start": 411, - "end": 417, + "end": 414, "ctxt": 0 }, "value": "obj", diff --git a/crates/swc_ecma_parser/tests/tsc/inferTypesWithExtends1.json b/crates/swc_ecma_parser/tests/tsc/inferTypesWithExtends1.json index 21cd948cb057..756826ecf2c3 100644 --- a/crates/swc_ecma_parser/tests/tsc/inferTypesWithExtends1.json +++ b/crates/swc_ecma_parser/tests/tsc/inferTypesWithExtends1.json @@ -794,7 +794,7 @@ "type": "Identifier", "span": { "start": 421, - "end": 446, + "end": 422, "ctxt": 0 }, "value": "a", @@ -970,7 +970,7 @@ "type": "Identifier", "span": { "start": 489, - "end": 514, + "end": 490, "ctxt": 0 }, "value": "a", @@ -1176,7 +1176,7 @@ "type": "Identifier", "span": { "start": 571, - "end": 577, + "end": 572, "ctxt": 0 }, "value": "a", @@ -1288,7 +1288,7 @@ "type": "Identifier", "span": { "start": 625, - "end": 629, + "end": 626, "ctxt": 0 }, "value": "a", @@ -1400,7 +1400,7 @@ "type": "Identifier", "span": { "start": 675, - "end": 684, + "end": 676, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/inferingFromAny.json b/crates/swc_ecma_parser/tests/tsc/inferingFromAny.json index 9b33aa0e99af..51b0b34fc2ba 100644 --- a/crates/swc_ecma_parser/tests/tsc/inferingFromAny.json +++ b/crates/swc_ecma_parser/tests/tsc/inferingFromAny.json @@ -167,7 +167,7 @@ "type": "Identifier", "span": { "start": 110, - "end": 114, + "end": 111, "ctxt": 0 }, "value": "t", @@ -298,7 +298,7 @@ "type": "Identifier", "span": { "start": 142, - "end": 148, + "end": 143, "ctxt": 0 }, "value": "t", @@ -437,7 +437,7 @@ "type": "Identifier", "span": { "start": 180, - "end": 189, + "end": 181, "ctxt": 0 }, "value": "t", @@ -685,7 +685,7 @@ "type": "Identifier", "span": { "start": 223, - "end": 244, + "end": 224, "ctxt": 0 }, "value": "x", @@ -909,7 +909,7 @@ "type": "Identifier", "span": { "start": 273, - "end": 290, + "end": 274, "ctxt": 0 }, "value": "x", @@ -933,7 +933,7 @@ "type": "Identifier", "span": { "start": 277, - "end": 281, + "end": 278, "ctxt": 0 }, "value": "a", @@ -1086,7 +1086,7 @@ "type": "Identifier", "span": { "start": 319, - "end": 338, + "end": 320, "ctxt": 0 }, "value": "x", @@ -1110,7 +1110,7 @@ "type": "Identifier", "span": { "start": 327, - "end": 331, + "end": 328, "ctxt": 0 }, "value": "a", @@ -1264,7 +1264,7 @@ "type": "Identifier", "span": { "start": 367, - "end": 388, + "end": 368, "ctxt": 0 }, "value": "x", @@ -1288,7 +1288,7 @@ "type": "Identifier", "span": { "start": 371, - "end": 377, + "end": 372, "ctxt": 0 }, "value": "a", @@ -1468,7 +1468,7 @@ "type": "Identifier", "span": { "start": 417, - "end": 427, + "end": 418, "ctxt": 0 }, "value": "x", @@ -1617,7 +1617,7 @@ "type": "Identifier", "span": { "start": 456, - "end": 470, + "end": 457, "ctxt": 0 }, "value": "x", @@ -1767,7 +1767,7 @@ "type": "Identifier", "span": { "start": 500, - "end": 521, + "end": 501, "ctxt": 0 }, "value": "x", @@ -1955,7 +1955,7 @@ "type": "Identifier", "span": { "start": 551, - "end": 572, + "end": 552, "ctxt": 0 }, "value": "x", @@ -2143,7 +2143,7 @@ "type": "Identifier", "span": { "start": 605, - "end": 613, + "end": 606, "ctxt": 0 }, "value": "x", @@ -2373,7 +2373,7 @@ "type": "Identifier", "span": { "start": 651, - "end": 659, + "end": 652, "ctxt": 0 }, "value": "x", @@ -2603,7 +2603,7 @@ "type": "Identifier", "span": { "start": 697, - "end": 722, + "end": 698, "ctxt": 0 }, "value": "x", @@ -3017,7 +3017,7 @@ "type": "Identifier", "span": { "start": 776, - "end": 783, + "end": 777, "ctxt": 0 }, "value": "x", @@ -3176,7 +3176,7 @@ "type": "Identifier", "span": { "start": 813, - "end": 826, + "end": 814, "ctxt": 0 }, "value": "x", @@ -3335,7 +3335,7 @@ "type": "Identifier", "span": { "start": 859, - "end": 881, + "end": 860, "ctxt": 0 }, "value": "x", @@ -3550,7 +3550,7 @@ "type": "Identifier", "span": { "start": 930, - "end": 949, + "end": 931, "ctxt": 0 }, "value": "x", @@ -3811,7 +3811,7 @@ "type": "Identifier", "span": { "start": 998, - "end": 1002, + "end": 999, "ctxt": 0 }, "value": "k", @@ -3857,7 +3857,7 @@ "type": "Identifier", "span": { "start": 1004, - "end": 1011, + "end": 1005, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughInstantiation.json b/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughInstantiation.json index b9ef106279b9..926926a69cfa 100644 --- a/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughInstantiation.json +++ b/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughInstantiation.json @@ -676,7 +676,7 @@ "type": "Identifier", "span": { "start": 421, - "end": 425, + "end": 422, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughTypeInference.json b/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughTypeInference.json index 92e77442e876..bb2bd3f0f38e 100644 --- a/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughTypeInference.json +++ b/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughTypeInference.json @@ -253,7 +253,7 @@ "type": "Identifier", "span": { "start": 99, - "end": 106, + "end": 100, "ctxt": 0 }, "value": "g", diff --git a/crates/swc_ecma_parser/tests/tsc/initializationOrdering1.json b/crates/swc_ecma_parser/tests/tsc/initializationOrdering1.json index 144b86fda054..e94803268b59 100644 --- a/crates/swc_ecma_parser/tests/tsc/initializationOrdering1.json +++ b/crates/swc_ecma_parser/tests/tsc/initializationOrdering1.json @@ -173,7 +173,7 @@ "type": "Identifier", "span": { "start": 193, - "end": 207, + "end": 199, "ctxt": 0 }, "value": "facade", diff --git a/crates/swc_ecma_parser/tests/tsc/initializerReferencingConstructorLocals.json b/crates/swc_ecma_parser/tests/tsc/initializerReferencingConstructorLocals.json index ea610e55de75..aaed0e274c8c 100644 --- a/crates/swc_ecma_parser/tests/tsc/initializerReferencingConstructorLocals.json +++ b/crates/swc_ecma_parser/tests/tsc/initializerReferencingConstructorLocals.json @@ -603,7 +603,7 @@ "type": "Identifier", "span": { "start": 490, - "end": 494, + "end": 491, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/initializerReferencingConstructorParameters.json b/crates/swc_ecma_parser/tests/tsc/initializerReferencingConstructorParameters.json index aafb9bd86532..c0b0703d37b5 100644 --- a/crates/swc_ecma_parser/tests/tsc/initializerReferencingConstructorParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/initializerReferencingConstructorParameters.json @@ -699,7 +699,7 @@ "type": "Identifier", "span": { "start": 544, - "end": 548, + "end": 545, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/instanceMemberAssignsToClassPrototype.json b/crates/swc_ecma_parser/tests/tsc/instanceMemberAssignsToClassPrototype.json index 48353c8b9569..3dc4dca7c4eb 100644 --- a/crates/swc_ecma_parser/tests/tsc/instanceMemberAssignsToClassPrototype.json +++ b/crates/swc_ecma_parser/tests/tsc/instanceMemberAssignsToClassPrototype.json @@ -189,7 +189,7 @@ "type": "Identifier", "span": { "start": 74, - "end": 83, + "end": 75, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/instanceMemberInitialization.json b/crates/swc_ecma_parser/tests/tsc/instanceMemberInitialization.json index 14efda74a4f9..1ba42e834fe2 100644 --- a/crates/swc_ecma_parser/tests/tsc/instanceMemberInitialization.json +++ b/crates/swc_ecma_parser/tests/tsc/instanceMemberInitialization.json @@ -380,7 +380,7 @@ "type": "Identifier", "span": { "start": 158, - "end": 184, + "end": 162, "ctxt": 0 }, "value": "Map_", diff --git a/crates/swc_ecma_parser/tests/tsc/instancePropertiesInheritedIntoClassType.json b/crates/swc_ecma_parser/tests/tsc/instancePropertiesInheritedIntoClassType.json index be76d99877cc..40a3c8489e8a 100644 --- a/crates/swc_ecma_parser/tests/tsc/instancePropertiesInheritedIntoClassType.json +++ b/crates/swc_ecma_parser/tests/tsc/instancePropertiesInheritedIntoClassType.json @@ -326,7 +326,7 @@ "type": "Identifier", "span": { "start": 182, - "end": 191, + "end": 183, "ctxt": 0 }, "value": "a", @@ -365,7 +365,7 @@ "type": "Identifier", "span": { "start": 201, - "end": 210, + "end": 202, "ctxt": 0 }, "value": "b", @@ -1083,7 +1083,7 @@ "type": "Identifier", "span": { "start": 506, - "end": 510, + "end": 507, "ctxt": 0 }, "value": "v", @@ -1241,7 +1241,7 @@ "type": "Identifier", "span": { "start": 573, - "end": 577, + "end": 574, "ctxt": 0 }, "value": "a", @@ -1290,7 +1290,7 @@ "type": "Identifier", "span": { "start": 587, - "end": 591, + "end": 588, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/tsc/instancePropertyInClassType.json b/crates/swc_ecma_parser/tests/tsc/instancePropertyInClassType.json index 888c8494f660..34495b43ea03 100644 --- a/crates/swc_ecma_parser/tests/tsc/instancePropertyInClassType.json +++ b/crates/swc_ecma_parser/tests/tsc/instancePropertyInClassType.json @@ -326,7 +326,7 @@ "type": "Identifier", "span": { "start": 182, - "end": 191, + "end": 183, "ctxt": 0 }, "value": "a", @@ -365,7 +365,7 @@ "type": "Identifier", "span": { "start": 201, - "end": 210, + "end": 202, "ctxt": 0 }, "value": "b", @@ -1002,7 +1002,7 @@ "type": "Identifier", "span": { "start": 467, - "end": 471, + "end": 468, "ctxt": 0 }, "value": "v", @@ -1160,7 +1160,7 @@ "type": "Identifier", "span": { "start": 534, - "end": 538, + "end": 535, "ctxt": 0 }, "value": "a", @@ -1209,7 +1209,7 @@ "type": "Identifier", "span": { "start": 548, - "end": 552, + "end": 549, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithInvalidOperands.es2015.json b/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithInvalidOperands.es2015.json index 4e544d21a61b..8252e8e5264e 100644 --- a/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithInvalidOperands.es2015.json +++ b/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithInvalidOperands.es2015.json @@ -1986,7 +1986,7 @@ "type": "Identifier", "span": { "start": 1115, - "end": 1135, + "end": 1120, "ctxt": 0 }, "value": "value", @@ -2316,7 +2316,7 @@ "type": "Identifier", "span": { "start": 1283, - "end": 1297, + "end": 1288, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithInvalidStaticToString.json b/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithInvalidStaticToString.json index 0c1a8df5dbc0..d525b45229c9 100644 --- a/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithInvalidStaticToString.json +++ b/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithInvalidStaticToString.json @@ -113,7 +113,7 @@ "type": "Identifier", "span": { "start": 77, - "end": 107, + "end": 91, "ctxt": 0 }, "value": "staticToString", @@ -313,7 +313,7 @@ "type": "Identifier", "span": { "start": 242, - "end": 272, + "end": 256, "ctxt": 0 }, "value": "staticToNumber", @@ -513,7 +513,7 @@ "type": "Identifier", "span": { "start": 400, - "end": 422, + "end": 406, "ctxt": 0 }, "value": "normal", diff --git a/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithLHSIsTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithLHSIsTypeParameter.json index d8374d1c42e7..fb16a11a7568 100644 --- a/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithLHSIsTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithLHSIsTypeParameter.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 17, - "end": 21, + "end": 18, "ctxt": 0 }, "value": "t", diff --git a/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithRHSHasSymbolHasInstance.json b/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithRHSHasSymbolHasInstance.json index 3bf54e60704e..e1a998a4765c 100644 --- a/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithRHSHasSymbolHasInstance.json +++ b/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithRHSHasSymbolHasInstance.json @@ -582,7 +582,7 @@ "type": "Identifier", "span": { "start": 265, - "end": 279, + "end": 270, "ctxt": 0 }, "value": "value", @@ -718,7 +718,7 @@ "type": "Identifier", "span": { "start": 335, - "end": 345, + "end": 340, "ctxt": 0 }, "value": "value", @@ -854,7 +854,7 @@ "type": "Identifier", "span": { "start": 401, - "end": 411, + "end": 406, "ctxt": 0 }, "value": "value", @@ -1027,7 +1027,7 @@ "type": "Identifier", "span": { "start": 474, - "end": 493, + "end": 479, "ctxt": 0 }, "value": "value", @@ -1239,7 +1239,7 @@ "type": "Identifier", "span": { "start": 556, - "end": 575, + "end": 561, "ctxt": 0 }, "value": "value", @@ -1451,7 +1451,7 @@ "type": "Identifier", "span": { "start": 637, - "end": 666, + "end": 642, "ctxt": 0 }, "value": "value", @@ -1682,7 +1682,7 @@ "type": "Identifier", "span": { "start": 731, - "end": 752, + "end": 736, "ctxt": 0 }, "value": "value", @@ -1887,7 +1887,7 @@ "type": "Identifier", "span": { "start": 826, - "end": 840, + "end": 831, "ctxt": 0 }, "value": "value", @@ -2031,7 +2031,7 @@ "type": "Identifier", "span": { "start": 903, - "end": 913, + "end": 908, "ctxt": 0 }, "value": "value", @@ -2175,7 +2175,7 @@ "type": "Identifier", "span": { "start": 976, - "end": 986, + "end": 981, "ctxt": 0 }, "value": "value", @@ -2356,7 +2356,7 @@ "type": "Identifier", "span": { "start": 1057, - "end": 1076, + "end": 1062, "ctxt": 0 }, "value": "value", @@ -2576,7 +2576,7 @@ "type": "Identifier", "span": { "start": 1147, - "end": 1166, + "end": 1152, "ctxt": 0 }, "value": "value", @@ -2796,7 +2796,7 @@ "type": "Identifier", "span": { "start": 1236, - "end": 1265, + "end": 1241, "ctxt": 0 }, "value": "value", @@ -3035,7 +3035,7 @@ "type": "Identifier", "span": { "start": 1338, - "end": 1359, + "end": 1343, "ctxt": 0 }, "value": "value", @@ -6954,7 +6954,7 @@ "type": "Identifier", "span": { "start": 3609, - "end": 3616, + "end": 3613, "ctxt": 0 }, "value": "this", @@ -7000,7 +7000,7 @@ "type": "Identifier", "span": { "start": 3618, - "end": 3632, + "end": 3623, "ctxt": 0 }, "value": "value", @@ -7910,7 +7910,7 @@ "type": "Identifier", "span": { "start": 4261, - "end": 4271, + "end": 4262, "ctxt": 0 }, "value": "x", @@ -8200,7 +8200,7 @@ "type": "Identifier", "span": { "start": 4440, - "end": 4450, + "end": 4441, "ctxt": 0 }, "value": "x", @@ -8354,7 +8354,7 @@ "type": "Identifier", "span": { "start": 4514, - "end": 4524, + "end": 4515, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceExtendsObjectIntersection.json b/crates/swc_ecma_parser/tests/tsc/interfaceExtendsObjectIntersection.json index d884c0f26245..7c39c0e9b6c1 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceExtendsObjectIntersection.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceExtendsObjectIntersection.json @@ -2248,7 +2248,7 @@ "type": "Identifier", "span": { "start": 954, - "end": 963, + "end": 955, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceWithOverloadedCallAndConstructSignatures.json b/crates/swc_ecma_parser/tests/tsc/interfaceWithOverloadedCallAndConstructSignatures.json index ecb8eae61ad9..d825b60326e7 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceWithOverloadedCallAndConstructSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceWithOverloadedCallAndConstructSignatures.json @@ -73,7 +73,7 @@ "type": "Identifier", "span": { "start": 38, - "end": 47, + "end": 39, "ctxt": 0 }, "value": "x", @@ -155,7 +155,7 @@ "type": "Identifier", "span": { "start": 85, - "end": 94, + "end": 86, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceWithPropertyOfEveryType.json b/crates/swc_ecma_parser/tests/tsc/interfaceWithPropertyOfEveryType.json index 2aebcbfe6932..bbee9d313482 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceWithPropertyOfEveryType.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceWithPropertyOfEveryType.json @@ -607,7 +607,7 @@ "type": "Identifier", "span": { "start": 220, - "end": 229, + "end": 221, "ctxt": 0 }, "value": "x", @@ -694,7 +694,7 @@ "type": "Identifier", "span": { "start": 253, - "end": 257, + "end": 254, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceWithSpecializedCallAndConstructSignatures.json b/crates/swc_ecma_parser/tests/tsc/interfaceWithSpecializedCallAndConstructSignatures.json index 69173a4337d5..0acb42387855 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceWithSpecializedCallAndConstructSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceWithSpecializedCallAndConstructSignatures.json @@ -46,7 +46,7 @@ "type": "Identifier", "span": { "start": 22, - "end": 28, + "end": 23, "ctxt": 0 }, "value": "x", @@ -110,7 +110,7 @@ "type": "Identifier", "span": { "start": 44, - "end": 53, + "end": 45, "ctxt": 0 }, "value": "x", @@ -165,7 +165,7 @@ "type": "Identifier", "span": { "start": 71, - "end": 77, + "end": 72, "ctxt": 0 }, "value": "x", @@ -229,7 +229,7 @@ "type": "Identifier", "span": { "start": 94, - "end": 103, + "end": 95, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionAsWeakTypeSource.json b/crates/swc_ecma_parser/tests/tsc/intersectionAsWeakTypeSource.json index 50bb6d6cf939..6ee548b7d92f 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionAsWeakTypeSource.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionAsWeakTypeSource.json @@ -743,7 +743,7 @@ "type": "Identifier", "span": { "start": 358, - "end": 367, + "end": 364, "ctxt": 0 }, "value": "styles", diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionNarrowing.json b/crates/swc_ecma_parser/tests/tsc/intersectionNarrowing.json index 5ab132f383bc..c862a3c67d10 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionNarrowing.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionNarrowing.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 57, - "end": 86, + "end": 58, "ctxt": 0 }, "value": "x", @@ -260,7 +260,7 @@ "type": "Identifier", "span": { "start": 170, - "end": 199, + "end": 171, "ctxt": 0 }, "value": "x", @@ -534,7 +534,7 @@ "type": "Identifier", "span": { "start": 360, - "end": 386, + "end": 361, "ctxt": 0 }, "value": "x", @@ -817,7 +817,7 @@ "type": "Identifier", "span": { "start": 550, - "end": 566, + "end": 551, "ctxt": 0 }, "value": "x", @@ -1159,7 +1159,7 @@ "type": "Identifier", "span": { "start": 754, - "end": 767, + "end": 755, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionReduction.json b/crates/swc_ecma_parser/tests/tsc/intersectionReduction.json index 98a03b8a93fe..59ae0f1875dc 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionReduction.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionReduction.json @@ -5276,7 +5276,7 @@ "type": "Identifier", "span": { "start": 1961, - "end": 1974, + "end": 1962, "ctxt": 0 }, "value": "x", @@ -8397,7 +8397,7 @@ "type": "Identifier", "span": { "start": 3153, - "end": 3174, + "end": 3166, "ctxt": 0 }, "value": "alsoShouldBeB", @@ -9122,7 +9122,7 @@ "type": "Identifier", "span": { "start": 3417, - "end": 3426, + "end": 3418, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionThisTypes.json b/crates/swc_ecma_parser/tests/tsc/intersectionThisTypes.json index 241372f63d4b..983e518402c8 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionThisTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionThisTypes.json @@ -388,7 +388,7 @@ "type": "Identifier", "span": { "start": 186, - "end": 195, + "end": 187, "ctxt": 0 }, "value": "t", @@ -750,7 +750,7 @@ "type": "Identifier", "span": { "start": 312, - "end": 321, + "end": 313, "ctxt": 0 }, "value": "t", @@ -1047,7 +1047,7 @@ "type": "Identifier", "span": { "start": 410, - "end": 418, + "end": 415, "ctxt": 0 }, "value": "props", @@ -1281,7 +1281,7 @@ "type": "Identifier", "span": { "start": 506, - "end": 518, + "end": 511, "ctxt": 0 }, "value": "label", diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference.json b/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference.json index 53348dbaddb3..ac98e5f9a553 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 23, - "end": 30, + "end": 27, "ctxt": 0 }, "value": "obj1", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 32, - "end": 39, + "end": 36, "ctxt": 0 }, "value": "obj2", @@ -1001,7 +1001,7 @@ "type": "Identifier", "span": { "start": 340, - "end": 356, + "end": 343, "ctxt": 0 }, "value": "obj", diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference2.json b/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference2.json index 6e7285519def..7b3341d6cd27 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference2.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference2.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 23, - "end": 37, + "end": 24, "ctxt": 0 }, "value": "x", @@ -551,7 +551,7 @@ "type": "Identifier", "span": { "start": 242, - "end": 269, + "end": 245, "ctxt": 0 }, "value": "obj", @@ -686,7 +686,7 @@ "type": "Identifier", "span": { "start": 271, - "end": 279, + "end": 274, "ctxt": 0 }, "value": "key", diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionTypeMembers.json b/crates/swc_ecma_parser/tests/tsc/intersectionTypeMembers.json index 0bedbdc2f528..01ac71c31265 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionTypeMembers.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionTypeMembers.json @@ -1097,7 +1097,7 @@ "type": "Identifier", "span": { "start": 486, - "end": 495, + "end": 487, "ctxt": 0 }, "value": "x", @@ -1172,7 +1172,7 @@ "type": "Identifier", "span": { "start": 519, - "end": 528, + "end": 520, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionTypeOverloading.json b/crates/swc_ecma_parser/tests/tsc/intersectionTypeOverloading.json index d6d7b12c465c..ca6102ba36cc 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionTypeOverloading.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionTypeOverloading.json @@ -37,7 +37,7 @@ "type": "Identifier", "span": { "start": 106, - "end": 115, + "end": 107, "ctxt": 0 }, "value": "s", @@ -112,7 +112,7 @@ "type": "Identifier", "span": { "start": 138, - "end": 144, + "end": 139, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionWithUnionConstraint.json b/crates/swc_ecma_parser/tests/tsc/intersectionWithUnionConstraint.json index 238a21f6e2eb..7e5db1469944 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionWithUnionConstraint.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionWithUnionConstraint.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 85, - "end": 93, + "end": 86, "ctxt": 0 }, "value": "x", @@ -329,7 +329,7 @@ "type": "Identifier", "span": { "start": 279, - "end": 287, + "end": 280, "ctxt": 0 }, "value": "x", @@ -1149,7 +1149,7 @@ "type": "Identifier", "span": { "start": 706, - "end": 742, + "end": 707, "ctxt": 0 }, "value": "x", @@ -1431,7 +1431,7 @@ "type": "Identifier", "span": { "start": 825, - "end": 849, + "end": 826, "ctxt": 0 }, "value": "x", @@ -1676,7 +1676,7 @@ "type": "Identifier", "span": { "start": 915, - "end": 929, + "end": 916, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionsAndEmptyObjects.json b/crates/swc_ecma_parser/tests/tsc/intersectionsAndEmptyObjects.json index 2174191c193e..634be39b9832 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionsAndEmptyObjects.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionsAndEmptyObjects.json @@ -4054,7 +4054,7 @@ "type": "Identifier", "span": { "start": 1873, - "end": 1886, + "end": 1874, "ctxt": 0 }, "value": "_", diff --git a/crates/swc_ecma_parser/tests/tsc/intraExpressionInferences.json b/crates/swc_ecma_parser/tests/tsc/intraExpressionInferences.json index b5eef2038850..fb4b1c596005 100644 --- a/crates/swc_ecma_parser/tests/tsc/intraExpressionInferences.json +++ b/crates/swc_ecma_parser/tests/tsc/intraExpressionInferences.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 91, - "end": 158, + "end": 94, "ctxt": 0 }, "value": "obj", @@ -93,7 +93,7 @@ "type": "Identifier", "span": { "start": 112, - "end": 121, + "end": 113, "ctxt": 0 }, "value": "n", @@ -190,7 +190,7 @@ "type": "Identifier", "span": { "start": 143, - "end": 147, + "end": 144, "ctxt": 0 }, "value": "x", @@ -828,7 +828,7 @@ "type": "Identifier", "span": { "start": 414, - "end": 453, + "end": 417, "ctxt": 0 }, "value": "obj", @@ -868,7 +868,7 @@ "type": "Identifier", "span": { "start": 421, - "end": 430, + "end": 422, "ctxt": 0 }, "value": "n", @@ -942,7 +942,7 @@ "type": "Identifier", "span": { "start": 439, - "end": 443, + "end": 440, "ctxt": 0 }, "value": "x", @@ -1443,7 +1443,7 @@ "type": "Identifier", "span": { "start": 611, - "end": 628, + "end": 620, "ctxt": 0 }, "value": "parameter", @@ -1540,7 +1540,7 @@ "type": "Identifier", "span": { "start": 661, - "end": 671, + "end": 668, "ctxt": 0 }, "value": "generic", @@ -1968,7 +1968,7 @@ "type": "Identifier", "span": { "start": 909, - "end": 953, + "end": 910, "ctxt": 0 }, "value": "o", @@ -2080,7 +2080,7 @@ "type": "Identifier", "span": { "start": 938, - "end": 942, + "end": 939, "ctxt": 0 }, "value": "m", @@ -2412,7 +2412,7 @@ "type": "Identifier", "span": { "start": 1087, - "end": 1123, + "end": 1094, "ctxt": 0 }, "value": "options", @@ -2524,7 +2524,7 @@ "type": "Identifier", "span": { "start": 1108, - "end": 1112, + "end": 1109, "ctxt": 0 }, "value": "a", @@ -3253,7 +3253,7 @@ "type": "Identifier", "span": { "start": 1354, - "end": 1359, + "end": 1355, "ctxt": 0 }, "value": "a", @@ -3341,7 +3341,7 @@ "type": "Identifier", "span": { "start": 1372, - "end": 1377, + "end": 1373, "ctxt": 0 }, "value": "b", @@ -3423,7 +3423,7 @@ "type": "Identifier", "span": { "start": 1412, - "end": 1430, + "end": 1415, "ctxt": 0 }, "value": "foo", @@ -4817,7 +4817,7 @@ "type": "Identifier", "span": { "start": 1971, - "end": 1988, + "end": 1977, "ctxt": 0 }, "value": "inputs", @@ -4968,7 +4968,7 @@ "type": "Identifier", "span": { "start": 2092, - "end": 2119, + "end": 2095, "ctxt": 0 }, "value": "def", @@ -5694,7 +5694,7 @@ "type": "Identifier", "span": { "start": 2638, - "end": 2692, + "end": 2643, "ctxt": 0 }, "value": "props", @@ -5824,7 +5824,7 @@ "type": "Identifier", "span": { "start": 2678, - "end": 2682, + "end": 2679, "ctxt": 0 }, "value": "t", @@ -5964,7 +5964,7 @@ "type": "Identifier", "span": { "start": 2720, - "end": 2782, + "end": 2725, "ctxt": 0 }, "value": "props", @@ -6025,7 +6025,7 @@ "type": "Identifier", "span": { "start": 2741, - "end": 2749, + "end": 2744, "ctxt": 0 }, "value": "bob", @@ -6122,7 +6122,7 @@ "type": "Identifier", "span": { "start": 2768, - "end": 2772, + "end": 2769, "ctxt": 0 }, "value": "t", @@ -6262,7 +6262,7 @@ "type": "Identifier", "span": { "start": 2810, - "end": 2836, + "end": 2819, "ctxt": 0 }, "value": "generator", @@ -6286,7 +6286,7 @@ "type": "Identifier", "span": { "start": 2822, - "end": 2830, + "end": 2825, "ctxt": 0 }, "value": "bob", @@ -6354,7 +6354,7 @@ "type": "Identifier", "span": { "start": 2838, - "end": 2861, + "end": 2846, "ctxt": 0 }, "value": "receiver", @@ -6378,7 +6378,7 @@ "type": "Identifier", "span": { "start": 2849, - "end": 2853, + "end": 2850, "ctxt": 0 }, "value": "t", @@ -7242,7 +7242,7 @@ "type": "Identifier", "span": { "start": 3161, - "end": 3176, + "end": 3167, "ctxt": 0 }, "value": "params", @@ -7279,7 +7279,7 @@ "type": "Identifier", "span": { "start": 3178, - "end": 3189, + "end": 3181, "ctxt": 0 }, "value": "foo", @@ -7376,7 +7376,7 @@ "type": "Identifier", "span": { "start": 3211, - "end": 3222, + "end": 3215, "ctxt": 0 }, "value": "data", @@ -7471,7 +7471,7 @@ "type": "Identifier", "span": { "start": 3280, - "end": 3318, + "end": 3287, "ctxt": 0 }, "value": "options", @@ -8657,7 +8657,7 @@ "type": "Identifier", "span": { "start": 3842, - "end": 3900, + "end": 3843, "ctxt": 0 }, "value": "_", @@ -8769,7 +8769,7 @@ "type": "Identifier", "span": { "start": 3861, - "end": 3865, + "end": 3862, "ctxt": 0 }, "value": "t", @@ -8903,7 +8903,7 @@ "type": "Identifier", "span": { "start": 3885, - "end": 3889, + "end": 3886, "ctxt": 0 }, "value": "u", @@ -9549,7 +9549,7 @@ "type": "Identifier", "span": { "start": 4066, - "end": 4075, + "end": 4067, "ctxt": 0 }, "value": "x", @@ -9646,7 +9646,7 @@ "type": "Identifier", "span": { "start": 4089, - "end": 4095, + "end": 4092, "ctxt": 0 }, "value": "arg", @@ -9731,7 +9731,7 @@ "type": "Identifier", "span": { "start": 4133, - "end": 4148, + "end": 4138, "ctxt": 0 }, "value": "props", @@ -10082,7 +10082,7 @@ "type": "Identifier", "span": { "start": 4273, - "end": 4362, + "end": 4276, "ctxt": 0 }, "value": "arg", @@ -10180,7 +10180,7 @@ "type": "Identifier", "span": { "start": 4304, - "end": 4316, + "end": 4308, "ctxt": 0 }, "value": "arg1", @@ -10277,7 +10277,7 @@ "type": "Identifier", "span": { "start": 4338, - "end": 4345, + "end": 4342, "ctxt": 0 }, "value": "arg2", @@ -10680,7 +10680,7 @@ "type": "Identifier", "span": { "start": 4511, - "end": 4606, + "end": 4514, "ctxt": 0 }, "value": "arg", @@ -10741,7 +10741,7 @@ "type": "Identifier", "span": { "start": 4524, - "end": 4535, + "end": 4527, "ctxt": 0 }, "value": "arg", @@ -10838,7 +10838,7 @@ "type": "Identifier", "span": { "start": 4556, - "end": 4563, + "end": 4560, "ctxt": 0 }, "value": "arg1", @@ -10935,7 +10935,7 @@ "type": "Identifier", "span": { "start": 4587, - "end": 4594, + "end": 4591, "ctxt": 0 }, "value": "arg2", @@ -11314,7 +11314,7 @@ "type": "Identifier", "span": { "start": 4787, - "end": 4909, + "end": 4790, "ctxt": 0 }, "value": "arg", @@ -11375,7 +11375,7 @@ "type": "Identifier", "span": { "start": 4800, - "end": 4811, + "end": 4803, "ctxt": 0 }, "value": "arg", @@ -11472,7 +11472,7 @@ "type": "Identifier", "span": { "start": 4825, - "end": 4836, + "end": 4828, "ctxt": 0 }, "value": "arg", @@ -11569,7 +11569,7 @@ "type": "Identifier", "span": { "start": 4858, - "end": 4865, + "end": 4862, "ctxt": 0 }, "value": "arg1", @@ -11666,7 +11666,7 @@ "type": "Identifier", "span": { "start": 4889, - "end": 4897, + "end": 4893, "ctxt": 0 }, "value": "arg2", @@ -12187,7 +12187,7 @@ "type": "Identifier", "span": { "start": 5160, - "end": 5239, + "end": 5163, "ctxt": 0 }, "value": "arg", @@ -12248,7 +12248,7 @@ "type": "Identifier", "span": { "start": 5173, - "end": 5185, + "end": 5177, "ctxt": 0 }, "value": "arg1", @@ -12345,7 +12345,7 @@ "type": "Identifier", "span": { "start": 5199, - "end": 5206, + "end": 5203, "ctxt": 0 }, "value": "arg2", @@ -12452,7 +12452,7 @@ "type": "Identifier", "span": { "start": 5221, - "end": 5229, + "end": 5225, "ctxt": 0 }, "value": "arg2", @@ -13085,7 +13085,7 @@ "type": "Identifier", "span": { "start": 5483, - "end": 5607, + "end": 5486, "ctxt": 0 }, "value": "arg", @@ -13146,7 +13146,7 @@ "type": "Identifier", "span": { "start": 5496, - "end": 5508, + "end": 5500, "ctxt": 0 }, "value": "arg1", @@ -13280,7 +13280,7 @@ "type": "Identifier", "span": { "start": 5536, - "end": 5543, + "end": 5540, "ctxt": 0 }, "value": "arg2", @@ -13424,7 +13424,7 @@ "type": "Identifier", "span": { "start": 5577, - "end": 5585, + "end": 5581, "ctxt": 0 }, "value": "arg2", @@ -14058,7 +14058,7 @@ "type": "Identifier", "span": { "start": 5816, - "end": 5964, + "end": 5819, "ctxt": 0 }, "value": "arg", @@ -14119,7 +14119,7 @@ "type": "Identifier", "span": { "start": 5829, - "end": 5841, + "end": 5833, "ctxt": 0 }, "value": "arg1", @@ -14253,7 +14253,7 @@ "type": "Identifier", "span": { "start": 5869, - "end": 5876, + "end": 5873, "ctxt": 0 }, "value": "arg2", @@ -14360,7 +14360,7 @@ "type": "Identifier", "span": { "start": 5893, - "end": 5900, + "end": 5897, "ctxt": 0 }, "value": "arg3", @@ -14504,7 +14504,7 @@ "type": "Identifier", "span": { "start": 5934, - "end": 5942, + "end": 5938, "ctxt": 0 }, "value": "arg4", @@ -15261,7 +15261,7 @@ "type": "Identifier", "span": { "start": 6197, - "end": 6331, + "end": 6201, "ctxt": 0 }, "value": "args", @@ -15433,7 +15433,7 @@ "type": "Identifier", "span": { "start": 6257, - "end": 6268, + "end": 6260, "ctxt": 0 }, "value": "arg", @@ -15545,7 +15545,7 @@ "type": "Identifier", "span": { "start": 6310, - "end": 6316, + "end": 6313, "ctxt": 0 }, "value": "val", diff --git a/crates/swc_ecma_parser/tests/tsc/intrinsicKeyword.json b/crates/swc_ecma_parser/tests/tsc/intrinsicKeyword.json index 59af4f7d4906..3f020bb50d6b 100644 --- a/crates/swc_ecma_parser/tests/tsc/intrinsicKeyword.json +++ b/crates/swc_ecma_parser/tests/tsc/intrinsicKeyword.json @@ -602,7 +602,7 @@ "type": "Identifier", "span": { "start": 340, - "end": 357, + "end": 349, "ctxt": 0 }, "value": "intrinsic", diff --git a/crates/swc_ecma_parser/tests/tsc/intrinsicTypes.json b/crates/swc_ecma_parser/tests/tsc/intrinsicTypes.json index 7ee480f328e6..b116e75156fa 100644 --- a/crates/swc_ecma_parser/tests/tsc/intrinsicTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/intrinsicTypes.json @@ -2284,7 +2284,7 @@ "type": "Identifier", "span": { "start": 1522, - "end": 1531, + "end": 1523, "ctxt": 0 }, "value": "s", @@ -2320,7 +2320,7 @@ "type": "Identifier", "span": { "start": 1533, - "end": 1548, + "end": 1534, "ctxt": 0 }, "value": "x", @@ -2394,7 +2394,7 @@ "type": "Identifier", "span": { "start": 1550, - "end": 1565, + "end": 1551, "ctxt": 0 }, "value": "y", @@ -2813,7 +2813,7 @@ "type": "Identifier", "span": { "start": 1707, - "end": 1722, + "end": 1708, "ctxt": 0 }, "value": "x", @@ -3095,7 +3095,7 @@ "type": "Identifier", "span": { "start": 1799, - "end": 1814, + "end": 1800, "ctxt": 0 }, "value": "x", @@ -3262,7 +3262,7 @@ "type": "Identifier", "span": { "start": 1853, - "end": 1868, + "end": 1854, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/invalidAssignmentsToVoid.json b/crates/swc_ecma_parser/tests/tsc/invalidAssignmentsToVoid.json index 3d1658514edd..467812f9ca89 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidAssignmentsToVoid.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidAssignmentsToVoid.json @@ -725,7 +725,7 @@ "type": "Identifier", "span": { "start": 197, - "end": 201, + "end": 198, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/invalidBooleanAssignments.json b/crates/swc_ecma_parser/tests/tsc/invalidBooleanAssignments.json index 1763599ef220..43673c925ff5 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidBooleanAssignments.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidBooleanAssignments.json @@ -1007,7 +1007,7 @@ "type": "Identifier", "span": { "start": 340, - "end": 344, + "end": 341, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/invalidEnumAssignments.json b/crates/swc_ecma_parser/tests/tsc/invalidEnumAssignments.json index ba3233b78fd0..6bcdb028618d 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidEnumAssignments.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidEnumAssignments.json @@ -510,7 +510,7 @@ "type": "Identifier", "span": { "start": 142, - "end": 146, + "end": 143, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/invalidMultipleVariableDeclarations.json b/crates/swc_ecma_parser/tests/tsc/invalidMultipleVariableDeclarations.json index 150e3fc41615..37dff272bf94 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidMultipleVariableDeclarations.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidMultipleVariableDeclarations.json @@ -630,7 +630,7 @@ "type": "Identifier", "span": { "start": 219, - "end": 228, + "end": 220, "ctxt": 0 }, "value": "x", @@ -850,7 +850,7 @@ "type": "Identifier", "span": { "start": 338, - "end": 347, + "end": 339, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/invalidNumberAssignments.json b/crates/swc_ecma_parser/tests/tsc/invalidNumberAssignments.json index 11c1a19dbd44..b02347ebea45 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidNumberAssignments.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidNumberAssignments.json @@ -914,7 +914,7 @@ "type": "Identifier", "span": { "start": 292, - "end": 296, + "end": 293, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/invalidStringAssignments.json b/crates/swc_ecma_parser/tests/tsc/invalidStringAssignments.json index 7e297a723a89..65aa3d329f82 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidStringAssignments.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidStringAssignments.json @@ -914,7 +914,7 @@ "type": "Identifier", "span": { "start": 293, - "end": 297, + "end": 294, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/invalidUndefinedAssignments.json b/crates/swc_ecma_parser/tests/tsc/invalidUndefinedAssignments.json index 9f696c2d3935..8471bc6cece7 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidUndefinedAssignments.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidUndefinedAssignments.json @@ -719,7 +719,7 @@ "type": "Identifier", "span": { "start": 205, - "end": 209, + "end": 206, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/invalidUndefinedValues.json b/crates/swc_ecma_parser/tests/tsc/invalidUndefinedValues.json index 50bfb817c8a6..d12ccd79dd52 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidUndefinedValues.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidUndefinedValues.json @@ -892,7 +892,7 @@ "type": "Identifier", "span": { "start": 248, - "end": 252, + "end": 249, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/invalidVoidAssignments.json b/crates/swc_ecma_parser/tests/tsc/invalidVoidAssignments.json index 2b89aa7b58dc..db42705bc436 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidVoidAssignments.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidVoidAssignments.json @@ -921,7 +921,7 @@ "type": "Identifier", "span": { "start": 296, - "end": 300, + "end": 297, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/invalidVoidValues.json b/crates/swc_ecma_parser/tests/tsc/invalidVoidValues.json index c4f199dc47ea..7c9c03b31a3f 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidVoidValues.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidVoidValues.json @@ -856,7 +856,7 @@ "type": "Identifier", "span": { "start": 227, - "end": 231, + "end": 228, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/isomorphicMappedTypeInference.json b/crates/swc_ecma_parser/tests/tsc/isomorphicMappedTypeInference.json index 00f62b896b16..a37dfbd561b9 100644 --- a/crates/swc_ecma_parser/tests/tsc/isomorphicMappedTypeInference.json +++ b/crates/swc_ecma_parser/tests/tsc/isomorphicMappedTypeInference.json @@ -333,7 +333,7 @@ "type": "Identifier", "span": { "start": 179, - "end": 183, + "end": 180, "ctxt": 0 }, "value": "x", @@ -542,7 +542,7 @@ "type": "Identifier", "span": { "start": 241, - "end": 250, + "end": 242, "ctxt": 0 }, "value": "x", @@ -746,7 +746,7 @@ "type": "Identifier", "span": { "start": 299, - "end": 305, + "end": 302, "ctxt": 0 }, "value": "obj", @@ -1202,7 +1202,7 @@ "type": "Identifier", "span": { "start": 480, - "end": 496, + "end": 483, "ctxt": 0 }, "value": "obj", @@ -1638,7 +1638,7 @@ "type": "Identifier", "span": { "start": 644, - "end": 660, + "end": 647, "ctxt": 0 }, "value": "obj", @@ -1712,7 +1712,7 @@ "type": "Identifier", "span": { "start": 662, - "end": 671, + "end": 668, "ctxt": 0 }, "value": "values", @@ -3341,7 +3341,7 @@ "type": "Identifier", "span": { "start": 1395, - "end": 1415, + "end": 1398, "ctxt": 0 }, "value": "obj", @@ -3556,7 +3556,7 @@ "type": "Identifier", "span": { "start": 1450, - "end": 1459, + "end": 1451, "ctxt": 0 }, "value": "s", @@ -4004,7 +4004,7 @@ "type": "Identifier", "span": { "start": 1661, - "end": 1684, + "end": 1664, "ctxt": 0 }, "value": "obj", @@ -4193,7 +4193,7 @@ "type": "Identifier", "span": { "start": 1719, - "end": 1728, + "end": 1720, "ctxt": 0 }, "value": "s", @@ -4649,7 +4649,7 @@ "type": "Identifier", "span": { "start": 1937, - "end": 1967, + "end": 1940, "ctxt": 0 }, "value": "obj", @@ -4869,7 +4869,7 @@ "type": "Identifier", "span": { "start": 1999, - "end": 2037, + "end": 2002, "ctxt": 0 }, "value": "obj", @@ -5089,7 +5089,7 @@ "type": "Identifier", "span": { "start": 2080, - "end": 2119, + "end": 2083, "ctxt": 0 }, "value": "obj", @@ -5421,7 +5421,7 @@ "type": "Identifier", "span": { "start": 2195, - "end": 2203, + "end": 2198, "ctxt": 0 }, "value": "foo", @@ -6113,7 +6113,7 @@ "type": "Identifier", "span": { "start": 2797, - "end": 2809, + "end": 2800, "ctxt": 0 }, "value": "obj", @@ -7186,7 +7186,7 @@ "type": "Identifier", "span": { "start": 3454, - "end": 3469, + "end": 3457, "ctxt": 0 }, "value": "obj", @@ -7414,7 +7414,7 @@ "type": "Identifier", "span": { "start": 3518, - "end": 3533, + "end": 3521, "ctxt": 0 }, "value": "obj", @@ -7642,7 +7642,7 @@ "type": "Identifier", "span": { "start": 3582, - "end": 3607, + "end": 3585, "ctxt": 0 }, "value": "obj", @@ -7898,7 +7898,7 @@ "type": "Identifier", "span": { "start": 3669, - "end": 3684, + "end": 3672, "ctxt": 0 }, "value": "obj", @@ -8167,7 +8167,7 @@ "type": "Identifier", "span": { "start": 3746, - "end": 3765, + "end": 3749, "ctxt": 0 }, "value": "obj", @@ -9120,7 +9120,7 @@ "type": "Identifier", "span": { "start": 4066, - "end": 4072, + "end": 4069, "ctxt": 0 }, "value": "obj", @@ -9166,7 +9166,7 @@ "type": "Identifier", "span": { "start": 4074, - "end": 4083, + "end": 4078, "ctxt": 0 }, "value": "list", diff --git a/crates/swc_ecma_parser/tests/tsc/iterableContextualTyping1.json b/crates/swc_ecma_parser/tests/tsc/iterableContextualTyping1.json index cfeac5c731dc..b6164a7e2687 100644 --- a/crates/swc_ecma_parser/tests/tsc/iterableContextualTyping1.json +++ b/crates/swc_ecma_parser/tests/tsc/iterableContextualTyping1.json @@ -76,7 +76,7 @@ "type": "Identifier", "span": { "start": 36, - "end": 45, + "end": 37, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall.json b/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall.json index 45bdbaa78e52..be6f13038959 100644 --- a/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall.json +++ b/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 29, - "end": 38, + "end": 30, "ctxt": 0 }, "value": "s", diff --git a/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall10.json b/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall10.json index 8b35fbdc9dc2..f7f14ea4f1ea 100644 --- a/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall10.json +++ b/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall10.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 32, - "end": 38, + "end": 33, "ctxt": 0 }, "value": "s", diff --git a/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall2.json b/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall2.json index f1d7a5391ce8..278a6ab99e87 100644 --- a/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall2.json +++ b/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall2.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 29, - "end": 40, + "end": 30, "ctxt": 0 }, "value": "s", diff --git a/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall4.json b/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall4.json index fb555bcd6c09..36595acbb333 100644 --- a/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall4.json +++ b/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall4.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 29, - "end": 39, + "end": 31, "ctxt": 0 }, "value": "s1", diff --git a/crates/swc_ecma_parser/tests/tsc/jsDeclarationsClassImplementsGenericsSerialization.json b/crates/swc_ecma_parser/tests/tsc/jsDeclarationsClassImplementsGenericsSerialization.json index e815f168a22b..77cffea206bb 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsDeclarationsClassImplementsGenericsSerialization.json +++ b/crates/swc_ecma_parser/tests/tsc/jsDeclarationsClassImplementsGenericsSerialization.json @@ -98,7 +98,7 @@ "type": "Identifier", "span": { "start": 161, - "end": 169, + "end": 166, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/jsDeclarationsInterfaces.json b/crates/swc_ecma_parser/tests/tsc/jsDeclarationsInterfaces.json index 12c01e194161..edad45ebb946 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsDeclarationsInterfaces.json +++ b/crates/swc_ecma_parser/tests/tsc/jsDeclarationsInterfaces.json @@ -515,7 +515,7 @@ "type": "Identifier", "span": { "start": 513, - "end": 517, + "end": 514, "ctxt": 0 }, "value": "x", @@ -590,7 +590,7 @@ "type": "Identifier", "span": { "start": 531, - "end": 535, + "end": 532, "ctxt": 0 }, "value": "x", @@ -753,7 +753,7 @@ "type": "Identifier", "span": { "start": 575, - "end": 579, + "end": 576, "ctxt": 0 }, "value": "x", @@ -828,7 +828,7 @@ "type": "Identifier", "span": { "start": 597, - "end": 601, + "end": 598, "ctxt": 0 }, "value": "x", @@ -1057,7 +1057,7 @@ "type": "Identifier", "span": { "start": 660, - "end": 668, + "end": 661, "ctxt": 0 }, "value": "a", @@ -1225,7 +1225,7 @@ "type": "Identifier", "span": { "start": 694, - "end": 704, + "end": 695, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/jsdocImportType.json b/crates/swc_ecma_parser/tests/tsc/jsdocImportType.json index dec6119169ec..d6cf4c145428 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsdocImportType.json +++ b/crates/swc_ecma_parser/tests/tsc/jsdocImportType.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 104, - "end": 116, + "end": 108, "ctxt": 0 }, "value": "name", diff --git a/crates/swc_ecma_parser/tests/tsc/jsdocImportType2.json b/crates/swc_ecma_parser/tests/tsc/jsdocImportType2.json index 8862604a059c..6b610dfdb765 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsdocImportType2.json +++ b/crates/swc_ecma_parser/tests/tsc/jsdocImportType2.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 104, - "end": 116, + "end": 108, "ctxt": 0 }, "value": "name", diff --git a/crates/swc_ecma_parser/tests/tsc/jsdocLinkTag3.json b/crates/swc_ecma_parser/tests/tsc/jsdocLinkTag3.json index ad84bc3b4cd4..cf377b806430 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsdocLinkTag3.json +++ b/crates/swc_ecma_parser/tests/tsc/jsdocLinkTag3.json @@ -120,7 +120,7 @@ "type": "Identifier", "span": { "start": 185, - "end": 194, + "end": 186, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/jsdocLinkTag4.json b/crates/swc_ecma_parser/tests/tsc/jsdocLinkTag4.json index 1a52f434859d..9545ab4f4a92 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsdocLinkTag4.json +++ b/crates/swc_ecma_parser/tests/tsc/jsdocLinkTag4.json @@ -118,7 +118,7 @@ "type": "Identifier", "span": { "start": 183, - "end": 192, + "end": 184, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/jsdocParseBackquotedParamName.json b/crates/swc_ecma_parser/tests/tsc/jsdocParseBackquotedParamName.json index 39a651d93206..de23a92a2ff1 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsdocParseBackquotedParamName.json +++ b/crates/swc_ecma_parser/tests/tsc/jsdocParseBackquotedParamName.json @@ -107,7 +107,7 @@ "type": "Identifier", "span": { "start": 255, - "end": 266, + "end": 258, "ctxt": 0 }, "value": "arg", diff --git a/crates/swc_ecma_parser/tests/tsc/jsdocThisType.json b/crates/swc_ecma_parser/tests/tsc/jsdocThisType.json index fdf4d14f0a79..016d0691d386 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsdocThisType.json +++ b/crates/swc_ecma_parser/tests/tsc/jsdocThisType.json @@ -142,7 +142,7 @@ "type": "Identifier", "span": { "start": 145, - "end": 154, + "end": 149, "ctxt": 0 }, "value": "this", diff --git a/crates/swc_ecma_parser/tests/tsc/jsdocTypeTag.json b/crates/swc_ecma_parser/tests/tsc/jsdocTypeTag.json index 76f0779e5287..15404b2baf82 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsdocTypeTag.json +++ b/crates/swc_ecma_parser/tests/tsc/jsdocTypeTag.json @@ -1858,7 +1858,7 @@ "type": "Identifier", "span": { "start": 1178, - "end": 1187, + "end": 1179, "ctxt": 0 }, "value": "s", @@ -1953,7 +1953,7 @@ "type": "Identifier", "span": { "start": 1215, - "end": 1224, + "end": 1216, "ctxt": 0 }, "value": "s", diff --git a/crates/swc_ecma_parser/tests/tsc/keyofAndForIn.json b/crates/swc_ecma_parser/tests/tsc/keyofAndForIn.json index ee1d9a710d0c..46147f452307 100644 --- a/crates/swc_ecma_parser/tests/tsc/keyofAndForIn.json +++ b/crates/swc_ecma_parser/tests/tsc/keyofAndForIn.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 79, - "end": 99, + "end": 82, "ctxt": 0 }, "value": "obj", @@ -130,7 +130,7 @@ "type": "Identifier", "span": { "start": 101, - "end": 105, + "end": 102, "ctxt": 0 }, "value": "k", @@ -631,7 +631,7 @@ "type": "Identifier", "span": { "start": 278, - "end": 307, + "end": 281, "ctxt": 0 }, "value": "obj", @@ -766,7 +766,7 @@ "type": "Identifier", "span": { "start": 309, - "end": 319, + "end": 310, "ctxt": 0 }, "value": "k", @@ -1254,7 +1254,7 @@ "type": "Identifier", "span": { "start": 517, - "end": 540, + "end": 520, "ctxt": 0 }, "value": "obj", @@ -1380,7 +1380,7 @@ "type": "Identifier", "span": { "start": 542, - "end": 546, + "end": 543, "ctxt": 0 }, "value": "k", diff --git a/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccess.json b/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccess.json index d4759ca65073..b4b05a5719da 100644 --- a/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccess.json +++ b/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccess.json @@ -3813,7 +3813,7 @@ "type": "Identifier", "span": { "start": 2559, - "end": 2565, + "end": 2562, "ctxt": 0 }, "value": "obj", @@ -3859,7 +3859,7 @@ "type": "Identifier", "span": { "start": 2567, - "end": 2573, + "end": 2570, "ctxt": 0 }, "value": "key", @@ -4067,7 +4067,7 @@ "type": "Identifier", "span": { "start": 2644, - "end": 2650, + "end": 2647, "ctxt": 0 }, "value": "obj", @@ -4113,7 +4113,7 @@ "type": "Identifier", "span": { "start": 2652, - "end": 2658, + "end": 2655, "ctxt": 0 }, "value": "key", @@ -4159,7 +4159,7 @@ "type": "Identifier", "span": { "start": 2660, - "end": 2671, + "end": 2665, "ctxt": 0 }, "value": "value", @@ -4414,7 +4414,7 @@ "type": "Identifier", "span": { "start": 2713, - "end": 2725, + "end": 2718, "ctxt": 0 }, "value": "shape", @@ -5048,7 +5048,7 @@ "type": "Identifier", "span": { "start": 3155, - "end": 3165, + "end": 3156, "ctxt": 0 }, "value": "a", @@ -5285,7 +5285,7 @@ "type": "Identifier", "span": { "start": 3271, - "end": 3290, + "end": 3272, "ctxt": 0 }, "value": "t", @@ -5641,7 +5641,7 @@ "type": "Identifier", "span": { "start": 3440, - "end": 3448, + "end": 3443, "ctxt": 0 }, "value": "foo", @@ -5677,7 +5677,7 @@ "type": "Identifier", "span": { "start": 3450, - "end": 3458, + "end": 3453, "ctxt": 0 }, "value": "bar", @@ -6066,7 +6066,7 @@ "type": "Identifier", "span": { "start": 3687, - "end": 3693, + "end": 3690, "ctxt": 0 }, "value": "key", @@ -6279,7 +6279,7 @@ "type": "Identifier", "span": { "start": 3777, - "end": 3783, + "end": 3780, "ctxt": 0 }, "value": "key", @@ -6325,7 +6325,7 @@ "type": "Identifier", "span": { "start": 3785, - "end": 3803, + "end": 3790, "ctxt": 0 }, "value": "value", @@ -6619,7 +6619,7 @@ "type": "Identifier", "span": { "start": 3862, - "end": 3889, + "end": 3871, "ctxt": 0 }, "value": "component", @@ -7311,7 +7311,7 @@ "type": "Identifier", "span": { "start": 4360, - "end": 4370, + "end": 4365, "ctxt": 0 }, "value": "array", @@ -7365,7 +7365,7 @@ "type": "Identifier", "span": { "start": 4372, - "end": 4378, + "end": 4375, "ctxt": 0 }, "value": "key", @@ -7640,7 +7640,7 @@ "type": "Identifier", "span": { "start": 4433, - "end": 4448, + "end": 4439, "ctxt": 0 }, "value": "shapes", @@ -7995,7 +7995,7 @@ "type": "Identifier", "span": { "start": 4691, - "end": 4697, + "end": 4694, "ctxt": 0 }, "value": "key", @@ -8339,7 +8339,7 @@ "type": "Identifier", "span": { "start": 4862, - "end": 4868, + "end": 4865, "ctxt": 0 }, "value": "key", @@ -8701,7 +8701,7 @@ "type": "Identifier", "span": { "start": 5039, - "end": 5047, + "end": 5044, "ctxt": 0 }, "value": "shape", @@ -8747,7 +8747,7 @@ "type": "Identifier", "span": { "start": 5049, - "end": 5055, + "end": 5052, "ctxt": 0 }, "value": "key", @@ -9105,7 +9105,7 @@ "type": "Identifier", "span": { "start": 5175, - "end": 5190, + "end": 5177, "ctxt": 0 }, "value": "ts", @@ -9507,7 +9507,7 @@ "type": "Identifier", "span": { "start": 5527, - "end": 5531, + "end": 5528, "ctxt": 0 }, "value": "c", @@ -10069,7 +10069,7 @@ "type": "Identifier", "span": { "start": 5686, - "end": 5696, + "end": 5687, "ctxt": 0 }, "value": "k", @@ -10124,7 +10124,7 @@ "type": "Identifier", "span": { "start": 5698, - "end": 5707, + "end": 5699, "ctxt": 0 }, "value": "s", @@ -10365,7 +10365,7 @@ "type": "Identifier", "span": { "start": 5806, - "end": 5810, + "end": 5807, "ctxt": 0 }, "value": "k", @@ -10411,7 +10411,7 @@ "type": "Identifier", "span": { "start": 5812, - "end": 5821, + "end": 5813, "ctxt": 0 }, "value": "s", @@ -10702,7 +10702,7 @@ "type": "Identifier", "span": { "start": 5901, - "end": 5930, + "end": 5904, "ctxt": 0 }, "value": "obj", @@ -10795,7 +10795,7 @@ "type": "Identifier", "span": { "start": 5932, - "end": 5959, + "end": 5933, "ctxt": 0 }, "value": "k", @@ -10887,7 +10887,7 @@ "type": "Identifier", "span": { "start": 5961, - "end": 5970, + "end": 5962, "ctxt": 0 }, "value": "s", @@ -10923,7 +10923,7 @@ "type": "Identifier", "span": { "start": 5972, - "end": 5981, + "end": 5973, "ctxt": 0 }, "value": "n", @@ -11231,7 +11231,7 @@ "type": "Identifier", "span": { "start": 6109, - "end": 6138, + "end": 6112, "ctxt": 0 }, "value": "obj", @@ -11324,7 +11324,7 @@ "type": "Identifier", "span": { "start": 6140, - "end": 6144, + "end": 6141, "ctxt": 0 }, "value": "k", @@ -11370,7 +11370,7 @@ "type": "Identifier", "span": { "start": 6146, - "end": 6155, + "end": 6147, "ctxt": 0 }, "value": "s", @@ -11406,7 +11406,7 @@ "type": "Identifier", "span": { "start": 6157, - "end": 6166, + "end": 6158, "ctxt": 0 }, "value": "n", @@ -11801,7 +11801,7 @@ "type": "Identifier", "span": { "start": 6258, - "end": 6264, + "end": 6261, "ctxt": 0 }, "value": "obj", @@ -11847,7 +11847,7 @@ "type": "Identifier", "span": { "start": 6266, - "end": 6278, + "end": 6269, "ctxt": 0 }, "value": "key", @@ -12143,7 +12143,7 @@ "type": "Identifier", "span": { "start": 6389, - "end": 6395, + "end": 6392, "ctxt": 0 }, "value": "obj", @@ -12189,7 +12189,7 @@ "type": "Identifier", "span": { "start": 6397, - "end": 6403, + "end": 6400, "ctxt": 0 }, "value": "key", @@ -12526,7 +12526,7 @@ "type": "Identifier", "span": { "start": 6495, - "end": 6504, + "end": 6501, "ctxt": 0 }, "value": "source", @@ -12572,7 +12572,7 @@ "type": "Identifier", "span": { "start": 6506, - "end": 6515, + "end": 6512, "ctxt": 0 }, "value": "target", @@ -12836,7 +12836,7 @@ "type": "Identifier", "span": { "start": 6600, - "end": 6658, + "end": 6604, "ctxt": 0 }, "value": "func", @@ -12860,7 +12860,7 @@ "type": "Identifier", "span": { "start": 6613, - "end": 6630, + "end": 6615, "ctxt": 0 }, "value": "k1", @@ -12943,7 +12943,7 @@ "type": "Identifier", "span": { "start": 6632, - "end": 6649, + "end": 6634, "ctxt": 0 }, "value": "k2", @@ -13892,7 +13892,7 @@ "type": "Identifier", "span": { "start": 6858, - "end": 6900, + "end": 6862, "ctxt": 0 }, "value": "func", @@ -13916,7 +13916,7 @@ "type": "Identifier", "span": { "start": 6871, - "end": 6875, + "end": 6872, "ctxt": 0 }, "value": "x", @@ -13953,7 +13953,7 @@ "type": "Identifier", "span": { "start": 6877, - "end": 6881, + "end": 6878, "ctxt": 0 }, "value": "y", @@ -14434,7 +14434,7 @@ "type": "Identifier", "span": { "start": 7070, - "end": 7143, + "end": 7074, "ctxt": 0 }, "value": "func", @@ -14458,7 +14458,7 @@ "type": "Identifier", "span": { "start": 7112, - "end": 7116, + "end": 7113, "ctxt": 0 }, "value": "x", @@ -14495,7 +14495,7 @@ "type": "Identifier", "span": { "start": 7118, - "end": 7122, + "end": 7119, "ctxt": 0 }, "value": "y", @@ -14532,7 +14532,7 @@ "type": "Identifier", "span": { "start": 7124, - "end": 7128, + "end": 7125, "ctxt": 0 }, "value": "k", @@ -15334,7 +15334,7 @@ "type": "Identifier", "span": { "start": 7371, - "end": 7440, + "end": 7375, "ctxt": 0 }, "value": "func", @@ -15358,7 +15358,7 @@ "type": "Identifier", "span": { "start": 7409, - "end": 7413, + "end": 7410, "ctxt": 0 }, "value": "x", @@ -15395,7 +15395,7 @@ "type": "Identifier", "span": { "start": 7415, - "end": 7419, + "end": 7416, "ctxt": 0 }, "value": "y", @@ -15432,7 +15432,7 @@ "type": "Identifier", "span": { "start": 7421, - "end": 7425, + "end": 7422, "ctxt": 0 }, "value": "k", @@ -16233,7 +16233,7 @@ "type": "Identifier", "span": { "start": 7668, - "end": 7737, + "end": 7672, "ctxt": 0 }, "value": "func", @@ -16257,7 +16257,7 @@ "type": "Identifier", "span": { "start": 7706, - "end": 7710, + "end": 7707, "ctxt": 0 }, "value": "x", @@ -16294,7 +16294,7 @@ "type": "Identifier", "span": { "start": 7712, - "end": 7716, + "end": 7713, "ctxt": 0 }, "value": "y", @@ -16331,7 +16331,7 @@ "type": "Identifier", "span": { "start": 7718, - "end": 7722, + "end": 7719, "ctxt": 0 }, "value": "k", @@ -17018,7 +17018,7 @@ "type": "Identifier", "span": { "start": 7946, - "end": 7952, + "end": 7949, "ctxt": 0 }, "value": "obj", @@ -17821,7 +17821,7 @@ "type": "Identifier", "span": { "start": 8243, - "end": 8249, + "end": 8246, "ctxt": 0 }, "value": "obj", @@ -18437,7 +18437,7 @@ "type": "Identifier", "span": { "start": 8487, - "end": 8493, + "end": 8490, "ctxt": 0 }, "value": "obj", @@ -18483,7 +18483,7 @@ "type": "Identifier", "span": { "start": 8495, - "end": 8501, + "end": 8498, "ctxt": 0 }, "value": "key", @@ -19261,7 +19261,7 @@ "type": "Identifier", "span": { "start": 8740, - "end": 8746, + "end": 8743, "ctxt": 0 }, "value": "key", @@ -19445,7 +19445,7 @@ "type": "Identifier", "span": { "start": 8812, - "end": 8818, + "end": 8815, "ctxt": 0 }, "value": "key", @@ -19491,7 +19491,7 @@ "type": "Identifier", "span": { "start": 8820, - "end": 8834, + "end": 8825, "ctxt": 0 }, "value": "value", @@ -20406,7 +20406,7 @@ "type": "Identifier", "span": { "start": 9268, - "end": 9284, + "end": 9270, "ctxt": 0 }, "value": "x1", @@ -20489,7 +20489,7 @@ "type": "Identifier", "span": { "start": 9286, - "end": 9301, + "end": 9288, "ctxt": 0 }, "value": "x2", @@ -20572,7 +20572,7 @@ "type": "Identifier", "span": { "start": 9303, - "end": 9312, + "end": 9305, "ctxt": 0 }, "value": "x3", @@ -21118,7 +21118,7 @@ "type": "Identifier", "span": { "start": 9477, - "end": 9481, + "end": 9478, "ctxt": 0 }, "value": "x", @@ -21164,7 +21164,7 @@ "type": "Identifier", "span": { "start": 9483, - "end": 9496, + "end": 9484, "ctxt": 0 }, "value": "y", @@ -21247,7 +21247,7 @@ "type": "Identifier", "span": { "start": 9498, - "end": 9505, + "end": 9499, "ctxt": 0 }, "value": "z", @@ -21602,7 +21602,7 @@ "type": "Identifier", "span": { "start": 9595, - "end": 9599, + "end": 9596, "ctxt": 0 }, "value": "x", @@ -21648,7 +21648,7 @@ "type": "Identifier", "span": { "start": 9601, - "end": 9614, + "end": 9602, "ctxt": 0 }, "value": "y", @@ -21731,7 +21731,7 @@ "type": "Identifier", "span": { "start": 9616, - "end": 9623, + "end": 9617, "ctxt": 0 }, "value": "z", @@ -22139,7 +22139,7 @@ "type": "Identifier", "span": { "start": 9763, - "end": 9770, + "end": 9767, "ctxt": 0 }, "value": "prop", @@ -22323,7 +22323,7 @@ "type": "Identifier", "span": { "start": 9837, - "end": 9844, + "end": 9841, "ctxt": 0 }, "value": "prop", @@ -22369,7 +22369,7 @@ "type": "Identifier", "span": { "start": 9846, - "end": 9860, + "end": 9851, "ctxt": 0 }, "value": "value", @@ -22660,7 +22660,7 @@ "type": "Identifier", "span": { "start": 9964, - "end": 9977, + "end": 9969, "ctxt": 0 }, "value": "parts", @@ -23011,7 +23011,7 @@ "type": "Identifier", "span": { "start": 10152, - "end": 10165, + "end": 10157, "ctxt": 0 }, "value": "parts", @@ -23248,7 +23248,7 @@ "type": "Identifier", "span": { "start": 10354, - "end": 10360, + "end": 10357, "ctxt": 0 }, "value": "obj", @@ -23294,7 +23294,7 @@ "type": "Identifier", "span": { "start": 10362, - "end": 10370, + "end": 10366, "ctxt": 0 }, "value": "key1", @@ -23503,7 +23503,7 @@ "type": "Identifier", "span": { "start": 10441, - "end": 10447, + "end": 10444, "ctxt": 0 }, "value": "obj", @@ -23549,7 +23549,7 @@ "type": "Identifier", "span": { "start": 10449, - "end": 10457, + "end": 10453, "ctxt": 0 }, "value": "key1", @@ -23595,7 +23595,7 @@ "type": "Identifier", "span": { "start": 10459, - "end": 10467, + "end": 10463, "ctxt": 0 }, "value": "key2", @@ -23910,7 +23910,7 @@ "type": "Identifier", "span": { "start": 10570, - "end": 10576, + "end": 10573, "ctxt": 0 }, "value": "obj", @@ -23956,7 +23956,7 @@ "type": "Identifier", "span": { "start": 10578, - "end": 10586, + "end": 10582, "ctxt": 0 }, "value": "key1", @@ -24002,7 +24002,7 @@ "type": "Identifier", "span": { "start": 10588, - "end": 10596, + "end": 10592, "ctxt": 0 }, "value": "key2", @@ -24048,7 +24048,7 @@ "type": "Identifier", "span": { "start": 10598, - "end": 10606, + "end": 10602, "ctxt": 0 }, "value": "key3", @@ -24497,7 +24497,7 @@ "type": "Identifier", "span": { "start": 10638, - "end": 10646, + "end": 10641, "ctxt": 0 }, "value": "obj", @@ -24661,7 +24661,7 @@ "type": "Identifier", "span": { "start": 10698, - "end": 10706, + "end": 10701, "ctxt": 0 }, "value": "obj", @@ -25215,7 +25215,7 @@ "type": "Identifier", "span": { "start": 10929, - "end": 10941, + "end": 10934, "ctxt": 0 }, "value": "thing", @@ -26161,7 +26161,7 @@ "type": "Identifier", "span": { "start": 11390, - "end": 11413, + "end": 11397, "ctxt": 0 }, "value": "handler", @@ -26185,7 +26185,7 @@ "type": "Identifier", "span": { "start": 11400, - "end": 11404, + "end": 11401, "ctxt": 0 }, "value": "t", @@ -26513,7 +26513,7 @@ "type": "Identifier", "span": { "start": 11511, - "end": 11518, + "end": 11512, "ctxt": 0 }, "value": "t", @@ -26622,7 +26622,7 @@ "type": "Identifier", "span": { "start": 11553, - "end": 11577, + "end": 11564, "ctxt": 0 }, "value": "handlerHash", @@ -27223,7 +27223,7 @@ "type": "Identifier", "span": { "start": 11870, - "end": 11903, + "end": 11877, "ctxt": 0 }, "value": "options", @@ -27340,7 +27340,7 @@ "type": "Identifier", "span": { "start": 11949, - "end": 11955, + "end": 11952, "ctxt": 0 }, "value": "key", @@ -28053,7 +28053,7 @@ "type": "Identifier", "span": { "start": 12230, - "end": 12263, + "end": 12237, "ctxt": 0 }, "value": "options", @@ -28170,7 +28170,7 @@ "type": "Identifier", "span": { "start": 12313, - "end": 12319, + "end": 12316, "ctxt": 0 }, "value": "key", @@ -28572,7 +28572,7 @@ "type": "Identifier", "span": { "start": 12431, - "end": 12435, + "end": 12432, "ctxt": 0 }, "value": "p", @@ -28985,7 +28985,7 @@ "type": "Identifier", "span": { "start": 12639, - "end": 12654, + "end": 12643, "ctxt": 0 }, "value": "name", @@ -29058,7 +29058,7 @@ "type": "Identifier", "span": { "start": 12656, - "end": 12671, + "end": 12660, "ctxt": 0 }, "value": "args", @@ -29776,7 +29776,7 @@ "type": "Identifier", "span": { "start": 13016, - "end": 13022, + "end": 13019, "ctxt": 0 }, "value": "key", @@ -30068,7 +30068,7 @@ "type": "Identifier", "span": { "start": 13115, - "end": 13128, + "end": 13119, "ctxt": 0 }, "value": "name", @@ -30162,7 +30162,7 @@ "type": "Identifier", "span": { "start": 13179, - "end": 13217, + "end": 13186, "ctxt": 0 }, "value": "handler", @@ -30425,7 +30425,7 @@ "type": "Identifier", "span": { "start": 13348, - "end": 13354, + "end": 13351, "ctxt": 0 }, "value": "obj", @@ -30471,7 +30471,7 @@ "type": "Identifier", "span": { "start": 13360, - "end": 13373, + "end": 13368, "ctxt": 0 }, "value": "idFields", @@ -30525,7 +30525,7 @@ "type": "Identifier", "span": { "start": 13379, - "end": 13417, + "end": 13388, "ctxt": 0 }, "value": "idMapping", @@ -31258,7 +31258,7 @@ "type": "Identifier", "span": { "start": 13735, - "end": 13741, + "end": 13738, "ctxt": 0 }, "value": "obj", @@ -31304,7 +31304,7 @@ "type": "Identifier", "span": { "start": 13747, - "end": 13753, + "end": 13750, "ctxt": 0 }, "value": "key", @@ -31350,7 +31350,7 @@ "type": "Identifier", "span": { "start": 13759, - "end": 13797, + "end": 13768, "ctxt": 0 }, "value": "stringMap", @@ -31738,7 +31738,7 @@ "type": "Identifier", "span": { "start": 13928, - "end": 13935, + "end": 13932, "ctxt": 0 }, "value": "list", @@ -32132,7 +32132,7 @@ "type": "Identifier", "span": { "start": 14049, - "end": 14065, + "end": 14050, "ctxt": 0 }, "value": "p", @@ -32440,7 +32440,7 @@ "type": "Identifier", "span": { "start": 14170, - "end": 14177, + "end": 14171, "ctxt": 0 }, "value": "v", @@ -32630,7 +32630,7 @@ "type": "Identifier", "span": { "start": 14229, - "end": 14236, + "end": 14233, "ctxt": 0 }, "value": "prop", @@ -32676,7 +32676,7 @@ "type": "Identifier", "span": { "start": 14238, - "end": 14249, + "end": 14243, "ctxt": 0 }, "value": "value", @@ -33082,7 +33082,7 @@ "type": "Identifier", "span": { "start": 14399, - "end": 14407, + "end": 14404, "ctxt": 0 }, "value": "props", @@ -33362,7 +33362,7 @@ "type": "Identifier", "span": { "start": 14528, - "end": 14535, + "end": 14532, "ctxt": 0 }, "value": "obj1", @@ -33408,7 +33408,7 @@ "type": "Identifier", "span": { "start": 14537, - "end": 14544, + "end": 14541, "ctxt": 0 }, "value": "obj2", @@ -33615,7 +33615,7 @@ "type": "Identifier", "span": { "start": 14630, - "end": 14638, + "end": 14635, "ctxt": 0 }, "value": "props", @@ -34120,7 +34120,7 @@ "type": "Identifier", "span": { "start": 14901, - "end": 14905, + "end": 14902, "ctxt": 0 }, "value": "t", @@ -34166,7 +34166,7 @@ "type": "Identifier", "span": { "start": 14907, - "end": 14911, + "end": 14908, "ctxt": 0 }, "value": "k", @@ -34212,7 +34212,7 @@ "type": "Identifier", "span": { "start": 14913, - "end": 14921, + "end": 14915, "ctxt": 0 }, "value": "tk", @@ -34716,7 +34716,7 @@ "type": "Identifier", "span": { "start": 15125, - "end": 15166, + "end": 15132, "ctxt": 0 }, "value": "variant", @@ -36531,7 +36531,7 @@ "type": "Identifier", "span": { "start": 15881, - "end": 15909, + "end": 15887, "ctxt": 0 }, "value": "record", @@ -36605,7 +36605,7 @@ "type": "Identifier", "span": { "start": 15911, - "end": 15924, + "end": 15916, "ctxt": 0 }, "value": "flags", @@ -37042,7 +37042,7 @@ "type": "Identifier", "span": { "start": 16134, - "end": 16163, + "end": 16140, "ctxt": 0 }, "value": "record", @@ -37116,7 +37116,7 @@ "type": "Identifier", "span": { "start": 16165, - "end": 16178, + "end": 16170, "ctxt": 0 }, "value": "flags", @@ -37388,7 +37388,7 @@ "type": "Identifier", "span": { "start": 16295, - "end": 16299, + "end": 16296, "ctxt": 0 }, "value": "p", @@ -37509,7 +37509,7 @@ "type": "Identifier", "span": { "start": 16353, - "end": 16357, + "end": 16354, "ctxt": 0 }, "value": "o", @@ -37555,7 +37555,7 @@ "type": "Identifier", "span": { "start": 16359, - "end": 16363, + "end": 16360, "ctxt": 0 }, "value": "k", @@ -37962,7 +37962,7 @@ "type": "Identifier", "span": { "start": 16481, - "end": 16494, + "end": 16482, "ctxt": 0 }, "value": "x", @@ -38364,7 +38364,7 @@ "type": "Identifier", "span": { "start": 16673, - "end": 16680, + "end": 16677, "ctxt": 0 }, "value": "type", @@ -38889,7 +38889,7 @@ "type": "Identifier", "span": { "start": 16900, - "end": 16918, + "end": 16902, "ctxt": 0 }, "value": "dd", @@ -38982,7 +38982,7 @@ "type": "Identifier", "span": { "start": 16920, - "end": 16925, + "end": 16922, "ctxt": 0 }, "value": "k1", @@ -39028,7 +39028,7 @@ "type": "Identifier", "span": { "start": 16927, - "end": 16932, + "end": 16929, "ctxt": 0 }, "value": "k2", @@ -39267,7 +39267,7 @@ "type": "Identifier", "span": { "start": 17019, - "end": 17037, + "end": 17021, "ctxt": 0 }, "value": "dd", @@ -39360,7 +39360,7 @@ "type": "Identifier", "span": { "start": 17039, - "end": 17044, + "end": 17041, "ctxt": 0 }, "value": "k1", @@ -39406,7 +39406,7 @@ "type": "Identifier", "span": { "start": 17046, - "end": 17051, + "end": 17048, "ctxt": 0 }, "value": "k2", diff --git a/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccess2.json b/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccess2.json index a0d95cb74778..c0134f55c454 100644 --- a/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccess2.json +++ b/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccess2.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 50, - "end": 89, + "end": 53, "ctxt": 0 }, "value": "obj", @@ -229,7 +229,7 @@ "type": "Identifier", "span": { "start": 91, - "end": 98, + "end": 93, "ctxt": 0 }, "value": "k0", @@ -274,7 +274,7 @@ "type": "Identifier", "span": { "start": 100, - "end": 113, + "end": 102, "ctxt": 0 }, "value": "k1", @@ -347,7 +347,7 @@ "type": "Identifier", "span": { "start": 115, - "end": 134, + "end": 117, "ctxt": 0 }, "value": "k2", @@ -1041,7 +1041,7 @@ "type": "Identifier", "span": { "start": 415, - "end": 442, + "end": 416, "ctxt": 0 }, "value": "a", @@ -1160,7 +1160,7 @@ "type": "Identifier", "span": { "start": 444, - "end": 472, + "end": 445, "ctxt": 0 }, "value": "b", @@ -1253,7 +1253,7 @@ "type": "Identifier", "span": { "start": 474, - "end": 478, + "end": 475, "ctxt": 0 }, "value": "c", @@ -1299,7 +1299,7 @@ "type": "Identifier", "span": { "start": 480, - "end": 490, + "end": 481, "ctxt": 0 }, "value": "k", @@ -2095,7 +2095,7 @@ "type": "Identifier", "span": { "start": 1104, - "end": 1127, + "end": 1105, "ctxt": 0 }, "value": "a", @@ -2183,7 +2183,7 @@ "type": "Identifier", "span": { "start": 1129, - "end": 1157, + "end": 1130, "ctxt": 0 }, "value": "b", @@ -2276,7 +2276,7 @@ "type": "Identifier", "span": { "start": 1159, - "end": 1163, + "end": 1160, "ctxt": 0 }, "value": "k", @@ -2581,7 +2581,7 @@ "type": "Identifier", "span": { "start": 1311, - "end": 1334, + "end": 1312, "ctxt": 0 }, "value": "a", @@ -2669,7 +2669,7 @@ "type": "Identifier", "span": { "start": 1336, - "end": 1364, + "end": 1337, "ctxt": 0 }, "value": "b", @@ -2747,7 +2747,7 @@ "type": "Identifier", "span": { "start": 1366, - "end": 1370, + "end": 1367, "ctxt": 0 }, "value": "k", @@ -2945,7 +2945,7 @@ "type": "Identifier", "span": { "start": 1493, - "end": 1524, + "end": 1494, "ctxt": 0 }, "value": "a", @@ -3066,7 +3066,7 @@ "type": "Identifier", "span": { "start": 1526, - "end": 1535, + "end": 1527, "ctxt": 0 }, "value": "b", @@ -3366,7 +3366,7 @@ "type": "Identifier", "span": { "start": 1647, - "end": 1653, + "end": 1650, "ctxt": 0 }, "value": "obj", @@ -3412,7 +3412,7 @@ "type": "Identifier", "span": { "start": 1655, - "end": 1665, + "end": 1657, "ctxt": 0 }, "value": "k1", @@ -3448,7 +3448,7 @@ "type": "Identifier", "span": { "start": 1667, - "end": 1681, + "end": 1669, "ctxt": 0 }, "value": "k2", @@ -3503,7 +3503,7 @@ "type": "Identifier", "span": { "start": 1683, - "end": 1694, + "end": 1685, "ctxt": 0 }, "value": "k3", @@ -3558,7 +3558,7 @@ "type": "Identifier", "span": { "start": 1696, - "end": 1701, + "end": 1698, "ctxt": 0 }, "value": "k4", @@ -4058,7 +4058,7 @@ "type": "Identifier", "span": { "start": 1888, - "end": 1897, + "end": 1891, "ctxt": 0 }, "value": "obj", @@ -4104,7 +4104,7 @@ "type": "Identifier", "span": { "start": 1899, - "end": 1913, + "end": 1901, "ctxt": 0 }, "value": "k1", @@ -4159,7 +4159,7 @@ "type": "Identifier", "span": { "start": 1915, - "end": 1920, + "end": 1917, "ctxt": 0 }, "value": "k2", @@ -4481,7 +4481,7 @@ "type": "Identifier", "span": { "start": 2036, - "end": 2042, + "end": 2039, "ctxt": 0 }, "value": "obj", @@ -4527,7 +4527,7 @@ "type": "Identifier", "span": { "start": 2044, - "end": 2058, + "end": 2046, "ctxt": 0 }, "value": "k1", @@ -4582,7 +4582,7 @@ "type": "Identifier", "span": { "start": 2060, - "end": 2071, + "end": 2062, "ctxt": 0 }, "value": "k2", @@ -4637,7 +4637,7 @@ "type": "Identifier", "span": { "start": 2073, - "end": 2078, + "end": 2075, "ctxt": 0 }, "value": "k3", @@ -5671,7 +5671,7 @@ "type": "Identifier", "span": { "start": 2492, - "end": 2513, + "end": 2497, "ctxt": 0 }, "value": "state", @@ -6067,7 +6067,7 @@ "type": "Identifier", "span": { "start": 2646, - "end": 2657, + "end": 2648, "ctxt": 0 }, "value": "id", @@ -6141,7 +6141,7 @@ "type": "Identifier", "span": { "start": 2659, - "end": 2680, + "end": 2664, "ctxt": 0 }, "value": "state", @@ -7813,7 +7813,7 @@ "type": "Identifier", "span": { "start": 3383, - "end": 3391, + "end": 3388, "ctxt": 0 }, "value": "param", @@ -7859,7 +7859,7 @@ "type": "Identifier", "span": { "start": 3393, - "end": 3437, + "end": 3395, "ctxt": 0 }, "value": "cb", @@ -7883,7 +7883,7 @@ "type": "Identifier", "span": { "start": 3398, - "end": 3428, + "end": 3405, "ctxt": 0 }, "value": "element", @@ -8317,7 +8317,7 @@ "type": "Identifier", "span": { "start": 3509, - "end": 3517, + "end": 3514, "ctxt": 0 }, "value": "param", @@ -8363,7 +8363,7 @@ "type": "Identifier", "span": { "start": 3519, - "end": 3551, + "end": 3521, "ctxt": 0 }, "value": "cb", @@ -8387,7 +8387,7 @@ "type": "Identifier", "span": { "start": 3524, - "end": 3542, + "end": 3531, "ctxt": 0 }, "value": "element", @@ -8645,7 +8645,7 @@ "type": "Identifier", "span": { "start": 3644, - "end": 3652, + "end": 3649, "ctxt": 0 }, "value": "param", @@ -8691,7 +8691,7 @@ "type": "Identifier", "span": { "start": 3654, - "end": 3686, + "end": 3656, "ctxt": 0 }, "value": "cb", @@ -8715,7 +8715,7 @@ "type": "Identifier", "span": { "start": 3659, - "end": 3677, + "end": 3666, "ctxt": 0 }, "value": "element", diff --git a/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccessErrors.json b/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccessErrors.json index b4ab93db85b7..c462cca529ad 100644 --- a/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccessErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccessErrors.json @@ -2611,7 +2611,7 @@ "type": "Identifier", "span": { "start": 1438, - "end": 1444, + "end": 1441, "ctxt": 0 }, "value": "obj", @@ -2657,7 +2657,7 @@ "type": "Identifier", "span": { "start": 1446, - "end": 1452, + "end": 1449, "ctxt": 0 }, "value": "key", @@ -2865,7 +2865,7 @@ "type": "Identifier", "span": { "start": 1523, - "end": 1529, + "end": 1526, "ctxt": 0 }, "value": "obj", @@ -2911,7 +2911,7 @@ "type": "Identifier", "span": { "start": 1531, - "end": 1537, + "end": 1534, "ctxt": 0 }, "value": "key", @@ -2957,7 +2957,7 @@ "type": "Identifier", "span": { "start": 1539, - "end": 1550, + "end": 1544, "ctxt": 0 }, "value": "value", @@ -3212,7 +3212,7 @@ "type": "Identifier", "span": { "start": 1592, - "end": 1604, + "end": 1597, "ctxt": 0 }, "value": "shape", @@ -3791,7 +3791,7 @@ "type": "Identifier", "span": { "start": 1942, - "end": 1950, + "end": 1943, "ctxt": 0 }, "value": "x", @@ -3866,7 +3866,7 @@ "type": "Identifier", "span": { "start": 1952, - "end": 1960, + "end": 1953, "ctxt": 0 }, "value": "y", @@ -3941,7 +3941,7 @@ "type": "Identifier", "span": { "start": 1962, - "end": 1979, + "end": 1964, "ctxt": 0 }, "value": "k1", @@ -4033,7 +4033,7 @@ "type": "Identifier", "span": { "start": 1981, - "end": 2002, + "end": 1983, "ctxt": 0 }, "value": "k2", @@ -4126,7 +4126,7 @@ "type": "Identifier", "span": { "start": 2004, - "end": 2021, + "end": 2006, "ctxt": 0 }, "value": "k3", @@ -4218,7 +4218,7 @@ "type": "Identifier", "span": { "start": 2023, - "end": 2044, + "end": 2025, "ctxt": 0 }, "value": "k4", @@ -5210,7 +5210,7 @@ "type": "Identifier", "span": { "start": 2463, - "end": 2467, + "end": 2464, "ctxt": 0 }, "value": "t", @@ -5256,7 +5256,7 @@ "type": "Identifier", "span": { "start": 2469, - "end": 2473, + "end": 2470, "ctxt": 0 }, "value": "k", @@ -5302,7 +5302,7 @@ "type": "Identifier", "span": { "start": 2475, - "end": 2483, + "end": 2477, "ctxt": 0 }, "value": "tk", @@ -5376,7 +5376,7 @@ "type": "Identifier", "span": { "start": 2485, - "end": 2489, + "end": 2486, "ctxt": 0 }, "value": "u", @@ -5422,7 +5422,7 @@ "type": "Identifier", "span": { "start": 2491, - "end": 2495, + "end": 2492, "ctxt": 0 }, "value": "j", @@ -5468,7 +5468,7 @@ "type": "Identifier", "span": { "start": 2497, - "end": 2505, + "end": 2499, "ctxt": 0 }, "value": "uk", @@ -5542,7 +5542,7 @@ "type": "Identifier", "span": { "start": 2507, - "end": 2515, + "end": 2509, "ctxt": 0 }, "value": "tj", @@ -5616,7 +5616,7 @@ "type": "Identifier", "span": { "start": 2517, - "end": 2525, + "end": 2519, "ctxt": 0 }, "value": "uj", @@ -6511,7 +6511,7 @@ "type": "Identifier", "span": { "start": 2984, - "end": 2994, + "end": 2985, "ctxt": 0 }, "value": "k", @@ -7417,7 +7417,7 @@ "type": "Identifier", "span": { "start": 3406, - "end": 3410, + "end": 3407, "ctxt": 0 }, "value": "t", @@ -7463,7 +7463,7 @@ "type": "Identifier", "span": { "start": 3412, - "end": 3416, + "end": 3413, "ctxt": 0 }, "value": "k", @@ -8708,7 +8708,7 @@ "type": "Identifier", "span": { "start": 3881, - "end": 3885, + "end": 3882, "ctxt": 0 }, "value": "t", @@ -8840,7 +8840,7 @@ "type": "Identifier", "span": { "start": 3925, - "end": 3937, + "end": 3928, "ctxt": 0 }, "value": "key", diff --git a/crates/swc_ecma_parser/tests/tsc/keyofInferenceIntersectsResults.json b/crates/swc_ecma_parser/tests/tsc/keyofInferenceIntersectsResults.json index 2f75b9983ab6..d99d095daabc 100644 --- a/crates/swc_ecma_parser/tests/tsc/keyofInferenceIntersectsResults.json +++ b/crates/swc_ecma_parser/tests/tsc/keyofInferenceIntersectsResults.json @@ -145,7 +145,7 @@ "type": "Identifier", "span": { "start": 76, - "end": 86, + "end": 77, "ctxt": 0 }, "value": "x", @@ -200,7 +200,7 @@ "type": "Identifier", "span": { "start": 88, - "end": 98, + "end": 89, "ctxt": 0 }, "value": "y", @@ -358,7 +358,7 @@ "type": "Identifier", "span": { "start": 128, - "end": 138, + "end": 129, "ctxt": 0 }, "value": "x", @@ -413,7 +413,7 @@ "type": "Identifier", "span": { "start": 140, - "end": 150, + "end": 141, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/keyofInferenceLowerPriorityThanReturn.json b/crates/swc_ecma_parser/tests/tsc/keyofInferenceLowerPriorityThanReturn.json index 31227125885b..256f7a4bd0cb 100644 --- a/crates/swc_ecma_parser/tests/tsc/keyofInferenceLowerPriorityThanReturn.json +++ b/crates/swc_ecma_parser/tests/tsc/keyofInferenceLowerPriorityThanReturn.json @@ -1068,7 +1068,7 @@ "type": "Identifier", "span": { "start": 447, - "end": 467, + "end": 451, "ctxt": 0 }, "value": "cols", @@ -1803,7 +1803,7 @@ "type": "Identifier", "span": { "start": 850, - "end": 873, + "end": 856, "ctxt": 0 }, "value": "_table", @@ -1896,7 +1896,7 @@ "type": "Identifier", "span": { "start": 875, - "end": 917, + "end": 890, "ctxt": 0 }, "value": "_conflictTarget", diff --git a/crates/swc_ecma_parser/tests/tsc/literalTypeWidening.json b/crates/swc_ecma_parser/tests/tsc/literalTypeWidening.json index 21a5f8731666..ecde06501269 100644 --- a/crates/swc_ecma_parser/tests/tsc/literalTypeWidening.json +++ b/crates/swc_ecma_parser/tests/tsc/literalTypeWidening.json @@ -453,7 +453,7 @@ "type": "Identifier", "span": { "start": 400, - "end": 413, + "end": 404, "ctxt": 0 }, "value": "cond", @@ -1574,7 +1574,7 @@ "type": "Identifier", "span": { "start": 1214, - "end": 1227, + "end": 1218, "ctxt": 0 }, "value": "cond", @@ -2722,7 +2722,7 @@ "type": "Identifier", "span": { "start": 1886, - "end": 1890, + "end": 1887, "ctxt": 0 }, "value": "x", @@ -2853,7 +2853,7 @@ "type": "Identifier", "span": { "start": 1961, - "end": 1965, + "end": 1962, "ctxt": 0 }, "value": "x", @@ -3020,7 +3020,7 @@ "type": "Identifier", "span": { "start": 1984, - "end": 1997, + "end": 1988, "ctxt": 0 }, "value": "cond", @@ -3863,7 +3863,7 @@ "type": "Identifier", "span": { "start": 2387, - "end": 2404, + "end": 2393, "ctxt": 0 }, "value": "result", @@ -4109,7 +4109,7 @@ "type": "Identifier", "span": { "start": 2475, - "end": 2492, + "end": 2481, "ctxt": 0 }, "value": "result", @@ -4341,7 +4341,7 @@ "type": "Identifier", "span": { "start": 2566, - "end": 2575, + "end": 2567, "ctxt": 0 }, "value": "x", @@ -5356,7 +5356,7 @@ "type": "Identifier", "span": { "start": 3101, - "end": 3118, + "end": 3104, "ctxt": 0 }, "value": "obj", @@ -6168,7 +6168,7 @@ "type": "Identifier", "span": { "start": 3466, - "end": 3472, + "end": 3469, "ctxt": 0 }, "value": "obj", @@ -6573,7 +6573,7 @@ "type": "Identifier", "span": { "start": 3597, - "end": 3601, + "end": 3598, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/literalTypes1.json b/crates/swc_ecma_parser/tests/tsc/literalTypes1.json index dea2c242c31f..a9b4ab9cd146 100644 --- a/crates/swc_ecma_parser/tests/tsc/literalTypes1.json +++ b/crates/swc_ecma_parser/tests/tsc/literalTypes1.json @@ -382,7 +382,7 @@ "type": "Identifier", "span": { "start": 123, - "end": 135, + "end": 124, "ctxt": 0 }, "value": "x", @@ -699,7 +699,7 @@ "type": "Identifier", "span": { "start": 366, - "end": 378, + "end": 367, "ctxt": 0 }, "value": "x", @@ -1070,7 +1070,7 @@ "type": "Identifier", "span": { "start": 611, - "end": 619, + "end": 612, "ctxt": 0 }, "value": "x", @@ -1226,7 +1226,7 @@ "type": "Identifier", "span": { "start": 696, - "end": 720, + "end": 697, "ctxt": 0 }, "value": "x", @@ -1662,7 +1662,7 @@ "type": "Identifier", "span": { "start": 1079, - "end": 1107, + "end": 1080, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/literalTypes2.json b/crates/swc_ecma_parser/tests/tsc/literalTypes2.json index 021e9466e24e..71744a3a1cfa 100644 --- a/crates/swc_ecma_parser/tests/tsc/literalTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/literalTypes2.json @@ -1572,7 +1572,7 @@ "type": "Identifier", "span": { "start": 602, - "end": 607, + "end": 604, "ctxt": 0 }, "value": "p1", @@ -1635,7 +1635,7 @@ "type": "Identifier", "span": { "start": 613, - "end": 622, + "end": 615, "ctxt": 0 }, "value": "p2", @@ -1698,7 +1698,7 @@ "type": "Identifier", "span": { "start": 632, - "end": 640, + "end": 634, "ctxt": 0 }, "value": "p3", @@ -1759,7 +1759,7 @@ "type": "Identifier", "span": { "start": 649, - "end": 656, + "end": 651, "ctxt": 0 }, "value": "p4", @@ -7534,7 +7534,7 @@ "type": "Identifier", "span": { "start": 2929, - "end": 2933, + "end": 2930, "ctxt": 0 }, "value": "x", @@ -7665,7 +7665,7 @@ "type": "Identifier", "span": { "start": 2962, - "end": 2966, + "end": 2963, "ctxt": 0 }, "value": "x", @@ -7711,7 +7711,7 @@ "type": "Identifier", "span": { "start": 2968, - "end": 2972, + "end": 2969, "ctxt": 0 }, "value": "y", @@ -7842,7 +7842,7 @@ "type": "Identifier", "span": { "start": 3004, - "end": 3008, + "end": 3005, "ctxt": 0 }, "value": "x", @@ -7888,7 +7888,7 @@ "type": "Identifier", "span": { "start": 3010, - "end": 3014, + "end": 3011, "ctxt": 0 }, "value": "y", @@ -8071,7 +8071,7 @@ "type": "Identifier", "span": { "start": 3047, - "end": 3051, + "end": 3048, "ctxt": 0 }, "value": "x", @@ -8210,7 +8210,7 @@ "type": "Identifier", "span": { "start": 3097, - "end": 3101, + "end": 3098, "ctxt": 0 }, "value": "x", @@ -8256,7 +8256,7 @@ "type": "Identifier", "span": { "start": 3103, - "end": 3107, + "end": 3104, "ctxt": 0 }, "value": "y", @@ -8403,7 +8403,7 @@ "type": "Identifier", "span": { "start": 3138, - "end": 3144, + "end": 3139, "ctxt": 0 }, "value": "x", @@ -8542,7 +8542,7 @@ "type": "Identifier", "span": { "start": 3173, - "end": 3179, + "end": 3174, "ctxt": 0 }, "value": "x", @@ -8689,7 +8689,7 @@ "type": "Identifier", "span": { "start": 3210, - "end": 3214, + "end": 3211, "ctxt": 0 }, "value": "x", @@ -8735,7 +8735,7 @@ "type": "Identifier", "span": { "start": 3216, - "end": 3230, + "end": 3217, "ctxt": 0 }, "value": "f", @@ -8759,7 +8759,7 @@ "type": "Identifier", "span": { "start": 3220, - "end": 3224, + "end": 3221, "ctxt": 0 }, "value": "p", @@ -9958,7 +9958,7 @@ "type": "Identifier", "span": { "start": 3706, - "end": 3710, + "end": 3707, "ctxt": 0 }, "value": "x", @@ -10137,7 +10137,7 @@ "type": "Identifier", "span": { "start": 3757, - "end": 3763, + "end": 3758, "ctxt": 0 }, "value": "a", @@ -10191,7 +10191,7 @@ "type": "Identifier", "span": { "start": 3765, - "end": 3769, + "end": 3766, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/literalTypes3.json b/crates/swc_ecma_parser/tests/tsc/literalTypes3.json index 10199f3d2990..37ac8968e61e 100644 --- a/crates/swc_ecma_parser/tests/tsc/literalTypes3.json +++ b/crates/swc_ecma_parser/tests/tsc/literalTypes3.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 41, - "end": 50, + "end": 42, "ctxt": 0 }, "value": "s", @@ -274,7 +274,7 @@ "type": "Identifier", "span": { "start": 192, - "end": 201, + "end": 193, "ctxt": 0 }, "value": "s", @@ -499,7 +499,7 @@ "type": "Identifier", "span": { "start": 439, - "end": 448, + "end": 440, "ctxt": 0 }, "value": "s", @@ -674,7 +674,7 @@ "type": "Identifier", "span": { "start": 552, - "end": 561, + "end": 553, "ctxt": 0 }, "value": "x", @@ -878,7 +878,7 @@ "type": "Identifier", "span": { "start": 667, - "end": 676, + "end": 668, "ctxt": 0 }, "value": "x", @@ -914,7 +914,7 @@ "type": "Identifier", "span": { "start": 678, - "end": 686, + "end": 679, "ctxt": 0 }, "value": "y", @@ -1127,7 +1127,7 @@ "type": "Identifier", "span": { "start": 766, - "end": 775, + "end": 767, "ctxt": 0 }, "value": "x", @@ -1163,7 +1163,7 @@ "type": "Identifier", "span": { "start": 777, - "end": 785, + "end": 778, "ctxt": 0 }, "value": "y", @@ -1376,7 +1376,7 @@ "type": "Identifier", "span": { "start": 865, - "end": 890, + "end": 866, "ctxt": 0 }, "value": "x", @@ -1458,7 +1458,7 @@ "type": "Identifier", "span": { "start": 892, - "end": 909, + "end": 893, "ctxt": 0 }, "value": "y", @@ -1642,7 +1642,7 @@ "type": "Identifier", "span": { "start": 990, - "end": 1015, + "end": 991, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/localTypes1.json b/crates/swc_ecma_parser/tests/tsc/localTypes1.json index 5d9feb05d523..418b11252985 100644 --- a/crates/swc_ecma_parser/tests/tsc/localTypes1.json +++ b/crates/swc_ecma_parser/tests/tsc/localTypes1.json @@ -1161,7 +1161,7 @@ "type": "Identifier", "span": { "start": 527, - "end": 537, + "end": 528, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/tsc/localTypes2.json b/crates/swc_ecma_parser/tests/tsc/localTypes2.json index ab9dfbf13e9e..5e30f3c0e055 100644 --- a/crates/swc_ecma_parser/tests/tsc/localTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/localTypes2.json @@ -115,7 +115,7 @@ "type": "Identifier", "span": { "start": 85, - "end": 94, + "end": 86, "ctxt": 0 }, "value": "x", @@ -154,7 +154,7 @@ "type": "Identifier", "span": { "start": 103, - "end": 112, + "end": 104, "ctxt": 0 }, "value": "y", @@ -535,7 +535,7 @@ "type": "Identifier", "span": { "start": 264, - "end": 273, + "end": 265, "ctxt": 0 }, "value": "x", @@ -665,7 +665,7 @@ "type": "Identifier", "span": { "start": 352, - "end": 361, + "end": 353, "ctxt": 0 }, "value": "y", @@ -1047,7 +1047,7 @@ "type": "Identifier", "span": { "start": 511, - "end": 520, + "end": 512, "ctxt": 0 }, "value": "x", @@ -1083,7 +1083,7 @@ "type": "Identifier", "span": { "start": 522, - "end": 531, + "end": 523, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/localTypes3.json b/crates/swc_ecma_parser/tests/tsc/localTypes3.json index 810f144f930d..1694cd8ee2d4 100644 --- a/crates/swc_ecma_parser/tests/tsc/localTypes3.json +++ b/crates/swc_ecma_parser/tests/tsc/localTypes3.json @@ -115,7 +115,7 @@ "type": "Identifier", "span": { "start": 91, - "end": 95, + "end": 92, "ctxt": 0 }, "value": "x", @@ -164,7 +164,7 @@ "type": "Identifier", "span": { "start": 104, - "end": 108, + "end": 105, "ctxt": 0 }, "value": "y", @@ -610,7 +610,7 @@ "type": "Identifier", "span": { "start": 268, - "end": 272, + "end": 269, "ctxt": 0 }, "value": "x", @@ -750,7 +750,7 @@ "type": "Identifier", "span": { "start": 354, - "end": 358, + "end": 355, "ctxt": 0 }, "value": "y", @@ -1206,7 +1206,7 @@ "type": "Identifier", "span": { "start": 519, - "end": 523, + "end": 520, "ctxt": 0 }, "value": "x", @@ -1252,7 +1252,7 @@ "type": "Identifier", "span": { "start": 525, - "end": 529, + "end": 526, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/localTypes4.json b/crates/swc_ecma_parser/tests/tsc/localTypes4.json index a310288e595d..713769d5caa6 100644 --- a/crates/swc_ecma_parser/tests/tsc/localTypes4.json +++ b/crates/swc_ecma_parser/tests/tsc/localTypes4.json @@ -60,7 +60,7 @@ "type": "Identifier", "span": { "start": 134, - "end": 138, + "end": 135, "ctxt": 0 }, "value": "x", @@ -253,7 +253,7 @@ "type": "Identifier", "span": { "start": 278, - "end": 282, + "end": 279, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/logicalAndOperatorWithTypeParameters.json b/crates/swc_ecma_parser/tests/tsc/logicalAndOperatorWithTypeParameters.json index 0b89502e1429..3c4948a6990e 100644 --- a/crates/swc_ecma_parser/tests/tsc/logicalAndOperatorWithTypeParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/logicalAndOperatorWithTypeParameters.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 161, - "end": 165, + "end": 162, "ctxt": 0 }, "value": "t", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 167, - "end": 171, + "end": 168, "ctxt": 0 }, "value": "u", @@ -124,7 +124,7 @@ "type": "Identifier", "span": { "start": 173, - "end": 177, + "end": 174, "ctxt": 0 }, "value": "v", diff --git a/crates/swc_ecma_parser/tests/tsc/logicalAssignment4.json b/crates/swc_ecma_parser/tests/tsc/logicalAssignment4.json index c08ef4c3779c..a8419dc41550 100644 --- a/crates/swc_ecma_parser/tests/tsc/logicalAssignment4.json +++ b/crates/swc_ecma_parser/tests/tsc/logicalAssignment4.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 108, - "end": 137, + "end": 115, "ctxt": 0 }, "value": "results", @@ -218,7 +218,7 @@ "type": "Identifier", "span": { "start": 190, - "end": 219, + "end": 197, "ctxt": 0 }, "value": "results", @@ -404,7 +404,7 @@ "type": "Identifier", "span": { "start": 272, - "end": 301, + "end": 279, "ctxt": 0 }, "value": "results", @@ -600,7 +600,7 @@ "type": "Identifier", "span": { "start": 365, - "end": 394, + "end": 372, "ctxt": 0 }, "value": "results", @@ -968,7 +968,7 @@ "type": "Identifier", "span": { "start": 581, - "end": 617, + "end": 586, "ctxt": 0 }, "value": "thing", @@ -1033,7 +1033,7 @@ "type": "Identifier", "span": { "start": 619, - "end": 662, + "end": 631, "ctxt": 0 }, "value": "defaultValue", diff --git a/crates/swc_ecma_parser/tests/tsc/logicalAssignment5.json b/crates/swc_ecma_parser/tests/tsc/logicalAssignment5.json index 3e7b807ee052..68498b504725 100644 --- a/crates/swc_ecma_parser/tests/tsc/logicalAssignment5.json +++ b/crates/swc_ecma_parser/tests/tsc/logicalAssignment5.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 77, - "end": 100, + "end": 78, "ctxt": 0 }, "value": "f", @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 82, - "end": 91, + "end": 83, "ctxt": 0 }, "value": "a", @@ -263,7 +263,7 @@ "type": "Identifier", "span": { "start": 151, - "end": 174, + "end": 152, "ctxt": 0 }, "value": "f", @@ -287,7 +287,7 @@ "type": "Identifier", "span": { "start": 156, - "end": 165, + "end": 157, "ctxt": 0 }, "value": "a", @@ -494,7 +494,7 @@ "type": "Identifier", "span": { "start": 225, - "end": 248, + "end": 226, "ctxt": 0 }, "value": "f", @@ -518,7 +518,7 @@ "type": "Identifier", "span": { "start": 230, - "end": 239, + "end": 231, "ctxt": 0 }, "value": "a", @@ -725,7 +725,7 @@ "type": "Identifier", "span": { "start": 299, - "end": 322, + "end": 300, "ctxt": 0 }, "value": "f", @@ -749,7 +749,7 @@ "type": "Identifier", "span": { "start": 304, - "end": 313, + "end": 305, "ctxt": 0 }, "value": "a", @@ -1012,7 +1012,7 @@ "type": "Identifier", "span": { "start": 389, - "end": 412, + "end": 390, "ctxt": 0 }, "value": "f", @@ -1036,7 +1036,7 @@ "type": "Identifier", "span": { "start": 394, - "end": 403, + "end": 395, "ctxt": 0 }, "value": "a", @@ -1299,7 +1299,7 @@ "type": "Identifier", "span": { "start": 479, - "end": 502, + "end": 480, "ctxt": 0 }, "value": "f", @@ -1323,7 +1323,7 @@ "type": "Identifier", "span": { "start": 484, - "end": 493, + "end": 485, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/logicalAssignment6.json b/crates/swc_ecma_parser/tests/tsc/logicalAssignment6.json index 30605c5097b6..9d14b4fc69bd 100644 --- a/crates/swc_ecma_parser/tests/tsc/logicalAssignment6.json +++ b/crates/swc_ecma_parser/tests/tsc/logicalAssignment6.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 76, - "end": 105, + "end": 83, "ctxt": 0 }, "value": "results", @@ -95,7 +95,7 @@ "type": "Identifier", "span": { "start": 107, - "end": 137, + "end": 115, "ctxt": 0 }, "value": "results1", @@ -309,7 +309,7 @@ "type": "Identifier", "span": { "start": 205, - "end": 234, + "end": 212, "ctxt": 0 }, "value": "results", @@ -372,7 +372,7 @@ "type": "Identifier", "span": { "start": 236, - "end": 266, + "end": 244, "ctxt": 0 }, "value": "results1", @@ -586,7 +586,7 @@ "type": "Identifier", "span": { "start": 334, - "end": 363, + "end": 341, "ctxt": 0 }, "value": "results", @@ -649,7 +649,7 @@ "type": "Identifier", "span": { "start": 365, - "end": 395, + "end": 373, "ctxt": 0 }, "value": "results1", diff --git a/crates/swc_ecma_parser/tests/tsc/logicalAssignment7.json b/crates/swc_ecma_parser/tests/tsc/logicalAssignment7.json index 8e8bea19ef71..26f2018b7e91 100644 --- a/crates/swc_ecma_parser/tests/tsc/logicalAssignment7.json +++ b/crates/swc_ecma_parser/tests/tsc/logicalAssignment7.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 76, - "end": 105, + "end": 83, "ctxt": 0 }, "value": "results", @@ -95,7 +95,7 @@ "type": "Identifier", "span": { "start": 107, - "end": 137, + "end": 115, "ctxt": 0 }, "value": "results1", @@ -301,7 +301,7 @@ "type": "Identifier", "span": { "start": 203, - "end": 232, + "end": 210, "ctxt": 0 }, "value": "results", @@ -364,7 +364,7 @@ "type": "Identifier", "span": { "start": 234, - "end": 264, + "end": 242, "ctxt": 0 }, "value": "results1", @@ -570,7 +570,7 @@ "type": "Identifier", "span": { "start": 330, - "end": 359, + "end": 337, "ctxt": 0 }, "value": "results", @@ -633,7 +633,7 @@ "type": "Identifier", "span": { "start": 361, - "end": 391, + "end": 369, "ctxt": 0 }, "value": "results1", diff --git a/crates/swc_ecma_parser/tests/tsc/logicalAssignment8.json b/crates/swc_ecma_parser/tests/tsc/logicalAssignment8.json index 32212e5bba32..9361c36f8cf0 100644 --- a/crates/swc_ecma_parser/tests/tsc/logicalAssignment8.json +++ b/crates/swc_ecma_parser/tests/tsc/logicalAssignment8.json @@ -150,7 +150,7 @@ "type": "Identifier", "span": { "start": 129, - "end": 158, + "end": 136, "ctxt": 0 }, "value": "results", @@ -382,7 +382,7 @@ "type": "Identifier", "span": { "start": 225, - "end": 254, + "end": 232, "ctxt": 0 }, "value": "results", @@ -614,7 +614,7 @@ "type": "Identifier", "span": { "start": 321, - "end": 350, + "end": 328, "ctxt": 0 }, "value": "results", diff --git a/crates/swc_ecma_parser/tests/tsc/logicalOrExpressionIsNotContextuallyTyped.json b/crates/swc_ecma_parser/tests/tsc/logicalOrExpressionIsNotContextuallyTyped.json index 99afecc995f5..343aceb01d7b 100644 --- a/crates/swc_ecma_parser/tests/tsc/logicalOrExpressionIsNotContextuallyTyped.json +++ b/crates/swc_ecma_parser/tests/tsc/logicalOrExpressionIsNotContextuallyTyped.json @@ -51,7 +51,7 @@ "type": "Identifier", "span": { "start": 267, - "end": 276, + "end": 268, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/logicalOrOperatorWithTypeParameters.json b/crates/swc_ecma_parser/tests/tsc/logicalOrOperatorWithTypeParameters.json index b99574004f63..c8298ddb829d 100644 --- a/crates/swc_ecma_parser/tests/tsc/logicalOrOperatorWithTypeParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/logicalOrOperatorWithTypeParameters.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 20, - "end": 24, + "end": 21, "ctxt": 0 }, "value": "t", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 26, - "end": 30, + "end": 27, "ctxt": 0 }, "value": "u", @@ -501,7 +501,7 @@ "type": "Identifier", "span": { "start": 178, - "end": 182, + "end": 179, "ctxt": 0 }, "value": "t", @@ -547,7 +547,7 @@ "type": "Identifier", "span": { "start": 184, - "end": 188, + "end": 185, "ctxt": 0 }, "value": "u", @@ -593,7 +593,7 @@ "type": "Identifier", "span": { "start": 190, - "end": 194, + "end": 191, "ctxt": 0 }, "value": "v", @@ -1100,7 +1100,7 @@ "type": "Identifier", "span": { "start": 450, - "end": 454, + "end": 451, "ctxt": 0 }, "value": "t", @@ -1146,7 +1146,7 @@ "type": "Identifier", "span": { "start": 456, - "end": 460, + "end": 457, "ctxt": 0 }, "value": "u", diff --git a/crates/swc_ecma_parser/tests/tsc/looseThisTypeInFunctions.json b/crates/swc_ecma_parser/tests/tsc/looseThisTypeInFunctions.json index ea47fd7c45c8..86e5e9cbf76f 100644 --- a/crates/swc_ecma_parser/tests/tsc/looseThisTypeInFunctions.json +++ b/crates/swc_ecma_parser/tests/tsc/looseThisTypeInFunctions.json @@ -100,7 +100,7 @@ "type": "Identifier", "span": { "start": 97, - "end": 107, + "end": 101, "ctxt": 0 }, "value": "this", @@ -126,7 +126,7 @@ "type": "Identifier", "span": { "start": 109, - "end": 118, + "end": 110, "ctxt": 0 }, "value": "m", @@ -225,7 +225,7 @@ "type": "Identifier", "span": { "start": 169, - "end": 178, + "end": 170, "ctxt": 0 }, "value": "m", @@ -367,7 +367,7 @@ "type": "Identifier", "span": { "start": 246, - "end": 256, + "end": 250, "ctxt": 0 }, "value": "this", @@ -402,7 +402,7 @@ "type": "Identifier", "span": { "start": 258, - "end": 267, + "end": 259, "ctxt": 0 }, "value": "m", @@ -555,7 +555,7 @@ "type": "Identifier", "span": { "start": 329, - "end": 338, + "end": 330, "ctxt": 0 }, "value": "m", @@ -708,7 +708,7 @@ "type": "Identifier", "span": { "start": 400, - "end": 410, + "end": 404, "ctxt": 0 }, "value": "this", @@ -744,7 +744,7 @@ "type": "Identifier", "span": { "start": 412, - "end": 421, + "end": 413, "ctxt": 0 }, "value": "m", @@ -1089,7 +1089,7 @@ "type": "Identifier", "span": { "start": 602, - "end": 611, + "end": 603, "ctxt": 0 }, "value": "m", @@ -1232,7 +1232,7 @@ "type": "Identifier", "span": { "start": 719, - "end": 728, + "end": 720, "ctxt": 0 }, "value": "m", diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypeAsClauseRelationships.json b/crates/swc_ecma_parser/tests/tsc/mappedTypeAsClauseRelationships.json index 1dc0fbb35c28..f092e363d047 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypeAsClauseRelationships.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypeAsClauseRelationships.json @@ -965,7 +965,7 @@ "type": "Identifier", "span": { "start": 424, - "end": 430, + "end": 427, "ctxt": 0 }, "value": "val", @@ -2323,7 +2323,7 @@ "type": "Identifier", "span": { "start": 888, - "end": 894, + "end": 891, "ctxt": 0 }, "value": "val", diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypeAsClauses.json b/crates/swc_ecma_parser/tests/tsc/mappedTypeAsClauses.json index ded5e31ac203..c67c89d15d91 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypeAsClauses.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypeAsClauses.json @@ -1865,7 +1865,7 @@ "type": "Identifier", "span": { "start": 857, - "end": 866, + "end": 858, "ctxt": 0 }, "value": "x", @@ -7716,7 +7716,7 @@ "type": "Identifier", "span": { "start": 3460, - "end": 3488, + "end": 3461, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypeConstraints.json b/crates/swc_ecma_parser/tests/tsc/mappedTypeConstraints.json index c7e128f8c541..8a0441eed867 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypeConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypeConstraints.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 67, - "end": 102, + "end": 70, "ctxt": 0 }, "value": "obj", @@ -375,7 +375,7 @@ "type": "Identifier", "span": { "start": 168, - "end": 203, + "end": 171, "ctxt": 0 }, "value": "obj", @@ -718,7 +718,7 @@ "type": "Identifier", "span": { "start": 305, - "end": 336, + "end": 308, "ctxt": 0 }, "value": "obj", @@ -1195,7 +1195,7 @@ "type": "Identifier", "span": { "start": 438, - "end": 469, + "end": 441, "ctxt": 0 }, "value": "obj", @@ -1744,7 +1744,7 @@ "type": "Identifier", "span": { "start": 557, - "end": 605, + "end": 560, "ctxt": 0 }, "value": "obj", diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypeConstraints2.json b/crates/swc_ecma_parser/tests/tsc/mappedTypeConstraints2.json index fd84bea8ff05..c3fe5fa17834 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypeConstraints2.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypeConstraints2.json @@ -205,7 +205,7 @@ "type": "Identifier", "span": { "start": 148, - "end": 163, + "end": 151, "ctxt": 0 }, "value": "obj", @@ -279,7 +279,7 @@ "type": "Identifier", "span": { "start": 165, - "end": 171, + "end": 168, "ctxt": 0 }, "value": "key", @@ -770,7 +770,7 @@ "type": "Identifier", "span": { "start": 313, - "end": 328, + "end": 316, "ctxt": 0 }, "value": "obj", @@ -844,7 +844,7 @@ "type": "Identifier", "span": { "start": 330, - "end": 344, + "end": 333, "ctxt": 0 }, "value": "key", @@ -1363,7 +1363,7 @@ "type": "Identifier", "span": { "start": 499, - "end": 514, + "end": 502, "ctxt": 0 }, "value": "obj", @@ -1437,7 +1437,7 @@ "type": "Identifier", "span": { "start": 516, - "end": 533, + "end": 519, "ctxt": 0 }, "value": "key", @@ -1896,7 +1896,7 @@ "type": "Identifier", "span": { "start": 680, - "end": 695, + "end": 683, "ctxt": 0 }, "value": "obj", @@ -1970,7 +1970,7 @@ "type": "Identifier", "span": { "start": 697, - "end": 718, + "end": 700, "ctxt": 0 }, "value": "key", @@ -2533,7 +2533,7 @@ "type": "Identifier", "span": { "start": 881, - "end": 896, + "end": 884, "ctxt": 0 }, "value": "obj", @@ -2607,7 +2607,7 @@ "type": "Identifier", "span": { "start": 898, - "end": 919, + "end": 901, "ctxt": 0 }, "value": "key", @@ -3083,7 +3083,7 @@ "type": "Identifier", "span": { "start": 1101, - "end": 1116, + "end": 1104, "ctxt": 0 }, "value": "obj", @@ -3157,7 +3157,7 @@ "type": "Identifier", "span": { "start": 1118, - "end": 1139, + "end": 1121, "ctxt": 0 }, "value": "key", @@ -4272,7 +4272,7 @@ "type": "Identifier", "span": { "start": 1652, - "end": 1658, + "end": 1655, "ctxt": 0 }, "value": "obj", @@ -4318,7 +4318,7 @@ "type": "Identifier", "span": { "start": 1660, - "end": 1686, + "end": 1666, "ctxt": 0 }, "value": "bounds", @@ -5138,7 +5138,7 @@ "type": "Identifier", "span": { "start": 2126, - "end": 2181, + "end": 2151, "ctxt": 0 }, "value": "objectWithUnderscoredKeys", @@ -5212,7 +5212,7 @@ "type": "Identifier", "span": { "start": 2183, - "end": 2189, + "end": 2186, "ctxt": 0 }, "value": "key", diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypeErrors.json b/crates/swc_ecma_parser/tests/tsc/mappedTypeErrors.json index cc32fbfbf361..dcfdef42ee72 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypeErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypeErrors.json @@ -1346,7 +1346,7 @@ "type": "Identifier", "span": { "start": 745, - "end": 749, + "end": 746, "ctxt": 0 }, "value": "x", @@ -1566,7 +1566,7 @@ "type": "Identifier", "span": { "start": 832, - "end": 836, + "end": 833, "ctxt": 0 }, "value": "x", @@ -1813,7 +1813,7 @@ "type": "Identifier", "span": { "start": 915, - "end": 919, + "end": 916, "ctxt": 0 }, "value": "x", @@ -2060,7 +2060,7 @@ "type": "Identifier", "span": { "start": 988, - "end": 992, + "end": 989, "ctxt": 0 }, "value": "x", @@ -3887,7 +3887,7 @@ "type": "Identifier", "span": { "start": 1624, - "end": 1634, + "end": 1631, "ctxt": 0 }, "value": "primary", @@ -3933,7 +3933,7 @@ "type": "Identifier", "span": { "start": 1636, - "end": 1658, + "end": 1645, "ctxt": 0 }, "value": "secondary", @@ -4092,7 +4092,7 @@ "type": "Identifier", "span": { "start": 1698, - "end": 1708, + "end": 1705, "ctxt": 0 }, "value": "primary", @@ -4138,7 +4138,7 @@ "type": "Identifier", "span": { "start": 1710, - "end": 1731, + "end": 1719, "ctxt": 0 }, "value": "secondary", @@ -5506,7 +5506,7 @@ "type": "Identifier", "span": { "start": 2322, - "end": 2328, + "end": 2325, "ctxt": 0 }, "value": "obj", @@ -5552,7 +5552,7 @@ "type": "Identifier", "span": { "start": 2330, - "end": 2347, + "end": 2335, "ctxt": 0 }, "value": "props", @@ -6628,7 +6628,7 @@ "type": "Identifier", "span": { "start": 2730, - "end": 2747, + "end": 2735, "ctxt": 0 }, "value": "props", @@ -9008,7 +9008,7 @@ "type": "Identifier", "span": { "start": 3584, - "end": 3599, + "end": 3587, "ctxt": 0 }, "value": "obj", @@ -9279,7 +9279,7 @@ "type": "Identifier", "span": { "start": 3674, - "end": 3696, + "end": 3677, "ctxt": 0 }, "value": "obj", diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypeInferenceErrors.json b/crates/swc_ecma_parser/tests/tsc/mappedTypeInferenceErrors.json index 3718681af4c6..33b42c9e45b5 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypeInferenceErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypeInferenceErrors.json @@ -210,7 +210,7 @@ "type": "Identifier", "span": { "start": 126, - "end": 190, + "end": 133, "ctxt": 0 }, "value": "options", diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypeModifiers.json b/crates/swc_ecma_parser/tests/tsc/mappedTypeModifiers.json index 20d6b4a3c1b5..618f3e12d298 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypeModifiers.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypeModifiers.json @@ -7271,7 +7271,7 @@ "type": "Identifier", "span": { "start": 2055, - "end": 2070, + "end": 2056, "ctxt": 0 }, "value": "x", @@ -7516,7 +7516,7 @@ "type": "Identifier", "span": { "start": 2140, - "end": 2156, + "end": 2141, "ctxt": 0 }, "value": "x", @@ -7734,7 +7734,7 @@ "type": "Identifier", "span": { "start": 2219, - "end": 2235, + "end": 2220, "ctxt": 0 }, "value": "x", @@ -7970,7 +7970,7 @@ "type": "Identifier", "span": { "start": 2300, - "end": 2331, + "end": 2301, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypeRelationships.json b/crates/swc_ecma_parser/tests/tsc/mappedTypeRelationships.json index a4ec54a0f6e8..e10c7097dddb 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypeRelationships.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypeRelationships.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 66, - "end": 70, + "end": 67, "ctxt": 0 }, "value": "x", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 72, - "end": 82, + "end": 73, "ctxt": 0 }, "value": "k", @@ -245,7 +245,7 @@ "type": "Identifier", "span": { "start": 140, - "end": 144, + "end": 141, "ctxt": 0 }, "value": "x", @@ -291,7 +291,7 @@ "type": "Identifier", "span": { "start": 146, - "end": 150, + "end": 147, "ctxt": 0 }, "value": "k", @@ -499,7 +499,7 @@ "type": "Identifier", "span": { "start": 202, - "end": 206, + "end": 203, "ctxt": 0 }, "value": "x", @@ -545,7 +545,7 @@ "type": "Identifier", "span": { "start": 208, - "end": 212, + "end": 209, "ctxt": 0 }, "value": "y", @@ -591,7 +591,7 @@ "type": "Identifier", "span": { "start": 214, - "end": 224, + "end": 215, "ctxt": 0 }, "value": "k", @@ -933,7 +933,7 @@ "type": "Identifier", "span": { "start": 322, - "end": 326, + "end": 323, "ctxt": 0 }, "value": "x", @@ -979,7 +979,7 @@ "type": "Identifier", "span": { "start": 328, - "end": 332, + "end": 329, "ctxt": 0 }, "value": "y", @@ -1025,7 +1025,7 @@ "type": "Identifier", "span": { "start": 334, - "end": 338, + "end": 335, "ctxt": 0 }, "value": "k", @@ -1408,7 +1408,7 @@ "type": "Identifier", "span": { "start": 417, - "end": 421, + "end": 418, "ctxt": 0 }, "value": "x", @@ -1454,7 +1454,7 @@ "type": "Identifier", "span": { "start": 423, - "end": 427, + "end": 424, "ctxt": 0 }, "value": "y", @@ -1500,7 +1500,7 @@ "type": "Identifier", "span": { "start": 429, - "end": 439, + "end": 430, "ctxt": 0 }, "value": "k", @@ -1842,7 +1842,7 @@ "type": "Identifier", "span": { "start": 547, - "end": 551, + "end": 548, "ctxt": 0 }, "value": "x", @@ -1888,7 +1888,7 @@ "type": "Identifier", "span": { "start": 553, - "end": 557, + "end": 554, "ctxt": 0 }, "value": "y", @@ -1934,7 +1934,7 @@ "type": "Identifier", "span": { "start": 559, - "end": 563, + "end": 560, "ctxt": 0 }, "value": "k", @@ -2317,7 +2317,7 @@ "type": "Identifier", "span": { "start": 640, - "end": 644, + "end": 641, "ctxt": 0 }, "value": "x", @@ -2363,7 +2363,7 @@ "type": "Identifier", "span": { "start": 646, - "end": 659, + "end": 647, "ctxt": 0 }, "value": "y", @@ -2437,7 +2437,7 @@ "type": "Identifier", "span": { "start": 661, - "end": 671, + "end": 662, "ctxt": 0 }, "value": "k", @@ -2738,7 +2738,7 @@ "type": "Identifier", "span": { "start": 757, - "end": 761, + "end": 758, "ctxt": 0 }, "value": "x", @@ -2784,7 +2784,7 @@ "type": "Identifier", "span": { "start": 763, - "end": 776, + "end": 764, "ctxt": 0 }, "value": "y", @@ -2858,7 +2858,7 @@ "type": "Identifier", "span": { "start": 778, - "end": 782, + "end": 779, "ctxt": 0 }, "value": "k", @@ -3200,7 +3200,7 @@ "type": "Identifier", "span": { "start": 862, - "end": 866, + "end": 863, "ctxt": 0 }, "value": "x", @@ -3246,7 +3246,7 @@ "type": "Identifier", "span": { "start": 868, - "end": 881, + "end": 869, "ctxt": 0 }, "value": "y", @@ -3320,7 +3320,7 @@ "type": "Identifier", "span": { "start": 883, - "end": 893, + "end": 884, "ctxt": 0 }, "value": "k", @@ -3662,7 +3662,7 @@ "type": "Identifier", "span": { "start": 1002, - "end": 1006, + "end": 1003, "ctxt": 0 }, "value": "x", @@ -3708,7 +3708,7 @@ "type": "Identifier", "span": { "start": 1008, - "end": 1021, + "end": 1009, "ctxt": 0 }, "value": "y", @@ -3782,7 +3782,7 @@ "type": "Identifier", "span": { "start": 1023, - "end": 1027, + "end": 1024, "ctxt": 0 }, "value": "k", @@ -4165,7 +4165,7 @@ "type": "Identifier", "span": { "start": 1104, - "end": 1108, + "end": 1105, "ctxt": 0 }, "value": "x", @@ -4211,7 +4211,7 @@ "type": "Identifier", "span": { "start": 1110, - "end": 1124, + "end": 1111, "ctxt": 0 }, "value": "y", @@ -4285,7 +4285,7 @@ "type": "Identifier", "span": { "start": 1126, - "end": 1136, + "end": 1127, "ctxt": 0 }, "value": "k", @@ -4586,7 +4586,7 @@ "type": "Identifier", "span": { "start": 1222, - "end": 1226, + "end": 1223, "ctxt": 0 }, "value": "x", @@ -4632,7 +4632,7 @@ "type": "Identifier", "span": { "start": 1228, - "end": 1242, + "end": 1229, "ctxt": 0 }, "value": "y", @@ -4706,7 +4706,7 @@ "type": "Identifier", "span": { "start": 1244, - "end": 1248, + "end": 1245, "ctxt": 0 }, "value": "k", @@ -5048,7 +5048,7 @@ "type": "Identifier", "span": { "start": 1328, - "end": 1332, + "end": 1329, "ctxt": 0 }, "value": "x", @@ -5094,7 +5094,7 @@ "type": "Identifier", "span": { "start": 1334, - "end": 1348, + "end": 1335, "ctxt": 0 }, "value": "y", @@ -5168,7 +5168,7 @@ "type": "Identifier", "span": { "start": 1350, - "end": 1360, + "end": 1351, "ctxt": 0 }, "value": "k", @@ -5510,7 +5510,7 @@ "type": "Identifier", "span": { "start": 1459, - "end": 1463, + "end": 1460, "ctxt": 0 }, "value": "x", @@ -5556,7 +5556,7 @@ "type": "Identifier", "span": { "start": 1465, - "end": 1479, + "end": 1466, "ctxt": 0 }, "value": "y", @@ -5630,7 +5630,7 @@ "type": "Identifier", "span": { "start": 1481, - "end": 1485, + "end": 1482, "ctxt": 0 }, "value": "k", @@ -6125,7 +6125,7 @@ "type": "Identifier", "span": { "start": 1592, - "end": 1596, + "end": 1593, "ctxt": 0 }, "value": "x", @@ -6171,7 +6171,7 @@ "type": "Identifier", "span": { "start": 1598, - "end": 1611, + "end": 1599, "ctxt": 0 }, "value": "y", @@ -6389,7 +6389,7 @@ "type": "Identifier", "span": { "start": 1680, - "end": 1697, + "end": 1681, "ctxt": 0 }, "value": "x", @@ -6463,7 +6463,7 @@ "type": "Identifier", "span": { "start": 1699, - "end": 1712, + "end": 1700, "ctxt": 0 }, "value": "y", @@ -6699,7 +6699,7 @@ "type": "Identifier", "span": { "start": 1767, - "end": 1771, + "end": 1768, "ctxt": 0 }, "value": "x", @@ -6745,7 +6745,7 @@ "type": "Identifier", "span": { "start": 1773, - "end": 1787, + "end": 1774, "ctxt": 0 }, "value": "y", @@ -6963,7 +6963,7 @@ "type": "Identifier", "span": { "start": 1846, - "end": 1864, + "end": 1847, "ctxt": 0 }, "value": "x", @@ -7037,7 +7037,7 @@ "type": "Identifier", "span": { "start": 1866, - "end": 1880, + "end": 1867, "ctxt": 0 }, "value": "y", @@ -7440,7 +7440,7 @@ "type": "Identifier", "span": { "start": 2029, - "end": 2035, + "end": 2032, "ctxt": 0 }, "value": "obj", @@ -7486,7 +7486,7 @@ "type": "Identifier", "span": { "start": 2037, - "end": 2049, + "end": 2040, "ctxt": 0 }, "value": "key", @@ -7783,7 +7783,7 @@ "type": "Identifier", "span": { "start": 2164, - "end": 2170, + "end": 2167, "ctxt": 0 }, "value": "obj", @@ -7829,7 +7829,7 @@ "type": "Identifier", "span": { "start": 2172, - "end": 2178, + "end": 2175, "ctxt": 0 }, "value": "key", @@ -8487,7 +8487,7 @@ "type": "Identifier", "span": { "start": 2346, - "end": 2354, + "end": 2347, "ctxt": 0 }, "value": "x", @@ -8561,7 +8561,7 @@ "type": "Identifier", "span": { "start": 2356, - "end": 2364, + "end": 2357, "ctxt": 0 }, "value": "y", @@ -8939,7 +8939,7 @@ "type": "Identifier", "span": { "start": 2459, - "end": 2473, + "end": 2460, "ctxt": 0 }, "value": "x", @@ -9013,7 +9013,7 @@ "type": "Identifier", "span": { "start": 2475, - "end": 2488, + "end": 2476, "ctxt": 0 }, "value": "y", @@ -9231,7 +9231,7 @@ "type": "Identifier", "span": { "start": 2543, - "end": 2557, + "end": 2544, "ctxt": 0 }, "value": "x", @@ -9305,7 +9305,7 @@ "type": "Identifier", "span": { "start": 2559, - "end": 2573, + "end": 2560, "ctxt": 0 }, "value": "y", @@ -9523,7 +9523,7 @@ "type": "Identifier", "span": { "start": 2618, - "end": 2645, + "end": 2619, "ctxt": 0 }, "value": "x", @@ -9658,7 +9658,7 @@ "type": "Identifier", "span": { "start": 2647, - "end": 2674, + "end": 2648, "ctxt": 0 }, "value": "y", @@ -9937,7 +9937,7 @@ "type": "Identifier", "span": { "start": 2732, - "end": 2759, + "end": 2733, "ctxt": 0 }, "value": "x", @@ -10072,7 +10072,7 @@ "type": "Identifier", "span": { "start": 2761, - "end": 2788, + "end": 2762, "ctxt": 0 }, "value": "y", @@ -10392,7 +10392,7 @@ "type": "Identifier", "span": { "start": 2856, - "end": 2883, + "end": 2857, "ctxt": 0 }, "value": "x", @@ -10527,7 +10527,7 @@ "type": "Identifier", "span": { "start": 2885, - "end": 2912, + "end": 2886, "ctxt": 0 }, "value": "y", @@ -10847,7 +10847,7 @@ "type": "Identifier", "span": { "start": 2986, - "end": 3007, + "end": 2987, "ctxt": 0 }, "value": "x", @@ -10973,7 +10973,7 @@ "type": "Identifier", "span": { "start": 3009, - "end": 3036, + "end": 3010, "ctxt": 0 }, "value": "y", @@ -11302,7 +11302,7 @@ "type": "Identifier", "span": { "start": 3123, - "end": 3144, + "end": 3124, "ctxt": 0 }, "value": "x", @@ -11428,7 +11428,7 @@ "type": "Identifier", "span": { "start": 3146, - "end": 3173, + "end": 3147, "ctxt": 0 }, "value": "y", @@ -11798,7 +11798,7 @@ "type": "Identifier", "span": { "start": 3260, - "end": 3281, + "end": 3261, "ctxt": 0 }, "value": "x", @@ -11924,7 +11924,7 @@ "type": "Identifier", "span": { "start": 3283, - "end": 3310, + "end": 3284, "ctxt": 0 }, "value": "y", @@ -12294,7 +12294,7 @@ "type": "Identifier", "span": { "start": 3397, - "end": 3418, + "end": 3398, "ctxt": 0 }, "value": "x", @@ -12420,7 +12420,7 @@ "type": "Identifier", "span": { "start": 3420, - "end": 3441, + "end": 3421, "ctxt": 0 }, "value": "y", @@ -12781,7 +12781,7 @@ "type": "Identifier", "span": { "start": 3496, - "end": 3500, + "end": 3497, "ctxt": 0 }, "value": "t", @@ -12967,7 +12967,7 @@ "type": "Identifier", "span": { "start": 3568, - "end": 3572, + "end": 3569, "ctxt": 0 }, "value": "t", @@ -13013,7 +13013,7 @@ "type": "Identifier", "span": { "start": 3574, - "end": 3578, + "end": 3575, "ctxt": 0 }, "value": "k", @@ -13303,7 +13303,7 @@ "type": "Identifier", "span": { "start": 3677, - "end": 3681, + "end": 3678, "ctxt": 0 }, "value": "t", @@ -13349,7 +13349,7 @@ "type": "Identifier", "span": { "start": 3683, - "end": 3689, + "end": 3685, "ctxt": 0 }, "value": "k1", @@ -13395,7 +13395,7 @@ "type": "Identifier", "span": { "start": 3691, - "end": 3697, + "end": 3693, "ctxt": 0 }, "value": "k2", diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypeWithAny.json b/crates/swc_ecma_parser/tests/tsc/mappedTypeWithAny.json index f0966dcaf010..dcc480a9c5ed 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypeWithAny.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypeWithAny.json @@ -1610,7 +1610,7 @@ "type": "Identifier", "span": { "start": 1458, - "end": 1481, + "end": 1466, "ctxt": 0 }, "value": "arrayish", @@ -1674,7 +1674,7 @@ "type": "Identifier", "span": { "start": 1483, - "end": 1508, + "end": 1492, "ctxt": 0 }, "value": "objectish", @@ -1738,7 +1738,7 @@ "type": "Identifier", "span": { "start": 1510, - "end": 1549, + "end": 1526, "ctxt": 0 }, "value": "indirectArrayish", @@ -2009,7 +2009,7 @@ "type": "Identifier", "span": { "start": 1703, - "end": 1709, + "end": 1706, "ctxt": 0 }, "value": "arr", @@ -2332,7 +2332,7 @@ "type": "Identifier", "span": { "start": 1861, - "end": 1867, + "end": 1864, "ctxt": 0 }, "value": "arr", diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypes2.json b/crates/swc_ecma_parser/tests/tsc/mappedTypes2.json index e4030e73d529..5588790eb023 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypes2.json @@ -1212,7 +1212,7 @@ "type": "Identifier", "span": { "start": 393, - "end": 401, + "end": 398, "ctxt": 0 }, "value": "value", @@ -1670,7 +1670,7 @@ "type": "Identifier", "span": { "start": 574, - "end": 580, + "end": 577, "ctxt": 0 }, "value": "obj", @@ -1716,7 +1716,7 @@ "type": "Identifier", "span": { "start": 582, - "end": 599, + "end": 587, "ctxt": 0 }, "value": "props", @@ -1865,7 +1865,7 @@ "type": "Identifier", "span": { "start": 635, - "end": 641, + "end": 638, "ctxt": 0 }, "value": "obj", @@ -2024,7 +2024,7 @@ "type": "Identifier", "span": { "start": 701, - "end": 707, + "end": 704, "ctxt": 0 }, "value": "obj", @@ -2320,7 +2320,7 @@ "type": "Identifier", "span": { "start": 787, - "end": 804, + "end": 790, "ctxt": 0 }, "value": "obj", @@ -2413,7 +2413,7 @@ "type": "Identifier", "span": { "start": 806, - "end": 820, + "end": 807, "ctxt": 0 }, "value": "f", @@ -2437,7 +2437,7 @@ "type": "Identifier", "span": { "start": 810, - "end": 814, + "end": 811, "ctxt": 0 }, "value": "x", @@ -2701,7 +2701,7 @@ "type": "Identifier", "span": { "start": 865, - "end": 871, + "end": 868, "ctxt": 0 }, "value": "obj", @@ -3588,7 +3588,7 @@ "type": "Identifier", "span": { "start": 1302, - "end": 1311, + "end": 1304, "ctxt": 0 }, "value": "s1", @@ -3634,7 +3634,7 @@ "type": "Identifier", "span": { "start": 1313, - "end": 1322, + "end": 1315, "ctxt": 0 }, "value": "s2", @@ -3895,7 +3895,7 @@ "type": "Identifier", "span": { "start": 1420, - "end": 1432, + "end": 1425, "ctxt": 0 }, "value": "shape", @@ -4189,7 +4189,7 @@ "type": "Identifier", "span": { "start": 1547, - "end": 1559, + "end": 1552, "ctxt": 0 }, "value": "shape", @@ -4512,7 +4512,7 @@ "type": "Identifier", "span": { "start": 1680, - "end": 1692, + "end": 1685, "ctxt": 0 }, "value": "shape", @@ -4954,7 +4954,7 @@ "type": "Identifier", "span": { "start": 1972, - "end": 1984, + "end": 1977, "ctxt": 0 }, "value": "shape", @@ -5268,7 +5268,7 @@ "type": "Identifier", "span": { "start": 2083, - "end": 2109, + "end": 2088, "ctxt": 0 }, "value": "shape", diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypes3.json b/crates/swc_ecma_parser/tests/tsc/mappedTypes3.json index 6d14b5f5f510..b1403c92a89b 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypes3.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypes3.json @@ -334,7 +334,7 @@ "type": "Identifier", "span": { "start": 138, - "end": 144, + "end": 141, "ctxt": 0 }, "value": "obj", @@ -493,7 +493,7 @@ "type": "Identifier", "span": { "start": 189, - "end": 205, + "end": 192, "ctxt": 0 }, "value": "obj", @@ -934,7 +934,7 @@ "type": "Identifier", "span": { "start": 372, - "end": 380, + "end": 373, "ctxt": 0 }, "value": "b", @@ -1238,7 +1238,7 @@ "type": "Identifier", "span": { "start": 497, - "end": 516, + "end": 499, "ctxt": 0 }, "value": "bb", @@ -1534,7 +1534,7 @@ "type": "Identifier", "span": { "start": 638, - "end": 655, + "end": 640, "ctxt": 0 }, "value": "bb", diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypes4.json b/crates/swc_ecma_parser/tests/tsc/mappedTypes4.json index 51083e801732..da99b535245c 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypes4.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypes4.json @@ -281,7 +281,7 @@ "type": "Identifier", "span": { "start": 146, - "end": 152, + "end": 149, "ctxt": 0 }, "value": "obj", @@ -1041,7 +1041,7 @@ "type": "Identifier", "span": { "start": 464, - "end": 488, + "end": 465, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypes5.json b/crates/swc_ecma_parser/tests/tsc/mappedTypes5.json index d2cbad217d9c..6007ffe2d639 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypes5.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypes5.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 33, - "end": 46, + "end": 34, "ctxt": 0 }, "value": "p", @@ -106,7 +106,7 @@ "type": "Identifier", "span": { "start": 48, - "end": 62, + "end": 49, "ctxt": 0 }, "value": "r", @@ -180,7 +180,7 @@ "type": "Identifier", "span": { "start": 64, - "end": 88, + "end": 66, "ctxt": 0 }, "value": "pr", @@ -282,7 +282,7 @@ "type": "Identifier", "span": { "start": 90, - "end": 114, + "end": 92, "ctxt": 0 }, "value": "rp", diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypes6.json b/crates/swc_ecma_parser/tests/tsc/mappedTypes6.json index 664423404a7c..9487a35f128b 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypes6.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypes6.json @@ -2592,7 +2592,7 @@ "type": "Identifier", "span": { "start": 836, - "end": 850, + "end": 837, "ctxt": 0 }, "value": "x", @@ -2666,7 +2666,7 @@ "type": "Identifier", "span": { "start": 852, - "end": 856, + "end": 853, "ctxt": 0 }, "value": "y", @@ -2712,7 +2712,7 @@ "type": "Identifier", "span": { "start": 858, - "end": 871, + "end": 859, "ctxt": 0 }, "value": "z", @@ -3384,7 +3384,7 @@ "type": "Identifier", "span": { "start": 1086, - "end": 1103, + "end": 1087, "ctxt": 0 }, "value": "w", @@ -3458,7 +3458,7 @@ "type": "Identifier", "span": { "start": 1105, - "end": 1119, + "end": 1106, "ctxt": 0 }, "value": "x", @@ -3532,7 +3532,7 @@ "type": "Identifier", "span": { "start": 1121, - "end": 1125, + "end": 1122, "ctxt": 0 }, "value": "y", @@ -3578,7 +3578,7 @@ "type": "Identifier", "span": { "start": 1127, - "end": 1140, + "end": 1128, "ctxt": 0 }, "value": "z", @@ -4328,7 +4328,7 @@ "type": "Identifier", "span": { "start": 1399, - "end": 1416, + "end": 1400, "ctxt": 0 }, "value": "w", @@ -4402,7 +4402,7 @@ "type": "Identifier", "span": { "start": 1418, - "end": 1432, + "end": 1419, "ctxt": 0 }, "value": "x", @@ -4476,7 +4476,7 @@ "type": "Identifier", "span": { "start": 1434, - "end": 1438, + "end": 1435, "ctxt": 0 }, "value": "y", @@ -4522,7 +4522,7 @@ "type": "Identifier", "span": { "start": 1440, - "end": 1453, + "end": 1441, "ctxt": 0 }, "value": "z", @@ -4972,7 +4972,7 @@ "type": "Identifier", "span": { "start": 1615, - "end": 1629, + "end": 1616, "ctxt": 0 }, "value": "x", @@ -5046,7 +5046,7 @@ "type": "Identifier", "span": { "start": 1631, - "end": 1635, + "end": 1632, "ctxt": 0 }, "value": "y", @@ -5092,7 +5092,7 @@ "type": "Identifier", "span": { "start": 1637, - "end": 1652, + "end": 1638, "ctxt": 0 }, "value": "z", diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypesAndObjects.json b/crates/swc_ecma_parser/tests/tsc/mappedTypesAndObjects.json index 883733b3a814..a87f10982da1 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypesAndObjects.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypesAndObjects.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 66, - "end": 79, + "end": 67, "ctxt": 0 }, "value": "x", @@ -106,7 +106,7 @@ "type": "Identifier", "span": { "start": 81, - "end": 95, + "end": 82, "ctxt": 0 }, "value": "y", @@ -373,7 +373,7 @@ "type": "Identifier", "span": { "start": 160, - "end": 173, + "end": 161, "ctxt": 0 }, "value": "x", @@ -447,7 +447,7 @@ "type": "Identifier", "span": { "start": 175, - "end": 189, + "end": 176, "ctxt": 0 }, "value": "y", @@ -771,7 +771,7 @@ "type": "Identifier", "span": { "start": 272, - "end": 285, + "end": 273, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypesArraysTuples.json b/crates/swc_ecma_parser/tests/tsc/mappedTypesArraysTuples.json index dd028656c564..53b5661f86e1 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypesArraysTuples.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypesArraysTuples.json @@ -2950,7 +2950,7 @@ "type": "Identifier", "span": { "start": 1292, - "end": 1306, + "end": 1293, "ctxt": 0 }, "value": "x", @@ -3792,7 +3792,7 @@ "type": "Identifier", "span": { "start": 1573, - "end": 1586, + "end": 1574, "ctxt": 0 }, "value": "x", @@ -5120,7 +5120,7 @@ "type": "Identifier", "span": { "start": 2047, - "end": 2056, + "end": 2048, "ctxt": 0 }, "value": "a", @@ -5156,7 +5156,7 @@ "type": "Identifier", "span": { "start": 2058, - "end": 2076, + "end": 2059, "ctxt": 0 }, "value": "b", @@ -5220,7 +5220,7 @@ "type": "Identifier", "span": { "start": 2078, - "end": 2089, + "end": 2079, "ctxt": 0 }, "value": "c", @@ -5264,7 +5264,7 @@ "type": "Identifier", "span": { "start": 2091, - "end": 2111, + "end": 2092, "ctxt": 0 }, "value": "d", @@ -5714,7 +5714,7 @@ "type": "Identifier", "span": { "start": 2249, - "end": 2263, + "end": 2250, "ctxt": 0 }, "value": "a", @@ -6846,7 +6846,7 @@ "type": "Identifier", "span": { "start": 2722, - "end": 2732, + "end": 2725, "ctxt": 0 }, "value": "arr", @@ -6933,7 +6933,7 @@ "type": "Identifier", "span": { "start": 2784, - "end": 2790, + "end": 2787, "ctxt": 0 }, "value": "arr", @@ -7108,7 +7108,7 @@ "type": "Identifier", "span": { "start": 2848, - "end": 2854, + "end": 2851, "ctxt": 0 }, "value": "arr", diff --git a/crates/swc_ecma_parser/tests/tsc/memberFunctionOverloadMixingStaticAndInstance.json b/crates/swc_ecma_parser/tests/tsc/memberFunctionOverloadMixingStaticAndInstance.json index bc3405003168..4e94dc8fb131 100644 --- a/crates/swc_ecma_parser/tests/tsc/memberFunctionOverloadMixingStaticAndInstance.json +++ b/crates/swc_ecma_parser/tests/tsc/memberFunctionOverloadMixingStaticAndInstance.json @@ -263,7 +263,7 @@ "type": "Identifier", "span": { "start": 128, - "end": 132, + "end": 129, "ctxt": 0 }, "value": "x", @@ -348,7 +348,7 @@ "type": "Identifier", "span": { "start": 150, - "end": 159, + "end": 151, "ctxt": 0 }, "value": "x", @@ -482,7 +482,7 @@ "type": "Identifier", "span": { "start": 202, - "end": 211, + "end": 203, "ctxt": 0 }, "value": "x", @@ -557,7 +557,7 @@ "type": "Identifier", "span": { "start": 222, - "end": 226, + "end": 223, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/memberFunctionsWithPrivateOverloads.json b/crates/swc_ecma_parser/tests/tsc/memberFunctionsWithPrivateOverloads.json index d0f26b0a3710..7ed41d9b69d6 100644 --- a/crates/swc_ecma_parser/tests/tsc/memberFunctionsWithPrivateOverloads.json +++ b/crates/swc_ecma_parser/tests/tsc/memberFunctionsWithPrivateOverloads.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 27, - "end": 36, + "end": 28, "ctxt": 0 }, "value": "x", @@ -132,7 +132,7 @@ "type": "Identifier", "span": { "start": 55, - "end": 64, + "end": 56, "ctxt": 0 }, "value": "x", @@ -168,7 +168,7 @@ "type": "Identifier", "span": { "start": 66, - "end": 75, + "end": 67, "ctxt": 0 }, "value": "y", @@ -243,7 +243,7 @@ "type": "Identifier", "span": { "start": 94, - "end": 100, + "end": 95, "ctxt": 0 }, "value": "x", @@ -279,7 +279,7 @@ "type": "Identifier", "span": { "start": 102, - "end": 109, + "end": 103, "ctxt": 0 }, "value": "y", @@ -362,7 +362,7 @@ "type": "Identifier", "span": { "start": 132, - "end": 139, + "end": 133, "ctxt": 0 }, "value": "x", @@ -446,7 +446,7 @@ "type": "Identifier", "span": { "start": 158, - "end": 167, + "end": 159, "ctxt": 0 }, "value": "x", @@ -521,7 +521,7 @@ "type": "Identifier", "span": { "start": 186, - "end": 195, + "end": 187, "ctxt": 0 }, "value": "x", @@ -557,7 +557,7 @@ "type": "Identifier", "span": { "start": 197, - "end": 206, + "end": 198, "ctxt": 0 }, "value": "y", @@ -632,7 +632,7 @@ "type": "Identifier", "span": { "start": 225, - "end": 231, + "end": 226, "ctxt": 0 }, "value": "x", @@ -668,7 +668,7 @@ "type": "Identifier", "span": { "start": 233, - "end": 240, + "end": 234, "ctxt": 0 }, "value": "y", @@ -751,7 +751,7 @@ "type": "Identifier", "span": { "start": 270, - "end": 279, + "end": 271, "ctxt": 0 }, "value": "x", @@ -826,7 +826,7 @@ "type": "Identifier", "span": { "start": 305, - "end": 314, + "end": 306, "ctxt": 0 }, "value": "x", @@ -862,7 +862,7 @@ "type": "Identifier", "span": { "start": 316, - "end": 325, + "end": 317, "ctxt": 0 }, "value": "y", @@ -937,7 +937,7 @@ "type": "Identifier", "span": { "start": 351, - "end": 357, + "end": 352, "ctxt": 0 }, "value": "x", @@ -973,7 +973,7 @@ "type": "Identifier", "span": { "start": 359, - "end": 366, + "end": 360, "ctxt": 0 }, "value": "y", @@ -1056,7 +1056,7 @@ "type": "Identifier", "span": { "start": 396, - "end": 403, + "end": 397, "ctxt": 0 }, "value": "x", @@ -1140,7 +1140,7 @@ "type": "Identifier", "span": { "start": 429, - "end": 438, + "end": 430, "ctxt": 0 }, "value": "x", @@ -1215,7 +1215,7 @@ "type": "Identifier", "span": { "start": 464, - "end": 473, + "end": 465, "ctxt": 0 }, "value": "x", @@ -1251,7 +1251,7 @@ "type": "Identifier", "span": { "start": 475, - "end": 484, + "end": 476, "ctxt": 0 }, "value": "y", @@ -1326,7 +1326,7 @@ "type": "Identifier", "span": { "start": 510, - "end": 516, + "end": 511, "ctxt": 0 }, "value": "x", @@ -1362,7 +1362,7 @@ "type": "Identifier", "span": { "start": 518, - "end": 525, + "end": 519, "ctxt": 0 }, "value": "y", @@ -1472,7 +1472,7 @@ "type": "Identifier", "span": { "start": 563, - "end": 572, + "end": 564, "ctxt": 0 }, "value": "x", @@ -1547,7 +1547,7 @@ "type": "Identifier", "span": { "start": 591, - "end": 595, + "end": 592, "ctxt": 0 }, "value": "x", @@ -1593,7 +1593,7 @@ "type": "Identifier", "span": { "start": 597, - "end": 601, + "end": 598, "ctxt": 0 }, "value": "y", @@ -1678,7 +1678,7 @@ "type": "Identifier", "span": { "start": 620, - "end": 626, + "end": 621, "ctxt": 0 }, "value": "x", @@ -1714,7 +1714,7 @@ "type": "Identifier", "span": { "start": 628, - "end": 635, + "end": 629, "ctxt": 0 }, "value": "y", @@ -1797,7 +1797,7 @@ "type": "Identifier", "span": { "start": 658, - "end": 665, + "end": 659, "ctxt": 0 }, "value": "x", @@ -1881,7 +1881,7 @@ "type": "Identifier", "span": { "start": 684, - "end": 693, + "end": 685, "ctxt": 0 }, "value": "x", @@ -1956,7 +1956,7 @@ "type": "Identifier", "span": { "start": 712, - "end": 716, + "end": 713, "ctxt": 0 }, "value": "x", @@ -2002,7 +2002,7 @@ "type": "Identifier", "span": { "start": 718, - "end": 722, + "end": 719, "ctxt": 0 }, "value": "y", @@ -2087,7 +2087,7 @@ "type": "Identifier", "span": { "start": 741, - "end": 747, + "end": 742, "ctxt": 0 }, "value": "x", @@ -2123,7 +2123,7 @@ "type": "Identifier", "span": { "start": 749, - "end": 756, + "end": 750, "ctxt": 0 }, "value": "y", @@ -2206,7 +2206,7 @@ "type": "Identifier", "span": { "start": 786, - "end": 795, + "end": 787, "ctxt": 0 }, "value": "x", @@ -2281,7 +2281,7 @@ "type": "Identifier", "span": { "start": 821, - "end": 830, + "end": 822, "ctxt": 0 }, "value": "x", @@ -2317,7 +2317,7 @@ "type": "Identifier", "span": { "start": 832, - "end": 841, + "end": 833, "ctxt": 0 }, "value": "y", @@ -2392,7 +2392,7 @@ "type": "Identifier", "span": { "start": 867, - "end": 873, + "end": 868, "ctxt": 0 }, "value": "x", @@ -2428,7 +2428,7 @@ "type": "Identifier", "span": { "start": 875, - "end": 882, + "end": 876, "ctxt": 0 }, "value": "y", @@ -2511,7 +2511,7 @@ "type": "Identifier", "span": { "start": 912, - "end": 919, + "end": 913, "ctxt": 0 }, "value": "x", @@ -2595,7 +2595,7 @@ "type": "Identifier", "span": { "start": 945, - "end": 954, + "end": 946, "ctxt": 0 }, "value": "x", @@ -2670,7 +2670,7 @@ "type": "Identifier", "span": { "start": 980, - "end": 989, + "end": 981, "ctxt": 0 }, "value": "x", @@ -2706,7 +2706,7 @@ "type": "Identifier", "span": { "start": 991, - "end": 1000, + "end": 992, "ctxt": 0 }, "value": "y", @@ -2781,7 +2781,7 @@ "type": "Identifier", "span": { "start": 1026, - "end": 1032, + "end": 1027, "ctxt": 0 }, "value": "x", @@ -2817,7 +2817,7 @@ "type": "Identifier", "span": { "start": 1034, - "end": 1041, + "end": 1035, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/memberFunctionsWithPublicOverloads.json b/crates/swc_ecma_parser/tests/tsc/memberFunctionsWithPublicOverloads.json index 82796cc8edaa..3bb914f55551 100644 --- a/crates/swc_ecma_parser/tests/tsc/memberFunctionsWithPublicOverloads.json +++ b/crates/swc_ecma_parser/tests/tsc/memberFunctionsWithPublicOverloads.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 26, - "end": 35, + "end": 27, "ctxt": 0 }, "value": "x", @@ -132,7 +132,7 @@ "type": "Identifier", "span": { "start": 53, - "end": 62, + "end": 54, "ctxt": 0 }, "value": "x", @@ -168,7 +168,7 @@ "type": "Identifier", "span": { "start": 64, - "end": 73, + "end": 65, "ctxt": 0 }, "value": "y", @@ -243,7 +243,7 @@ "type": "Identifier", "span": { "start": 91, - "end": 97, + "end": 92, "ctxt": 0 }, "value": "x", @@ -279,7 +279,7 @@ "type": "Identifier", "span": { "start": 99, - "end": 106, + "end": 100, "ctxt": 0 }, "value": "y", @@ -362,7 +362,7 @@ "type": "Identifier", "span": { "start": 128, - "end": 135, + "end": 129, "ctxt": 0 }, "value": "x", @@ -446,7 +446,7 @@ "type": "Identifier", "span": { "start": 153, - "end": 162, + "end": 154, "ctxt": 0 }, "value": "x", @@ -521,7 +521,7 @@ "type": "Identifier", "span": { "start": 180, - "end": 189, + "end": 181, "ctxt": 0 }, "value": "x", @@ -557,7 +557,7 @@ "type": "Identifier", "span": { "start": 191, - "end": 200, + "end": 192, "ctxt": 0 }, "value": "y", @@ -632,7 +632,7 @@ "type": "Identifier", "span": { "start": 218, - "end": 224, + "end": 219, "ctxt": 0 }, "value": "x", @@ -668,7 +668,7 @@ "type": "Identifier", "span": { "start": 226, - "end": 233, + "end": 227, "ctxt": 0 }, "value": "y", @@ -751,7 +751,7 @@ "type": "Identifier", "span": { "start": 262, - "end": 271, + "end": 263, "ctxt": 0 }, "value": "x", @@ -826,7 +826,7 @@ "type": "Identifier", "span": { "start": 296, - "end": 305, + "end": 297, "ctxt": 0 }, "value": "x", @@ -862,7 +862,7 @@ "type": "Identifier", "span": { "start": 307, - "end": 316, + "end": 308, "ctxt": 0 }, "value": "y", @@ -937,7 +937,7 @@ "type": "Identifier", "span": { "start": 341, - "end": 347, + "end": 342, "ctxt": 0 }, "value": "x", @@ -973,7 +973,7 @@ "type": "Identifier", "span": { "start": 349, - "end": 356, + "end": 350, "ctxt": 0 }, "value": "y", @@ -1056,7 +1056,7 @@ "type": "Identifier", "span": { "start": 385, - "end": 392, + "end": 386, "ctxt": 0 }, "value": "x", @@ -1140,7 +1140,7 @@ "type": "Identifier", "span": { "start": 417, - "end": 426, + "end": 418, "ctxt": 0 }, "value": "x", @@ -1215,7 +1215,7 @@ "type": "Identifier", "span": { "start": 451, - "end": 460, + "end": 452, "ctxt": 0 }, "value": "x", @@ -1251,7 +1251,7 @@ "type": "Identifier", "span": { "start": 462, - "end": 471, + "end": 463, "ctxt": 0 }, "value": "y", @@ -1326,7 +1326,7 @@ "type": "Identifier", "span": { "start": 496, - "end": 502, + "end": 497, "ctxt": 0 }, "value": "x", @@ -1362,7 +1362,7 @@ "type": "Identifier", "span": { "start": 504, - "end": 511, + "end": 505, "ctxt": 0 }, "value": "y", @@ -1472,7 +1472,7 @@ "type": "Identifier", "span": { "start": 548, - "end": 557, + "end": 549, "ctxt": 0 }, "value": "x", @@ -1547,7 +1547,7 @@ "type": "Identifier", "span": { "start": 575, - "end": 579, + "end": 576, "ctxt": 0 }, "value": "x", @@ -1593,7 +1593,7 @@ "type": "Identifier", "span": { "start": 581, - "end": 585, + "end": 582, "ctxt": 0 }, "value": "y", @@ -1678,7 +1678,7 @@ "type": "Identifier", "span": { "start": 603, - "end": 609, + "end": 604, "ctxt": 0 }, "value": "x", @@ -1714,7 +1714,7 @@ "type": "Identifier", "span": { "start": 611, - "end": 618, + "end": 612, "ctxt": 0 }, "value": "y", @@ -1797,7 +1797,7 @@ "type": "Identifier", "span": { "start": 640, - "end": 647, + "end": 641, "ctxt": 0 }, "value": "x", @@ -1881,7 +1881,7 @@ "type": "Identifier", "span": { "start": 665, - "end": 674, + "end": 666, "ctxt": 0 }, "value": "x", @@ -1956,7 +1956,7 @@ "type": "Identifier", "span": { "start": 692, - "end": 696, + "end": 693, "ctxt": 0 }, "value": "x", @@ -2002,7 +2002,7 @@ "type": "Identifier", "span": { "start": 698, - "end": 702, + "end": 699, "ctxt": 0 }, "value": "y", @@ -2087,7 +2087,7 @@ "type": "Identifier", "span": { "start": 720, - "end": 726, + "end": 721, "ctxt": 0 }, "value": "x", @@ -2123,7 +2123,7 @@ "type": "Identifier", "span": { "start": 728, - "end": 735, + "end": 729, "ctxt": 0 }, "value": "y", @@ -2206,7 +2206,7 @@ "type": "Identifier", "span": { "start": 764, - "end": 773, + "end": 765, "ctxt": 0 }, "value": "x", @@ -2281,7 +2281,7 @@ "type": "Identifier", "span": { "start": 798, - "end": 807, + "end": 799, "ctxt": 0 }, "value": "x", @@ -2317,7 +2317,7 @@ "type": "Identifier", "span": { "start": 809, - "end": 818, + "end": 810, "ctxt": 0 }, "value": "y", @@ -2392,7 +2392,7 @@ "type": "Identifier", "span": { "start": 843, - "end": 849, + "end": 844, "ctxt": 0 }, "value": "x", @@ -2428,7 +2428,7 @@ "type": "Identifier", "span": { "start": 851, - "end": 858, + "end": 852, "ctxt": 0 }, "value": "y", @@ -2511,7 +2511,7 @@ "type": "Identifier", "span": { "start": 887, - "end": 894, + "end": 888, "ctxt": 0 }, "value": "x", @@ -2595,7 +2595,7 @@ "type": "Identifier", "span": { "start": 919, - "end": 928, + "end": 920, "ctxt": 0 }, "value": "x", @@ -2670,7 +2670,7 @@ "type": "Identifier", "span": { "start": 953, - "end": 962, + "end": 954, "ctxt": 0 }, "value": "x", @@ -2706,7 +2706,7 @@ "type": "Identifier", "span": { "start": 964, - "end": 973, + "end": 965, "ctxt": 0 }, "value": "y", @@ -2781,7 +2781,7 @@ "type": "Identifier", "span": { "start": 998, - "end": 1004, + "end": 999, "ctxt": 0 }, "value": "x", @@ -2817,7 +2817,7 @@ "type": "Identifier", "span": { "start": 1006, - "end": 1013, + "end": 1007, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/memberFunctionsWithPublicPrivateOverloads.json b/crates/swc_ecma_parser/tests/tsc/memberFunctionsWithPublicPrivateOverloads.json index b85840adc7c1..919be311da68 100644 --- a/crates/swc_ecma_parser/tests/tsc/memberFunctionsWithPublicPrivateOverloads.json +++ b/crates/swc_ecma_parser/tests/tsc/memberFunctionsWithPublicPrivateOverloads.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 27, - "end": 36, + "end": 28, "ctxt": 0 }, "value": "x", @@ -132,7 +132,7 @@ "type": "Identifier", "span": { "start": 54, - "end": 63, + "end": 55, "ctxt": 0 }, "value": "x", @@ -168,7 +168,7 @@ "type": "Identifier", "span": { "start": 65, - "end": 74, + "end": 66, "ctxt": 0 }, "value": "y", @@ -243,7 +243,7 @@ "type": "Identifier", "span": { "start": 102, - "end": 108, + "end": 103, "ctxt": 0 }, "value": "x", @@ -279,7 +279,7 @@ "type": "Identifier", "span": { "start": 110, - "end": 117, + "end": 111, "ctxt": 0 }, "value": "y", @@ -362,7 +362,7 @@ "type": "Identifier", "span": { "start": 140, - "end": 147, + "end": 141, "ctxt": 0 }, "value": "x", @@ -446,7 +446,7 @@ "type": "Identifier", "span": { "start": 165, - "end": 174, + "end": 166, "ctxt": 0 }, "value": "x", @@ -521,7 +521,7 @@ "type": "Identifier", "span": { "start": 202, - "end": 211, + "end": 203, "ctxt": 0 }, "value": "x", @@ -557,7 +557,7 @@ "type": "Identifier", "span": { "start": 213, - "end": 222, + "end": 214, "ctxt": 0 }, "value": "y", @@ -632,7 +632,7 @@ "type": "Identifier", "span": { "start": 241, - "end": 247, + "end": 242, "ctxt": 0 }, "value": "x", @@ -668,7 +668,7 @@ "type": "Identifier", "span": { "start": 249, - "end": 256, + "end": 250, "ctxt": 0 }, "value": "y", @@ -751,7 +751,7 @@ "type": "Identifier", "span": { "start": 286, - "end": 295, + "end": 287, "ctxt": 0 }, "value": "x", @@ -826,7 +826,7 @@ "type": "Identifier", "span": { "start": 320, - "end": 329, + "end": 321, "ctxt": 0 }, "value": "x", @@ -862,7 +862,7 @@ "type": "Identifier", "span": { "start": 331, - "end": 340, + "end": 332, "ctxt": 0 }, "value": "y", @@ -937,7 +937,7 @@ "type": "Identifier", "span": { "start": 375, - "end": 381, + "end": 376, "ctxt": 0 }, "value": "x", @@ -973,7 +973,7 @@ "type": "Identifier", "span": { "start": 383, - "end": 390, + "end": 384, "ctxt": 0 }, "value": "y", @@ -1056,7 +1056,7 @@ "type": "Identifier", "span": { "start": 415, - "end": 424, + "end": 416, "ctxt": 0 }, "value": "x", @@ -1131,7 +1131,7 @@ "type": "Identifier", "span": { "start": 454, - "end": 463, + "end": 455, "ctxt": 0 }, "value": "x", @@ -1167,7 +1167,7 @@ "type": "Identifier", "span": { "start": 465, - "end": 474, + "end": 466, "ctxt": 0 }, "value": "y", @@ -1242,7 +1242,7 @@ "type": "Identifier", "span": { "start": 502, - "end": 508, + "end": 503, "ctxt": 0 }, "value": "x", @@ -1278,7 +1278,7 @@ "type": "Identifier", "span": { "start": 510, - "end": 517, + "end": 511, "ctxt": 0 }, "value": "y", @@ -1361,7 +1361,7 @@ "type": "Identifier", "span": { "start": 547, - "end": 554, + "end": 548, "ctxt": 0 }, "value": "x", @@ -1445,7 +1445,7 @@ "type": "Identifier", "span": { "start": 579, - "end": 588, + "end": 580, "ctxt": 0 }, "value": "x", @@ -1520,7 +1520,7 @@ "type": "Identifier", "span": { "start": 623, - "end": 632, + "end": 624, "ctxt": 0 }, "value": "x", @@ -1556,7 +1556,7 @@ "type": "Identifier", "span": { "start": 634, - "end": 643, + "end": 635, "ctxt": 0 }, "value": "y", @@ -1631,7 +1631,7 @@ "type": "Identifier", "span": { "start": 669, - "end": 675, + "end": 670, "ctxt": 0 }, "value": "x", @@ -1667,7 +1667,7 @@ "type": "Identifier", "span": { "start": 677, - "end": 684, + "end": 678, "ctxt": 0 }, "value": "y", @@ -1750,7 +1750,7 @@ "type": "Identifier", "span": { "start": 716, - "end": 723, + "end": 717, "ctxt": 0 }, "value": "x", @@ -1834,7 +1834,7 @@ "type": "Identifier", "span": { "start": 748, - "end": 757, + "end": 749, "ctxt": 0 }, "value": "x", @@ -1909,7 +1909,7 @@ "type": "Identifier", "span": { "start": 794, - "end": 803, + "end": 795, "ctxt": 0 }, "value": "x", @@ -1945,7 +1945,7 @@ "type": "Identifier", "span": { "start": 805, - "end": 814, + "end": 806, "ctxt": 0 }, "value": "y", @@ -2020,7 +2020,7 @@ "type": "Identifier", "span": { "start": 842, - "end": 848, + "end": 843, "ctxt": 0 }, "value": "x", @@ -2056,7 +2056,7 @@ "type": "Identifier", "span": { "start": 850, - "end": 857, + "end": 851, "ctxt": 0 }, "value": "y", @@ -2166,7 +2166,7 @@ "type": "Identifier", "span": { "start": 895, - "end": 904, + "end": 896, "ctxt": 0 }, "value": "x", @@ -2241,7 +2241,7 @@ "type": "Identifier", "span": { "start": 923, - "end": 927, + "end": 924, "ctxt": 0 }, "value": "x", @@ -2287,7 +2287,7 @@ "type": "Identifier", "span": { "start": 929, - "end": 933, + "end": 930, "ctxt": 0 }, "value": "y", @@ -2372,7 +2372,7 @@ "type": "Identifier", "span": { "start": 961, - "end": 967, + "end": 962, "ctxt": 0 }, "value": "x", @@ -2408,7 +2408,7 @@ "type": "Identifier", "span": { "start": 969, - "end": 976, + "end": 970, "ctxt": 0 }, "value": "y", @@ -2491,7 +2491,7 @@ "type": "Identifier", "span": { "start": 999, - "end": 1006, + "end": 1000, "ctxt": 0 }, "value": "x", @@ -2575,7 +2575,7 @@ "type": "Identifier", "span": { "start": 1024, - "end": 1033, + "end": 1025, "ctxt": 0 }, "value": "x", @@ -2650,7 +2650,7 @@ "type": "Identifier", "span": { "start": 1061, - "end": 1065, + "end": 1062, "ctxt": 0 }, "value": "x", @@ -2696,7 +2696,7 @@ "type": "Identifier", "span": { "start": 1067, - "end": 1071, + "end": 1068, "ctxt": 0 }, "value": "y", @@ -2781,7 +2781,7 @@ "type": "Identifier", "span": { "start": 1090, - "end": 1096, + "end": 1091, "ctxt": 0 }, "value": "x", @@ -2817,7 +2817,7 @@ "type": "Identifier", "span": { "start": 1098, - "end": 1105, + "end": 1099, "ctxt": 0 }, "value": "y", @@ -2900,7 +2900,7 @@ "type": "Identifier", "span": { "start": 1128, - "end": 1137, + "end": 1129, "ctxt": 0 }, "value": "x", @@ -2975,7 +2975,7 @@ "type": "Identifier", "span": { "start": 1159, - "end": 1168, + "end": 1160, "ctxt": 0 }, "value": "x", @@ -3011,7 +3011,7 @@ "type": "Identifier", "span": { "start": 1170, - "end": 1179, + "end": 1171, "ctxt": 0 }, "value": "y", @@ -3086,7 +3086,7 @@ "type": "Identifier", "span": { "start": 1207, - "end": 1213, + "end": 1208, "ctxt": 0 }, "value": "x", @@ -3122,7 +3122,7 @@ "type": "Identifier", "span": { "start": 1215, - "end": 1222, + "end": 1216, "ctxt": 0 }, "value": "y", @@ -3205,7 +3205,7 @@ "type": "Identifier", "span": { "start": 1252, - "end": 1261, + "end": 1253, "ctxt": 0 }, "value": "x", @@ -3280,7 +3280,7 @@ "type": "Identifier", "span": { "start": 1286, - "end": 1295, + "end": 1287, "ctxt": 0 }, "value": "x", @@ -3316,7 +3316,7 @@ "type": "Identifier", "span": { "start": 1297, - "end": 1306, + "end": 1298, "ctxt": 0 }, "value": "y", @@ -3391,7 +3391,7 @@ "type": "Identifier", "span": { "start": 1341, - "end": 1347, + "end": 1342, "ctxt": 0 }, "value": "x", @@ -3427,7 +3427,7 @@ "type": "Identifier", "span": { "start": 1349, - "end": 1356, + "end": 1350, "ctxt": 0 }, "value": "y", @@ -3510,7 +3510,7 @@ "type": "Identifier", "span": { "start": 1386, - "end": 1393, + "end": 1387, "ctxt": 0 }, "value": "x", @@ -3594,7 +3594,7 @@ "type": "Identifier", "span": { "start": 1418, - "end": 1427, + "end": 1419, "ctxt": 0 }, "value": "x", @@ -3669,7 +3669,7 @@ "type": "Identifier", "span": { "start": 1462, - "end": 1471, + "end": 1463, "ctxt": 0 }, "value": "x", @@ -3705,7 +3705,7 @@ "type": "Identifier", "span": { "start": 1473, - "end": 1482, + "end": 1474, "ctxt": 0 }, "value": "y", @@ -3780,7 +3780,7 @@ "type": "Identifier", "span": { "start": 1508, - "end": 1514, + "end": 1509, "ctxt": 0 }, "value": "x", @@ -3816,7 +3816,7 @@ "type": "Identifier", "span": { "start": 1516, - "end": 1523, + "end": 1517, "ctxt": 0 }, "value": "y", @@ -3899,7 +3899,7 @@ "type": "Identifier", "span": { "start": 1552, - "end": 1561, + "end": 1553, "ctxt": 0 }, "value": "x", @@ -3974,7 +3974,7 @@ "type": "Identifier", "span": { "start": 1598, - "end": 1607, + "end": 1599, "ctxt": 0 }, "value": "x", @@ -4010,7 +4010,7 @@ "type": "Identifier", "span": { "start": 1609, - "end": 1618, + "end": 1610, "ctxt": 0 }, "value": "y", @@ -4085,7 +4085,7 @@ "type": "Identifier", "span": { "start": 1646, - "end": 1652, + "end": 1647, "ctxt": 0 }, "value": "x", @@ -4121,7 +4121,7 @@ "type": "Identifier", "span": { "start": 1654, - "end": 1661, + "end": 1655, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/methodSignaturesWithOverloads.json b/crates/swc_ecma_parser/tests/tsc/methodSignaturesWithOverloads.json index 9ffac7295f59..c3f2e2b6e9cb 100644 --- a/crates/swc_ecma_parser/tests/tsc/methodSignaturesWithOverloads.json +++ b/crates/swc_ecma_parser/tests/tsc/methodSignaturesWithOverloads.json @@ -72,7 +72,7 @@ "type": "Identifier", "span": { "start": 100, - "end": 109, + "end": 101, "ctxt": 0 }, "value": "x", @@ -140,7 +140,7 @@ "type": "Identifier", "span": { "start": 130, - "end": 139, + "end": 131, "ctxt": 0 }, "value": "s", @@ -232,7 +232,7 @@ "type": "Identifier", "span": { "start": 206, - "end": 215, + "end": 207, "ctxt": 0 }, "value": "x", @@ -287,7 +287,7 @@ "type": "Identifier", "span": { "start": 235, - "end": 244, + "end": 236, "ctxt": 0 }, "value": "s", @@ -410,7 +410,7 @@ "type": "Identifier", "span": { "start": 289, - "end": 293, + "end": 290, "ctxt": 0 }, "value": "x", @@ -520,7 +520,7 @@ "type": "Identifier", "span": { "start": 319, - "end": 323, + "end": 320, "ctxt": 0 }, "value": "s", @@ -654,7 +654,7 @@ "type": "Identifier", "span": { "start": 393, - "end": 397, + "end": 394, "ctxt": 0 }, "value": "x", @@ -751,7 +751,7 @@ "type": "Identifier", "span": { "start": 420, - "end": 424, + "end": 421, "ctxt": 0 }, "value": "s", diff --git a/crates/swc_ecma_parser/tests/tsc/methodSignaturesWithOverloads2.json b/crates/swc_ecma_parser/tests/tsc/methodSignaturesWithOverloads2.json index 27b0529700ba..b029cc1632d0 100644 --- a/crates/swc_ecma_parser/tests/tsc/methodSignaturesWithOverloads2.json +++ b/crates/swc_ecma_parser/tests/tsc/methodSignaturesWithOverloads2.json @@ -72,7 +72,7 @@ "type": "Identifier", "span": { "start": 100, - "end": 109, + "end": 101, "ctxt": 0 }, "value": "x", @@ -140,7 +140,7 @@ "type": "Identifier", "span": { "start": 131, - "end": 140, + "end": 132, "ctxt": 0 }, "value": "s", @@ -232,7 +232,7 @@ "type": "Identifier", "span": { "start": 174, - "end": 183, + "end": 175, "ctxt": 0 }, "value": "x", @@ -287,7 +287,7 @@ "type": "Identifier", "span": { "start": 203, - "end": 212, + "end": 204, "ctxt": 0 }, "value": "s", @@ -556,7 +556,7 @@ "type": "Identifier", "span": { "start": 311, - "end": 315, + "end": 312, "ctxt": 0 }, "value": "x", @@ -666,7 +666,7 @@ "type": "Identifier", "span": { "start": 341, - "end": 345, + "end": 342, "ctxt": 0 }, "value": "s", @@ -800,7 +800,7 @@ "type": "Identifier", "span": { "start": 382, - "end": 386, + "end": 383, "ctxt": 0 }, "value": "x", @@ -897,7 +897,7 @@ "type": "Identifier", "span": { "start": 409, - "end": 413, + "end": 410, "ctxt": 0 }, "value": "s", diff --git a/crates/swc_ecma_parser/tests/tsc/mixinAbstractClasses.json b/crates/swc_ecma_parser/tests/tsc/mixinAbstractClasses.json index 77a7a80d14d1..e27a2f82e6d0 100644 --- a/crates/swc_ecma_parser/tests/tsc/mixinAbstractClasses.json +++ b/crates/swc_ecma_parser/tests/tsc/mixinAbstractClasses.json @@ -103,7 +103,7 @@ "type": "Identifier", "span": { "start": 159, - "end": 180, + "end": 168, "ctxt": 0 }, "value": "baseClass", diff --git a/crates/swc_ecma_parser/tests/tsc/mixinAbstractClassesReturnTypeInference.json b/crates/swc_ecma_parser/tests/tsc/mixinAbstractClassesReturnTypeInference.json index d2873c61e452..78f83645761b 100644 --- a/crates/swc_ecma_parser/tests/tsc/mixinAbstractClassesReturnTypeInference.json +++ b/crates/swc_ecma_parser/tests/tsc/mixinAbstractClassesReturnTypeInference.json @@ -184,7 +184,7 @@ "type": "Identifier", "span": { "start": 232, - "end": 248, + "end": 241, "ctxt": 0 }, "value": "baseClass", diff --git a/crates/swc_ecma_parser/tests/tsc/mixinAccessModifiers.json b/crates/swc_ecma_parser/tests/tsc/mixinAccessModifiers.json index c4f8c4ec898f..330fc17d437e 100644 --- a/crates/swc_ecma_parser/tests/tsc/mixinAccessModifiers.json +++ b/crates/swc_ecma_parser/tests/tsc/mixinAccessModifiers.json @@ -1276,7 +1276,7 @@ "type": "Identifier", "span": { "start": 639, - "end": 660, + "end": 640, "ctxt": 0 }, "value": "x", @@ -1423,7 +1423,7 @@ "type": "Identifier", "span": { "start": 744, - "end": 766, + "end": 745, "ctxt": 0 }, "value": "x", @@ -1570,7 +1570,7 @@ "type": "Identifier", "span": { "start": 850, - "end": 869, + "end": 851, "ctxt": 0 }, "value": "x", @@ -1717,7 +1717,7 @@ "type": "Identifier", "span": { "start": 953, - "end": 978, + "end": 954, "ctxt": 0 }, "value": "x", @@ -1864,7 +1864,7 @@ "type": "Identifier", "span": { "start": 1060, - "end": 1081, + "end": 1061, "ctxt": 0 }, "value": "x", @@ -2011,7 +2011,7 @@ "type": "Identifier", "span": { "start": 1150, - "end": 1169, + "end": 1151, "ctxt": 0 }, "value": "x", @@ -2158,7 +2158,7 @@ "type": "Identifier", "span": { "start": 1253, - "end": 1258, + "end": 1255, "ctxt": 0 }, "value": "c1", @@ -2204,7 +2204,7 @@ "type": "Identifier", "span": { "start": 1260, - "end": 1265, + "end": 1262, "ctxt": 0 }, "value": "c2", @@ -2628,7 +2628,7 @@ "type": "Identifier", "span": { "start": 1510, - "end": 1516, + "end": 1512, "ctxt": 0 }, "value": "c4", @@ -2674,7 +2674,7 @@ "type": "Identifier", "span": { "start": 1518, - "end": 1524, + "end": 1520, "ctxt": 0 }, "value": "c5", @@ -2720,7 +2720,7 @@ "type": "Identifier", "span": { "start": 1526, - "end": 1532, + "end": 1528, "ctxt": 0 }, "value": "c6", @@ -3150,7 +3150,7 @@ "type": "Identifier", "span": { "start": 1651, - "end": 1657, + "end": 1653, "ctxt": 0 }, "value": "c4", @@ -3196,7 +3196,7 @@ "type": "Identifier", "span": { "start": 1659, - "end": 1665, + "end": 1661, "ctxt": 0 }, "value": "c5", @@ -3242,7 +3242,7 @@ "type": "Identifier", "span": { "start": 1667, - "end": 1673, + "end": 1669, "ctxt": 0 }, "value": "c6", @@ -3672,7 +3672,7 @@ "type": "Identifier", "span": { "start": 1888, - "end": 1894, + "end": 1890, "ctxt": 0 }, "value": "c4", @@ -3718,7 +3718,7 @@ "type": "Identifier", "span": { "start": 1896, - "end": 1902, + "end": 1898, "ctxt": 0 }, "value": "c5", @@ -3764,7 +3764,7 @@ "type": "Identifier", "span": { "start": 1904, - "end": 1910, + "end": 1906, "ctxt": 0 }, "value": "c6", @@ -4471,7 +4471,7 @@ "type": "Identifier", "span": { "start": 2277, - "end": 2323, + "end": 2278, "ctxt": 0 }, "value": "x", @@ -4710,7 +4710,7 @@ "type": "Identifier", "span": { "start": 2496, - "end": 2565, + "end": 2497, "ctxt": 0 }, "value": "x", @@ -5074,7 +5074,7 @@ "type": "Identifier", "span": { "start": 2738, - "end": 2806, + "end": 2739, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/mixinClassesAnnotated.json b/crates/swc_ecma_parser/tests/tsc/mixinClassesAnnotated.json index 1078b2922fc1..51923362d2f5 100644 --- a/crates/swc_ecma_parser/tests/tsc/mixinClassesAnnotated.json +++ b/crates/swc_ecma_parser/tests/tsc/mixinClassesAnnotated.json @@ -199,7 +199,7 @@ "type": "Identifier", "span": { "start": 109, - "end": 118, + "end": 110, "ctxt": 0 }, "value": "x", @@ -238,7 +238,7 @@ "type": "Identifier", "span": { "start": 127, - "end": 136, + "end": 128, "ctxt": 0 }, "value": "y", @@ -332,7 +332,7 @@ "type": "Identifier", "span": { "start": 189, - "end": 198, + "end": 190, "ctxt": 0 }, "value": "x", @@ -368,7 +368,7 @@ "type": "Identifier", "span": { "start": 200, - "end": 209, + "end": 201, "ctxt": 0 }, "value": "y", @@ -407,7 +407,7 @@ "type": "Identifier", "span": { "start": 218, - "end": 227, + "end": 219, "ctxt": 0 }, "value": "z", @@ -1201,7 +1201,7 @@ "type": "Identifier", "span": { "start": 654, - "end": 667, + "end": 664, "ctxt": 0 }, "value": "superClass", @@ -2380,7 +2380,7 @@ "type": "Identifier", "span": { "start": 1214, - "end": 1225, + "end": 1217, "ctxt": 0 }, "value": "tag", diff --git a/crates/swc_ecma_parser/tests/tsc/mixinClassesAnonymous.json b/crates/swc_ecma_parser/tests/tsc/mixinClassesAnonymous.json index b12adf80ae26..f75ec3d9bb21 100644 --- a/crates/swc_ecma_parser/tests/tsc/mixinClassesAnonymous.json +++ b/crates/swc_ecma_parser/tests/tsc/mixinClassesAnonymous.json @@ -199,7 +199,7 @@ "type": "Identifier", "span": { "start": 86, - "end": 95, + "end": 87, "ctxt": 0 }, "value": "x", @@ -238,7 +238,7 @@ "type": "Identifier", "span": { "start": 104, - "end": 113, + "end": 105, "ctxt": 0 }, "value": "y", @@ -332,7 +332,7 @@ "type": "Identifier", "span": { "start": 166, - "end": 175, + "end": 167, "ctxt": 0 }, "value": "x", @@ -368,7 +368,7 @@ "type": "Identifier", "span": { "start": 177, - "end": 186, + "end": 178, "ctxt": 0 }, "value": "y", @@ -407,7 +407,7 @@ "type": "Identifier", "span": { "start": 195, - "end": 204, + "end": 196, "ctxt": 0 }, "value": "z", @@ -924,7 +924,7 @@ "type": "Identifier", "span": { "start": 473, - "end": 486, + "end": 483, "ctxt": 0 }, "value": "superClass", @@ -2020,7 +2020,7 @@ "type": "Identifier", "span": { "start": 1008, - "end": 1019, + "end": 1011, "ctxt": 0 }, "value": "tag", diff --git a/crates/swc_ecma_parser/tests/tsc/mixinClassesMembers.json b/crates/swc_ecma_parser/tests/tsc/mixinClassesMembers.json index c252a4119443..8b055dbd048e 100644 --- a/crates/swc_ecma_parser/tests/tsc/mixinClassesMembers.json +++ b/crates/swc_ecma_parser/tests/tsc/mixinClassesMembers.json @@ -191,7 +191,7 @@ "type": "Identifier", "span": { "start": 129, - "end": 138, + "end": 130, "ctxt": 0 }, "value": "s", @@ -250,7 +250,7 @@ "type": "Identifier", "span": { "start": 157, - "end": 166, + "end": 158, "ctxt": 0 }, "value": "n", diff --git a/crates/swc_ecma_parser/tests/tsc/moduleExportAlias2.json b/crates/swc_ecma_parser/tests/tsc/moduleExportAlias2.json index 0b6f257136c2..bb28dfd0344b 100644 --- a/crates/swc_ecma_parser/tests/tsc/moduleExportAlias2.json +++ b/crates/swc_ecma_parser/tests/tsc/moduleExportAlias2.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 103, - "end": 115, + "end": 107, "ctxt": 0 }, "value": "name", diff --git a/crates/swc_ecma_parser/tests/tsc/moduleExportAssignment7.json b/crates/swc_ecma_parser/tests/tsc/moduleExportAssignment7.json index 98be2ba8dd94..bb9ee341c468 100644 --- a/crates/swc_ecma_parser/tests/tsc/moduleExportAssignment7.json +++ b/crates/swc_ecma_parser/tests/tsc/moduleExportAssignment7.json @@ -1255,7 +1255,7 @@ "type": "Identifier", "span": { "start": 1179, - "end": 1203, + "end": 1180, "ctxt": 0 }, "value": "a", @@ -1311,7 +1311,7 @@ "type": "Identifier", "span": { "start": 1209, - "end": 1240, + "end": 1210, "ctxt": 0 }, "value": "b", @@ -1367,7 +1367,7 @@ "type": "Identifier", "span": { "start": 1246, - "end": 1268, + "end": 1247, "ctxt": 0 }, "value": "c", @@ -1423,7 +1423,7 @@ "type": "Identifier", "span": { "start": 1274, - "end": 1296, + "end": 1275, "ctxt": 0 }, "value": "d", @@ -1479,7 +1479,7 @@ "type": "Identifier", "span": { "start": 1302, - "end": 1324, + "end": 1303, "ctxt": 0 }, "value": "e", @@ -1535,7 +1535,7 @@ "type": "Identifier", "span": { "start": 1330, - "end": 1352, + "end": 1331, "ctxt": 0 }, "value": "f", @@ -1591,7 +1591,7 @@ "type": "Identifier", "span": { "start": 1358, - "end": 1384, + "end": 1359, "ctxt": 0 }, "value": "g", @@ -1909,7 +1909,7 @@ "type": "Identifier", "span": { "start": 1470, - "end": 1501, + "end": 1471, "ctxt": 0 }, "value": "a", @@ -1974,7 +1974,7 @@ "type": "Identifier", "span": { "start": 1507, - "end": 1545, + "end": 1508, "ctxt": 0 }, "value": "b", @@ -2039,7 +2039,7 @@ "type": "Identifier", "span": { "start": 1551, - "end": 1580, + "end": 1552, "ctxt": 0 }, "value": "c", @@ -2104,7 +2104,7 @@ "type": "Identifier", "span": { "start": 1586, - "end": 1615, + "end": 1587, "ctxt": 0 }, "value": "d", @@ -2169,7 +2169,7 @@ "type": "Identifier", "span": { "start": 1621, - "end": 1650, + "end": 1622, "ctxt": 0 }, "value": "e", @@ -2234,7 +2234,7 @@ "type": "Identifier", "span": { "start": 1656, - "end": 1685, + "end": 1657, "ctxt": 0 }, "value": "f", @@ -2299,7 +2299,7 @@ "type": "Identifier", "span": { "start": 1691, - "end": 1724, + "end": 1692, "ctxt": 0 }, "value": "g", diff --git a/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment.json b/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment.json index 00d453dac504..817510d5ab51 100644 --- a/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment.json +++ b/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment.json @@ -123,7 +123,7 @@ "type": "Identifier", "span": { "start": 145, - "end": 157, + "end": 149, "ctxt": 0 }, "value": "name", diff --git a/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment2.json b/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment2.json index cd03a8749322..f404a769e5f7 100644 --- a/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment2.json +++ b/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment2.json @@ -123,7 +123,7 @@ "type": "Identifier", "span": { "start": 145, - "end": 157, + "end": 149, "ctxt": 0 }, "value": "name", diff --git a/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment3.json b/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment3.json index dc6f87f33ed0..29f456c5909e 100644 --- a/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment3.json +++ b/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment3.json @@ -123,7 +123,7 @@ "type": "Identifier", "span": { "start": 145, - "end": 157, + "end": 149, "ctxt": 0 }, "value": "name", diff --git a/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment4.json b/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment4.json index a1493b5becfe..3130f45cf3aa 100644 --- a/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment4.json +++ b/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment4.json @@ -123,7 +123,7 @@ "type": "Identifier", "span": { "start": 145, - "end": 157, + "end": 149, "ctxt": 0 }, "value": "name", diff --git a/crates/swc_ecma_parser/tests/tsc/moduleWithStatementsOfEveryKind.json b/crates/swc_ecma_parser/tests/tsc/moduleWithStatementsOfEveryKind.json index eaf7e47be52c..95ee89e8ecbf 100644 --- a/crates/swc_ecma_parser/tests/tsc/moduleWithStatementsOfEveryKind.json +++ b/crates/swc_ecma_parser/tests/tsc/moduleWithStatementsOfEveryKind.json @@ -753,7 +753,7 @@ "type": "Identifier", "span": { "start": 325, - "end": 334, + "end": 326, "ctxt": 0 }, "value": "s", @@ -2030,7 +2030,7 @@ "type": "Identifier", "span": { "start": 959, - "end": 968, + "end": 960, "ctxt": 0 }, "value": "s", diff --git a/crates/swc_ecma_parser/tests/tsc/namedTupleMembers.json b/crates/swc_ecma_parser/tests/tsc/namedTupleMembers.json index 3a1dd035272f..cf737475b686 100644 --- a/crates/swc_ecma_parser/tests/tsc/namedTupleMembers.json +++ b/crates/swc_ecma_parser/tests/tsc/namedTupleMembers.json @@ -1412,7 +1412,7 @@ "type": "Identifier", "span": { "start": 721, - "end": 731, + "end": 728, "ctxt": 0 }, "value": "initial", @@ -3064,7 +3064,7 @@ "type": "Identifier", "span": { "start": 1573, - "end": 1585, + "end": 1577, "ctxt": 0 }, "value": "elem", @@ -3100,7 +3100,7 @@ "type": "Identifier", "span": { "start": 1587, - "end": 1600, + "end": 1592, "ctxt": 0 }, "value": "index", @@ -3179,7 +3179,7 @@ "type": "Identifier", "span": { "start": 1683, - "end": 1687, + "end": 1684, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/narrowExceptionVariableInCatchClause.json b/crates/swc_ecma_parser/tests/tsc/narrowExceptionVariableInCatchClause.json index f11ad9864f2c..d363dec41197 100644 --- a/crates/swc_ecma_parser/tests/tsc/narrowExceptionVariableInCatchClause.json +++ b/crates/swc_ecma_parser/tests/tsc/narrowExceptionVariableInCatchClause.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 29, - "end": 35, + "end": 30, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/narrowingConstrainedTypeVariable.json b/crates/swc_ecma_parser/tests/tsc/narrowingConstrainedTypeVariable.json index 87047fab1072..0039cd212d6f 100644 --- a/crates/swc_ecma_parser/tests/tsc/narrowingConstrainedTypeVariable.json +++ b/crates/swc_ecma_parser/tests/tsc/narrowingConstrainedTypeVariable.json @@ -58,7 +58,7 @@ "type": "Identifier", "span": { "start": 79, - "end": 92, + "end": 80, "ctxt": 0 }, "value": "v", @@ -434,7 +434,7 @@ "type": "Identifier", "span": { "start": 258, - "end": 266, + "end": 259, "ctxt": 0 }, "value": "v", @@ -920,7 +920,7 @@ "type": "Identifier", "span": { "start": 430, - "end": 450, + "end": 431, "ctxt": 0 }, "value": "v", diff --git a/crates/swc_ecma_parser/tests/tsc/narrowingGenericTypeFromInstanceof01.json b/crates/swc_ecma_parser/tests/tsc/narrowingGenericTypeFromInstanceof01.json index e2009fe44e47..5c7b7e7b189f 100644 --- a/crates/swc_ecma_parser/tests/tsc/narrowingGenericTypeFromInstanceof01.json +++ b/crates/swc_ecma_parser/tests/tsc/narrowingGenericTypeFromInstanceof01.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 38, - "end": 47, + "end": 39, "ctxt": 0 }, "value": "a", @@ -219,7 +219,7 @@ "type": "Identifier", "span": { "start": 92, - "end": 99, + "end": 93, "ctxt": 0 }, "value": "a", @@ -360,7 +360,7 @@ "type": "Identifier", "span": { "start": 125, - "end": 132, + "end": 126, "ctxt": 0 }, "value": "b", @@ -501,7 +501,7 @@ "type": "Identifier", "span": { "start": 156, - "end": 170, + "end": 157, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/neverInference.json b/crates/swc_ecma_parser/tests/tsc/neverInference.json index 97fbe7163209..e0205fb16236 100644 --- a/crates/swc_ecma_parser/tests/tsc/neverInference.json +++ b/crates/swc_ecma_parser/tests/tsc/neverInference.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 77, - "end": 83, + "end": 78, "ctxt": 0 }, "value": "x", @@ -404,7 +404,7 @@ "type": "Identifier", "span": { "start": 228, - "end": 232, + "end": 229, "ctxt": 0 }, "value": "x", @@ -441,7 +441,7 @@ "type": "Identifier", "span": { "start": 234, - "end": 238, + "end": 235, "ctxt": 0 }, "value": "y", @@ -953,7 +953,7 @@ "type": "Identifier", "span": { "start": 414, - "end": 423, + "end": 415, "ctxt": 0 }, "value": "x", @@ -989,7 +989,7 @@ "type": "Identifier", "span": { "start": 425, - "end": 434, + "end": 426, "ctxt": 0 }, "value": "y", @@ -1068,7 +1068,7 @@ "type": "Identifier", "span": { "start": 472, - "end": 482, + "end": 477, "ctxt": 0 }, "value": "items", @@ -1122,7 +1122,7 @@ "type": "Identifier", "span": { "start": 484, - "end": 509, + "end": 494, "ctxt": 0 }, "value": "comparator", @@ -1431,7 +1431,7 @@ "type": "Identifier", "span": { "start": 635, - "end": 643, + "end": 638, "ctxt": 0 }, "value": "as1", @@ -1485,7 +1485,7 @@ "type": "Identifier", "span": { "start": 645, - "end": 653, + "end": 648, "ctxt": 0 }, "value": "as2", @@ -1539,7 +1539,7 @@ "type": "Identifier", "span": { "start": 655, - "end": 684, + "end": 658, "ctxt": 0 }, "value": "cmp", @@ -1563,7 +1563,7 @@ "type": "Identifier", "span": { "start": 661, - "end": 666, + "end": 663, "ctxt": 0 }, "value": "a1", @@ -1600,7 +1600,7 @@ "type": "Identifier", "span": { "start": 668, - "end": 673, + "end": 670, "ctxt": 0 }, "value": "a2", diff --git a/crates/swc_ecma_parser/tests/tsc/neverIntersectionNotCallable.json b/crates/swc_ecma_parser/tests/tsc/neverIntersectionNotCallable.json index f5c18b1f0a59..08dfa024dab1 100644 --- a/crates/swc_ecma_parser/tests/tsc/neverIntersectionNotCallable.json +++ b/crates/swc_ecma_parser/tests/tsc/neverIntersectionNotCallable.json @@ -67,7 +67,7 @@ "type": "Identifier", "span": { "start": 21, - "end": 30, + "end": 22, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/neverReturningFunctions1.json b/crates/swc_ecma_parser/tests/tsc/neverReturningFunctions1.json index e7b44750ad5e..afd43f25fc85 100644 --- a/crates/swc_ecma_parser/tests/tsc/neverReturningFunctions1.json +++ b/crates/swc_ecma_parser/tests/tsc/neverReturningFunctions1.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 87, - "end": 103, + "end": 94, "ctxt": 0 }, "value": "message", @@ -162,7 +162,7 @@ "type": "Identifier", "span": { "start": 160, - "end": 181, + "end": 161, "ctxt": 0 }, "value": "x", @@ -369,7 +369,7 @@ "type": "Identifier", "span": { "start": 279, - "end": 288, + "end": 280, "ctxt": 0 }, "value": "x", @@ -573,7 +573,7 @@ "type": "Identifier", "span": { "start": 394, - "end": 403, + "end": 395, "ctxt": 0 }, "value": "x", @@ -709,7 +709,7 @@ "type": "Identifier", "span": { "start": 476, - "end": 497, + "end": 477, "ctxt": 0 }, "value": "x", @@ -764,7 +764,7 @@ "type": "Identifier", "span": { "start": 499, - "end": 532, + "end": 503, "ctxt": 0 }, "value": "fail", @@ -788,7 +788,7 @@ "type": "Identifier", "span": { "start": 506, - "end": 522, + "end": 513, "ctxt": 0 }, "value": "message", @@ -998,7 +998,7 @@ "type": "Identifier", "span": { "start": 630, - "end": 639, + "end": 631, "ctxt": 0 }, "value": "x", @@ -1034,7 +1034,7 @@ "type": "Identifier", "span": { "start": 641, - "end": 674, + "end": 645, "ctxt": 0 }, "value": "fail", @@ -1058,7 +1058,7 @@ "type": "Identifier", "span": { "start": 648, - "end": 664, + "end": 655, "ctxt": 0 }, "value": "message", @@ -1284,7 +1284,7 @@ "type": "Identifier", "span": { "start": 780, - "end": 789, + "end": 781, "ctxt": 0 }, "value": "x", @@ -1320,7 +1320,7 @@ "type": "Identifier", "span": { "start": 791, - "end": 824, + "end": 795, "ctxt": 0 }, "value": "fail", @@ -1344,7 +1344,7 @@ "type": "Identifier", "span": { "start": 798, - "end": 814, + "end": 805, "ctxt": 0 }, "value": "message", @@ -1536,7 +1536,7 @@ "type": "Identifier", "span": { "start": 935, - "end": 951, + "end": 942, "ctxt": 0 }, "value": "message", @@ -1619,7 +1619,7 @@ "type": "Identifier", "span": { "start": 977, - "end": 998, + "end": 978, "ctxt": 0 }, "value": "x", @@ -1844,7 +1844,7 @@ "type": "Identifier", "span": { "start": 1102, - "end": 1111, + "end": 1103, "ctxt": 0 }, "value": "x", @@ -2066,7 +2066,7 @@ "type": "Identifier", "span": { "start": 1223, - "end": 1232, + "end": 1224, "ctxt": 0 }, "value": "x", @@ -2220,7 +2220,7 @@ "type": "Identifier", "span": { "start": 1311, - "end": 1320, + "end": 1312, "ctxt": 0 }, "value": "x", @@ -2415,7 +2415,7 @@ "type": "Identifier", "span": { "start": 1412, - "end": 1428, + "end": 1419, "ctxt": 0 }, "value": "message", @@ -2557,7 +2557,7 @@ "type": "Identifier", "span": { "start": 1486, - "end": 1507, + "end": 1487, "ctxt": 0 }, "value": "x", @@ -2792,7 +2792,7 @@ "type": "Identifier", "span": { "start": 1615, - "end": 1624, + "end": 1616, "ctxt": 0 }, "value": "x", @@ -3024,7 +3024,7 @@ "type": "Identifier", "span": { "start": 1744, - "end": 1753, + "end": 1745, "ctxt": 0 }, "value": "x", @@ -3190,7 +3190,7 @@ "type": "Identifier", "span": { "start": 1849, - "end": 1879, + "end": 1850, "ctxt": 0 }, "value": "x", @@ -3641,7 +3641,7 @@ "type": "Identifier", "span": { "start": 2305, - "end": 2330, + "end": 2306, "ctxt": 0 }, "value": "x", @@ -3985,7 +3985,7 @@ "type": "Identifier", "span": { "start": 2521, - "end": 2530, + "end": 2522, "ctxt": 0 }, "value": "x", @@ -4232,7 +4232,7 @@ "type": "Identifier", "span": { "start": 2717, - "end": 2726, + "end": 2718, "ctxt": 0 }, "value": "x", @@ -4433,7 +4433,7 @@ "type": "Identifier", "span": { "start": 2870, - "end": 2879, + "end": 2871, "ctxt": 0 }, "value": "x", @@ -5392,7 +5392,7 @@ "type": "Identifier", "span": { "start": 3440, - "end": 3448, + "end": 3444, "ctxt": 0 }, "value": "data", @@ -5590,7 +5590,7 @@ "type": "Identifier", "span": { "start": 3512, - "end": 3524, + "end": 3516, "ctxt": 0 }, "value": "time", @@ -5617,7 +5617,7 @@ "type": "Identifier", "span": { "start": 3526, - "end": 3543, + "end": 3535, "ctxt": 0 }, "value": "timeDelta", @@ -5685,7 +5685,7 @@ "type": "Identifier", "span": { "start": 3560, - "end": 3570, + "end": 3567, "ctxt": 0 }, "value": "oldData", @@ -5803,7 +5803,7 @@ "type": "Identifier", "span": { "start": 3618, - "end": 3633, + "end": 3624, "ctxt": 0 }, "value": "update", @@ -5977,7 +5977,7 @@ "type": "Identifier", "span": { "start": 3730, - "end": 3741, + "end": 3732, "ctxt": 0 }, "value": "el", @@ -6004,7 +6004,7 @@ "type": "Identifier", "span": { "start": 3743, - "end": 3760, + "end": 3752, "ctxt": 0 }, "value": "attrValue", @@ -6031,7 +6031,7 @@ "type": "Identifier", "span": { "start": 3762, - "end": 3772, + "end": 3764, "ctxt": 0 }, "value": "id", @@ -6376,7 +6376,7 @@ "type": "Identifier", "span": { "start": 3941, - "end": 3953, + "end": 3945, "ctxt": 0 }, "value": "name", @@ -6412,7 +6412,7 @@ "type": "Identifier", "span": { "start": 3959, - "end": 3992, + "end": 3968, "ctxt": 0 }, "value": "component", @@ -7463,7 +7463,7 @@ "type": "Identifier", "span": { "start": 4489, - "end": 4498, + "end": 4490, "ctxt": 0 }, "value": "f", @@ -7838,7 +7838,7 @@ "type": "Identifier", "span": { "start": 4790, - "end": 4801, + "end": 4793, "ctxt": 0 }, "value": "msg", @@ -8127,7 +8127,7 @@ "type": "Identifier", "span": { "start": 4941, - "end": 4956, + "end": 4948, "ctxt": 0 }, "value": "message", @@ -8199,7 +8199,7 @@ "type": "Identifier", "span": { "start": 4982, - "end": 5010, + "end": 4990, "ctxt": 0 }, "value": "services", @@ -8273,7 +8273,7 @@ "type": "Identifier", "span": { "start": 5012, - "end": 5028, + "end": 5013, "ctxt": 0 }, "value": "s", diff --git a/crates/swc_ecma_parser/tests/tsc/neverType.json b/crates/swc_ecma_parser/tests/tsc/neverType.json index 556b9300ef40..b9b7a18cef4d 100644 --- a/crates/swc_ecma_parser/tests/tsc/neverType.json +++ b/crates/swc_ecma_parser/tests/tsc/neverType.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 67, - "end": 82, + "end": 74, "ctxt": 0 }, "value": "message", @@ -162,7 +162,7 @@ "type": "Identifier", "span": { "start": 145, - "end": 160, + "end": 152, "ctxt": 0 }, "value": "message", @@ -353,7 +353,7 @@ "type": "Identifier", "span": { "start": 277, - "end": 296, + "end": 287, "ctxt": 0 }, "value": "shouldFail", @@ -648,7 +648,7 @@ "type": "Identifier", "span": { "start": 509, - "end": 533, + "end": 518, "ctxt": 0 }, "value": "direction", @@ -904,7 +904,7 @@ "type": "Identifier", "span": { "start": 715, - "end": 739, + "end": 724, "ctxt": 0 }, "value": "direction", @@ -1158,7 +1158,7 @@ "type": "Identifier", "span": { "start": 876, - "end": 892, + "end": 877, "ctxt": 0 }, "value": "x", @@ -1707,7 +1707,7 @@ "type": "Identifier", "span": { "start": 1164, - "end": 1182, + "end": 1165, "ctxt": 0 }, "value": "x", @@ -1873,7 +1873,7 @@ "type": "Identifier", "span": { "start": 1262, - "end": 1280, + "end": 1263, "ctxt": 0 }, "value": "x", @@ -2066,7 +2066,7 @@ "type": "Identifier", "span": { "start": 1406, - "end": 1422, + "end": 1408, "ctxt": 0 }, "value": "cb", diff --git a/crates/swc_ecma_parser/tests/tsc/newOperatorConformance.json b/crates/swc_ecma_parser/tests/tsc/newOperatorConformance.json index ba66bd39b773..a72cbba53c81 100644 --- a/crates/swc_ecma_parser/tests/tsc/newOperatorConformance.json +++ b/crates/swc_ecma_parser/tests/tsc/newOperatorConformance.json @@ -82,7 +82,7 @@ "type": "Identifier", "span": { "start": 43, - "end": 52, + "end": 44, "ctxt": 0 }, "value": "n", @@ -118,7 +118,7 @@ "type": "Identifier", "span": { "start": 54, - "end": 63, + "end": 55, "ctxt": 0 }, "value": "s", @@ -212,7 +212,7 @@ "type": "Identifier", "span": { "start": 101, - "end": 106, + "end": 102, "ctxt": 0 }, "value": "n", @@ -1024,7 +1024,7 @@ "type": "Identifier", "span": { "start": 826, - "end": 830, + "end": 827, "ctxt": 0 }, "value": "s", @@ -1275,7 +1275,7 @@ "type": "Identifier", "span": { "start": 1024, - "end": 1028, + "end": 1025, "ctxt": 0 }, "value": "s", @@ -1491,7 +1491,7 @@ "type": "Identifier", "span": { "start": 1003, - "end": 1012, + "end": 1004, "ctxt": 0 }, "value": "s", diff --git a/crates/swc_ecma_parser/tests/tsc/newOperatorErrorCases_noImplicitAny.json b/crates/swc_ecma_parser/tests/tsc/newOperatorErrorCases_noImplicitAny.json index 3a5b873bc99b..a97b3c6f0e02 100644 --- a/crates/swc_ecma_parser/tests/tsc/newOperatorErrorCases_noImplicitAny.json +++ b/crates/swc_ecma_parser/tests/tsc/newOperatorErrorCases_noImplicitAny.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 44, - "end": 54, + "end": 48, "ctxt": 0 }, "value": "this", @@ -166,7 +166,7 @@ "type": "Identifier", "span": { "start": 121, - "end": 131, + "end": 125, "ctxt": 0 }, "value": "this", diff --git a/crates/swc_ecma_parser/tests/tsc/newTargetNarrowing.json b/crates/swc_ecma_parser/tests/tsc/newTargetNarrowing.json index 16a243a76b16..ff60e36d29e4 100644 --- a/crates/swc_ecma_parser/tests/tsc/newTargetNarrowing.json +++ b/crates/swc_ecma_parser/tests/tsc/newTargetNarrowing.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 48, - "end": 55, + "end": 49, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/newWithSpread.json b/crates/swc_ecma_parser/tests/tsc/newWithSpread.json index d6452b721d64..bc97cfcab90f 100644 --- a/crates/swc_ecma_parser/tests/tsc/newWithSpread.json +++ b/crates/swc_ecma_parser/tests/tsc/newWithSpread.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 13, - "end": 22, + "end": 14, "ctxt": 0 }, "value": "x", @@ -68,7 +68,7 @@ "type": "Identifier", "span": { "start": 24, - "end": 33, + "end": 25, "ctxt": 0 }, "value": "y", @@ -341,7 +341,7 @@ "type": "Identifier", "span": { "start": 125, - "end": 134, + "end": 126, "ctxt": 0 }, "value": "x", @@ -368,7 +368,7 @@ "type": "Identifier", "span": { "start": 136, - "end": 145, + "end": 137, "ctxt": 0 }, "value": "y", @@ -502,7 +502,7 @@ "type": "Identifier", "span": { "start": 199, - "end": 208, + "end": 200, "ctxt": 0 }, "value": "x", @@ -538,7 +538,7 @@ "type": "Identifier", "span": { "start": 210, - "end": 219, + "end": 211, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/newWithSpreadES5.json b/crates/swc_ecma_parser/tests/tsc/newWithSpreadES5.json index 59d7e28147dd..8eb3375c7fb7 100644 --- a/crates/swc_ecma_parser/tests/tsc/newWithSpreadES5.json +++ b/crates/swc_ecma_parser/tests/tsc/newWithSpreadES5.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 28, - "end": 37, + "end": 29, "ctxt": 0 }, "value": "x", @@ -68,7 +68,7 @@ "type": "Identifier", "span": { "start": 39, - "end": 48, + "end": 40, "ctxt": 0 }, "value": "y", @@ -341,7 +341,7 @@ "type": "Identifier", "span": { "start": 139, - "end": 148, + "end": 140, "ctxt": 0 }, "value": "x", @@ -368,7 +368,7 @@ "type": "Identifier", "span": { "start": 150, - "end": 159, + "end": 151, "ctxt": 0 }, "value": "y", @@ -502,7 +502,7 @@ "type": "Identifier", "span": { "start": 213, - "end": 222, + "end": 214, "ctxt": 0 }, "value": "x", @@ -538,7 +538,7 @@ "type": "Identifier", "span": { "start": 224, - "end": 233, + "end": 225, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/newWithSpreadES6.json b/crates/swc_ecma_parser/tests/tsc/newWithSpreadES6.json index 7731edfd7be0..5e9508a8708f 100644 --- a/crates/swc_ecma_parser/tests/tsc/newWithSpreadES6.json +++ b/crates/swc_ecma_parser/tests/tsc/newWithSpreadES6.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 28, - "end": 37, + "end": 29, "ctxt": 0 }, "value": "x", @@ -68,7 +68,7 @@ "type": "Identifier", "span": { "start": 39, - "end": 48, + "end": 40, "ctxt": 0 }, "value": "y", @@ -341,7 +341,7 @@ "type": "Identifier", "span": { "start": 140, - "end": 149, + "end": 141, "ctxt": 0 }, "value": "x", @@ -368,7 +368,7 @@ "type": "Identifier", "span": { "start": 151, - "end": 160, + "end": 152, "ctxt": 0 }, "value": "y", @@ -502,7 +502,7 @@ "type": "Identifier", "span": { "start": 214, - "end": 223, + "end": 215, "ctxt": 0 }, "value": "x", @@ -538,7 +538,7 @@ "type": "Identifier", "span": { "start": 225, - "end": 234, + "end": 226, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/noInfer.json b/crates/swc_ecma_parser/tests/tsc/noInfer.json index 79b5a91f007f..90b32679a4b8 100644 --- a/crates/swc_ecma_parser/tests/tsc/noInfer.json +++ b/crates/swc_ecma_parser/tests/tsc/noInfer.json @@ -1662,7 +1662,7 @@ "type": "Identifier", "span": { "start": 859, - "end": 863, + "end": 860, "ctxt": 0 }, "value": "a", @@ -1708,7 +1708,7 @@ "type": "Identifier", "span": { "start": 865, - "end": 878, + "end": 866, "ctxt": 0 }, "value": "b", @@ -1865,7 +1865,7 @@ "type": "Identifier", "span": { "start": 926, - "end": 930, + "end": 927, "ctxt": 0 }, "value": "a", @@ -1911,7 +1911,7 @@ "type": "Identifier", "span": { "start": 932, - "end": 947, + "end": 933, "ctxt": 0 }, "value": "b", @@ -2076,7 +2076,7 @@ "type": "Identifier", "span": { "start": 995, - "end": 999, + "end": 996, "ctxt": 0 }, "value": "a", @@ -2122,7 +2122,7 @@ "type": "Identifier", "span": { "start": 1001, - "end": 1016, + "end": 1002, "ctxt": 0 }, "value": "b", @@ -2287,7 +2287,7 @@ "type": "Identifier", "span": { "start": 1064, - "end": 1068, + "end": 1065, "ctxt": 0 }, "value": "a", @@ -2333,7 +2333,7 @@ "type": "Identifier", "span": { "start": 1070, - "end": 1090, + "end": 1071, "ctxt": 0 }, "value": "b", @@ -2532,7 +2532,7 @@ "type": "Identifier", "span": { "start": 1138, - "end": 1142, + "end": 1139, "ctxt": 0 }, "value": "a", @@ -2578,7 +2578,7 @@ "type": "Identifier", "span": { "start": 1144, - "end": 1164, + "end": 1145, "ctxt": 0 }, "value": "b", @@ -3350,7 +3350,7 @@ "type": "Identifier", "span": { "start": 1477, - "end": 1485, + "end": 1482, "ctxt": 0 }, "value": "value", @@ -3396,7 +3396,7 @@ "type": "Identifier", "span": { "start": 1487, - "end": 1515, + "end": 1497, "ctxt": 0 }, "value": "getDefault", @@ -3827,7 +3827,7 @@ "type": "Identifier", "span": { "start": 1714, - "end": 1723, + "end": 1720, "ctxt": 0 }, "value": "actual", @@ -3873,7 +3873,7 @@ "type": "Identifier", "span": { "start": 1725, - "end": 1745, + "end": 1733, "ctxt": 0 }, "value": "expected", @@ -4289,7 +4289,7 @@ "type": "Identifier", "span": { "start": 1889, - "end": 1910, + "end": 1893, "ctxt": 0 }, "value": "func", @@ -4313,7 +4313,7 @@ "type": "Identifier", "span": { "start": 1896, - "end": 1904, + "end": 1901, "ctxt": 0 }, "value": "value", @@ -4391,7 +4391,7 @@ "type": "Identifier", "span": { "start": 1912, - "end": 1929, + "end": 1917, "ctxt": 0 }, "value": "value", @@ -4573,7 +4573,7 @@ "type": "Identifier", "span": { "start": 1957, - "end": 1978, + "end": 1962, "ctxt": 0 }, "value": "value", @@ -4996,7 +4996,7 @@ "type": "Identifier", "span": { "start": 2135, - "end": 2162, + "end": 2144, "ctxt": 0 }, "value": "Component", @@ -5070,7 +5070,7 @@ "type": "Identifier", "span": { "start": 2164, - "end": 2185, + "end": 2169, "ctxt": 0 }, "value": "props", @@ -5470,7 +5470,7 @@ "type": "Identifier", "span": { "start": 2331, - "end": 2372, + "end": 2339, "ctxt": 0 }, "value": "callback", @@ -5494,7 +5494,7 @@ "type": "Identifier", "span": { "start": 2342, - "end": 2355, + "end": 2343, "ctxt": 0 }, "value": "a", @@ -5559,7 +5559,7 @@ "type": "Identifier", "span": { "start": 2357, - "end": 2366, + "end": 2358, "ctxt": 0 }, "value": "b", @@ -5899,7 +5899,7 @@ "type": "Identifier", "span": { "start": 2492, - "end": 2514, + "end": 2497, "ctxt": 0 }, "value": "clazz", @@ -5976,7 +5976,7 @@ "type": "Identifier", "span": { "start": 2524, - "end": 2542, + "end": 2530, "ctxt": 0 }, "value": "_value", @@ -6250,7 +6250,7 @@ "type": "Identifier", "span": { "start": 2655, - "end": 2677, + "end": 2660, "ctxt": 0 }, "value": "clazz", @@ -6327,7 +6327,7 @@ "type": "Identifier", "span": { "start": 2686, - "end": 2704, + "end": 2692, "ctxt": 0 }, "value": "_value", diff --git a/crates/swc_ecma_parser/tests/tsc/noUncheckedIndexedAccess.json b/crates/swc_ecma_parser/tests/tsc/noUncheckedIndexedAccess.json index ce6508793de4..bbc1138cd884 100644 --- a/crates/swc_ecma_parser/tests/tsc/noUncheckedIndexedAccess.json +++ b/crates/swc_ecma_parser/tests/tsc/noUncheckedIndexedAccess.json @@ -3726,7 +3726,7 @@ "type": "Identifier", "span": { "start": 2013, - "end": 2019, + "end": 2016, "ctxt": 0 }, "value": "arg", @@ -3965,7 +3965,7 @@ "type": "Identifier", "span": { "start": 2132, - "end": 2138, + "end": 2135, "ctxt": 0 }, "value": "arg", @@ -4212,7 +4212,7 @@ "type": "Identifier", "span": { "start": 2231, - "end": 2237, + "end": 2234, "ctxt": 0 }, "value": "arg", diff --git a/crates/swc_ecma_parser/tests/tsc/nominalSubtypeCheckOfTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/nominalSubtypeCheckOfTypeParameter.json index cdb07aba85ef..a01d569941ff 100644 --- a/crates/swc_ecma_parser/tests/tsc/nominalSubtypeCheckOfTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/nominalSubtypeCheckOfTypeParameter.json @@ -369,7 +369,7 @@ "type": "Identifier", "span": { "start": 132, - "end": 148, + "end": 135, "ctxt": 0 }, "value": "seq", @@ -743,7 +743,7 @@ "type": "Identifier", "span": { "start": 533, - "end": 549, + "end": 536, "ctxt": 0 }, "value": "seq", diff --git a/crates/swc_ecma_parser/tests/tsc/nonPrimitiveAndTypeVariables.json b/crates/swc_ecma_parser/tests/tsc/nonPrimitiveAndTypeVariables.json index 6f486ecd9918..bf0edbc2d615 100644 --- a/crates/swc_ecma_parser/tests/tsc/nonPrimitiveAndTypeVariables.json +++ b/crates/swc_ecma_parser/tests/tsc/nonPrimitiveAndTypeVariables.json @@ -955,7 +955,7 @@ "type": "Identifier", "span": { "start": 268, - "end": 272, + "end": 269, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/nonPrimitiveConstraintOfIndexAccessType.json b/crates/swc_ecma_parser/tests/tsc/nonPrimitiveConstraintOfIndexAccessType.json index db51f09d164d..f53d57f657d7 100644 --- a/crates/swc_ecma_parser/tests/tsc/nonPrimitiveConstraintOfIndexAccessType.json +++ b/crates/swc_ecma_parser/tests/tsc/nonPrimitiveConstraintOfIndexAccessType.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 85, - "end": 94, + "end": 86, "ctxt": 0 }, "value": "s", @@ -68,7 +68,7 @@ "type": "Identifier", "span": { "start": 96, - "end": 104, + "end": 98, "ctxt": 0 }, "value": "tp", @@ -322,7 +322,7 @@ "type": "Identifier", "span": { "start": 174, - "end": 183, + "end": 175, "ctxt": 0 }, "value": "s", @@ -358,7 +358,7 @@ "type": "Identifier", "span": { "start": 185, - "end": 193, + "end": 187, "ctxt": 0 }, "value": "tp", @@ -612,7 +612,7 @@ "type": "Identifier", "span": { "start": 268, - "end": 277, + "end": 269, "ctxt": 0 }, "value": "s", @@ -648,7 +648,7 @@ "type": "Identifier", "span": { "start": 279, - "end": 287, + "end": 281, "ctxt": 0 }, "value": "tp", @@ -902,7 +902,7 @@ "type": "Identifier", "span": { "start": 357, - "end": 366, + "end": 358, "ctxt": 0 }, "value": "s", @@ -938,7 +938,7 @@ "type": "Identifier", "span": { "start": 368, - "end": 376, + "end": 370, "ctxt": 0 }, "value": "tp", @@ -1192,7 +1192,7 @@ "type": "Identifier", "span": { "start": 447, - "end": 456, + "end": 448, "ctxt": 0 }, "value": "s", @@ -1228,7 +1228,7 @@ "type": "Identifier", "span": { "start": 458, - "end": 466, + "end": 460, "ctxt": 0 }, "value": "tp", @@ -1482,7 +1482,7 @@ "type": "Identifier", "span": { "start": 538, - "end": 547, + "end": 539, "ctxt": 0 }, "value": "s", @@ -1518,7 +1518,7 @@ "type": "Identifier", "span": { "start": 549, - "end": 557, + "end": 551, "ctxt": 0 }, "value": "tp", @@ -1772,7 +1772,7 @@ "type": "Identifier", "span": { "start": 629, - "end": 638, + "end": 630, "ctxt": 0 }, "value": "s", @@ -1808,7 +1808,7 @@ "type": "Identifier", "span": { "start": 640, - "end": 648, + "end": 642, "ctxt": 0 }, "value": "tp", @@ -2062,7 +2062,7 @@ "type": "Identifier", "span": { "start": 716, - "end": 725, + "end": 717, "ctxt": 0 }, "value": "s", @@ -2098,7 +2098,7 @@ "type": "Identifier", "span": { "start": 727, - "end": 735, + "end": 729, "ctxt": 0 }, "value": "tp", @@ -2352,7 +2352,7 @@ "type": "Identifier", "span": { "start": 814, - "end": 823, + "end": 815, "ctxt": 0 }, "value": "s", @@ -2388,7 +2388,7 @@ "type": "Identifier", "span": { "start": 825, - "end": 833, + "end": 827, "ctxt": 0 }, "value": "tp", @@ -2684,7 +2684,7 @@ "type": "Identifier", "span": { "start": 922, - "end": 931, + "end": 923, "ctxt": 0 }, "value": "s", @@ -2720,7 +2720,7 @@ "type": "Identifier", "span": { "start": 933, - "end": 941, + "end": 935, "ctxt": 0 }, "value": "tp", diff --git a/crates/swc_ecma_parser/tests/tsc/nonPrimitiveInFunction.json b/crates/swc_ecma_parser/tests/tsc/nonPrimitiveInFunction.json index d2320fc5caa4..00c33c95712f 100644 --- a/crates/swc_ecma_parser/tests/tsc/nonPrimitiveInFunction.json +++ b/crates/swc_ecma_parser/tests/tsc/nonPrimitiveInFunction.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 43, - "end": 52, + "end": 44, "ctxt": 0 }, "value": "o", diff --git a/crates/swc_ecma_parser/tests/tsc/nonPrimitiveInGeneric.json b/crates/swc_ecma_parser/tests/tsc/nonPrimitiveInGeneric.json index 1e02ada09447..1205abc5f11f 100644 --- a/crates/swc_ecma_parser/tests/tsc/nonPrimitiveInGeneric.json +++ b/crates/swc_ecma_parser/tests/tsc/nonPrimitiveInGeneric.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 43, - "end": 47, + "end": 44, "ctxt": 0 }, "value": "t", @@ -526,7 +526,7 @@ "type": "Identifier", "span": { "start": 268, - "end": 272, + "end": 269, "ctxt": 0 }, "value": "t", @@ -1141,7 +1141,7 @@ "type": "Identifier", "span": { "start": 555, - "end": 559, + "end": 556, "ctxt": 0 }, "value": "t", diff --git a/crates/swc_ecma_parser/tests/tsc/nullAssignableToEveryType.json b/crates/swc_ecma_parser/tests/tsc/nullAssignableToEveryType.json index 8031517ffdab..aaf75800e4d6 100644 --- a/crates/swc_ecma_parser/tests/tsc/nullAssignableToEveryType.json +++ b/crates/swc_ecma_parser/tests/tsc/nullAssignableToEveryType.json @@ -1021,7 +1021,7 @@ "type": "Identifier", "span": { "start": 333, - "end": 342, + "end": 334, "ctxt": 0 }, "value": "x", @@ -1393,7 +1393,7 @@ "type": "Identifier", "span": { "start": 461, - "end": 465, + "end": 462, "ctxt": 0 }, "value": "x", @@ -1660,7 +1660,7 @@ "type": "Identifier", "span": { "start": 560, - "end": 564, + "end": 561, "ctxt": 0 }, "value": "x", @@ -1706,7 +1706,7 @@ "type": "Identifier", "span": { "start": 566, - "end": 570, + "end": 567, "ctxt": 0 }, "value": "y", @@ -1752,7 +1752,7 @@ "type": "Identifier", "span": { "start": 572, - "end": 576, + "end": 573, "ctxt": 0 }, "value": "z", diff --git a/crates/swc_ecma_parser/tests/tsc/nullIsSubtypeOfEverythingButUndefined.json b/crates/swc_ecma_parser/tests/tsc/nullIsSubtypeOfEverythingButUndefined.json index 36e3005c1ead..42329a0e5c30 100644 --- a/crates/swc_ecma_parser/tests/tsc/nullIsSubtypeOfEverythingButUndefined.json +++ b/crates/swc_ecma_parser/tests/tsc/nullIsSubtypeOfEverythingButUndefined.json @@ -3569,7 +3569,7 @@ "type": "Identifier", "span": { "start": 1489, - "end": 1493, + "end": 1490, "ctxt": 0 }, "value": "x", @@ -3817,7 +3817,7 @@ "type": "Identifier", "span": { "start": 1581, - "end": 1585, + "end": 1582, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/nullOrUndefinedTypeGuardIsOrderIndependent.json b/crates/swc_ecma_parser/tests/tsc/nullOrUndefinedTypeGuardIsOrderIndependent.json index c7f2d75deaba..c2af22dea077 100644 --- a/crates/swc_ecma_parser/tests/tsc/nullOrUndefinedTypeGuardIsOrderIndependent.json +++ b/crates/swc_ecma_parser/tests/tsc/nullOrUndefinedTypeGuardIsOrderIndependent.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 42, - "end": 66, + "end": 51, "ctxt": 0 }, "value": "strOrNull", @@ -87,7 +87,7 @@ "type": "Identifier", "span": { "start": 68, - "end": 102, + "end": 82, "ctxt": 0 }, "value": "strOrUndefined", diff --git a/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperator6.json b/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperator6.json index e19d869b6845..8688d00880aa 100644 --- a/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperator6.json +++ b/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperator6.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 32, - "end": 43, + "end": 35, "ctxt": 0 }, "value": "foo", diff --git a/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperator9.json b/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperator9.json index f78e87335a5b..e03fda7fd327 100644 --- a/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperator9.json +++ b/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperator9.json @@ -75,7 +75,7 @@ "type": "Identifier", "span": { "start": 43, - "end": 52, + "end": 44, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperatorInAsyncGenerator.json b/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperatorInAsyncGenerator.json index e0fccc7d5860..5681f80afff2 100644 --- a/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperatorInAsyncGenerator.json +++ b/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperatorInAsyncGenerator.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 174, - "end": 191, + "end": 175, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/numericLiteralTypes1.json b/crates/swc_ecma_parser/tests/tsc/numericLiteralTypes1.json index c479cc24ab34..16b7230f00f2 100644 --- a/crates/swc_ecma_parser/tests/tsc/numericLiteralTypes1.json +++ b/crates/swc_ecma_parser/tests/tsc/numericLiteralTypes1.json @@ -1161,7 +1161,7 @@ "type": "Identifier", "span": { "start": 365, - "end": 369, + "end": 366, "ctxt": 0 }, "value": "a", @@ -1206,7 +1206,7 @@ "type": "Identifier", "span": { "start": 371, - "end": 383, + "end": 372, "ctxt": 0 }, "value": "b", @@ -2462,7 +2462,7 @@ "type": "Identifier", "span": { "start": 762, - "end": 766, + "end": 763, "ctxt": 0 }, "value": "a", @@ -2507,7 +2507,7 @@ "type": "Identifier", "span": { "start": 768, - "end": 780, + "end": 769, "ctxt": 0 }, "value": "b", @@ -2690,7 +2690,7 @@ "type": "Identifier", "span": { "start": 824, - "end": 828, + "end": 825, "ctxt": 0 }, "value": "x", @@ -2778,7 +2778,7 @@ "type": "Identifier", "span": { "start": 858, - "end": 862, + "end": 859, "ctxt": 0 }, "value": "x", @@ -2866,7 +2866,7 @@ "type": "Identifier", "span": { "start": 893, - "end": 902, + "end": 894, "ctxt": 0 }, "value": "x", @@ -2945,7 +2945,7 @@ "type": "Identifier", "span": { "start": 926, - "end": 930, + "end": 927, "ctxt": 0 }, "value": "a", @@ -2990,7 +2990,7 @@ "type": "Identifier", "span": { "start": 932, - "end": 944, + "end": 933, "ctxt": 0 }, "value": "b", @@ -3447,7 +3447,7 @@ "type": "Identifier", "span": { "start": 1067, - "end": 1075, + "end": 1068, "ctxt": 0 }, "value": "x", @@ -3661,7 +3661,7 @@ "type": "Identifier", "span": { "start": 1166, - "end": 1172, + "end": 1167, "ctxt": 0 }, "value": "x", @@ -3877,7 +3877,7 @@ "type": "Identifier", "span": { "start": 1299, - "end": 1305, + "end": 1300, "ctxt": 0 }, "value": "x", @@ -4135,7 +4135,7 @@ "type": "Identifier", "span": { "start": 1459, - "end": 1465, + "end": 1460, "ctxt": 0 }, "value": "x", @@ -4291,7 +4291,7 @@ "type": "Identifier", "span": { "start": 1543, - "end": 1549, + "end": 1544, "ctxt": 0 }, "value": "x", @@ -4504,7 +4504,7 @@ "type": "Identifier", "span": { "start": 1644, - "end": 1656, + "end": 1645, "ctxt": 0 }, "value": "x", @@ -4595,7 +4595,7 @@ "type": "Identifier", "span": { "start": 1658, - "end": 1667, + "end": 1659, "ctxt": 0 }, "value": "y", @@ -4789,7 +4789,7 @@ "type": "Identifier", "span": { "start": 1727, - "end": 1739, + "end": 1728, "ctxt": 0 }, "value": "x", @@ -4861,7 +4861,7 @@ "type": "Identifier", "span": { "start": 1741, - "end": 1753, + "end": 1742, "ctxt": 0 }, "value": "y", @@ -5649,7 +5649,7 @@ "type": "Identifier", "span": { "start": 1984, - "end": 1991, + "end": 1985, "ctxt": 0 }, "value": "x", @@ -5937,7 +5937,7 @@ "type": "Identifier", "span": { "start": 2123, - "end": 2130, + "end": 2124, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/numericLiteralTypes2.json b/crates/swc_ecma_parser/tests/tsc/numericLiteralTypes2.json index 2d5541533b84..70703bccc542 100644 --- a/crates/swc_ecma_parser/tests/tsc/numericLiteralTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/numericLiteralTypes2.json @@ -1161,7 +1161,7 @@ "type": "Identifier", "span": { "start": 393, - "end": 397, + "end": 394, "ctxt": 0 }, "value": "a", @@ -1206,7 +1206,7 @@ "type": "Identifier", "span": { "start": 399, - "end": 411, + "end": 400, "ctxt": 0 }, "value": "b", @@ -2462,7 +2462,7 @@ "type": "Identifier", "span": { "start": 790, - "end": 794, + "end": 791, "ctxt": 0 }, "value": "a", @@ -2507,7 +2507,7 @@ "type": "Identifier", "span": { "start": 796, - "end": 808, + "end": 797, "ctxt": 0 }, "value": "b", @@ -2690,7 +2690,7 @@ "type": "Identifier", "span": { "start": 852, - "end": 856, + "end": 853, "ctxt": 0 }, "value": "x", @@ -2778,7 +2778,7 @@ "type": "Identifier", "span": { "start": 886, - "end": 890, + "end": 887, "ctxt": 0 }, "value": "x", @@ -2866,7 +2866,7 @@ "type": "Identifier", "span": { "start": 921, - "end": 930, + "end": 922, "ctxt": 0 }, "value": "x", @@ -2945,7 +2945,7 @@ "type": "Identifier", "span": { "start": 954, - "end": 958, + "end": 955, "ctxt": 0 }, "value": "a", @@ -2990,7 +2990,7 @@ "type": "Identifier", "span": { "start": 960, - "end": 972, + "end": 961, "ctxt": 0 }, "value": "b", @@ -3447,7 +3447,7 @@ "type": "Identifier", "span": { "start": 1095, - "end": 1103, + "end": 1096, "ctxt": 0 }, "value": "x", @@ -3661,7 +3661,7 @@ "type": "Identifier", "span": { "start": 1194, - "end": 1200, + "end": 1195, "ctxt": 0 }, "value": "x", @@ -3877,7 +3877,7 @@ "type": "Identifier", "span": { "start": 1327, - "end": 1333, + "end": 1328, "ctxt": 0 }, "value": "x", @@ -4135,7 +4135,7 @@ "type": "Identifier", "span": { "start": 1487, - "end": 1493, + "end": 1488, "ctxt": 0 }, "value": "x", @@ -4291,7 +4291,7 @@ "type": "Identifier", "span": { "start": 1571, - "end": 1577, + "end": 1572, "ctxt": 0 }, "value": "x", @@ -4504,7 +4504,7 @@ "type": "Identifier", "span": { "start": 1672, - "end": 1684, + "end": 1673, "ctxt": 0 }, "value": "x", @@ -4595,7 +4595,7 @@ "type": "Identifier", "span": { "start": 1686, - "end": 1695, + "end": 1687, "ctxt": 0 }, "value": "y", @@ -4789,7 +4789,7 @@ "type": "Identifier", "span": { "start": 1755, - "end": 1767, + "end": 1756, "ctxt": 0 }, "value": "x", @@ -4861,7 +4861,7 @@ "type": "Identifier", "span": { "start": 1769, - "end": 1781, + "end": 1770, "ctxt": 0 }, "value": "y", @@ -5649,7 +5649,7 @@ "type": "Identifier", "span": { "start": 2012, - "end": 2019, + "end": 2013, "ctxt": 0 }, "value": "x", @@ -5937,7 +5937,7 @@ "type": "Identifier", "span": { "start": 2151, - "end": 2158, + "end": 2152, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/numericLiteralTypes3.json b/crates/swc_ecma_parser/tests/tsc/numericLiteralTypes3.json index 51aafcc1afab..7469c0ba23cd 100644 --- a/crates/swc_ecma_parser/tests/tsc/numericLiteralTypes3.json +++ b/crates/swc_ecma_parser/tests/tsc/numericLiteralTypes3.json @@ -304,7 +304,7 @@ "type": "Identifier", "span": { "start": 82, - "end": 86, + "end": 83, "ctxt": 0 }, "value": "a", @@ -350,7 +350,7 @@ "type": "Identifier", "span": { "start": 88, - "end": 92, + "end": 89, "ctxt": 0 }, "value": "b", @@ -396,7 +396,7 @@ "type": "Identifier", "span": { "start": 94, - "end": 98, + "end": 95, "ctxt": 0 }, "value": "c", @@ -442,7 +442,7 @@ "type": "Identifier", "span": { "start": 100, - "end": 104, + "end": 101, "ctxt": 0 }, "value": "d", @@ -676,7 +676,7 @@ "type": "Identifier", "span": { "start": 167, - "end": 171, + "end": 168, "ctxt": 0 }, "value": "a", @@ -722,7 +722,7 @@ "type": "Identifier", "span": { "start": 173, - "end": 177, + "end": 174, "ctxt": 0 }, "value": "b", @@ -768,7 +768,7 @@ "type": "Identifier", "span": { "start": 179, - "end": 183, + "end": 180, "ctxt": 0 }, "value": "c", @@ -814,7 +814,7 @@ "type": "Identifier", "span": { "start": 185, - "end": 189, + "end": 186, "ctxt": 0 }, "value": "d", @@ -1048,7 +1048,7 @@ "type": "Identifier", "span": { "start": 252, - "end": 256, + "end": 253, "ctxt": 0 }, "value": "a", @@ -1094,7 +1094,7 @@ "type": "Identifier", "span": { "start": 258, - "end": 262, + "end": 259, "ctxt": 0 }, "value": "b", @@ -1140,7 +1140,7 @@ "type": "Identifier", "span": { "start": 264, - "end": 268, + "end": 265, "ctxt": 0 }, "value": "c", @@ -1186,7 +1186,7 @@ "type": "Identifier", "span": { "start": 270, - "end": 274, + "end": 271, "ctxt": 0 }, "value": "d", @@ -1420,7 +1420,7 @@ "type": "Identifier", "span": { "start": 337, - "end": 341, + "end": 338, "ctxt": 0 }, "value": "a", @@ -1466,7 +1466,7 @@ "type": "Identifier", "span": { "start": 343, - "end": 347, + "end": 344, "ctxt": 0 }, "value": "b", @@ -1512,7 +1512,7 @@ "type": "Identifier", "span": { "start": 349, - "end": 353, + "end": 350, "ctxt": 0 }, "value": "c", @@ -1558,7 +1558,7 @@ "type": "Identifier", "span": { "start": 355, - "end": 359, + "end": 356, "ctxt": 0 }, "value": "d", @@ -1792,7 +1792,7 @@ "type": "Identifier", "span": { "start": 422, - "end": 426, + "end": 423, "ctxt": 0 }, "value": "a", @@ -1838,7 +1838,7 @@ "type": "Identifier", "span": { "start": 428, - "end": 432, + "end": 429, "ctxt": 0 }, "value": "b", @@ -1884,7 +1884,7 @@ "type": "Identifier", "span": { "start": 434, - "end": 438, + "end": 435, "ctxt": 0 }, "value": "c", @@ -1930,7 +1930,7 @@ "type": "Identifier", "span": { "start": 440, - "end": 444, + "end": 441, "ctxt": 0 }, "value": "d", @@ -2620,7 +2620,7 @@ "type": "Identifier", "span": { "start": 639, - "end": 643, + "end": 640, "ctxt": 0 }, "value": "a", @@ -2666,7 +2666,7 @@ "type": "Identifier", "span": { "start": 645, - "end": 649, + "end": 646, "ctxt": 0 }, "value": "b", @@ -2712,7 +2712,7 @@ "type": "Identifier", "span": { "start": 651, - "end": 655, + "end": 652, "ctxt": 0 }, "value": "c", @@ -2758,7 +2758,7 @@ "type": "Identifier", "span": { "start": 657, - "end": 661, + "end": 658, "ctxt": 0 }, "value": "d", @@ -3432,7 +3432,7 @@ "type": "Identifier", "span": { "start": 888, - "end": 892, + "end": 889, "ctxt": 0 }, "value": "a", @@ -3478,7 +3478,7 @@ "type": "Identifier", "span": { "start": 894, - "end": 898, + "end": 895, "ctxt": 0 }, "value": "b", @@ -3524,7 +3524,7 @@ "type": "Identifier", "span": { "start": 900, - "end": 904, + "end": 901, "ctxt": 0 }, "value": "c", @@ -3570,7 +3570,7 @@ "type": "Identifier", "span": { "start": 906, - "end": 910, + "end": 907, "ctxt": 0 }, "value": "d", @@ -4244,7 +4244,7 @@ "type": "Identifier", "span": { "start": 1137, - "end": 1149, + "end": 1138, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/numericStringLiteralTypes.json b/crates/swc_ecma_parser/tests/tsc/numericStringLiteralTypes.json index f50c88cbcf8f..13039e8f258c 100644 --- a/crates/swc_ecma_parser/tests/tsc/numericStringLiteralTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/numericStringLiteralTypes.json @@ -652,7 +652,7 @@ "type": "Identifier", "span": { "start": 331, - "end": 343, + "end": 332, "ctxt": 0 }, "value": "a", @@ -696,7 +696,7 @@ "type": "Identifier", "span": { "start": 345, - "end": 359, + "end": 346, "ctxt": 0 }, "value": "x", @@ -878,7 +878,7 @@ "type": "Identifier", "span": { "start": 408, - "end": 420, + "end": 409, "ctxt": 0 }, "value": "a", @@ -922,7 +922,7 @@ "type": "Identifier", "span": { "start": 422, - "end": 445, + "end": 423, "ctxt": 0 }, "value": "x", @@ -1996,7 +1996,7 @@ "type": "Identifier", "span": { "start": 875, - "end": 883, + "end": 880, "ctxt": 0 }, "value": "value", @@ -2163,7 +2163,7 @@ "type": "Identifier", "span": { "start": 952, - "end": 970, + "end": 962, "ctxt": 0 }, "value": "containers", @@ -2236,7 +2236,7 @@ "type": "Identifier", "span": { "start": 972, - "end": 1022, + "end": 980, "ctxt": 0 }, "value": "callback", diff --git a/crates/swc_ecma_parser/tests/tsc/objectLiteralContextualTyping.json b/crates/swc_ecma_parser/tests/tsc/objectLiteralContextualTyping.json index e283e79aa27d..9286b1ae921f 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectLiteralContextualTyping.json +++ b/crates/swc_ecma_parser/tests/tsc/objectLiteralContextualTyping.json @@ -145,7 +145,7 @@ "type": "Identifier", "span": { "start": 457, - "end": 467, + "end": 461, "ctxt": 0 }, "value": "item", @@ -234,7 +234,7 @@ "type": "Identifier", "span": { "start": 499, - "end": 508, + "end": 503, "ctxt": 0 }, "value": "item", @@ -910,7 +910,7 @@ "type": "Identifier", "span": { "start": 785, - "end": 801, + "end": 790, "ctxt": 0 }, "value": "param", diff --git a/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignment.json b/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignment.json index 1699542d5d8d..e2e3420abcc6 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignment.json +++ b/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignment.json @@ -309,7 +309,7 @@ "type": "Identifier", "span": { "start": 140, - "end": 160, + "end": 143, "ctxt": 0 }, "value": "obj", @@ -446,7 +446,7 @@ "type": "Identifier", "span": { "start": 186, - "end": 198, + "end": 190, "ctxt": 0 }, "value": "name", @@ -482,7 +482,7 @@ "type": "Identifier", "span": { "start": 200, - "end": 210, + "end": 202, "ctxt": 0 }, "value": "id", @@ -592,7 +592,7 @@ "type": "Identifier", "span": { "start": 251, - "end": 263, + "end": 255, "ctxt": 0 }, "value": "name", @@ -628,7 +628,7 @@ "type": "Identifier", "span": { "start": 265, - "end": 275, + "end": 267, "ctxt": 0 }, "value": "id", @@ -728,7 +728,7 @@ "type": "Identifier", "span": { "start": 311, - "end": 323, + "end": 315, "ctxt": 0 }, "value": "name", @@ -764,7 +764,7 @@ "type": "Identifier", "span": { "start": 325, - "end": 335, + "end": 327, "ctxt": 0 }, "value": "id", diff --git a/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignmentES6.json b/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignmentES6.json index 8a9c6307f372..56f96a1e6e91 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignmentES6.json +++ b/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignmentES6.json @@ -309,7 +309,7 @@ "type": "Identifier", "span": { "start": 155, - "end": 176, + "end": 158, "ctxt": 0 }, "value": "obj", @@ -446,7 +446,7 @@ "type": "Identifier", "span": { "start": 202, - "end": 214, + "end": 206, "ctxt": 0 }, "value": "name", @@ -482,7 +482,7 @@ "type": "Identifier", "span": { "start": 216, - "end": 226, + "end": 218, "ctxt": 0 }, "value": "id", @@ -592,7 +592,7 @@ "type": "Identifier", "span": { "start": 267, - "end": 279, + "end": 271, "ctxt": 0 }, "value": "name", @@ -628,7 +628,7 @@ "type": "Identifier", "span": { "start": 281, - "end": 291, + "end": 283, "ctxt": 0 }, "value": "id", @@ -728,7 +728,7 @@ "type": "Identifier", "span": { "start": 327, - "end": 339, + "end": 331, "ctxt": 0 }, "value": "name", @@ -764,7 +764,7 @@ "type": "Identifier", "span": { "start": 341, - "end": 351, + "end": 343, "ctxt": 0 }, "value": "id", diff --git a/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignmentError.json b/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignmentError.json index 34296b08d6ce..a14aa0e75879 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignmentError.json +++ b/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignmentError.json @@ -409,7 +409,7 @@ "type": "Identifier", "span": { "start": 180, - "end": 192, + "end": 184, "ctxt": 0 }, "value": "name", @@ -445,7 +445,7 @@ "type": "Identifier", "span": { "start": 194, - "end": 204, + "end": 196, "ctxt": 0 }, "value": "id", @@ -654,7 +654,7 @@ "type": "Identifier", "span": { "start": 284, - "end": 318, + "end": 287, "ctxt": 0 }, "value": "obj", diff --git a/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.json b/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.json index a68374e4009c..a3ba6f8480a0 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.json +++ b/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.json @@ -309,7 +309,7 @@ "type": "Identifier", "span": { "start": 146, - "end": 158, + "end": 150, "ctxt": 0 }, "value": "name", @@ -345,7 +345,7 @@ "type": "Identifier", "span": { "start": 160, - "end": 170, + "end": 162, "ctxt": 0 }, "value": "id", @@ -554,7 +554,7 @@ "type": "Identifier", "span": { "start": 250, - "end": 262, + "end": 254, "ctxt": 0 }, "value": "name", @@ -590,7 +590,7 @@ "type": "Identifier", "span": { "start": 264, - "end": 274, + "end": 266, "ctxt": 0 }, "value": "id", diff --git a/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesFunctionArgument.json b/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesFunctionArgument.json index 467022bdd79d..27077d999dd2 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesFunctionArgument.json +++ b/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesFunctionArgument.json @@ -210,7 +210,7 @@ "type": "Identifier", "span": { "start": 110, - "end": 141, + "end": 111, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesFunctionArgument2.json b/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesFunctionArgument2.json index 9487b2b35acc..301e57772310 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesFunctionArgument2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesFunctionArgument2.json @@ -210,7 +210,7 @@ "type": "Identifier", "span": { "start": 110, - "end": 138, + "end": 111, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/objectRest.json b/crates/swc_ecma_parser/tests/tsc/objectRest.json index 0e44acaccc4b..80a4a9c4e343 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectRest.json +++ b/crates/swc_ecma_parser/tests/tsc/objectRest.json @@ -2449,7 +2449,7 @@ "type": "Identifier", "span": { "start": 833, - "end": 846, + "end": 838, "ctxt": 0 }, "value": "value", @@ -2613,7 +2613,7 @@ "type": "Identifier", "span": { "start": 902, - "end": 915, + "end": 907, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/objectRest2.json b/crates/swc_ecma_parser/tests/tsc/objectRest2.json index 413ad6b0843e..1f569410a675 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectRest2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectRest2.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 92, - "end": 107, + "end": 99, "ctxt": 0 }, "value": "objects", @@ -68,7 +68,7 @@ "type": "Identifier", "span": { "start": 109, - "end": 118, + "end": 113, "ctxt": 0 }, "value": "args", @@ -147,7 +147,7 @@ "type": "Identifier", "span": { "start": 149, - "end": 161, + "end": 153, "ctxt": 0 }, "value": "name", diff --git a/crates/swc_ecma_parser/tests/tsc/objectRestNegative.json b/crates/swc_ecma_parser/tests/tsc/objectRestNegative.json index d42f26289e3d..5a6e9eb6e95d 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectRestNegative.json +++ b/crates/swc_ecma_parser/tests/tsc/objectRestNegative.json @@ -656,7 +656,7 @@ "type": "Identifier", "span": { "start": 285, - "end": 289, + "end": 286, "ctxt": 0 }, "value": "t", diff --git a/crates/swc_ecma_parser/tests/tsc/objectRestParameter.json b/crates/swc_ecma_parser/tests/tsc/objectRestParameter.json index b1b1f8117e68..0d830ce38db9 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectRestParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/objectRestParameter.json @@ -248,7 +248,7 @@ "type": "Identifier", "span": { "start": 120, - "end": 163, + "end": 121, "ctxt": 0 }, "value": "f", @@ -272,7 +272,7 @@ "type": "Identifier", "span": { "start": 124, - "end": 154, + "end": 125, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/objectRestParameterES5.json b/crates/swc_ecma_parser/tests/tsc/objectRestParameterES5.json index 39b1190c7bb8..0fade53733b9 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectRestParameterES5.json +++ b/crates/swc_ecma_parser/tests/tsc/objectRestParameterES5.json @@ -248,7 +248,7 @@ "type": "Identifier", "span": { "start": 117, - "end": 160, + "end": 118, "ctxt": 0 }, "value": "f", @@ -272,7 +272,7 @@ "type": "Identifier", "span": { "start": 121, - "end": 151, + "end": 122, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/objectSpread.json b/crates/swc_ecma_parser/tests/tsc/objectSpread.json index 9557303e7ec2..9f449f24c029 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectSpread.json +++ b/crates/swc_ecma_parser/tests/tsc/objectSpread.json @@ -2801,7 +2801,7 @@ "type": "Identifier", "span": { "start": 1211, - "end": 1235, + "end": 1215, "ctxt": 0 }, "value": "this", @@ -2889,7 +2889,7 @@ "type": "Identifier", "span": { "start": 1237, - "end": 1251, + "end": 1243, "ctxt": 0 }, "value": "header", @@ -2935,7 +2935,7 @@ "type": "Identifier", "span": { "start": 1253, - "end": 1270, + "end": 1262, "ctxt": 0 }, "value": "authToken", @@ -3150,7 +3150,7 @@ "type": "Identifier", "span": { "start": 1456, - "end": 1466, + "end": 1457, "ctxt": 0 }, "value": "b", @@ -3645,7 +3645,7 @@ "type": "Identifier", "span": { "start": 1665, - "end": 1675, + "end": 1667, "ctxt": 0 }, "value": "nt", @@ -4140,7 +4140,7 @@ "type": "Identifier", "span": { "start": 1875, - "end": 1885, + "end": 1877, "ctxt": 0 }, "value": "st", @@ -5701,7 +5701,7 @@ "type": "Identifier", "span": { "start": 2616, - "end": 2648, + "end": 2631, "ctxt": 0 }, "value": "definiteBoolean", @@ -5779,7 +5779,7 @@ "type": "Identifier", "span": { "start": 2654, - "end": 2684, + "end": 2668, "ctxt": 0 }, "value": "definiteString", @@ -5857,7 +5857,7 @@ "type": "Identifier", "span": { "start": 2690, - "end": 2721, + "end": 2704, "ctxt": 0 }, "value": "optionalString", @@ -5935,7 +5935,7 @@ "type": "Identifier", "span": { "start": 2727, - "end": 2758, + "end": 2741, "ctxt": 0 }, "value": "optionalNumber", @@ -7372,7 +7372,7 @@ "type": "Identifier", "span": { "start": 3584, - "end": 3588, + "end": 3585, "ctxt": 0 }, "value": "t", @@ -7418,7 +7418,7 @@ "type": "Identifier", "span": { "start": 3590, - "end": 3594, + "end": 3591, "ctxt": 0 }, "value": "u", @@ -8887,7 +8887,7 @@ "type": "Identifier", "span": { "start": 4079, - "end": 4083, + "end": 4080, "ctxt": 0 }, "value": "t", @@ -8933,7 +8933,7 @@ "type": "Identifier", "span": { "start": 4085, - "end": 4089, + "end": 4086, "ctxt": 0 }, "value": "u", @@ -8979,7 +8979,7 @@ "type": "Identifier", "span": { "start": 4091, - "end": 4099, + "end": 4092, "ctxt": 0 }, "value": "v", @@ -9054,7 +9054,7 @@ "type": "Identifier", "span": { "start": 4101, - "end": 4121, + "end": 4102, "ctxt": 0 }, "value": "w", @@ -9161,7 +9161,7 @@ "type": "Identifier", "span": { "start": 4123, - "end": 4141, + "end": 4126, "ctxt": 0 }, "value": "obj", diff --git a/crates/swc_ecma_parser/tests/tsc/objectSpreadRepeatedComplexity.json b/crates/swc_ecma_parser/tests/tsc/objectSpreadRepeatedComplexity.json index ae7886f1a6e3..2c279cdd66aa 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectSpreadRepeatedComplexity.json +++ b/crates/swc_ecma_parser/tests/tsc/objectSpreadRepeatedComplexity.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 29, - "end": 57, + "end": 32, "ctxt": 0 }, "value": "cnd", diff --git a/crates/swc_ecma_parser/tests/tsc/objectSpreadRepeatedNullCheckPerf.json b/crates/swc_ecma_parser/tests/tsc/objectSpreadRepeatedNullCheckPerf.json index ca74f6f38ed9..d201e8e7b0b8 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectSpreadRepeatedNullCheckPerf.json +++ b/crates/swc_ecma_parser/tests/tsc/objectSpreadRepeatedNullCheckPerf.json @@ -1129,7 +1129,7 @@ "type": "Identifier", "span": { "start": 688, - "end": 718, + "end": 694, "ctxt": 0 }, "value": "config", diff --git a/crates/swc_ecma_parser/tests/tsc/objectSpreadSetonlyAccessor.json b/crates/swc_ecma_parser/tests/tsc/objectSpreadSetonlyAccessor.json index d325f8b54a4f..7b9b75c4b840 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectSpreadSetonlyAccessor.json +++ b/crates/swc_ecma_parser/tests/tsc/objectSpreadSetonlyAccessor.json @@ -201,7 +201,7 @@ "type": "Identifier", "span": { "start": 105, - "end": 115, + "end": 107, "ctxt": 0 }, "value": "_v", @@ -397,7 +397,7 @@ "type": "Identifier", "span": { "start": 180, - "end": 190, + "end": 182, "ctxt": 0 }, "value": "_v", diff --git a/crates/swc_ecma_parser/tests/tsc/objectSpreadStrictNull.json b/crates/swc_ecma_parser/tests/tsc/objectSpreadStrictNull.json index 83368e64efd2..4957c2254ed4 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectSpreadStrictNull.json +++ b/crates/swc_ecma_parser/tests/tsc/objectSpreadStrictNull.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 45, - "end": 77, + "end": 60, "ctxt": 0 }, "value": "definiteBoolean", @@ -110,7 +110,7 @@ "type": "Identifier", "span": { "start": 83, - "end": 113, + "end": 97, "ctxt": 0 }, "value": "definiteString", @@ -188,7 +188,7 @@ "type": "Identifier", "span": { "start": 119, - "end": 150, + "end": 133, "ctxt": 0 }, "value": "optionalString", @@ -266,7 +266,7 @@ "type": "Identifier", "span": { "start": 156, - "end": 187, + "end": 170, "ctxt": 0 }, "value": "optionalNumber", @@ -344,7 +344,7 @@ "type": "Identifier", "span": { "start": 193, - "end": 236, + "end": 208, "ctxt": 0 }, "value": "undefinedString", @@ -441,7 +441,7 @@ "type": "Identifier", "span": { "start": 242, - "end": 285, + "end": 257, "ctxt": 0 }, "value": "undefinedNumber", @@ -2376,7 +2376,7 @@ "type": "Identifier", "span": { "start": 1573, - "end": 1587, + "end": 1579, "ctxt": 0 }, "value": "fields", @@ -2422,7 +2422,7 @@ "type": "Identifier", "span": { "start": 1589, - "end": 1619, + "end": 1602, "ctxt": 0 }, "value": "partialFields", @@ -2496,7 +2496,7 @@ "type": "Identifier", "span": { "start": 1621, - "end": 1661, + "end": 1640, "ctxt": 0 }, "value": "nearlyPartialFields", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypeWithCallSignatureAppearsToBeFunctionType.json b/crates/swc_ecma_parser/tests/tsc/objectTypeWithCallSignatureAppearsToBeFunctionType.json index eaa5cd284f5e..970124188b66 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypeWithCallSignatureAppearsToBeFunctionType.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypeWithCallSignatureAppearsToBeFunctionType.json @@ -236,7 +236,7 @@ "type": "Identifier", "span": { "start": 187, - "end": 193, + "end": 188, "ctxt": 0 }, "value": "x", @@ -263,7 +263,7 @@ "type": "Identifier", "span": { "start": 195, - "end": 202, + "end": 196, "ctxt": 0 }, "value": "y", @@ -530,7 +530,7 @@ "type": "Identifier", "span": { "start": 279, - "end": 285, + "end": 280, "ctxt": 0 }, "value": "x", @@ -557,7 +557,7 @@ "type": "Identifier", "span": { "start": 287, - "end": 294, + "end": 288, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypeWithCallSignatureHidingMembersOfExtendedFunction.json b/crates/swc_ecma_parser/tests/tsc/objectTypeWithCallSignatureHidingMembersOfExtendedFunction.json index 96fbe57ed68b..67fb34cbbcf6 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypeWithCallSignatureHidingMembersOfExtendedFunction.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypeWithCallSignatureHidingMembersOfExtendedFunction.json @@ -224,7 +224,7 @@ "type": "Identifier", "span": { "start": 206, - "end": 212, + "end": 207, "ctxt": 0 }, "value": "a", @@ -251,7 +251,7 @@ "type": "Identifier", "span": { "start": 214, - "end": 221, + "end": 215, "ctxt": 0 }, "value": "b", @@ -319,7 +319,7 @@ "type": "Identifier", "span": { "start": 239, - "end": 254, + "end": 246, "ctxt": 0 }, "value": "thisArg", @@ -518,7 +518,7 @@ "type": "Identifier", "span": { "start": 307, - "end": 313, + "end": 308, "ctxt": 0 }, "value": "a", @@ -545,7 +545,7 @@ "type": "Identifier", "span": { "start": 315, - "end": 322, + "end": 316, "ctxt": 0 }, "value": "b", @@ -667,7 +667,7 @@ "type": "Identifier", "span": { "start": 353, - "end": 368, + "end": 360, "ctxt": 0 }, "value": "thisArg", @@ -1074,7 +1074,7 @@ "type": "Identifier", "span": { "start": 525, - "end": 531, + "end": 526, "ctxt": 0 }, "value": "a", @@ -1101,7 +1101,7 @@ "type": "Identifier", "span": { "start": 533, - "end": 540, + "end": 534, "ctxt": 0 }, "value": "b", @@ -1169,7 +1169,7 @@ "type": "Identifier", "span": { "start": 558, - "end": 573, + "end": 565, "ctxt": 0 }, "value": "thisArg", @@ -1315,7 +1315,7 @@ "type": "Identifier", "span": { "start": 616, - "end": 622, + "end": 617, "ctxt": 0 }, "value": "a", @@ -1342,7 +1342,7 @@ "type": "Identifier", "span": { "start": 624, - "end": 631, + "end": 625, "ctxt": 0 }, "value": "b", @@ -1464,7 +1464,7 @@ "type": "Identifier", "span": { "start": 662, - "end": 677, + "end": 669, "ctxt": 0 }, "value": "thisArg", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypeWithCallSignatureHidingMembersOfFunction.json b/crates/swc_ecma_parser/tests/tsc/objectTypeWithCallSignatureHidingMembersOfFunction.json index e4e26c295c08..fa389d169320 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypeWithCallSignatureHidingMembersOfFunction.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypeWithCallSignatureHidingMembersOfFunction.json @@ -86,7 +86,7 @@ "type": "Identifier", "span": { "start": 139, - "end": 145, + "end": 140, "ctxt": 0 }, "value": "a", @@ -113,7 +113,7 @@ "type": "Identifier", "span": { "start": 147, - "end": 154, + "end": 148, "ctxt": 0 }, "value": "b", @@ -181,7 +181,7 @@ "type": "Identifier", "span": { "start": 172, - "end": 187, + "end": 179, "ctxt": 0 }, "value": "thisArg", @@ -380,7 +380,7 @@ "type": "Identifier", "span": { "start": 240, - "end": 246, + "end": 241, "ctxt": 0 }, "value": "a", @@ -407,7 +407,7 @@ "type": "Identifier", "span": { "start": 248, - "end": 255, + "end": 249, "ctxt": 0 }, "value": "b", @@ -529,7 +529,7 @@ "type": "Identifier", "span": { "start": 286, - "end": 301, + "end": 293, "ctxt": 0 }, "value": "thisArg", @@ -808,7 +808,7 @@ "type": "Identifier", "span": { "start": 401, - "end": 407, + "end": 402, "ctxt": 0 }, "value": "a", @@ -835,7 +835,7 @@ "type": "Identifier", "span": { "start": 409, - "end": 416, + "end": 410, "ctxt": 0 }, "value": "b", @@ -903,7 +903,7 @@ "type": "Identifier", "span": { "start": 434, - "end": 449, + "end": 441, "ctxt": 0 }, "value": "thisArg", @@ -1049,7 +1049,7 @@ "type": "Identifier", "span": { "start": 492, - "end": 498, + "end": 493, "ctxt": 0 }, "value": "a", @@ -1076,7 +1076,7 @@ "type": "Identifier", "span": { "start": 500, - "end": 507, + "end": 501, "ctxt": 0 }, "value": "b", @@ -1198,7 +1198,7 @@ "type": "Identifier", "span": { "start": 538, - "end": 553, + "end": 545, "ctxt": 0 }, "value": "thisArg", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypeWithConstructSignatureAppearsToBeFunctionType.json b/crates/swc_ecma_parser/tests/tsc/objectTypeWithConstructSignatureAppearsToBeFunctionType.json index eab2f5b8ac84..89577bf43ca5 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypeWithConstructSignatureAppearsToBeFunctionType.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypeWithConstructSignatureAppearsToBeFunctionType.json @@ -304,7 +304,7 @@ "type": "Identifier", "span": { "start": 136, - "end": 142, + "end": 137, "ctxt": 0 }, "value": "x", @@ -331,7 +331,7 @@ "type": "Identifier", "span": { "start": 144, - "end": 151, + "end": 145, "ctxt": 0 }, "value": "y", @@ -666,7 +666,7 @@ "type": "Identifier", "span": { "start": 262, - "end": 268, + "end": 263, "ctxt": 0 }, "value": "x", @@ -693,7 +693,7 @@ "type": "Identifier", "span": { "start": 270, - "end": 277, + "end": 271, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.json b/crates/swc_ecma_parser/tests/tsc/objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.json index 61379c9f94a1..1d471337388f 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.json @@ -224,7 +224,7 @@ "type": "Identifier", "span": { "start": 111, - "end": 117, + "end": 112, "ctxt": 0 }, "value": "a", @@ -251,7 +251,7 @@ "type": "Identifier", "span": { "start": 119, - "end": 126, + "end": 120, "ctxt": 0 }, "value": "b", @@ -319,7 +319,7 @@ "type": "Identifier", "span": { "start": 144, - "end": 159, + "end": 151, "ctxt": 0 }, "value": "thisArg", @@ -518,7 +518,7 @@ "type": "Identifier", "span": { "start": 212, - "end": 218, + "end": 213, "ctxt": 0 }, "value": "a", @@ -545,7 +545,7 @@ "type": "Identifier", "span": { "start": 220, - "end": 227, + "end": 221, "ctxt": 0 }, "value": "b", @@ -667,7 +667,7 @@ "type": "Identifier", "span": { "start": 258, - "end": 273, + "end": 265, "ctxt": 0 }, "value": "thisArg", @@ -1074,7 +1074,7 @@ "type": "Identifier", "span": { "start": 435, - "end": 441, + "end": 436, "ctxt": 0 }, "value": "a", @@ -1101,7 +1101,7 @@ "type": "Identifier", "span": { "start": 443, - "end": 450, + "end": 444, "ctxt": 0 }, "value": "b", @@ -1169,7 +1169,7 @@ "type": "Identifier", "span": { "start": 468, - "end": 483, + "end": 475, "ctxt": 0 }, "value": "thisArg", @@ -1315,7 +1315,7 @@ "type": "Identifier", "span": { "start": 526, - "end": 532, + "end": 527, "ctxt": 0 }, "value": "a", @@ -1342,7 +1342,7 @@ "type": "Identifier", "span": { "start": 534, - "end": 541, + "end": 535, "ctxt": 0 }, "value": "b", @@ -1464,7 +1464,7 @@ "type": "Identifier", "span": { "start": 572, - "end": 587, + "end": 579, "ctxt": 0 }, "value": "thisArg", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypeWithConstructSignatureHidingMembersOfFunction.json b/crates/swc_ecma_parser/tests/tsc/objectTypeWithConstructSignatureHidingMembersOfFunction.json index 37881347eb08..078161e5809c 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypeWithConstructSignatureHidingMembersOfFunction.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypeWithConstructSignatureHidingMembersOfFunction.json @@ -86,7 +86,7 @@ "type": "Identifier", "span": { "start": 44, - "end": 50, + "end": 45, "ctxt": 0 }, "value": "a", @@ -113,7 +113,7 @@ "type": "Identifier", "span": { "start": 52, - "end": 59, + "end": 53, "ctxt": 0 }, "value": "b", @@ -181,7 +181,7 @@ "type": "Identifier", "span": { "start": 77, - "end": 92, + "end": 84, "ctxt": 0 }, "value": "thisArg", @@ -380,7 +380,7 @@ "type": "Identifier", "span": { "start": 145, - "end": 151, + "end": 146, "ctxt": 0 }, "value": "a", @@ -407,7 +407,7 @@ "type": "Identifier", "span": { "start": 153, - "end": 160, + "end": 154, "ctxt": 0 }, "value": "b", @@ -529,7 +529,7 @@ "type": "Identifier", "span": { "start": 191, - "end": 206, + "end": 198, "ctxt": 0 }, "value": "thisArg", @@ -808,7 +808,7 @@ "type": "Identifier", "span": { "start": 311, - "end": 317, + "end": 312, "ctxt": 0 }, "value": "a", @@ -835,7 +835,7 @@ "type": "Identifier", "span": { "start": 319, - "end": 326, + "end": 320, "ctxt": 0 }, "value": "b", @@ -903,7 +903,7 @@ "type": "Identifier", "span": { "start": 344, - "end": 359, + "end": 351, "ctxt": 0 }, "value": "thisArg", @@ -1049,7 +1049,7 @@ "type": "Identifier", "span": { "start": 402, - "end": 408, + "end": 403, "ctxt": 0 }, "value": "a", @@ -1076,7 +1076,7 @@ "type": "Identifier", "span": { "start": 410, - "end": 417, + "end": 411, "ctxt": 0 }, "value": "b", @@ -1198,7 +1198,7 @@ "type": "Identifier", "span": { "start": 448, - "end": 463, + "end": 455, "ctxt": 0 }, "value": "thisArg", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypeWithRecursiveWrappedPropertyCheckedNominally.json b/crates/swc_ecma_parser/tests/tsc/objectTypeWithRecursiveWrappedPropertyCheckedNominally.json index 20b631c58999..019df53d51d3 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypeWithRecursiveWrappedPropertyCheckedNominally.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypeWithRecursiveWrappedPropertyCheckedNominally.json @@ -1148,7 +1148,7 @@ "type": "Identifier", "span": { "start": 711, - "end": 715, + "end": 712, "ctxt": 0 }, "value": "t", @@ -1194,7 +1194,7 @@ "type": "Identifier", "span": { "start": 717, - "end": 721, + "end": 718, "ctxt": 0 }, "value": "u", @@ -1785,7 +1785,7 @@ "type": "Identifier", "span": { "start": 948, - "end": 952, + "end": 949, "ctxt": 0 }, "value": "t", @@ -1831,7 +1831,7 @@ "type": "Identifier", "span": { "start": 954, - "end": 958, + "end": 955, "ctxt": 0 }, "value": "u", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypeWithStringAndNumberIndexSignatureToAny.json b/crates/swc_ecma_parser/tests/tsc/objectTypeWithStringAndNumberIndexSignatureToAny.json index 200c7321c6f6..fd66a3142082 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypeWithStringAndNumberIndexSignatureToAny.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypeWithStringAndNumberIndexSignatureToAny.json @@ -560,7 +560,7 @@ "type": "Identifier", "span": { "start": 808, - "end": 829, + "end": 814, "ctxt": 0 }, "value": "sToAny", @@ -624,7 +624,7 @@ "type": "Identifier", "span": { "start": 831, - "end": 852, + "end": 837, "ctxt": 0 }, "value": "nToAny", @@ -688,7 +688,7 @@ "type": "Identifier", "span": { "start": 854, - "end": 887, + "end": 863, "ctxt": 0 }, "value": "bothToAny", @@ -752,7 +752,7 @@ "type": "Identifier", "span": { "start": 889, - "end": 901, + "end": 896, "ctxt": 0 }, "value": "someObj", @@ -1290,7 +1290,7 @@ "type": "Identifier", "span": { "start": 1199, - "end": 1220, + "end": 1205, "ctxt": 0 }, "value": "sToAny", @@ -1354,7 +1354,7 @@ "type": "Identifier", "span": { "start": 1222, - "end": 1243, + "end": 1228, "ctxt": 0 }, "value": "nToAny", @@ -1418,7 +1418,7 @@ "type": "Identifier", "span": { "start": 1245, - "end": 1285, + "end": 1254, "ctxt": 0 }, "value": "bothToAny", @@ -1529,7 +1529,7 @@ "type": "Identifier", "span": { "start": 1287, - "end": 1299, + "end": 1294, "ctxt": 0 }, "value": "someObj", @@ -2211,7 +2211,7 @@ "type": "Identifier", "span": { "start": 1717, - "end": 1738, + "end": 1723, "ctxt": 0 }, "value": "sToAny", @@ -2275,7 +2275,7 @@ "type": "Identifier", "span": { "start": 1740, - "end": 1765, + "end": 1749, "ctxt": 0 }, "value": "nToNumber", @@ -2321,7 +2321,7 @@ "type": "Identifier", "span": { "start": 1767, - "end": 1810, + "end": 1783, "ctxt": 0 }, "value": "strToAnyNumToNum", @@ -2367,7 +2367,7 @@ "type": "Identifier", "span": { "start": 1812, - "end": 1824, + "end": 1819, "ctxt": 0 }, "value": "someObj", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentity.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentity.json index 459ff4828ba0..c37ca13daa22 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentity.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentity.json @@ -518,7 +518,7 @@ "type": "Identifier", "span": { "start": 227, - "end": 231, + "end": 228, "ctxt": 0 }, "value": "x", @@ -591,7 +591,7 @@ "type": "Identifier", "span": { "start": 248, - "end": 252, + "end": 249, "ctxt": 0 }, "value": "x", @@ -664,7 +664,7 @@ "type": "Identifier", "span": { "start": 278, - "end": 284, + "end": 279, "ctxt": 0 }, "value": "x", @@ -735,7 +735,7 @@ "type": "Identifier", "span": { "start": 306, - "end": 310, + "end": 307, "ctxt": 0 }, "value": "x", @@ -808,7 +808,7 @@ "type": "Identifier", "span": { "start": 328, - "end": 332, + "end": 329, "ctxt": 0 }, "value": "x", @@ -881,7 +881,7 @@ "type": "Identifier", "span": { "start": 359, - "end": 365, + "end": 360, "ctxt": 0 }, "value": "x", @@ -952,7 +952,7 @@ "type": "Identifier", "span": { "start": 387, - "end": 399, + "end": 388, "ctxt": 0 }, "value": "x", @@ -1043,7 +1043,7 @@ "type": "Identifier", "span": { "start": 417, - "end": 429, + "end": 418, "ctxt": 0 }, "value": "x", @@ -1134,7 +1134,7 @@ "type": "Identifier", "span": { "start": 456, - "end": 462, + "end": 457, "ctxt": 0 }, "value": "x", @@ -1205,7 +1205,7 @@ "type": "Identifier", "span": { "start": 483, - "end": 487, + "end": 484, "ctxt": 0 }, "value": "x", @@ -1278,7 +1278,7 @@ "type": "Identifier", "span": { "start": 504, - "end": 508, + "end": 505, "ctxt": 0 }, "value": "x", @@ -1351,7 +1351,7 @@ "type": "Identifier", "span": { "start": 534, - "end": 540, + "end": 535, "ctxt": 0 }, "value": "x", @@ -1422,7 +1422,7 @@ "type": "Identifier", "span": { "start": 561, - "end": 572, + "end": 562, "ctxt": 0 }, "value": "x", @@ -1495,7 +1495,7 @@ "type": "Identifier", "span": { "start": 589, - "end": 600, + "end": 590, "ctxt": 0 }, "value": "x", @@ -1568,7 +1568,7 @@ "type": "Identifier", "span": { "start": 626, - "end": 632, + "end": 627, "ctxt": 0 }, "value": "x", @@ -1639,7 +1639,7 @@ "type": "Identifier", "span": { "start": 653, - "end": 664, + "end": 654, "ctxt": 0 }, "value": "x", @@ -1712,7 +1712,7 @@ "type": "Identifier", "span": { "start": 681, - "end": 692, + "end": 682, "ctxt": 0 }, "value": "x", @@ -1785,7 +1785,7 @@ "type": "Identifier", "span": { "start": 718, - "end": 724, + "end": 719, "ctxt": 0 }, "value": "x", @@ -1856,7 +1856,7 @@ "type": "Identifier", "span": { "start": 745, - "end": 749, + "end": 746, "ctxt": 0 }, "value": "x", @@ -1929,7 +1929,7 @@ "type": "Identifier", "span": { "start": 766, - "end": 770, + "end": 767, "ctxt": 0 }, "value": "x", @@ -2002,7 +2002,7 @@ "type": "Identifier", "span": { "start": 796, - "end": 802, + "end": 797, "ctxt": 0 }, "value": "x", @@ -2073,7 +2073,7 @@ "type": "Identifier", "span": { "start": 824, - "end": 828, + "end": 825, "ctxt": 0 }, "value": "x", @@ -2146,7 +2146,7 @@ "type": "Identifier", "span": { "start": 846, - "end": 858, + "end": 847, "ctxt": 0 }, "value": "x", @@ -2237,7 +2237,7 @@ "type": "Identifier", "span": { "start": 885, - "end": 891, + "end": 886, "ctxt": 0 }, "value": "x", @@ -2308,7 +2308,7 @@ "type": "Identifier", "span": { "start": 912, - "end": 916, + "end": 913, "ctxt": 0 }, "value": "x", @@ -2381,7 +2381,7 @@ "type": "Identifier", "span": { "start": 933, - "end": 937, + "end": 934, "ctxt": 0 }, "value": "x", @@ -2454,7 +2454,7 @@ "type": "Identifier", "span": { "start": 963, - "end": 969, + "end": 964, "ctxt": 0 }, "value": "x", @@ -2525,7 +2525,7 @@ "type": "Identifier", "span": { "start": 990, - "end": 994, + "end": 991, "ctxt": 0 }, "value": "x", @@ -2598,7 +2598,7 @@ "type": "Identifier", "span": { "start": 1011, - "end": 1022, + "end": 1012, "ctxt": 0 }, "value": "x", @@ -2671,7 +2671,7 @@ "type": "Identifier", "span": { "start": 1048, - "end": 1054, + "end": 1049, "ctxt": 0 }, "value": "x", @@ -2742,7 +2742,7 @@ "type": "Identifier", "span": { "start": 1075, - "end": 1079, + "end": 1076, "ctxt": 0 }, "value": "x", @@ -2815,7 +2815,7 @@ "type": "Identifier", "span": { "start": 1096, - "end": 1100, + "end": 1097, "ctxt": 0 }, "value": "x", @@ -2888,7 +2888,7 @@ "type": "Identifier", "span": { "start": 1126, - "end": 1132, + "end": 1127, "ctxt": 0 }, "value": "x", @@ -2959,7 +2959,7 @@ "type": "Identifier", "span": { "start": 1153, - "end": 1157, + "end": 1154, "ctxt": 0 }, "value": "x", @@ -3032,7 +3032,7 @@ "type": "Identifier", "span": { "start": 1174, - "end": 1186, + "end": 1175, "ctxt": 0 }, "value": "x", @@ -3123,7 +3123,7 @@ "type": "Identifier", "span": { "start": 1212, - "end": 1218, + "end": 1213, "ctxt": 0 }, "value": "x", @@ -3194,7 +3194,7 @@ "type": "Identifier", "span": { "start": 1240, - "end": 1244, + "end": 1241, "ctxt": 0 }, "value": "x", @@ -3267,7 +3267,7 @@ "type": "Identifier", "span": { "start": 1262, - "end": 1273, + "end": 1263, "ctxt": 0 }, "value": "x", @@ -3340,7 +3340,7 @@ "type": "Identifier", "span": { "start": 1300, - "end": 1306, + "end": 1301, "ctxt": 0 }, "value": "x", @@ -3411,7 +3411,7 @@ "type": "Identifier", "span": { "start": 1328, - "end": 1332, + "end": 1329, "ctxt": 0 }, "value": "x", @@ -3484,7 +3484,7 @@ "type": "Identifier", "span": { "start": 1350, - "end": 1361, + "end": 1351, "ctxt": 0 }, "value": "x", @@ -3557,7 +3557,7 @@ "type": "Identifier", "span": { "start": 1388, - "end": 1394, + "end": 1389, "ctxt": 0 }, "value": "x", @@ -3628,7 +3628,7 @@ "type": "Identifier", "span": { "start": 1416, - "end": 1420, + "end": 1417, "ctxt": 0 }, "value": "x", @@ -3701,7 +3701,7 @@ "type": "Identifier", "span": { "start": 1438, - "end": 1450, + "end": 1439, "ctxt": 0 }, "value": "x", @@ -3792,7 +3792,7 @@ "type": "Identifier", "span": { "start": 1477, - "end": 1483, + "end": 1478, "ctxt": 0 }, "value": "x", @@ -3863,7 +3863,7 @@ "type": "Identifier", "span": { "start": 1505, - "end": 1509, + "end": 1506, "ctxt": 0 }, "value": "x", @@ -3936,7 +3936,7 @@ "type": "Identifier", "span": { "start": 1527, - "end": 1538, + "end": 1528, "ctxt": 0 }, "value": "x", @@ -4009,7 +4009,7 @@ "type": "Identifier", "span": { "start": 1565, - "end": 1571, + "end": 1566, "ctxt": 0 }, "value": "x", @@ -4080,7 +4080,7 @@ "type": "Identifier", "span": { "start": 1593, - "end": 1597, + "end": 1594, "ctxt": 0 }, "value": "x", @@ -4153,7 +4153,7 @@ "type": "Identifier", "span": { "start": 1615, - "end": 1626, + "end": 1616, "ctxt": 0 }, "value": "x", @@ -4226,7 +4226,7 @@ "type": "Identifier", "span": { "start": 1653, - "end": 1659, + "end": 1654, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentity2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentity2.json index 85a0f13eddf7..d755b8e50ef8 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentity2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentity2.json @@ -597,7 +597,7 @@ "type": "Identifier", "span": { "start": 240, - "end": 244, + "end": 241, "ctxt": 0 }, "value": "x", @@ -670,7 +670,7 @@ "type": "Identifier", "span": { "start": 261, - "end": 265, + "end": 262, "ctxt": 0 }, "value": "x", @@ -743,7 +743,7 @@ "type": "Identifier", "span": { "start": 288, - "end": 294, + "end": 289, "ctxt": 0 }, "value": "x", @@ -814,7 +814,7 @@ "type": "Identifier", "span": { "start": 316, - "end": 320, + "end": 317, "ctxt": 0 }, "value": "x", @@ -887,7 +887,7 @@ "type": "Identifier", "span": { "start": 338, - "end": 350, + "end": 339, "ctxt": 0 }, "value": "x", @@ -978,7 +978,7 @@ "type": "Identifier", "span": { "start": 374, - "end": 380, + "end": 375, "ctxt": 0 }, "value": "x", @@ -1049,7 +1049,7 @@ "type": "Identifier", "span": { "start": 401, - "end": 405, + "end": 402, "ctxt": 0 }, "value": "x", @@ -1122,7 +1122,7 @@ "type": "Identifier", "span": { "start": 422, - "end": 426, + "end": 423, "ctxt": 0 }, "value": "x", @@ -1195,7 +1195,7 @@ "type": "Identifier", "span": { "start": 449, - "end": 455, + "end": 450, "ctxt": 0 }, "value": "x", @@ -1266,7 +1266,7 @@ "type": "Identifier", "span": { "start": 476, - "end": 480, + "end": 477, "ctxt": 0 }, "value": "x", @@ -1339,7 +1339,7 @@ "type": "Identifier", "span": { "start": 497, - "end": 508, + "end": 498, "ctxt": 0 }, "value": "x", @@ -1412,7 +1412,7 @@ "type": "Identifier", "span": { "start": 531, - "end": 537, + "end": 532, "ctxt": 0 }, "value": "x", @@ -1483,7 +1483,7 @@ "type": "Identifier", "span": { "start": 558, - "end": 562, + "end": 559, "ctxt": 0 }, "value": "x", @@ -1556,7 +1556,7 @@ "type": "Identifier", "span": { "start": 579, - "end": 583, + "end": 580, "ctxt": 0 }, "value": "x", @@ -1629,7 +1629,7 @@ "type": "Identifier", "span": { "start": 606, - "end": 612, + "end": 607, "ctxt": 0 }, "value": "x", @@ -1700,7 +1700,7 @@ "type": "Identifier", "span": { "start": 633, - "end": 637, + "end": 634, "ctxt": 0 }, "value": "x", @@ -1773,7 +1773,7 @@ "type": "Identifier", "span": { "start": 654, - "end": 666, + "end": 655, "ctxt": 0 }, "value": "x", @@ -1864,7 +1864,7 @@ "type": "Identifier", "span": { "start": 689, - "end": 695, + "end": 690, "ctxt": 0 }, "value": "x", @@ -1935,7 +1935,7 @@ "type": "Identifier", "span": { "start": 717, - "end": 721, + "end": 718, "ctxt": 0 }, "value": "x", @@ -2008,7 +2008,7 @@ "type": "Identifier", "span": { "start": 739, - "end": 750, + "end": 740, "ctxt": 0 }, "value": "x", @@ -2081,7 +2081,7 @@ "type": "Identifier", "span": { "start": 774, - "end": 780, + "end": 775, "ctxt": 0 }, "value": "x", @@ -2152,7 +2152,7 @@ "type": "Identifier", "span": { "start": 802, - "end": 806, + "end": 803, "ctxt": 0 }, "value": "x", @@ -2225,7 +2225,7 @@ "type": "Identifier", "span": { "start": 824, - "end": 835, + "end": 825, "ctxt": 0 }, "value": "x", @@ -2298,7 +2298,7 @@ "type": "Identifier", "span": { "start": 859, - "end": 865, + "end": 860, "ctxt": 0 }, "value": "x", @@ -2369,7 +2369,7 @@ "type": "Identifier", "span": { "start": 887, - "end": 891, + "end": 888, "ctxt": 0 }, "value": "x", @@ -2442,7 +2442,7 @@ "type": "Identifier", "span": { "start": 909, - "end": 921, + "end": 910, "ctxt": 0 }, "value": "x", @@ -2533,7 +2533,7 @@ "type": "Identifier", "span": { "start": 945, - "end": 951, + "end": 946, "ctxt": 0 }, "value": "x", @@ -2604,7 +2604,7 @@ "type": "Identifier", "span": { "start": 973, - "end": 977, + "end": 974, "ctxt": 0 }, "value": "x", @@ -2677,7 +2677,7 @@ "type": "Identifier", "span": { "start": 995, - "end": 1006, + "end": 996, "ctxt": 0 }, "value": "x", @@ -2750,7 +2750,7 @@ "type": "Identifier", "span": { "start": 1030, - "end": 1036, + "end": 1031, "ctxt": 0 }, "value": "x", @@ -2821,7 +2821,7 @@ "type": "Identifier", "span": { "start": 1058, - "end": 1062, + "end": 1059, "ctxt": 0 }, "value": "x", @@ -2894,7 +2894,7 @@ "type": "Identifier", "span": { "start": 1080, - "end": 1091, + "end": 1081, "ctxt": 0 }, "value": "x", @@ -2967,7 +2967,7 @@ "type": "Identifier", "span": { "start": 1115, - "end": 1121, + "end": 1116, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures.json index ea56f1076c2b..e494b19d88e3 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 63, - "end": 72, + "end": 64, "ctxt": 0 }, "value": "x", @@ -200,7 +200,7 @@ "type": "Identifier", "span": { "start": 120, - "end": 129, + "end": 121, "ctxt": 0 }, "value": "x", @@ -343,7 +343,7 @@ "type": "Identifier", "span": { "start": 180, - "end": 184, + "end": 181, "ctxt": 0 }, "value": "x", @@ -540,7 +540,7 @@ "type": "Identifier", "span": { "start": 231, - "end": 240, + "end": 232, "ctxt": 0 }, "value": "x", @@ -671,7 +671,7 @@ "type": "Identifier", "span": { "start": 280, - "end": 284, + "end": 281, "ctxt": 0 }, "value": "x", @@ -803,7 +803,7 @@ "type": "Identifier", "span": { "start": 306, - "end": 315, + "end": 307, "ctxt": 0 }, "value": "x", @@ -916,7 +916,7 @@ "type": "Identifier", "span": { "start": 341, - "end": 350, + "end": 342, "ctxt": 0 }, "value": "x", @@ -1012,7 +1012,7 @@ "type": "Identifier", "span": { "start": 385, - "end": 389, + "end": 386, "ctxt": 0 }, "value": "x", @@ -1085,7 +1085,7 @@ "type": "Identifier", "span": { "start": 406, - "end": 410, + "end": 407, "ctxt": 0 }, "value": "x", @@ -1158,7 +1158,7 @@ "type": "Identifier", "span": { "start": 436, - "end": 442, + "end": 437, "ctxt": 0 }, "value": "x", @@ -1229,7 +1229,7 @@ "type": "Identifier", "span": { "start": 464, - "end": 468, + "end": 465, "ctxt": 0 }, "value": "x", @@ -1302,7 +1302,7 @@ "type": "Identifier", "span": { "start": 486, - "end": 490, + "end": 487, "ctxt": 0 }, "value": "x", @@ -1375,7 +1375,7 @@ "type": "Identifier", "span": { "start": 517, - "end": 523, + "end": 518, "ctxt": 0 }, "value": "x", @@ -1446,7 +1446,7 @@ "type": "Identifier", "span": { "start": 545, - "end": 557, + "end": 546, "ctxt": 0 }, "value": "x", @@ -1537,7 +1537,7 @@ "type": "Identifier", "span": { "start": 575, - "end": 587, + "end": 576, "ctxt": 0 }, "value": "x", @@ -1628,7 +1628,7 @@ "type": "Identifier", "span": { "start": 614, - "end": 620, + "end": 615, "ctxt": 0 }, "value": "x", @@ -1699,7 +1699,7 @@ "type": "Identifier", "span": { "start": 641, - "end": 645, + "end": 642, "ctxt": 0 }, "value": "x", @@ -1772,7 +1772,7 @@ "type": "Identifier", "span": { "start": 662, - "end": 666, + "end": 663, "ctxt": 0 }, "value": "x", @@ -1845,7 +1845,7 @@ "type": "Identifier", "span": { "start": 692, - "end": 698, + "end": 693, "ctxt": 0 }, "value": "x", @@ -1916,7 +1916,7 @@ "type": "Identifier", "span": { "start": 719, - "end": 730, + "end": 720, "ctxt": 0 }, "value": "x", @@ -1989,7 +1989,7 @@ "type": "Identifier", "span": { "start": 747, - "end": 758, + "end": 748, "ctxt": 0 }, "value": "x", @@ -2062,7 +2062,7 @@ "type": "Identifier", "span": { "start": 784, - "end": 790, + "end": 785, "ctxt": 0 }, "value": "x", @@ -2133,7 +2133,7 @@ "type": "Identifier", "span": { "start": 811, - "end": 822, + "end": 812, "ctxt": 0 }, "value": "x", @@ -2206,7 +2206,7 @@ "type": "Identifier", "span": { "start": 839, - "end": 850, + "end": 840, "ctxt": 0 }, "value": "x", @@ -2279,7 +2279,7 @@ "type": "Identifier", "span": { "start": 876, - "end": 882, + "end": 877, "ctxt": 0 }, "value": "x", @@ -2350,7 +2350,7 @@ "type": "Identifier", "span": { "start": 903, - "end": 907, + "end": 904, "ctxt": 0 }, "value": "x", @@ -2423,7 +2423,7 @@ "type": "Identifier", "span": { "start": 924, - "end": 928, + "end": 925, "ctxt": 0 }, "value": "x", @@ -2496,7 +2496,7 @@ "type": "Identifier", "span": { "start": 954, - "end": 960, + "end": 955, "ctxt": 0 }, "value": "x", @@ -2567,7 +2567,7 @@ "type": "Identifier", "span": { "start": 982, - "end": 986, + "end": 983, "ctxt": 0 }, "value": "x", @@ -2640,7 +2640,7 @@ "type": "Identifier", "span": { "start": 1004, - "end": 1016, + "end": 1005, "ctxt": 0 }, "value": "x", @@ -2731,7 +2731,7 @@ "type": "Identifier", "span": { "start": 1043, - "end": 1049, + "end": 1044, "ctxt": 0 }, "value": "x", @@ -2802,7 +2802,7 @@ "type": "Identifier", "span": { "start": 1070, - "end": 1074, + "end": 1071, "ctxt": 0 }, "value": "x", @@ -2875,7 +2875,7 @@ "type": "Identifier", "span": { "start": 1091, - "end": 1095, + "end": 1092, "ctxt": 0 }, "value": "x", @@ -2948,7 +2948,7 @@ "type": "Identifier", "span": { "start": 1121, - "end": 1127, + "end": 1122, "ctxt": 0 }, "value": "x", @@ -3019,7 +3019,7 @@ "type": "Identifier", "span": { "start": 1148, - "end": 1152, + "end": 1149, "ctxt": 0 }, "value": "x", @@ -3092,7 +3092,7 @@ "type": "Identifier", "span": { "start": 1169, - "end": 1180, + "end": 1170, "ctxt": 0 }, "value": "x", @@ -3165,7 +3165,7 @@ "type": "Identifier", "span": { "start": 1206, - "end": 1212, + "end": 1207, "ctxt": 0 }, "value": "x", @@ -3236,7 +3236,7 @@ "type": "Identifier", "span": { "start": 1233, - "end": 1237, + "end": 1234, "ctxt": 0 }, "value": "x", @@ -3309,7 +3309,7 @@ "type": "Identifier", "span": { "start": 1254, - "end": 1258, + "end": 1255, "ctxt": 0 }, "value": "x", @@ -3382,7 +3382,7 @@ "type": "Identifier", "span": { "start": 1284, - "end": 1290, + "end": 1285, "ctxt": 0 }, "value": "x", @@ -3453,7 +3453,7 @@ "type": "Identifier", "span": { "start": 1311, - "end": 1315, + "end": 1312, "ctxt": 0 }, "value": "x", @@ -3526,7 +3526,7 @@ "type": "Identifier", "span": { "start": 1332, - "end": 1344, + "end": 1333, "ctxt": 0 }, "value": "x", @@ -3617,7 +3617,7 @@ "type": "Identifier", "span": { "start": 1370, - "end": 1376, + "end": 1371, "ctxt": 0 }, "value": "x", @@ -3688,7 +3688,7 @@ "type": "Identifier", "span": { "start": 1398, - "end": 1402, + "end": 1399, "ctxt": 0 }, "value": "x", @@ -3761,7 +3761,7 @@ "type": "Identifier", "span": { "start": 1420, - "end": 1431, + "end": 1421, "ctxt": 0 }, "value": "x", @@ -3834,7 +3834,7 @@ "type": "Identifier", "span": { "start": 1458, - "end": 1464, + "end": 1459, "ctxt": 0 }, "value": "x", @@ -3905,7 +3905,7 @@ "type": "Identifier", "span": { "start": 1486, - "end": 1490, + "end": 1487, "ctxt": 0 }, "value": "x", @@ -3978,7 +3978,7 @@ "type": "Identifier", "span": { "start": 1508, - "end": 1519, + "end": 1509, "ctxt": 0 }, "value": "x", @@ -4051,7 +4051,7 @@ "type": "Identifier", "span": { "start": 1546, - "end": 1552, + "end": 1547, "ctxt": 0 }, "value": "x", @@ -4122,7 +4122,7 @@ "type": "Identifier", "span": { "start": 1574, - "end": 1578, + "end": 1575, "ctxt": 0 }, "value": "x", @@ -4195,7 +4195,7 @@ "type": "Identifier", "span": { "start": 1596, - "end": 1608, + "end": 1597, "ctxt": 0 }, "value": "x", @@ -4286,7 +4286,7 @@ "type": "Identifier", "span": { "start": 1635, - "end": 1641, + "end": 1636, "ctxt": 0 }, "value": "x", @@ -4357,7 +4357,7 @@ "type": "Identifier", "span": { "start": 1664, - "end": 1677, + "end": 1665, "ctxt": 0 }, "value": "x", @@ -4448,7 +4448,7 @@ "type": "Identifier", "span": { "start": 1696, - "end": 1708, + "end": 1697, "ctxt": 0 }, "value": "x", @@ -4539,7 +4539,7 @@ "type": "Identifier", "span": { "start": 1736, - "end": 1742, + "end": 1737, "ctxt": 0 }, "value": "x", @@ -4610,7 +4610,7 @@ "type": "Identifier", "span": { "start": 1764, - "end": 1768, + "end": 1765, "ctxt": 0 }, "value": "x", @@ -4683,7 +4683,7 @@ "type": "Identifier", "span": { "start": 1786, - "end": 1797, + "end": 1787, "ctxt": 0 }, "value": "x", @@ -4756,7 +4756,7 @@ "type": "Identifier", "span": { "start": 1824, - "end": 1830, + "end": 1825, "ctxt": 0 }, "value": "x", @@ -4827,7 +4827,7 @@ "type": "Identifier", "span": { "start": 1852, - "end": 1856, + "end": 1853, "ctxt": 0 }, "value": "x", @@ -4900,7 +4900,7 @@ "type": "Identifier", "span": { "start": 1874, - "end": 1885, + "end": 1875, "ctxt": 0 }, "value": "x", @@ -4973,7 +4973,7 @@ "type": "Identifier", "span": { "start": 1912, - "end": 1918, + "end": 1913, "ctxt": 0 }, "value": "x", @@ -5044,7 +5044,7 @@ "type": "Identifier", "span": { "start": 1940, - "end": 1953, + "end": 1941, "ctxt": 0 }, "value": "x", @@ -5135,7 +5135,7 @@ "type": "Identifier", "span": { "start": 1971, - "end": 1983, + "end": 1972, "ctxt": 0 }, "value": "x", @@ -5226,7 +5226,7 @@ "type": "Identifier", "span": { "start": 2007, - "end": 2013, + "end": 2008, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures2.json index 86a4b70297d6..a4a317e70f7d 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures2.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 63, - "end": 72, + "end": 64, "ctxt": 0 }, "value": "x", @@ -200,7 +200,7 @@ "type": "Identifier", "span": { "start": 120, - "end": 129, + "end": 121, "ctxt": 0 }, "value": "x", @@ -343,7 +343,7 @@ "type": "Identifier", "span": { "start": 180, - "end": 184, + "end": 181, "ctxt": 0 }, "value": "x", @@ -540,7 +540,7 @@ "type": "Identifier", "span": { "start": 231, - "end": 241, + "end": 232, "ctxt": 0 }, "value": "x", @@ -671,7 +671,7 @@ "type": "Identifier", "span": { "start": 281, - "end": 285, + "end": 282, "ctxt": 0 }, "value": "x", @@ -803,7 +803,7 @@ "type": "Identifier", "span": { "start": 307, - "end": 314, + "end": 308, "ctxt": 0 }, "value": "x", @@ -926,7 +926,7 @@ "type": "Identifier", "span": { "start": 340, - "end": 349, + "end": 341, "ctxt": 0 }, "value": "x", @@ -1032,7 +1032,7 @@ "type": "Identifier", "span": { "start": 384, - "end": 388, + "end": 385, "ctxt": 0 }, "value": "x", @@ -1105,7 +1105,7 @@ "type": "Identifier", "span": { "start": 405, - "end": 409, + "end": 406, "ctxt": 0 }, "value": "x", @@ -1178,7 +1178,7 @@ "type": "Identifier", "span": { "start": 435, - "end": 441, + "end": 436, "ctxt": 0 }, "value": "x", @@ -1249,7 +1249,7 @@ "type": "Identifier", "span": { "start": 463, - "end": 467, + "end": 464, "ctxt": 0 }, "value": "x", @@ -1322,7 +1322,7 @@ "type": "Identifier", "span": { "start": 485, - "end": 489, + "end": 486, "ctxt": 0 }, "value": "x", @@ -1395,7 +1395,7 @@ "type": "Identifier", "span": { "start": 516, - "end": 522, + "end": 517, "ctxt": 0 }, "value": "x", @@ -1466,7 +1466,7 @@ "type": "Identifier", "span": { "start": 544, - "end": 556, + "end": 545, "ctxt": 0 }, "value": "x", @@ -1557,7 +1557,7 @@ "type": "Identifier", "span": { "start": 574, - "end": 586, + "end": 575, "ctxt": 0 }, "value": "x", @@ -1648,7 +1648,7 @@ "type": "Identifier", "span": { "start": 613, - "end": 619, + "end": 614, "ctxt": 0 }, "value": "x", @@ -1719,7 +1719,7 @@ "type": "Identifier", "span": { "start": 640, - "end": 644, + "end": 641, "ctxt": 0 }, "value": "x", @@ -1792,7 +1792,7 @@ "type": "Identifier", "span": { "start": 661, - "end": 665, + "end": 662, "ctxt": 0 }, "value": "x", @@ -1865,7 +1865,7 @@ "type": "Identifier", "span": { "start": 691, - "end": 697, + "end": 692, "ctxt": 0 }, "value": "x", @@ -1936,7 +1936,7 @@ "type": "Identifier", "span": { "start": 718, - "end": 729, + "end": 719, "ctxt": 0 }, "value": "x", @@ -2009,7 +2009,7 @@ "type": "Identifier", "span": { "start": 746, - "end": 757, + "end": 747, "ctxt": 0 }, "value": "x", @@ -2082,7 +2082,7 @@ "type": "Identifier", "span": { "start": 783, - "end": 789, + "end": 784, "ctxt": 0 }, "value": "x", @@ -2153,7 +2153,7 @@ "type": "Identifier", "span": { "start": 810, - "end": 821, + "end": 811, "ctxt": 0 }, "value": "x", @@ -2226,7 +2226,7 @@ "type": "Identifier", "span": { "start": 838, - "end": 849, + "end": 839, "ctxt": 0 }, "value": "x", @@ -2299,7 +2299,7 @@ "type": "Identifier", "span": { "start": 875, - "end": 881, + "end": 876, "ctxt": 0 }, "value": "x", @@ -2370,7 +2370,7 @@ "type": "Identifier", "span": { "start": 902, - "end": 906, + "end": 903, "ctxt": 0 }, "value": "x", @@ -2443,7 +2443,7 @@ "type": "Identifier", "span": { "start": 923, - "end": 927, + "end": 924, "ctxt": 0 }, "value": "x", @@ -2516,7 +2516,7 @@ "type": "Identifier", "span": { "start": 950, - "end": 956, + "end": 951, "ctxt": 0 }, "value": "x", @@ -2587,7 +2587,7 @@ "type": "Identifier", "span": { "start": 978, - "end": 982, + "end": 979, "ctxt": 0 }, "value": "x", @@ -2660,7 +2660,7 @@ "type": "Identifier", "span": { "start": 1000, - "end": 1012, + "end": 1001, "ctxt": 0 }, "value": "x", @@ -2751,7 +2751,7 @@ "type": "Identifier", "span": { "start": 1039, - "end": 1045, + "end": 1040, "ctxt": 0 }, "value": "x", @@ -2822,7 +2822,7 @@ "type": "Identifier", "span": { "start": 1066, - "end": 1070, + "end": 1067, "ctxt": 0 }, "value": "x", @@ -2895,7 +2895,7 @@ "type": "Identifier", "span": { "start": 1087, - "end": 1091, + "end": 1088, "ctxt": 0 }, "value": "x", @@ -2968,7 +2968,7 @@ "type": "Identifier", "span": { "start": 1114, - "end": 1120, + "end": 1115, "ctxt": 0 }, "value": "x", @@ -3039,7 +3039,7 @@ "type": "Identifier", "span": { "start": 1141, - "end": 1145, + "end": 1142, "ctxt": 0 }, "value": "x", @@ -3112,7 +3112,7 @@ "type": "Identifier", "span": { "start": 1162, - "end": 1173, + "end": 1163, "ctxt": 0 }, "value": "x", @@ -3185,7 +3185,7 @@ "type": "Identifier", "span": { "start": 1196, - "end": 1202, + "end": 1197, "ctxt": 0 }, "value": "x", @@ -3256,7 +3256,7 @@ "type": "Identifier", "span": { "start": 1223, - "end": 1227, + "end": 1224, "ctxt": 0 }, "value": "x", @@ -3329,7 +3329,7 @@ "type": "Identifier", "span": { "start": 1244, - "end": 1248, + "end": 1245, "ctxt": 0 }, "value": "x", @@ -3402,7 +3402,7 @@ "type": "Identifier", "span": { "start": 1271, - "end": 1277, + "end": 1272, "ctxt": 0 }, "value": "x", @@ -3473,7 +3473,7 @@ "type": "Identifier", "span": { "start": 1298, - "end": 1302, + "end": 1299, "ctxt": 0 }, "value": "x", @@ -3546,7 +3546,7 @@ "type": "Identifier", "span": { "start": 1319, - "end": 1331, + "end": 1320, "ctxt": 0 }, "value": "x", @@ -3637,7 +3637,7 @@ "type": "Identifier", "span": { "start": 1354, - "end": 1360, + "end": 1355, "ctxt": 0 }, "value": "x", @@ -3708,7 +3708,7 @@ "type": "Identifier", "span": { "start": 1382, - "end": 1386, + "end": 1383, "ctxt": 0 }, "value": "x", @@ -3781,7 +3781,7 @@ "type": "Identifier", "span": { "start": 1404, - "end": 1415, + "end": 1405, "ctxt": 0 }, "value": "x", @@ -3854,7 +3854,7 @@ "type": "Identifier", "span": { "start": 1439, - "end": 1445, + "end": 1440, "ctxt": 0 }, "value": "x", @@ -3925,7 +3925,7 @@ "type": "Identifier", "span": { "start": 1467, - "end": 1471, + "end": 1468, "ctxt": 0 }, "value": "x", @@ -3998,7 +3998,7 @@ "type": "Identifier", "span": { "start": 1489, - "end": 1500, + "end": 1490, "ctxt": 0 }, "value": "x", @@ -4071,7 +4071,7 @@ "type": "Identifier", "span": { "start": 1524, - "end": 1530, + "end": 1525, "ctxt": 0 }, "value": "x", @@ -4142,7 +4142,7 @@ "type": "Identifier", "span": { "start": 1552, - "end": 1556, + "end": 1553, "ctxt": 0 }, "value": "x", @@ -4215,7 +4215,7 @@ "type": "Identifier", "span": { "start": 1574, - "end": 1586, + "end": 1575, "ctxt": 0 }, "value": "x", @@ -4306,7 +4306,7 @@ "type": "Identifier", "span": { "start": 1610, - "end": 1616, + "end": 1611, "ctxt": 0 }, "value": "x", @@ -4377,7 +4377,7 @@ "type": "Identifier", "span": { "start": 1639, - "end": 1652, + "end": 1640, "ctxt": 0 }, "value": "x", @@ -4468,7 +4468,7 @@ "type": "Identifier", "span": { "start": 1671, - "end": 1683, + "end": 1672, "ctxt": 0 }, "value": "x", @@ -4559,7 +4559,7 @@ "type": "Identifier", "span": { "start": 1711, - "end": 1717, + "end": 1712, "ctxt": 0 }, "value": "x", @@ -4630,7 +4630,7 @@ "type": "Identifier", "span": { "start": 1739, - "end": 1743, + "end": 1740, "ctxt": 0 }, "value": "x", @@ -4703,7 +4703,7 @@ "type": "Identifier", "span": { "start": 1761, - "end": 1772, + "end": 1762, "ctxt": 0 }, "value": "x", @@ -4776,7 +4776,7 @@ "type": "Identifier", "span": { "start": 1796, - "end": 1802, + "end": 1797, "ctxt": 0 }, "value": "x", @@ -4847,7 +4847,7 @@ "type": "Identifier", "span": { "start": 1824, - "end": 1828, + "end": 1825, "ctxt": 0 }, "value": "x", @@ -4920,7 +4920,7 @@ "type": "Identifier", "span": { "start": 1846, - "end": 1857, + "end": 1847, "ctxt": 0 }, "value": "x", @@ -4993,7 +4993,7 @@ "type": "Identifier", "span": { "start": 1881, - "end": 1887, + "end": 1882, "ctxt": 0 }, "value": "x", @@ -5064,7 +5064,7 @@ "type": "Identifier", "span": { "start": 1909, - "end": 1922, + "end": 1910, "ctxt": 0 }, "value": "x", @@ -5155,7 +5155,7 @@ "type": "Identifier", "span": { "start": 1940, - "end": 1952, + "end": 1941, "ctxt": 0 }, "value": "x", @@ -5246,7 +5246,7 @@ "type": "Identifier", "span": { "start": 1976, - "end": 1982, + "end": 1977, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures3.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures3.json index 796b87b969d9..6df69b6d5618 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures3.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures3.json @@ -46,7 +46,7 @@ "type": "Identifier", "span": { "start": 64, - "end": 73, + "end": 65, "ctxt": 0 }, "value": "x", @@ -164,7 +164,7 @@ "type": "Identifier", "span": { "start": 110, - "end": 114, + "end": 111, "ctxt": 0 }, "value": "x", @@ -283,7 +283,7 @@ "type": "Identifier", "span": { "start": 133, - "end": 142, + "end": 134, "ctxt": 0 }, "value": "x", @@ -361,7 +361,7 @@ "type": "Identifier", "span": { "start": 169, - "end": 173, + "end": 170, "ctxt": 0 }, "value": "x", @@ -434,7 +434,7 @@ "type": "Identifier", "span": { "start": 190, - "end": 194, + "end": 191, "ctxt": 0 }, "value": "x", @@ -507,7 +507,7 @@ "type": "Identifier", "span": { "start": 220, - "end": 226, + "end": 221, "ctxt": 0 }, "value": "x", @@ -578,7 +578,7 @@ "type": "Identifier", "span": { "start": 247, - "end": 258, + "end": 248, "ctxt": 0 }, "value": "x", @@ -651,7 +651,7 @@ "type": "Identifier", "span": { "start": 275, - "end": 286, + "end": 276, "ctxt": 0 }, "value": "x", @@ -724,7 +724,7 @@ "type": "Identifier", "span": { "start": 312, - "end": 318, + "end": 313, "ctxt": 0 }, "value": "x", @@ -795,7 +795,7 @@ "type": "Identifier", "span": { "start": 339, - "end": 350, + "end": 340, "ctxt": 0 }, "value": "x", @@ -868,7 +868,7 @@ "type": "Identifier", "span": { "start": 367, - "end": 378, + "end": 368, "ctxt": 0 }, "value": "x", @@ -941,7 +941,7 @@ "type": "Identifier", "span": { "start": 404, - "end": 410, + "end": 405, "ctxt": 0 }, "value": "x", @@ -1012,7 +1012,7 @@ "type": "Identifier", "span": { "start": 432, - "end": 436, + "end": 433, "ctxt": 0 }, "value": "x", @@ -1085,7 +1085,7 @@ "type": "Identifier", "span": { "start": 454, - "end": 465, + "end": 455, "ctxt": 0 }, "value": "x", @@ -1158,7 +1158,7 @@ "type": "Identifier", "span": { "start": 492, - "end": 498, + "end": 493, "ctxt": 0 }, "value": "x", @@ -1229,7 +1229,7 @@ "type": "Identifier", "span": { "start": 520, - "end": 524, + "end": 521, "ctxt": 0 }, "value": "x", @@ -1302,7 +1302,7 @@ "type": "Identifier", "span": { "start": 542, - "end": 555, + "end": 543, "ctxt": 0 }, "value": "x", @@ -1393,7 +1393,7 @@ "type": "Identifier", "span": { "start": 582, - "end": 588, + "end": 583, "ctxt": 0 }, "value": "x", @@ -1464,7 +1464,7 @@ "type": "Identifier", "span": { "start": 611, - "end": 622, + "end": 612, "ctxt": 0 }, "value": "x", @@ -1537,7 +1537,7 @@ "type": "Identifier", "span": { "start": 641, - "end": 654, + "end": 642, "ctxt": 0 }, "value": "x", @@ -1628,7 +1628,7 @@ "type": "Identifier", "span": { "start": 682, - "end": 688, + "end": 683, "ctxt": 0 }, "value": "x", @@ -1699,7 +1699,7 @@ "type": "Identifier", "span": { "start": 710, - "end": 714, + "end": 711, "ctxt": 0 }, "value": "x", @@ -1772,7 +1772,7 @@ "type": "Identifier", "span": { "start": 732, - "end": 745, + "end": 733, "ctxt": 0 }, "value": "x", @@ -1863,7 +1863,7 @@ "type": "Identifier", "span": { "start": 769, - "end": 775, + "end": 770, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesDifferingParamCounts.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesDifferingParamCounts.json index 65836278be47..668dac5512b2 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesDifferingParamCounts.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesDifferingParamCounts.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 63, - "end": 72, + "end": 64, "ctxt": 0 }, "value": "x", @@ -200,7 +200,7 @@ "type": "Identifier", "span": { "start": 120, - "end": 129, + "end": 121, "ctxt": 0 }, "value": "x", @@ -236,7 +236,7 @@ "type": "Identifier", "span": { "start": 131, - "end": 140, + "end": 132, "ctxt": 0 }, "value": "y", @@ -379,7 +379,7 @@ "type": "Identifier", "span": { "start": 191, - "end": 195, + "end": 192, "ctxt": 0 }, "value": "x", @@ -425,7 +425,7 @@ "type": "Identifier", "span": { "start": 197, - "end": 201, + "end": 198, "ctxt": 0 }, "value": "y", @@ -622,7 +622,7 @@ "type": "Identifier", "span": { "start": 248, - "end": 257, + "end": 249, "ctxt": 0 }, "value": "x", @@ -753,7 +753,7 @@ "type": "Identifier", "span": { "start": 297, - "end": 301, + "end": 298, "ctxt": 0 }, "value": "x", @@ -885,7 +885,7 @@ "type": "Identifier", "span": { "start": 323, - "end": 332, + "end": 324, "ctxt": 0 }, "value": "x", @@ -912,7 +912,7 @@ "type": "Identifier", "span": { "start": 334, - "end": 343, + "end": 335, "ctxt": 0 }, "value": "y", @@ -1025,7 +1025,7 @@ "type": "Identifier", "span": { "start": 369, - "end": 378, + "end": 370, "ctxt": 0 }, "value": "x", @@ -1121,7 +1121,7 @@ "type": "Identifier", "span": { "start": 413, - "end": 417, + "end": 414, "ctxt": 0 }, "value": "x", @@ -1194,7 +1194,7 @@ "type": "Identifier", "span": { "start": 434, - "end": 438, + "end": 435, "ctxt": 0 }, "value": "x", @@ -1267,7 +1267,7 @@ "type": "Identifier", "span": { "start": 464, - "end": 470, + "end": 465, "ctxt": 0 }, "value": "x", @@ -1338,7 +1338,7 @@ "type": "Identifier", "span": { "start": 492, - "end": 496, + "end": 493, "ctxt": 0 }, "value": "x", @@ -1411,7 +1411,7 @@ "type": "Identifier", "span": { "start": 514, - "end": 518, + "end": 515, "ctxt": 0 }, "value": "x", @@ -1484,7 +1484,7 @@ "type": "Identifier", "span": { "start": 545, - "end": 551, + "end": 546, "ctxt": 0 }, "value": "x", @@ -1555,7 +1555,7 @@ "type": "Identifier", "span": { "start": 573, - "end": 585, + "end": 574, "ctxt": 0 }, "value": "x", @@ -1646,7 +1646,7 @@ "type": "Identifier", "span": { "start": 603, - "end": 615, + "end": 604, "ctxt": 0 }, "value": "x", @@ -1737,7 +1737,7 @@ "type": "Identifier", "span": { "start": 642, - "end": 648, + "end": 643, "ctxt": 0 }, "value": "x", @@ -1808,7 +1808,7 @@ "type": "Identifier", "span": { "start": 669, - "end": 673, + "end": 670, "ctxt": 0 }, "value": "x", @@ -1881,7 +1881,7 @@ "type": "Identifier", "span": { "start": 690, - "end": 694, + "end": 691, "ctxt": 0 }, "value": "x", @@ -1954,7 +1954,7 @@ "type": "Identifier", "span": { "start": 720, - "end": 726, + "end": 721, "ctxt": 0 }, "value": "x", @@ -2025,7 +2025,7 @@ "type": "Identifier", "span": { "start": 747, - "end": 758, + "end": 748, "ctxt": 0 }, "value": "x", @@ -2098,7 +2098,7 @@ "type": "Identifier", "span": { "start": 775, - "end": 786, + "end": 776, "ctxt": 0 }, "value": "x", @@ -2171,7 +2171,7 @@ "type": "Identifier", "span": { "start": 812, - "end": 818, + "end": 813, "ctxt": 0 }, "value": "x", @@ -2242,7 +2242,7 @@ "type": "Identifier", "span": { "start": 839, - "end": 850, + "end": 840, "ctxt": 0 }, "value": "x", @@ -2315,7 +2315,7 @@ "type": "Identifier", "span": { "start": 867, - "end": 878, + "end": 868, "ctxt": 0 }, "value": "x", @@ -2388,7 +2388,7 @@ "type": "Identifier", "span": { "start": 904, - "end": 910, + "end": 905, "ctxt": 0 }, "value": "x", @@ -2459,7 +2459,7 @@ "type": "Identifier", "span": { "start": 931, - "end": 935, + "end": 932, "ctxt": 0 }, "value": "x", @@ -2532,7 +2532,7 @@ "type": "Identifier", "span": { "start": 952, - "end": 956, + "end": 953, "ctxt": 0 }, "value": "x", @@ -2605,7 +2605,7 @@ "type": "Identifier", "span": { "start": 979, - "end": 985, + "end": 980, "ctxt": 0 }, "value": "x", @@ -2676,7 +2676,7 @@ "type": "Identifier", "span": { "start": 1007, - "end": 1011, + "end": 1008, "ctxt": 0 }, "value": "x", @@ -2749,7 +2749,7 @@ "type": "Identifier", "span": { "start": 1029, - "end": 1041, + "end": 1030, "ctxt": 0 }, "value": "x", @@ -2840,7 +2840,7 @@ "type": "Identifier", "span": { "start": 1065, - "end": 1071, + "end": 1066, "ctxt": 0 }, "value": "x", @@ -2911,7 +2911,7 @@ "type": "Identifier", "span": { "start": 1092, - "end": 1096, + "end": 1093, "ctxt": 0 }, "value": "x", @@ -2984,7 +2984,7 @@ "type": "Identifier", "span": { "start": 1113, - "end": 1117, + "end": 1114, "ctxt": 0 }, "value": "x", @@ -3057,7 +3057,7 @@ "type": "Identifier", "span": { "start": 1143, - "end": 1149, + "end": 1144, "ctxt": 0 }, "value": "x", @@ -3128,7 +3128,7 @@ "type": "Identifier", "span": { "start": 1170, - "end": 1174, + "end": 1171, "ctxt": 0 }, "value": "x", @@ -3201,7 +3201,7 @@ "type": "Identifier", "span": { "start": 1191, - "end": 1202, + "end": 1192, "ctxt": 0 }, "value": "x", @@ -3274,7 +3274,7 @@ "type": "Identifier", "span": { "start": 1225, - "end": 1231, + "end": 1226, "ctxt": 0 }, "value": "x", @@ -3345,7 +3345,7 @@ "type": "Identifier", "span": { "start": 1252, - "end": 1256, + "end": 1253, "ctxt": 0 }, "value": "x", @@ -3418,7 +3418,7 @@ "type": "Identifier", "span": { "start": 1273, - "end": 1277, + "end": 1274, "ctxt": 0 }, "value": "x", @@ -3491,7 +3491,7 @@ "type": "Identifier", "span": { "start": 1300, - "end": 1306, + "end": 1301, "ctxt": 0 }, "value": "x", @@ -3562,7 +3562,7 @@ "type": "Identifier", "span": { "start": 1327, - "end": 1331, + "end": 1328, "ctxt": 0 }, "value": "x", @@ -3635,7 +3635,7 @@ "type": "Identifier", "span": { "start": 1348, - "end": 1360, + "end": 1349, "ctxt": 0 }, "value": "x", @@ -3726,7 +3726,7 @@ "type": "Identifier", "span": { "start": 1383, - "end": 1389, + "end": 1384, "ctxt": 0 }, "value": "x", @@ -3797,7 +3797,7 @@ "type": "Identifier", "span": { "start": 1411, - "end": 1415, + "end": 1412, "ctxt": 0 }, "value": "x", @@ -3870,7 +3870,7 @@ "type": "Identifier", "span": { "start": 1433, - "end": 1444, + "end": 1434, "ctxt": 0 }, "value": "x", @@ -3943,7 +3943,7 @@ "type": "Identifier", "span": { "start": 1471, - "end": 1477, + "end": 1472, "ctxt": 0 }, "value": "x", @@ -4014,7 +4014,7 @@ "type": "Identifier", "span": { "start": 1499, - "end": 1503, + "end": 1500, "ctxt": 0 }, "value": "x", @@ -4087,7 +4087,7 @@ "type": "Identifier", "span": { "start": 1521, - "end": 1532, + "end": 1522, "ctxt": 0 }, "value": "x", @@ -4160,7 +4160,7 @@ "type": "Identifier", "span": { "start": 1556, - "end": 1562, + "end": 1557, "ctxt": 0 }, "value": "x", @@ -4231,7 +4231,7 @@ "type": "Identifier", "span": { "start": 1584, - "end": 1588, + "end": 1585, "ctxt": 0 }, "value": "x", @@ -4304,7 +4304,7 @@ "type": "Identifier", "span": { "start": 1606, - "end": 1618, + "end": 1607, "ctxt": 0 }, "value": "x", @@ -4395,7 +4395,7 @@ "type": "Identifier", "span": { "start": 1642, - "end": 1648, + "end": 1643, "ctxt": 0 }, "value": "x", @@ -4466,7 +4466,7 @@ "type": "Identifier", "span": { "start": 1671, - "end": 1684, + "end": 1672, "ctxt": 0 }, "value": "x", @@ -4557,7 +4557,7 @@ "type": "Identifier", "span": { "start": 1703, - "end": 1715, + "end": 1704, "ctxt": 0 }, "value": "x", @@ -4648,7 +4648,7 @@ "type": "Identifier", "span": { "start": 1740, - "end": 1746, + "end": 1741, "ctxt": 0 }, "value": "x", @@ -4719,7 +4719,7 @@ "type": "Identifier", "span": { "start": 1768, - "end": 1772, + "end": 1769, "ctxt": 0 }, "value": "x", @@ -4792,7 +4792,7 @@ "type": "Identifier", "span": { "start": 1790, - "end": 1801, + "end": 1791, "ctxt": 0 }, "value": "x", @@ -4865,7 +4865,7 @@ "type": "Identifier", "span": { "start": 1825, - "end": 1831, + "end": 1826, "ctxt": 0 }, "value": "x", @@ -4936,7 +4936,7 @@ "type": "Identifier", "span": { "start": 1853, - "end": 1857, + "end": 1854, "ctxt": 0 }, "value": "x", @@ -5009,7 +5009,7 @@ "type": "Identifier", "span": { "start": 1875, - "end": 1886, + "end": 1876, "ctxt": 0 }, "value": "x", @@ -5082,7 +5082,7 @@ "type": "Identifier", "span": { "start": 1913, - "end": 1919, + "end": 1914, "ctxt": 0 }, "value": "x", @@ -5153,7 +5153,7 @@ "type": "Identifier", "span": { "start": 1941, - "end": 1954, + "end": 1942, "ctxt": 0 }, "value": "x", @@ -5244,7 +5244,7 @@ "type": "Identifier", "span": { "start": 1972, - "end": 1984, + "end": 1973, "ctxt": 0 }, "value": "x", @@ -5335,7 +5335,7 @@ "type": "Identifier", "span": { "start": 2008, - "end": 2014, + "end": 2009, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesDifferingParamCounts2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesDifferingParamCounts2.json index 01c05a2d8290..7e36964503ff 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesDifferingParamCounts2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesDifferingParamCounts2.json @@ -46,7 +46,7 @@ "type": "Identifier", "span": { "start": 64, - "end": 73, + "end": 65, "ctxt": 0 }, "value": "x", @@ -164,7 +164,7 @@ "type": "Identifier", "span": { "start": 110, - "end": 114, + "end": 111, "ctxt": 0 }, "value": "x", @@ -283,7 +283,7 @@ "type": "Identifier", "span": { "start": 133, - "end": 142, + "end": 134, "ctxt": 0 }, "value": "x", @@ -310,7 +310,7 @@ "type": "Identifier", "span": { "start": 144, - "end": 153, + "end": 145, "ctxt": 0 }, "value": "y", @@ -388,7 +388,7 @@ "type": "Identifier", "span": { "start": 180, - "end": 184, + "end": 181, "ctxt": 0 }, "value": "x", @@ -461,7 +461,7 @@ "type": "Identifier", "span": { "start": 201, - "end": 205, + "end": 202, "ctxt": 0 }, "value": "x", @@ -534,7 +534,7 @@ "type": "Identifier", "span": { "start": 231, - "end": 237, + "end": 232, "ctxt": 0 }, "value": "x", @@ -605,7 +605,7 @@ "type": "Identifier", "span": { "start": 258, - "end": 269, + "end": 259, "ctxt": 0 }, "value": "x", @@ -678,7 +678,7 @@ "type": "Identifier", "span": { "start": 286, - "end": 297, + "end": 287, "ctxt": 0 }, "value": "x", @@ -751,7 +751,7 @@ "type": "Identifier", "span": { "start": 323, - "end": 329, + "end": 324, "ctxt": 0 }, "value": "x", @@ -822,7 +822,7 @@ "type": "Identifier", "span": { "start": 350, - "end": 363, + "end": 351, "ctxt": 0 }, "value": "x", @@ -913,7 +913,7 @@ "type": "Identifier", "span": { "start": 380, - "end": 393, + "end": 381, "ctxt": 0 }, "value": "x", @@ -1004,7 +1004,7 @@ "type": "Identifier", "span": { "start": 419, - "end": 425, + "end": 420, "ctxt": 0 }, "value": "x", @@ -1075,7 +1075,7 @@ "type": "Identifier", "span": { "start": 446, - "end": 459, + "end": 447, "ctxt": 0 }, "value": "x", @@ -1166,7 +1166,7 @@ "type": "Identifier", "span": { "start": 476, - "end": 489, + "end": 477, "ctxt": 0 }, "value": "x", @@ -1257,7 +1257,7 @@ "type": "Identifier", "span": { "start": 512, - "end": 518, + "end": 513, "ctxt": 0 }, "value": "x", @@ -1328,7 +1328,7 @@ "type": "Identifier", "span": { "start": 540, - "end": 544, + "end": 541, "ctxt": 0 }, "value": "x", @@ -1401,7 +1401,7 @@ "type": "Identifier", "span": { "start": 562, - "end": 573, + "end": 563, "ctxt": 0 }, "value": "x", @@ -1474,7 +1474,7 @@ "type": "Identifier", "span": { "start": 597, - "end": 603, + "end": 598, "ctxt": 0 }, "value": "x", @@ -1545,7 +1545,7 @@ "type": "Identifier", "span": { "start": 625, - "end": 629, + "end": 626, "ctxt": 0 }, "value": "x", @@ -1618,7 +1618,7 @@ "type": "Identifier", "span": { "start": 647, - "end": 660, + "end": 648, "ctxt": 0 }, "value": "x", @@ -1709,7 +1709,7 @@ "type": "Identifier", "span": { "start": 687, - "end": 693, + "end": 688, "ctxt": 0 }, "value": "x", @@ -1780,7 +1780,7 @@ "type": "Identifier", "span": { "start": 716, - "end": 727, + "end": 717, "ctxt": 0 }, "value": "x", @@ -1853,7 +1853,7 @@ "type": "Identifier", "span": { "start": 746, - "end": 759, + "end": 747, "ctxt": 0 }, "value": "x", @@ -1944,7 +1944,7 @@ "type": "Identifier", "span": { "start": 784, - "end": 790, + "end": 785, "ctxt": 0 }, "value": "x", @@ -2015,7 +2015,7 @@ "type": "Identifier", "span": { "start": 812, - "end": 816, + "end": 813, "ctxt": 0 }, "value": "x", @@ -2088,7 +2088,7 @@ "type": "Identifier", "span": { "start": 834, - "end": 847, + "end": 835, "ctxt": 0 }, "value": "x", @@ -2179,7 +2179,7 @@ "type": "Identifier", "span": { "start": 871, - "end": 877, + "end": 872, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesWithOverloads.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesWithOverloads.json index fcc4a35462e8..547ef2a0b0e5 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesWithOverloads.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesWithOverloads.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 63, - "end": 72, + "end": 64, "ctxt": 0 }, "value": "x", @@ -148,7 +148,7 @@ "type": "Identifier", "span": { "start": 91, - "end": 100, + "end": 92, "ctxt": 0 }, "value": "x", @@ -239,7 +239,7 @@ "type": "Identifier", "span": { "start": 119, - "end": 125, + "end": 120, "ctxt": 0 }, "value": "x", @@ -382,7 +382,7 @@ "type": "Identifier", "span": { "start": 170, - "end": 179, + "end": 171, "ctxt": 0 }, "value": "x", @@ -473,7 +473,7 @@ "type": "Identifier", "span": { "start": 198, - "end": 207, + "end": 199, "ctxt": 0 }, "value": "x", @@ -564,7 +564,7 @@ "type": "Identifier", "span": { "start": 226, - "end": 232, + "end": 227, "ctxt": 0 }, "value": "x", @@ -707,7 +707,7 @@ "type": "Identifier", "span": { "start": 280, - "end": 289, + "end": 281, "ctxt": 0 }, "value": "x", @@ -798,7 +798,7 @@ "type": "Identifier", "span": { "start": 308, - "end": 317, + "end": 309, "ctxt": 0 }, "value": "x", @@ -889,7 +889,7 @@ "type": "Identifier", "span": { "start": 336, - "end": 340, + "end": 337, "ctxt": 0 }, "value": "x", @@ -1000,7 +1000,7 @@ "type": "Identifier", "span": { "start": 354, - "end": 360, + "end": 355, "ctxt": 0 }, "value": "x", @@ -1177,7 +1177,7 @@ "type": "Identifier", "span": { "start": 409, - "end": 418, + "end": 410, "ctxt": 0 }, "value": "x", @@ -1245,7 +1245,7 @@ "type": "Identifier", "span": { "start": 437, - "end": 446, + "end": 438, "ctxt": 0 }, "value": "x", @@ -1376,7 +1376,7 @@ "type": "Identifier", "span": { "start": 490, - "end": 499, + "end": 491, "ctxt": 0 }, "value": "x", @@ -1444,7 +1444,7 @@ "type": "Identifier", "span": { "start": 518, - "end": 527, + "end": 519, "ctxt": 0 }, "value": "x", @@ -1512,7 +1512,7 @@ "type": "Identifier", "span": { "start": 546, - "end": 550, + "end": 547, "ctxt": 0 }, "value": "x", @@ -1644,7 +1644,7 @@ "type": "Identifier", "span": { "start": 576, - "end": 585, + "end": 577, "ctxt": 0 }, "value": "x", @@ -1712,7 +1712,7 @@ "type": "Identifier", "span": { "start": 603, - "end": 612, + "end": 604, "ctxt": 0 }, "value": "x", @@ -1825,7 +1825,7 @@ "type": "Identifier", "span": { "start": 643, - "end": 649, + "end": 644, "ctxt": 0 }, "value": "x", @@ -1938,7 +1938,7 @@ "type": "Identifier", "span": { "start": 689, - "end": 693, + "end": 690, "ctxt": 0 }, "value": "x", @@ -2011,7 +2011,7 @@ "type": "Identifier", "span": { "start": 710, - "end": 714, + "end": 711, "ctxt": 0 }, "value": "x", @@ -2084,7 +2084,7 @@ "type": "Identifier", "span": { "start": 740, - "end": 746, + "end": 741, "ctxt": 0 }, "value": "x", @@ -2155,7 +2155,7 @@ "type": "Identifier", "span": { "start": 768, - "end": 772, + "end": 769, "ctxt": 0 }, "value": "x", @@ -2228,7 +2228,7 @@ "type": "Identifier", "span": { "start": 790, - "end": 794, + "end": 791, "ctxt": 0 }, "value": "x", @@ -2301,7 +2301,7 @@ "type": "Identifier", "span": { "start": 821, - "end": 827, + "end": 822, "ctxt": 0 }, "value": "x", @@ -2372,7 +2372,7 @@ "type": "Identifier", "span": { "start": 849, - "end": 861, + "end": 850, "ctxt": 0 }, "value": "x", @@ -2463,7 +2463,7 @@ "type": "Identifier", "span": { "start": 879, - "end": 891, + "end": 880, "ctxt": 0 }, "value": "x", @@ -2554,7 +2554,7 @@ "type": "Identifier", "span": { "start": 918, - "end": 924, + "end": 919, "ctxt": 0 }, "value": "x", @@ -2625,7 +2625,7 @@ "type": "Identifier", "span": { "start": 945, - "end": 949, + "end": 946, "ctxt": 0 }, "value": "x", @@ -2698,7 +2698,7 @@ "type": "Identifier", "span": { "start": 966, - "end": 970, + "end": 967, "ctxt": 0 }, "value": "x", @@ -2771,7 +2771,7 @@ "type": "Identifier", "span": { "start": 996, - "end": 1002, + "end": 997, "ctxt": 0 }, "value": "x", @@ -2842,7 +2842,7 @@ "type": "Identifier", "span": { "start": 1023, - "end": 1034, + "end": 1024, "ctxt": 0 }, "value": "x", @@ -2915,7 +2915,7 @@ "type": "Identifier", "span": { "start": 1051, - "end": 1062, + "end": 1052, "ctxt": 0 }, "value": "x", @@ -2988,7 +2988,7 @@ "type": "Identifier", "span": { "start": 1088, - "end": 1094, + "end": 1089, "ctxt": 0 }, "value": "x", @@ -3059,7 +3059,7 @@ "type": "Identifier", "span": { "start": 1115, - "end": 1126, + "end": 1116, "ctxt": 0 }, "value": "x", @@ -3132,7 +3132,7 @@ "type": "Identifier", "span": { "start": 1143, - "end": 1154, + "end": 1144, "ctxt": 0 }, "value": "x", @@ -3205,7 +3205,7 @@ "type": "Identifier", "span": { "start": 1180, - "end": 1186, + "end": 1181, "ctxt": 0 }, "value": "x", @@ -3276,7 +3276,7 @@ "type": "Identifier", "span": { "start": 1207, - "end": 1211, + "end": 1208, "ctxt": 0 }, "value": "x", @@ -3349,7 +3349,7 @@ "type": "Identifier", "span": { "start": 1228, - "end": 1232, + "end": 1229, "ctxt": 0 }, "value": "x", @@ -3422,7 +3422,7 @@ "type": "Identifier", "span": { "start": 1258, - "end": 1264, + "end": 1259, "ctxt": 0 }, "value": "x", @@ -3493,7 +3493,7 @@ "type": "Identifier", "span": { "start": 1286, - "end": 1290, + "end": 1287, "ctxt": 0 }, "value": "x", @@ -3566,7 +3566,7 @@ "type": "Identifier", "span": { "start": 1308, - "end": 1320, + "end": 1309, "ctxt": 0 }, "value": "x", @@ -3657,7 +3657,7 @@ "type": "Identifier", "span": { "start": 1344, - "end": 1350, + "end": 1345, "ctxt": 0 }, "value": "x", @@ -3728,7 +3728,7 @@ "type": "Identifier", "span": { "start": 1371, - "end": 1375, + "end": 1372, "ctxt": 0 }, "value": "x", @@ -3801,7 +3801,7 @@ "type": "Identifier", "span": { "start": 1392, - "end": 1396, + "end": 1393, "ctxt": 0 }, "value": "x", @@ -3874,7 +3874,7 @@ "type": "Identifier", "span": { "start": 1427, - "end": 1433, + "end": 1428, "ctxt": 0 }, "value": "x", @@ -3945,7 +3945,7 @@ "type": "Identifier", "span": { "start": 1454, - "end": 1458, + "end": 1455, "ctxt": 0 }, "value": "x", @@ -4018,7 +4018,7 @@ "type": "Identifier", "span": { "start": 1475, - "end": 1486, + "end": 1476, "ctxt": 0 }, "value": "x", @@ -4091,7 +4091,7 @@ "type": "Identifier", "span": { "start": 1517, - "end": 1523, + "end": 1518, "ctxt": 0 }, "value": "x", @@ -4162,7 +4162,7 @@ "type": "Identifier", "span": { "start": 1544, - "end": 1548, + "end": 1545, "ctxt": 0 }, "value": "x", @@ -4235,7 +4235,7 @@ "type": "Identifier", "span": { "start": 1565, - "end": 1569, + "end": 1566, "ctxt": 0 }, "value": "x", @@ -4308,7 +4308,7 @@ "type": "Identifier", "span": { "start": 1600, - "end": 1606, + "end": 1601, "ctxt": 0 }, "value": "x", @@ -4379,7 +4379,7 @@ "type": "Identifier", "span": { "start": 1627, - "end": 1631, + "end": 1628, "ctxt": 0 }, "value": "x", @@ -4452,7 +4452,7 @@ "type": "Identifier", "span": { "start": 1648, - "end": 1660, + "end": 1649, "ctxt": 0 }, "value": "x", @@ -4543,7 +4543,7 @@ "type": "Identifier", "span": { "start": 1683, - "end": 1689, + "end": 1684, "ctxt": 0 }, "value": "x", @@ -4614,7 +4614,7 @@ "type": "Identifier", "span": { "start": 1711, - "end": 1715, + "end": 1712, "ctxt": 0 }, "value": "x", @@ -4687,7 +4687,7 @@ "type": "Identifier", "span": { "start": 1733, - "end": 1744, + "end": 1734, "ctxt": 0 }, "value": "x", @@ -4760,7 +4760,7 @@ "type": "Identifier", "span": { "start": 1776, - "end": 1782, + "end": 1777, "ctxt": 0 }, "value": "x", @@ -4831,7 +4831,7 @@ "type": "Identifier", "span": { "start": 1804, - "end": 1808, + "end": 1805, "ctxt": 0 }, "value": "x", @@ -4904,7 +4904,7 @@ "type": "Identifier", "span": { "start": 1826, - "end": 1837, + "end": 1827, "ctxt": 0 }, "value": "x", @@ -4977,7 +4977,7 @@ "type": "Identifier", "span": { "start": 1861, - "end": 1867, + "end": 1862, "ctxt": 0 }, "value": "x", @@ -5048,7 +5048,7 @@ "type": "Identifier", "span": { "start": 1889, - "end": 1893, + "end": 1890, "ctxt": 0 }, "value": "x", @@ -5121,7 +5121,7 @@ "type": "Identifier", "span": { "start": 1911, - "end": 1923, + "end": 1912, "ctxt": 0 }, "value": "x", @@ -5212,7 +5212,7 @@ "type": "Identifier", "span": { "start": 1947, - "end": 1953, + "end": 1948, "ctxt": 0 }, "value": "x", @@ -5283,7 +5283,7 @@ "type": "Identifier", "span": { "start": 1976, - "end": 1989, + "end": 1977, "ctxt": 0 }, "value": "x", @@ -5374,7 +5374,7 @@ "type": "Identifier", "span": { "start": 2008, - "end": 2020, + "end": 2009, "ctxt": 0 }, "value": "x", @@ -5465,7 +5465,7 @@ "type": "Identifier", "span": { "start": 2045, - "end": 2051, + "end": 2046, "ctxt": 0 }, "value": "x", @@ -5536,7 +5536,7 @@ "type": "Identifier", "span": { "start": 2073, - "end": 2077, + "end": 2074, "ctxt": 0 }, "value": "x", @@ -5609,7 +5609,7 @@ "type": "Identifier", "span": { "start": 2095, - "end": 2106, + "end": 2096, "ctxt": 0 }, "value": "x", @@ -5682,7 +5682,7 @@ "type": "Identifier", "span": { "start": 2134, - "end": 2140, + "end": 2135, "ctxt": 0 }, "value": "x", @@ -5753,7 +5753,7 @@ "type": "Identifier", "span": { "start": 2162, - "end": 2166, + "end": 2163, "ctxt": 0 }, "value": "x", @@ -5826,7 +5826,7 @@ "type": "Identifier", "span": { "start": 2184, - "end": 2195, + "end": 2185, "ctxt": 0 }, "value": "x", @@ -5899,7 +5899,7 @@ "type": "Identifier", "span": { "start": 2219, - "end": 2225, + "end": 2220, "ctxt": 0 }, "value": "x", @@ -5970,7 +5970,7 @@ "type": "Identifier", "span": { "start": 2247, - "end": 2260, + "end": 2248, "ctxt": 0 }, "value": "x", @@ -6061,7 +6061,7 @@ "type": "Identifier", "span": { "start": 2278, - "end": 2290, + "end": 2279, "ctxt": 0 }, "value": "x", @@ -6152,7 +6152,7 @@ "type": "Identifier", "span": { "start": 2314, - "end": 2320, + "end": 2315, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithComplexConstraints.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithComplexConstraints.json index 4c39ce807fe7..d0cd2a6e23e3 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithComplexConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithComplexConstraints.json @@ -46,7 +46,7 @@ "type": "Identifier", "span": { "start": 87, - "end": 91, + "end": 88, "ctxt": 0 }, "value": "x", @@ -83,7 +83,7 @@ "type": "Identifier", "span": { "start": 93, - "end": 97, + "end": 94, "ctxt": 0 }, "value": "y", @@ -182,7 +182,7 @@ "type": "Identifier", "span": { "start": 60, - "end": 64, + "end": 61, "ctxt": 0 }, "value": "x", @@ -219,7 +219,7 @@ "type": "Identifier", "span": { "start": 66, - "end": 70, + "end": 67, "ctxt": 0 }, "value": "y", @@ -372,7 +372,7 @@ "type": "Identifier", "span": { "start": 142, - "end": 146, + "end": 143, "ctxt": 0 }, "value": "x", @@ -409,7 +409,7 @@ "type": "Identifier", "span": { "start": 148, - "end": 152, + "end": 149, "ctxt": 0 }, "value": "y", @@ -541,7 +541,7 @@ "type": "Identifier", "span": { "start": 293, - "end": 297, + "end": 294, "ctxt": 0 }, "value": "x", @@ -614,7 +614,7 @@ "type": "Identifier", "span": { "start": 313, - "end": 317, + "end": 314, "ctxt": 0 }, "value": "x", @@ -687,7 +687,7 @@ "type": "Identifier", "span": { "start": 379, - "end": 385, + "end": 380, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithConstructSignatures.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithConstructSignatures.json index fa7affd9cf28..aa06a5bc5a96 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithConstructSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithConstructSignatures.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 71, - "end": 80, + "end": 72, "ctxt": 0 }, "value": "x", @@ -150,7 +150,7 @@ "type": "Identifier", "span": { "start": 115, - "end": 124, + "end": 116, "ctxt": 0 }, "value": "x", @@ -244,7 +244,7 @@ "type": "Identifier", "span": { "start": 162, - "end": 166, + "end": 163, "ctxt": 0 }, "value": "x", @@ -370,7 +370,7 @@ "type": "Identifier", "span": { "start": 197, - "end": 206, + "end": 198, "ctxt": 0 }, "value": "x", @@ -472,7 +472,7 @@ "type": "Identifier", "span": { "start": 238, - "end": 242, + "end": 239, "ctxt": 0 }, "value": "x", @@ -591,7 +591,7 @@ "type": "Identifier", "span": { "start": 264, - "end": 273, + "end": 265, "ctxt": 0 }, "value": "x", @@ -653,7 +653,7 @@ "type": "Identifier", "span": { "start": 292, - "end": 296, + "end": 293, "ctxt": 0 }, "value": "x", @@ -726,7 +726,7 @@ "type": "Identifier", "span": { "start": 313, - "end": 317, + "end": 314, "ctxt": 0 }, "value": "x", @@ -799,7 +799,7 @@ "type": "Identifier", "span": { "start": 343, - "end": 349, + "end": 344, "ctxt": 0 }, "value": "x", @@ -870,7 +870,7 @@ "type": "Identifier", "span": { "start": 371, - "end": 375, + "end": 372, "ctxt": 0 }, "value": "x", @@ -943,7 +943,7 @@ "type": "Identifier", "span": { "start": 393, - "end": 397, + "end": 394, "ctxt": 0 }, "value": "x", @@ -1016,7 +1016,7 @@ "type": "Identifier", "span": { "start": 424, - "end": 430, + "end": 425, "ctxt": 0 }, "value": "x", @@ -1087,7 +1087,7 @@ "type": "Identifier", "span": { "start": 452, - "end": 464, + "end": 453, "ctxt": 0 }, "value": "x", @@ -1178,7 +1178,7 @@ "type": "Identifier", "span": { "start": 482, - "end": 494, + "end": 483, "ctxt": 0 }, "value": "x", @@ -1269,7 +1269,7 @@ "type": "Identifier", "span": { "start": 521, - "end": 527, + "end": 522, "ctxt": 0 }, "value": "x", @@ -1340,7 +1340,7 @@ "type": "Identifier", "span": { "start": 548, - "end": 552, + "end": 549, "ctxt": 0 }, "value": "x", @@ -1413,7 +1413,7 @@ "type": "Identifier", "span": { "start": 569, - "end": 573, + "end": 570, "ctxt": 0 }, "value": "x", @@ -1486,7 +1486,7 @@ "type": "Identifier", "span": { "start": 599, - "end": 605, + "end": 600, "ctxt": 0 }, "value": "x", @@ -1557,7 +1557,7 @@ "type": "Identifier", "span": { "start": 626, - "end": 637, + "end": 627, "ctxt": 0 }, "value": "x", @@ -1630,7 +1630,7 @@ "type": "Identifier", "span": { "start": 654, - "end": 665, + "end": 655, "ctxt": 0 }, "value": "x", @@ -1703,7 +1703,7 @@ "type": "Identifier", "span": { "start": 691, - "end": 697, + "end": 692, "ctxt": 0 }, "value": "x", @@ -1774,7 +1774,7 @@ "type": "Identifier", "span": { "start": 718, - "end": 722, + "end": 719, "ctxt": 0 }, "value": "x", @@ -1847,7 +1847,7 @@ "type": "Identifier", "span": { "start": 739, - "end": 743, + "end": 740, "ctxt": 0 }, "value": "x", @@ -1920,7 +1920,7 @@ "type": "Identifier", "span": { "start": 769, - "end": 775, + "end": 770, "ctxt": 0 }, "value": "x", @@ -1991,7 +1991,7 @@ "type": "Identifier", "span": { "start": 797, - "end": 801, + "end": 798, "ctxt": 0 }, "value": "x", @@ -2064,7 +2064,7 @@ "type": "Identifier", "span": { "start": 819, - "end": 831, + "end": 820, "ctxt": 0 }, "value": "x", @@ -2155,7 +2155,7 @@ "type": "Identifier", "span": { "start": 858, - "end": 864, + "end": 859, "ctxt": 0 }, "value": "x", @@ -2226,7 +2226,7 @@ "type": "Identifier", "span": { "start": 885, - "end": 889, + "end": 886, "ctxt": 0 }, "value": "x", @@ -2299,7 +2299,7 @@ "type": "Identifier", "span": { "start": 906, - "end": 910, + "end": 907, "ctxt": 0 }, "value": "x", @@ -2372,7 +2372,7 @@ "type": "Identifier", "span": { "start": 934, - "end": 940, + "end": 935, "ctxt": 0 }, "value": "x", @@ -2443,7 +2443,7 @@ "type": "Identifier", "span": { "start": 961, - "end": 965, + "end": 962, "ctxt": 0 }, "value": "x", @@ -2516,7 +2516,7 @@ "type": "Identifier", "span": { "start": 982, - "end": 993, + "end": 983, "ctxt": 0 }, "value": "x", @@ -2589,7 +2589,7 @@ "type": "Identifier", "span": { "start": 1016, - "end": 1022, + "end": 1017, "ctxt": 0 }, "value": "x", @@ -2660,7 +2660,7 @@ "type": "Identifier", "span": { "start": 1043, - "end": 1047, + "end": 1044, "ctxt": 0 }, "value": "x", @@ -2733,7 +2733,7 @@ "type": "Identifier", "span": { "start": 1064, - "end": 1068, + "end": 1065, "ctxt": 0 }, "value": "x", @@ -2806,7 +2806,7 @@ "type": "Identifier", "span": { "start": 1091, - "end": 1097, + "end": 1092, "ctxt": 0 }, "value": "x", @@ -2877,7 +2877,7 @@ "type": "Identifier", "span": { "start": 1118, - "end": 1122, + "end": 1119, "ctxt": 0 }, "value": "x", @@ -2950,7 +2950,7 @@ "type": "Identifier", "span": { "start": 1139, - "end": 1151, + "end": 1140, "ctxt": 0 }, "value": "x", @@ -3041,7 +3041,7 @@ "type": "Identifier", "span": { "start": 1177, - "end": 1183, + "end": 1178, "ctxt": 0 }, "value": "x", @@ -3112,7 +3112,7 @@ "type": "Identifier", "span": { "start": 1205, - "end": 1209, + "end": 1206, "ctxt": 0 }, "value": "x", @@ -3185,7 +3185,7 @@ "type": "Identifier", "span": { "start": 1227, - "end": 1238, + "end": 1228, "ctxt": 0 }, "value": "x", @@ -3258,7 +3258,7 @@ "type": "Identifier", "span": { "start": 1262, - "end": 1268, + "end": 1263, "ctxt": 0 }, "value": "x", @@ -3329,7 +3329,7 @@ "type": "Identifier", "span": { "start": 1290, - "end": 1294, + "end": 1291, "ctxt": 0 }, "value": "x", @@ -3402,7 +3402,7 @@ "type": "Identifier", "span": { "start": 1312, - "end": 1324, + "end": 1313, "ctxt": 0 }, "value": "x", @@ -3493,7 +3493,7 @@ "type": "Identifier", "span": { "start": 1348, - "end": 1354, + "end": 1349, "ctxt": 0 }, "value": "x", @@ -3564,7 +3564,7 @@ "type": "Identifier", "span": { "start": 1377, - "end": 1390, + "end": 1378, "ctxt": 0 }, "value": "x", @@ -3655,7 +3655,7 @@ "type": "Identifier", "span": { "start": 1409, - "end": 1421, + "end": 1410, "ctxt": 0 }, "value": "x", @@ -3746,7 +3746,7 @@ "type": "Identifier", "span": { "start": 1446, - "end": 1452, + "end": 1447, "ctxt": 0 }, "value": "x", @@ -3817,7 +3817,7 @@ "type": "Identifier", "span": { "start": 1474, - "end": 1478, + "end": 1475, "ctxt": 0 }, "value": "x", @@ -3890,7 +3890,7 @@ "type": "Identifier", "span": { "start": 1496, - "end": 1507, + "end": 1497, "ctxt": 0 }, "value": "x", @@ -3963,7 +3963,7 @@ "type": "Identifier", "span": { "start": 1534, - "end": 1540, + "end": 1535, "ctxt": 0 }, "value": "x", @@ -4034,7 +4034,7 @@ "type": "Identifier", "span": { "start": 1562, - "end": 1575, + "end": 1563, "ctxt": 0 }, "value": "x", @@ -4125,7 +4125,7 @@ "type": "Identifier", "span": { "start": 1593, - "end": 1605, + "end": 1594, "ctxt": 0 }, "value": "x", @@ -4216,7 +4216,7 @@ "type": "Identifier", "span": { "start": 1629, - "end": 1635, + "end": 1630, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithConstructSignatures2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithConstructSignatures2.json index 5d138967bd33..ed544234e1cc 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithConstructSignatures2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithConstructSignatures2.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 71, - "end": 80, + "end": 72, "ctxt": 0 }, "value": "x", @@ -167,7 +167,7 @@ "type": "Identifier", "span": { "start": 131, - "end": 135, + "end": 132, "ctxt": 0 }, "value": "x", @@ -310,7 +310,7 @@ "type": "Identifier", "span": { "start": 179, - "end": 189, + "end": 180, "ctxt": 0 }, "value": "x", @@ -428,7 +428,7 @@ "type": "Identifier", "span": { "start": 229, - "end": 233, + "end": 230, "ctxt": 0 }, "value": "x", @@ -547,7 +547,7 @@ "type": "Identifier", "span": { "start": 255, - "end": 262, + "end": 256, "ctxt": 0 }, "value": "x", @@ -670,7 +670,7 @@ "type": "Identifier", "span": { "start": 288, - "end": 297, + "end": 289, "ctxt": 0 }, "value": "x", @@ -776,7 +776,7 @@ "type": "Identifier", "span": { "start": 383, - "end": 387, + "end": 384, "ctxt": 0 }, "value": "x", @@ -849,7 +849,7 @@ "type": "Identifier", "span": { "start": 405, - "end": 409, + "end": 406, "ctxt": 0 }, "value": "x", @@ -922,7 +922,7 @@ "type": "Identifier", "span": { "start": 436, - "end": 442, + "end": 437, "ctxt": 0 }, "value": "x", @@ -993,7 +993,7 @@ "type": "Identifier", "span": { "start": 464, - "end": 476, + "end": 465, "ctxt": 0 }, "value": "x", @@ -1084,7 +1084,7 @@ "type": "Identifier", "span": { "start": 494, - "end": 506, + "end": 495, "ctxt": 0 }, "value": "x", @@ -1175,7 +1175,7 @@ "type": "Identifier", "span": { "start": 533, - "end": 539, + "end": 534, "ctxt": 0 }, "value": "x", @@ -1246,7 +1246,7 @@ "type": "Identifier", "span": { "start": 560, - "end": 564, + "end": 561, "ctxt": 0 }, "value": "x", @@ -1319,7 +1319,7 @@ "type": "Identifier", "span": { "start": 581, - "end": 585, + "end": 582, "ctxt": 0 }, "value": "x", @@ -1392,7 +1392,7 @@ "type": "Identifier", "span": { "start": 611, - "end": 617, + "end": 612, "ctxt": 0 }, "value": "x", @@ -1463,7 +1463,7 @@ "type": "Identifier", "span": { "start": 638, - "end": 649, + "end": 639, "ctxt": 0 }, "value": "x", @@ -1536,7 +1536,7 @@ "type": "Identifier", "span": { "start": 666, - "end": 677, + "end": 667, "ctxt": 0 }, "value": "x", @@ -1609,7 +1609,7 @@ "type": "Identifier", "span": { "start": 703, - "end": 709, + "end": 704, "ctxt": 0 }, "value": "x", @@ -1680,7 +1680,7 @@ "type": "Identifier", "span": { "start": 730, - "end": 741, + "end": 731, "ctxt": 0 }, "value": "x", @@ -1753,7 +1753,7 @@ "type": "Identifier", "span": { "start": 758, - "end": 769, + "end": 759, "ctxt": 0 }, "value": "x", @@ -1826,7 +1826,7 @@ "type": "Identifier", "span": { "start": 795, - "end": 801, + "end": 796, "ctxt": 0 }, "value": "x", @@ -1897,7 +1897,7 @@ "type": "Identifier", "span": { "start": 822, - "end": 826, + "end": 823, "ctxt": 0 }, "value": "x", @@ -1970,7 +1970,7 @@ "type": "Identifier", "span": { "start": 843, - "end": 847, + "end": 844, "ctxt": 0 }, "value": "x", @@ -2043,7 +2043,7 @@ "type": "Identifier", "span": { "start": 870, - "end": 876, + "end": 871, "ctxt": 0 }, "value": "x", @@ -2114,7 +2114,7 @@ "type": "Identifier", "span": { "start": 897, - "end": 901, + "end": 898, "ctxt": 0 }, "value": "x", @@ -2187,7 +2187,7 @@ "type": "Identifier", "span": { "start": 918, - "end": 930, + "end": 919, "ctxt": 0 }, "value": "x", @@ -2278,7 +2278,7 @@ "type": "Identifier", "span": { "start": 986, - "end": 992, + "end": 987, "ctxt": 0 }, "value": "x", @@ -2349,7 +2349,7 @@ "type": "Identifier", "span": { "start": 1014, - "end": 1018, + "end": 1015, "ctxt": 0 }, "value": "x", @@ -2422,7 +2422,7 @@ "type": "Identifier", "span": { "start": 1036, - "end": 1047, + "end": 1037, "ctxt": 0 }, "value": "x", @@ -2495,7 +2495,7 @@ "type": "Identifier", "span": { "start": 1071, - "end": 1077, + "end": 1072, "ctxt": 0 }, "value": "x", @@ -2566,7 +2566,7 @@ "type": "Identifier", "span": { "start": 1099, - "end": 1103, + "end": 1100, "ctxt": 0 }, "value": "x", @@ -2639,7 +2639,7 @@ "type": "Identifier", "span": { "start": 1121, - "end": 1132, + "end": 1122, "ctxt": 0 }, "value": "x", @@ -2712,7 +2712,7 @@ "type": "Identifier", "span": { "start": 1156, - "end": 1162, + "end": 1157, "ctxt": 0 }, "value": "x", @@ -2783,7 +2783,7 @@ "type": "Identifier", "span": { "start": 1184, - "end": 1188, + "end": 1185, "ctxt": 0 }, "value": "x", @@ -2856,7 +2856,7 @@ "type": "Identifier", "span": { "start": 1206, - "end": 1218, + "end": 1207, "ctxt": 0 }, "value": "x", @@ -2947,7 +2947,7 @@ "type": "Identifier", "span": { "start": 1242, - "end": 1248, + "end": 1243, "ctxt": 0 }, "value": "x", @@ -3018,7 +3018,7 @@ "type": "Identifier", "span": { "start": 1271, - "end": 1284, + "end": 1272, "ctxt": 0 }, "value": "x", @@ -3109,7 +3109,7 @@ "type": "Identifier", "span": { "start": 1303, - "end": 1315, + "end": 1304, "ctxt": 0 }, "value": "x", @@ -3200,7 +3200,7 @@ "type": "Identifier", "span": { "start": 1340, - "end": 1346, + "end": 1341, "ctxt": 0 }, "value": "x", @@ -3271,7 +3271,7 @@ "type": "Identifier", "span": { "start": 1368, - "end": 1372, + "end": 1369, "ctxt": 0 }, "value": "x", @@ -3344,7 +3344,7 @@ "type": "Identifier", "span": { "start": 1390, - "end": 1401, + "end": 1391, "ctxt": 0 }, "value": "x", @@ -3417,7 +3417,7 @@ "type": "Identifier", "span": { "start": 1425, - "end": 1431, + "end": 1426, "ctxt": 0 }, "value": "x", @@ -3488,7 +3488,7 @@ "type": "Identifier", "span": { "start": 1453, - "end": 1457, + "end": 1454, "ctxt": 0 }, "value": "x", @@ -3561,7 +3561,7 @@ "type": "Identifier", "span": { "start": 1475, - "end": 1486, + "end": 1476, "ctxt": 0 }, "value": "x", @@ -3634,7 +3634,7 @@ "type": "Identifier", "span": { "start": 1510, - "end": 1516, + "end": 1511, "ctxt": 0 }, "value": "x", @@ -3705,7 +3705,7 @@ "type": "Identifier", "span": { "start": 1538, - "end": 1551, + "end": 1539, "ctxt": 0 }, "value": "x", @@ -3796,7 +3796,7 @@ "type": "Identifier", "span": { "start": 1569, - "end": 1581, + "end": 1570, "ctxt": 0 }, "value": "x", @@ -3887,7 +3887,7 @@ "type": "Identifier", "span": { "start": 1605, - "end": 1611, + "end": 1606, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.json index d56f4c6140b3..c4af43f0f9db 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 71, - "end": 80, + "end": 72, "ctxt": 0 }, "value": "x", @@ -92,7 +92,7 @@ "type": "Identifier", "span": { "start": 82, - "end": 91, + "end": 83, "ctxt": 0 }, "value": "y", @@ -203,7 +203,7 @@ "type": "Identifier", "span": { "start": 142, - "end": 146, + "end": 143, "ctxt": 0 }, "value": "x", @@ -249,7 +249,7 @@ "type": "Identifier", "span": { "start": 148, - "end": 152, + "end": 149, "ctxt": 0 }, "value": "y", @@ -392,7 +392,7 @@ "type": "Identifier", "span": { "start": 196, - "end": 205, + "end": 197, "ctxt": 0 }, "value": "x", @@ -510,7 +510,7 @@ "type": "Identifier", "span": { "start": 245, - "end": 249, + "end": 246, "ctxt": 0 }, "value": "x", @@ -629,7 +629,7 @@ "type": "Identifier", "span": { "start": 271, - "end": 280, + "end": 272, "ctxt": 0 }, "value": "x", @@ -656,7 +656,7 @@ "type": "Identifier", "span": { "start": 282, - "end": 291, + "end": 283, "ctxt": 0 }, "value": "y", @@ -769,7 +769,7 @@ "type": "Identifier", "span": { "start": 317, - "end": 326, + "end": 318, "ctxt": 0 }, "value": "x", @@ -865,7 +865,7 @@ "type": "Identifier", "span": { "start": 412, - "end": 416, + "end": 413, "ctxt": 0 }, "value": "x", @@ -938,7 +938,7 @@ "type": "Identifier", "span": { "start": 434, - "end": 438, + "end": 435, "ctxt": 0 }, "value": "x", @@ -1011,7 +1011,7 @@ "type": "Identifier", "span": { "start": 465, - "end": 471, + "end": 466, "ctxt": 0 }, "value": "x", @@ -1082,7 +1082,7 @@ "type": "Identifier", "span": { "start": 493, - "end": 505, + "end": 494, "ctxt": 0 }, "value": "x", @@ -1173,7 +1173,7 @@ "type": "Identifier", "span": { "start": 523, - "end": 535, + "end": 524, "ctxt": 0 }, "value": "x", @@ -1264,7 +1264,7 @@ "type": "Identifier", "span": { "start": 562, - "end": 568, + "end": 563, "ctxt": 0 }, "value": "x", @@ -1335,7 +1335,7 @@ "type": "Identifier", "span": { "start": 589, - "end": 593, + "end": 590, "ctxt": 0 }, "value": "x", @@ -1408,7 +1408,7 @@ "type": "Identifier", "span": { "start": 610, - "end": 614, + "end": 611, "ctxt": 0 }, "value": "x", @@ -1481,7 +1481,7 @@ "type": "Identifier", "span": { "start": 640, - "end": 646, + "end": 641, "ctxt": 0 }, "value": "x", @@ -1552,7 +1552,7 @@ "type": "Identifier", "span": { "start": 667, - "end": 678, + "end": 668, "ctxt": 0 }, "value": "x", @@ -1625,7 +1625,7 @@ "type": "Identifier", "span": { "start": 695, - "end": 706, + "end": 696, "ctxt": 0 }, "value": "x", @@ -1698,7 +1698,7 @@ "type": "Identifier", "span": { "start": 732, - "end": 738, + "end": 733, "ctxt": 0 }, "value": "x", @@ -1769,7 +1769,7 @@ "type": "Identifier", "span": { "start": 759, - "end": 770, + "end": 760, "ctxt": 0 }, "value": "x", @@ -1842,7 +1842,7 @@ "type": "Identifier", "span": { "start": 787, - "end": 798, + "end": 788, "ctxt": 0 }, "value": "x", @@ -1915,7 +1915,7 @@ "type": "Identifier", "span": { "start": 824, - "end": 830, + "end": 825, "ctxt": 0 }, "value": "x", @@ -1986,7 +1986,7 @@ "type": "Identifier", "span": { "start": 851, - "end": 855, + "end": 852, "ctxt": 0 }, "value": "x", @@ -2059,7 +2059,7 @@ "type": "Identifier", "span": { "start": 872, - "end": 876, + "end": 873, "ctxt": 0 }, "value": "x", @@ -2132,7 +2132,7 @@ "type": "Identifier", "span": { "start": 899, - "end": 905, + "end": 900, "ctxt": 0 }, "value": "x", @@ -2203,7 +2203,7 @@ "type": "Identifier", "span": { "start": 926, - "end": 930, + "end": 927, "ctxt": 0 }, "value": "x", @@ -2276,7 +2276,7 @@ "type": "Identifier", "span": { "start": 947, - "end": 959, + "end": 948, "ctxt": 0 }, "value": "x", @@ -2367,7 +2367,7 @@ "type": "Identifier", "span": { "start": 1015, - "end": 1021, + "end": 1016, "ctxt": 0 }, "value": "x", @@ -2438,7 +2438,7 @@ "type": "Identifier", "span": { "start": 1043, - "end": 1047, + "end": 1044, "ctxt": 0 }, "value": "x", @@ -2511,7 +2511,7 @@ "type": "Identifier", "span": { "start": 1065, - "end": 1076, + "end": 1066, "ctxt": 0 }, "value": "x", @@ -2584,7 +2584,7 @@ "type": "Identifier", "span": { "start": 1100, - "end": 1106, + "end": 1101, "ctxt": 0 }, "value": "x", @@ -2655,7 +2655,7 @@ "type": "Identifier", "span": { "start": 1128, - "end": 1132, + "end": 1129, "ctxt": 0 }, "value": "x", @@ -2728,7 +2728,7 @@ "type": "Identifier", "span": { "start": 1150, - "end": 1161, + "end": 1151, "ctxt": 0 }, "value": "x", @@ -2801,7 +2801,7 @@ "type": "Identifier", "span": { "start": 1185, - "end": 1191, + "end": 1186, "ctxt": 0 }, "value": "x", @@ -2872,7 +2872,7 @@ "type": "Identifier", "span": { "start": 1213, - "end": 1217, + "end": 1214, "ctxt": 0 }, "value": "x", @@ -2945,7 +2945,7 @@ "type": "Identifier", "span": { "start": 1235, - "end": 1247, + "end": 1236, "ctxt": 0 }, "value": "x", @@ -3036,7 +3036,7 @@ "type": "Identifier", "span": { "start": 1271, - "end": 1277, + "end": 1272, "ctxt": 0 }, "value": "x", @@ -3107,7 +3107,7 @@ "type": "Identifier", "span": { "start": 1300, - "end": 1313, + "end": 1301, "ctxt": 0 }, "value": "x", @@ -3198,7 +3198,7 @@ "type": "Identifier", "span": { "start": 1332, - "end": 1344, + "end": 1333, "ctxt": 0 }, "value": "x", @@ -3289,7 +3289,7 @@ "type": "Identifier", "span": { "start": 1369, - "end": 1375, + "end": 1370, "ctxt": 0 }, "value": "x", @@ -3360,7 +3360,7 @@ "type": "Identifier", "span": { "start": 1397, - "end": 1401, + "end": 1398, "ctxt": 0 }, "value": "x", @@ -3433,7 +3433,7 @@ "type": "Identifier", "span": { "start": 1419, - "end": 1430, + "end": 1420, "ctxt": 0 }, "value": "x", @@ -3506,7 +3506,7 @@ "type": "Identifier", "span": { "start": 1454, - "end": 1460, + "end": 1455, "ctxt": 0 }, "value": "x", @@ -3577,7 +3577,7 @@ "type": "Identifier", "span": { "start": 1482, - "end": 1486, + "end": 1483, "ctxt": 0 }, "value": "x", @@ -3650,7 +3650,7 @@ "type": "Identifier", "span": { "start": 1504, - "end": 1515, + "end": 1505, "ctxt": 0 }, "value": "x", @@ -3723,7 +3723,7 @@ "type": "Identifier", "span": { "start": 1539, - "end": 1545, + "end": 1540, "ctxt": 0 }, "value": "x", @@ -3794,7 +3794,7 @@ "type": "Identifier", "span": { "start": 1567, - "end": 1580, + "end": 1568, "ctxt": 0 }, "value": "x", @@ -3885,7 +3885,7 @@ "type": "Identifier", "span": { "start": 1598, - "end": 1610, + "end": 1599, "ctxt": 0 }, "value": "x", @@ -3976,7 +3976,7 @@ "type": "Identifier", "span": { "start": 1634, - "end": 1640, + "end": 1635, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignatures.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignatures.json index 884847986816..034957ff9c30 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignatures.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 66, - "end": 70, + "end": 67, "ctxt": 0 }, "value": "x", @@ -252,7 +252,7 @@ "type": "Identifier", "span": { "start": 116, - "end": 120, + "end": 117, "ctxt": 0 }, "value": "x", @@ -447,7 +447,7 @@ "type": "Identifier", "span": { "start": 166, - "end": 170, + "end": 167, "ctxt": 0 }, "value": "x", @@ -676,7 +676,7 @@ "type": "Identifier", "span": { "start": 220, - "end": 224, + "end": 221, "ctxt": 0 }, "value": "x", @@ -795,7 +795,7 @@ "type": "Identifier", "span": { "start": 259, - "end": 263, + "end": 260, "ctxt": 0 }, "value": "x", @@ -959,7 +959,7 @@ "type": "Identifier", "span": { "start": 288, - "end": 292, + "end": 289, "ctxt": 0 }, "value": "x", @@ -1124,7 +1124,7 @@ "type": "Identifier", "span": { "start": 316, - "end": 320, + "end": 317, "ctxt": 0 }, "value": "x", @@ -1262,7 +1262,7 @@ "type": "Identifier", "span": { "start": 354, - "end": 358, + "end": 355, "ctxt": 0 }, "value": "x", @@ -1335,7 +1335,7 @@ "type": "Identifier", "span": { "start": 375, - "end": 379, + "end": 376, "ctxt": 0 }, "value": "x", @@ -1408,7 +1408,7 @@ "type": "Identifier", "span": { "start": 405, - "end": 411, + "end": 406, "ctxt": 0 }, "value": "x", @@ -1479,7 +1479,7 @@ "type": "Identifier", "span": { "start": 433, - "end": 445, + "end": 434, "ctxt": 0 }, "value": "x", @@ -1570,7 +1570,7 @@ "type": "Identifier", "span": { "start": 463, - "end": 475, + "end": 464, "ctxt": 0 }, "value": "x", @@ -1661,7 +1661,7 @@ "type": "Identifier", "span": { "start": 502, - "end": 508, + "end": 503, "ctxt": 0 }, "value": "x", @@ -1732,7 +1732,7 @@ "type": "Identifier", "span": { "start": 530, - "end": 542, + "end": 531, "ctxt": 0 }, "value": "x", @@ -1823,7 +1823,7 @@ "type": "Identifier", "span": { "start": 560, - "end": 572, + "end": 561, "ctxt": 0 }, "value": "x", @@ -1914,7 +1914,7 @@ "type": "Identifier", "span": { "start": 599, - "end": 605, + "end": 600, "ctxt": 0 }, "value": "x", @@ -1985,7 +1985,7 @@ "type": "Identifier", "span": { "start": 626, - "end": 638, + "end": 627, "ctxt": 0 }, "value": "x", @@ -2076,7 +2076,7 @@ "type": "Identifier", "span": { "start": 655, - "end": 667, + "end": 656, "ctxt": 0 }, "value": "x", @@ -2167,7 +2167,7 @@ "type": "Identifier", "span": { "start": 693, - "end": 699, + "end": 694, "ctxt": 0 }, "value": "x", @@ -2238,7 +2238,7 @@ "type": "Identifier", "span": { "start": 720, - "end": 731, + "end": 721, "ctxt": 0 }, "value": "x", @@ -2311,7 +2311,7 @@ "type": "Identifier", "span": { "start": 748, - "end": 759, + "end": 749, "ctxt": 0 }, "value": "x", @@ -2384,7 +2384,7 @@ "type": "Identifier", "span": { "start": 785, - "end": 791, + "end": 786, "ctxt": 0 }, "value": "x", @@ -2455,7 +2455,7 @@ "type": "Identifier", "span": { "start": 812, - "end": 823, + "end": 813, "ctxt": 0 }, "value": "x", @@ -2528,7 +2528,7 @@ "type": "Identifier", "span": { "start": 840, - "end": 851, + "end": 841, "ctxt": 0 }, "value": "x", @@ -2601,7 +2601,7 @@ "type": "Identifier", "span": { "start": 877, - "end": 883, + "end": 878, "ctxt": 0 }, "value": "x", @@ -2672,7 +2672,7 @@ "type": "Identifier", "span": { "start": 904, - "end": 908, + "end": 905, "ctxt": 0 }, "value": "x", @@ -2745,7 +2745,7 @@ "type": "Identifier", "span": { "start": 925, - "end": 937, + "end": 926, "ctxt": 0 }, "value": "x", @@ -2836,7 +2836,7 @@ "type": "Identifier", "span": { "start": 960, - "end": 966, + "end": 961, "ctxt": 0 }, "value": "x", @@ -2907,7 +2907,7 @@ "type": "Identifier", "span": { "start": 988, - "end": 992, + "end": 989, "ctxt": 0 }, "value": "x", @@ -2980,7 +2980,7 @@ "type": "Identifier", "span": { "start": 1010, - "end": 1022, + "end": 1011, "ctxt": 0 }, "value": "x", @@ -3071,7 +3071,7 @@ "type": "Identifier", "span": { "start": 1046, - "end": 1052, + "end": 1047, "ctxt": 0 }, "value": "x", @@ -3142,7 +3142,7 @@ "type": "Identifier", "span": { "start": 1073, - "end": 1077, + "end": 1074, "ctxt": 0 }, "value": "x", @@ -3215,7 +3215,7 @@ "type": "Identifier", "span": { "start": 1094, - "end": 1106, + "end": 1095, "ctxt": 0 }, "value": "x", @@ -3306,7 +3306,7 @@ "type": "Identifier", "span": { "start": 1129, - "end": 1135, + "end": 1130, "ctxt": 0 }, "value": "x", @@ -3377,7 +3377,7 @@ "type": "Identifier", "span": { "start": 1156, - "end": 1160, + "end": 1157, "ctxt": 0 }, "value": "x", @@ -3450,7 +3450,7 @@ "type": "Identifier", "span": { "start": 1177, - "end": 1188, + "end": 1178, "ctxt": 0 }, "value": "x", @@ -3523,7 +3523,7 @@ "type": "Identifier", "span": { "start": 1214, - "end": 1220, + "end": 1215, "ctxt": 0 }, "value": "x", @@ -3594,7 +3594,7 @@ "type": "Identifier", "span": { "start": 1241, - "end": 1253, + "end": 1242, "ctxt": 0 }, "value": "x", @@ -3685,7 +3685,7 @@ "type": "Identifier", "span": { "start": 1270, - "end": 1282, + "end": 1271, "ctxt": 0 }, "value": "x", @@ -3776,7 +3776,7 @@ "type": "Identifier", "span": { "start": 1308, - "end": 1314, + "end": 1309, "ctxt": 0 }, "value": "x", @@ -3847,7 +3847,7 @@ "type": "Identifier", "span": { "start": 1335, - "end": 1347, + "end": 1336, "ctxt": 0 }, "value": "x", @@ -3938,7 +3938,7 @@ "type": "Identifier", "span": { "start": 1364, - "end": 1376, + "end": 1365, "ctxt": 0 }, "value": "x", @@ -4029,7 +4029,7 @@ "type": "Identifier", "span": { "start": 1402, - "end": 1408, + "end": 1403, "ctxt": 0 }, "value": "x", @@ -4100,7 +4100,7 @@ "type": "Identifier", "span": { "start": 1430, - "end": 1442, + "end": 1431, "ctxt": 0 }, "value": "x", @@ -4191,7 +4191,7 @@ "type": "Identifier", "span": { "start": 1460, - "end": 1471, + "end": 1461, "ctxt": 0 }, "value": "x", @@ -4264,7 +4264,7 @@ "type": "Identifier", "span": { "start": 1495, - "end": 1501, + "end": 1496, "ctxt": 0 }, "value": "x", @@ -4335,7 +4335,7 @@ "type": "Identifier", "span": { "start": 1523, - "end": 1535, + "end": 1524, "ctxt": 0 }, "value": "x", @@ -4426,7 +4426,7 @@ "type": "Identifier", "span": { "start": 1553, - "end": 1564, + "end": 1554, "ctxt": 0 }, "value": "x", @@ -4499,7 +4499,7 @@ "type": "Identifier", "span": { "start": 1588, - "end": 1594, + "end": 1589, "ctxt": 0 }, "value": "x", @@ -4570,7 +4570,7 @@ "type": "Identifier", "span": { "start": 1616, - "end": 1628, + "end": 1617, "ctxt": 0 }, "value": "x", @@ -4661,7 +4661,7 @@ "type": "Identifier", "span": { "start": 1646, - "end": 1658, + "end": 1647, "ctxt": 0 }, "value": "x", @@ -4752,7 +4752,7 @@ "type": "Identifier", "span": { "start": 1685, - "end": 1691, + "end": 1686, "ctxt": 0 }, "value": "x", @@ -4823,7 +4823,7 @@ "type": "Identifier", "span": { "start": 1714, - "end": 1719, + "end": 1715, "ctxt": 0 }, "value": "x", @@ -4896,7 +4896,7 @@ "type": "Identifier", "span": { "start": 1738, - "end": 1750, + "end": 1739, "ctxt": 0 }, "value": "x", @@ -4987,7 +4987,7 @@ "type": "Identifier", "span": { "start": 1775, - "end": 1781, + "end": 1776, "ctxt": 0 }, "value": "x", @@ -5058,7 +5058,7 @@ "type": "Identifier", "span": { "start": 1803, - "end": 1815, + "end": 1804, "ctxt": 0 }, "value": "x", @@ -5149,7 +5149,7 @@ "type": "Identifier", "span": { "start": 1833, - "end": 1844, + "end": 1834, "ctxt": 0 }, "value": "x", @@ -5222,7 +5222,7 @@ "type": "Identifier", "span": { "start": 1868, - "end": 1874, + "end": 1869, "ctxt": 0 }, "value": "x", @@ -5293,7 +5293,7 @@ "type": "Identifier", "span": { "start": 1896, - "end": 1908, + "end": 1897, "ctxt": 0 }, "value": "x", @@ -5384,7 +5384,7 @@ "type": "Identifier", "span": { "start": 1926, - "end": 1937, + "end": 1927, "ctxt": 0 }, "value": "x", @@ -5457,7 +5457,7 @@ "type": "Identifier", "span": { "start": 1961, - "end": 1967, + "end": 1962, "ctxt": 0 }, "value": "x", @@ -5528,7 +5528,7 @@ "type": "Identifier", "span": { "start": 1989, - "end": 1994, + "end": 1990, "ctxt": 0 }, "value": "x", @@ -5601,7 +5601,7 @@ "type": "Identifier", "span": { "start": 2012, - "end": 2024, + "end": 2013, "ctxt": 0 }, "value": "x", @@ -5692,7 +5692,7 @@ "type": "Identifier", "span": { "start": 2048, - "end": 2054, + "end": 2049, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignatures2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignatures2.json index 4926191750b1..b6f66f506698 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignatures2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignatures2.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 69, - "end": 73, + "end": 70, "ctxt": 0 }, "value": "x", @@ -103,7 +103,7 @@ "type": "Identifier", "span": { "start": 75, - "end": 79, + "end": 76, "ctxt": 0 }, "value": "y", @@ -321,7 +321,7 @@ "type": "Identifier", "span": { "start": 128, - "end": 132, + "end": 129, "ctxt": 0 }, "value": "x", @@ -367,7 +367,7 @@ "type": "Identifier", "span": { "start": 134, - "end": 138, + "end": 135, "ctxt": 0 }, "value": "y", @@ -585,7 +585,7 @@ "type": "Identifier", "span": { "start": 187, - "end": 191, + "end": 188, "ctxt": 0 }, "value": "x", @@ -631,7 +631,7 @@ "type": "Identifier", "span": { "start": 193, - "end": 197, + "end": 194, "ctxt": 0 }, "value": "y", @@ -906,7 +906,7 @@ "type": "Identifier", "span": { "start": 250, - "end": 254, + "end": 251, "ctxt": 0 }, "value": "x", @@ -943,7 +943,7 @@ "type": "Identifier", "span": { "start": 256, - "end": 260, + "end": 257, "ctxt": 0 }, "value": "y", @@ -1062,7 +1062,7 @@ "type": "Identifier", "span": { "start": 298, - "end": 302, + "end": 299, "ctxt": 0 }, "value": "x", @@ -1099,7 +1099,7 @@ "type": "Identifier", "span": { "start": 304, - "end": 308, + "end": 305, "ctxt": 0 }, "value": "y", @@ -1286,7 +1286,7 @@ "type": "Identifier", "span": { "start": 336, - "end": 340, + "end": 337, "ctxt": 0 }, "value": "x", @@ -1323,7 +1323,7 @@ "type": "Identifier", "span": { "start": 342, - "end": 346, + "end": 343, "ctxt": 0 }, "value": "y", @@ -1511,7 +1511,7 @@ "type": "Identifier", "span": { "start": 373, - "end": 377, + "end": 374, "ctxt": 0 }, "value": "x", @@ -1557,7 +1557,7 @@ "type": "Identifier", "span": { "start": 379, - "end": 383, + "end": 380, "ctxt": 0 }, "value": "y", @@ -1718,7 +1718,7 @@ "type": "Identifier", "span": { "start": 417, - "end": 421, + "end": 418, "ctxt": 0 }, "value": "x", @@ -1791,7 +1791,7 @@ "type": "Identifier", "span": { "start": 438, - "end": 442, + "end": 439, "ctxt": 0 }, "value": "x", @@ -1864,7 +1864,7 @@ "type": "Identifier", "span": { "start": 468, - "end": 474, + "end": 469, "ctxt": 0 }, "value": "x", @@ -1935,7 +1935,7 @@ "type": "Identifier", "span": { "start": 496, - "end": 516, + "end": 497, "ctxt": 0 }, "value": "x", @@ -2035,7 +2035,7 @@ "type": "Identifier", "span": { "start": 534, - "end": 554, + "end": 535, "ctxt": 0 }, "value": "x", @@ -2135,7 +2135,7 @@ "type": "Identifier", "span": { "start": 581, - "end": 587, + "end": 582, "ctxt": 0 }, "value": "x", @@ -2206,7 +2206,7 @@ "type": "Identifier", "span": { "start": 609, - "end": 629, + "end": 610, "ctxt": 0 }, "value": "x", @@ -2306,7 +2306,7 @@ "type": "Identifier", "span": { "start": 647, - "end": 667, + "end": 648, "ctxt": 0 }, "value": "x", @@ -2406,7 +2406,7 @@ "type": "Identifier", "span": { "start": 694, - "end": 700, + "end": 695, "ctxt": 0 }, "value": "x", @@ -2477,7 +2477,7 @@ "type": "Identifier", "span": { "start": 721, - "end": 741, + "end": 722, "ctxt": 0 }, "value": "x", @@ -2577,7 +2577,7 @@ "type": "Identifier", "span": { "start": 758, - "end": 778, + "end": 759, "ctxt": 0 }, "value": "x", @@ -2677,7 +2677,7 @@ "type": "Identifier", "span": { "start": 804, - "end": 810, + "end": 805, "ctxt": 0 }, "value": "x", @@ -2748,7 +2748,7 @@ "type": "Identifier", "span": { "start": 831, - "end": 842, + "end": 832, "ctxt": 0 }, "value": "x", @@ -2821,7 +2821,7 @@ "type": "Identifier", "span": { "start": 859, - "end": 870, + "end": 860, "ctxt": 0 }, "value": "x", @@ -2894,7 +2894,7 @@ "type": "Identifier", "span": { "start": 896, - "end": 902, + "end": 897, "ctxt": 0 }, "value": "x", @@ -2965,7 +2965,7 @@ "type": "Identifier", "span": { "start": 923, - "end": 934, + "end": 924, "ctxt": 0 }, "value": "x", @@ -3038,7 +3038,7 @@ "type": "Identifier", "span": { "start": 951, - "end": 962, + "end": 952, "ctxt": 0 }, "value": "x", @@ -3111,7 +3111,7 @@ "type": "Identifier", "span": { "start": 988, - "end": 994, + "end": 989, "ctxt": 0 }, "value": "x", @@ -3182,7 +3182,7 @@ "type": "Identifier", "span": { "start": 1015, - "end": 1019, + "end": 1016, "ctxt": 0 }, "value": "x", @@ -3255,7 +3255,7 @@ "type": "Identifier", "span": { "start": 1036, - "end": 1056, + "end": 1037, "ctxt": 0 }, "value": "x", @@ -3355,7 +3355,7 @@ "type": "Identifier", "span": { "start": 1079, - "end": 1085, + "end": 1080, "ctxt": 0 }, "value": "x", @@ -3426,7 +3426,7 @@ "type": "Identifier", "span": { "start": 1107, - "end": 1111, + "end": 1108, "ctxt": 0 }, "value": "x", @@ -3499,7 +3499,7 @@ "type": "Identifier", "span": { "start": 1129, - "end": 1149, + "end": 1130, "ctxt": 0 }, "value": "x", @@ -3599,7 +3599,7 @@ "type": "Identifier", "span": { "start": 1173, - "end": 1179, + "end": 1174, "ctxt": 0 }, "value": "x", @@ -3670,7 +3670,7 @@ "type": "Identifier", "span": { "start": 1200, - "end": 1204, + "end": 1201, "ctxt": 0 }, "value": "x", @@ -3743,7 +3743,7 @@ "type": "Identifier", "span": { "start": 1221, - "end": 1241, + "end": 1222, "ctxt": 0 }, "value": "x", @@ -3843,7 +3843,7 @@ "type": "Identifier", "span": { "start": 1264, - "end": 1270, + "end": 1265, "ctxt": 0 }, "value": "x", @@ -3914,7 +3914,7 @@ "type": "Identifier", "span": { "start": 1291, - "end": 1295, + "end": 1292, "ctxt": 0 }, "value": "x", @@ -3987,7 +3987,7 @@ "type": "Identifier", "span": { "start": 1312, - "end": 1323, + "end": 1313, "ctxt": 0 }, "value": "x", @@ -4060,7 +4060,7 @@ "type": "Identifier", "span": { "start": 1358, - "end": 1364, + "end": 1359, "ctxt": 0 }, "value": "x", @@ -4131,7 +4131,7 @@ "type": "Identifier", "span": { "start": 1385, - "end": 1405, + "end": 1386, "ctxt": 0 }, "value": "x", @@ -4231,7 +4231,7 @@ "type": "Identifier", "span": { "start": 1422, - "end": 1442, + "end": 1423, "ctxt": 0 }, "value": "x", @@ -4331,7 +4331,7 @@ "type": "Identifier", "span": { "start": 1468, - "end": 1474, + "end": 1469, "ctxt": 0 }, "value": "x", @@ -4402,7 +4402,7 @@ "type": "Identifier", "span": { "start": 1495, - "end": 1515, + "end": 1496, "ctxt": 0 }, "value": "x", @@ -4502,7 +4502,7 @@ "type": "Identifier", "span": { "start": 1532, - "end": 1552, + "end": 1533, "ctxt": 0 }, "value": "x", @@ -4602,7 +4602,7 @@ "type": "Identifier", "span": { "start": 1578, - "end": 1584, + "end": 1579, "ctxt": 0 }, "value": "x", @@ -4673,7 +4673,7 @@ "type": "Identifier", "span": { "start": 1606, - "end": 1626, + "end": 1607, "ctxt": 0 }, "value": "x", @@ -4773,7 +4773,7 @@ "type": "Identifier", "span": { "start": 1644, - "end": 1655, + "end": 1645, "ctxt": 0 }, "value": "x", @@ -4846,7 +4846,7 @@ "type": "Identifier", "span": { "start": 1679, - "end": 1685, + "end": 1680, "ctxt": 0 }, "value": "x", @@ -4917,7 +4917,7 @@ "type": "Identifier", "span": { "start": 1707, - "end": 1727, + "end": 1708, "ctxt": 0 }, "value": "x", @@ -5017,7 +5017,7 @@ "type": "Identifier", "span": { "start": 1745, - "end": 1756, + "end": 1746, "ctxt": 0 }, "value": "x", @@ -5090,7 +5090,7 @@ "type": "Identifier", "span": { "start": 1780, - "end": 1786, + "end": 1781, "ctxt": 0 }, "value": "x", @@ -5161,7 +5161,7 @@ "type": "Identifier", "span": { "start": 1808, - "end": 1828, + "end": 1809, "ctxt": 0 }, "value": "x", @@ -5261,7 +5261,7 @@ "type": "Identifier", "span": { "start": 1846, - "end": 1866, + "end": 1847, "ctxt": 0 }, "value": "x", @@ -5361,7 +5361,7 @@ "type": "Identifier", "span": { "start": 1893, - "end": 1899, + "end": 1894, "ctxt": 0 }, "value": "x", @@ -5432,7 +5432,7 @@ "type": "Identifier", "span": { "start": 1922, - "end": 1927, + "end": 1923, "ctxt": 0 }, "value": "x", @@ -5505,7 +5505,7 @@ "type": "Identifier", "span": { "start": 1946, - "end": 1966, + "end": 1947, "ctxt": 0 }, "value": "x", @@ -5605,7 +5605,7 @@ "type": "Identifier", "span": { "start": 1991, - "end": 1997, + "end": 1992, "ctxt": 0 }, "value": "x", @@ -5676,7 +5676,7 @@ "type": "Identifier", "span": { "start": 2019, - "end": 2039, + "end": 2020, "ctxt": 0 }, "value": "x", @@ -5776,7 +5776,7 @@ "type": "Identifier", "span": { "start": 2057, - "end": 2068, + "end": 2058, "ctxt": 0 }, "value": "x", @@ -5849,7 +5849,7 @@ "type": "Identifier", "span": { "start": 2092, - "end": 2098, + "end": 2093, "ctxt": 0 }, "value": "x", @@ -5920,7 +5920,7 @@ "type": "Identifier", "span": { "start": 2120, - "end": 2140, + "end": 2121, "ctxt": 0 }, "value": "x", @@ -6020,7 +6020,7 @@ "type": "Identifier", "span": { "start": 2158, - "end": 2169, + "end": 2159, "ctxt": 0 }, "value": "x", @@ -6093,7 +6093,7 @@ "type": "Identifier", "span": { "start": 2193, - "end": 2199, + "end": 2194, "ctxt": 0 }, "value": "x", @@ -6164,7 +6164,7 @@ "type": "Identifier", "span": { "start": 2221, - "end": 2226, + "end": 2222, "ctxt": 0 }, "value": "x", @@ -6237,7 +6237,7 @@ "type": "Identifier", "span": { "start": 2244, - "end": 2264, + "end": 2245, "ctxt": 0 }, "value": "x", @@ -6337,7 +6337,7 @@ "type": "Identifier", "span": { "start": 2288, - "end": 2294, + "end": 2289, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.json index d08494983fb8..939325bb6147 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 370, - "end": 374, + "end": 371, "ctxt": 0 }, "value": "x", @@ -260,7 +260,7 @@ "type": "Identifier", "span": { "start": 447, - "end": 451, + "end": 448, "ctxt": 0 }, "value": "x", @@ -481,7 +481,7 @@ "type": "Identifier", "span": { "start": 517, - "end": 521, + "end": 518, "ctxt": 0 }, "value": "x", @@ -736,7 +736,7 @@ "type": "Identifier", "span": { "start": 591, - "end": 595, + "end": 592, "ctxt": 0 }, "value": "x", @@ -845,7 +845,7 @@ "type": "Identifier", "span": { "start": 651, - "end": 655, + "end": 652, "ctxt": 0 }, "value": "x", @@ -1017,7 +1017,7 @@ "type": "Identifier", "span": { "start": 707, - "end": 711, + "end": 708, "ctxt": 0 }, "value": "x", @@ -1208,7 +1208,7 @@ "type": "Identifier", "span": { "start": 755, - "end": 759, + "end": 756, "ctxt": 0 }, "value": "x", @@ -1364,7 +1364,7 @@ "type": "Identifier", "span": { "start": 794, - "end": 798, + "end": 795, "ctxt": 0 }, "value": "x", @@ -1437,7 +1437,7 @@ "type": "Identifier", "span": { "start": 815, - "end": 819, + "end": 816, "ctxt": 0 }, "value": "x", @@ -1510,7 +1510,7 @@ "type": "Identifier", "span": { "start": 845, - "end": 851, + "end": 846, "ctxt": 0 }, "value": "x", @@ -1581,7 +1581,7 @@ "type": "Identifier", "span": { "start": 873, - "end": 892, + "end": 874, "ctxt": 0 }, "value": "x", @@ -1700,7 +1700,7 @@ "type": "Identifier", "span": { "start": 910, - "end": 929, + "end": 911, "ctxt": 0 }, "value": "x", @@ -1819,7 +1819,7 @@ "type": "Identifier", "span": { "start": 956, - "end": 962, + "end": 957, "ctxt": 0 }, "value": "x", @@ -1890,7 +1890,7 @@ "type": "Identifier", "span": { "start": 984, - "end": 996, + "end": 985, "ctxt": 0 }, "value": "x", @@ -1991,7 +1991,7 @@ "type": "Identifier", "span": { "start": 1014, - "end": 1026, + "end": 1015, "ctxt": 0 }, "value": "x", @@ -2092,7 +2092,7 @@ "type": "Identifier", "span": { "start": 1053, - "end": 1059, + "end": 1054, "ctxt": 0 }, "value": "x", @@ -2163,7 +2163,7 @@ "type": "Identifier", "span": { "start": 1080, - "end": 1092, + "end": 1081, "ctxt": 0 }, "value": "x", @@ -2264,7 +2264,7 @@ "type": "Identifier", "span": { "start": 1109, - "end": 1121, + "end": 1110, "ctxt": 0 }, "value": "x", @@ -2365,7 +2365,7 @@ "type": "Identifier", "span": { "start": 1147, - "end": 1153, + "end": 1148, "ctxt": 0 }, "value": "x", @@ -2436,7 +2436,7 @@ "type": "Identifier", "span": { "start": 1174, - "end": 1185, + "end": 1175, "ctxt": 0 }, "value": "x", @@ -2509,7 +2509,7 @@ "type": "Identifier", "span": { "start": 1202, - "end": 1213, + "end": 1203, "ctxt": 0 }, "value": "x", @@ -2582,7 +2582,7 @@ "type": "Identifier", "span": { "start": 1239, - "end": 1245, + "end": 1240, "ctxt": 0 }, "value": "x", @@ -2653,7 +2653,7 @@ "type": "Identifier", "span": { "start": 1266, - "end": 1277, + "end": 1267, "ctxt": 0 }, "value": "x", @@ -2726,7 +2726,7 @@ "type": "Identifier", "span": { "start": 1294, - "end": 1305, + "end": 1295, "ctxt": 0 }, "value": "x", @@ -2799,7 +2799,7 @@ "type": "Identifier", "span": { "start": 1331, - "end": 1337, + "end": 1332, "ctxt": 0 }, "value": "x", @@ -2870,7 +2870,7 @@ "type": "Identifier", "span": { "start": 1358, - "end": 1362, + "end": 1359, "ctxt": 0 }, "value": "x", @@ -2943,7 +2943,7 @@ "type": "Identifier", "span": { "start": 1379, - "end": 1398, + "end": 1380, "ctxt": 0 }, "value": "x", @@ -3062,7 +3062,7 @@ "type": "Identifier", "span": { "start": 1421, - "end": 1427, + "end": 1422, "ctxt": 0 }, "value": "x", @@ -3133,7 +3133,7 @@ "type": "Identifier", "span": { "start": 1449, - "end": 1453, + "end": 1450, "ctxt": 0 }, "value": "x", @@ -3206,7 +3206,7 @@ "type": "Identifier", "span": { "start": 1471, - "end": 1483, + "end": 1472, "ctxt": 0 }, "value": "x", @@ -3307,7 +3307,7 @@ "type": "Identifier", "span": { "start": 1507, - "end": 1513, + "end": 1508, "ctxt": 0 }, "value": "x", @@ -3378,7 +3378,7 @@ "type": "Identifier", "span": { "start": 1534, - "end": 1538, + "end": 1535, "ctxt": 0 }, "value": "x", @@ -3451,7 +3451,7 @@ "type": "Identifier", "span": { "start": 1555, - "end": 1567, + "end": 1556, "ctxt": 0 }, "value": "x", @@ -3552,7 +3552,7 @@ "type": "Identifier", "span": { "start": 1590, - "end": 1596, + "end": 1591, "ctxt": 0 }, "value": "x", @@ -3623,7 +3623,7 @@ "type": "Identifier", "span": { "start": 1617, - "end": 1621, + "end": 1618, "ctxt": 0 }, "value": "x", @@ -3696,7 +3696,7 @@ "type": "Identifier", "span": { "start": 1638, - "end": 1649, + "end": 1639, "ctxt": 0 }, "value": "x", @@ -3769,7 +3769,7 @@ "type": "Identifier", "span": { "start": 1672, - "end": 1678, + "end": 1673, "ctxt": 0 }, "value": "x", @@ -3840,7 +3840,7 @@ "type": "Identifier", "span": { "start": 1699, - "end": 1718, + "end": 1700, "ctxt": 0 }, "value": "x", @@ -3959,7 +3959,7 @@ "type": "Identifier", "span": { "start": 1735, - "end": 1747, + "end": 1736, "ctxt": 0 }, "value": "x", @@ -4060,7 +4060,7 @@ "type": "Identifier", "span": { "start": 1770, - "end": 1776, + "end": 1771, "ctxt": 0 }, "value": "x", @@ -4131,7 +4131,7 @@ "type": "Identifier", "span": { "start": 1797, - "end": 1816, + "end": 1798, "ctxt": 0 }, "value": "x", @@ -4250,7 +4250,7 @@ "type": "Identifier", "span": { "start": 1833, - "end": 1845, + "end": 1834, "ctxt": 0 }, "value": "x", @@ -4351,7 +4351,7 @@ "type": "Identifier", "span": { "start": 1868, - "end": 1874, + "end": 1869, "ctxt": 0 }, "value": "x", @@ -4422,7 +4422,7 @@ "type": "Identifier", "span": { "start": 1896, - "end": 1915, + "end": 1897, "ctxt": 0 }, "value": "x", @@ -4541,7 +4541,7 @@ "type": "Identifier", "span": { "start": 1933, - "end": 1944, + "end": 1934, "ctxt": 0 }, "value": "x", @@ -4614,7 +4614,7 @@ "type": "Identifier", "span": { "start": 1968, - "end": 1974, + "end": 1969, "ctxt": 0 }, "value": "x", @@ -4685,7 +4685,7 @@ "type": "Identifier", "span": { "start": 1996, - "end": 2015, + "end": 1997, "ctxt": 0 }, "value": "x", @@ -4804,7 +4804,7 @@ "type": "Identifier", "span": { "start": 2033, - "end": 2044, + "end": 2034, "ctxt": 0 }, "value": "x", @@ -4877,7 +4877,7 @@ "type": "Identifier", "span": { "start": 2068, - "end": 2074, + "end": 2069, "ctxt": 0 }, "value": "x", @@ -4948,7 +4948,7 @@ "type": "Identifier", "span": { "start": 2096, - "end": 2108, + "end": 2097, "ctxt": 0 }, "value": "x", @@ -5049,7 +5049,7 @@ "type": "Identifier", "span": { "start": 2126, - "end": 2138, + "end": 2127, "ctxt": 0 }, "value": "x", @@ -5150,7 +5150,7 @@ "type": "Identifier", "span": { "start": 2162, - "end": 2168, + "end": 2163, "ctxt": 0 }, "value": "x", @@ -5221,7 +5221,7 @@ "type": "Identifier", "span": { "start": 2191, - "end": 2196, + "end": 2192, "ctxt": 0 }, "value": "x", @@ -5294,7 +5294,7 @@ "type": "Identifier", "span": { "start": 2215, - "end": 2227, + "end": 2216, "ctxt": 0 }, "value": "x", @@ -5395,7 +5395,7 @@ "type": "Identifier", "span": { "start": 2252, - "end": 2258, + "end": 2253, "ctxt": 0 }, "value": "x", @@ -5466,7 +5466,7 @@ "type": "Identifier", "span": { "start": 2280, - "end": 2292, + "end": 2281, "ctxt": 0 }, "value": "x", @@ -5567,7 +5567,7 @@ "type": "Identifier", "span": { "start": 2310, - "end": 2321, + "end": 2311, "ctxt": 0 }, "value": "x", @@ -5640,7 +5640,7 @@ "type": "Identifier", "span": { "start": 2345, - "end": 2351, + "end": 2346, "ctxt": 0 }, "value": "x", @@ -5711,7 +5711,7 @@ "type": "Identifier", "span": { "start": 2373, - "end": 2385, + "end": 2374, "ctxt": 0 }, "value": "x", @@ -5812,7 +5812,7 @@ "type": "Identifier", "span": { "start": 2403, - "end": 2414, + "end": 2404, "ctxt": 0 }, "value": "x", @@ -5885,7 +5885,7 @@ "type": "Identifier", "span": { "start": 2438, - "end": 2444, + "end": 2439, "ctxt": 0 }, "value": "x", @@ -5956,7 +5956,7 @@ "type": "Identifier", "span": { "start": 2466, - "end": 2471, + "end": 2467, "ctxt": 0 }, "value": "x", @@ -6029,7 +6029,7 @@ "type": "Identifier", "span": { "start": 2489, - "end": 2501, + "end": 2490, "ctxt": 0 }, "value": "x", @@ -6130,7 +6130,7 @@ "type": "Identifier", "span": { "start": 2525, - "end": 2531, + "end": 2526, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.json index cbbb1d0e2ff4..054eb8cd7ac2 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 383, - "end": 387, + "end": 384, "ctxt": 0 }, "value": "x", @@ -103,7 +103,7 @@ "type": "Identifier", "span": { "start": 389, - "end": 393, + "end": 390, "ctxt": 0 }, "value": "y", @@ -347,7 +347,7 @@ "type": "Identifier", "span": { "start": 479, - "end": 483, + "end": 480, "ctxt": 0 }, "value": "x", @@ -393,7 +393,7 @@ "type": "Identifier", "span": { "start": 485, - "end": 489, + "end": 486, "ctxt": 0 }, "value": "y", @@ -655,7 +655,7 @@ "type": "Identifier", "span": { "start": 568, - "end": 572, + "end": 569, "ctxt": 0 }, "value": "x", @@ -701,7 +701,7 @@ "type": "Identifier", "span": { "start": 574, - "end": 578, + "end": 575, "ctxt": 0 }, "value": "y", @@ -945,7 +945,7 @@ "type": "Identifier", "span": { "start": 657, - "end": 661, + "end": 658, "ctxt": 0 }, "value": "x", @@ -991,7 +991,7 @@ "type": "Identifier", "span": { "start": 663, - "end": 667, + "end": 664, "ctxt": 0 }, "value": "y", @@ -1328,7 +1328,7 @@ "type": "Identifier", "span": { "start": 750, - "end": 754, + "end": 751, "ctxt": 0 }, "value": "x", @@ -1365,7 +1365,7 @@ "type": "Identifier", "span": { "start": 756, - "end": 760, + "end": 757, "ctxt": 0 }, "value": "y", @@ -1474,7 +1474,7 @@ "type": "Identifier", "span": { "start": 829, - "end": 833, + "end": 830, "ctxt": 0 }, "value": "x", @@ -1511,7 +1511,7 @@ "type": "Identifier", "span": { "start": 835, - "end": 839, + "end": 836, "ctxt": 0 }, "value": "y", @@ -1724,7 +1724,7 @@ "type": "Identifier", "span": { "start": 904, - "end": 908, + "end": 905, "ctxt": 0 }, "value": "x", @@ -1761,7 +1761,7 @@ "type": "Identifier", "span": { "start": 910, - "end": 914, + "end": 911, "ctxt": 0 }, "value": "y", @@ -1993,7 +1993,7 @@ "type": "Identifier", "span": { "start": 971, - "end": 975, + "end": 972, "ctxt": 0 }, "value": "x", @@ -2039,7 +2039,7 @@ "type": "Identifier", "span": { "start": 977, - "end": 981, + "end": 978, "ctxt": 0 }, "value": "y", @@ -2236,7 +2236,7 @@ "type": "Identifier", "span": { "start": 1016, - "end": 1020, + "end": 1017, "ctxt": 0 }, "value": "x", @@ -2309,7 +2309,7 @@ "type": "Identifier", "span": { "start": 1037, - "end": 1041, + "end": 1038, "ctxt": 0 }, "value": "x", @@ -2382,7 +2382,7 @@ "type": "Identifier", "span": { "start": 1067, - "end": 1073, + "end": 1068, "ctxt": 0 }, "value": "x", @@ -2453,7 +2453,7 @@ "type": "Identifier", "span": { "start": 1095, - "end": 1129, + "end": 1096, "ctxt": 0 }, "value": "x", @@ -2609,7 +2609,7 @@ "type": "Identifier", "span": { "start": 1147, - "end": 1181, + "end": 1148, "ctxt": 0 }, "value": "x", @@ -2765,7 +2765,7 @@ "type": "Identifier", "span": { "start": 1208, - "end": 1214, + "end": 1209, "ctxt": 0 }, "value": "x", @@ -2836,7 +2836,7 @@ "type": "Identifier", "span": { "start": 1236, - "end": 1256, + "end": 1237, "ctxt": 0 }, "value": "x", @@ -2956,7 +2956,7 @@ "type": "Identifier", "span": { "start": 1274, - "end": 1294, + "end": 1275, "ctxt": 0 }, "value": "x", @@ -3076,7 +3076,7 @@ "type": "Identifier", "span": { "start": 1321, - "end": 1327, + "end": 1322, "ctxt": 0 }, "value": "x", @@ -3147,7 +3147,7 @@ "type": "Identifier", "span": { "start": 1348, - "end": 1368, + "end": 1349, "ctxt": 0 }, "value": "x", @@ -3267,7 +3267,7 @@ "type": "Identifier", "span": { "start": 1385, - "end": 1405, + "end": 1386, "ctxt": 0 }, "value": "x", @@ -3387,7 +3387,7 @@ "type": "Identifier", "span": { "start": 1431, - "end": 1437, + "end": 1432, "ctxt": 0 }, "value": "x", @@ -3458,7 +3458,7 @@ "type": "Identifier", "span": { "start": 1458, - "end": 1469, + "end": 1459, "ctxt": 0 }, "value": "x", @@ -3531,7 +3531,7 @@ "type": "Identifier", "span": { "start": 1486, - "end": 1497, + "end": 1487, "ctxt": 0 }, "value": "x", @@ -3604,7 +3604,7 @@ "type": "Identifier", "span": { "start": 1523, - "end": 1529, + "end": 1524, "ctxt": 0 }, "value": "x", @@ -3675,7 +3675,7 @@ "type": "Identifier", "span": { "start": 1550, - "end": 1561, + "end": 1551, "ctxt": 0 }, "value": "x", @@ -3748,7 +3748,7 @@ "type": "Identifier", "span": { "start": 1578, - "end": 1589, + "end": 1579, "ctxt": 0 }, "value": "x", @@ -3821,7 +3821,7 @@ "type": "Identifier", "span": { "start": 1615, - "end": 1621, + "end": 1616, "ctxt": 0 }, "value": "x", @@ -3892,7 +3892,7 @@ "type": "Identifier", "span": { "start": 1642, - "end": 1646, + "end": 1643, "ctxt": 0 }, "value": "x", @@ -3965,7 +3965,7 @@ "type": "Identifier", "span": { "start": 1663, - "end": 1697, + "end": 1664, "ctxt": 0 }, "value": "x", @@ -4121,7 +4121,7 @@ "type": "Identifier", "span": { "start": 1720, - "end": 1726, + "end": 1721, "ctxt": 0 }, "value": "x", @@ -4192,7 +4192,7 @@ "type": "Identifier", "span": { "start": 1748, - "end": 1752, + "end": 1749, "ctxt": 0 }, "value": "x", @@ -4265,7 +4265,7 @@ "type": "Identifier", "span": { "start": 1770, - "end": 1790, + "end": 1771, "ctxt": 0 }, "value": "x", @@ -4385,7 +4385,7 @@ "type": "Identifier", "span": { "start": 1814, - "end": 1820, + "end": 1815, "ctxt": 0 }, "value": "x", @@ -4456,7 +4456,7 @@ "type": "Identifier", "span": { "start": 1842, - "end": 1862, + "end": 1843, "ctxt": 0 }, "value": "x", @@ -4576,7 +4576,7 @@ "type": "Identifier", "span": { "start": 1880, - "end": 1900, + "end": 1881, "ctxt": 0 }, "value": "x", @@ -4696,7 +4696,7 @@ "type": "Identifier", "span": { "start": 1924, - "end": 1930, + "end": 1925, "ctxt": 0 }, "value": "x", @@ -4767,7 +4767,7 @@ "type": "Identifier", "span": { "start": 1952, - "end": 1972, + "end": 1953, "ctxt": 0 }, "value": "x", @@ -4887,7 +4887,7 @@ "type": "Identifier", "span": { "start": 1990, - "end": 2007, + "end": 1991, "ctxt": 0 }, "value": "x", @@ -4997,7 +4997,7 @@ "type": "Identifier", "span": { "start": 2073, - "end": 2079, + "end": 2074, "ctxt": 0 }, "value": "x", @@ -5068,7 +5068,7 @@ "type": "Identifier", "span": { "start": 2100, - "end": 2104, + "end": 2101, "ctxt": 0 }, "value": "x", @@ -5141,7 +5141,7 @@ "type": "Identifier", "span": { "start": 2121, - "end": 2141, + "end": 2122, "ctxt": 0 }, "value": "x", @@ -5261,7 +5261,7 @@ "type": "Identifier", "span": { "start": 2164, - "end": 2170, + "end": 2165, "ctxt": 0 }, "value": "x", @@ -5332,7 +5332,7 @@ "type": "Identifier", "span": { "start": 2191, - "end": 2195, + "end": 2192, "ctxt": 0 }, "value": "x", @@ -5405,7 +5405,7 @@ "type": "Identifier", "span": { "start": 2212, - "end": 2223, + "end": 2213, "ctxt": 0 }, "value": "x", @@ -5478,7 +5478,7 @@ "type": "Identifier", "span": { "start": 2246, - "end": 2252, + "end": 2247, "ctxt": 0 }, "value": "x", @@ -5549,7 +5549,7 @@ "type": "Identifier", "span": { "start": 2273, - "end": 2307, + "end": 2274, "ctxt": 0 }, "value": "x", @@ -5705,7 +5705,7 @@ "type": "Identifier", "span": { "start": 2324, - "end": 2344, + "end": 2325, "ctxt": 0 }, "value": "x", @@ -5825,7 +5825,7 @@ "type": "Identifier", "span": { "start": 2367, - "end": 2373, + "end": 2368, "ctxt": 0 }, "value": "x", @@ -5896,7 +5896,7 @@ "type": "Identifier", "span": { "start": 2394, - "end": 2428, + "end": 2395, "ctxt": 0 }, "value": "x", @@ -6052,7 +6052,7 @@ "type": "Identifier", "span": { "start": 2445, - "end": 2465, + "end": 2446, "ctxt": 0 }, "value": "x", @@ -6172,7 +6172,7 @@ "type": "Identifier", "span": { "start": 2488, - "end": 2494, + "end": 2489, "ctxt": 0 }, "value": "x", @@ -6243,7 +6243,7 @@ "type": "Identifier", "span": { "start": 2516, - "end": 2550, + "end": 2517, "ctxt": 0 }, "value": "x", @@ -6399,7 +6399,7 @@ "type": "Identifier", "span": { "start": 2568, - "end": 2579, + "end": 2569, "ctxt": 0 }, "value": "x", @@ -6472,7 +6472,7 @@ "type": "Identifier", "span": { "start": 2603, - "end": 2609, + "end": 2604, "ctxt": 0 }, "value": "x", @@ -6543,7 +6543,7 @@ "type": "Identifier", "span": { "start": 2631, - "end": 2665, + "end": 2632, "ctxt": 0 }, "value": "x", @@ -6699,7 +6699,7 @@ "type": "Identifier", "span": { "start": 2683, - "end": 2694, + "end": 2684, "ctxt": 0 }, "value": "x", @@ -6772,7 +6772,7 @@ "type": "Identifier", "span": { "start": 2718, - "end": 2724, + "end": 2719, "ctxt": 0 }, "value": "x", @@ -6843,7 +6843,7 @@ "type": "Identifier", "span": { "start": 2746, - "end": 2766, + "end": 2747, "ctxt": 0 }, "value": "x", @@ -6963,7 +6963,7 @@ "type": "Identifier", "span": { "start": 2784, - "end": 2804, + "end": 2785, "ctxt": 0 }, "value": "x", @@ -7083,7 +7083,7 @@ "type": "Identifier", "span": { "start": 2828, - "end": 2834, + "end": 2829, "ctxt": 0 }, "value": "x", @@ -7154,7 +7154,7 @@ "type": "Identifier", "span": { "start": 2857, - "end": 2862, + "end": 2858, "ctxt": 0 }, "value": "x", @@ -7227,7 +7227,7 @@ "type": "Identifier", "span": { "start": 2881, - "end": 2901, + "end": 2882, "ctxt": 0 }, "value": "x", @@ -7347,7 +7347,7 @@ "type": "Identifier", "span": { "start": 2926, - "end": 2932, + "end": 2927, "ctxt": 0 }, "value": "x", @@ -7418,7 +7418,7 @@ "type": "Identifier", "span": { "start": 2954, - "end": 2974, + "end": 2955, "ctxt": 0 }, "value": "x", @@ -7538,7 +7538,7 @@ "type": "Identifier", "span": { "start": 2992, - "end": 3003, + "end": 2993, "ctxt": 0 }, "value": "x", @@ -7611,7 +7611,7 @@ "type": "Identifier", "span": { "start": 3027, - "end": 3033, + "end": 3028, "ctxt": 0 }, "value": "x", @@ -7682,7 +7682,7 @@ "type": "Identifier", "span": { "start": 3055, - "end": 3075, + "end": 3056, "ctxt": 0 }, "value": "x", @@ -7802,7 +7802,7 @@ "type": "Identifier", "span": { "start": 3093, - "end": 3104, + "end": 3094, "ctxt": 0 }, "value": "x", @@ -7875,7 +7875,7 @@ "type": "Identifier", "span": { "start": 3128, - "end": 3134, + "end": 3129, "ctxt": 0 }, "value": "x", @@ -7946,7 +7946,7 @@ "type": "Identifier", "span": { "start": 3156, - "end": 3161, + "end": 3157, "ctxt": 0 }, "value": "x", @@ -8019,7 +8019,7 @@ "type": "Identifier", "span": { "start": 3179, - "end": 3199, + "end": 3180, "ctxt": 0 }, "value": "x", @@ -8139,7 +8139,7 @@ "type": "Identifier", "span": { "start": 3223, - "end": 3229, + "end": 3224, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.json index ec03bbef7894..2b7519b6c294 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.json @@ -634,7 +634,7 @@ "type": "Identifier", "span": { "start": 570, - "end": 574, + "end": 571, "ctxt": 0 }, "value": "x", @@ -680,7 +680,7 @@ "type": "Identifier", "span": { "start": 576, - "end": 580, + "end": 577, "ctxt": 0 }, "value": "y", @@ -924,7 +924,7 @@ "type": "Identifier", "span": { "start": 656, - "end": 660, + "end": 657, "ctxt": 0 }, "value": "x", @@ -970,7 +970,7 @@ "type": "Identifier", "span": { "start": 662, - "end": 666, + "end": 663, "ctxt": 0 }, "value": "y", @@ -1214,7 +1214,7 @@ "type": "Identifier", "span": { "start": 744, - "end": 748, + "end": 745, "ctxt": 0 }, "value": "x", @@ -1260,7 +1260,7 @@ "type": "Identifier", "span": { "start": 750, - "end": 754, + "end": 751, "ctxt": 0 }, "value": "y", @@ -1504,7 +1504,7 @@ "type": "Identifier", "span": { "start": 839, - "end": 843, + "end": 840, "ctxt": 0 }, "value": "x", @@ -1550,7 +1550,7 @@ "type": "Identifier", "span": { "start": 845, - "end": 849, + "end": 846, "ctxt": 0 }, "value": "y", @@ -1923,7 +1923,7 @@ "type": "Identifier", "span": { "start": 938, - "end": 942, + "end": 939, "ctxt": 0 }, "value": "x", @@ -1960,7 +1960,7 @@ "type": "Identifier", "span": { "start": 944, - "end": 948, + "end": 945, "ctxt": 0 }, "value": "y", @@ -2069,7 +2069,7 @@ "type": "Identifier", "span": { "start": 1029, - "end": 1033, + "end": 1030, "ctxt": 0 }, "value": "x", @@ -2106,7 +2106,7 @@ "type": "Identifier", "span": { "start": 1035, - "end": 1039, + "end": 1036, "ctxt": 0 }, "value": "y", @@ -2346,7 +2346,7 @@ "type": "Identifier", "span": { "start": 1094, - "end": 1098, + "end": 1095, "ctxt": 0 }, "value": "x", @@ -2383,7 +2383,7 @@ "type": "Identifier", "span": { "start": 1100, - "end": 1104, + "end": 1101, "ctxt": 0 }, "value": "y", @@ -2597,7 +2597,7 @@ "type": "Identifier", "span": { "start": 1158, - "end": 1162, + "end": 1159, "ctxt": 0 }, "value": "x", @@ -2643,7 +2643,7 @@ "type": "Identifier", "span": { "start": 1164, - "end": 1168, + "end": 1165, "ctxt": 0 }, "value": "y", @@ -2840,7 +2840,7 @@ "type": "Identifier", "span": { "start": 1203, - "end": 1207, + "end": 1204, "ctxt": 0 }, "value": "x", @@ -2913,7 +2913,7 @@ "type": "Identifier", "span": { "start": 1224, - "end": 1228, + "end": 1225, "ctxt": 0 }, "value": "x", @@ -2986,7 +2986,7 @@ "type": "Identifier", "span": { "start": 1254, - "end": 1260, + "end": 1255, "ctxt": 0 }, "value": "x", @@ -3057,7 +3057,7 @@ "type": "Identifier", "span": { "start": 1282, - "end": 1296, + "end": 1283, "ctxt": 0 }, "value": "x", @@ -3177,7 +3177,7 @@ "type": "Identifier", "span": { "start": 1314, - "end": 1328, + "end": 1315, "ctxt": 0 }, "value": "x", @@ -3297,7 +3297,7 @@ "type": "Identifier", "span": { "start": 1355, - "end": 1361, + "end": 1356, "ctxt": 0 }, "value": "x", @@ -3368,7 +3368,7 @@ "type": "Identifier", "span": { "start": 1383, - "end": 1401, + "end": 1384, "ctxt": 0 }, "value": "x", @@ -3488,7 +3488,7 @@ "type": "Identifier", "span": { "start": 1419, - "end": 1437, + "end": 1420, "ctxt": 0 }, "value": "x", @@ -3608,7 +3608,7 @@ "type": "Identifier", "span": { "start": 1464, - "end": 1470, + "end": 1465, "ctxt": 0 }, "value": "x", @@ -3679,7 +3679,7 @@ "type": "Identifier", "span": { "start": 1491, - "end": 1523, + "end": 1492, "ctxt": 0 }, "value": "x", @@ -3835,7 +3835,7 @@ "type": "Identifier", "span": { "start": 1540, - "end": 1572, + "end": 1541, "ctxt": 0 }, "value": "x", @@ -3991,7 +3991,7 @@ "type": "Identifier", "span": { "start": 1598, - "end": 1604, + "end": 1599, "ctxt": 0 }, "value": "x", @@ -4062,7 +4062,7 @@ "type": "Identifier", "span": { "start": 1625, - "end": 1636, + "end": 1626, "ctxt": 0 }, "value": "x", @@ -4135,7 +4135,7 @@ "type": "Identifier", "span": { "start": 1653, - "end": 1664, + "end": 1654, "ctxt": 0 }, "value": "x", @@ -4208,7 +4208,7 @@ "type": "Identifier", "span": { "start": 1690, - "end": 1696, + "end": 1691, "ctxt": 0 }, "value": "x", @@ -4279,7 +4279,7 @@ "type": "Identifier", "span": { "start": 1717, - "end": 1728, + "end": 1718, "ctxt": 0 }, "value": "x", @@ -4352,7 +4352,7 @@ "type": "Identifier", "span": { "start": 1745, - "end": 1756, + "end": 1746, "ctxt": 0 }, "value": "x", @@ -4425,7 +4425,7 @@ "type": "Identifier", "span": { "start": 1782, - "end": 1788, + "end": 1783, "ctxt": 0 }, "value": "x", @@ -4496,7 +4496,7 @@ "type": "Identifier", "span": { "start": 1809, - "end": 1813, + "end": 1810, "ctxt": 0 }, "value": "x", @@ -4569,7 +4569,7 @@ "type": "Identifier", "span": { "start": 1830, - "end": 1844, + "end": 1831, "ctxt": 0 }, "value": "x", @@ -4689,7 +4689,7 @@ "type": "Identifier", "span": { "start": 1867, - "end": 1873, + "end": 1868, "ctxt": 0 }, "value": "x", @@ -4760,7 +4760,7 @@ "type": "Identifier", "span": { "start": 1895, - "end": 1899, + "end": 1896, "ctxt": 0 }, "value": "x", @@ -4833,7 +4833,7 @@ "type": "Identifier", "span": { "start": 1917, - "end": 1935, + "end": 1918, "ctxt": 0 }, "value": "x", @@ -4953,7 +4953,7 @@ "type": "Identifier", "span": { "start": 1959, - "end": 1965, + "end": 1960, "ctxt": 0 }, "value": "x", @@ -5024,7 +5024,7 @@ "type": "Identifier", "span": { "start": 1987, - "end": 2005, + "end": 1988, "ctxt": 0 }, "value": "x", @@ -5144,7 +5144,7 @@ "type": "Identifier", "span": { "start": 2023, - "end": 2055, + "end": 2024, "ctxt": 0 }, "value": "x", @@ -5300,7 +5300,7 @@ "type": "Identifier", "span": { "start": 2082, - "end": 2088, + "end": 2083, "ctxt": 0 }, "value": "x", @@ -5371,7 +5371,7 @@ "type": "Identifier", "span": { "start": 2110, - "end": 2128, + "end": 2111, "ctxt": 0 }, "value": "x", @@ -5491,7 +5491,7 @@ "type": "Identifier", "span": { "start": 2146, - "end": 2178, + "end": 2147, "ctxt": 0 }, "value": "x", @@ -5647,7 +5647,7 @@ "type": "Identifier", "span": { "start": 2205, - "end": 2211, + "end": 2206, "ctxt": 0 }, "value": "x", @@ -5718,7 +5718,7 @@ "type": "Identifier", "span": { "start": 2232, - "end": 2236, + "end": 2233, "ctxt": 0 }, "value": "x", @@ -5791,7 +5791,7 @@ "type": "Identifier", "span": { "start": 2253, - "end": 2285, + "end": 2254, "ctxt": 0 }, "value": "x", @@ -5947,7 +5947,7 @@ "type": "Identifier", "span": { "start": 2308, - "end": 2314, + "end": 2309, "ctxt": 0 }, "value": "x", @@ -6018,7 +6018,7 @@ "type": "Identifier", "span": { "start": 2335, - "end": 2339, + "end": 2336, "ctxt": 0 }, "value": "x", @@ -6091,7 +6091,7 @@ "type": "Identifier", "span": { "start": 2356, - "end": 2367, + "end": 2357, "ctxt": 0 }, "value": "x", @@ -6164,7 +6164,7 @@ "type": "Identifier", "span": { "start": 2393, - "end": 2399, + "end": 2394, "ctxt": 0 }, "value": "x", @@ -6235,7 +6235,7 @@ "type": "Identifier", "span": { "start": 2420, - "end": 2434, + "end": 2421, "ctxt": 0 }, "value": "x", @@ -6355,7 +6355,7 @@ "type": "Identifier", "span": { "start": 2451, - "end": 2483, + "end": 2452, "ctxt": 0 }, "value": "x", @@ -6511,7 +6511,7 @@ "type": "Identifier", "span": { "start": 2509, - "end": 2515, + "end": 2510, "ctxt": 0 }, "value": "x", @@ -6582,7 +6582,7 @@ "type": "Identifier", "span": { "start": 2536, - "end": 2550, + "end": 2537, "ctxt": 0 }, "value": "x", @@ -6702,7 +6702,7 @@ "type": "Identifier", "span": { "start": 2567, - "end": 2585, + "end": 2568, "ctxt": 0 }, "value": "x", @@ -6822,7 +6822,7 @@ "type": "Identifier", "span": { "start": 2611, - "end": 2617, + "end": 2612, "ctxt": 0 }, "value": "x", @@ -6893,7 +6893,7 @@ "type": "Identifier", "span": { "start": 2639, - "end": 2653, + "end": 2640, "ctxt": 0 }, "value": "x", @@ -7013,7 +7013,7 @@ "type": "Identifier", "span": { "start": 2671, - "end": 2682, + "end": 2672, "ctxt": 0 }, "value": "x", @@ -7086,7 +7086,7 @@ "type": "Identifier", "span": { "start": 2706, - "end": 2712, + "end": 2707, "ctxt": 0 }, "value": "x", @@ -7157,7 +7157,7 @@ "type": "Identifier", "span": { "start": 2734, - "end": 2748, + "end": 2735, "ctxt": 0 }, "value": "x", @@ -7277,7 +7277,7 @@ "type": "Identifier", "span": { "start": 2766, - "end": 2777, + "end": 2767, "ctxt": 0 }, "value": "x", @@ -7350,7 +7350,7 @@ "type": "Identifier", "span": { "start": 2801, - "end": 2807, + "end": 2802, "ctxt": 0 }, "value": "x", @@ -7421,7 +7421,7 @@ "type": "Identifier", "span": { "start": 2829, - "end": 2861, + "end": 2830, "ctxt": 0 }, "value": "x", @@ -7577,7 +7577,7 @@ "type": "Identifier", "span": { "start": 2879, - "end": 2897, + "end": 2880, "ctxt": 0 }, "value": "x", @@ -7697,7 +7697,7 @@ "type": "Identifier", "span": { "start": 2924, - "end": 2930, + "end": 2925, "ctxt": 0 }, "value": "x", @@ -7768,7 +7768,7 @@ "type": "Identifier", "span": { "start": 2953, - "end": 2958, + "end": 2954, "ctxt": 0 }, "value": "x", @@ -7841,7 +7841,7 @@ "type": "Identifier", "span": { "start": 2977, - "end": 2995, + "end": 2978, "ctxt": 0 }, "value": "x", @@ -7961,7 +7961,7 @@ "type": "Identifier", "span": { "start": 3020, - "end": 3026, + "end": 3021, "ctxt": 0 }, "value": "x", @@ -8032,7 +8032,7 @@ "type": "Identifier", "span": { "start": 3048, - "end": 3080, + "end": 3049, "ctxt": 0 }, "value": "x", @@ -8188,7 +8188,7 @@ "type": "Identifier", "span": { "start": 3098, - "end": 3109, + "end": 3099, "ctxt": 0 }, "value": "x", @@ -8261,7 +8261,7 @@ "type": "Identifier", "span": { "start": 3133, - "end": 3139, + "end": 3134, "ctxt": 0 }, "value": "x", @@ -8332,7 +8332,7 @@ "type": "Identifier", "span": { "start": 3161, - "end": 3193, + "end": 3162, "ctxt": 0 }, "value": "x", @@ -8488,7 +8488,7 @@ "type": "Identifier", "span": { "start": 3211, - "end": 3222, + "end": 3212, "ctxt": 0 }, "value": "x", @@ -8561,7 +8561,7 @@ "type": "Identifier", "span": { "start": 3246, - "end": 3252, + "end": 3247, "ctxt": 0 }, "value": "x", @@ -8632,7 +8632,7 @@ "type": "Identifier", "span": { "start": 3274, - "end": 3279, + "end": 3275, "ctxt": 0 }, "value": "x", @@ -8705,7 +8705,7 @@ "type": "Identifier", "span": { "start": 3297, - "end": 3315, + "end": 3298, "ctxt": 0 }, "value": "x", @@ -8825,7 +8825,7 @@ "type": "Identifier", "span": { "start": 3339, - "end": 3345, + "end": 3340, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.json index 8d594db49fa0..973d8854d881 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 357, - "end": 361, + "end": 358, "ctxt": 0 }, "value": "x", @@ -242,7 +242,7 @@ "type": "Identifier", "span": { "start": 412, - "end": 416, + "end": 413, "ctxt": 0 }, "value": "x", @@ -427,7 +427,7 @@ "type": "Identifier", "span": { "start": 467, - "end": 471, + "end": 468, "ctxt": 0 }, "value": "x", @@ -646,7 +646,7 @@ "type": "Identifier", "span": { "start": 527, - "end": 531, + "end": 528, "ctxt": 0 }, "value": "x", @@ -765,7 +765,7 @@ "type": "Identifier", "span": { "start": 569, - "end": 573, + "end": 570, "ctxt": 0 }, "value": "x", @@ -929,7 +929,7 @@ "type": "Identifier", "span": { "start": 603, - "end": 607, + "end": 604, "ctxt": 0 }, "value": "x", @@ -1094,7 +1094,7 @@ "type": "Identifier", "span": { "start": 631, - "end": 635, + "end": 632, "ctxt": 0 }, "value": "x", @@ -1230,7 +1230,7 @@ "type": "Identifier", "span": { "start": 672, - "end": 676, + "end": 673, "ctxt": 0 }, "value": "x", @@ -1303,7 +1303,7 @@ "type": "Identifier", "span": { "start": 693, - "end": 697, + "end": 694, "ctxt": 0 }, "value": "x", @@ -1376,7 +1376,7 @@ "type": "Identifier", "span": { "start": 723, - "end": 729, + "end": 724, "ctxt": 0 }, "value": "x", @@ -1447,7 +1447,7 @@ "type": "Identifier", "span": { "start": 751, - "end": 763, + "end": 752, "ctxt": 0 }, "value": "x", @@ -1538,7 +1538,7 @@ "type": "Identifier", "span": { "start": 781, - "end": 793, + "end": 782, "ctxt": 0 }, "value": "x", @@ -1629,7 +1629,7 @@ "type": "Identifier", "span": { "start": 820, - "end": 826, + "end": 821, "ctxt": 0 }, "value": "x", @@ -1700,7 +1700,7 @@ "type": "Identifier", "span": { "start": 848, - "end": 860, + "end": 849, "ctxt": 0 }, "value": "x", @@ -1791,7 +1791,7 @@ "type": "Identifier", "span": { "start": 878, - "end": 890, + "end": 879, "ctxt": 0 }, "value": "x", @@ -1882,7 +1882,7 @@ "type": "Identifier", "span": { "start": 917, - "end": 923, + "end": 918, "ctxt": 0 }, "value": "x", @@ -1953,7 +1953,7 @@ "type": "Identifier", "span": { "start": 944, - "end": 956, + "end": 945, "ctxt": 0 }, "value": "x", @@ -2044,7 +2044,7 @@ "type": "Identifier", "span": { "start": 973, - "end": 985, + "end": 974, "ctxt": 0 }, "value": "x", @@ -2135,7 +2135,7 @@ "type": "Identifier", "span": { "start": 1011, - "end": 1017, + "end": 1012, "ctxt": 0 }, "value": "x", @@ -2206,7 +2206,7 @@ "type": "Identifier", "span": { "start": 1038, - "end": 1049, + "end": 1039, "ctxt": 0 }, "value": "x", @@ -2279,7 +2279,7 @@ "type": "Identifier", "span": { "start": 1066, - "end": 1077, + "end": 1067, "ctxt": 0 }, "value": "x", @@ -2352,7 +2352,7 @@ "type": "Identifier", "span": { "start": 1103, - "end": 1109, + "end": 1104, "ctxt": 0 }, "value": "x", @@ -2423,7 +2423,7 @@ "type": "Identifier", "span": { "start": 1130, - "end": 1141, + "end": 1131, "ctxt": 0 }, "value": "x", @@ -2496,7 +2496,7 @@ "type": "Identifier", "span": { "start": 1158, - "end": 1169, + "end": 1159, "ctxt": 0 }, "value": "x", @@ -2569,7 +2569,7 @@ "type": "Identifier", "span": { "start": 1195, - "end": 1201, + "end": 1196, "ctxt": 0 }, "value": "x", @@ -2640,7 +2640,7 @@ "type": "Identifier", "span": { "start": 1222, - "end": 1226, + "end": 1223, "ctxt": 0 }, "value": "x", @@ -2713,7 +2713,7 @@ "type": "Identifier", "span": { "start": 1243, - "end": 1255, + "end": 1244, "ctxt": 0 }, "value": "x", @@ -2804,7 +2804,7 @@ "type": "Identifier", "span": { "start": 1278, - "end": 1284, + "end": 1279, "ctxt": 0 }, "value": "x", @@ -2875,7 +2875,7 @@ "type": "Identifier", "span": { "start": 1306, - "end": 1310, + "end": 1307, "ctxt": 0 }, "value": "x", @@ -2948,7 +2948,7 @@ "type": "Identifier", "span": { "start": 1328, - "end": 1340, + "end": 1329, "ctxt": 0 }, "value": "x", @@ -3039,7 +3039,7 @@ "type": "Identifier", "span": { "start": 1364, - "end": 1370, + "end": 1365, "ctxt": 0 }, "value": "x", @@ -3110,7 +3110,7 @@ "type": "Identifier", "span": { "start": 1391, - "end": 1395, + "end": 1392, "ctxt": 0 }, "value": "x", @@ -3183,7 +3183,7 @@ "type": "Identifier", "span": { "start": 1412, - "end": 1424, + "end": 1413, "ctxt": 0 }, "value": "x", @@ -3274,7 +3274,7 @@ "type": "Identifier", "span": { "start": 1447, - "end": 1453, + "end": 1448, "ctxt": 0 }, "value": "x", @@ -3345,7 +3345,7 @@ "type": "Identifier", "span": { "start": 1474, - "end": 1478, + "end": 1475, "ctxt": 0 }, "value": "x", @@ -3418,7 +3418,7 @@ "type": "Identifier", "span": { "start": 1495, - "end": 1506, + "end": 1496, "ctxt": 0 }, "value": "x", @@ -3491,7 +3491,7 @@ "type": "Identifier", "span": { "start": 1529, - "end": 1535, + "end": 1530, "ctxt": 0 }, "value": "x", @@ -3562,7 +3562,7 @@ "type": "Identifier", "span": { "start": 1556, - "end": 1568, + "end": 1557, "ctxt": 0 }, "value": "x", @@ -3653,7 +3653,7 @@ "type": "Identifier", "span": { "start": 1585, - "end": 1597, + "end": 1586, "ctxt": 0 }, "value": "x", @@ -3744,7 +3744,7 @@ "type": "Identifier", "span": { "start": 1620, - "end": 1626, + "end": 1621, "ctxt": 0 }, "value": "x", @@ -3815,7 +3815,7 @@ "type": "Identifier", "span": { "start": 1647, - "end": 1659, + "end": 1648, "ctxt": 0 }, "value": "x", @@ -3906,7 +3906,7 @@ "type": "Identifier", "span": { "start": 1676, - "end": 1688, + "end": 1677, "ctxt": 0 }, "value": "x", @@ -3997,7 +3997,7 @@ "type": "Identifier", "span": { "start": 1711, - "end": 1717, + "end": 1712, "ctxt": 0 }, "value": "x", @@ -4068,7 +4068,7 @@ "type": "Identifier", "span": { "start": 1739, - "end": 1751, + "end": 1740, "ctxt": 0 }, "value": "x", @@ -4159,7 +4159,7 @@ "type": "Identifier", "span": { "start": 1769, - "end": 1780, + "end": 1770, "ctxt": 0 }, "value": "x", @@ -4232,7 +4232,7 @@ "type": "Identifier", "span": { "start": 1804, - "end": 1810, + "end": 1805, "ctxt": 0 }, "value": "x", @@ -4303,7 +4303,7 @@ "type": "Identifier", "span": { "start": 1832, - "end": 1844, + "end": 1833, "ctxt": 0 }, "value": "x", @@ -4394,7 +4394,7 @@ "type": "Identifier", "span": { "start": 1862, - "end": 1873, + "end": 1863, "ctxt": 0 }, "value": "x", @@ -4467,7 +4467,7 @@ "type": "Identifier", "span": { "start": 1897, - "end": 1903, + "end": 1898, "ctxt": 0 }, "value": "x", @@ -4538,7 +4538,7 @@ "type": "Identifier", "span": { "start": 1925, - "end": 1937, + "end": 1926, "ctxt": 0 }, "value": "x", @@ -4629,7 +4629,7 @@ "type": "Identifier", "span": { "start": 1955, - "end": 1967, + "end": 1956, "ctxt": 0 }, "value": "x", @@ -4720,7 +4720,7 @@ "type": "Identifier", "span": { "start": 1991, - "end": 1997, + "end": 1992, "ctxt": 0 }, "value": "x", @@ -4791,7 +4791,7 @@ "type": "Identifier", "span": { "start": 2020, - "end": 2025, + "end": 2021, "ctxt": 0 }, "value": "x", @@ -4864,7 +4864,7 @@ "type": "Identifier", "span": { "start": 2044, - "end": 2056, + "end": 2045, "ctxt": 0 }, "value": "x", @@ -4955,7 +4955,7 @@ "type": "Identifier", "span": { "start": 2081, - "end": 2087, + "end": 2082, "ctxt": 0 }, "value": "x", @@ -5026,7 +5026,7 @@ "type": "Identifier", "span": { "start": 2109, - "end": 2121, + "end": 2110, "ctxt": 0 }, "value": "x", @@ -5117,7 +5117,7 @@ "type": "Identifier", "span": { "start": 2139, - "end": 2150, + "end": 2140, "ctxt": 0 }, "value": "x", @@ -5190,7 +5190,7 @@ "type": "Identifier", "span": { "start": 2174, - "end": 2180, + "end": 2175, "ctxt": 0 }, "value": "x", @@ -5261,7 +5261,7 @@ "type": "Identifier", "span": { "start": 2202, - "end": 2214, + "end": 2203, "ctxt": 0 }, "value": "x", @@ -5352,7 +5352,7 @@ "type": "Identifier", "span": { "start": 2232, - "end": 2243, + "end": 2233, "ctxt": 0 }, "value": "x", @@ -5425,7 +5425,7 @@ "type": "Identifier", "span": { "start": 2267, - "end": 2273, + "end": 2268, "ctxt": 0 }, "value": "x", @@ -5496,7 +5496,7 @@ "type": "Identifier", "span": { "start": 2295, - "end": 2300, + "end": 2296, "ctxt": 0 }, "value": "x", @@ -5569,7 +5569,7 @@ "type": "Identifier", "span": { "start": 2318, - "end": 2330, + "end": 2319, "ctxt": 0 }, "value": "x", @@ -5660,7 +5660,7 @@ "type": "Identifier", "span": { "start": 2354, - "end": 2360, + "end": 2355, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.json index 1daaf5346d87..9b2105291236 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 370, - "end": 374, + "end": 371, "ctxt": 0 }, "value": "x", @@ -260,7 +260,7 @@ "type": "Identifier", "span": { "start": 438, - "end": 442, + "end": 439, "ctxt": 0 }, "value": "x", @@ -463,7 +463,7 @@ "type": "Identifier", "span": { "start": 506, - "end": 510, + "end": 507, "ctxt": 0 }, "value": "x", @@ -718,7 +718,7 @@ "type": "Identifier", "span": { "start": 579, - "end": 583, + "end": 580, "ctxt": 0 }, "value": "x", @@ -837,7 +837,7 @@ "type": "Identifier", "span": { "start": 634, - "end": 638, + "end": 635, "ctxt": 0 }, "value": "x", @@ -1019,7 +1019,7 @@ "type": "Identifier", "span": { "start": 681, - "end": 685, + "end": 682, "ctxt": 0 }, "value": "x", @@ -1202,7 +1202,7 @@ "type": "Identifier", "span": { "start": 722, - "end": 726, + "end": 723, "ctxt": 0 }, "value": "x", @@ -1356,7 +1356,7 @@ "type": "Identifier", "span": { "start": 763, - "end": 767, + "end": 764, "ctxt": 0 }, "value": "x", @@ -1429,7 +1429,7 @@ "type": "Identifier", "span": { "start": 784, - "end": 788, + "end": 785, "ctxt": 0 }, "value": "x", @@ -1502,7 +1502,7 @@ "type": "Identifier", "span": { "start": 814, - "end": 820, + "end": 815, "ctxt": 0 }, "value": "x", @@ -1573,7 +1573,7 @@ "type": "Identifier", "span": { "start": 842, - "end": 852, + "end": 843, "ctxt": 0 }, "value": "x", @@ -1674,7 +1674,7 @@ "type": "Identifier", "span": { "start": 870, - "end": 880, + "end": 871, "ctxt": 0 }, "value": "x", @@ -1775,7 +1775,7 @@ "type": "Identifier", "span": { "start": 907, - "end": 913, + "end": 908, "ctxt": 0 }, "value": "x", @@ -1846,7 +1846,7 @@ "type": "Identifier", "span": { "start": 935, - "end": 945, + "end": 936, "ctxt": 0 }, "value": "x", @@ -1947,7 +1947,7 @@ "type": "Identifier", "span": { "start": 963, - "end": 973, + "end": 964, "ctxt": 0 }, "value": "x", @@ -2048,7 +2048,7 @@ "type": "Identifier", "span": { "start": 1000, - "end": 1006, + "end": 1001, "ctxt": 0 }, "value": "x", @@ -2119,7 +2119,7 @@ "type": "Identifier", "span": { "start": 1027, - "end": 1037, + "end": 1028, "ctxt": 0 }, "value": "x", @@ -2220,7 +2220,7 @@ "type": "Identifier", "span": { "start": 1054, - "end": 1064, + "end": 1055, "ctxt": 0 }, "value": "x", @@ -2321,7 +2321,7 @@ "type": "Identifier", "span": { "start": 1090, - "end": 1096, + "end": 1091, "ctxt": 0 }, "value": "x", @@ -2392,7 +2392,7 @@ "type": "Identifier", "span": { "start": 1117, - "end": 1128, + "end": 1118, "ctxt": 0 }, "value": "x", @@ -2465,7 +2465,7 @@ "type": "Identifier", "span": { "start": 1145, - "end": 1156, + "end": 1146, "ctxt": 0 }, "value": "x", @@ -2538,7 +2538,7 @@ "type": "Identifier", "span": { "start": 1182, - "end": 1188, + "end": 1183, "ctxt": 0 }, "value": "x", @@ -2609,7 +2609,7 @@ "type": "Identifier", "span": { "start": 1209, - "end": 1220, + "end": 1210, "ctxt": 0 }, "value": "x", @@ -2682,7 +2682,7 @@ "type": "Identifier", "span": { "start": 1237, - "end": 1248, + "end": 1238, "ctxt": 0 }, "value": "x", @@ -2755,7 +2755,7 @@ "type": "Identifier", "span": { "start": 1274, - "end": 1280, + "end": 1275, "ctxt": 0 }, "value": "x", @@ -2826,7 +2826,7 @@ "type": "Identifier", "span": { "start": 1301, - "end": 1305, + "end": 1302, "ctxt": 0 }, "value": "x", @@ -2899,7 +2899,7 @@ "type": "Identifier", "span": { "start": 1322, - "end": 1332, + "end": 1323, "ctxt": 0 }, "value": "x", @@ -3000,7 +3000,7 @@ "type": "Identifier", "span": { "start": 1355, - "end": 1361, + "end": 1356, "ctxt": 0 }, "value": "x", @@ -3071,7 +3071,7 @@ "type": "Identifier", "span": { "start": 1383, - "end": 1387, + "end": 1384, "ctxt": 0 }, "value": "x", @@ -3144,7 +3144,7 @@ "type": "Identifier", "span": { "start": 1405, - "end": 1415, + "end": 1406, "ctxt": 0 }, "value": "x", @@ -3245,7 +3245,7 @@ "type": "Identifier", "span": { "start": 1439, - "end": 1445, + "end": 1440, "ctxt": 0 }, "value": "x", @@ -3316,7 +3316,7 @@ "type": "Identifier", "span": { "start": 1466, - "end": 1470, + "end": 1467, "ctxt": 0 }, "value": "x", @@ -3389,7 +3389,7 @@ "type": "Identifier", "span": { "start": 1487, - "end": 1497, + "end": 1488, "ctxt": 0 }, "value": "x", @@ -3490,7 +3490,7 @@ "type": "Identifier", "span": { "start": 1520, - "end": 1526, + "end": 1521, "ctxt": 0 }, "value": "x", @@ -3561,7 +3561,7 @@ "type": "Identifier", "span": { "start": 1547, - "end": 1551, + "end": 1548, "ctxt": 0 }, "value": "x", @@ -3634,7 +3634,7 @@ "type": "Identifier", "span": { "start": 1568, - "end": 1579, + "end": 1569, "ctxt": 0 }, "value": "x", @@ -3707,7 +3707,7 @@ "type": "Identifier", "span": { "start": 1602, - "end": 1608, + "end": 1603, "ctxt": 0 }, "value": "x", @@ -3778,7 +3778,7 @@ "type": "Identifier", "span": { "start": 1629, - "end": 1639, + "end": 1630, "ctxt": 0 }, "value": "x", @@ -3879,7 +3879,7 @@ "type": "Identifier", "span": { "start": 1656, - "end": 1666, + "end": 1657, "ctxt": 0 }, "value": "x", @@ -3980,7 +3980,7 @@ "type": "Identifier", "span": { "start": 1689, - "end": 1695, + "end": 1690, "ctxt": 0 }, "value": "x", @@ -4051,7 +4051,7 @@ "type": "Identifier", "span": { "start": 1716, - "end": 1726, + "end": 1717, "ctxt": 0 }, "value": "x", @@ -4152,7 +4152,7 @@ "type": "Identifier", "span": { "start": 1743, - "end": 1753, + "end": 1744, "ctxt": 0 }, "value": "x", @@ -4253,7 +4253,7 @@ "type": "Identifier", "span": { "start": 1776, - "end": 1782, + "end": 1777, "ctxt": 0 }, "value": "x", @@ -4324,7 +4324,7 @@ "type": "Identifier", "span": { "start": 1804, - "end": 1814, + "end": 1805, "ctxt": 0 }, "value": "x", @@ -4425,7 +4425,7 @@ "type": "Identifier", "span": { "start": 1832, - "end": 1843, + "end": 1833, "ctxt": 0 }, "value": "x", @@ -4498,7 +4498,7 @@ "type": "Identifier", "span": { "start": 1867, - "end": 1873, + "end": 1868, "ctxt": 0 }, "value": "x", @@ -4569,7 +4569,7 @@ "type": "Identifier", "span": { "start": 1895, - "end": 1905, + "end": 1896, "ctxt": 0 }, "value": "x", @@ -4670,7 +4670,7 @@ "type": "Identifier", "span": { "start": 1923, - "end": 1934, + "end": 1924, "ctxt": 0 }, "value": "x", @@ -4743,7 +4743,7 @@ "type": "Identifier", "span": { "start": 1958, - "end": 1964, + "end": 1959, "ctxt": 0 }, "value": "x", @@ -4814,7 +4814,7 @@ "type": "Identifier", "span": { "start": 1986, - "end": 1996, + "end": 1987, "ctxt": 0 }, "value": "x", @@ -4915,7 +4915,7 @@ "type": "Identifier", "span": { "start": 2014, - "end": 2024, + "end": 2015, "ctxt": 0 }, "value": "x", @@ -5016,7 +5016,7 @@ "type": "Identifier", "span": { "start": 2048, - "end": 2054, + "end": 2049, "ctxt": 0 }, "value": "x", @@ -5087,7 +5087,7 @@ "type": "Identifier", "span": { "start": 2077, - "end": 2082, + "end": 2078, "ctxt": 0 }, "value": "x", @@ -5160,7 +5160,7 @@ "type": "Identifier", "span": { "start": 2101, - "end": 2111, + "end": 2102, "ctxt": 0 }, "value": "x", @@ -5261,7 +5261,7 @@ "type": "Identifier", "span": { "start": 2136, - "end": 2142, + "end": 2137, "ctxt": 0 }, "value": "x", @@ -5332,7 +5332,7 @@ "type": "Identifier", "span": { "start": 2164, - "end": 2174, + "end": 2165, "ctxt": 0 }, "value": "x", @@ -5433,7 +5433,7 @@ "type": "Identifier", "span": { "start": 2192, - "end": 2203, + "end": 2193, "ctxt": 0 }, "value": "x", @@ -5506,7 +5506,7 @@ "type": "Identifier", "span": { "start": 2227, - "end": 2233, + "end": 2228, "ctxt": 0 }, "value": "x", @@ -5577,7 +5577,7 @@ "type": "Identifier", "span": { "start": 2255, - "end": 2265, + "end": 2256, "ctxt": 0 }, "value": "x", @@ -5678,7 +5678,7 @@ "type": "Identifier", "span": { "start": 2283, - "end": 2294, + "end": 2284, "ctxt": 0 }, "value": "x", @@ -5751,7 +5751,7 @@ "type": "Identifier", "span": { "start": 2318, - "end": 2324, + "end": 2319, "ctxt": 0 }, "value": "x", @@ -5822,7 +5822,7 @@ "type": "Identifier", "span": { "start": 2346, - "end": 2351, + "end": 2347, "ctxt": 0 }, "value": "x", @@ -5895,7 +5895,7 @@ "type": "Identifier", "span": { "start": 2369, - "end": 2379, + "end": 2370, "ctxt": 0 }, "value": "x", @@ -5996,7 +5996,7 @@ "type": "Identifier", "span": { "start": 2403, - "end": 2409, + "end": 2404, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.json index d2f9328dc086..fff614703fd7 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 66, - "end": 70, + "end": 67, "ctxt": 0 }, "value": "x", @@ -252,7 +252,7 @@ "type": "Identifier", "span": { "start": 119, - "end": 123, + "end": 120, "ctxt": 0 }, "value": "x", @@ -470,7 +470,7 @@ "type": "Identifier", "span": { "start": 175, - "end": 179, + "end": 176, "ctxt": 0 }, "value": "x", @@ -814,7 +814,7 @@ "type": "Identifier", "span": { "start": 238, - "end": 242, + "end": 239, "ctxt": 0 }, "value": "x", @@ -933,7 +933,7 @@ "type": "Identifier", "span": { "start": 286, - "end": 290, + "end": 287, "ctxt": 0 }, "value": "x", @@ -1166,7 +1166,7 @@ "type": "Identifier", "span": { "start": 327, - "end": 331, + "end": 328, "ctxt": 0 }, "value": "x", @@ -1423,7 +1423,7 @@ "type": "Identifier", "span": { "start": 370, - "end": 374, + "end": 371, "ctxt": 0 }, "value": "x", @@ -1676,7 +1676,7 @@ "type": "Identifier", "span": { "start": 408, - "end": 412, + "end": 409, "ctxt": 0 }, "value": "x", @@ -1749,7 +1749,7 @@ "type": "Identifier", "span": { "start": 429, - "end": 433, + "end": 430, "ctxt": 0 }, "value": "x", @@ -1822,7 +1822,7 @@ "type": "Identifier", "span": { "start": 459, - "end": 465, + "end": 460, "ctxt": 0 }, "value": "x", @@ -1893,7 +1893,7 @@ "type": "Identifier", "span": { "start": 487, - "end": 507, + "end": 488, "ctxt": 0 }, "value": "x", @@ -1993,7 +1993,7 @@ "type": "Identifier", "span": { "start": 525, - "end": 545, + "end": 526, "ctxt": 0 }, "value": "x", @@ -2093,7 +2093,7 @@ "type": "Identifier", "span": { "start": 572, - "end": 578, + "end": 573, "ctxt": 0 }, "value": "x", @@ -2164,7 +2164,7 @@ "type": "Identifier", "span": { "start": 600, - "end": 629, + "end": 601, "ctxt": 0 }, "value": "x", @@ -2273,7 +2273,7 @@ "type": "Identifier", "span": { "start": 647, - "end": 676, + "end": 648, "ctxt": 0 }, "value": "x", @@ -2382,7 +2382,7 @@ "type": "Identifier", "span": { "start": 703, - "end": 709, + "end": 704, "ctxt": 0 }, "value": "x", @@ -2453,7 +2453,7 @@ "type": "Identifier", "span": { "start": 730, - "end": 767, + "end": 731, "ctxt": 0 }, "value": "x", @@ -2571,7 +2571,7 @@ "type": "Identifier", "span": { "start": 784, - "end": 821, + "end": 785, "ctxt": 0 }, "value": "x", @@ -2689,7 +2689,7 @@ "type": "Identifier", "span": { "start": 847, - "end": 853, + "end": 848, "ctxt": 0 }, "value": "x", @@ -2760,7 +2760,7 @@ "type": "Identifier", "span": { "start": 874, - "end": 885, + "end": 875, "ctxt": 0 }, "value": "x", @@ -2833,7 +2833,7 @@ "type": "Identifier", "span": { "start": 902, - "end": 913, + "end": 903, "ctxt": 0 }, "value": "x", @@ -2906,7 +2906,7 @@ "type": "Identifier", "span": { "start": 939, - "end": 945, + "end": 940, "ctxt": 0 }, "value": "x", @@ -2977,7 +2977,7 @@ "type": "Identifier", "span": { "start": 966, - "end": 977, + "end": 967, "ctxt": 0 }, "value": "x", @@ -3050,7 +3050,7 @@ "type": "Identifier", "span": { "start": 994, - "end": 1005, + "end": 995, "ctxt": 0 }, "value": "x", @@ -3123,7 +3123,7 @@ "type": "Identifier", "span": { "start": 1031, - "end": 1037, + "end": 1032, "ctxt": 0 }, "value": "x", @@ -3194,7 +3194,7 @@ "type": "Identifier", "span": { "start": 1058, - "end": 1062, + "end": 1059, "ctxt": 0 }, "value": "x", @@ -3267,7 +3267,7 @@ "type": "Identifier", "span": { "start": 1079, - "end": 1099, + "end": 1080, "ctxt": 0 }, "value": "x", @@ -3367,7 +3367,7 @@ "type": "Identifier", "span": { "start": 1122, - "end": 1128, + "end": 1123, "ctxt": 0 }, "value": "x", @@ -3438,7 +3438,7 @@ "type": "Identifier", "span": { "start": 1150, - "end": 1154, + "end": 1151, "ctxt": 0 }, "value": "x", @@ -3511,7 +3511,7 @@ "type": "Identifier", "span": { "start": 1172, - "end": 1201, + "end": 1173, "ctxt": 0 }, "value": "x", @@ -3620,7 +3620,7 @@ "type": "Identifier", "span": { "start": 1225, - "end": 1231, + "end": 1226, "ctxt": 0 }, "value": "x", @@ -3691,7 +3691,7 @@ "type": "Identifier", "span": { "start": 1252, - "end": 1256, + "end": 1253, "ctxt": 0 }, "value": "x", @@ -3764,7 +3764,7 @@ "type": "Identifier", "span": { "start": 1273, - "end": 1308, + "end": 1274, "ctxt": 0 }, "value": "x", @@ -3892,7 +3892,7 @@ "type": "Identifier", "span": { "start": 1331, - "end": 1337, + "end": 1332, "ctxt": 0 }, "value": "x", @@ -3963,7 +3963,7 @@ "type": "Identifier", "span": { "start": 1358, - "end": 1362, + "end": 1359, "ctxt": 0 }, "value": "x", @@ -4036,7 +4036,7 @@ "type": "Identifier", "span": { "start": 1379, - "end": 1390, + "end": 1380, "ctxt": 0 }, "value": "x", @@ -4109,7 +4109,7 @@ "type": "Identifier", "span": { "start": 1425, - "end": 1431, + "end": 1426, "ctxt": 0 }, "value": "x", @@ -4180,7 +4180,7 @@ "type": "Identifier", "span": { "start": 1452, - "end": 1472, + "end": 1453, "ctxt": 0 }, "value": "x", @@ -4280,7 +4280,7 @@ "type": "Identifier", "span": { "start": 1489, - "end": 1524, + "end": 1490, "ctxt": 0 }, "value": "x", @@ -4408,7 +4408,7 @@ "type": "Identifier", "span": { "start": 1550, - "end": 1556, + "end": 1551, "ctxt": 0 }, "value": "x", @@ -4479,7 +4479,7 @@ "type": "Identifier", "span": { "start": 1577, - "end": 1597, + "end": 1578, "ctxt": 0 }, "value": "x", @@ -4579,7 +4579,7 @@ "type": "Identifier", "span": { "start": 1614, - "end": 1653, + "end": 1615, "ctxt": 0 }, "value": "x", @@ -4725,7 +4725,7 @@ "type": "Identifier", "span": { "start": 1679, - "end": 1685, + "end": 1680, "ctxt": 0 }, "value": "x", @@ -4796,7 +4796,7 @@ "type": "Identifier", "span": { "start": 1707, - "end": 1728, + "end": 1708, "ctxt": 0 }, "value": "x", @@ -4896,7 +4896,7 @@ "type": "Identifier", "span": { "start": 1746, - "end": 1757, + "end": 1747, "ctxt": 0 }, "value": "x", @@ -4969,7 +4969,7 @@ "type": "Identifier", "span": { "start": 1781, - "end": 1787, + "end": 1782, "ctxt": 0 }, "value": "x", @@ -5040,7 +5040,7 @@ "type": "Identifier", "span": { "start": 1809, - "end": 1830, + "end": 1810, "ctxt": 0 }, "value": "x", @@ -5140,7 +5140,7 @@ "type": "Identifier", "span": { "start": 1848, - "end": 1859, + "end": 1849, "ctxt": 0 }, "value": "x", @@ -5213,7 +5213,7 @@ "type": "Identifier", "span": { "start": 1883, - "end": 1889, + "end": 1884, "ctxt": 0 }, "value": "x", @@ -5284,7 +5284,7 @@ "type": "Identifier", "span": { "start": 1911, - "end": 1956, + "end": 1912, "ctxt": 0 }, "value": "x", @@ -5449,7 +5449,7 @@ "type": "Identifier", "span": { "start": 1974, - "end": 2011, + "end": 1975, "ctxt": 0 }, "value": "x", @@ -5605,7 +5605,7 @@ "type": "Identifier", "span": { "start": 2038, - "end": 2044, + "end": 2039, "ctxt": 0 }, "value": "x", @@ -5676,7 +5676,7 @@ "type": "Identifier", "span": { "start": 2067, - "end": 2072, + "end": 2068, "ctxt": 0 }, "value": "x", @@ -5749,7 +5749,7 @@ "type": "Identifier", "span": { "start": 2091, - "end": 2120, + "end": 2092, "ctxt": 0 }, "value": "x", @@ -5858,7 +5858,7 @@ "type": "Identifier", "span": { "start": 2145, - "end": 2151, + "end": 2146, "ctxt": 0 }, "value": "x", @@ -5929,7 +5929,7 @@ "type": "Identifier", "span": { "start": 2173, - "end": 2205, + "end": 2174, "ctxt": 0 }, "value": "x", @@ -6077,7 +6077,7 @@ "type": "Identifier", "span": { "start": 2223, - "end": 2234, + "end": 2224, "ctxt": 0 }, "value": "x", @@ -6150,7 +6150,7 @@ "type": "Identifier", "span": { "start": 2258, - "end": 2264, + "end": 2259, "ctxt": 0 }, "value": "x", @@ -6221,7 +6221,7 @@ "type": "Identifier", "span": { "start": 2286, - "end": 2321, + "end": 2287, "ctxt": 0 }, "value": "x", @@ -6359,7 +6359,7 @@ "type": "Identifier", "span": { "start": 2339, - "end": 2350, + "end": 2340, "ctxt": 0 }, "value": "x", @@ -6432,7 +6432,7 @@ "type": "Identifier", "span": { "start": 2374, - "end": 2380, + "end": 2375, "ctxt": 0 }, "value": "x", @@ -6503,7 +6503,7 @@ "type": "Identifier", "span": { "start": 2402, - "end": 2407, + "end": 2403, "ctxt": 0 }, "value": "x", @@ -6576,7 +6576,7 @@ "type": "Identifier", "span": { "start": 2425, - "end": 2475, + "end": 2426, "ctxt": 0 }, "value": "x", @@ -6759,7 +6759,7 @@ "type": "Identifier", "span": { "start": 2499, - "end": 2505, + "end": 2500, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.json index 25757f474ce7..be58e469842e 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.json @@ -147,7 +147,7 @@ "type": "Identifier", "span": { "start": 77, - "end": 81, + "end": 78, "ctxt": 0 }, "value": "x", @@ -253,7 +253,7 @@ "type": "Identifier", "span": { "start": 122, - "end": 126, + "end": 123, "ctxt": 0 }, "value": "x", @@ -473,7 +473,7 @@ "type": "Identifier", "span": { "start": 160, - "end": 164, + "end": 161, "ctxt": 0 }, "value": "x", @@ -695,7 +695,7 @@ "type": "Identifier", "span": { "start": 186, - "end": 223, + "end": 187, "ctxt": 0 }, "value": "x", @@ -813,7 +813,7 @@ "type": "Identifier", "span": { "start": 240, - "end": 277, + "end": 241, "ctxt": 0 }, "value": "x", @@ -931,7 +931,7 @@ "type": "Identifier", "span": { "start": 303, - "end": 309, + "end": 304, "ctxt": 0 }, "value": "x", @@ -1002,7 +1002,7 @@ "type": "Identifier", "span": { "start": 330, - "end": 335, + "end": 331, "ctxt": 0 }, "value": "x", @@ -1075,7 +1075,7 @@ "type": "Identifier", "span": { "start": 352, - "end": 357, + "end": 353, "ctxt": 0 }, "value": "x", @@ -1148,7 +1148,7 @@ "type": "Identifier", "span": { "start": 383, - "end": 389, + "end": 384, "ctxt": 0 }, "value": "x", @@ -1219,7 +1219,7 @@ "type": "Identifier", "span": { "start": 410, - "end": 421, + "end": 411, "ctxt": 0 }, "value": "x", @@ -1292,7 +1292,7 @@ "type": "Identifier", "span": { "start": 438, - "end": 449, + "end": 439, "ctxt": 0 }, "value": "x", @@ -1365,7 +1365,7 @@ "type": "Identifier", "span": { "start": 475, - "end": 481, + "end": 476, "ctxt": 0 }, "value": "x", @@ -1436,7 +1436,7 @@ "type": "Identifier", "span": { "start": 503, - "end": 538, + "end": 504, "ctxt": 0 }, "value": "x", @@ -1564,7 +1564,7 @@ "type": "Identifier", "span": { "start": 556, - "end": 567, + "end": 557, "ctxt": 0 }, "value": "x", @@ -1637,7 +1637,7 @@ "type": "Identifier", "span": { "start": 591, - "end": 597, + "end": 592, "ctxt": 0 }, "value": "x", @@ -1708,7 +1708,7 @@ "type": "Identifier", "span": { "start": 619, - "end": 654, + "end": 620, "ctxt": 0 }, "value": "x", @@ -1836,7 +1836,7 @@ "type": "Identifier", "span": { "start": 672, - "end": 677, + "end": 673, "ctxt": 0 }, "value": "x", @@ -1909,7 +1909,7 @@ "type": "Identifier", "span": { "start": 704, - "end": 710, + "end": 705, "ctxt": 0 }, "value": "x", @@ -1980,7 +1980,7 @@ "type": "Identifier", "span": { "start": 733, - "end": 744, + "end": 734, "ctxt": 0 }, "value": "x", @@ -2053,7 +2053,7 @@ "type": "Identifier", "span": { "start": 763, - "end": 768, + "end": 764, "ctxt": 0 }, "value": "x", @@ -2126,7 +2126,7 @@ "type": "Identifier", "span": { "start": 793, - "end": 799, + "end": 794, "ctxt": 0 }, "value": "x", @@ -2197,7 +2197,7 @@ "type": "Identifier", "span": { "start": 821, - "end": 856, + "end": 822, "ctxt": 0 }, "value": "x", @@ -2325,7 +2325,7 @@ "type": "Identifier", "span": { "start": 874, - "end": 879, + "end": 875, "ctxt": 0 }, "value": "x", @@ -2398,7 +2398,7 @@ "type": "Identifier", "span": { "start": 903, - "end": 909, + "end": 904, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.json index 248fabcd4100..abcb6bf3d17f 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 66, - "end": 70, + "end": 67, "ctxt": 0 }, "value": "x", @@ -252,7 +252,7 @@ "type": "Identifier", "span": { "start": 116, - "end": 120, + "end": 117, "ctxt": 0 }, "value": "x", @@ -447,7 +447,7 @@ "type": "Identifier", "span": { "start": 166, - "end": 170, + "end": 167, "ctxt": 0 }, "value": "x", @@ -676,7 +676,7 @@ "type": "Identifier", "span": { "start": 220, - "end": 224, + "end": 221, "ctxt": 0 }, "value": "x", @@ -795,7 +795,7 @@ "type": "Identifier", "span": { "start": 259, - "end": 263, + "end": 260, "ctxt": 0 }, "value": "x", @@ -959,7 +959,7 @@ "type": "Identifier", "span": { "start": 288, - "end": 292, + "end": 289, "ctxt": 0 }, "value": "x", @@ -1124,7 +1124,7 @@ "type": "Identifier", "span": { "start": 316, - "end": 320, + "end": 317, "ctxt": 0 }, "value": "x", @@ -1262,7 +1262,7 @@ "type": "Identifier", "span": { "start": 354, - "end": 358, + "end": 355, "ctxt": 0 }, "value": "x", @@ -1335,7 +1335,7 @@ "type": "Identifier", "span": { "start": 375, - "end": 379, + "end": 376, "ctxt": 0 }, "value": "x", @@ -1408,7 +1408,7 @@ "type": "Identifier", "span": { "start": 405, - "end": 411, + "end": 406, "ctxt": 0 }, "value": "x", @@ -1479,7 +1479,7 @@ "type": "Identifier", "span": { "start": 433, - "end": 445, + "end": 434, "ctxt": 0 }, "value": "x", @@ -1570,7 +1570,7 @@ "type": "Identifier", "span": { "start": 463, - "end": 475, + "end": 464, "ctxt": 0 }, "value": "x", @@ -1661,7 +1661,7 @@ "type": "Identifier", "span": { "start": 502, - "end": 508, + "end": 503, "ctxt": 0 }, "value": "x", @@ -1732,7 +1732,7 @@ "type": "Identifier", "span": { "start": 530, - "end": 542, + "end": 531, "ctxt": 0 }, "value": "x", @@ -1823,7 +1823,7 @@ "type": "Identifier", "span": { "start": 560, - "end": 572, + "end": 561, "ctxt": 0 }, "value": "x", @@ -1914,7 +1914,7 @@ "type": "Identifier", "span": { "start": 599, - "end": 605, + "end": 600, "ctxt": 0 }, "value": "x", @@ -1985,7 +1985,7 @@ "type": "Identifier", "span": { "start": 626, - "end": 638, + "end": 627, "ctxt": 0 }, "value": "x", @@ -2076,7 +2076,7 @@ "type": "Identifier", "span": { "start": 655, - "end": 667, + "end": 656, "ctxt": 0 }, "value": "x", @@ -2167,7 +2167,7 @@ "type": "Identifier", "span": { "start": 693, - "end": 699, + "end": 694, "ctxt": 0 }, "value": "x", @@ -2238,7 +2238,7 @@ "type": "Identifier", "span": { "start": 720, - "end": 731, + "end": 721, "ctxt": 0 }, "value": "x", @@ -2311,7 +2311,7 @@ "type": "Identifier", "span": { "start": 748, - "end": 759, + "end": 749, "ctxt": 0 }, "value": "x", @@ -2384,7 +2384,7 @@ "type": "Identifier", "span": { "start": 785, - "end": 791, + "end": 786, "ctxt": 0 }, "value": "x", @@ -2455,7 +2455,7 @@ "type": "Identifier", "span": { "start": 812, - "end": 823, + "end": 813, "ctxt": 0 }, "value": "x", @@ -2528,7 +2528,7 @@ "type": "Identifier", "span": { "start": 840, - "end": 851, + "end": 841, "ctxt": 0 }, "value": "x", @@ -2601,7 +2601,7 @@ "type": "Identifier", "span": { "start": 877, - "end": 883, + "end": 878, "ctxt": 0 }, "value": "x", @@ -2672,7 +2672,7 @@ "type": "Identifier", "span": { "start": 904, - "end": 908, + "end": 905, "ctxt": 0 }, "value": "x", @@ -2745,7 +2745,7 @@ "type": "Identifier", "span": { "start": 925, - "end": 937, + "end": 926, "ctxt": 0 }, "value": "x", @@ -2836,7 +2836,7 @@ "type": "Identifier", "span": { "start": 960, - "end": 966, + "end": 961, "ctxt": 0 }, "value": "x", @@ -2907,7 +2907,7 @@ "type": "Identifier", "span": { "start": 988, - "end": 992, + "end": 989, "ctxt": 0 }, "value": "x", @@ -2980,7 +2980,7 @@ "type": "Identifier", "span": { "start": 1010, - "end": 1022, + "end": 1011, "ctxt": 0 }, "value": "x", @@ -3071,7 +3071,7 @@ "type": "Identifier", "span": { "start": 1046, - "end": 1052, + "end": 1047, "ctxt": 0 }, "value": "x", @@ -3142,7 +3142,7 @@ "type": "Identifier", "span": { "start": 1073, - "end": 1077, + "end": 1074, "ctxt": 0 }, "value": "x", @@ -3215,7 +3215,7 @@ "type": "Identifier", "span": { "start": 1094, - "end": 1106, + "end": 1095, "ctxt": 0 }, "value": "x", @@ -3306,7 +3306,7 @@ "type": "Identifier", "span": { "start": 1129, - "end": 1135, + "end": 1130, "ctxt": 0 }, "value": "x", @@ -3377,7 +3377,7 @@ "type": "Identifier", "span": { "start": 1156, - "end": 1160, + "end": 1157, "ctxt": 0 }, "value": "x", @@ -3450,7 +3450,7 @@ "type": "Identifier", "span": { "start": 1177, - "end": 1188, + "end": 1178, "ctxt": 0 }, "value": "x", @@ -3523,7 +3523,7 @@ "type": "Identifier", "span": { "start": 1214, - "end": 1220, + "end": 1215, "ctxt": 0 }, "value": "x", @@ -3594,7 +3594,7 @@ "type": "Identifier", "span": { "start": 1241, - "end": 1253, + "end": 1242, "ctxt": 0 }, "value": "x", @@ -3685,7 +3685,7 @@ "type": "Identifier", "span": { "start": 1270, - "end": 1282, + "end": 1271, "ctxt": 0 }, "value": "x", @@ -3776,7 +3776,7 @@ "type": "Identifier", "span": { "start": 1308, - "end": 1314, + "end": 1309, "ctxt": 0 }, "value": "x", @@ -3847,7 +3847,7 @@ "type": "Identifier", "span": { "start": 1335, - "end": 1347, + "end": 1336, "ctxt": 0 }, "value": "x", @@ -3938,7 +3938,7 @@ "type": "Identifier", "span": { "start": 1364, - "end": 1376, + "end": 1365, "ctxt": 0 }, "value": "x", @@ -4029,7 +4029,7 @@ "type": "Identifier", "span": { "start": 1402, - "end": 1408, + "end": 1403, "ctxt": 0 }, "value": "x", @@ -4100,7 +4100,7 @@ "type": "Identifier", "span": { "start": 1430, - "end": 1442, + "end": 1431, "ctxt": 0 }, "value": "x", @@ -4191,7 +4191,7 @@ "type": "Identifier", "span": { "start": 1460, - "end": 1471, + "end": 1461, "ctxt": 0 }, "value": "x", @@ -4264,7 +4264,7 @@ "type": "Identifier", "span": { "start": 1495, - "end": 1501, + "end": 1496, "ctxt": 0 }, "value": "x", @@ -4335,7 +4335,7 @@ "type": "Identifier", "span": { "start": 1523, - "end": 1535, + "end": 1524, "ctxt": 0 }, "value": "x", @@ -4426,7 +4426,7 @@ "type": "Identifier", "span": { "start": 1553, - "end": 1564, + "end": 1554, "ctxt": 0 }, "value": "x", @@ -4499,7 +4499,7 @@ "type": "Identifier", "span": { "start": 1588, - "end": 1594, + "end": 1589, "ctxt": 0 }, "value": "x", @@ -4570,7 +4570,7 @@ "type": "Identifier", "span": { "start": 1616, - "end": 1628, + "end": 1617, "ctxt": 0 }, "value": "x", @@ -4661,7 +4661,7 @@ "type": "Identifier", "span": { "start": 1646, - "end": 1658, + "end": 1647, "ctxt": 0 }, "value": "x", @@ -4752,7 +4752,7 @@ "type": "Identifier", "span": { "start": 1685, - "end": 1691, + "end": 1686, "ctxt": 0 }, "value": "x", @@ -4823,7 +4823,7 @@ "type": "Identifier", "span": { "start": 1714, - "end": 1719, + "end": 1715, "ctxt": 0 }, "value": "x", @@ -4896,7 +4896,7 @@ "type": "Identifier", "span": { "start": 1738, - "end": 1750, + "end": 1739, "ctxt": 0 }, "value": "x", @@ -4987,7 +4987,7 @@ "type": "Identifier", "span": { "start": 1775, - "end": 1781, + "end": 1776, "ctxt": 0 }, "value": "x", @@ -5058,7 +5058,7 @@ "type": "Identifier", "span": { "start": 1803, - "end": 1815, + "end": 1804, "ctxt": 0 }, "value": "x", @@ -5149,7 +5149,7 @@ "type": "Identifier", "span": { "start": 1833, - "end": 1844, + "end": 1834, "ctxt": 0 }, "value": "x", @@ -5222,7 +5222,7 @@ "type": "Identifier", "span": { "start": 1868, - "end": 1874, + "end": 1869, "ctxt": 0 }, "value": "x", @@ -5293,7 +5293,7 @@ "type": "Identifier", "span": { "start": 1896, - "end": 1908, + "end": 1897, "ctxt": 0 }, "value": "x", @@ -5384,7 +5384,7 @@ "type": "Identifier", "span": { "start": 1926, - "end": 1937, + "end": 1927, "ctxt": 0 }, "value": "x", @@ -5457,7 +5457,7 @@ "type": "Identifier", "span": { "start": 1961, - "end": 1967, + "end": 1962, "ctxt": 0 }, "value": "x", @@ -5528,7 +5528,7 @@ "type": "Identifier", "span": { "start": 1989, - "end": 1994, + "end": 1990, "ctxt": 0 }, "value": "x", @@ -5601,7 +5601,7 @@ "type": "Identifier", "span": { "start": 2012, - "end": 2024, + "end": 2013, "ctxt": 0 }, "value": "x", @@ -5692,7 +5692,7 @@ "type": "Identifier", "span": { "start": 2048, - "end": 2054, + "end": 2049, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams.json index 3200eb63584e..04678c7e7336 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 357, - "end": 361, + "end": 358, "ctxt": 0 }, "value": "x", @@ -103,7 +103,7 @@ "type": "Identifier", "span": { "start": 363, - "end": 368, + "end": 364, "ctxt": 0 }, "value": "y", @@ -298,7 +298,7 @@ "type": "Identifier", "span": { "start": 414, - "end": 418, + "end": 415, "ctxt": 0 }, "value": "x", @@ -344,7 +344,7 @@ "type": "Identifier", "span": { "start": 420, - "end": 425, + "end": 421, "ctxt": 0 }, "value": "y", @@ -539,7 +539,7 @@ "type": "Identifier", "span": { "start": 471, - "end": 475, + "end": 472, "ctxt": 0 }, "value": "x", @@ -585,7 +585,7 @@ "type": "Identifier", "span": { "start": 477, - "end": 482, + "end": 478, "ctxt": 0 }, "value": "y", @@ -814,7 +814,7 @@ "type": "Identifier", "span": { "start": 532, - "end": 536, + "end": 533, "ctxt": 0 }, "value": "x", @@ -851,7 +851,7 @@ "type": "Identifier", "span": { "start": 538, - "end": 543, + "end": 539, "ctxt": 0 }, "value": "y", @@ -970,7 +970,7 @@ "type": "Identifier", "span": { "start": 578, - "end": 582, + "end": 579, "ctxt": 0 }, "value": "x", @@ -1007,7 +1007,7 @@ "type": "Identifier", "span": { "start": 584, - "end": 589, + "end": 585, "ctxt": 0 }, "value": "y", @@ -1171,7 +1171,7 @@ "type": "Identifier", "span": { "start": 614, - "end": 618, + "end": 615, "ctxt": 0 }, "value": "x", @@ -1208,7 +1208,7 @@ "type": "Identifier", "span": { "start": 620, - "end": 625, + "end": 621, "ctxt": 0 }, "value": "y", @@ -1373,7 +1373,7 @@ "type": "Identifier", "span": { "start": 649, - "end": 653, + "end": 650, "ctxt": 0 }, "value": "x", @@ -1419,7 +1419,7 @@ "type": "Identifier", "span": { "start": 655, - "end": 660, + "end": 656, "ctxt": 0 }, "value": "y", @@ -1557,7 +1557,7 @@ "type": "Identifier", "span": { "start": 694, - "end": 698, + "end": 695, "ctxt": 0 }, "value": "x", @@ -1630,7 +1630,7 @@ "type": "Identifier", "span": { "start": 715, - "end": 719, + "end": 716, "ctxt": 0 }, "value": "x", @@ -1703,7 +1703,7 @@ "type": "Identifier", "span": { "start": 745, - "end": 751, + "end": 746, "ctxt": 0 }, "value": "x", @@ -1774,7 +1774,7 @@ "type": "Identifier", "span": { "start": 773, - "end": 785, + "end": 774, "ctxt": 0 }, "value": "x", @@ -1865,7 +1865,7 @@ "type": "Identifier", "span": { "start": 803, - "end": 815, + "end": 804, "ctxt": 0 }, "value": "x", @@ -1956,7 +1956,7 @@ "type": "Identifier", "span": { "start": 842, - "end": 848, + "end": 843, "ctxt": 0 }, "value": "x", @@ -2027,7 +2027,7 @@ "type": "Identifier", "span": { "start": 870, - "end": 882, + "end": 871, "ctxt": 0 }, "value": "x", @@ -2118,7 +2118,7 @@ "type": "Identifier", "span": { "start": 900, - "end": 912, + "end": 901, "ctxt": 0 }, "value": "x", @@ -2209,7 +2209,7 @@ "type": "Identifier", "span": { "start": 939, - "end": 945, + "end": 940, "ctxt": 0 }, "value": "x", @@ -2280,7 +2280,7 @@ "type": "Identifier", "span": { "start": 966, - "end": 978, + "end": 967, "ctxt": 0 }, "value": "x", @@ -2371,7 +2371,7 @@ "type": "Identifier", "span": { "start": 995, - "end": 1007, + "end": 996, "ctxt": 0 }, "value": "x", @@ -2462,7 +2462,7 @@ "type": "Identifier", "span": { "start": 1033, - "end": 1039, + "end": 1034, "ctxt": 0 }, "value": "x", @@ -2533,7 +2533,7 @@ "type": "Identifier", "span": { "start": 1060, - "end": 1071, + "end": 1061, "ctxt": 0 }, "value": "x", @@ -2606,7 +2606,7 @@ "type": "Identifier", "span": { "start": 1088, - "end": 1099, + "end": 1089, "ctxt": 0 }, "value": "x", @@ -2679,7 +2679,7 @@ "type": "Identifier", "span": { "start": 1125, - "end": 1131, + "end": 1126, "ctxt": 0 }, "value": "x", @@ -2750,7 +2750,7 @@ "type": "Identifier", "span": { "start": 1152, - "end": 1163, + "end": 1153, "ctxt": 0 }, "value": "x", @@ -2823,7 +2823,7 @@ "type": "Identifier", "span": { "start": 1180, - "end": 1191, + "end": 1181, "ctxt": 0 }, "value": "x", @@ -2896,7 +2896,7 @@ "type": "Identifier", "span": { "start": 1217, - "end": 1223, + "end": 1218, "ctxt": 0 }, "value": "x", @@ -2967,7 +2967,7 @@ "type": "Identifier", "span": { "start": 1244, - "end": 1248, + "end": 1245, "ctxt": 0 }, "value": "x", @@ -3040,7 +3040,7 @@ "type": "Identifier", "span": { "start": 1265, - "end": 1277, + "end": 1266, "ctxt": 0 }, "value": "x", @@ -3131,7 +3131,7 @@ "type": "Identifier", "span": { "start": 1300, - "end": 1306, + "end": 1301, "ctxt": 0 }, "value": "x", @@ -3202,7 +3202,7 @@ "type": "Identifier", "span": { "start": 1328, - "end": 1332, + "end": 1329, "ctxt": 0 }, "value": "x", @@ -3275,7 +3275,7 @@ "type": "Identifier", "span": { "start": 1350, - "end": 1362, + "end": 1351, "ctxt": 0 }, "value": "x", @@ -3366,7 +3366,7 @@ "type": "Identifier", "span": { "start": 1386, - "end": 1392, + "end": 1387, "ctxt": 0 }, "value": "x", @@ -3437,7 +3437,7 @@ "type": "Identifier", "span": { "start": 1413, - "end": 1417, + "end": 1414, "ctxt": 0 }, "value": "x", @@ -3510,7 +3510,7 @@ "type": "Identifier", "span": { "start": 1434, - "end": 1446, + "end": 1435, "ctxt": 0 }, "value": "x", @@ -3601,7 +3601,7 @@ "type": "Identifier", "span": { "start": 1469, - "end": 1475, + "end": 1470, "ctxt": 0 }, "value": "x", @@ -3672,7 +3672,7 @@ "type": "Identifier", "span": { "start": 1496, - "end": 1500, + "end": 1497, "ctxt": 0 }, "value": "x", @@ -3745,7 +3745,7 @@ "type": "Identifier", "span": { "start": 1517, - "end": 1528, + "end": 1518, "ctxt": 0 }, "value": "x", @@ -3818,7 +3818,7 @@ "type": "Identifier", "span": { "start": 1563, - "end": 1569, + "end": 1564, "ctxt": 0 }, "value": "x", @@ -3889,7 +3889,7 @@ "type": "Identifier", "span": { "start": 1590, - "end": 1602, + "end": 1591, "ctxt": 0 }, "value": "x", @@ -3980,7 +3980,7 @@ "type": "Identifier", "span": { "start": 1619, - "end": 1631, + "end": 1620, "ctxt": 0 }, "value": "x", @@ -4071,7 +4071,7 @@ "type": "Identifier", "span": { "start": 1657, - "end": 1663, + "end": 1658, "ctxt": 0 }, "value": "x", @@ -4142,7 +4142,7 @@ "type": "Identifier", "span": { "start": 1684, - "end": 1696, + "end": 1685, "ctxt": 0 }, "value": "x", @@ -4233,7 +4233,7 @@ "type": "Identifier", "span": { "start": 1713, - "end": 1725, + "end": 1714, "ctxt": 0 }, "value": "x", @@ -4324,7 +4324,7 @@ "type": "Identifier", "span": { "start": 1751, - "end": 1757, + "end": 1752, "ctxt": 0 }, "value": "x", @@ -4395,7 +4395,7 @@ "type": "Identifier", "span": { "start": 1779, - "end": 1791, + "end": 1780, "ctxt": 0 }, "value": "x", @@ -4486,7 +4486,7 @@ "type": "Identifier", "span": { "start": 1809, - "end": 1820, + "end": 1810, "ctxt": 0 }, "value": "x", @@ -4559,7 +4559,7 @@ "type": "Identifier", "span": { "start": 1844, - "end": 1850, + "end": 1845, "ctxt": 0 }, "value": "x", @@ -4630,7 +4630,7 @@ "type": "Identifier", "span": { "start": 1872, - "end": 1884, + "end": 1873, "ctxt": 0 }, "value": "x", @@ -4721,7 +4721,7 @@ "type": "Identifier", "span": { "start": 1902, - "end": 1913, + "end": 1903, "ctxt": 0 }, "value": "x", @@ -4794,7 +4794,7 @@ "type": "Identifier", "span": { "start": 1937, - "end": 1943, + "end": 1938, "ctxt": 0 }, "value": "x", @@ -4865,7 +4865,7 @@ "type": "Identifier", "span": { "start": 1965, - "end": 1977, + "end": 1966, "ctxt": 0 }, "value": "x", @@ -4956,7 +4956,7 @@ "type": "Identifier", "span": { "start": 1995, - "end": 2007, + "end": 1996, "ctxt": 0 }, "value": "x", @@ -5047,7 +5047,7 @@ "type": "Identifier", "span": { "start": 2034, - "end": 2040, + "end": 2035, "ctxt": 0 }, "value": "x", @@ -5118,7 +5118,7 @@ "type": "Identifier", "span": { "start": 2063, - "end": 2068, + "end": 2064, "ctxt": 0 }, "value": "x", @@ -5191,7 +5191,7 @@ "type": "Identifier", "span": { "start": 2087, - "end": 2099, + "end": 2088, "ctxt": 0 }, "value": "x", @@ -5282,7 +5282,7 @@ "type": "Identifier", "span": { "start": 2124, - "end": 2130, + "end": 2125, "ctxt": 0 }, "value": "x", @@ -5353,7 +5353,7 @@ "type": "Identifier", "span": { "start": 2152, - "end": 2164, + "end": 2153, "ctxt": 0 }, "value": "x", @@ -5444,7 +5444,7 @@ "type": "Identifier", "span": { "start": 2182, - "end": 2193, + "end": 2183, "ctxt": 0 }, "value": "x", @@ -5517,7 +5517,7 @@ "type": "Identifier", "span": { "start": 2217, - "end": 2223, + "end": 2218, "ctxt": 0 }, "value": "x", @@ -5588,7 +5588,7 @@ "type": "Identifier", "span": { "start": 2245, - "end": 2257, + "end": 2246, "ctxt": 0 }, "value": "x", @@ -5679,7 +5679,7 @@ "type": "Identifier", "span": { "start": 2275, - "end": 2286, + "end": 2276, "ctxt": 0 }, "value": "x", @@ -5752,7 +5752,7 @@ "type": "Identifier", "span": { "start": 2310, - "end": 2316, + "end": 2311, "ctxt": 0 }, "value": "x", @@ -5823,7 +5823,7 @@ "type": "Identifier", "span": { "start": 2338, - "end": 2343, + "end": 2339, "ctxt": 0 }, "value": "x", @@ -5896,7 +5896,7 @@ "type": "Identifier", "span": { "start": 2361, - "end": 2373, + "end": 2362, "ctxt": 0 }, "value": "x", @@ -5987,7 +5987,7 @@ "type": "Identifier", "span": { "start": 2397, - "end": 2403, + "end": 2398, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.json index b6e53b19d573..89bf826c5ad0 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 360, - "end": 364, + "end": 361, "ctxt": 0 }, "value": "x", @@ -103,7 +103,7 @@ "type": "Identifier", "span": { "start": 366, - "end": 371, + "end": 367, "ctxt": 0 }, "value": "y", @@ -321,7 +321,7 @@ "type": "Identifier", "span": { "start": 420, - "end": 424, + "end": 421, "ctxt": 0 }, "value": "x", @@ -367,7 +367,7 @@ "type": "Identifier", "span": { "start": 426, - "end": 431, + "end": 427, "ctxt": 0 }, "value": "y", @@ -585,7 +585,7 @@ "type": "Identifier", "span": { "start": 480, - "end": 484, + "end": 481, "ctxt": 0 }, "value": "x", @@ -631,7 +631,7 @@ "type": "Identifier", "span": { "start": 486, - "end": 491, + "end": 487, "ctxt": 0 }, "value": "y", @@ -906,7 +906,7 @@ "type": "Identifier", "span": { "start": 544, - "end": 548, + "end": 545, "ctxt": 0 }, "value": "x", @@ -943,7 +943,7 @@ "type": "Identifier", "span": { "start": 550, - "end": 555, + "end": 551, "ctxt": 0 }, "value": "y", @@ -1062,7 +1062,7 @@ "type": "Identifier", "span": { "start": 593, - "end": 597, + "end": 594, "ctxt": 0 }, "value": "x", @@ -1099,7 +1099,7 @@ "type": "Identifier", "span": { "start": 599, - "end": 604, + "end": 600, "ctxt": 0 }, "value": "y", @@ -1286,7 +1286,7 @@ "type": "Identifier", "span": { "start": 632, - "end": 636, + "end": 633, "ctxt": 0 }, "value": "x", @@ -1323,7 +1323,7 @@ "type": "Identifier", "span": { "start": 638, - "end": 643, + "end": 639, "ctxt": 0 }, "value": "y", @@ -1511,7 +1511,7 @@ "type": "Identifier", "span": { "start": 670, - "end": 674, + "end": 671, "ctxt": 0 }, "value": "x", @@ -1557,7 +1557,7 @@ "type": "Identifier", "span": { "start": 676, - "end": 681, + "end": 677, "ctxt": 0 }, "value": "y", @@ -1718,7 +1718,7 @@ "type": "Identifier", "span": { "start": 715, - "end": 719, + "end": 716, "ctxt": 0 }, "value": "x", @@ -1791,7 +1791,7 @@ "type": "Identifier", "span": { "start": 736, - "end": 740, + "end": 737, "ctxt": 0 }, "value": "x", @@ -1864,7 +1864,7 @@ "type": "Identifier", "span": { "start": 766, - "end": 772, + "end": 767, "ctxt": 0 }, "value": "x", @@ -1935,7 +1935,7 @@ "type": "Identifier", "span": { "start": 794, - "end": 814, + "end": 795, "ctxt": 0 }, "value": "x", @@ -2035,7 +2035,7 @@ "type": "Identifier", "span": { "start": 832, - "end": 852, + "end": 833, "ctxt": 0 }, "value": "x", @@ -2135,7 +2135,7 @@ "type": "Identifier", "span": { "start": 879, - "end": 885, + "end": 880, "ctxt": 0 }, "value": "x", @@ -2206,7 +2206,7 @@ "type": "Identifier", "span": { "start": 907, - "end": 927, + "end": 908, "ctxt": 0 }, "value": "x", @@ -2306,7 +2306,7 @@ "type": "Identifier", "span": { "start": 945, - "end": 965, + "end": 946, "ctxt": 0 }, "value": "x", @@ -2406,7 +2406,7 @@ "type": "Identifier", "span": { "start": 992, - "end": 998, + "end": 993, "ctxt": 0 }, "value": "x", @@ -2477,7 +2477,7 @@ "type": "Identifier", "span": { "start": 1019, - "end": 1039, + "end": 1020, "ctxt": 0 }, "value": "x", @@ -2577,7 +2577,7 @@ "type": "Identifier", "span": { "start": 1056, - "end": 1076, + "end": 1057, "ctxt": 0 }, "value": "x", @@ -2677,7 +2677,7 @@ "type": "Identifier", "span": { "start": 1102, - "end": 1108, + "end": 1103, "ctxt": 0 }, "value": "x", @@ -2748,7 +2748,7 @@ "type": "Identifier", "span": { "start": 1129, - "end": 1140, + "end": 1130, "ctxt": 0 }, "value": "x", @@ -2821,7 +2821,7 @@ "type": "Identifier", "span": { "start": 1157, - "end": 1168, + "end": 1158, "ctxt": 0 }, "value": "x", @@ -2894,7 +2894,7 @@ "type": "Identifier", "span": { "start": 1194, - "end": 1200, + "end": 1195, "ctxt": 0 }, "value": "x", @@ -2965,7 +2965,7 @@ "type": "Identifier", "span": { "start": 1221, - "end": 1232, + "end": 1222, "ctxt": 0 }, "value": "x", @@ -3038,7 +3038,7 @@ "type": "Identifier", "span": { "start": 1249, - "end": 1260, + "end": 1250, "ctxt": 0 }, "value": "x", @@ -3111,7 +3111,7 @@ "type": "Identifier", "span": { "start": 1286, - "end": 1292, + "end": 1287, "ctxt": 0 }, "value": "x", @@ -3182,7 +3182,7 @@ "type": "Identifier", "span": { "start": 1313, - "end": 1317, + "end": 1314, "ctxt": 0 }, "value": "x", @@ -3255,7 +3255,7 @@ "type": "Identifier", "span": { "start": 1334, - "end": 1354, + "end": 1335, "ctxt": 0 }, "value": "x", @@ -3355,7 +3355,7 @@ "type": "Identifier", "span": { "start": 1377, - "end": 1383, + "end": 1378, "ctxt": 0 }, "value": "x", @@ -3426,7 +3426,7 @@ "type": "Identifier", "span": { "start": 1405, - "end": 1409, + "end": 1406, "ctxt": 0 }, "value": "x", @@ -3499,7 +3499,7 @@ "type": "Identifier", "span": { "start": 1427, - "end": 1447, + "end": 1428, "ctxt": 0 }, "value": "x", @@ -3599,7 +3599,7 @@ "type": "Identifier", "span": { "start": 1471, - "end": 1477, + "end": 1472, "ctxt": 0 }, "value": "x", @@ -3670,7 +3670,7 @@ "type": "Identifier", "span": { "start": 1498, - "end": 1502, + "end": 1499, "ctxt": 0 }, "value": "x", @@ -3743,7 +3743,7 @@ "type": "Identifier", "span": { "start": 1519, - "end": 1539, + "end": 1520, "ctxt": 0 }, "value": "x", @@ -3843,7 +3843,7 @@ "type": "Identifier", "span": { "start": 1562, - "end": 1568, + "end": 1563, "ctxt": 0 }, "value": "x", @@ -3914,7 +3914,7 @@ "type": "Identifier", "span": { "start": 1589, - "end": 1593, + "end": 1590, "ctxt": 0 }, "value": "x", @@ -3987,7 +3987,7 @@ "type": "Identifier", "span": { "start": 1610, - "end": 1621, + "end": 1611, "ctxt": 0 }, "value": "x", @@ -4060,7 +4060,7 @@ "type": "Identifier", "span": { "start": 1656, - "end": 1662, + "end": 1657, "ctxt": 0 }, "value": "x", @@ -4131,7 +4131,7 @@ "type": "Identifier", "span": { "start": 1683, - "end": 1703, + "end": 1684, "ctxt": 0 }, "value": "x", @@ -4231,7 +4231,7 @@ "type": "Identifier", "span": { "start": 1720, - "end": 1740, + "end": 1721, "ctxt": 0 }, "value": "x", @@ -4331,7 +4331,7 @@ "type": "Identifier", "span": { "start": 1766, - "end": 1772, + "end": 1767, "ctxt": 0 }, "value": "x", @@ -4402,7 +4402,7 @@ "type": "Identifier", "span": { "start": 1793, - "end": 1813, + "end": 1794, "ctxt": 0 }, "value": "x", @@ -4502,7 +4502,7 @@ "type": "Identifier", "span": { "start": 1830, - "end": 1850, + "end": 1831, "ctxt": 0 }, "value": "x", @@ -4602,7 +4602,7 @@ "type": "Identifier", "span": { "start": 1876, - "end": 1882, + "end": 1877, "ctxt": 0 }, "value": "x", @@ -4673,7 +4673,7 @@ "type": "Identifier", "span": { "start": 1904, - "end": 1924, + "end": 1905, "ctxt": 0 }, "value": "x", @@ -4773,7 +4773,7 @@ "type": "Identifier", "span": { "start": 1942, - "end": 1953, + "end": 1943, "ctxt": 0 }, "value": "x", @@ -4846,7 +4846,7 @@ "type": "Identifier", "span": { "start": 1977, - "end": 1983, + "end": 1978, "ctxt": 0 }, "value": "x", @@ -4917,7 +4917,7 @@ "type": "Identifier", "span": { "start": 2005, - "end": 2025, + "end": 2006, "ctxt": 0 }, "value": "x", @@ -5017,7 +5017,7 @@ "type": "Identifier", "span": { "start": 2043, - "end": 2054, + "end": 2044, "ctxt": 0 }, "value": "x", @@ -5090,7 +5090,7 @@ "type": "Identifier", "span": { "start": 2078, - "end": 2084, + "end": 2079, "ctxt": 0 }, "value": "x", @@ -5161,7 +5161,7 @@ "type": "Identifier", "span": { "start": 2106, - "end": 2126, + "end": 2107, "ctxt": 0 }, "value": "x", @@ -5261,7 +5261,7 @@ "type": "Identifier", "span": { "start": 2144, - "end": 2164, + "end": 2145, "ctxt": 0 }, "value": "x", @@ -5361,7 +5361,7 @@ "type": "Identifier", "span": { "start": 2191, - "end": 2197, + "end": 2192, "ctxt": 0 }, "value": "x", @@ -5432,7 +5432,7 @@ "type": "Identifier", "span": { "start": 2220, - "end": 2225, + "end": 2221, "ctxt": 0 }, "value": "x", @@ -5505,7 +5505,7 @@ "type": "Identifier", "span": { "start": 2244, - "end": 2264, + "end": 2245, "ctxt": 0 }, "value": "x", @@ -5605,7 +5605,7 @@ "type": "Identifier", "span": { "start": 2289, - "end": 2295, + "end": 2290, "ctxt": 0 }, "value": "x", @@ -5676,7 +5676,7 @@ "type": "Identifier", "span": { "start": 2317, - "end": 2337, + "end": 2318, "ctxt": 0 }, "value": "x", @@ -5776,7 +5776,7 @@ "type": "Identifier", "span": { "start": 2355, - "end": 2366, + "end": 2356, "ctxt": 0 }, "value": "x", @@ -5849,7 +5849,7 @@ "type": "Identifier", "span": { "start": 2390, - "end": 2396, + "end": 2391, "ctxt": 0 }, "value": "x", @@ -5920,7 +5920,7 @@ "type": "Identifier", "span": { "start": 2418, - "end": 2438, + "end": 2419, "ctxt": 0 }, "value": "x", @@ -6020,7 +6020,7 @@ "type": "Identifier", "span": { "start": 2456, - "end": 2467, + "end": 2457, "ctxt": 0 }, "value": "x", @@ -6093,7 +6093,7 @@ "type": "Identifier", "span": { "start": 2491, - "end": 2497, + "end": 2492, "ctxt": 0 }, "value": "x", @@ -6164,7 +6164,7 @@ "type": "Identifier", "span": { "start": 2519, - "end": 2524, + "end": 2520, "ctxt": 0 }, "value": "x", @@ -6237,7 +6237,7 @@ "type": "Identifier", "span": { "start": 2542, - "end": 2562, + "end": 2543, "ctxt": 0 }, "value": "x", @@ -6337,7 +6337,7 @@ "type": "Identifier", "span": { "start": 2586, - "end": 2592, + "end": 2587, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.json index 8c093f40ed1f..39aa66dcd16a 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 360, - "end": 364, + "end": 361, "ctxt": 0 }, "value": "x", @@ -103,7 +103,7 @@ "type": "Identifier", "span": { "start": 366, - "end": 371, + "end": 367, "ctxt": 0 }, "value": "y", @@ -321,7 +321,7 @@ "type": "Identifier", "span": { "start": 420, - "end": 424, + "end": 421, "ctxt": 0 }, "value": "x", @@ -367,7 +367,7 @@ "type": "Identifier", "span": { "start": 426, - "end": 430, + "end": 427, "ctxt": 0 }, "value": "y", @@ -585,7 +585,7 @@ "type": "Identifier", "span": { "start": 479, - "end": 483, + "end": 480, "ctxt": 0 }, "value": "x", @@ -631,7 +631,7 @@ "type": "Identifier", "span": { "start": 485, - "end": 490, + "end": 486, "ctxt": 0 }, "value": "y", @@ -906,7 +906,7 @@ "type": "Identifier", "span": { "start": 543, - "end": 547, + "end": 544, "ctxt": 0 }, "value": "x", @@ -943,7 +943,7 @@ "type": "Identifier", "span": { "start": 549, - "end": 554, + "end": 550, "ctxt": 0 }, "value": "y", @@ -1062,7 +1062,7 @@ "type": "Identifier", "span": { "start": 592, - "end": 596, + "end": 593, "ctxt": 0 }, "value": "x", @@ -1099,7 +1099,7 @@ "type": "Identifier", "span": { "start": 598, - "end": 602, + "end": 599, "ctxt": 0 }, "value": "y", @@ -1286,7 +1286,7 @@ "type": "Identifier", "span": { "start": 630, - "end": 634, + "end": 631, "ctxt": 0 }, "value": "x", @@ -1323,7 +1323,7 @@ "type": "Identifier", "span": { "start": 636, - "end": 641, + "end": 637, "ctxt": 0 }, "value": "y", @@ -1511,7 +1511,7 @@ "type": "Identifier", "span": { "start": 668, - "end": 672, + "end": 669, "ctxt": 0 }, "value": "x", @@ -1557,7 +1557,7 @@ "type": "Identifier", "span": { "start": 674, - "end": 678, + "end": 675, "ctxt": 0 }, "value": "y", @@ -1718,7 +1718,7 @@ "type": "Identifier", "span": { "start": 712, - "end": 716, + "end": 713, "ctxt": 0 }, "value": "x", @@ -1791,7 +1791,7 @@ "type": "Identifier", "span": { "start": 733, - "end": 737, + "end": 734, "ctxt": 0 }, "value": "x", @@ -1864,7 +1864,7 @@ "type": "Identifier", "span": { "start": 763, - "end": 769, + "end": 764, "ctxt": 0 }, "value": "x", @@ -1935,7 +1935,7 @@ "type": "Identifier", "span": { "start": 791, - "end": 811, + "end": 792, "ctxt": 0 }, "value": "x", @@ -2035,7 +2035,7 @@ "type": "Identifier", "span": { "start": 829, - "end": 849, + "end": 830, "ctxt": 0 }, "value": "x", @@ -2135,7 +2135,7 @@ "type": "Identifier", "span": { "start": 876, - "end": 882, + "end": 877, "ctxt": 0 }, "value": "x", @@ -2206,7 +2206,7 @@ "type": "Identifier", "span": { "start": 904, - "end": 924, + "end": 905, "ctxt": 0 }, "value": "x", @@ -2306,7 +2306,7 @@ "type": "Identifier", "span": { "start": 942, - "end": 962, + "end": 943, "ctxt": 0 }, "value": "x", @@ -2406,7 +2406,7 @@ "type": "Identifier", "span": { "start": 989, - "end": 995, + "end": 990, "ctxt": 0 }, "value": "x", @@ -2477,7 +2477,7 @@ "type": "Identifier", "span": { "start": 1016, - "end": 1036, + "end": 1017, "ctxt": 0 }, "value": "x", @@ -2577,7 +2577,7 @@ "type": "Identifier", "span": { "start": 1053, - "end": 1073, + "end": 1054, "ctxt": 0 }, "value": "x", @@ -2677,7 +2677,7 @@ "type": "Identifier", "span": { "start": 1099, - "end": 1105, + "end": 1100, "ctxt": 0 }, "value": "x", @@ -2748,7 +2748,7 @@ "type": "Identifier", "span": { "start": 1126, - "end": 1137, + "end": 1127, "ctxt": 0 }, "value": "x", @@ -2821,7 +2821,7 @@ "type": "Identifier", "span": { "start": 1154, - "end": 1165, + "end": 1155, "ctxt": 0 }, "value": "x", @@ -2894,7 +2894,7 @@ "type": "Identifier", "span": { "start": 1191, - "end": 1197, + "end": 1192, "ctxt": 0 }, "value": "x", @@ -2965,7 +2965,7 @@ "type": "Identifier", "span": { "start": 1218, - "end": 1229, + "end": 1219, "ctxt": 0 }, "value": "x", @@ -3038,7 +3038,7 @@ "type": "Identifier", "span": { "start": 1246, - "end": 1257, + "end": 1247, "ctxt": 0 }, "value": "x", @@ -3111,7 +3111,7 @@ "type": "Identifier", "span": { "start": 1283, - "end": 1289, + "end": 1284, "ctxt": 0 }, "value": "x", @@ -3182,7 +3182,7 @@ "type": "Identifier", "span": { "start": 1310, - "end": 1314, + "end": 1311, "ctxt": 0 }, "value": "x", @@ -3255,7 +3255,7 @@ "type": "Identifier", "span": { "start": 1331, - "end": 1351, + "end": 1332, "ctxt": 0 }, "value": "x", @@ -3355,7 +3355,7 @@ "type": "Identifier", "span": { "start": 1374, - "end": 1380, + "end": 1375, "ctxt": 0 }, "value": "x", @@ -3426,7 +3426,7 @@ "type": "Identifier", "span": { "start": 1402, - "end": 1406, + "end": 1403, "ctxt": 0 }, "value": "x", @@ -3499,7 +3499,7 @@ "type": "Identifier", "span": { "start": 1424, - "end": 1444, + "end": 1425, "ctxt": 0 }, "value": "x", @@ -3599,7 +3599,7 @@ "type": "Identifier", "span": { "start": 1468, - "end": 1474, + "end": 1469, "ctxt": 0 }, "value": "x", @@ -3670,7 +3670,7 @@ "type": "Identifier", "span": { "start": 1495, - "end": 1499, + "end": 1496, "ctxt": 0 }, "value": "x", @@ -3743,7 +3743,7 @@ "type": "Identifier", "span": { "start": 1516, - "end": 1536, + "end": 1517, "ctxt": 0 }, "value": "x", @@ -3843,7 +3843,7 @@ "type": "Identifier", "span": { "start": 1559, - "end": 1565, + "end": 1560, "ctxt": 0 }, "value": "x", @@ -3914,7 +3914,7 @@ "type": "Identifier", "span": { "start": 1586, - "end": 1590, + "end": 1587, "ctxt": 0 }, "value": "x", @@ -3987,7 +3987,7 @@ "type": "Identifier", "span": { "start": 1607, - "end": 1618, + "end": 1608, "ctxt": 0 }, "value": "x", @@ -4060,7 +4060,7 @@ "type": "Identifier", "span": { "start": 1653, - "end": 1659, + "end": 1654, "ctxt": 0 }, "value": "x", @@ -4131,7 +4131,7 @@ "type": "Identifier", "span": { "start": 1680, - "end": 1700, + "end": 1681, "ctxt": 0 }, "value": "x", @@ -4231,7 +4231,7 @@ "type": "Identifier", "span": { "start": 1717, - "end": 1737, + "end": 1718, "ctxt": 0 }, "value": "x", @@ -4331,7 +4331,7 @@ "type": "Identifier", "span": { "start": 1760, - "end": 1766, + "end": 1761, "ctxt": 0 }, "value": "x", @@ -4402,7 +4402,7 @@ "type": "Identifier", "span": { "start": 1787, - "end": 1807, + "end": 1788, "ctxt": 0 }, "value": "x", @@ -4502,7 +4502,7 @@ "type": "Identifier", "span": { "start": 1824, - "end": 1844, + "end": 1825, "ctxt": 0 }, "value": "x", @@ -4602,7 +4602,7 @@ "type": "Identifier", "span": { "start": 1867, - "end": 1873, + "end": 1868, "ctxt": 0 }, "value": "x", @@ -4673,7 +4673,7 @@ "type": "Identifier", "span": { "start": 1895, - "end": 1915, + "end": 1896, "ctxt": 0 }, "value": "x", @@ -4773,7 +4773,7 @@ "type": "Identifier", "span": { "start": 1933, - "end": 1944, + "end": 1934, "ctxt": 0 }, "value": "x", @@ -4846,7 +4846,7 @@ "type": "Identifier", "span": { "start": 1968, - "end": 1974, + "end": 1969, "ctxt": 0 }, "value": "x", @@ -4917,7 +4917,7 @@ "type": "Identifier", "span": { "start": 1996, - "end": 2016, + "end": 1997, "ctxt": 0 }, "value": "x", @@ -5017,7 +5017,7 @@ "type": "Identifier", "span": { "start": 2034, - "end": 2045, + "end": 2035, "ctxt": 0 }, "value": "x", @@ -5090,7 +5090,7 @@ "type": "Identifier", "span": { "start": 2069, - "end": 2075, + "end": 2070, "ctxt": 0 }, "value": "x", @@ -5161,7 +5161,7 @@ "type": "Identifier", "span": { "start": 2097, - "end": 2117, + "end": 2098, "ctxt": 0 }, "value": "x", @@ -5261,7 +5261,7 @@ "type": "Identifier", "span": { "start": 2135, - "end": 2155, + "end": 2136, "ctxt": 0 }, "value": "x", @@ -5361,7 +5361,7 @@ "type": "Identifier", "span": { "start": 2182, - "end": 2188, + "end": 2183, "ctxt": 0 }, "value": "x", @@ -5432,7 +5432,7 @@ "type": "Identifier", "span": { "start": 2211, - "end": 2216, + "end": 2212, "ctxt": 0 }, "value": "x", @@ -5505,7 +5505,7 @@ "type": "Identifier", "span": { "start": 2235, - "end": 2255, + "end": 2236, "ctxt": 0 }, "value": "x", @@ -5605,7 +5605,7 @@ "type": "Identifier", "span": { "start": 2280, - "end": 2286, + "end": 2281, "ctxt": 0 }, "value": "x", @@ -5676,7 +5676,7 @@ "type": "Identifier", "span": { "start": 2308, - "end": 2328, + "end": 2309, "ctxt": 0 }, "value": "x", @@ -5776,7 +5776,7 @@ "type": "Identifier", "span": { "start": 2346, - "end": 2357, + "end": 2347, "ctxt": 0 }, "value": "x", @@ -5849,7 +5849,7 @@ "type": "Identifier", "span": { "start": 2381, - "end": 2387, + "end": 2382, "ctxt": 0 }, "value": "x", @@ -5920,7 +5920,7 @@ "type": "Identifier", "span": { "start": 2409, - "end": 2429, + "end": 2410, "ctxt": 0 }, "value": "x", @@ -6020,7 +6020,7 @@ "type": "Identifier", "span": { "start": 2447, - "end": 2458, + "end": 2448, "ctxt": 0 }, "value": "x", @@ -6093,7 +6093,7 @@ "type": "Identifier", "span": { "start": 2482, - "end": 2488, + "end": 2483, "ctxt": 0 }, "value": "x", @@ -6164,7 +6164,7 @@ "type": "Identifier", "span": { "start": 2510, - "end": 2515, + "end": 2511, "ctxt": 0 }, "value": "x", @@ -6237,7 +6237,7 @@ "type": "Identifier", "span": { "start": 2533, - "end": 2553, + "end": 2534, "ctxt": 0 }, "value": "x", @@ -6337,7 +6337,7 @@ "type": "Identifier", "span": { "start": 2577, - "end": 2583, + "end": 2578, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.json index c5ed083f6018..15d44251d3ee 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 387, - "end": 391, + "end": 388, "ctxt": 0 }, "value": "x", @@ -245,7 +245,7 @@ "type": "Identifier", "span": { "start": 457, - "end": 461, + "end": 458, "ctxt": 0 }, "value": "x", @@ -456,7 +456,7 @@ "type": "Identifier", "span": { "start": 523, - "end": 527, + "end": 524, "ctxt": 0 }, "value": "x", @@ -552,7 +552,7 @@ "type": "Identifier", "span": { "start": 583, - "end": 587, + "end": 584, "ctxt": 0 }, "value": "x", @@ -711,7 +711,7 @@ "type": "Identifier", "span": { "start": 639, - "end": 643, + "end": 640, "ctxt": 0 }, "value": "x", @@ -902,7 +902,7 @@ "type": "Identifier", "span": { "start": 687, - "end": 691, + "end": 688, "ctxt": 0 }, "value": "x", @@ -1058,7 +1058,7 @@ "type": "Identifier", "span": { "start": 777, - "end": 796, + "end": 778, "ctxt": 0 }, "value": "x", @@ -1177,7 +1177,7 @@ "type": "Identifier", "span": { "start": 814, - "end": 833, + "end": 815, "ctxt": 0 }, "value": "x", @@ -1296,7 +1296,7 @@ "type": "Identifier", "span": { "start": 860, - "end": 866, + "end": 861, "ctxt": 0 }, "value": "x", @@ -1367,7 +1367,7 @@ "type": "Identifier", "span": { "start": 888, - "end": 900, + "end": 889, "ctxt": 0 }, "value": "x", @@ -1468,7 +1468,7 @@ "type": "Identifier", "span": { "start": 918, - "end": 930, + "end": 919, "ctxt": 0 }, "value": "x", @@ -1569,7 +1569,7 @@ "type": "Identifier", "span": { "start": 957, - "end": 963, + "end": 958, "ctxt": 0 }, "value": "x", @@ -1640,7 +1640,7 @@ "type": "Identifier", "span": { "start": 984, - "end": 996, + "end": 985, "ctxt": 0 }, "value": "x", @@ -1741,7 +1741,7 @@ "type": "Identifier", "span": { "start": 1013, - "end": 1025, + "end": 1014, "ctxt": 0 }, "value": "x", @@ -1842,7 +1842,7 @@ "type": "Identifier", "span": { "start": 1051, - "end": 1057, + "end": 1052, "ctxt": 0 }, "value": "x", @@ -1913,7 +1913,7 @@ "type": "Identifier", "span": { "start": 1078, - "end": 1089, + "end": 1079, "ctxt": 0 }, "value": "x", @@ -1986,7 +1986,7 @@ "type": "Identifier", "span": { "start": 1106, - "end": 1117, + "end": 1107, "ctxt": 0 }, "value": "x", @@ -2059,7 +2059,7 @@ "type": "Identifier", "span": { "start": 1143, - "end": 1149, + "end": 1144, "ctxt": 0 }, "value": "x", @@ -2130,7 +2130,7 @@ "type": "Identifier", "span": { "start": 1170, - "end": 1181, + "end": 1171, "ctxt": 0 }, "value": "x", @@ -2203,7 +2203,7 @@ "type": "Identifier", "span": { "start": 1198, - "end": 1209, + "end": 1199, "ctxt": 0 }, "value": "x", @@ -2276,7 +2276,7 @@ "type": "Identifier", "span": { "start": 1235, - "end": 1241, + "end": 1236, "ctxt": 0 }, "value": "x", @@ -2347,7 +2347,7 @@ "type": "Identifier", "span": { "start": 1262, - "end": 1281, + "end": 1263, "ctxt": 0 }, "value": "x", @@ -2466,7 +2466,7 @@ "type": "Identifier", "span": { "start": 1298, - "end": 1310, + "end": 1299, "ctxt": 0 }, "value": "x", @@ -2567,7 +2567,7 @@ "type": "Identifier", "span": { "start": 1333, - "end": 1339, + "end": 1334, "ctxt": 0 }, "value": "x", @@ -2638,7 +2638,7 @@ "type": "Identifier", "span": { "start": 1360, - "end": 1379, + "end": 1361, "ctxt": 0 }, "value": "x", @@ -2757,7 +2757,7 @@ "type": "Identifier", "span": { "start": 1396, - "end": 1408, + "end": 1397, "ctxt": 0 }, "value": "x", @@ -2858,7 +2858,7 @@ "type": "Identifier", "span": { "start": 1464, - "end": 1470, + "end": 1465, "ctxt": 0 }, "value": "x", @@ -2929,7 +2929,7 @@ "type": "Identifier", "span": { "start": 1492, - "end": 1511, + "end": 1493, "ctxt": 0 }, "value": "x", @@ -3048,7 +3048,7 @@ "type": "Identifier", "span": { "start": 1529, - "end": 1540, + "end": 1530, "ctxt": 0 }, "value": "x", @@ -3121,7 +3121,7 @@ "type": "Identifier", "span": { "start": 1564, - "end": 1570, + "end": 1565, "ctxt": 0 }, "value": "x", @@ -3192,7 +3192,7 @@ "type": "Identifier", "span": { "start": 1592, - "end": 1611, + "end": 1593, "ctxt": 0 }, "value": "x", @@ -3311,7 +3311,7 @@ "type": "Identifier", "span": { "start": 1629, - "end": 1640, + "end": 1630, "ctxt": 0 }, "value": "x", @@ -3384,7 +3384,7 @@ "type": "Identifier", "span": { "start": 1664, - "end": 1670, + "end": 1665, "ctxt": 0 }, "value": "x", @@ -3455,7 +3455,7 @@ "type": "Identifier", "span": { "start": 1692, - "end": 1704, + "end": 1693, "ctxt": 0 }, "value": "x", @@ -3556,7 +3556,7 @@ "type": "Identifier", "span": { "start": 1722, - "end": 1734, + "end": 1723, "ctxt": 0 }, "value": "x", @@ -3657,7 +3657,7 @@ "type": "Identifier", "span": { "start": 1758, - "end": 1764, + "end": 1759, "ctxt": 0 }, "value": "x", @@ -3728,7 +3728,7 @@ "type": "Identifier", "span": { "start": 1787, - "end": 1792, + "end": 1788, "ctxt": 0 }, "value": "x", @@ -3801,7 +3801,7 @@ "type": "Identifier", "span": { "start": 1811, - "end": 1823, + "end": 1812, "ctxt": 0 }, "value": "x", @@ -3902,7 +3902,7 @@ "type": "Identifier", "span": { "start": 1848, - "end": 1854, + "end": 1849, "ctxt": 0 }, "value": "x", @@ -3973,7 +3973,7 @@ "type": "Identifier", "span": { "start": 1876, - "end": 1888, + "end": 1877, "ctxt": 0 }, "value": "x", @@ -4074,7 +4074,7 @@ "type": "Identifier", "span": { "start": 1906, - "end": 1917, + "end": 1907, "ctxt": 0 }, "value": "x", @@ -4147,7 +4147,7 @@ "type": "Identifier", "span": { "start": 1941, - "end": 1947, + "end": 1942, "ctxt": 0 }, "value": "x", @@ -4218,7 +4218,7 @@ "type": "Identifier", "span": { "start": 1969, - "end": 1981, + "end": 1970, "ctxt": 0 }, "value": "x", @@ -4319,7 +4319,7 @@ "type": "Identifier", "span": { "start": 1999, - "end": 2010, + "end": 2000, "ctxt": 0 }, "value": "x", @@ -4392,7 +4392,7 @@ "type": "Identifier", "span": { "start": 2034, - "end": 2040, + "end": 2035, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.json index 715e6b222872..776633c8e6a6 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 400, - "end": 404, + "end": 401, "ctxt": 0 }, "value": "x", @@ -102,7 +102,7 @@ "type": "Identifier", "span": { "start": 406, - "end": 410, + "end": 407, "ctxt": 0 }, "value": "y", @@ -332,7 +332,7 @@ "type": "Identifier", "span": { "start": 489, - "end": 493, + "end": 490, "ctxt": 0 }, "value": "x", @@ -378,7 +378,7 @@ "type": "Identifier", "span": { "start": 495, - "end": 499, + "end": 496, "ctxt": 0 }, "value": "y", @@ -590,7 +590,7 @@ "type": "Identifier", "span": { "start": 578, - "end": 582, + "end": 579, "ctxt": 0 }, "value": "x", @@ -636,7 +636,7 @@ "type": "Identifier", "span": { "start": 584, - "end": 588, + "end": 585, "ctxt": 0 }, "value": "y", @@ -929,7 +929,7 @@ "type": "Identifier", "span": { "start": 663, - "end": 667, + "end": 664, "ctxt": 0 }, "value": "x", @@ -966,7 +966,7 @@ "type": "Identifier", "span": { "start": 669, - "end": 673, + "end": 670, "ctxt": 0 }, "value": "y", @@ -1062,7 +1062,7 @@ "type": "Identifier", "span": { "start": 742, - "end": 746, + "end": 743, "ctxt": 0 }, "value": "x", @@ -1099,7 +1099,7 @@ "type": "Identifier", "span": { "start": 748, - "end": 752, + "end": 749, "ctxt": 0 }, "value": "y", @@ -1299,7 +1299,7 @@ "type": "Identifier", "span": { "start": 817, - "end": 821, + "end": 818, "ctxt": 0 }, "value": "x", @@ -1336,7 +1336,7 @@ "type": "Identifier", "span": { "start": 823, - "end": 827, + "end": 824, "ctxt": 0 }, "value": "y", @@ -1568,7 +1568,7 @@ "type": "Identifier", "span": { "start": 884, - "end": 888, + "end": 885, "ctxt": 0 }, "value": "x", @@ -1614,7 +1614,7 @@ "type": "Identifier", "span": { "start": 890, - "end": 894, + "end": 891, "ctxt": 0 }, "value": "y", @@ -1811,7 +1811,7 @@ "type": "Identifier", "span": { "start": 980, - "end": 1014, + "end": 981, "ctxt": 0 }, "value": "x", @@ -1967,7 +1967,7 @@ "type": "Identifier", "span": { "start": 1032, - "end": 1066, + "end": 1033, "ctxt": 0 }, "value": "x", @@ -2123,7 +2123,7 @@ "type": "Identifier", "span": { "start": 1093, - "end": 1099, + "end": 1094, "ctxt": 0 }, "value": "x", @@ -2194,7 +2194,7 @@ "type": "Identifier", "span": { "start": 1121, - "end": 1141, + "end": 1122, "ctxt": 0 }, "value": "x", @@ -2314,7 +2314,7 @@ "type": "Identifier", "span": { "start": 1159, - "end": 1179, + "end": 1160, "ctxt": 0 }, "value": "x", @@ -2434,7 +2434,7 @@ "type": "Identifier", "span": { "start": 1206, - "end": 1212, + "end": 1207, "ctxt": 0 }, "value": "x", @@ -2505,7 +2505,7 @@ "type": "Identifier", "span": { "start": 1233, - "end": 1253, + "end": 1234, "ctxt": 0 }, "value": "x", @@ -2625,7 +2625,7 @@ "type": "Identifier", "span": { "start": 1270, - "end": 1290, + "end": 1271, "ctxt": 0 }, "value": "x", @@ -2745,7 +2745,7 @@ "type": "Identifier", "span": { "start": 1316, - "end": 1322, + "end": 1317, "ctxt": 0 }, "value": "x", @@ -2816,7 +2816,7 @@ "type": "Identifier", "span": { "start": 1343, - "end": 1354, + "end": 1344, "ctxt": 0 }, "value": "x", @@ -2889,7 +2889,7 @@ "type": "Identifier", "span": { "start": 1371, - "end": 1382, + "end": 1372, "ctxt": 0 }, "value": "x", @@ -2962,7 +2962,7 @@ "type": "Identifier", "span": { "start": 1408, - "end": 1414, + "end": 1409, "ctxt": 0 }, "value": "x", @@ -3033,7 +3033,7 @@ "type": "Identifier", "span": { "start": 1435, - "end": 1446, + "end": 1436, "ctxt": 0 }, "value": "x", @@ -3106,7 +3106,7 @@ "type": "Identifier", "span": { "start": 1463, - "end": 1474, + "end": 1464, "ctxt": 0 }, "value": "x", @@ -3179,7 +3179,7 @@ "type": "Identifier", "span": { "start": 1500, - "end": 1506, + "end": 1501, "ctxt": 0 }, "value": "x", @@ -3250,7 +3250,7 @@ "type": "Identifier", "span": { "start": 1528, - "end": 1548, + "end": 1529, "ctxt": 0 }, "value": "x", @@ -3370,7 +3370,7 @@ "type": "Identifier", "span": { "start": 1566, - "end": 1586, + "end": 1567, "ctxt": 0 }, "value": "x", @@ -3490,7 +3490,7 @@ "type": "Identifier", "span": { "start": 1610, - "end": 1616, + "end": 1611, "ctxt": 0 }, "value": "x", @@ -3561,7 +3561,7 @@ "type": "Identifier", "span": { "start": 1638, - "end": 1658, + "end": 1639, "ctxt": 0 }, "value": "x", @@ -3681,7 +3681,7 @@ "type": "Identifier", "span": { "start": 1676, - "end": 1693, + "end": 1677, "ctxt": 0 }, "value": "x", @@ -3791,7 +3791,7 @@ "type": "Identifier", "span": { "start": 1717, - "end": 1723, + "end": 1718, "ctxt": 0 }, "value": "x", @@ -3862,7 +3862,7 @@ "type": "Identifier", "span": { "start": 1744, - "end": 1778, + "end": 1745, "ctxt": 0 }, "value": "x", @@ -4018,7 +4018,7 @@ "type": "Identifier", "span": { "start": 1795, - "end": 1815, + "end": 1796, "ctxt": 0 }, "value": "x", @@ -4138,7 +4138,7 @@ "type": "Identifier", "span": { "start": 1838, - "end": 1844, + "end": 1839, "ctxt": 0 }, "value": "x", @@ -4209,7 +4209,7 @@ "type": "Identifier", "span": { "start": 1865, - "end": 1899, + "end": 1866, "ctxt": 0 }, "value": "x", @@ -4365,7 +4365,7 @@ "type": "Identifier", "span": { "start": 1916, - "end": 1936, + "end": 1917, "ctxt": 0 }, "value": "x", @@ -4485,7 +4485,7 @@ "type": "Identifier", "span": { "start": 1992, - "end": 1998, + "end": 1993, "ctxt": 0 }, "value": "x", @@ -4556,7 +4556,7 @@ "type": "Identifier", "span": { "start": 2020, - "end": 2054, + "end": 2021, "ctxt": 0 }, "value": "x", @@ -4712,7 +4712,7 @@ "type": "Identifier", "span": { "start": 2072, - "end": 2083, + "end": 2073, "ctxt": 0 }, "value": "x", @@ -4785,7 +4785,7 @@ "type": "Identifier", "span": { "start": 2107, - "end": 2113, + "end": 2108, "ctxt": 0 }, "value": "x", @@ -4856,7 +4856,7 @@ "type": "Identifier", "span": { "start": 2135, - "end": 2169, + "end": 2136, "ctxt": 0 }, "value": "x", @@ -5012,7 +5012,7 @@ "type": "Identifier", "span": { "start": 2187, - "end": 2198, + "end": 2188, "ctxt": 0 }, "value": "x", @@ -5085,7 +5085,7 @@ "type": "Identifier", "span": { "start": 2222, - "end": 2228, + "end": 2223, "ctxt": 0 }, "value": "x", @@ -5156,7 +5156,7 @@ "type": "Identifier", "span": { "start": 2250, - "end": 2270, + "end": 2251, "ctxt": 0 }, "value": "x", @@ -5276,7 +5276,7 @@ "type": "Identifier", "span": { "start": 2288, - "end": 2308, + "end": 2289, "ctxt": 0 }, "value": "x", @@ -5396,7 +5396,7 @@ "type": "Identifier", "span": { "start": 2332, - "end": 2338, + "end": 2333, "ctxt": 0 }, "value": "x", @@ -5467,7 +5467,7 @@ "type": "Identifier", "span": { "start": 2361, - "end": 2366, + "end": 2362, "ctxt": 0 }, "value": "x", @@ -5540,7 +5540,7 @@ "type": "Identifier", "span": { "start": 2385, - "end": 2405, + "end": 2386, "ctxt": 0 }, "value": "x", @@ -5660,7 +5660,7 @@ "type": "Identifier", "span": { "start": 2430, - "end": 2436, + "end": 2431, "ctxt": 0 }, "value": "x", @@ -5731,7 +5731,7 @@ "type": "Identifier", "span": { "start": 2458, - "end": 2478, + "end": 2459, "ctxt": 0 }, "value": "x", @@ -5851,7 +5851,7 @@ "type": "Identifier", "span": { "start": 2496, - "end": 2507, + "end": 2497, "ctxt": 0 }, "value": "x", @@ -5924,7 +5924,7 @@ "type": "Identifier", "span": { "start": 2531, - "end": 2537, + "end": 2532, "ctxt": 0 }, "value": "x", @@ -5995,7 +5995,7 @@ "type": "Identifier", "span": { "start": 2559, - "end": 2579, + "end": 2560, "ctxt": 0 }, "value": "x", @@ -6115,7 +6115,7 @@ "type": "Identifier", "span": { "start": 2597, - "end": 2608, + "end": 2598, "ctxt": 0 }, "value": "x", @@ -6188,7 +6188,7 @@ "type": "Identifier", "span": { "start": 2632, - "end": 2638, + "end": 2633, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.json index 1e5b83be4c5a..2d9eaf4179ea 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.json @@ -633,7 +633,7 @@ "type": "Identifier", "span": { "start": 578, - "end": 582, + "end": 579, "ctxt": 0 }, "value": "x", @@ -679,7 +679,7 @@ "type": "Identifier", "span": { "start": 584, - "end": 588, + "end": 585, "ctxt": 0 }, "value": "y", @@ -891,7 +891,7 @@ "type": "Identifier", "span": { "start": 666, - "end": 670, + "end": 667, "ctxt": 0 }, "value": "x", @@ -937,7 +937,7 @@ "type": "Identifier", "span": { "start": 672, - "end": 676, + "end": 673, "ctxt": 0 }, "value": "y", @@ -1149,7 +1149,7 @@ "type": "Identifier", "span": { "start": 761, - "end": 765, + "end": 762, "ctxt": 0 }, "value": "x", @@ -1195,7 +1195,7 @@ "type": "Identifier", "span": { "start": 767, - "end": 771, + "end": 768, "ctxt": 0 }, "value": "y", @@ -1524,7 +1524,7 @@ "type": "Identifier", "span": { "start": 852, - "end": 856, + "end": 853, "ctxt": 0 }, "value": "x", @@ -1561,7 +1561,7 @@ "type": "Identifier", "span": { "start": 858, - "end": 862, + "end": 859, "ctxt": 0 }, "value": "y", @@ -1657,7 +1657,7 @@ "type": "Identifier", "span": { "start": 943, - "end": 947, + "end": 944, "ctxt": 0 }, "value": "x", @@ -1694,7 +1694,7 @@ "type": "Identifier", "span": { "start": 949, - "end": 953, + "end": 950, "ctxt": 0 }, "value": "y", @@ -1921,7 +1921,7 @@ "type": "Identifier", "span": { "start": 1008, - "end": 1012, + "end": 1009, "ctxt": 0 }, "value": "x", @@ -1958,7 +1958,7 @@ "type": "Identifier", "span": { "start": 1014, - "end": 1018, + "end": 1015, "ctxt": 0 }, "value": "y", @@ -2172,7 +2172,7 @@ "type": "Identifier", "span": { "start": 1072, - "end": 1076, + "end": 1073, "ctxt": 0 }, "value": "x", @@ -2218,7 +2218,7 @@ "type": "Identifier", "span": { "start": 1078, - "end": 1082, + "end": 1079, "ctxt": 0 }, "value": "y", @@ -2415,7 +2415,7 @@ "type": "Identifier", "span": { "start": 1168, - "end": 1182, + "end": 1169, "ctxt": 0 }, "value": "x", @@ -2535,7 +2535,7 @@ "type": "Identifier", "span": { "start": 1200, - "end": 1214, + "end": 1201, "ctxt": 0 }, "value": "x", @@ -2655,7 +2655,7 @@ "type": "Identifier", "span": { "start": 1241, - "end": 1247, + "end": 1242, "ctxt": 0 }, "value": "x", @@ -2726,7 +2726,7 @@ "type": "Identifier", "span": { "start": 1269, - "end": 1287, + "end": 1270, "ctxt": 0 }, "value": "x", @@ -2846,7 +2846,7 @@ "type": "Identifier", "span": { "start": 1305, - "end": 1323, + "end": 1306, "ctxt": 0 }, "value": "x", @@ -2966,7 +2966,7 @@ "type": "Identifier", "span": { "start": 1350, - "end": 1356, + "end": 1351, "ctxt": 0 }, "value": "x", @@ -3037,7 +3037,7 @@ "type": "Identifier", "span": { "start": 1377, - "end": 1409, + "end": 1378, "ctxt": 0 }, "value": "x", @@ -3193,7 +3193,7 @@ "type": "Identifier", "span": { "start": 1426, - "end": 1458, + "end": 1427, "ctxt": 0 }, "value": "x", @@ -3349,7 +3349,7 @@ "type": "Identifier", "span": { "start": 1484, - "end": 1490, + "end": 1485, "ctxt": 0 }, "value": "x", @@ -3420,7 +3420,7 @@ "type": "Identifier", "span": { "start": 1511, - "end": 1522, + "end": 1512, "ctxt": 0 }, "value": "x", @@ -3493,7 +3493,7 @@ "type": "Identifier", "span": { "start": 1539, - "end": 1550, + "end": 1540, "ctxt": 0 }, "value": "x", @@ -3566,7 +3566,7 @@ "type": "Identifier", "span": { "start": 1576, - "end": 1582, + "end": 1577, "ctxt": 0 }, "value": "x", @@ -3637,7 +3637,7 @@ "type": "Identifier", "span": { "start": 1603, - "end": 1614, + "end": 1604, "ctxt": 0 }, "value": "x", @@ -3710,7 +3710,7 @@ "type": "Identifier", "span": { "start": 1631, - "end": 1642, + "end": 1632, "ctxt": 0 }, "value": "x", @@ -3783,7 +3783,7 @@ "type": "Identifier", "span": { "start": 1668, - "end": 1674, + "end": 1669, "ctxt": 0 }, "value": "x", @@ -3854,7 +3854,7 @@ "type": "Identifier", "span": { "start": 1696, - "end": 1714, + "end": 1697, "ctxt": 0 }, "value": "x", @@ -3974,7 +3974,7 @@ "type": "Identifier", "span": { "start": 1732, - "end": 1764, + "end": 1733, "ctxt": 0 }, "value": "x", @@ -4130,7 +4130,7 @@ "type": "Identifier", "span": { "start": 1791, - "end": 1797, + "end": 1792, "ctxt": 0 }, "value": "x", @@ -4201,7 +4201,7 @@ "type": "Identifier", "span": { "start": 1819, - "end": 1837, + "end": 1820, "ctxt": 0 }, "value": "x", @@ -4321,7 +4321,7 @@ "type": "Identifier", "span": { "start": 1855, - "end": 1887, + "end": 1856, "ctxt": 0 }, "value": "x", @@ -4477,7 +4477,7 @@ "type": "Identifier", "span": { "start": 1914, - "end": 1920, + "end": 1915, "ctxt": 0 }, "value": "x", @@ -4548,7 +4548,7 @@ "type": "Identifier", "span": { "start": 1941, - "end": 1955, + "end": 1942, "ctxt": 0 }, "value": "x", @@ -4668,7 +4668,7 @@ "type": "Identifier", "span": { "start": 1972, - "end": 2004, + "end": 1973, "ctxt": 0 }, "value": "x", @@ -4824,7 +4824,7 @@ "type": "Identifier", "span": { "start": 2030, - "end": 2036, + "end": 2031, "ctxt": 0 }, "value": "x", @@ -4895,7 +4895,7 @@ "type": "Identifier", "span": { "start": 2057, - "end": 2071, + "end": 2058, "ctxt": 0 }, "value": "x", @@ -5015,7 +5015,7 @@ "type": "Identifier", "span": { "start": 2088, - "end": 2106, + "end": 2089, "ctxt": 0 }, "value": "x", @@ -5135,7 +5135,7 @@ "type": "Identifier", "span": { "start": 2132, - "end": 2138, + "end": 2133, "ctxt": 0 }, "value": "x", @@ -5206,7 +5206,7 @@ "type": "Identifier", "span": { "start": 2160, - "end": 2174, + "end": 2161, "ctxt": 0 }, "value": "x", @@ -5326,7 +5326,7 @@ "type": "Identifier", "span": { "start": 2192, - "end": 2203, + "end": 2193, "ctxt": 0 }, "value": "x", @@ -5399,7 +5399,7 @@ "type": "Identifier", "span": { "start": 2227, - "end": 2233, + "end": 2228, "ctxt": 0 }, "value": "x", @@ -5470,7 +5470,7 @@ "type": "Identifier", "span": { "start": 2255, - "end": 2269, + "end": 2256, "ctxt": 0 }, "value": "x", @@ -5590,7 +5590,7 @@ "type": "Identifier", "span": { "start": 2287, - "end": 2298, + "end": 2288, "ctxt": 0 }, "value": "x", @@ -5663,7 +5663,7 @@ "type": "Identifier", "span": { "start": 2322, - "end": 2328, + "end": 2323, "ctxt": 0 }, "value": "x", @@ -5734,7 +5734,7 @@ "type": "Identifier", "span": { "start": 2350, - "end": 2382, + "end": 2351, "ctxt": 0 }, "value": "x", @@ -5890,7 +5890,7 @@ "type": "Identifier", "span": { "start": 2400, - "end": 2418, + "end": 2401, "ctxt": 0 }, "value": "x", @@ -6010,7 +6010,7 @@ "type": "Identifier", "span": { "start": 2442, - "end": 2448, + "end": 2443, "ctxt": 0 }, "value": "x", @@ -6081,7 +6081,7 @@ "type": "Identifier", "span": { "start": 2471, - "end": 2476, + "end": 2472, "ctxt": 0 }, "value": "x", @@ -6154,7 +6154,7 @@ "type": "Identifier", "span": { "start": 2495, - "end": 2513, + "end": 2496, "ctxt": 0 }, "value": "x", @@ -6274,7 +6274,7 @@ "type": "Identifier", "span": { "start": 2538, - "end": 2544, + "end": 2539, "ctxt": 0 }, "value": "x", @@ -6345,7 +6345,7 @@ "type": "Identifier", "span": { "start": 2566, - "end": 2598, + "end": 2567, "ctxt": 0 }, "value": "x", @@ -6501,7 +6501,7 @@ "type": "Identifier", "span": { "start": 2616, - "end": 2627, + "end": 2617, "ctxt": 0 }, "value": "x", @@ -6574,7 +6574,7 @@ "type": "Identifier", "span": { "start": 2651, - "end": 2657, + "end": 2652, "ctxt": 0 }, "value": "x", @@ -6645,7 +6645,7 @@ "type": "Identifier", "span": { "start": 2679, - "end": 2711, + "end": 2680, "ctxt": 0 }, "value": "x", @@ -6801,7 +6801,7 @@ "type": "Identifier", "span": { "start": 2729, - "end": 2740, + "end": 2730, "ctxt": 0 }, "value": "x", @@ -6874,7 +6874,7 @@ "type": "Identifier", "span": { "start": 2764, - "end": 2770, + "end": 2765, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.json index b718d1fcc24f..4756ab4846af 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 365, - "end": 369, + "end": 366, "ctxt": 0 }, "value": "x", @@ -209,7 +209,7 @@ "type": "Identifier", "span": { "start": 420, - "end": 424, + "end": 421, "ctxt": 0 }, "value": "x", @@ -384,7 +384,7 @@ "type": "Identifier", "span": { "start": 471, - "end": 475, + "end": 472, "ctxt": 0 }, "value": "x", @@ -490,7 +490,7 @@ "type": "Identifier", "span": { "start": 513, - "end": 517, + "end": 514, "ctxt": 0 }, "value": "x", @@ -641,7 +641,7 @@ "type": "Identifier", "span": { "start": 547, - "end": 551, + "end": 548, "ctxt": 0 }, "value": "x", @@ -806,7 +806,7 @@ "type": "Identifier", "span": { "start": 575, - "end": 579, + "end": 576, "ctxt": 0 }, "value": "x", @@ -968,7 +968,7 @@ "type": "Identifier", "span": { "start": 670, - "end": 682, + "end": 671, "ctxt": 0 }, "value": "x", @@ -1059,7 +1059,7 @@ "type": "Identifier", "span": { "start": 700, - "end": 712, + "end": 701, "ctxt": 0 }, "value": "x", @@ -1150,7 +1150,7 @@ "type": "Identifier", "span": { "start": 739, - "end": 745, + "end": 740, "ctxt": 0 }, "value": "x", @@ -1221,7 +1221,7 @@ "type": "Identifier", "span": { "start": 767, - "end": 779, + "end": 768, "ctxt": 0 }, "value": "x", @@ -1312,7 +1312,7 @@ "type": "Identifier", "span": { "start": 797, - "end": 809, + "end": 798, "ctxt": 0 }, "value": "x", @@ -1403,7 +1403,7 @@ "type": "Identifier", "span": { "start": 836, - "end": 842, + "end": 837, "ctxt": 0 }, "value": "x", @@ -1474,7 +1474,7 @@ "type": "Identifier", "span": { "start": 863, - "end": 875, + "end": 864, "ctxt": 0 }, "value": "x", @@ -1565,7 +1565,7 @@ "type": "Identifier", "span": { "start": 892, - "end": 904, + "end": 893, "ctxt": 0 }, "value": "x", @@ -1656,7 +1656,7 @@ "type": "Identifier", "span": { "start": 930, - "end": 936, + "end": 931, "ctxt": 0 }, "value": "x", @@ -1727,7 +1727,7 @@ "type": "Identifier", "span": { "start": 957, - "end": 968, + "end": 958, "ctxt": 0 }, "value": "x", @@ -1800,7 +1800,7 @@ "type": "Identifier", "span": { "start": 985, - "end": 996, + "end": 986, "ctxt": 0 }, "value": "x", @@ -1873,7 +1873,7 @@ "type": "Identifier", "span": { "start": 1022, - "end": 1028, + "end": 1023, "ctxt": 0 }, "value": "x", @@ -1944,7 +1944,7 @@ "type": "Identifier", "span": { "start": 1049, - "end": 1060, + "end": 1050, "ctxt": 0 }, "value": "x", @@ -2017,7 +2017,7 @@ "type": "Identifier", "span": { "start": 1077, - "end": 1088, + "end": 1078, "ctxt": 0 }, "value": "x", @@ -2090,7 +2090,7 @@ "type": "Identifier", "span": { "start": 1114, - "end": 1120, + "end": 1115, "ctxt": 0 }, "value": "x", @@ -2161,7 +2161,7 @@ "type": "Identifier", "span": { "start": 1141, - "end": 1152, + "end": 1142, "ctxt": 0 }, "value": "x", @@ -2250,7 +2250,7 @@ "type": "Identifier", "span": { "start": 1177, - "end": 1188, + "end": 1178, "ctxt": 0 }, "value": "x", @@ -2339,7 +2339,7 @@ "type": "Identifier", "span": { "start": 1219, - "end": 1225, + "end": 1220, "ctxt": 0 }, "value": "x", @@ -2426,7 +2426,7 @@ "type": "Identifier", "span": { "start": 1251, - "end": 1263, + "end": 1252, "ctxt": 0 }, "value": "x", @@ -2517,7 +2517,7 @@ "type": "Identifier", "span": { "start": 1280, - "end": 1292, + "end": 1281, "ctxt": 0 }, "value": "x", @@ -2608,7 +2608,7 @@ "type": "Identifier", "span": { "start": 1315, - "end": 1321, + "end": 1316, "ctxt": 0 }, "value": "x", @@ -2679,7 +2679,7 @@ "type": "Identifier", "span": { "start": 1342, - "end": 1354, + "end": 1343, "ctxt": 0 }, "value": "x", @@ -2770,7 +2770,7 @@ "type": "Identifier", "span": { "start": 1371, - "end": 1383, + "end": 1372, "ctxt": 0 }, "value": "x", @@ -2861,7 +2861,7 @@ "type": "Identifier", "span": { "start": 1444, - "end": 1450, + "end": 1445, "ctxt": 0 }, "value": "x", @@ -2932,7 +2932,7 @@ "type": "Identifier", "span": { "start": 1472, - "end": 1484, + "end": 1473, "ctxt": 0 }, "value": "x", @@ -3023,7 +3023,7 @@ "type": "Identifier", "span": { "start": 1502, - "end": 1513, + "end": 1503, "ctxt": 0 }, "value": "x", @@ -3096,7 +3096,7 @@ "type": "Identifier", "span": { "start": 1537, - "end": 1543, + "end": 1538, "ctxt": 0 }, "value": "x", @@ -3167,7 +3167,7 @@ "type": "Identifier", "span": { "start": 1565, - "end": 1577, + "end": 1566, "ctxt": 0 }, "value": "x", @@ -3258,7 +3258,7 @@ "type": "Identifier", "span": { "start": 1595, - "end": 1606, + "end": 1596, "ctxt": 0 }, "value": "x", @@ -3331,7 +3331,7 @@ "type": "Identifier", "span": { "start": 1630, - "end": 1636, + "end": 1631, "ctxt": 0 }, "value": "x", @@ -3402,7 +3402,7 @@ "type": "Identifier", "span": { "start": 1658, - "end": 1670, + "end": 1659, "ctxt": 0 }, "value": "x", @@ -3493,7 +3493,7 @@ "type": "Identifier", "span": { "start": 1688, - "end": 1700, + "end": 1689, "ctxt": 0 }, "value": "x", @@ -3584,7 +3584,7 @@ "type": "Identifier", "span": { "start": 1724, - "end": 1730, + "end": 1725, "ctxt": 0 }, "value": "x", @@ -3655,7 +3655,7 @@ "type": "Identifier", "span": { "start": 1753, - "end": 1758, + "end": 1754, "ctxt": 0 }, "value": "x", @@ -3728,7 +3728,7 @@ "type": "Identifier", "span": { "start": 1777, - "end": 1789, + "end": 1778, "ctxt": 0 }, "value": "x", @@ -3819,7 +3819,7 @@ "type": "Identifier", "span": { "start": 1814, - "end": 1820, + "end": 1815, "ctxt": 0 }, "value": "x", @@ -3890,7 +3890,7 @@ "type": "Identifier", "span": { "start": 1842, - "end": 1854, + "end": 1843, "ctxt": 0 }, "value": "x", @@ -3981,7 +3981,7 @@ "type": "Identifier", "span": { "start": 1872, - "end": 1883, + "end": 1873, "ctxt": 0 }, "value": "x", @@ -4054,7 +4054,7 @@ "type": "Identifier", "span": { "start": 1907, - "end": 1913, + "end": 1908, "ctxt": 0 }, "value": "x", @@ -4125,7 +4125,7 @@ "type": "Identifier", "span": { "start": 1935, - "end": 1947, + "end": 1936, "ctxt": 0 }, "value": "x", @@ -4216,7 +4216,7 @@ "type": "Identifier", "span": { "start": 1965, - "end": 1976, + "end": 1966, "ctxt": 0 }, "value": "x", @@ -4289,7 +4289,7 @@ "type": "Identifier", "span": { "start": 2000, - "end": 2006, + "end": 2001, "ctxt": 0 }, "value": "x", @@ -4360,7 +4360,7 @@ "type": "Identifier", "span": { "start": 2028, - "end": 2033, + "end": 2029, "ctxt": 0 }, "value": "x", @@ -4433,7 +4433,7 @@ "type": "Identifier", "span": { "start": 2051, - "end": 2063, + "end": 2052, "ctxt": 0 }, "value": "x", @@ -4524,7 +4524,7 @@ "type": "Identifier", "span": { "start": 2087, - "end": 2093, + "end": 2088, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.json index d71cabbed044..cca564a62f95 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 378, - "end": 382, + "end": 379, "ctxt": 0 }, "value": "x", @@ -227,7 +227,7 @@ "type": "Identifier", "span": { "start": 446, - "end": 450, + "end": 447, "ctxt": 0 }, "value": "x", @@ -438,7 +438,7 @@ "type": "Identifier", "span": { "start": 510, - "end": 514, + "end": 511, "ctxt": 0 }, "value": "x", @@ -544,7 +544,7 @@ "type": "Identifier", "span": { "start": 565, - "end": 569, + "end": 566, "ctxt": 0 }, "value": "x", @@ -713,7 +713,7 @@ "type": "Identifier", "span": { "start": 612, - "end": 616, + "end": 613, "ctxt": 0 }, "value": "x", @@ -896,7 +896,7 @@ "type": "Identifier", "span": { "start": 653, - "end": 657, + "end": 654, "ctxt": 0 }, "value": "x", @@ -1050,7 +1050,7 @@ "type": "Identifier", "span": { "start": 745, - "end": 755, + "end": 746, "ctxt": 0 }, "value": "x", @@ -1151,7 +1151,7 @@ "type": "Identifier", "span": { "start": 773, - "end": 783, + "end": 774, "ctxt": 0 }, "value": "x", @@ -1252,7 +1252,7 @@ "type": "Identifier", "span": { "start": 810, - "end": 816, + "end": 811, "ctxt": 0 }, "value": "x", @@ -1323,7 +1323,7 @@ "type": "Identifier", "span": { "start": 838, - "end": 848, + "end": 839, "ctxt": 0 }, "value": "x", @@ -1424,7 +1424,7 @@ "type": "Identifier", "span": { "start": 866, - "end": 876, + "end": 867, "ctxt": 0 }, "value": "x", @@ -1525,7 +1525,7 @@ "type": "Identifier", "span": { "start": 903, - "end": 909, + "end": 904, "ctxt": 0 }, "value": "x", @@ -1596,7 +1596,7 @@ "type": "Identifier", "span": { "start": 930, - "end": 940, + "end": 931, "ctxt": 0 }, "value": "x", @@ -1697,7 +1697,7 @@ "type": "Identifier", "span": { "start": 957, - "end": 967, + "end": 958, "ctxt": 0 }, "value": "x", @@ -1798,7 +1798,7 @@ "type": "Identifier", "span": { "start": 993, - "end": 999, + "end": 994, "ctxt": 0 }, "value": "x", @@ -1869,7 +1869,7 @@ "type": "Identifier", "span": { "start": 1020, - "end": 1031, + "end": 1021, "ctxt": 0 }, "value": "x", @@ -1942,7 +1942,7 @@ "type": "Identifier", "span": { "start": 1048, - "end": 1059, + "end": 1049, "ctxt": 0 }, "value": "x", @@ -2015,7 +2015,7 @@ "type": "Identifier", "span": { "start": 1085, - "end": 1091, + "end": 1086, "ctxt": 0 }, "value": "x", @@ -2086,7 +2086,7 @@ "type": "Identifier", "span": { "start": 1112, - "end": 1123, + "end": 1113, "ctxt": 0 }, "value": "x", @@ -2159,7 +2159,7 @@ "type": "Identifier", "span": { "start": 1140, - "end": 1151, + "end": 1141, "ctxt": 0 }, "value": "x", @@ -2232,7 +2232,7 @@ "type": "Identifier", "span": { "start": 1177, - "end": 1183, + "end": 1178, "ctxt": 0 }, "value": "x", @@ -2303,7 +2303,7 @@ "type": "Identifier", "span": { "start": 1204, - "end": 1214, + "end": 1205, "ctxt": 0 }, "value": "x", @@ -2404,7 +2404,7 @@ "type": "Identifier", "span": { "start": 1231, - "end": 1241, + "end": 1232, "ctxt": 0 }, "value": "x", @@ -2505,7 +2505,7 @@ "type": "Identifier", "span": { "start": 1264, - "end": 1270, + "end": 1265, "ctxt": 0 }, "value": "x", @@ -2576,7 +2576,7 @@ "type": "Identifier", "span": { "start": 1291, - "end": 1301, + "end": 1292, "ctxt": 0 }, "value": "x", @@ -2677,7 +2677,7 @@ "type": "Identifier", "span": { "start": 1318, - "end": 1328, + "end": 1319, "ctxt": 0 }, "value": "x", @@ -2778,7 +2778,7 @@ "type": "Identifier", "span": { "start": 1389, - "end": 1395, + "end": 1390, "ctxt": 0 }, "value": "x", @@ -2849,7 +2849,7 @@ "type": "Identifier", "span": { "start": 1417, - "end": 1427, + "end": 1418, "ctxt": 0 }, "value": "x", @@ -2950,7 +2950,7 @@ "type": "Identifier", "span": { "start": 1445, - "end": 1456, + "end": 1446, "ctxt": 0 }, "value": "x", @@ -3023,7 +3023,7 @@ "type": "Identifier", "span": { "start": 1480, - "end": 1486, + "end": 1481, "ctxt": 0 }, "value": "x", @@ -3094,7 +3094,7 @@ "type": "Identifier", "span": { "start": 1508, - "end": 1518, + "end": 1509, "ctxt": 0 }, "value": "x", @@ -3195,7 +3195,7 @@ "type": "Identifier", "span": { "start": 1536, - "end": 1547, + "end": 1537, "ctxt": 0 }, "value": "x", @@ -3268,7 +3268,7 @@ "type": "Identifier", "span": { "start": 1571, - "end": 1577, + "end": 1572, "ctxt": 0 }, "value": "x", @@ -3339,7 +3339,7 @@ "type": "Identifier", "span": { "start": 1599, - "end": 1609, + "end": 1600, "ctxt": 0 }, "value": "x", @@ -3440,7 +3440,7 @@ "type": "Identifier", "span": { "start": 1627, - "end": 1637, + "end": 1628, "ctxt": 0 }, "value": "x", @@ -3541,7 +3541,7 @@ "type": "Identifier", "span": { "start": 1661, - "end": 1667, + "end": 1662, "ctxt": 0 }, "value": "x", @@ -3612,7 +3612,7 @@ "type": "Identifier", "span": { "start": 1690, - "end": 1695, + "end": 1691, "ctxt": 0 }, "value": "x", @@ -3685,7 +3685,7 @@ "type": "Identifier", "span": { "start": 1714, - "end": 1724, + "end": 1715, "ctxt": 0 }, "value": "x", @@ -3786,7 +3786,7 @@ "type": "Identifier", "span": { "start": 1749, - "end": 1755, + "end": 1750, "ctxt": 0 }, "value": "x", @@ -3857,7 +3857,7 @@ "type": "Identifier", "span": { "start": 1777, - "end": 1787, + "end": 1778, "ctxt": 0 }, "value": "x", @@ -3958,7 +3958,7 @@ "type": "Identifier", "span": { "start": 1805, - "end": 1816, + "end": 1806, "ctxt": 0 }, "value": "x", @@ -4031,7 +4031,7 @@ "type": "Identifier", "span": { "start": 1840, - "end": 1846, + "end": 1841, "ctxt": 0 }, "value": "x", @@ -4102,7 +4102,7 @@ "type": "Identifier", "span": { "start": 1868, - "end": 1878, + "end": 1869, "ctxt": 0 }, "value": "x", @@ -4203,7 +4203,7 @@ "type": "Identifier", "span": { "start": 1896, - "end": 1907, + "end": 1897, "ctxt": 0 }, "value": "x", @@ -4276,7 +4276,7 @@ "type": "Identifier", "span": { "start": 1931, - "end": 1937, + "end": 1932, "ctxt": 0 }, "value": "x", @@ -4347,7 +4347,7 @@ "type": "Identifier", "span": { "start": 1959, - "end": 1964, + "end": 1960, "ctxt": 0 }, "value": "x", @@ -4420,7 +4420,7 @@ "type": "Identifier", "span": { "start": 1982, - "end": 1992, + "end": 1983, "ctxt": 0 }, "value": "x", @@ -4521,7 +4521,7 @@ "type": "Identifier", "span": { "start": 2016, - "end": 2022, + "end": 2017, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.json index 1d263047b77e..13ff9ce477ba 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 77, - "end": 81, + "end": 78, "ctxt": 0 }, "value": "x", @@ -232,7 +232,7 @@ "type": "Identifier", "span": { "start": 138, - "end": 142, + "end": 139, "ctxt": 0 }, "value": "x", @@ -522,7 +522,7 @@ "type": "Identifier", "span": { "start": 198, - "end": 202, + "end": 199, "ctxt": 0 }, "value": "x", @@ -675,7 +675,7 @@ "type": "Identifier", "span": { "start": 252, - "end": 256, + "end": 253, "ctxt": 0 }, "value": "x", @@ -961,7 +961,7 @@ "type": "Identifier", "span": { "start": 304, - "end": 308, + "end": 305, "ctxt": 0 }, "value": "x", @@ -1284,7 +1284,7 @@ "type": "Identifier", "span": { "start": 357, - "end": 361, + "end": 358, "ctxt": 0 }, "value": "x", @@ -1537,7 +1537,7 @@ "type": "Identifier", "span": { "start": 396, - "end": 416, + "end": 397, "ctxt": 0 }, "value": "x", @@ -1637,7 +1637,7 @@ "type": "Identifier", "span": { "start": 434, - "end": 454, + "end": 435, "ctxt": 0 }, "value": "x", @@ -1737,7 +1737,7 @@ "type": "Identifier", "span": { "start": 481, - "end": 487, + "end": 482, "ctxt": 0 }, "value": "x", @@ -1808,7 +1808,7 @@ "type": "Identifier", "span": { "start": 509, - "end": 538, + "end": 510, "ctxt": 0 }, "value": "x", @@ -1917,7 +1917,7 @@ "type": "Identifier", "span": { "start": 556, - "end": 585, + "end": 557, "ctxt": 0 }, "value": "x", @@ -2026,7 +2026,7 @@ "type": "Identifier", "span": { "start": 612, - "end": 618, + "end": 613, "ctxt": 0 }, "value": "x", @@ -2097,7 +2097,7 @@ "type": "Identifier", "span": { "start": 639, - "end": 676, + "end": 640, "ctxt": 0 }, "value": "x", @@ -2215,7 +2215,7 @@ "type": "Identifier", "span": { "start": 693, - "end": 730, + "end": 694, "ctxt": 0 }, "value": "x", @@ -2333,7 +2333,7 @@ "type": "Identifier", "span": { "start": 756, - "end": 762, + "end": 757, "ctxt": 0 }, "value": "x", @@ -2404,7 +2404,7 @@ "type": "Identifier", "span": { "start": 783, - "end": 794, + "end": 784, "ctxt": 0 }, "value": "x", @@ -2477,7 +2477,7 @@ "type": "Identifier", "span": { "start": 811, - "end": 822, + "end": 812, "ctxt": 0 }, "value": "x", @@ -2550,7 +2550,7 @@ "type": "Identifier", "span": { "start": 848, - "end": 854, + "end": 849, "ctxt": 0 }, "value": "x", @@ -2621,7 +2621,7 @@ "type": "Identifier", "span": { "start": 875, - "end": 886, + "end": 876, "ctxt": 0 }, "value": "x", @@ -2694,7 +2694,7 @@ "type": "Identifier", "span": { "start": 903, - "end": 914, + "end": 904, "ctxt": 0 }, "value": "x", @@ -2767,7 +2767,7 @@ "type": "Identifier", "span": { "start": 940, - "end": 946, + "end": 941, "ctxt": 0 }, "value": "x", @@ -2838,7 +2838,7 @@ "type": "Identifier", "span": { "start": 967, - "end": 987, + "end": 968, "ctxt": 0 }, "value": "x", @@ -2938,7 +2938,7 @@ "type": "Identifier", "span": { "start": 1004, - "end": 1039, + "end": 1005, "ctxt": 0 }, "value": "x", @@ -3066,7 +3066,7 @@ "type": "Identifier", "span": { "start": 1070, - "end": 1076, + "end": 1071, "ctxt": 0 }, "value": "x", @@ -3137,7 +3137,7 @@ "type": "Identifier", "span": { "start": 1097, - "end": 1117, + "end": 1098, "ctxt": 0 }, "value": "x", @@ -3237,7 +3237,7 @@ "type": "Identifier", "span": { "start": 1134, - "end": 1173, + "end": 1135, "ctxt": 0 }, "value": "x", @@ -3383,7 +3383,7 @@ "type": "Identifier", "span": { "start": 1199, - "end": 1205, + "end": 1200, "ctxt": 0 }, "value": "x", @@ -3454,7 +3454,7 @@ "type": "Identifier", "span": { "start": 1227, - "end": 1248, + "end": 1228, "ctxt": 0 }, "value": "x", @@ -3554,7 +3554,7 @@ "type": "Identifier", "span": { "start": 1266, - "end": 1277, + "end": 1267, "ctxt": 0 }, "value": "x", @@ -3627,7 +3627,7 @@ "type": "Identifier", "span": { "start": 1301, - "end": 1307, + "end": 1302, "ctxt": 0 }, "value": "x", @@ -3698,7 +3698,7 @@ "type": "Identifier", "span": { "start": 1329, - "end": 1350, + "end": 1330, "ctxt": 0 }, "value": "x", @@ -3798,7 +3798,7 @@ "type": "Identifier", "span": { "start": 1368, - "end": 1379, + "end": 1369, "ctxt": 0 }, "value": "x", @@ -3871,7 +3871,7 @@ "type": "Identifier", "span": { "start": 1403, - "end": 1409, + "end": 1404, "ctxt": 0 }, "value": "x", @@ -3942,7 +3942,7 @@ "type": "Identifier", "span": { "start": 1431, - "end": 1476, + "end": 1432, "ctxt": 0 }, "value": "x", @@ -4107,7 +4107,7 @@ "type": "Identifier", "span": { "start": 1494, - "end": 1531, + "end": 1495, "ctxt": 0 }, "value": "x", @@ -4263,7 +4263,7 @@ "type": "Identifier", "span": { "start": 1555, - "end": 1561, + "end": 1556, "ctxt": 0 }, "value": "x", @@ -4334,7 +4334,7 @@ "type": "Identifier", "span": { "start": 1584, - "end": 1589, + "end": 1585, "ctxt": 0 }, "value": "x", @@ -4407,7 +4407,7 @@ "type": "Identifier", "span": { "start": 1608, - "end": 1637, + "end": 1609, "ctxt": 0 }, "value": "x", @@ -4516,7 +4516,7 @@ "type": "Identifier", "span": { "start": 1670, - "end": 1676, + "end": 1671, "ctxt": 0 }, "value": "x", @@ -4587,7 +4587,7 @@ "type": "Identifier", "span": { "start": 1698, - "end": 1730, + "end": 1699, "ctxt": 0 }, "value": "x", @@ -4735,7 +4735,7 @@ "type": "Identifier", "span": { "start": 1748, - "end": 1759, + "end": 1749, "ctxt": 0 }, "value": "x", @@ -4808,7 +4808,7 @@ "type": "Identifier", "span": { "start": 1783, - "end": 1789, + "end": 1784, "ctxt": 0 }, "value": "x", @@ -4879,7 +4879,7 @@ "type": "Identifier", "span": { "start": 1811, - "end": 1846, + "end": 1812, "ctxt": 0 }, "value": "x", @@ -5017,7 +5017,7 @@ "type": "Identifier", "span": { "start": 1864, - "end": 1875, + "end": 1865, "ctxt": 0 }, "value": "x", @@ -5090,7 +5090,7 @@ "type": "Identifier", "span": { "start": 1899, - "end": 1905, + "end": 1900, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.json index 4ba65d10b70c..f2a1988d4f25 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 74, - "end": 78, + "end": 75, "ctxt": 0 }, "value": "x", @@ -209,7 +209,7 @@ "type": "Identifier", "span": { "start": 129, - "end": 133, + "end": 130, "ctxt": 0 }, "value": "x", @@ -384,7 +384,7 @@ "type": "Identifier", "span": { "start": 180, - "end": 184, + "end": 181, "ctxt": 0 }, "value": "x", @@ -518,7 +518,7 @@ "type": "Identifier", "span": { "start": 222, - "end": 226, + "end": 223, "ctxt": 0 }, "value": "x", @@ -697,7 +697,7 @@ "type": "Identifier", "span": { "start": 254, - "end": 258, + "end": 255, "ctxt": 0 }, "value": "x", @@ -890,7 +890,7 @@ "type": "Identifier", "span": { "start": 285, - "end": 289, + "end": 286, "ctxt": 0 }, "value": "x", @@ -1080,7 +1080,7 @@ "type": "Identifier", "span": { "start": 334, - "end": 346, + "end": 335, "ctxt": 0 }, "value": "x", @@ -1171,7 +1171,7 @@ "type": "Identifier", "span": { "start": 364, - "end": 376, + "end": 365, "ctxt": 0 }, "value": "x", @@ -1262,7 +1262,7 @@ "type": "Identifier", "span": { "start": 403, - "end": 409, + "end": 404, "ctxt": 0 }, "value": "x", @@ -1333,7 +1333,7 @@ "type": "Identifier", "span": { "start": 431, - "end": 443, + "end": 432, "ctxt": 0 }, "value": "x", @@ -1424,7 +1424,7 @@ "type": "Identifier", "span": { "start": 461, - "end": 473, + "end": 462, "ctxt": 0 }, "value": "x", @@ -1515,7 +1515,7 @@ "type": "Identifier", "span": { "start": 500, - "end": 506, + "end": 501, "ctxt": 0 }, "value": "x", @@ -1586,7 +1586,7 @@ "type": "Identifier", "span": { "start": 527, - "end": 539, + "end": 528, "ctxt": 0 }, "value": "x", @@ -1677,7 +1677,7 @@ "type": "Identifier", "span": { "start": 556, - "end": 568, + "end": 557, "ctxt": 0 }, "value": "x", @@ -1768,7 +1768,7 @@ "type": "Identifier", "span": { "start": 594, - "end": 600, + "end": 595, "ctxt": 0 }, "value": "x", @@ -1839,7 +1839,7 @@ "type": "Identifier", "span": { "start": 621, - "end": 632, + "end": 622, "ctxt": 0 }, "value": "x", @@ -1912,7 +1912,7 @@ "type": "Identifier", "span": { "start": 649, - "end": 660, + "end": 650, "ctxt": 0 }, "value": "x", @@ -1985,7 +1985,7 @@ "type": "Identifier", "span": { "start": 686, - "end": 692, + "end": 687, "ctxt": 0 }, "value": "x", @@ -2056,7 +2056,7 @@ "type": "Identifier", "span": { "start": 713, - "end": 724, + "end": 714, "ctxt": 0 }, "value": "x", @@ -2129,7 +2129,7 @@ "type": "Identifier", "span": { "start": 741, - "end": 752, + "end": 742, "ctxt": 0 }, "value": "x", @@ -2202,7 +2202,7 @@ "type": "Identifier", "span": { "start": 778, - "end": 784, + "end": 779, "ctxt": 0 }, "value": "x", @@ -2273,7 +2273,7 @@ "type": "Identifier", "span": { "start": 805, - "end": 817, + "end": 806, "ctxt": 0 }, "value": "x", @@ -2364,7 +2364,7 @@ "type": "Identifier", "span": { "start": 834, - "end": 846, + "end": 835, "ctxt": 0 }, "value": "x", @@ -2455,7 +2455,7 @@ "type": "Identifier", "span": { "start": 877, - "end": 883, + "end": 878, "ctxt": 0 }, "value": "x", @@ -2526,7 +2526,7 @@ "type": "Identifier", "span": { "start": 904, - "end": 916, + "end": 905, "ctxt": 0 }, "value": "x", @@ -2617,7 +2617,7 @@ "type": "Identifier", "span": { "start": 933, - "end": 945, + "end": 934, "ctxt": 0 }, "value": "x", @@ -2708,7 +2708,7 @@ "type": "Identifier", "span": { "start": 971, - "end": 977, + "end": 972, "ctxt": 0 }, "value": "x", @@ -2779,7 +2779,7 @@ "type": "Identifier", "span": { "start": 999, - "end": 1011, + "end": 1000, "ctxt": 0 }, "value": "x", @@ -2870,7 +2870,7 @@ "type": "Identifier", "span": { "start": 1029, - "end": 1040, + "end": 1030, "ctxt": 0 }, "value": "x", @@ -2943,7 +2943,7 @@ "type": "Identifier", "span": { "start": 1072, - "end": 1078, + "end": 1073, "ctxt": 0 }, "value": "x", @@ -3014,7 +3014,7 @@ "type": "Identifier", "span": { "start": 1100, - "end": 1112, + "end": 1101, "ctxt": 0 }, "value": "x", @@ -3105,7 +3105,7 @@ "type": "Identifier", "span": { "start": 1130, - "end": 1141, + "end": 1131, "ctxt": 0 }, "value": "x", @@ -3178,7 +3178,7 @@ "type": "Identifier", "span": { "start": 1165, - "end": 1171, + "end": 1166, "ctxt": 0 }, "value": "x", @@ -3249,7 +3249,7 @@ "type": "Identifier", "span": { "start": 1193, - "end": 1205, + "end": 1194, "ctxt": 0 }, "value": "x", @@ -3340,7 +3340,7 @@ "type": "Identifier", "span": { "start": 1223, - "end": 1235, + "end": 1224, "ctxt": 0 }, "value": "x", @@ -3431,7 +3431,7 @@ "type": "Identifier", "span": { "start": 1262, - "end": 1268, + "end": 1263, "ctxt": 0 }, "value": "x", @@ -3502,7 +3502,7 @@ "type": "Identifier", "span": { "start": 1291, - "end": 1296, + "end": 1292, "ctxt": 0 }, "value": "x", @@ -3575,7 +3575,7 @@ "type": "Identifier", "span": { "start": 1315, - "end": 1327, + "end": 1316, "ctxt": 0 }, "value": "x", @@ -3666,7 +3666,7 @@ "type": "Identifier", "span": { "start": 1360, - "end": 1366, + "end": 1361, "ctxt": 0 }, "value": "x", @@ -3737,7 +3737,7 @@ "type": "Identifier", "span": { "start": 1388, - "end": 1400, + "end": 1389, "ctxt": 0 }, "value": "x", @@ -3828,7 +3828,7 @@ "type": "Identifier", "span": { "start": 1418, - "end": 1429, + "end": 1419, "ctxt": 0 }, "value": "x", @@ -3901,7 +3901,7 @@ "type": "Identifier", "span": { "start": 1461, - "end": 1467, + "end": 1462, "ctxt": 0 }, "value": "x", @@ -3972,7 +3972,7 @@ "type": "Identifier", "span": { "start": 1489, - "end": 1501, + "end": 1490, "ctxt": 0 }, "value": "x", @@ -4063,7 +4063,7 @@ "type": "Identifier", "span": { "start": 1519, - "end": 1530, + "end": 1520, "ctxt": 0 }, "value": "x", @@ -4136,7 +4136,7 @@ "type": "Identifier", "span": { "start": 1554, - "end": 1560, + "end": 1555, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.json index 783efcf2bba5..679c1bd84216 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 365, - "end": 369, + "end": 366, "ctxt": 0 }, "value": "x", @@ -102,7 +102,7 @@ "type": "Identifier", "span": { "start": 371, - "end": 376, + "end": 372, "ctxt": 0 }, "value": "y", @@ -255,7 +255,7 @@ "type": "Identifier", "span": { "start": 427, - "end": 431, + "end": 428, "ctxt": 0 }, "value": "x", @@ -301,7 +301,7 @@ "type": "Identifier", "span": { "start": 433, - "end": 438, + "end": 434, "ctxt": 0 }, "value": "y", @@ -476,7 +476,7 @@ "type": "Identifier", "span": { "start": 485, - "end": 489, + "end": 486, "ctxt": 0 }, "value": "x", @@ -513,7 +513,7 @@ "type": "Identifier", "span": { "start": 491, - "end": 496, + "end": 492, "ctxt": 0 }, "value": "y", @@ -647,7 +647,7 @@ "type": "Identifier", "span": { "start": 534, - "end": 538, + "end": 535, "ctxt": 0 }, "value": "x", @@ -684,7 +684,7 @@ "type": "Identifier", "span": { "start": 540, - "end": 545, + "end": 541, "ctxt": 0 }, "value": "y", @@ -863,7 +863,7 @@ "type": "Identifier", "span": { "start": 573, - "end": 577, + "end": 574, "ctxt": 0 }, "value": "x", @@ -900,7 +900,7 @@ "type": "Identifier", "span": { "start": 579, - "end": 584, + "end": 580, "ctxt": 0 }, "value": "y", @@ -1093,7 +1093,7 @@ "type": "Identifier", "span": { "start": 611, - "end": 615, + "end": 612, "ctxt": 0 }, "value": "x", @@ -1139,7 +1139,7 @@ "type": "Identifier", "span": { "start": 617, - "end": 622, + "end": 618, "ctxt": 0 }, "value": "y", @@ -1342,7 +1342,7 @@ "type": "Identifier", "span": { "start": 720, - "end": 732, + "end": 721, "ctxt": 0 }, "value": "x", @@ -1433,7 +1433,7 @@ "type": "Identifier", "span": { "start": 750, - "end": 762, + "end": 751, "ctxt": 0 }, "value": "x", @@ -1524,7 +1524,7 @@ "type": "Identifier", "span": { "start": 789, - "end": 795, + "end": 790, "ctxt": 0 }, "value": "x", @@ -1595,7 +1595,7 @@ "type": "Identifier", "span": { "start": 817, - "end": 829, + "end": 818, "ctxt": 0 }, "value": "x", @@ -1686,7 +1686,7 @@ "type": "Identifier", "span": { "start": 847, - "end": 859, + "end": 848, "ctxt": 0 }, "value": "x", @@ -1777,7 +1777,7 @@ "type": "Identifier", "span": { "start": 886, - "end": 892, + "end": 887, "ctxt": 0 }, "value": "x", @@ -1848,7 +1848,7 @@ "type": "Identifier", "span": { "start": 913, - "end": 925, + "end": 914, "ctxt": 0 }, "value": "x", @@ -1939,7 +1939,7 @@ "type": "Identifier", "span": { "start": 942, - "end": 954, + "end": 943, "ctxt": 0 }, "value": "x", @@ -2030,7 +2030,7 @@ "type": "Identifier", "span": { "start": 980, - "end": 986, + "end": 981, "ctxt": 0 }, "value": "x", @@ -2101,7 +2101,7 @@ "type": "Identifier", "span": { "start": 1007, - "end": 1018, + "end": 1008, "ctxt": 0 }, "value": "x", @@ -2174,7 +2174,7 @@ "type": "Identifier", "span": { "start": 1035, - "end": 1046, + "end": 1036, "ctxt": 0 }, "value": "x", @@ -2247,7 +2247,7 @@ "type": "Identifier", "span": { "start": 1072, - "end": 1078, + "end": 1073, "ctxt": 0 }, "value": "x", @@ -2318,7 +2318,7 @@ "type": "Identifier", "span": { "start": 1099, - "end": 1110, + "end": 1100, "ctxt": 0 }, "value": "x", @@ -2391,7 +2391,7 @@ "type": "Identifier", "span": { "start": 1127, - "end": 1138, + "end": 1128, "ctxt": 0 }, "value": "x", @@ -2464,7 +2464,7 @@ "type": "Identifier", "span": { "start": 1164, - "end": 1170, + "end": 1165, "ctxt": 0 }, "value": "x", @@ -2535,7 +2535,7 @@ "type": "Identifier", "span": { "start": 1191, - "end": 1203, + "end": 1192, "ctxt": 0 }, "value": "x", @@ -2642,7 +2642,7 @@ "type": "Identifier", "span": { "start": 1228, - "end": 1240, + "end": 1229, "ctxt": 0 }, "value": "x", @@ -2749,7 +2749,7 @@ "type": "Identifier", "span": { "start": 1279, - "end": 1285, + "end": 1280, "ctxt": 0 }, "value": "x", @@ -2836,7 +2836,7 @@ "type": "Identifier", "span": { "start": 1311, - "end": 1323, + "end": 1312, "ctxt": 0 }, "value": "x", @@ -2927,7 +2927,7 @@ "type": "Identifier", "span": { "start": 1340, - "end": 1352, + "end": 1341, "ctxt": 0 }, "value": "x", @@ -3018,7 +3018,7 @@ "type": "Identifier", "span": { "start": 1406, - "end": 1412, + "end": 1407, "ctxt": 0 }, "value": "x", @@ -3089,7 +3089,7 @@ "type": "Identifier", "span": { "start": 1434, - "end": 1446, + "end": 1435, "ctxt": 0 }, "value": "x", @@ -3180,7 +3180,7 @@ "type": "Identifier", "span": { "start": 1464, - "end": 1475, + "end": 1465, "ctxt": 0 }, "value": "x", @@ -3253,7 +3253,7 @@ "type": "Identifier", "span": { "start": 1507, - "end": 1513, + "end": 1508, "ctxt": 0 }, "value": "x", @@ -3324,7 +3324,7 @@ "type": "Identifier", "span": { "start": 1535, - "end": 1547, + "end": 1536, "ctxt": 0 }, "value": "x", @@ -3415,7 +3415,7 @@ "type": "Identifier", "span": { "start": 1565, - "end": 1576, + "end": 1566, "ctxt": 0 }, "value": "x", @@ -3488,7 +3488,7 @@ "type": "Identifier", "span": { "start": 1600, - "end": 1606, + "end": 1601, "ctxt": 0 }, "value": "x", @@ -3559,7 +3559,7 @@ "type": "Identifier", "span": { "start": 1628, - "end": 1640, + "end": 1629, "ctxt": 0 }, "value": "x", @@ -3650,7 +3650,7 @@ "type": "Identifier", "span": { "start": 1658, - "end": 1670, + "end": 1659, "ctxt": 0 }, "value": "x", @@ -3741,7 +3741,7 @@ "type": "Identifier", "span": { "start": 1694, - "end": 1700, + "end": 1695, "ctxt": 0 }, "value": "x", @@ -3812,7 +3812,7 @@ "type": "Identifier", "span": { "start": 1723, - "end": 1728, + "end": 1724, "ctxt": 0 }, "value": "x", @@ -3885,7 +3885,7 @@ "type": "Identifier", "span": { "start": 1747, - "end": 1759, + "end": 1748, "ctxt": 0 }, "value": "x", @@ -3976,7 +3976,7 @@ "type": "Identifier", "span": { "start": 1792, - "end": 1798, + "end": 1793, "ctxt": 0 }, "value": "x", @@ -4047,7 +4047,7 @@ "type": "Identifier", "span": { "start": 1820, - "end": 1832, + "end": 1821, "ctxt": 0 }, "value": "x", @@ -4138,7 +4138,7 @@ "type": "Identifier", "span": { "start": 1850, - "end": 1861, + "end": 1851, "ctxt": 0 }, "value": "x", @@ -4211,7 +4211,7 @@ "type": "Identifier", "span": { "start": 1893, - "end": 1899, + "end": 1894, "ctxt": 0 }, "value": "x", @@ -4282,7 +4282,7 @@ "type": "Identifier", "span": { "start": 1921, - "end": 1933, + "end": 1922, "ctxt": 0 }, "value": "x", @@ -4373,7 +4373,7 @@ "type": "Identifier", "span": { "start": 1951, - "end": 1962, + "end": 1952, "ctxt": 0 }, "value": "x", @@ -4446,7 +4446,7 @@ "type": "Identifier", "span": { "start": 1986, - "end": 1992, + "end": 1987, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.json index 83cede7733d8..da53c1e88efd 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 368, - "end": 372, + "end": 369, "ctxt": 0 }, "value": "x", @@ -102,7 +102,7 @@ "type": "Identifier", "span": { "start": 374, - "end": 379, + "end": 375, "ctxt": 0 }, "value": "y", @@ -278,7 +278,7 @@ "type": "Identifier", "span": { "start": 433, - "end": 437, + "end": 434, "ctxt": 0 }, "value": "x", @@ -324,7 +324,7 @@ "type": "Identifier", "span": { "start": 439, - "end": 444, + "end": 440, "ctxt": 0 }, "value": "y", @@ -545,7 +545,7 @@ "type": "Identifier", "span": { "start": 495, - "end": 499, + "end": 496, "ctxt": 0 }, "value": "x", @@ -582,7 +582,7 @@ "type": "Identifier", "span": { "start": 501, - "end": 506, + "end": 502, "ctxt": 0 }, "value": "y", @@ -735,7 +735,7 @@ "type": "Identifier", "span": { "start": 551, - "end": 555, + "end": 552, "ctxt": 0 }, "value": "x", @@ -772,7 +772,7 @@ "type": "Identifier", "span": { "start": 557, - "end": 562, + "end": 558, "ctxt": 0 }, "value": "y", @@ -993,7 +993,7 @@ "type": "Identifier", "span": { "start": 596, - "end": 600, + "end": 597, "ctxt": 0 }, "value": "x", @@ -1030,7 +1030,7 @@ "type": "Identifier", "span": { "start": 602, - "end": 607, + "end": 603, "ctxt": 0 }, "value": "y", @@ -1265,7 +1265,7 @@ "type": "Identifier", "span": { "start": 639, - "end": 643, + "end": 640, "ctxt": 0 }, "value": "x", @@ -1311,7 +1311,7 @@ "type": "Identifier", "span": { "start": 645, - "end": 650, + "end": 646, "ctxt": 0 }, "value": "y", @@ -1556,7 +1556,7 @@ "type": "Identifier", "span": { "start": 751, - "end": 771, + "end": 752, "ctxt": 0 }, "value": "x", @@ -1656,7 +1656,7 @@ "type": "Identifier", "span": { "start": 789, - "end": 809, + "end": 790, "ctxt": 0 }, "value": "x", @@ -1756,7 +1756,7 @@ "type": "Identifier", "span": { "start": 836, - "end": 842, + "end": 837, "ctxt": 0 }, "value": "x", @@ -1827,7 +1827,7 @@ "type": "Identifier", "span": { "start": 864, - "end": 884, + "end": 865, "ctxt": 0 }, "value": "x", @@ -1927,7 +1927,7 @@ "type": "Identifier", "span": { "start": 902, - "end": 922, + "end": 903, "ctxt": 0 }, "value": "x", @@ -2027,7 +2027,7 @@ "type": "Identifier", "span": { "start": 949, - "end": 955, + "end": 950, "ctxt": 0 }, "value": "x", @@ -2098,7 +2098,7 @@ "type": "Identifier", "span": { "start": 976, - "end": 996, + "end": 977, "ctxt": 0 }, "value": "x", @@ -2198,7 +2198,7 @@ "type": "Identifier", "span": { "start": 1013, - "end": 1033, + "end": 1014, "ctxt": 0 }, "value": "x", @@ -2298,7 +2298,7 @@ "type": "Identifier", "span": { "start": 1059, - "end": 1065, + "end": 1060, "ctxt": 0 }, "value": "x", @@ -2369,7 +2369,7 @@ "type": "Identifier", "span": { "start": 1086, - "end": 1097, + "end": 1087, "ctxt": 0 }, "value": "x", @@ -2442,7 +2442,7 @@ "type": "Identifier", "span": { "start": 1114, - "end": 1125, + "end": 1115, "ctxt": 0 }, "value": "x", @@ -2515,7 +2515,7 @@ "type": "Identifier", "span": { "start": 1151, - "end": 1157, + "end": 1152, "ctxt": 0 }, "value": "x", @@ -2586,7 +2586,7 @@ "type": "Identifier", "span": { "start": 1178, - "end": 1189, + "end": 1179, "ctxt": 0 }, "value": "x", @@ -2659,7 +2659,7 @@ "type": "Identifier", "span": { "start": 1206, - "end": 1217, + "end": 1207, "ctxt": 0 }, "value": "x", @@ -2732,7 +2732,7 @@ "type": "Identifier", "span": { "start": 1243, - "end": 1249, + "end": 1244, "ctxt": 0 }, "value": "x", @@ -2803,7 +2803,7 @@ "type": "Identifier", "span": { "start": 1270, - "end": 1290, + "end": 1271, "ctxt": 0 }, "value": "x", @@ -2903,7 +2903,7 @@ "type": "Identifier", "span": { "start": 1307, - "end": 1327, + "end": 1308, "ctxt": 0 }, "value": "x", @@ -3003,7 +3003,7 @@ "type": "Identifier", "span": { "start": 1358, - "end": 1364, + "end": 1359, "ctxt": 0 }, "value": "x", @@ -3074,7 +3074,7 @@ "type": "Identifier", "span": { "start": 1385, - "end": 1405, + "end": 1386, "ctxt": 0 }, "value": "x", @@ -3174,7 +3174,7 @@ "type": "Identifier", "span": { "start": 1422, - "end": 1442, + "end": 1423, "ctxt": 0 }, "value": "x", @@ -3274,7 +3274,7 @@ "type": "Identifier", "span": { "start": 1468, - "end": 1474, + "end": 1469, "ctxt": 0 }, "value": "x", @@ -3345,7 +3345,7 @@ "type": "Identifier", "span": { "start": 1496, - "end": 1516, + "end": 1497, "ctxt": 0 }, "value": "x", @@ -3445,7 +3445,7 @@ "type": "Identifier", "span": { "start": 1534, - "end": 1545, + "end": 1535, "ctxt": 0 }, "value": "x", @@ -3518,7 +3518,7 @@ "type": "Identifier", "span": { "start": 1577, - "end": 1583, + "end": 1578, "ctxt": 0 }, "value": "x", @@ -3589,7 +3589,7 @@ "type": "Identifier", "span": { "start": 1605, - "end": 1625, + "end": 1606, "ctxt": 0 }, "value": "x", @@ -3689,7 +3689,7 @@ "type": "Identifier", "span": { "start": 1643, - "end": 1654, + "end": 1644, "ctxt": 0 }, "value": "x", @@ -3762,7 +3762,7 @@ "type": "Identifier", "span": { "start": 1678, - "end": 1684, + "end": 1679, "ctxt": 0 }, "value": "x", @@ -3833,7 +3833,7 @@ "type": "Identifier", "span": { "start": 1706, - "end": 1726, + "end": 1707, "ctxt": 0 }, "value": "x", @@ -3933,7 +3933,7 @@ "type": "Identifier", "span": { "start": 1744, - "end": 1764, + "end": 1745, "ctxt": 0 }, "value": "x", @@ -4033,7 +4033,7 @@ "type": "Identifier", "span": { "start": 1796, - "end": 1802, + "end": 1797, "ctxt": 0 }, "value": "x", @@ -4104,7 +4104,7 @@ "type": "Identifier", "span": { "start": 1825, - "end": 1830, + "end": 1826, "ctxt": 0 }, "value": "x", @@ -4177,7 +4177,7 @@ "type": "Identifier", "span": { "start": 1849, - "end": 1869, + "end": 1850, "ctxt": 0 }, "value": "x", @@ -4277,7 +4277,7 @@ "type": "Identifier", "span": { "start": 1894, - "end": 1900, + "end": 1895, "ctxt": 0 }, "value": "x", @@ -4348,7 +4348,7 @@ "type": "Identifier", "span": { "start": 1922, - "end": 1942, + "end": 1923, "ctxt": 0 }, "value": "x", @@ -4448,7 +4448,7 @@ "type": "Identifier", "span": { "start": 1960, - "end": 1971, + "end": 1961, "ctxt": 0 }, "value": "x", @@ -4521,7 +4521,7 @@ "type": "Identifier", "span": { "start": 2003, - "end": 2009, + "end": 2004, "ctxt": 0 }, "value": "x", @@ -4592,7 +4592,7 @@ "type": "Identifier", "span": { "start": 2031, - "end": 2051, + "end": 2032, "ctxt": 0 }, "value": "x", @@ -4692,7 +4692,7 @@ "type": "Identifier", "span": { "start": 2069, - "end": 2080, + "end": 2070, "ctxt": 0 }, "value": "x", @@ -4765,7 +4765,7 @@ "type": "Identifier", "span": { "start": 2104, - "end": 2110, + "end": 2105, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.json index 3b16ba820826..0f1cc8b8ad9d 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 368, - "end": 372, + "end": 369, "ctxt": 0 }, "value": "x", @@ -102,7 +102,7 @@ "type": "Identifier", "span": { "start": 374, - "end": 378, + "end": 375, "ctxt": 0 }, "value": "y", @@ -278,7 +278,7 @@ "type": "Identifier", "span": { "start": 432, - "end": 436, + "end": 433, "ctxt": 0 }, "value": "x", @@ -324,7 +324,7 @@ "type": "Identifier", "span": { "start": 438, - "end": 443, + "end": 439, "ctxt": 0 }, "value": "y", @@ -545,7 +545,7 @@ "type": "Identifier", "span": { "start": 493, - "end": 497, + "end": 494, "ctxt": 0 }, "value": "x", @@ -582,7 +582,7 @@ "type": "Identifier", "span": { "start": 499, - "end": 504, + "end": 500, "ctxt": 0 }, "value": "y", @@ -735,7 +735,7 @@ "type": "Identifier", "span": { "start": 548, - "end": 552, + "end": 549, "ctxt": 0 }, "value": "x", @@ -772,7 +772,7 @@ "type": "Identifier", "span": { "start": 554, - "end": 558, + "end": 555, "ctxt": 0 }, "value": "y", @@ -993,7 +993,7 @@ "type": "Identifier", "span": { "start": 593, - "end": 597, + "end": 594, "ctxt": 0 }, "value": "x", @@ -1030,7 +1030,7 @@ "type": "Identifier", "span": { "start": 599, - "end": 604, + "end": 600, "ctxt": 0 }, "value": "y", @@ -1265,7 +1265,7 @@ "type": "Identifier", "span": { "start": 638, - "end": 642, + "end": 639, "ctxt": 0 }, "value": "x", @@ -1311,7 +1311,7 @@ "type": "Identifier", "span": { "start": 644, - "end": 648, + "end": 645, "ctxt": 0 }, "value": "y", @@ -1556,7 +1556,7 @@ "type": "Identifier", "span": { "start": 749, - "end": 769, + "end": 750, "ctxt": 0 }, "value": "x", @@ -1656,7 +1656,7 @@ "type": "Identifier", "span": { "start": 787, - "end": 807, + "end": 788, "ctxt": 0 }, "value": "x", @@ -1756,7 +1756,7 @@ "type": "Identifier", "span": { "start": 834, - "end": 840, + "end": 835, "ctxt": 0 }, "value": "x", @@ -1827,7 +1827,7 @@ "type": "Identifier", "span": { "start": 862, - "end": 882, + "end": 863, "ctxt": 0 }, "value": "x", @@ -1927,7 +1927,7 @@ "type": "Identifier", "span": { "start": 900, - "end": 920, + "end": 901, "ctxt": 0 }, "value": "x", @@ -2027,7 +2027,7 @@ "type": "Identifier", "span": { "start": 947, - "end": 953, + "end": 948, "ctxt": 0 }, "value": "x", @@ -2098,7 +2098,7 @@ "type": "Identifier", "span": { "start": 974, - "end": 994, + "end": 975, "ctxt": 0 }, "value": "x", @@ -2198,7 +2198,7 @@ "type": "Identifier", "span": { "start": 1011, - "end": 1031, + "end": 1012, "ctxt": 0 }, "value": "x", @@ -2298,7 +2298,7 @@ "type": "Identifier", "span": { "start": 1057, - "end": 1063, + "end": 1058, "ctxt": 0 }, "value": "x", @@ -2369,7 +2369,7 @@ "type": "Identifier", "span": { "start": 1084, - "end": 1095, + "end": 1085, "ctxt": 0 }, "value": "x", @@ -2442,7 +2442,7 @@ "type": "Identifier", "span": { "start": 1112, - "end": 1123, + "end": 1113, "ctxt": 0 }, "value": "x", @@ -2515,7 +2515,7 @@ "type": "Identifier", "span": { "start": 1149, - "end": 1155, + "end": 1150, "ctxt": 0 }, "value": "x", @@ -2586,7 +2586,7 @@ "type": "Identifier", "span": { "start": 1176, - "end": 1187, + "end": 1177, "ctxt": 0 }, "value": "x", @@ -2659,7 +2659,7 @@ "type": "Identifier", "span": { "start": 1204, - "end": 1215, + "end": 1205, "ctxt": 0 }, "value": "x", @@ -2732,7 +2732,7 @@ "type": "Identifier", "span": { "start": 1241, - "end": 1247, + "end": 1242, "ctxt": 0 }, "value": "x", @@ -2803,7 +2803,7 @@ "type": "Identifier", "span": { "start": 1268, - "end": 1288, + "end": 1269, "ctxt": 0 }, "value": "x", @@ -2903,7 +2903,7 @@ "type": "Identifier", "span": { "start": 1305, - "end": 1325, + "end": 1306, "ctxt": 0 }, "value": "x", @@ -3003,7 +3003,7 @@ "type": "Identifier", "span": { "start": 1356, - "end": 1362, + "end": 1357, "ctxt": 0 }, "value": "x", @@ -3074,7 +3074,7 @@ "type": "Identifier", "span": { "start": 1383, - "end": 1403, + "end": 1384, "ctxt": 0 }, "value": "x", @@ -3174,7 +3174,7 @@ "type": "Identifier", "span": { "start": 1420, - "end": 1440, + "end": 1421, "ctxt": 0 }, "value": "x", @@ -3274,7 +3274,7 @@ "type": "Identifier", "span": { "start": 1494, - "end": 1500, + "end": 1495, "ctxt": 0 }, "value": "x", @@ -3345,7 +3345,7 @@ "type": "Identifier", "span": { "start": 1522, - "end": 1542, + "end": 1523, "ctxt": 0 }, "value": "x", @@ -3445,7 +3445,7 @@ "type": "Identifier", "span": { "start": 1560, - "end": 1571, + "end": 1561, "ctxt": 0 }, "value": "x", @@ -3518,7 +3518,7 @@ "type": "Identifier", "span": { "start": 1603, - "end": 1609, + "end": 1604, "ctxt": 0 }, "value": "x", @@ -3589,7 +3589,7 @@ "type": "Identifier", "span": { "start": 1631, - "end": 1651, + "end": 1632, "ctxt": 0 }, "value": "x", @@ -3689,7 +3689,7 @@ "type": "Identifier", "span": { "start": 1669, - "end": 1680, + "end": 1670, "ctxt": 0 }, "value": "x", @@ -3762,7 +3762,7 @@ "type": "Identifier", "span": { "start": 1704, - "end": 1710, + "end": 1705, "ctxt": 0 }, "value": "x", @@ -3833,7 +3833,7 @@ "type": "Identifier", "span": { "start": 1732, - "end": 1752, + "end": 1733, "ctxt": 0 }, "value": "x", @@ -3933,7 +3933,7 @@ "type": "Identifier", "span": { "start": 1770, - "end": 1790, + "end": 1771, "ctxt": 0 }, "value": "x", @@ -4033,7 +4033,7 @@ "type": "Identifier", "span": { "start": 1814, - "end": 1820, + "end": 1815, "ctxt": 0 }, "value": "x", @@ -4104,7 +4104,7 @@ "type": "Identifier", "span": { "start": 1843, - "end": 1848, + "end": 1844, "ctxt": 0 }, "value": "x", @@ -4177,7 +4177,7 @@ "type": "Identifier", "span": { "start": 1867, - "end": 1887, + "end": 1868, "ctxt": 0 }, "value": "x", @@ -4277,7 +4277,7 @@ "type": "Identifier", "span": { "start": 1920, - "end": 1926, + "end": 1921, "ctxt": 0 }, "value": "x", @@ -4348,7 +4348,7 @@ "type": "Identifier", "span": { "start": 1948, - "end": 1968, + "end": 1949, "ctxt": 0 }, "value": "x", @@ -4448,7 +4448,7 @@ "type": "Identifier", "span": { "start": 1986, - "end": 1997, + "end": 1987, "ctxt": 0 }, "value": "x", @@ -4521,7 +4521,7 @@ "type": "Identifier", "span": { "start": 2029, - "end": 2035, + "end": 2030, "ctxt": 0 }, "value": "x", @@ -4592,7 +4592,7 @@ "type": "Identifier", "span": { "start": 2057, - "end": 2077, + "end": 2058, "ctxt": 0 }, "value": "x", @@ -4692,7 +4692,7 @@ "type": "Identifier", "span": { "start": 2095, - "end": 2106, + "end": 2096, "ctxt": 0 }, "value": "x", @@ -4765,7 +4765,7 @@ "type": "Identifier", "span": { "start": 2130, - "end": 2136, + "end": 2131, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithNumericIndexers1.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithNumericIndexers1.json index 61f208256cfb..a20f4b34df7b 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithNumericIndexers1.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithNumericIndexers1.json @@ -724,7 +724,7 @@ "type": "Identifier", "span": { "start": 343, - "end": 347, + "end": 344, "ctxt": 0 }, "value": "x", @@ -797,7 +797,7 @@ "type": "Identifier", "span": { "start": 364, - "end": 368, + "end": 365, "ctxt": 0 }, "value": "x", @@ -870,7 +870,7 @@ "type": "Identifier", "span": { "start": 394, - "end": 400, + "end": 395, "ctxt": 0 }, "value": "x", @@ -941,7 +941,7 @@ "type": "Identifier", "span": { "start": 422, - "end": 426, + "end": 423, "ctxt": 0 }, "value": "x", @@ -1014,7 +1014,7 @@ "type": "Identifier", "span": { "start": 444, - "end": 448, + "end": 445, "ctxt": 0 }, "value": "x", @@ -1087,7 +1087,7 @@ "type": "Identifier", "span": { "start": 475, - "end": 481, + "end": 476, "ctxt": 0 }, "value": "x", @@ -1158,7 +1158,7 @@ "type": "Identifier", "span": { "start": 503, - "end": 515, + "end": 504, "ctxt": 0 }, "value": "x", @@ -1249,7 +1249,7 @@ "type": "Identifier", "span": { "start": 533, - "end": 545, + "end": 534, "ctxt": 0 }, "value": "x", @@ -1340,7 +1340,7 @@ "type": "Identifier", "span": { "start": 572, - "end": 578, + "end": 573, "ctxt": 0 }, "value": "x", @@ -1411,7 +1411,7 @@ "type": "Identifier", "span": { "start": 599, - "end": 603, + "end": 600, "ctxt": 0 }, "value": "x", @@ -1484,7 +1484,7 @@ "type": "Identifier", "span": { "start": 620, - "end": 624, + "end": 621, "ctxt": 0 }, "value": "x", @@ -1557,7 +1557,7 @@ "type": "Identifier", "span": { "start": 650, - "end": 656, + "end": 651, "ctxt": 0 }, "value": "x", @@ -1628,7 +1628,7 @@ "type": "Identifier", "span": { "start": 677, - "end": 688, + "end": 678, "ctxt": 0 }, "value": "x", @@ -1701,7 +1701,7 @@ "type": "Identifier", "span": { "start": 705, - "end": 716, + "end": 706, "ctxt": 0 }, "value": "x", @@ -1774,7 +1774,7 @@ "type": "Identifier", "span": { "start": 742, - "end": 748, + "end": 743, "ctxt": 0 }, "value": "x", @@ -1845,7 +1845,7 @@ "type": "Identifier", "span": { "start": 769, - "end": 780, + "end": 770, "ctxt": 0 }, "value": "x", @@ -1918,7 +1918,7 @@ "type": "Identifier", "span": { "start": 797, - "end": 808, + "end": 798, "ctxt": 0 }, "value": "x", @@ -1991,7 +1991,7 @@ "type": "Identifier", "span": { "start": 834, - "end": 840, + "end": 835, "ctxt": 0 }, "value": "x", @@ -2062,7 +2062,7 @@ "type": "Identifier", "span": { "start": 861, - "end": 865, + "end": 862, "ctxt": 0 }, "value": "x", @@ -2135,7 +2135,7 @@ "type": "Identifier", "span": { "start": 882, - "end": 886, + "end": 883, "ctxt": 0 }, "value": "x", @@ -2208,7 +2208,7 @@ "type": "Identifier", "span": { "start": 912, - "end": 918, + "end": 913, "ctxt": 0 }, "value": "x", @@ -2279,7 +2279,7 @@ "type": "Identifier", "span": { "start": 940, - "end": 944, + "end": 941, "ctxt": 0 }, "value": "x", @@ -2352,7 +2352,7 @@ "type": "Identifier", "span": { "start": 962, - "end": 974, + "end": 963, "ctxt": 0 }, "value": "x", @@ -2443,7 +2443,7 @@ "type": "Identifier", "span": { "start": 1001, - "end": 1007, + "end": 1002, "ctxt": 0 }, "value": "x", @@ -2514,7 +2514,7 @@ "type": "Identifier", "span": { "start": 1029, - "end": 1033, + "end": 1030, "ctxt": 0 }, "value": "x", @@ -2587,7 +2587,7 @@ "type": "Identifier", "span": { "start": 1051, - "end": 1056, + "end": 1052, "ctxt": 0 }, "value": "x", @@ -2660,7 +2660,7 @@ "type": "Identifier", "span": { "start": 1083, - "end": 1089, + "end": 1084, "ctxt": 0 }, "value": "x", @@ -2731,7 +2731,7 @@ "type": "Identifier", "span": { "start": 1111, - "end": 1115, + "end": 1112, "ctxt": 0 }, "value": "x", @@ -2804,7 +2804,7 @@ "type": "Identifier", "span": { "start": 1133, - "end": 1138, + "end": 1134, "ctxt": 0 }, "value": "x", @@ -2877,7 +2877,7 @@ "type": "Identifier", "span": { "start": 1165, - "end": 1171, + "end": 1166, "ctxt": 0 }, "value": "x", @@ -2948,7 +2948,7 @@ "type": "Identifier", "span": { "start": 1192, - "end": 1196, + "end": 1193, "ctxt": 0 }, "value": "x", @@ -3021,7 +3021,7 @@ "type": "Identifier", "span": { "start": 1213, - "end": 1217, + "end": 1214, "ctxt": 0 }, "value": "x", @@ -3094,7 +3094,7 @@ "type": "Identifier", "span": { "start": 1243, - "end": 1249, + "end": 1244, "ctxt": 0 }, "value": "x", @@ -3165,7 +3165,7 @@ "type": "Identifier", "span": { "start": 1270, - "end": 1274, + "end": 1271, "ctxt": 0 }, "value": "x", @@ -3238,7 +3238,7 @@ "type": "Identifier", "span": { "start": 1291, - "end": 1302, + "end": 1292, "ctxt": 0 }, "value": "x", @@ -3311,7 +3311,7 @@ "type": "Identifier", "span": { "start": 1328, - "end": 1334, + "end": 1329, "ctxt": 0 }, "value": "x", @@ -3382,7 +3382,7 @@ "type": "Identifier", "span": { "start": 1355, - "end": 1359, + "end": 1356, "ctxt": 0 }, "value": "x", @@ -3455,7 +3455,7 @@ "type": "Identifier", "span": { "start": 1376, - "end": 1380, + "end": 1377, "ctxt": 0 }, "value": "x", @@ -3528,7 +3528,7 @@ "type": "Identifier", "span": { "start": 1406, - "end": 1412, + "end": 1407, "ctxt": 0 }, "value": "x", @@ -3599,7 +3599,7 @@ "type": "Identifier", "span": { "start": 1433, - "end": 1437, + "end": 1434, "ctxt": 0 }, "value": "x", @@ -3672,7 +3672,7 @@ "type": "Identifier", "span": { "start": 1454, - "end": 1466, + "end": 1455, "ctxt": 0 }, "value": "x", @@ -3763,7 +3763,7 @@ "type": "Identifier", "span": { "start": 1492, - "end": 1498, + "end": 1493, "ctxt": 0 }, "value": "x", @@ -3834,7 +3834,7 @@ "type": "Identifier", "span": { "start": 1520, - "end": 1524, + "end": 1521, "ctxt": 0 }, "value": "x", @@ -3907,7 +3907,7 @@ "type": "Identifier", "span": { "start": 1542, - "end": 1553, + "end": 1543, "ctxt": 0 }, "value": "x", @@ -3980,7 +3980,7 @@ "type": "Identifier", "span": { "start": 1580, - "end": 1586, + "end": 1581, "ctxt": 0 }, "value": "x", @@ -4051,7 +4051,7 @@ "type": "Identifier", "span": { "start": 1608, - "end": 1612, + "end": 1609, "ctxt": 0 }, "value": "x", @@ -4124,7 +4124,7 @@ "type": "Identifier", "span": { "start": 1630, - "end": 1641, + "end": 1631, "ctxt": 0 }, "value": "x", @@ -4197,7 +4197,7 @@ "type": "Identifier", "span": { "start": 1668, - "end": 1674, + "end": 1669, "ctxt": 0 }, "value": "x", @@ -4268,7 +4268,7 @@ "type": "Identifier", "span": { "start": 1697, - "end": 1701, + "end": 1698, "ctxt": 0 }, "value": "x", @@ -4341,7 +4341,7 @@ "type": "Identifier", "span": { "start": 1720, - "end": 1725, + "end": 1721, "ctxt": 0 }, "value": "x", @@ -4414,7 +4414,7 @@ "type": "Identifier", "span": { "start": 1753, - "end": 1759, + "end": 1754, "ctxt": 0 }, "value": "x", @@ -4485,7 +4485,7 @@ "type": "Identifier", "span": { "start": 1782, - "end": 1786, + "end": 1783, "ctxt": 0 }, "value": "x", @@ -4558,7 +4558,7 @@ "type": "Identifier", "span": { "start": 1805, - "end": 1810, + "end": 1806, "ctxt": 0 }, "value": "x", @@ -4631,7 +4631,7 @@ "type": "Identifier", "span": { "start": 1838, - "end": 1844, + "end": 1839, "ctxt": 0 }, "value": "x", @@ -4702,7 +4702,7 @@ "type": "Identifier", "span": { "start": 1866, - "end": 1870, + "end": 1867, "ctxt": 0 }, "value": "x", @@ -4775,7 +4775,7 @@ "type": "Identifier", "span": { "start": 1888, - "end": 1900, + "end": 1889, "ctxt": 0 }, "value": "x", @@ -4866,7 +4866,7 @@ "type": "Identifier", "span": { "start": 1927, - "end": 1933, + "end": 1928, "ctxt": 0 }, "value": "x", @@ -4937,7 +4937,7 @@ "type": "Identifier", "span": { "start": 1955, - "end": 1959, + "end": 1956, "ctxt": 0 }, "value": "x", @@ -5010,7 +5010,7 @@ "type": "Identifier", "span": { "start": 1977, - "end": 1988, + "end": 1978, "ctxt": 0 }, "value": "x", @@ -5083,7 +5083,7 @@ "type": "Identifier", "span": { "start": 2015, - "end": 2021, + "end": 2016, "ctxt": 0 }, "value": "x", @@ -5154,7 +5154,7 @@ "type": "Identifier", "span": { "start": 2043, - "end": 2047, + "end": 2044, "ctxt": 0 }, "value": "x", @@ -5227,7 +5227,7 @@ "type": "Identifier", "span": { "start": 2065, - "end": 2076, + "end": 2066, "ctxt": 0 }, "value": "x", @@ -5300,7 +5300,7 @@ "type": "Identifier", "span": { "start": 2103, - "end": 2109, + "end": 2104, "ctxt": 0 }, "value": "x", @@ -5371,7 +5371,7 @@ "type": "Identifier", "span": { "start": 2131, - "end": 2135, + "end": 2132, "ctxt": 0 }, "value": "x", @@ -5444,7 +5444,7 @@ "type": "Identifier", "span": { "start": 2153, - "end": 2158, + "end": 2154, "ctxt": 0 }, "value": "x", @@ -5517,7 +5517,7 @@ "type": "Identifier", "span": { "start": 2185, - "end": 2191, + "end": 2186, "ctxt": 0 }, "value": "x", @@ -5588,7 +5588,7 @@ "type": "Identifier", "span": { "start": 2213, - "end": 2217, + "end": 2214, "ctxt": 0 }, "value": "x", @@ -5661,7 +5661,7 @@ "type": "Identifier", "span": { "start": 2235, - "end": 2240, + "end": 2236, "ctxt": 0 }, "value": "x", @@ -5734,7 +5734,7 @@ "type": "Identifier", "span": { "start": 2267, - "end": 2273, + "end": 2268, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithNumericIndexers2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithNumericIndexers2.json index be16f750c8c1..e81c4934e48a 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithNumericIndexers2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithNumericIndexers2.json @@ -952,7 +952,7 @@ "type": "Identifier", "span": { "start": 426, - "end": 430, + "end": 427, "ctxt": 0 }, "value": "x", @@ -1025,7 +1025,7 @@ "type": "Identifier", "span": { "start": 447, - "end": 451, + "end": 448, "ctxt": 0 }, "value": "x", @@ -1098,7 +1098,7 @@ "type": "Identifier", "span": { "start": 477, - "end": 483, + "end": 478, "ctxt": 0 }, "value": "x", @@ -1169,7 +1169,7 @@ "type": "Identifier", "span": { "start": 505, - "end": 509, + "end": 506, "ctxt": 0 }, "value": "x", @@ -1242,7 +1242,7 @@ "type": "Identifier", "span": { "start": 527, - "end": 531, + "end": 528, "ctxt": 0 }, "value": "x", @@ -1315,7 +1315,7 @@ "type": "Identifier", "span": { "start": 558, - "end": 564, + "end": 559, "ctxt": 0 }, "value": "x", @@ -1386,7 +1386,7 @@ "type": "Identifier", "span": { "start": 586, - "end": 598, + "end": 587, "ctxt": 0 }, "value": "x", @@ -1477,7 +1477,7 @@ "type": "Identifier", "span": { "start": 616, - "end": 628, + "end": 617, "ctxt": 0 }, "value": "x", @@ -1568,7 +1568,7 @@ "type": "Identifier", "span": { "start": 655, - "end": 661, + "end": 656, "ctxt": 0 }, "value": "x", @@ -1639,7 +1639,7 @@ "type": "Identifier", "span": { "start": 682, - "end": 686, + "end": 683, "ctxt": 0 }, "value": "x", @@ -1712,7 +1712,7 @@ "type": "Identifier", "span": { "start": 703, - "end": 707, + "end": 704, "ctxt": 0 }, "value": "x", @@ -1785,7 +1785,7 @@ "type": "Identifier", "span": { "start": 733, - "end": 739, + "end": 734, "ctxt": 0 }, "value": "x", @@ -1856,7 +1856,7 @@ "type": "Identifier", "span": { "start": 760, - "end": 771, + "end": 761, "ctxt": 0 }, "value": "x", @@ -1929,7 +1929,7 @@ "type": "Identifier", "span": { "start": 788, - "end": 799, + "end": 789, "ctxt": 0 }, "value": "x", @@ -2002,7 +2002,7 @@ "type": "Identifier", "span": { "start": 825, - "end": 831, + "end": 826, "ctxt": 0 }, "value": "x", @@ -2073,7 +2073,7 @@ "type": "Identifier", "span": { "start": 852, - "end": 863, + "end": 853, "ctxt": 0 }, "value": "x", @@ -2146,7 +2146,7 @@ "type": "Identifier", "span": { "start": 880, - "end": 891, + "end": 881, "ctxt": 0 }, "value": "x", @@ -2219,7 +2219,7 @@ "type": "Identifier", "span": { "start": 917, - "end": 923, + "end": 918, "ctxt": 0 }, "value": "x", @@ -2290,7 +2290,7 @@ "type": "Identifier", "span": { "start": 944, - "end": 948, + "end": 945, "ctxt": 0 }, "value": "x", @@ -2363,7 +2363,7 @@ "type": "Identifier", "span": { "start": 965, - "end": 969, + "end": 966, "ctxt": 0 }, "value": "x", @@ -2436,7 +2436,7 @@ "type": "Identifier", "span": { "start": 992, - "end": 998, + "end": 993, "ctxt": 0 }, "value": "x", @@ -2507,7 +2507,7 @@ "type": "Identifier", "span": { "start": 1020, - "end": 1024, + "end": 1021, "ctxt": 0 }, "value": "x", @@ -2580,7 +2580,7 @@ "type": "Identifier", "span": { "start": 1042, - "end": 1055, + "end": 1043, "ctxt": 0 }, "value": "x", @@ -2681,7 +2681,7 @@ "type": "Identifier", "span": { "start": 1079, - "end": 1085, + "end": 1080, "ctxt": 0 }, "value": "x", @@ -2752,7 +2752,7 @@ "type": "Identifier", "span": { "start": 1107, - "end": 1111, + "end": 1108, "ctxt": 0 }, "value": "x", @@ -2825,7 +2825,7 @@ "type": "Identifier", "span": { "start": 1129, - "end": 1134, + "end": 1130, "ctxt": 0 }, "value": "x", @@ -2898,7 +2898,7 @@ "type": "Identifier", "span": { "start": 1161, - "end": 1167, + "end": 1162, "ctxt": 0 }, "value": "x", @@ -2969,7 +2969,7 @@ "type": "Identifier", "span": { "start": 1189, - "end": 1193, + "end": 1190, "ctxt": 0 }, "value": "x", @@ -3042,7 +3042,7 @@ "type": "Identifier", "span": { "start": 1211, - "end": 1216, + "end": 1212, "ctxt": 0 }, "value": "x", @@ -3115,7 +3115,7 @@ "type": "Identifier", "span": { "start": 1240, - "end": 1246, + "end": 1241, "ctxt": 0 }, "value": "x", @@ -3186,7 +3186,7 @@ "type": "Identifier", "span": { "start": 1267, - "end": 1271, + "end": 1268, "ctxt": 0 }, "value": "x", @@ -3259,7 +3259,7 @@ "type": "Identifier", "span": { "start": 1288, - "end": 1292, + "end": 1289, "ctxt": 0 }, "value": "x", @@ -3332,7 +3332,7 @@ "type": "Identifier", "span": { "start": 1315, - "end": 1321, + "end": 1316, "ctxt": 0 }, "value": "x", @@ -3403,7 +3403,7 @@ "type": "Identifier", "span": { "start": 1342, - "end": 1346, + "end": 1343, "ctxt": 0 }, "value": "x", @@ -3476,7 +3476,7 @@ "type": "Identifier", "span": { "start": 1363, - "end": 1374, + "end": 1364, "ctxt": 0 }, "value": "x", @@ -3549,7 +3549,7 @@ "type": "Identifier", "span": { "start": 1400, - "end": 1406, + "end": 1401, "ctxt": 0 }, "value": "x", @@ -3620,7 +3620,7 @@ "type": "Identifier", "span": { "start": 1427, - "end": 1431, + "end": 1428, "ctxt": 0 }, "value": "x", @@ -3693,7 +3693,7 @@ "type": "Identifier", "span": { "start": 1448, - "end": 1452, + "end": 1449, "ctxt": 0 }, "value": "x", @@ -3766,7 +3766,7 @@ "type": "Identifier", "span": { "start": 1478, - "end": 1484, + "end": 1479, "ctxt": 0 }, "value": "x", @@ -3837,7 +3837,7 @@ "type": "Identifier", "span": { "start": 1505, - "end": 1509, + "end": 1506, "ctxt": 0 }, "value": "x", @@ -3910,7 +3910,7 @@ "type": "Identifier", "span": { "start": 1526, - "end": 1536, + "end": 1527, "ctxt": 0 }, "value": "x", @@ -4011,7 +4011,7 @@ "type": "Identifier", "span": { "start": 1559, - "end": 1565, + "end": 1560, "ctxt": 0 }, "value": "x", @@ -4082,7 +4082,7 @@ "type": "Identifier", "span": { "start": 1587, - "end": 1591, + "end": 1588, "ctxt": 0 }, "value": "x", @@ -4155,7 +4155,7 @@ "type": "Identifier", "span": { "start": 1609, - "end": 1620, + "end": 1610, "ctxt": 0 }, "value": "x", @@ -4228,7 +4228,7 @@ "type": "Identifier", "span": { "start": 1644, - "end": 1650, + "end": 1645, "ctxt": 0 }, "value": "x", @@ -4299,7 +4299,7 @@ "type": "Identifier", "span": { "start": 1672, - "end": 1676, + "end": 1673, "ctxt": 0 }, "value": "x", @@ -4372,7 +4372,7 @@ "type": "Identifier", "span": { "start": 1694, - "end": 1705, + "end": 1695, "ctxt": 0 }, "value": "x", @@ -4445,7 +4445,7 @@ "type": "Identifier", "span": { "start": 1732, - "end": 1738, + "end": 1733, "ctxt": 0 }, "value": "x", @@ -4516,7 +4516,7 @@ "type": "Identifier", "span": { "start": 1761, - "end": 1765, + "end": 1762, "ctxt": 0 }, "value": "x", @@ -4589,7 +4589,7 @@ "type": "Identifier", "span": { "start": 1784, - "end": 1789, + "end": 1785, "ctxt": 0 }, "value": "x", @@ -4662,7 +4662,7 @@ "type": "Identifier", "span": { "start": 1814, - "end": 1820, + "end": 1815, "ctxt": 0 }, "value": "x", @@ -4733,7 +4733,7 @@ "type": "Identifier", "span": { "start": 1843, - "end": 1847, + "end": 1844, "ctxt": 0 }, "value": "x", @@ -4806,7 +4806,7 @@ "type": "Identifier", "span": { "start": 1866, - "end": 1871, + "end": 1867, "ctxt": 0 }, "value": "x", @@ -4879,7 +4879,7 @@ "type": "Identifier", "span": { "start": 1899, - "end": 1905, + "end": 1900, "ctxt": 0 }, "value": "x", @@ -4950,7 +4950,7 @@ "type": "Identifier", "span": { "start": 1927, - "end": 1931, + "end": 1928, "ctxt": 0 }, "value": "x", @@ -5023,7 +5023,7 @@ "type": "Identifier", "span": { "start": 1949, - "end": 1962, + "end": 1950, "ctxt": 0 }, "value": "x", @@ -5124,7 +5124,7 @@ "type": "Identifier", "span": { "start": 1989, - "end": 1995, + "end": 1990, "ctxt": 0 }, "value": "x", @@ -5195,7 +5195,7 @@ "type": "Identifier", "span": { "start": 2017, - "end": 2021, + "end": 2018, "ctxt": 0 }, "value": "x", @@ -5268,7 +5268,7 @@ "type": "Identifier", "span": { "start": 2039, - "end": 2050, + "end": 2040, "ctxt": 0 }, "value": "x", @@ -5341,7 +5341,7 @@ "type": "Identifier", "span": { "start": 2074, - "end": 2080, + "end": 2075, "ctxt": 0 }, "value": "x", @@ -5412,7 +5412,7 @@ "type": "Identifier", "span": { "start": 2102, - "end": 2106, + "end": 2103, "ctxt": 0 }, "value": "x", @@ -5485,7 +5485,7 @@ "type": "Identifier", "span": { "start": 2124, - "end": 2135, + "end": 2125, "ctxt": 0 }, "value": "x", @@ -5558,7 +5558,7 @@ "type": "Identifier", "span": { "start": 2162, - "end": 2168, + "end": 2163, "ctxt": 0 }, "value": "x", @@ -5629,7 +5629,7 @@ "type": "Identifier", "span": { "start": 2190, - "end": 2194, + "end": 2191, "ctxt": 0 }, "value": "x", @@ -5702,7 +5702,7 @@ "type": "Identifier", "span": { "start": 2212, - "end": 2217, + "end": 2213, "ctxt": 0 }, "value": "x", @@ -5775,7 +5775,7 @@ "type": "Identifier", "span": { "start": 2241, - "end": 2247, + "end": 2242, "ctxt": 0 }, "value": "x", @@ -5846,7 +5846,7 @@ "type": "Identifier", "span": { "start": 2269, - "end": 2273, + "end": 2270, "ctxt": 0 }, "value": "x", @@ -5919,7 +5919,7 @@ "type": "Identifier", "span": { "start": 2291, - "end": 2296, + "end": 2292, "ctxt": 0 }, "value": "x", @@ -5992,7 +5992,7 @@ "type": "Identifier", "span": { "start": 2323, - "end": 2329, + "end": 2324, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithNumericIndexers3.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithNumericIndexers3.json index 8c3326ec6f78..b777347b8eba 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithNumericIndexers3.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithNumericIndexers3.json @@ -724,7 +724,7 @@ "type": "Identifier", "span": { "start": 343, - "end": 347, + "end": 344, "ctxt": 0 }, "value": "x", @@ -797,7 +797,7 @@ "type": "Identifier", "span": { "start": 364, - "end": 368, + "end": 365, "ctxt": 0 }, "value": "x", @@ -870,7 +870,7 @@ "type": "Identifier", "span": { "start": 394, - "end": 400, + "end": 395, "ctxt": 0 }, "value": "x", @@ -941,7 +941,7 @@ "type": "Identifier", "span": { "start": 422, - "end": 426, + "end": 423, "ctxt": 0 }, "value": "x", @@ -1014,7 +1014,7 @@ "type": "Identifier", "span": { "start": 444, - "end": 448, + "end": 445, "ctxt": 0 }, "value": "x", @@ -1087,7 +1087,7 @@ "type": "Identifier", "span": { "start": 475, - "end": 481, + "end": 476, "ctxt": 0 }, "value": "x", @@ -1158,7 +1158,7 @@ "type": "Identifier", "span": { "start": 503, - "end": 515, + "end": 504, "ctxt": 0 }, "value": "x", @@ -1249,7 +1249,7 @@ "type": "Identifier", "span": { "start": 533, - "end": 545, + "end": 534, "ctxt": 0 }, "value": "x", @@ -1340,7 +1340,7 @@ "type": "Identifier", "span": { "start": 572, - "end": 578, + "end": 573, "ctxt": 0 }, "value": "x", @@ -1411,7 +1411,7 @@ "type": "Identifier", "span": { "start": 599, - "end": 603, + "end": 600, "ctxt": 0 }, "value": "x", @@ -1484,7 +1484,7 @@ "type": "Identifier", "span": { "start": 620, - "end": 624, + "end": 621, "ctxt": 0 }, "value": "x", @@ -1557,7 +1557,7 @@ "type": "Identifier", "span": { "start": 650, - "end": 656, + "end": 651, "ctxt": 0 }, "value": "x", @@ -1628,7 +1628,7 @@ "type": "Identifier", "span": { "start": 677, - "end": 688, + "end": 678, "ctxt": 0 }, "value": "x", @@ -1701,7 +1701,7 @@ "type": "Identifier", "span": { "start": 705, - "end": 716, + "end": 706, "ctxt": 0 }, "value": "x", @@ -1774,7 +1774,7 @@ "type": "Identifier", "span": { "start": 742, - "end": 748, + "end": 743, "ctxt": 0 }, "value": "x", @@ -1845,7 +1845,7 @@ "type": "Identifier", "span": { "start": 769, - "end": 780, + "end": 770, "ctxt": 0 }, "value": "x", @@ -1918,7 +1918,7 @@ "type": "Identifier", "span": { "start": 797, - "end": 808, + "end": 798, "ctxt": 0 }, "value": "x", @@ -1991,7 +1991,7 @@ "type": "Identifier", "span": { "start": 834, - "end": 840, + "end": 835, "ctxt": 0 }, "value": "x", @@ -2062,7 +2062,7 @@ "type": "Identifier", "span": { "start": 861, - "end": 865, + "end": 862, "ctxt": 0 }, "value": "x", @@ -2135,7 +2135,7 @@ "type": "Identifier", "span": { "start": 882, - "end": 886, + "end": 883, "ctxt": 0 }, "value": "x", @@ -2208,7 +2208,7 @@ "type": "Identifier", "span": { "start": 909, - "end": 915, + "end": 910, "ctxt": 0 }, "value": "x", @@ -2279,7 +2279,7 @@ "type": "Identifier", "span": { "start": 937, - "end": 941, + "end": 938, "ctxt": 0 }, "value": "x", @@ -2352,7 +2352,7 @@ "type": "Identifier", "span": { "start": 959, - "end": 971, + "end": 960, "ctxt": 0 }, "value": "x", @@ -2443,7 +2443,7 @@ "type": "Identifier", "span": { "start": 998, - "end": 1004, + "end": 999, "ctxt": 0 }, "value": "x", @@ -2514,7 +2514,7 @@ "type": "Identifier", "span": { "start": 1026, - "end": 1030, + "end": 1027, "ctxt": 0 }, "value": "x", @@ -2587,7 +2587,7 @@ "type": "Identifier", "span": { "start": 1048, - "end": 1053, + "end": 1049, "ctxt": 0 }, "value": "x", @@ -2660,7 +2660,7 @@ "type": "Identifier", "span": { "start": 1080, - "end": 1086, + "end": 1081, "ctxt": 0 }, "value": "x", @@ -2731,7 +2731,7 @@ "type": "Identifier", "span": { "start": 1108, - "end": 1112, + "end": 1109, "ctxt": 0 }, "value": "x", @@ -2804,7 +2804,7 @@ "type": "Identifier", "span": { "start": 1130, - "end": 1135, + "end": 1131, "ctxt": 0 }, "value": "x", @@ -2877,7 +2877,7 @@ "type": "Identifier", "span": { "start": 1159, - "end": 1165, + "end": 1160, "ctxt": 0 }, "value": "x", @@ -2948,7 +2948,7 @@ "type": "Identifier", "span": { "start": 1186, - "end": 1190, + "end": 1187, "ctxt": 0 }, "value": "x", @@ -3021,7 +3021,7 @@ "type": "Identifier", "span": { "start": 1207, - "end": 1211, + "end": 1208, "ctxt": 0 }, "value": "x", @@ -3094,7 +3094,7 @@ "type": "Identifier", "span": { "start": 1234, - "end": 1240, + "end": 1235, "ctxt": 0 }, "value": "x", @@ -3165,7 +3165,7 @@ "type": "Identifier", "span": { "start": 1261, - "end": 1265, + "end": 1262, "ctxt": 0 }, "value": "x", @@ -3238,7 +3238,7 @@ "type": "Identifier", "span": { "start": 1282, - "end": 1293, + "end": 1283, "ctxt": 0 }, "value": "x", @@ -3311,7 +3311,7 @@ "type": "Identifier", "span": { "start": 1316, - "end": 1322, + "end": 1317, "ctxt": 0 }, "value": "x", @@ -3382,7 +3382,7 @@ "type": "Identifier", "span": { "start": 1343, - "end": 1347, + "end": 1344, "ctxt": 0 }, "value": "x", @@ -3455,7 +3455,7 @@ "type": "Identifier", "span": { "start": 1364, - "end": 1368, + "end": 1365, "ctxt": 0 }, "value": "x", @@ -3528,7 +3528,7 @@ "type": "Identifier", "span": { "start": 1394, - "end": 1400, + "end": 1395, "ctxt": 0 }, "value": "x", @@ -3599,7 +3599,7 @@ "type": "Identifier", "span": { "start": 1421, - "end": 1425, + "end": 1422, "ctxt": 0 }, "value": "x", @@ -3672,7 +3672,7 @@ "type": "Identifier", "span": { "start": 1442, - "end": 1454, + "end": 1443, "ctxt": 0 }, "value": "x", @@ -3763,7 +3763,7 @@ "type": "Identifier", "span": { "start": 1477, - "end": 1483, + "end": 1478, "ctxt": 0 }, "value": "x", @@ -3834,7 +3834,7 @@ "type": "Identifier", "span": { "start": 1505, - "end": 1509, + "end": 1506, "ctxt": 0 }, "value": "x", @@ -3907,7 +3907,7 @@ "type": "Identifier", "span": { "start": 1527, - "end": 1538, + "end": 1528, "ctxt": 0 }, "value": "x", @@ -3980,7 +3980,7 @@ "type": "Identifier", "span": { "start": 1565, - "end": 1571, + "end": 1566, "ctxt": 0 }, "value": "x", @@ -4051,7 +4051,7 @@ "type": "Identifier", "span": { "start": 1593, - "end": 1597, + "end": 1594, "ctxt": 0 }, "value": "x", @@ -4124,7 +4124,7 @@ "type": "Identifier", "span": { "start": 1615, - "end": 1626, + "end": 1616, "ctxt": 0 }, "value": "x", @@ -4197,7 +4197,7 @@ "type": "Identifier", "span": { "start": 1650, - "end": 1656, + "end": 1651, "ctxt": 0 }, "value": "x", @@ -4268,7 +4268,7 @@ "type": "Identifier", "span": { "start": 1679, - "end": 1683, + "end": 1680, "ctxt": 0 }, "value": "x", @@ -4341,7 +4341,7 @@ "type": "Identifier", "span": { "start": 1702, - "end": 1707, + "end": 1703, "ctxt": 0 }, "value": "x", @@ -4414,7 +4414,7 @@ "type": "Identifier", "span": { "start": 1732, - "end": 1738, + "end": 1733, "ctxt": 0 }, "value": "x", @@ -4485,7 +4485,7 @@ "type": "Identifier", "span": { "start": 1761, - "end": 1765, + "end": 1762, "ctxt": 0 }, "value": "x", @@ -4558,7 +4558,7 @@ "type": "Identifier", "span": { "start": 1784, - "end": 1789, + "end": 1785, "ctxt": 0 }, "value": "x", @@ -4631,7 +4631,7 @@ "type": "Identifier", "span": { "start": 1817, - "end": 1823, + "end": 1818, "ctxt": 0 }, "value": "x", @@ -4702,7 +4702,7 @@ "type": "Identifier", "span": { "start": 1845, - "end": 1849, + "end": 1846, "ctxt": 0 }, "value": "x", @@ -4775,7 +4775,7 @@ "type": "Identifier", "span": { "start": 1867, - "end": 1879, + "end": 1868, "ctxt": 0 }, "value": "x", @@ -4866,7 +4866,7 @@ "type": "Identifier", "span": { "start": 1903, - "end": 1909, + "end": 1904, "ctxt": 0 }, "value": "x", @@ -4937,7 +4937,7 @@ "type": "Identifier", "span": { "start": 1931, - "end": 1935, + "end": 1932, "ctxt": 0 }, "value": "x", @@ -5010,7 +5010,7 @@ "type": "Identifier", "span": { "start": 1953, - "end": 1964, + "end": 1954, "ctxt": 0 }, "value": "x", @@ -5083,7 +5083,7 @@ "type": "Identifier", "span": { "start": 1991, - "end": 1997, + "end": 1992, "ctxt": 0 }, "value": "x", @@ -5154,7 +5154,7 @@ "type": "Identifier", "span": { "start": 2019, - "end": 2023, + "end": 2020, "ctxt": 0 }, "value": "x", @@ -5227,7 +5227,7 @@ "type": "Identifier", "span": { "start": 2041, - "end": 2052, + "end": 2042, "ctxt": 0 }, "value": "x", @@ -5300,7 +5300,7 @@ "type": "Identifier", "span": { "start": 2076, - "end": 2082, + "end": 2077, "ctxt": 0 }, "value": "x", @@ -5371,7 +5371,7 @@ "type": "Identifier", "span": { "start": 2104, - "end": 2108, + "end": 2105, "ctxt": 0 }, "value": "x", @@ -5444,7 +5444,7 @@ "type": "Identifier", "span": { "start": 2126, - "end": 2131, + "end": 2127, "ctxt": 0 }, "value": "x", @@ -5517,7 +5517,7 @@ "type": "Identifier", "span": { "start": 2155, - "end": 2161, + "end": 2156, "ctxt": 0 }, "value": "x", @@ -5588,7 +5588,7 @@ "type": "Identifier", "span": { "start": 2183, - "end": 2187, + "end": 2184, "ctxt": 0 }, "value": "x", @@ -5661,7 +5661,7 @@ "type": "Identifier", "span": { "start": 2205, - "end": 2210, + "end": 2206, "ctxt": 0 }, "value": "x", @@ -5734,7 +5734,7 @@ "type": "Identifier", "span": { "start": 2237, - "end": 2243, + "end": 2238, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithOptionality.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithOptionality.json index 1bfd00cc59e6..f4620121acc5 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithOptionality.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithOptionality.json @@ -518,7 +518,7 @@ "type": "Identifier", "span": { "start": 229, - "end": 233, + "end": 230, "ctxt": 0 }, "value": "x", @@ -591,7 +591,7 @@ "type": "Identifier", "span": { "start": 250, - "end": 254, + "end": 251, "ctxt": 0 }, "value": "x", @@ -664,7 +664,7 @@ "type": "Identifier", "span": { "start": 280, - "end": 286, + "end": 281, "ctxt": 0 }, "value": "x", @@ -735,7 +735,7 @@ "type": "Identifier", "span": { "start": 307, - "end": 318, + "end": 308, "ctxt": 0 }, "value": "x", @@ -808,7 +808,7 @@ "type": "Identifier", "span": { "start": 335, - "end": 346, + "end": 336, "ctxt": 0 }, "value": "x", @@ -881,7 +881,7 @@ "type": "Identifier", "span": { "start": 372, - "end": 378, + "end": 373, "ctxt": 0 }, "value": "x", @@ -952,7 +952,7 @@ "type": "Identifier", "span": { "start": 399, - "end": 403, + "end": 400, "ctxt": 0 }, "value": "x", @@ -1025,7 +1025,7 @@ "type": "Identifier", "span": { "start": 420, - "end": 424, + "end": 421, "ctxt": 0 }, "value": "x", @@ -1098,7 +1098,7 @@ "type": "Identifier", "span": { "start": 447, - "end": 453, + "end": 448, "ctxt": 0 }, "value": "x", @@ -1169,7 +1169,7 @@ "type": "Identifier", "span": { "start": 474, - "end": 478, + "end": 475, "ctxt": 0 }, "value": "x", @@ -1242,7 +1242,7 @@ "type": "Identifier", "span": { "start": 495, - "end": 506, + "end": 496, "ctxt": 0 }, "value": "x", @@ -1315,7 +1315,7 @@ "type": "Identifier", "span": { "start": 529, - "end": 535, + "end": 530, "ctxt": 0 }, "value": "x", @@ -1386,7 +1386,7 @@ "type": "Identifier", "span": { "start": 556, - "end": 560, + "end": 557, "ctxt": 0 }, "value": "x", @@ -1459,7 +1459,7 @@ "type": "Identifier", "span": { "start": 577, - "end": 581, + "end": 578, "ctxt": 0 }, "value": "x", @@ -1532,7 +1532,7 @@ "type": "Identifier", "span": { "start": 604, - "end": 610, + "end": 605, "ctxt": 0 }, "value": "x", @@ -1603,7 +1603,7 @@ "type": "Identifier", "span": { "start": 632, - "end": 636, + "end": 633, "ctxt": 0 }, "value": "x", @@ -1676,7 +1676,7 @@ "type": "Identifier", "span": { "start": 654, - "end": 665, + "end": 655, "ctxt": 0 }, "value": "x", @@ -1749,7 +1749,7 @@ "type": "Identifier", "span": { "start": 689, - "end": 695, + "end": 690, "ctxt": 0 }, "value": "x", @@ -1820,7 +1820,7 @@ "type": "Identifier", "span": { "start": 717, - "end": 721, + "end": 718, "ctxt": 0 }, "value": "x", @@ -1893,7 +1893,7 @@ "type": "Identifier", "span": { "start": 739, - "end": 751, + "end": 740, "ctxt": 0 }, "value": "x", @@ -1984,7 +1984,7 @@ "type": "Identifier", "span": { "start": 775, - "end": 781, + "end": 776, "ctxt": 0 }, "value": "x", @@ -2055,7 +2055,7 @@ "type": "Identifier", "span": { "start": 803, - "end": 807, + "end": 804, "ctxt": 0 }, "value": "x", @@ -2128,7 +2128,7 @@ "type": "Identifier", "span": { "start": 825, - "end": 836, + "end": 826, "ctxt": 0 }, "value": "x", @@ -2201,7 +2201,7 @@ "type": "Identifier", "span": { "start": 863, - "end": 869, + "end": 864, "ctxt": 0 }, "value": "x", @@ -2272,7 +2272,7 @@ "type": "Identifier", "span": { "start": 891, - "end": 895, + "end": 892, "ctxt": 0 }, "value": "x", @@ -2345,7 +2345,7 @@ "type": "Identifier", "span": { "start": 913, - "end": 924, + "end": 914, "ctxt": 0 }, "value": "x", @@ -2418,7 +2418,7 @@ "type": "Identifier", "span": { "start": 948, - "end": 954, + "end": 949, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPrivates.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPrivates.json index 52c2b81263d3..7aa39e0eeec7 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPrivates.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPrivates.json @@ -588,7 +588,7 @@ "type": "Identifier", "span": { "start": 299, - "end": 303, + "end": 300, "ctxt": 0 }, "value": "x", @@ -661,7 +661,7 @@ "type": "Identifier", "span": { "start": 320, - "end": 324, + "end": 321, "ctxt": 0 }, "value": "x", @@ -734,7 +734,7 @@ "type": "Identifier", "span": { "start": 350, - "end": 356, + "end": 351, "ctxt": 0 }, "value": "x", @@ -805,7 +805,7 @@ "type": "Identifier", "span": { "start": 378, - "end": 382, + "end": 379, "ctxt": 0 }, "value": "x", @@ -878,7 +878,7 @@ "type": "Identifier", "span": { "start": 400, - "end": 404, + "end": 401, "ctxt": 0 }, "value": "x", @@ -951,7 +951,7 @@ "type": "Identifier", "span": { "start": 431, - "end": 437, + "end": 432, "ctxt": 0 }, "value": "x", @@ -1022,7 +1022,7 @@ "type": "Identifier", "span": { "start": 459, - "end": 471, + "end": 460, "ctxt": 0 }, "value": "x", @@ -1113,7 +1113,7 @@ "type": "Identifier", "span": { "start": 489, - "end": 501, + "end": 490, "ctxt": 0 }, "value": "x", @@ -1204,7 +1204,7 @@ "type": "Identifier", "span": { "start": 528, - "end": 534, + "end": 529, "ctxt": 0 }, "value": "x", @@ -1275,7 +1275,7 @@ "type": "Identifier", "span": { "start": 555, - "end": 559, + "end": 556, "ctxt": 0 }, "value": "x", @@ -1348,7 +1348,7 @@ "type": "Identifier", "span": { "start": 576, - "end": 580, + "end": 577, "ctxt": 0 }, "value": "x", @@ -1421,7 +1421,7 @@ "type": "Identifier", "span": { "start": 606, - "end": 612, + "end": 607, "ctxt": 0 }, "value": "x", @@ -1492,7 +1492,7 @@ "type": "Identifier", "span": { "start": 633, - "end": 644, + "end": 634, "ctxt": 0 }, "value": "x", @@ -1565,7 +1565,7 @@ "type": "Identifier", "span": { "start": 661, - "end": 672, + "end": 662, "ctxt": 0 }, "value": "x", @@ -1638,7 +1638,7 @@ "type": "Identifier", "span": { "start": 698, - "end": 704, + "end": 699, "ctxt": 0 }, "value": "x", @@ -1709,7 +1709,7 @@ "type": "Identifier", "span": { "start": 725, - "end": 736, + "end": 726, "ctxt": 0 }, "value": "x", @@ -1782,7 +1782,7 @@ "type": "Identifier", "span": { "start": 753, - "end": 764, + "end": 754, "ctxt": 0 }, "value": "x", @@ -1855,7 +1855,7 @@ "type": "Identifier", "span": { "start": 790, - "end": 796, + "end": 791, "ctxt": 0 }, "value": "x", @@ -1926,7 +1926,7 @@ "type": "Identifier", "span": { "start": 817, - "end": 821, + "end": 818, "ctxt": 0 }, "value": "x", @@ -1999,7 +1999,7 @@ "type": "Identifier", "span": { "start": 838, - "end": 842, + "end": 839, "ctxt": 0 }, "value": "x", @@ -2072,7 +2072,7 @@ "type": "Identifier", "span": { "start": 871, - "end": 877, + "end": 872, "ctxt": 0 }, "value": "x", @@ -2143,7 +2143,7 @@ "type": "Identifier", "span": { "start": 899, - "end": 903, + "end": 900, "ctxt": 0 }, "value": "x", @@ -2216,7 +2216,7 @@ "type": "Identifier", "span": { "start": 921, - "end": 933, + "end": 922, "ctxt": 0 }, "value": "x", @@ -2307,7 +2307,7 @@ "type": "Identifier", "span": { "start": 963, - "end": 969, + "end": 964, "ctxt": 0 }, "value": "x", @@ -2378,7 +2378,7 @@ "type": "Identifier", "span": { "start": 991, - "end": 995, + "end": 992, "ctxt": 0 }, "value": "x", @@ -2451,7 +2451,7 @@ "type": "Identifier", "span": { "start": 1013, - "end": 1018, + "end": 1014, "ctxt": 0 }, "value": "x", @@ -2524,7 +2524,7 @@ "type": "Identifier", "span": { "start": 1045, - "end": 1051, + "end": 1046, "ctxt": 0 }, "value": "x", @@ -2595,7 +2595,7 @@ "type": "Identifier", "span": { "start": 1073, - "end": 1077, + "end": 1074, "ctxt": 0 }, "value": "x", @@ -2668,7 +2668,7 @@ "type": "Identifier", "span": { "start": 1095, - "end": 1100, + "end": 1096, "ctxt": 0 }, "value": "x", @@ -2741,7 +2741,7 @@ "type": "Identifier", "span": { "start": 1130, - "end": 1136, + "end": 1131, "ctxt": 0 }, "value": "x", @@ -2812,7 +2812,7 @@ "type": "Identifier", "span": { "start": 1157, - "end": 1161, + "end": 1158, "ctxt": 0 }, "value": "x", @@ -2885,7 +2885,7 @@ "type": "Identifier", "span": { "start": 1178, - "end": 1182, + "end": 1179, "ctxt": 0 }, "value": "x", @@ -2958,7 +2958,7 @@ "type": "Identifier", "span": { "start": 1211, - "end": 1217, + "end": 1212, "ctxt": 0 }, "value": "x", @@ -3029,7 +3029,7 @@ "type": "Identifier", "span": { "start": 1238, - "end": 1242, + "end": 1239, "ctxt": 0 }, "value": "x", @@ -3102,7 +3102,7 @@ "type": "Identifier", "span": { "start": 1259, - "end": 1270, + "end": 1260, "ctxt": 0 }, "value": "x", @@ -3175,7 +3175,7 @@ "type": "Identifier", "span": { "start": 1299, - "end": 1305, + "end": 1300, "ctxt": 0 }, "value": "x", @@ -3246,7 +3246,7 @@ "type": "Identifier", "span": { "start": 1326, - "end": 1330, + "end": 1327, "ctxt": 0 }, "value": "x", @@ -3319,7 +3319,7 @@ "type": "Identifier", "span": { "start": 1347, - "end": 1351, + "end": 1348, "ctxt": 0 }, "value": "x", @@ -3392,7 +3392,7 @@ "type": "Identifier", "span": { "start": 1380, - "end": 1386, + "end": 1381, "ctxt": 0 }, "value": "x", @@ -3463,7 +3463,7 @@ "type": "Identifier", "span": { "start": 1407, - "end": 1411, + "end": 1408, "ctxt": 0 }, "value": "x", @@ -3536,7 +3536,7 @@ "type": "Identifier", "span": { "start": 1428, - "end": 1440, + "end": 1429, "ctxt": 0 }, "value": "x", @@ -3627,7 +3627,7 @@ "type": "Identifier", "span": { "start": 1469, - "end": 1475, + "end": 1470, "ctxt": 0 }, "value": "x", @@ -3698,7 +3698,7 @@ "type": "Identifier", "span": { "start": 1497, - "end": 1501, + "end": 1498, "ctxt": 0 }, "value": "x", @@ -3771,7 +3771,7 @@ "type": "Identifier", "span": { "start": 1519, - "end": 1530, + "end": 1520, "ctxt": 0 }, "value": "x", @@ -3844,7 +3844,7 @@ "type": "Identifier", "span": { "start": 1560, - "end": 1566, + "end": 1561, "ctxt": 0 }, "value": "x", @@ -3915,7 +3915,7 @@ "type": "Identifier", "span": { "start": 1588, - "end": 1592, + "end": 1589, "ctxt": 0 }, "value": "x", @@ -3988,7 +3988,7 @@ "type": "Identifier", "span": { "start": 1610, - "end": 1621, + "end": 1611, "ctxt": 0 }, "value": "x", @@ -4061,7 +4061,7 @@ "type": "Identifier", "span": { "start": 1651, - "end": 1657, + "end": 1652, "ctxt": 0 }, "value": "x", @@ -4132,7 +4132,7 @@ "type": "Identifier", "span": { "start": 1680, - "end": 1684, + "end": 1681, "ctxt": 0 }, "value": "x", @@ -4205,7 +4205,7 @@ "type": "Identifier", "span": { "start": 1703, - "end": 1708, + "end": 1704, "ctxt": 0 }, "value": "x", @@ -4278,7 +4278,7 @@ "type": "Identifier", "span": { "start": 1739, - "end": 1745, + "end": 1740, "ctxt": 0 }, "value": "x", @@ -4349,7 +4349,7 @@ "type": "Identifier", "span": { "start": 1768, - "end": 1772, + "end": 1769, "ctxt": 0 }, "value": "x", @@ -4422,7 +4422,7 @@ "type": "Identifier", "span": { "start": 1791, - "end": 1796, + "end": 1792, "ctxt": 0 }, "value": "x", @@ -4495,7 +4495,7 @@ "type": "Identifier", "span": { "start": 1824, - "end": 1830, + "end": 1825, "ctxt": 0 }, "value": "x", @@ -4566,7 +4566,7 @@ "type": "Identifier", "span": { "start": 1852, - "end": 1856, + "end": 1853, "ctxt": 0 }, "value": "x", @@ -4639,7 +4639,7 @@ "type": "Identifier", "span": { "start": 1874, - "end": 1886, + "end": 1875, "ctxt": 0 }, "value": "x", @@ -4730,7 +4730,7 @@ "type": "Identifier", "span": { "start": 1916, - "end": 1922, + "end": 1917, "ctxt": 0 }, "value": "x", @@ -4801,7 +4801,7 @@ "type": "Identifier", "span": { "start": 1944, - "end": 1948, + "end": 1945, "ctxt": 0 }, "value": "x", @@ -4874,7 +4874,7 @@ "type": "Identifier", "span": { "start": 1966, - "end": 1977, + "end": 1967, "ctxt": 0 }, "value": "x", @@ -4947,7 +4947,7 @@ "type": "Identifier", "span": { "start": 2004, - "end": 2010, + "end": 2005, "ctxt": 0 }, "value": "x", @@ -5018,7 +5018,7 @@ "type": "Identifier", "span": { "start": 2032, - "end": 2036, + "end": 2033, "ctxt": 0 }, "value": "x", @@ -5091,7 +5091,7 @@ "type": "Identifier", "span": { "start": 2054, - "end": 2065, + "end": 2055, "ctxt": 0 }, "value": "x", @@ -5164,7 +5164,7 @@ "type": "Identifier", "span": { "start": 2092, - "end": 2098, + "end": 2093, "ctxt": 0 }, "value": "x", @@ -5235,7 +5235,7 @@ "type": "Identifier", "span": { "start": 2120, - "end": 2124, + "end": 2121, "ctxt": 0 }, "value": "x", @@ -5308,7 +5308,7 @@ "type": "Identifier", "span": { "start": 2142, - "end": 2147, + "end": 2143, "ctxt": 0 }, "value": "x", @@ -5381,7 +5381,7 @@ "type": "Identifier", "span": { "start": 2177, - "end": 2183, + "end": 2178, "ctxt": 0 }, "value": "x", @@ -5452,7 +5452,7 @@ "type": "Identifier", "span": { "start": 2205, - "end": 2209, + "end": 2206, "ctxt": 0 }, "value": "x", @@ -5525,7 +5525,7 @@ "type": "Identifier", "span": { "start": 2227, - "end": 2232, + "end": 2228, "ctxt": 0 }, "value": "x", @@ -5598,7 +5598,7 @@ "type": "Identifier", "span": { "start": 2262, - "end": 2268, + "end": 2263, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPrivates2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPrivates2.json index e53af3c693ff..c349fc281667 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPrivates2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPrivates2.json @@ -241,7 +241,7 @@ "type": "Identifier", "span": { "start": 124, - "end": 136, + "end": 125, "ctxt": 0 }, "value": "x", @@ -332,7 +332,7 @@ "type": "Identifier", "span": { "start": 153, - "end": 165, + "end": 154, "ctxt": 0 }, "value": "x", @@ -423,7 +423,7 @@ "type": "Identifier", "span": { "start": 188, - "end": 194, + "end": 189, "ctxt": 0 }, "value": "x", @@ -494,7 +494,7 @@ "type": "Identifier", "span": { "start": 215, - "end": 227, + "end": 216, "ctxt": 0 }, "value": "x", @@ -585,7 +585,7 @@ "type": "Identifier", "span": { "start": 244, - "end": 256, + "end": 245, "ctxt": 0 }, "value": "x", @@ -676,7 +676,7 @@ "type": "Identifier", "span": { "start": 279, - "end": 285, + "end": 280, "ctxt": 0 }, "value": "x", @@ -747,7 +747,7 @@ "type": "Identifier", "span": { "start": 306, - "end": 318, + "end": 307, "ctxt": 0 }, "value": "x", @@ -838,7 +838,7 @@ "type": "Identifier", "span": { "start": 335, - "end": 347, + "end": 336, "ctxt": 0 }, "value": "x", @@ -929,7 +929,7 @@ "type": "Identifier", "span": { "start": 370, - "end": 376, + "end": 371, "ctxt": 0 }, "value": "x", @@ -1000,7 +1000,7 @@ "type": "Identifier", "span": { "start": 397, - "end": 409, + "end": 398, "ctxt": 0 }, "value": "x", @@ -1107,7 +1107,7 @@ "type": "Identifier", "span": { "start": 435, - "end": 447, + "end": 436, "ctxt": 0 }, "value": "x", @@ -1214,7 +1214,7 @@ "type": "Identifier", "span": { "start": 486, - "end": 492, + "end": 487, "ctxt": 0 }, "value": "x", @@ -1489,7 +1489,7 @@ "type": "Identifier", "span": { "start": 581, - "end": 593, + "end": 582, "ctxt": 0 }, "value": "x", @@ -1596,7 +1596,7 @@ "type": "Identifier", "span": { "start": 618, - "end": 630, + "end": 619, "ctxt": 0 }, "value": "x", @@ -1703,7 +1703,7 @@ "type": "Identifier", "span": { "start": 664, - "end": 670, + "end": 665, "ctxt": 0 }, "value": "x", @@ -1790,7 +1790,7 @@ "type": "Identifier", "span": { "start": 696, - "end": 708, + "end": 697, "ctxt": 0 }, "value": "x", @@ -1897,7 +1897,7 @@ "type": "Identifier", "span": { "start": 733, - "end": 745, + "end": 734, "ctxt": 0 }, "value": "x", @@ -2004,7 +2004,7 @@ "type": "Identifier", "span": { "start": 779, - "end": 785, + "end": 780, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPublics.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPublics.json index 4e366edb9295..b227ccb34fa1 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPublics.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPublics.json @@ -518,7 +518,7 @@ "type": "Identifier", "span": { "start": 248, - "end": 252, + "end": 249, "ctxt": 0 }, "value": "x", @@ -591,7 +591,7 @@ "type": "Identifier", "span": { "start": 269, - "end": 273, + "end": 270, "ctxt": 0 }, "value": "x", @@ -664,7 +664,7 @@ "type": "Identifier", "span": { "start": 299, - "end": 305, + "end": 300, "ctxt": 0 }, "value": "x", @@ -735,7 +735,7 @@ "type": "Identifier", "span": { "start": 327, - "end": 331, + "end": 328, "ctxt": 0 }, "value": "x", @@ -808,7 +808,7 @@ "type": "Identifier", "span": { "start": 349, - "end": 353, + "end": 350, "ctxt": 0 }, "value": "x", @@ -881,7 +881,7 @@ "type": "Identifier", "span": { "start": 380, - "end": 386, + "end": 381, "ctxt": 0 }, "value": "x", @@ -952,7 +952,7 @@ "type": "Identifier", "span": { "start": 408, - "end": 420, + "end": 409, "ctxt": 0 }, "value": "x", @@ -1043,7 +1043,7 @@ "type": "Identifier", "span": { "start": 438, - "end": 450, + "end": 439, "ctxt": 0 }, "value": "x", @@ -1134,7 +1134,7 @@ "type": "Identifier", "span": { "start": 477, - "end": 483, + "end": 478, "ctxt": 0 }, "value": "x", @@ -1205,7 +1205,7 @@ "type": "Identifier", "span": { "start": 504, - "end": 508, + "end": 505, "ctxt": 0 }, "value": "x", @@ -1278,7 +1278,7 @@ "type": "Identifier", "span": { "start": 525, - "end": 529, + "end": 526, "ctxt": 0 }, "value": "x", @@ -1351,7 +1351,7 @@ "type": "Identifier", "span": { "start": 555, - "end": 561, + "end": 556, "ctxt": 0 }, "value": "x", @@ -1422,7 +1422,7 @@ "type": "Identifier", "span": { "start": 582, - "end": 593, + "end": 583, "ctxt": 0 }, "value": "x", @@ -1495,7 +1495,7 @@ "type": "Identifier", "span": { "start": 610, - "end": 621, + "end": 611, "ctxt": 0 }, "value": "x", @@ -1568,7 +1568,7 @@ "type": "Identifier", "span": { "start": 647, - "end": 653, + "end": 648, "ctxt": 0 }, "value": "x", @@ -1639,7 +1639,7 @@ "type": "Identifier", "span": { "start": 674, - "end": 685, + "end": 675, "ctxt": 0 }, "value": "x", @@ -1712,7 +1712,7 @@ "type": "Identifier", "span": { "start": 702, - "end": 713, + "end": 703, "ctxt": 0 }, "value": "x", @@ -1785,7 +1785,7 @@ "type": "Identifier", "span": { "start": 739, - "end": 745, + "end": 740, "ctxt": 0 }, "value": "x", @@ -1856,7 +1856,7 @@ "type": "Identifier", "span": { "start": 766, - "end": 770, + "end": 767, "ctxt": 0 }, "value": "x", @@ -1929,7 +1929,7 @@ "type": "Identifier", "span": { "start": 787, - "end": 791, + "end": 788, "ctxt": 0 }, "value": "x", @@ -2002,7 +2002,7 @@ "type": "Identifier", "span": { "start": 817, - "end": 823, + "end": 818, "ctxt": 0 }, "value": "x", @@ -2073,7 +2073,7 @@ "type": "Identifier", "span": { "start": 845, - "end": 849, + "end": 846, "ctxt": 0 }, "value": "x", @@ -2146,7 +2146,7 @@ "type": "Identifier", "span": { "start": 867, - "end": 879, + "end": 868, "ctxt": 0 }, "value": "x", @@ -2237,7 +2237,7 @@ "type": "Identifier", "span": { "start": 906, - "end": 912, + "end": 907, "ctxt": 0 }, "value": "x", @@ -2308,7 +2308,7 @@ "type": "Identifier", "span": { "start": 933, - "end": 937, + "end": 934, "ctxt": 0 }, "value": "x", @@ -2381,7 +2381,7 @@ "type": "Identifier", "span": { "start": 954, - "end": 958, + "end": 955, "ctxt": 0 }, "value": "x", @@ -2454,7 +2454,7 @@ "type": "Identifier", "span": { "start": 984, - "end": 990, + "end": 985, "ctxt": 0 }, "value": "x", @@ -2525,7 +2525,7 @@ "type": "Identifier", "span": { "start": 1011, - "end": 1015, + "end": 1012, "ctxt": 0 }, "value": "x", @@ -2598,7 +2598,7 @@ "type": "Identifier", "span": { "start": 1032, - "end": 1043, + "end": 1033, "ctxt": 0 }, "value": "x", @@ -2671,7 +2671,7 @@ "type": "Identifier", "span": { "start": 1069, - "end": 1075, + "end": 1070, "ctxt": 0 }, "value": "x", @@ -2742,7 +2742,7 @@ "type": "Identifier", "span": { "start": 1096, - "end": 1100, + "end": 1097, "ctxt": 0 }, "value": "x", @@ -2815,7 +2815,7 @@ "type": "Identifier", "span": { "start": 1117, - "end": 1121, + "end": 1118, "ctxt": 0 }, "value": "x", @@ -2888,7 +2888,7 @@ "type": "Identifier", "span": { "start": 1147, - "end": 1153, + "end": 1148, "ctxt": 0 }, "value": "x", @@ -2959,7 +2959,7 @@ "type": "Identifier", "span": { "start": 1174, - "end": 1178, + "end": 1175, "ctxt": 0 }, "value": "x", @@ -3032,7 +3032,7 @@ "type": "Identifier", "span": { "start": 1195, - "end": 1207, + "end": 1196, "ctxt": 0 }, "value": "x", @@ -3123,7 +3123,7 @@ "type": "Identifier", "span": { "start": 1233, - "end": 1239, + "end": 1234, "ctxt": 0 }, "value": "x", @@ -3194,7 +3194,7 @@ "type": "Identifier", "span": { "start": 1261, - "end": 1265, + "end": 1262, "ctxt": 0 }, "value": "x", @@ -3267,7 +3267,7 @@ "type": "Identifier", "span": { "start": 1283, - "end": 1294, + "end": 1284, "ctxt": 0 }, "value": "x", @@ -3340,7 +3340,7 @@ "type": "Identifier", "span": { "start": 1321, - "end": 1327, + "end": 1322, "ctxt": 0 }, "value": "x", @@ -3411,7 +3411,7 @@ "type": "Identifier", "span": { "start": 1349, - "end": 1353, + "end": 1350, "ctxt": 0 }, "value": "x", @@ -3484,7 +3484,7 @@ "type": "Identifier", "span": { "start": 1371, - "end": 1382, + "end": 1372, "ctxt": 0 }, "value": "x", @@ -3557,7 +3557,7 @@ "type": "Identifier", "span": { "start": 1409, - "end": 1415, + "end": 1410, "ctxt": 0 }, "value": "x", @@ -3628,7 +3628,7 @@ "type": "Identifier", "span": { "start": 1437, - "end": 1441, + "end": 1438, "ctxt": 0 }, "value": "x", @@ -3701,7 +3701,7 @@ "type": "Identifier", "span": { "start": 1459, - "end": 1471, + "end": 1460, "ctxt": 0 }, "value": "x", @@ -3792,7 +3792,7 @@ "type": "Identifier", "span": { "start": 1498, - "end": 1504, + "end": 1499, "ctxt": 0 }, "value": "x", @@ -3863,7 +3863,7 @@ "type": "Identifier", "span": { "start": 1526, - "end": 1530, + "end": 1527, "ctxt": 0 }, "value": "x", @@ -3936,7 +3936,7 @@ "type": "Identifier", "span": { "start": 1548, - "end": 1559, + "end": 1549, "ctxt": 0 }, "value": "x", @@ -4009,7 +4009,7 @@ "type": "Identifier", "span": { "start": 1586, - "end": 1592, + "end": 1587, "ctxt": 0 }, "value": "x", @@ -4080,7 +4080,7 @@ "type": "Identifier", "span": { "start": 1614, - "end": 1618, + "end": 1615, "ctxt": 0 }, "value": "x", @@ -4153,7 +4153,7 @@ "type": "Identifier", "span": { "start": 1636, - "end": 1647, + "end": 1637, "ctxt": 0 }, "value": "x", @@ -4226,7 +4226,7 @@ "type": "Identifier", "span": { "start": 1674, - "end": 1680, + "end": 1675, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithStringIndexers.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithStringIndexers.json index 832b9ceb0b18..bceaf86c5556 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithStringIndexers.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithStringIndexers.json @@ -724,7 +724,7 @@ "type": "Identifier", "span": { "start": 345, - "end": 349, + "end": 346, "ctxt": 0 }, "value": "x", @@ -797,7 +797,7 @@ "type": "Identifier", "span": { "start": 366, - "end": 370, + "end": 367, "ctxt": 0 }, "value": "x", @@ -870,7 +870,7 @@ "type": "Identifier", "span": { "start": 396, - "end": 402, + "end": 397, "ctxt": 0 }, "value": "x", @@ -941,7 +941,7 @@ "type": "Identifier", "span": { "start": 424, - "end": 428, + "end": 425, "ctxt": 0 }, "value": "x", @@ -1014,7 +1014,7 @@ "type": "Identifier", "span": { "start": 446, - "end": 450, + "end": 447, "ctxt": 0 }, "value": "x", @@ -1087,7 +1087,7 @@ "type": "Identifier", "span": { "start": 477, - "end": 483, + "end": 478, "ctxt": 0 }, "value": "x", @@ -1158,7 +1158,7 @@ "type": "Identifier", "span": { "start": 505, - "end": 517, + "end": 506, "ctxt": 0 }, "value": "x", @@ -1249,7 +1249,7 @@ "type": "Identifier", "span": { "start": 535, - "end": 547, + "end": 536, "ctxt": 0 }, "value": "x", @@ -1340,7 +1340,7 @@ "type": "Identifier", "span": { "start": 574, - "end": 580, + "end": 575, "ctxt": 0 }, "value": "x", @@ -1411,7 +1411,7 @@ "type": "Identifier", "span": { "start": 601, - "end": 605, + "end": 602, "ctxt": 0 }, "value": "x", @@ -1484,7 +1484,7 @@ "type": "Identifier", "span": { "start": 622, - "end": 626, + "end": 623, "ctxt": 0 }, "value": "x", @@ -1557,7 +1557,7 @@ "type": "Identifier", "span": { "start": 652, - "end": 658, + "end": 653, "ctxt": 0 }, "value": "x", @@ -1628,7 +1628,7 @@ "type": "Identifier", "span": { "start": 679, - "end": 690, + "end": 680, "ctxt": 0 }, "value": "x", @@ -1701,7 +1701,7 @@ "type": "Identifier", "span": { "start": 707, - "end": 718, + "end": 708, "ctxt": 0 }, "value": "x", @@ -1774,7 +1774,7 @@ "type": "Identifier", "span": { "start": 744, - "end": 750, + "end": 745, "ctxt": 0 }, "value": "x", @@ -1845,7 +1845,7 @@ "type": "Identifier", "span": { "start": 771, - "end": 782, + "end": 772, "ctxt": 0 }, "value": "x", @@ -1918,7 +1918,7 @@ "type": "Identifier", "span": { "start": 799, - "end": 810, + "end": 800, "ctxt": 0 }, "value": "x", @@ -1991,7 +1991,7 @@ "type": "Identifier", "span": { "start": 836, - "end": 842, + "end": 837, "ctxt": 0 }, "value": "x", @@ -2062,7 +2062,7 @@ "type": "Identifier", "span": { "start": 863, - "end": 867, + "end": 864, "ctxt": 0 }, "value": "x", @@ -2135,7 +2135,7 @@ "type": "Identifier", "span": { "start": 884, - "end": 888, + "end": 885, "ctxt": 0 }, "value": "x", @@ -2208,7 +2208,7 @@ "type": "Identifier", "span": { "start": 914, - "end": 920, + "end": 915, "ctxt": 0 }, "value": "x", @@ -2279,7 +2279,7 @@ "type": "Identifier", "span": { "start": 942, - "end": 946, + "end": 943, "ctxt": 0 }, "value": "x", @@ -2352,7 +2352,7 @@ "type": "Identifier", "span": { "start": 964, - "end": 976, + "end": 965, "ctxt": 0 }, "value": "x", @@ -2443,7 +2443,7 @@ "type": "Identifier", "span": { "start": 1003, - "end": 1009, + "end": 1004, "ctxt": 0 }, "value": "x", @@ -2514,7 +2514,7 @@ "type": "Identifier", "span": { "start": 1031, - "end": 1035, + "end": 1032, "ctxt": 0 }, "value": "x", @@ -2587,7 +2587,7 @@ "type": "Identifier", "span": { "start": 1053, - "end": 1058, + "end": 1054, "ctxt": 0 }, "value": "x", @@ -2660,7 +2660,7 @@ "type": "Identifier", "span": { "start": 1085, - "end": 1091, + "end": 1086, "ctxt": 0 }, "value": "x", @@ -2731,7 +2731,7 @@ "type": "Identifier", "span": { "start": 1113, - "end": 1117, + "end": 1114, "ctxt": 0 }, "value": "x", @@ -2804,7 +2804,7 @@ "type": "Identifier", "span": { "start": 1135, - "end": 1140, + "end": 1136, "ctxt": 0 }, "value": "x", @@ -2877,7 +2877,7 @@ "type": "Identifier", "span": { "start": 1167, - "end": 1173, + "end": 1168, "ctxt": 0 }, "value": "x", @@ -2948,7 +2948,7 @@ "type": "Identifier", "span": { "start": 1194, - "end": 1198, + "end": 1195, "ctxt": 0 }, "value": "x", @@ -3021,7 +3021,7 @@ "type": "Identifier", "span": { "start": 1215, - "end": 1219, + "end": 1216, "ctxt": 0 }, "value": "x", @@ -3094,7 +3094,7 @@ "type": "Identifier", "span": { "start": 1245, - "end": 1251, + "end": 1246, "ctxt": 0 }, "value": "x", @@ -3165,7 +3165,7 @@ "type": "Identifier", "span": { "start": 1272, - "end": 1276, + "end": 1273, "ctxt": 0 }, "value": "x", @@ -3238,7 +3238,7 @@ "type": "Identifier", "span": { "start": 1293, - "end": 1304, + "end": 1294, "ctxt": 0 }, "value": "x", @@ -3311,7 +3311,7 @@ "type": "Identifier", "span": { "start": 1330, - "end": 1336, + "end": 1331, "ctxt": 0 }, "value": "x", @@ -3382,7 +3382,7 @@ "type": "Identifier", "span": { "start": 1357, - "end": 1361, + "end": 1358, "ctxt": 0 }, "value": "x", @@ -3455,7 +3455,7 @@ "type": "Identifier", "span": { "start": 1378, - "end": 1382, + "end": 1379, "ctxt": 0 }, "value": "x", @@ -3528,7 +3528,7 @@ "type": "Identifier", "span": { "start": 1408, - "end": 1414, + "end": 1409, "ctxt": 0 }, "value": "x", @@ -3599,7 +3599,7 @@ "type": "Identifier", "span": { "start": 1435, - "end": 1439, + "end": 1436, "ctxt": 0 }, "value": "x", @@ -3672,7 +3672,7 @@ "type": "Identifier", "span": { "start": 1456, - "end": 1468, + "end": 1457, "ctxt": 0 }, "value": "x", @@ -3763,7 +3763,7 @@ "type": "Identifier", "span": { "start": 1494, - "end": 1500, + "end": 1495, "ctxt": 0 }, "value": "x", @@ -3834,7 +3834,7 @@ "type": "Identifier", "span": { "start": 1522, - "end": 1526, + "end": 1523, "ctxt": 0 }, "value": "x", @@ -3907,7 +3907,7 @@ "type": "Identifier", "span": { "start": 1544, - "end": 1555, + "end": 1545, "ctxt": 0 }, "value": "x", @@ -3980,7 +3980,7 @@ "type": "Identifier", "span": { "start": 1582, - "end": 1588, + "end": 1583, "ctxt": 0 }, "value": "x", @@ -4051,7 +4051,7 @@ "type": "Identifier", "span": { "start": 1610, - "end": 1614, + "end": 1611, "ctxt": 0 }, "value": "x", @@ -4124,7 +4124,7 @@ "type": "Identifier", "span": { "start": 1632, - "end": 1643, + "end": 1633, "ctxt": 0 }, "value": "x", @@ -4197,7 +4197,7 @@ "type": "Identifier", "span": { "start": 1670, - "end": 1676, + "end": 1671, "ctxt": 0 }, "value": "x", @@ -4268,7 +4268,7 @@ "type": "Identifier", "span": { "start": 1699, - "end": 1703, + "end": 1700, "ctxt": 0 }, "value": "x", @@ -4341,7 +4341,7 @@ "type": "Identifier", "span": { "start": 1722, - "end": 1727, + "end": 1723, "ctxt": 0 }, "value": "x", @@ -4414,7 +4414,7 @@ "type": "Identifier", "span": { "start": 1755, - "end": 1761, + "end": 1756, "ctxt": 0 }, "value": "x", @@ -4485,7 +4485,7 @@ "type": "Identifier", "span": { "start": 1784, - "end": 1788, + "end": 1785, "ctxt": 0 }, "value": "x", @@ -4558,7 +4558,7 @@ "type": "Identifier", "span": { "start": 1807, - "end": 1812, + "end": 1808, "ctxt": 0 }, "value": "x", @@ -4631,7 +4631,7 @@ "type": "Identifier", "span": { "start": 1840, - "end": 1846, + "end": 1841, "ctxt": 0 }, "value": "x", @@ -4702,7 +4702,7 @@ "type": "Identifier", "span": { "start": 1868, - "end": 1872, + "end": 1869, "ctxt": 0 }, "value": "x", @@ -4775,7 +4775,7 @@ "type": "Identifier", "span": { "start": 1890, - "end": 1902, + "end": 1891, "ctxt": 0 }, "value": "x", @@ -4866,7 +4866,7 @@ "type": "Identifier", "span": { "start": 1929, - "end": 1935, + "end": 1930, "ctxt": 0 }, "value": "x", @@ -4937,7 +4937,7 @@ "type": "Identifier", "span": { "start": 1957, - "end": 1961, + "end": 1958, "ctxt": 0 }, "value": "x", @@ -5010,7 +5010,7 @@ "type": "Identifier", "span": { "start": 1979, - "end": 1990, + "end": 1980, "ctxt": 0 }, "value": "x", @@ -5083,7 +5083,7 @@ "type": "Identifier", "span": { "start": 2017, - "end": 2023, + "end": 2018, "ctxt": 0 }, "value": "x", @@ -5154,7 +5154,7 @@ "type": "Identifier", "span": { "start": 2045, - "end": 2049, + "end": 2046, "ctxt": 0 }, "value": "x", @@ -5227,7 +5227,7 @@ "type": "Identifier", "span": { "start": 2067, - "end": 2078, + "end": 2068, "ctxt": 0 }, "value": "x", @@ -5300,7 +5300,7 @@ "type": "Identifier", "span": { "start": 2105, - "end": 2111, + "end": 2106, "ctxt": 0 }, "value": "x", @@ -5371,7 +5371,7 @@ "type": "Identifier", "span": { "start": 2133, - "end": 2137, + "end": 2134, "ctxt": 0 }, "value": "x", @@ -5444,7 +5444,7 @@ "type": "Identifier", "span": { "start": 2155, - "end": 2160, + "end": 2156, "ctxt": 0 }, "value": "x", @@ -5517,7 +5517,7 @@ "type": "Identifier", "span": { "start": 2187, - "end": 2193, + "end": 2188, "ctxt": 0 }, "value": "x", @@ -5588,7 +5588,7 @@ "type": "Identifier", "span": { "start": 2215, - "end": 2219, + "end": 2216, "ctxt": 0 }, "value": "x", @@ -5661,7 +5661,7 @@ "type": "Identifier", "span": { "start": 2237, - "end": 2242, + "end": 2238, "ctxt": 0 }, "value": "x", @@ -5734,7 +5734,7 @@ "type": "Identifier", "span": { "start": 2269, - "end": 2275, + "end": 2270, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithStringIndexers2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithStringIndexers2.json index 44803337d3f6..7f5bfd15100e 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithStringIndexers2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithStringIndexers2.json @@ -952,7 +952,7 @@ "type": "Identifier", "span": { "start": 428, - "end": 432, + "end": 429, "ctxt": 0 }, "value": "x", @@ -1025,7 +1025,7 @@ "type": "Identifier", "span": { "start": 449, - "end": 453, + "end": 450, "ctxt": 0 }, "value": "x", @@ -1098,7 +1098,7 @@ "type": "Identifier", "span": { "start": 479, - "end": 485, + "end": 480, "ctxt": 0 }, "value": "x", @@ -1169,7 +1169,7 @@ "type": "Identifier", "span": { "start": 507, - "end": 511, + "end": 508, "ctxt": 0 }, "value": "x", @@ -1242,7 +1242,7 @@ "type": "Identifier", "span": { "start": 529, - "end": 533, + "end": 530, "ctxt": 0 }, "value": "x", @@ -1315,7 +1315,7 @@ "type": "Identifier", "span": { "start": 560, - "end": 566, + "end": 561, "ctxt": 0 }, "value": "x", @@ -1386,7 +1386,7 @@ "type": "Identifier", "span": { "start": 588, - "end": 600, + "end": 589, "ctxt": 0 }, "value": "x", @@ -1477,7 +1477,7 @@ "type": "Identifier", "span": { "start": 618, - "end": 630, + "end": 619, "ctxt": 0 }, "value": "x", @@ -1568,7 +1568,7 @@ "type": "Identifier", "span": { "start": 657, - "end": 663, + "end": 658, "ctxt": 0 }, "value": "x", @@ -1639,7 +1639,7 @@ "type": "Identifier", "span": { "start": 684, - "end": 688, + "end": 685, "ctxt": 0 }, "value": "x", @@ -1712,7 +1712,7 @@ "type": "Identifier", "span": { "start": 705, - "end": 709, + "end": 706, "ctxt": 0 }, "value": "x", @@ -1785,7 +1785,7 @@ "type": "Identifier", "span": { "start": 735, - "end": 741, + "end": 736, "ctxt": 0 }, "value": "x", @@ -1856,7 +1856,7 @@ "type": "Identifier", "span": { "start": 762, - "end": 773, + "end": 763, "ctxt": 0 }, "value": "x", @@ -1929,7 +1929,7 @@ "type": "Identifier", "span": { "start": 790, - "end": 801, + "end": 791, "ctxt": 0 }, "value": "x", @@ -2002,7 +2002,7 @@ "type": "Identifier", "span": { "start": 827, - "end": 833, + "end": 828, "ctxt": 0 }, "value": "x", @@ -2073,7 +2073,7 @@ "type": "Identifier", "span": { "start": 854, - "end": 865, + "end": 855, "ctxt": 0 }, "value": "x", @@ -2146,7 +2146,7 @@ "type": "Identifier", "span": { "start": 882, - "end": 893, + "end": 883, "ctxt": 0 }, "value": "x", @@ -2219,7 +2219,7 @@ "type": "Identifier", "span": { "start": 919, - "end": 925, + "end": 920, "ctxt": 0 }, "value": "x", @@ -2290,7 +2290,7 @@ "type": "Identifier", "span": { "start": 946, - "end": 950, + "end": 947, "ctxt": 0 }, "value": "x", @@ -2363,7 +2363,7 @@ "type": "Identifier", "span": { "start": 967, - "end": 971, + "end": 968, "ctxt": 0 }, "value": "x", @@ -2436,7 +2436,7 @@ "type": "Identifier", "span": { "start": 994, - "end": 1000, + "end": 995, "ctxt": 0 }, "value": "x", @@ -2507,7 +2507,7 @@ "type": "Identifier", "span": { "start": 1022, - "end": 1026, + "end": 1023, "ctxt": 0 }, "value": "x", @@ -2580,7 +2580,7 @@ "type": "Identifier", "span": { "start": 1044, - "end": 1057, + "end": 1045, "ctxt": 0 }, "value": "x", @@ -2681,7 +2681,7 @@ "type": "Identifier", "span": { "start": 1081, - "end": 1087, + "end": 1082, "ctxt": 0 }, "value": "x", @@ -2752,7 +2752,7 @@ "type": "Identifier", "span": { "start": 1109, - "end": 1113, + "end": 1110, "ctxt": 0 }, "value": "x", @@ -2825,7 +2825,7 @@ "type": "Identifier", "span": { "start": 1131, - "end": 1136, + "end": 1132, "ctxt": 0 }, "value": "x", @@ -2898,7 +2898,7 @@ "type": "Identifier", "span": { "start": 1163, - "end": 1169, + "end": 1164, "ctxt": 0 }, "value": "x", @@ -2969,7 +2969,7 @@ "type": "Identifier", "span": { "start": 1191, - "end": 1195, + "end": 1192, "ctxt": 0 }, "value": "x", @@ -3042,7 +3042,7 @@ "type": "Identifier", "span": { "start": 1213, - "end": 1218, + "end": 1214, "ctxt": 0 }, "value": "x", @@ -3115,7 +3115,7 @@ "type": "Identifier", "span": { "start": 1242, - "end": 1248, + "end": 1243, "ctxt": 0 }, "value": "x", @@ -3186,7 +3186,7 @@ "type": "Identifier", "span": { "start": 1269, - "end": 1273, + "end": 1270, "ctxt": 0 }, "value": "x", @@ -3259,7 +3259,7 @@ "type": "Identifier", "span": { "start": 1290, - "end": 1294, + "end": 1291, "ctxt": 0 }, "value": "x", @@ -3332,7 +3332,7 @@ "type": "Identifier", "span": { "start": 1317, - "end": 1323, + "end": 1318, "ctxt": 0 }, "value": "x", @@ -3403,7 +3403,7 @@ "type": "Identifier", "span": { "start": 1344, - "end": 1348, + "end": 1345, "ctxt": 0 }, "value": "x", @@ -3476,7 +3476,7 @@ "type": "Identifier", "span": { "start": 1365, - "end": 1376, + "end": 1366, "ctxt": 0 }, "value": "x", @@ -3549,7 +3549,7 @@ "type": "Identifier", "span": { "start": 1402, - "end": 1408, + "end": 1403, "ctxt": 0 }, "value": "x", @@ -3620,7 +3620,7 @@ "type": "Identifier", "span": { "start": 1429, - "end": 1433, + "end": 1430, "ctxt": 0 }, "value": "x", @@ -3693,7 +3693,7 @@ "type": "Identifier", "span": { "start": 1450, - "end": 1454, + "end": 1451, "ctxt": 0 }, "value": "x", @@ -3766,7 +3766,7 @@ "type": "Identifier", "span": { "start": 1480, - "end": 1486, + "end": 1481, "ctxt": 0 }, "value": "x", @@ -3837,7 +3837,7 @@ "type": "Identifier", "span": { "start": 1507, - "end": 1511, + "end": 1508, "ctxt": 0 }, "value": "x", @@ -3910,7 +3910,7 @@ "type": "Identifier", "span": { "start": 1528, - "end": 1538, + "end": 1529, "ctxt": 0 }, "value": "x", @@ -4011,7 +4011,7 @@ "type": "Identifier", "span": { "start": 1561, - "end": 1567, + "end": 1562, "ctxt": 0 }, "value": "x", @@ -4082,7 +4082,7 @@ "type": "Identifier", "span": { "start": 1589, - "end": 1593, + "end": 1590, "ctxt": 0 }, "value": "x", @@ -4155,7 +4155,7 @@ "type": "Identifier", "span": { "start": 1611, - "end": 1622, + "end": 1612, "ctxt": 0 }, "value": "x", @@ -4228,7 +4228,7 @@ "type": "Identifier", "span": { "start": 1646, - "end": 1652, + "end": 1647, "ctxt": 0 }, "value": "x", @@ -4299,7 +4299,7 @@ "type": "Identifier", "span": { "start": 1674, - "end": 1678, + "end": 1675, "ctxt": 0 }, "value": "x", @@ -4372,7 +4372,7 @@ "type": "Identifier", "span": { "start": 1696, - "end": 1707, + "end": 1697, "ctxt": 0 }, "value": "x", @@ -4445,7 +4445,7 @@ "type": "Identifier", "span": { "start": 1734, - "end": 1740, + "end": 1735, "ctxt": 0 }, "value": "x", @@ -4516,7 +4516,7 @@ "type": "Identifier", "span": { "start": 1763, - "end": 1767, + "end": 1764, "ctxt": 0 }, "value": "x", @@ -4589,7 +4589,7 @@ "type": "Identifier", "span": { "start": 1786, - "end": 1791, + "end": 1787, "ctxt": 0 }, "value": "x", @@ -4662,7 +4662,7 @@ "type": "Identifier", "span": { "start": 1816, - "end": 1822, + "end": 1817, "ctxt": 0 }, "value": "x", @@ -4733,7 +4733,7 @@ "type": "Identifier", "span": { "start": 1845, - "end": 1849, + "end": 1846, "ctxt": 0 }, "value": "x", @@ -4806,7 +4806,7 @@ "type": "Identifier", "span": { "start": 1868, - "end": 1873, + "end": 1869, "ctxt": 0 }, "value": "x", @@ -4879,7 +4879,7 @@ "type": "Identifier", "span": { "start": 1901, - "end": 1907, + "end": 1902, "ctxt": 0 }, "value": "x", @@ -4950,7 +4950,7 @@ "type": "Identifier", "span": { "start": 1929, - "end": 1933, + "end": 1930, "ctxt": 0 }, "value": "x", @@ -5023,7 +5023,7 @@ "type": "Identifier", "span": { "start": 1951, - "end": 1964, + "end": 1952, "ctxt": 0 }, "value": "x", @@ -5124,7 +5124,7 @@ "type": "Identifier", "span": { "start": 1991, - "end": 1997, + "end": 1992, "ctxt": 0 }, "value": "x", @@ -5195,7 +5195,7 @@ "type": "Identifier", "span": { "start": 2019, - "end": 2023, + "end": 2020, "ctxt": 0 }, "value": "x", @@ -5268,7 +5268,7 @@ "type": "Identifier", "span": { "start": 2041, - "end": 2052, + "end": 2042, "ctxt": 0 }, "value": "x", @@ -5341,7 +5341,7 @@ "type": "Identifier", "span": { "start": 2076, - "end": 2082, + "end": 2077, "ctxt": 0 }, "value": "x", @@ -5412,7 +5412,7 @@ "type": "Identifier", "span": { "start": 2104, - "end": 2108, + "end": 2105, "ctxt": 0 }, "value": "x", @@ -5485,7 +5485,7 @@ "type": "Identifier", "span": { "start": 2126, - "end": 2137, + "end": 2127, "ctxt": 0 }, "value": "x", @@ -5558,7 +5558,7 @@ "type": "Identifier", "span": { "start": 2164, - "end": 2170, + "end": 2165, "ctxt": 0 }, "value": "x", @@ -5629,7 +5629,7 @@ "type": "Identifier", "span": { "start": 2192, - "end": 2196, + "end": 2193, "ctxt": 0 }, "value": "x", @@ -5702,7 +5702,7 @@ "type": "Identifier", "span": { "start": 2214, - "end": 2219, + "end": 2215, "ctxt": 0 }, "value": "x", @@ -5775,7 +5775,7 @@ "type": "Identifier", "span": { "start": 2243, - "end": 2249, + "end": 2244, "ctxt": 0 }, "value": "x", @@ -5846,7 +5846,7 @@ "type": "Identifier", "span": { "start": 2271, - "end": 2275, + "end": 2272, "ctxt": 0 }, "value": "x", @@ -5919,7 +5919,7 @@ "type": "Identifier", "span": { "start": 2293, - "end": 2298, + "end": 2294, "ctxt": 0 }, "value": "x", @@ -5992,7 +5992,7 @@ "type": "Identifier", "span": { "start": 2325, - "end": 2331, + "end": 2326, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/optionalChainingInference.json b/crates/swc_ecma_parser/tests/tsc/optionalChainingInference.json index 76eeae8fa9e2..8df701df43c5 100644 --- a/crates/swc_ecma_parser/tests/tsc/optionalChainingInference.json +++ b/crates/swc_ecma_parser/tests/tsc/optionalChainingInference.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 83, - "end": 112, + "end": 86, "ctxt": 0 }, "value": "box", diff --git a/crates/swc_ecma_parser/tests/tsc/optionalMethods.json b/crates/swc_ecma_parser/tests/tsc/optionalMethods.json index 0cb846070547..d63be2f8c944 100644 --- a/crates/swc_ecma_parser/tests/tsc/optionalMethods.json +++ b/crates/swc_ecma_parser/tests/tsc/optionalMethods.json @@ -225,7 +225,7 @@ "type": "Identifier", "span": { "start": 151, - "end": 157, + "end": 152, "ctxt": 0 }, "value": "x", @@ -899,7 +899,7 @@ "type": "Identifier", "span": { "start": 355, - "end": 365, + "end": 356, "ctxt": 0 }, "value": "d", @@ -1194,7 +1194,7 @@ "type": "Identifier", "span": { "start": 533, - "end": 539, + "end": 534, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/overloadResolution.json b/crates/swc_ecma_parser/tests/tsc/overloadResolution.json index 79ee450b47db..771e9a3d7d85 100644 --- a/crates/swc_ecma_parser/tests/tsc/overloadResolution.json +++ b/crates/swc_ecma_parser/tests/tsc/overloadResolution.json @@ -328,7 +328,7 @@ "type": "Identifier", "span": { "start": 302, - "end": 311, + "end": 303, "ctxt": 0 }, "value": "s", @@ -407,7 +407,7 @@ "type": "Identifier", "span": { "start": 335, - "end": 344, + "end": 336, "ctxt": 0 }, "value": "s", @@ -693,7 +693,7 @@ "type": "Identifier", "span": { "start": 608, - "end": 617, + "end": 609, "ctxt": 0 }, "value": "s", @@ -729,7 +729,7 @@ "type": "Identifier", "span": { "start": 619, - "end": 628, + "end": 620, "ctxt": 0 }, "value": "n", @@ -808,7 +808,7 @@ "type": "Identifier", "span": { "start": 655, - "end": 664, + "end": 656, "ctxt": 0 }, "value": "n", @@ -844,7 +844,7 @@ "type": "Identifier", "span": { "start": 666, - "end": 670, + "end": 667, "ctxt": 0 }, "value": "t", @@ -1411,7 +1411,7 @@ "type": "Identifier", "span": { "start": 1280, - "end": 1284, + "end": 1281, "ctxt": 0 }, "value": "n", @@ -1532,7 +1532,7 @@ "type": "Identifier", "span": { "start": 1314, - "end": 1323, + "end": 1315, "ctxt": 0 }, "value": "s", @@ -1568,7 +1568,7 @@ "type": "Identifier", "span": { "start": 1325, - "end": 1329, + "end": 1326, "ctxt": 0 }, "value": "t", @@ -1614,7 +1614,7 @@ "type": "Identifier", "span": { "start": 1331, - "end": 1335, + "end": 1332, "ctxt": 0 }, "value": "u", @@ -1768,7 +1768,7 @@ "type": "Identifier", "span": { "start": 1363, - "end": 1367, + "end": 1364, "ctxt": 0 }, "value": "v", @@ -1814,7 +1814,7 @@ "type": "Identifier", "span": { "start": 1369, - "end": 1373, + "end": 1370, "ctxt": 0 }, "value": "u", @@ -1860,7 +1860,7 @@ "type": "Identifier", "span": { "start": 1375, - "end": 1379, + "end": 1376, "ctxt": 0 }, "value": "t", @@ -2781,7 +2781,7 @@ "type": "Identifier", "span": { "start": 2026, - "end": 2030, + "end": 2027, "ctxt": 0 }, "value": "n", @@ -2827,7 +2827,7 @@ "type": "Identifier", "span": { "start": 2032, - "end": 2036, + "end": 2033, "ctxt": 0 }, "value": "m", @@ -2971,7 +2971,7 @@ "type": "Identifier", "span": { "start": 2088, - "end": 2092, + "end": 2089, "ctxt": 0 }, "value": "n", @@ -3017,7 +3017,7 @@ "type": "Identifier", "span": { "start": 2094, - "end": 2098, + "end": 2095, "ctxt": 0 }, "value": "m", @@ -3933,7 +3933,7 @@ "type": "Identifier", "span": { "start": 2835, - "end": 2857, + "end": 2836, "ctxt": 0 }, "value": "f", @@ -3957,7 +3957,7 @@ "type": "Identifier", "span": { "start": 2839, - "end": 2848, + "end": 2840, "ctxt": 0 }, "value": "n", @@ -4058,7 +4058,7 @@ "type": "Identifier", "span": { "start": 2881, - "end": 2903, + "end": 2882, "ctxt": 0 }, "value": "f", @@ -4082,7 +4082,7 @@ "type": "Identifier", "span": { "start": 2885, - "end": 2894, + "end": 2886, "ctxt": 0 }, "value": "n", diff --git a/crates/swc_ecma_parser/tests/tsc/overloadResolutionClassConstructors.json b/crates/swc_ecma_parser/tests/tsc/overloadResolutionClassConstructors.json index 3d89a35fb797..5228709d96dc 100644 --- a/crates/swc_ecma_parser/tests/tsc/overloadResolutionClassConstructors.json +++ b/crates/swc_ecma_parser/tests/tsc/overloadResolutionClassConstructors.json @@ -352,7 +352,7 @@ "type": "Identifier", "span": { "start": 317, - "end": 326, + "end": 318, "ctxt": 0 }, "value": "s", @@ -411,7 +411,7 @@ "type": "Identifier", "span": { "start": 345, - "end": 354, + "end": 346, "ctxt": 0 }, "value": "s", @@ -610,7 +610,7 @@ "type": "Identifier", "span": { "start": 604, - "end": 613, + "end": 605, "ctxt": 0 }, "value": "s", @@ -646,7 +646,7 @@ "type": "Identifier", "span": { "start": 615, - "end": 624, + "end": 616, "ctxt": 0 }, "value": "n", @@ -705,7 +705,7 @@ "type": "Identifier", "span": { "start": 643, - "end": 652, + "end": 644, "ctxt": 0 }, "value": "n", @@ -741,7 +741,7 @@ "type": "Identifier", "span": { "start": 654, - "end": 658, + "end": 655, "ctxt": 0 }, "value": "t", @@ -1223,7 +1223,7 @@ "type": "Identifier", "span": { "start": 1273, - "end": 1277, + "end": 1274, "ctxt": 0 }, "value": "n", @@ -1292,7 +1292,7 @@ "type": "Identifier", "span": { "start": 1296, - "end": 1305, + "end": 1297, "ctxt": 0 }, "value": "s", @@ -1328,7 +1328,7 @@ "type": "Identifier", "span": { "start": 1307, - "end": 1311, + "end": 1308, "ctxt": 0 }, "value": "t", @@ -1374,7 +1374,7 @@ "type": "Identifier", "span": { "start": 1313, - "end": 1317, + "end": 1314, "ctxt": 0 }, "value": "u", @@ -1443,7 +1443,7 @@ "type": "Identifier", "span": { "start": 1336, - "end": 1340, + "end": 1337, "ctxt": 0 }, "value": "v", @@ -1489,7 +1489,7 @@ "type": "Identifier", "span": { "start": 1342, - "end": 1346, + "end": 1343, "ctxt": 0 }, "value": "u", @@ -1535,7 +1535,7 @@ "type": "Identifier", "span": { "start": 1348, - "end": 1352, + "end": 1349, "ctxt": 0 }, "value": "t", @@ -2249,7 +2249,7 @@ "type": "Identifier", "span": { "start": 1982, - "end": 1986, + "end": 1983, "ctxt": 0 }, "value": "n", @@ -2295,7 +2295,7 @@ "type": "Identifier", "span": { "start": 1988, - "end": 1992, + "end": 1989, "ctxt": 0 }, "value": "m", @@ -3230,7 +3230,7 @@ "type": "Identifier", "span": { "start": 2819, - "end": 2841, + "end": 2820, "ctxt": 0 }, "value": "f", @@ -3254,7 +3254,7 @@ "type": "Identifier", "span": { "start": 2823, - "end": 2832, + "end": 2824, "ctxt": 0 }, "value": "n", @@ -3335,7 +3335,7 @@ "type": "Identifier", "span": { "start": 2860, - "end": 2882, + "end": 2861, "ctxt": 0 }, "value": "f", @@ -3359,7 +3359,7 @@ "type": "Identifier", "span": { "start": 2864, - "end": 2873, + "end": 2865, "ctxt": 0 }, "value": "n", diff --git a/crates/swc_ecma_parser/tests/tsc/overloadResolutionConstructors.json b/crates/swc_ecma_parser/tests/tsc/overloadResolutionConstructors.json index 41e7bfdc1f14..5da640d32d85 100644 --- a/crates/swc_ecma_parser/tests/tsc/overloadResolutionConstructors.json +++ b/crates/swc_ecma_parser/tests/tsc/overloadResolutionConstructors.json @@ -342,7 +342,7 @@ "type": "Identifier", "span": { "start": 249, - "end": 258, + "end": 250, "ctxt": 0 }, "value": "s", @@ -397,7 +397,7 @@ "type": "Identifier", "span": { "start": 278, - "end": 287, + "end": 279, "ctxt": 0 }, "value": "s", @@ -698,7 +698,7 @@ "type": "Identifier", "span": { "start": 618, - "end": 627, + "end": 619, "ctxt": 0 }, "value": "s", @@ -725,7 +725,7 @@ "type": "Identifier", "span": { "start": 629, - "end": 638, + "end": 630, "ctxt": 0 }, "value": "n", @@ -780,7 +780,7 @@ "type": "Identifier", "span": { "start": 661, - "end": 670, + "end": 662, "ctxt": 0 }, "value": "n", @@ -807,7 +807,7 @@ "type": "Identifier", "span": { "start": 672, - "end": 676, + "end": 673, "ctxt": 0 }, "value": "t", @@ -1387,7 +1387,7 @@ "type": "Identifier", "span": { "start": 1292, - "end": 1296, + "end": 1293, "ctxt": 0 }, "value": "n", @@ -1484,7 +1484,7 @@ "type": "Identifier", "span": { "start": 1321, - "end": 1330, + "end": 1322, "ctxt": 0 }, "value": "s", @@ -1511,7 +1511,7 @@ "type": "Identifier", "span": { "start": 1332, - "end": 1336, + "end": 1333, "ctxt": 0 }, "value": "t", @@ -1548,7 +1548,7 @@ "type": "Identifier", "span": { "start": 1338, - "end": 1342, + "end": 1339, "ctxt": 0 }, "value": "u", @@ -1678,7 +1678,7 @@ "type": "Identifier", "span": { "start": 1365, - "end": 1369, + "end": 1366, "ctxt": 0 }, "value": "v", @@ -1715,7 +1715,7 @@ "type": "Identifier", "span": { "start": 1371, - "end": 1375, + "end": 1372, "ctxt": 0 }, "value": "u", @@ -1752,7 +1752,7 @@ "type": "Identifier", "span": { "start": 1377, - "end": 1381, + "end": 1378, "ctxt": 0 }, "value": "t", @@ -2688,7 +2688,7 @@ "type": "Identifier", "span": { "start": 2051, - "end": 2055, + "end": 2052, "ctxt": 0 }, "value": "n", @@ -2725,7 +2725,7 @@ "type": "Identifier", "span": { "start": 2057, - "end": 2061, + "end": 2058, "ctxt": 0 }, "value": "m", @@ -2845,7 +2845,7 @@ "type": "Identifier", "span": { "start": 2108, - "end": 2112, + "end": 2109, "ctxt": 0 }, "value": "n", @@ -2882,7 +2882,7 @@ "type": "Identifier", "span": { "start": 2114, - "end": 2118, + "end": 2115, "ctxt": 0 }, "value": "m", @@ -3830,7 +3830,7 @@ "type": "Identifier", "span": { "start": 2908, - "end": 2930, + "end": 2909, "ctxt": 0 }, "value": "f", @@ -3854,7 +3854,7 @@ "type": "Identifier", "span": { "start": 2912, - "end": 2921, + "end": 2913, "ctxt": 0 }, "value": "n", @@ -3931,7 +3931,7 @@ "type": "Identifier", "span": { "start": 2949, - "end": 2971, + "end": 2950, "ctxt": 0 }, "value": "f", @@ -3955,7 +3955,7 @@ "type": "Identifier", "span": { "start": 2953, - "end": 2962, + "end": 2954, "ctxt": 0 }, "value": "n", diff --git a/crates/swc_ecma_parser/tests/tsc/override1.json b/crates/swc_ecma_parser/tests/tsc/override1.json index c0117987621b..f8e14781cca0 100644 --- a/crates/swc_ecma_parser/tests/tsc/override1.json +++ b/crates/swc_ecma_parser/tests/tsc/override1.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 71, - "end": 80, + "end": 72, "ctxt": 0 }, "value": "v", @@ -140,7 +140,7 @@ "type": "Identifier", "span": { "start": 95, - "end": 104, + "end": 96, "ctxt": 0 }, "value": "v", @@ -250,7 +250,7 @@ "type": "Identifier", "span": { "start": 150, - "end": 159, + "end": 151, "ctxt": 0 }, "value": "v", @@ -333,7 +333,7 @@ "type": "Identifier", "span": { "start": 175, - "end": 184, + "end": 176, "ctxt": 0 }, "value": "v", @@ -416,7 +416,7 @@ "type": "Identifier", "span": { "start": 207, - "end": 216, + "end": 208, "ctxt": 0 }, "value": "v", @@ -535,7 +535,7 @@ "type": "Identifier", "span": { "start": 251, - "end": 260, + "end": 252, "ctxt": 0 }, "value": "v", @@ -670,7 +670,7 @@ "type": "Identifier", "span": { "start": 335, - "end": 344, + "end": 336, "ctxt": 0 }, "value": "v", @@ -753,7 +753,7 @@ "type": "Identifier", "span": { "start": 368, - "end": 377, + "end": 369, "ctxt": 0 }, "value": "v", @@ -836,7 +836,7 @@ "type": "Identifier", "span": { "start": 408, - "end": 417, + "end": 409, "ctxt": 0 }, "value": "v", diff --git a/crates/swc_ecma_parser/tests/tsc/override19.json b/crates/swc_ecma_parser/tests/tsc/override19.json index b00f28cecf9b..39c78f7c2204 100644 --- a/crates/swc_ecma_parser/tests/tsc/override19.json +++ b/crates/swc_ecma_parser/tests/tsc/override19.json @@ -122,7 +122,7 @@ "type": "Identifier", "span": { "start": 155, - "end": 165, + "end": 162, "ctxt": 0 }, "value": "Context", @@ -168,7 +168,7 @@ "type": "Identifier", "span": { "start": 167, - "end": 174, + "end": 171, "ctxt": 0 }, "value": "Base", diff --git a/crates/swc_ecma_parser/tests/tsc/override2.json b/crates/swc_ecma_parser/tests/tsc/override2.json index c78c6c6e3821..99d070a2c86f 100644 --- a/crates/swc_ecma_parser/tests/tsc/override2.json +++ b/crates/swc_ecma_parser/tests/tsc/override2.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 89, - "end": 98, + "end": 90, "ctxt": 0 }, "value": "v", @@ -148,7 +148,7 @@ "type": "Identifier", "span": { "start": 125, - "end": 134, + "end": 126, "ctxt": 0 }, "value": "v", @@ -239,7 +239,7 @@ "type": "Identifier", "span": { "start": 160, - "end": 169, + "end": 161, "ctxt": 0 }, "value": "v", @@ -392,7 +392,7 @@ "type": "Identifier", "span": { "start": 266, - "end": 271, + "end": 267, "ctxt": 0 }, "value": "v", @@ -528,7 +528,7 @@ "type": "Identifier", "span": { "start": 349, - "end": 354, + "end": 350, "ctxt": 0 }, "value": "v", @@ -788,7 +788,7 @@ "type": "Identifier", "span": { "start": 472, - "end": 477, + "end": 473, "ctxt": 0 }, "value": "v", @@ -896,7 +896,7 @@ "type": "Identifier", "span": { "start": 505, - "end": 510, + "end": 506, "ctxt": 0 }, "value": "v", diff --git a/crates/swc_ecma_parser/tests/tsc/override4.json b/crates/swc_ecma_parser/tests/tsc/override4.json index c0c7f5c1bca3..c7c7c0d9789a 100644 --- a/crates/swc_ecma_parser/tests/tsc/override4.json +++ b/crates/swc_ecma_parser/tests/tsc/override4.json @@ -291,7 +291,7 @@ "type": "Identifier", "span": { "start": 151, - "end": 160, + "end": 152, "ctxt": 0 }, "value": "v", @@ -374,7 +374,7 @@ "type": "Identifier", "span": { "start": 175, - "end": 184, + "end": 176, "ctxt": 0 }, "value": "v", @@ -718,7 +718,7 @@ "type": "Identifier", "span": { "start": 328, - "end": 337, + "end": 329, "ctxt": 0 }, "value": "v", @@ -801,7 +801,7 @@ "type": "Identifier", "span": { "start": 353, - "end": 362, + "end": 354, "ctxt": 0 }, "value": "v", diff --git a/crates/swc_ecma_parser/tests/tsc/override6.json b/crates/swc_ecma_parser/tests/tsc/override6.json index 76c3580d8a83..917a975b2e49 100644 --- a/crates/swc_ecma_parser/tests/tsc/override6.json +++ b/crates/swc_ecma_parser/tests/tsc/override6.json @@ -113,7 +113,7 @@ "type": "Identifier", "span": { "start": 113, - "end": 124, + "end": 116, "ctxt": 0 }, "value": "foo", @@ -152,7 +152,7 @@ "type": "Identifier", "span": { "start": 133, - "end": 144, + "end": 136, "ctxt": 0 }, "value": "bar", @@ -303,7 +303,7 @@ "type": "Identifier", "span": { "start": 228, - "end": 239, + "end": 231, "ctxt": 0 }, "value": "foo", @@ -342,7 +342,7 @@ "type": "Identifier", "span": { "start": 248, - "end": 259, + "end": 251, "ctxt": 0 }, "value": "baz", diff --git a/crates/swc_ecma_parser/tests/tsc/override8.json b/crates/swc_ecma_parser/tests/tsc/override8.json index bf75199c489c..5190c836509f 100644 --- a/crates/swc_ecma_parser/tests/tsc/override8.json +++ b/crates/swc_ecma_parser/tests/tsc/override8.json @@ -131,7 +131,7 @@ "type": "Identifier", "span": { "start": 122, - "end": 131, + "end": 123, "ctxt": 0 }, "value": "a", @@ -170,7 +170,7 @@ "type": "Identifier", "span": { "start": 140, - "end": 149, + "end": 141, "ctxt": 0 }, "value": "b", @@ -303,7 +303,7 @@ "type": "Identifier", "span": { "start": 213, - "end": 222, + "end": 214, "ctxt": 0 }, "value": "a", @@ -400,7 +400,7 @@ "type": "Identifier", "span": { "start": 281, - "end": 290, + "end": 282, "ctxt": 0 }, "value": "a", @@ -589,7 +589,7 @@ "type": "Identifier", "span": { "start": 382, - "end": 391, + "end": 383, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/overrideInterfaceProperty.json b/crates/swc_ecma_parser/tests/tsc/overrideInterfaceProperty.json index 441856ea9bf0..4c0fbba6e29a 100644 --- a/crates/swc_ecma_parser/tests/tsc/overrideInterfaceProperty.json +++ b/crates/swc_ecma_parser/tests/tsc/overrideInterfaceProperty.json @@ -237,7 +237,7 @@ "type": "Identifier", "span": { "start": 173, - "end": 218, + "end": 180, "ctxt": 0 }, "value": "entries", diff --git a/crates/swc_ecma_parser/tests/tsc/paramTagOnCallExpression.json b/crates/swc_ecma_parser/tests/tsc/paramTagOnCallExpression.json index 8757b0f2a906..5ab01e10dfe3 100644 --- a/crates/swc_ecma_parser/tests/tsc/paramTagOnCallExpression.json +++ b/crates/swc_ecma_parser/tests/tsc/paramTagOnCallExpression.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 104, - "end": 116, + "end": 108, "ctxt": 0 }, "value": "type", diff --git a/crates/swc_ecma_parser/tests/tsc/paramTagOnFunctionUsingArguments.json b/crates/swc_ecma_parser/tests/tsc/paramTagOnFunctionUsingArguments.json index d9d1da99c61a..fc9fc16298c9 100644 --- a/crates/swc_ecma_parser/tests/tsc/paramTagOnFunctionUsingArguments.json +++ b/crates/swc_ecma_parser/tests/tsc/paramTagOnFunctionUsingArguments.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 121, - "end": 133, + "end": 125, "ctxt": 0 }, "value": "type", diff --git a/crates/swc_ecma_parser/tests/tsc/parameterInitializersForwardReferencing1.json b/crates/swc_ecma_parser/tests/tsc/parameterInitializersForwardReferencing1.json index b0395be8e75d..062d32df596a 100644 --- a/crates/swc_ecma_parser/tests/tsc/parameterInitializersForwardReferencing1.json +++ b/crates/swc_ecma_parser/tests/tsc/parameterInitializersForwardReferencing1.json @@ -1180,7 +1180,7 @@ "type": "Identifier", "span": { "start": 674, - "end": 686, + "end": 678, "ctxt": 0 }, "value": "foo1", diff --git a/crates/swc_ecma_parser/tests/tsc/parameterInitializersForwardReferencing1_es6.json b/crates/swc_ecma_parser/tests/tsc/parameterInitializersForwardReferencing1_es6.json index c2ec559e01e5..40f6f876e871 100644 --- a/crates/swc_ecma_parser/tests/tsc/parameterInitializersForwardReferencing1_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/parameterInitializersForwardReferencing1_es6.json @@ -1180,7 +1180,7 @@ "type": "Identifier", "span": { "start": 694, - "end": 706, + "end": 698, "ctxt": 0 }, "value": "foo1", diff --git a/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping1.json b/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping1.json index 2fad314dcee4..3b10637b9aad 100644 --- a/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping1.json +++ b/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping1.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 18, - "end": 32, + "end": 19, "ctxt": 0 }, "value": "g", @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 22, - "end": 26, + "end": 23, "ctxt": 0 }, "value": "x", @@ -134,7 +134,7 @@ "type": "Identifier", "span": { "start": 34, - "end": 38, + "end": 35, "ctxt": 0 }, "value": "x", @@ -265,7 +265,7 @@ "type": "Identifier", "span": { "start": 60, - "end": 74, + "end": 61, "ctxt": 0 }, "value": "g", @@ -289,7 +289,7 @@ "type": "Identifier", "span": { "start": 64, - "end": 68, + "end": 65, "ctxt": 0 }, "value": "x", @@ -367,7 +367,7 @@ "type": "Identifier", "span": { "start": 76, - "end": 90, + "end": 77, "ctxt": 0 }, "value": "h", @@ -391,7 +391,7 @@ "type": "Identifier", "span": { "start": 80, - "end": 84, + "end": 81, "ctxt": 0 }, "value": "y", @@ -469,7 +469,7 @@ "type": "Identifier", "span": { "start": 92, - "end": 96, + "end": 93, "ctxt": 0 }, "value": "x", @@ -600,7 +600,7 @@ "type": "Identifier", "span": { "start": 118, - "end": 132, + "end": 119, "ctxt": 0 }, "value": "g", @@ -624,7 +624,7 @@ "type": "Identifier", "span": { "start": 122, - "end": 126, + "end": 123, "ctxt": 0 }, "value": "x", @@ -702,7 +702,7 @@ "type": "Identifier", "span": { "start": 134, - "end": 138, + "end": 135, "ctxt": 0 }, "value": "x", @@ -3035,7 +3035,7 @@ "type": "Identifier", "span": { "start": 773, - "end": 782, + "end": 774, "ctxt": 0 }, "value": "x", @@ -3164,7 +3164,7 @@ "type": "Identifier", "span": { "start": 818, - "end": 827, + "end": 819, "ctxt": 0 }, "value": "x", @@ -3324,7 +3324,7 @@ "type": "Identifier", "span": { "start": 873, - "end": 882, + "end": 874, "ctxt": 0 }, "value": "p", @@ -3411,7 +3411,7 @@ "type": "Identifier", "span": { "start": 899, - "end": 908, + "end": 900, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping2.json b/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping2.json index 8d45757fb549..c6e3823f4eed 100644 --- a/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping2.json +++ b/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping2.json @@ -37,7 +37,7 @@ "type": "Identifier", "span": { "start": 376, - "end": 393, + "end": 377, "ctxt": 0 }, "value": "x", @@ -61,7 +61,7 @@ "type": "Identifier", "span": { "start": 383, - "end": 387, + "end": 384, "ctxt": 0 }, "value": "p", @@ -215,7 +215,7 @@ "type": "Identifier", "span": { "start": 425, - "end": 436, + "end": 426, "ctxt": 0 }, "value": "f", @@ -261,7 +261,7 @@ "type": "Identifier", "span": { "start": 438, - "end": 442, + "end": 439, "ctxt": 0 }, "value": "x", @@ -392,7 +392,7 @@ "type": "Identifier", "span": { "start": 464, - "end": 475, + "end": 465, "ctxt": 0 }, "value": "f", @@ -438,7 +438,7 @@ "type": "Identifier", "span": { "start": 477, - "end": 488, + "end": 478, "ctxt": 0 }, "value": "g", @@ -484,7 +484,7 @@ "type": "Identifier", "span": { "start": 490, - "end": 494, + "end": 491, "ctxt": 0 }, "value": "x", @@ -4713,7 +4713,7 @@ "type": "Identifier", "span": { "start": 1920, - "end": 1929, + "end": 1921, "ctxt": 0 }, "value": "p", @@ -4800,7 +4800,7 @@ "type": "Identifier", "span": { "start": 1946, - "end": 1955, + "end": 1947, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping3.json b/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping3.json index 96208d137f6d..3f1698ea7e44 100644 --- a/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping3.json +++ b/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping3.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 174, - "end": 204, + "end": 182, "ctxt": 0 }, "value": "tempStrs", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 206, - "end": 220, + "end": 207, "ctxt": 0 }, "value": "g", @@ -102,7 +102,7 @@ "type": "Identifier", "span": { "start": 210, - "end": 214, + "end": 211, "ctxt": 0 }, "value": "x", @@ -180,7 +180,7 @@ "type": "Identifier", "span": { "start": 222, - "end": 226, + "end": 223, "ctxt": 0 }, "value": "x", @@ -311,7 +311,7 @@ "type": "Identifier", "span": { "start": 252, - "end": 282, + "end": 260, "ctxt": 0 }, "value": "tempStrs", @@ -357,7 +357,7 @@ "type": "Identifier", "span": { "start": 284, - "end": 298, + "end": 285, "ctxt": 0 }, "value": "g", @@ -381,7 +381,7 @@ "type": "Identifier", "span": { "start": 288, - "end": 292, + "end": 289, "ctxt": 0 }, "value": "x", @@ -459,7 +459,7 @@ "type": "Identifier", "span": { "start": 300, - "end": 314, + "end": 301, "ctxt": 0 }, "value": "h", @@ -483,7 +483,7 @@ "type": "Identifier", "span": { "start": 304, - "end": 308, + "end": 305, "ctxt": 0 }, "value": "y", @@ -561,7 +561,7 @@ "type": "Identifier", "span": { "start": 316, - "end": 320, + "end": 317, "ctxt": 0 }, "value": "x", @@ -692,7 +692,7 @@ "type": "Identifier", "span": { "start": 346, - "end": 376, + "end": 354, "ctxt": 0 }, "value": "tempStrs", @@ -738,7 +738,7 @@ "type": "Identifier", "span": { "start": 378, - "end": 392, + "end": 379, "ctxt": 0 }, "value": "g", @@ -762,7 +762,7 @@ "type": "Identifier", "span": { "start": 382, - "end": 386, + "end": 383, "ctxt": 0 }, "value": "x", @@ -840,7 +840,7 @@ "type": "Identifier", "span": { "start": 394, - "end": 398, + "end": 395, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/parenthesizedTypes.json b/crates/swc_ecma_parser/tests/tsc/parenthesizedTypes.json index 7a7cd49d8959..7c0d65bb1a7a 100644 --- a/crates/swc_ecma_parser/tests/tsc/parenthesizedTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/parenthesizedTypes.json @@ -643,7 +643,7 @@ "type": "Identifier", "span": { "start": 180, - "end": 189, + "end": 181, "ctxt": 0 }, "value": "x", @@ -745,7 +745,7 @@ "type": "Identifier", "span": { "start": 211, - "end": 222, + "end": 212, "ctxt": 0 }, "value": "x", @@ -1186,7 +1186,7 @@ "type": "Identifier", "span": { "start": 346, - "end": 355, + "end": 347, "ctxt": 0 }, "value": "x", @@ -1249,7 +1249,7 @@ "type": "Identifier", "span": { "start": 372, - "end": 381, + "end": 373, "ctxt": 0 }, "value": "x", @@ -1379,7 +1379,7 @@ "type": "Identifier", "span": { "start": 409, - "end": 418, + "end": 410, "ctxt": 0 }, "value": "x", @@ -1444,7 +1444,7 @@ "type": "Identifier", "span": { "start": 435, - "end": 444, + "end": 436, "ctxt": 0 }, "value": "x", @@ -1585,7 +1585,7 @@ "type": "Identifier", "span": { "start": 475, - "end": 484, + "end": 476, "ctxt": 0 }, "value": "x", @@ -1648,7 +1648,7 @@ "type": "Identifier", "span": { "start": 501, - "end": 510, + "end": 502, "ctxt": 0 }, "value": "x", @@ -1790,7 +1790,7 @@ "type": "Identifier", "span": { "start": 541, - "end": 550, + "end": 542, "ctxt": 0 }, "value": "x", @@ -1855,7 +1855,7 @@ "type": "Identifier", "span": { "start": 567, - "end": 576, + "end": 568, "ctxt": 0 }, "value": "x", @@ -2005,7 +2005,7 @@ "type": "Identifier", "span": { "start": 607, - "end": 616, + "end": 608, "ctxt": 0 }, "value": "x", @@ -2070,7 +2070,7 @@ "type": "Identifier", "span": { "start": 633, - "end": 642, + "end": 634, "ctxt": 0 }, "value": "x", @@ -2394,7 +2394,7 @@ "type": "Identifier", "span": { "start": 734, - "end": 745, + "end": 740, "ctxt": 0 }, "value": "string", diff --git a/crates/swc_ecma_parser/tests/tsc/parser536727.json b/crates/swc_ecma_parser/tests/tsc/parser536727.json index d11a4a0cecca..a33a1278046f 100644 --- a/crates/swc_ecma_parser/tests/tsc/parser536727.json +++ b/crates/swc_ecma_parser/tests/tsc/parser536727.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 14, - "end": 38, + "end": 15, "ctxt": 0 }, "value": "f", @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 18, - "end": 27, + "end": 19, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/parserArgumentList1.json b/crates/swc_ecma_parser/tests/tsc/parserArgumentList1.json index b0803d076c30..4c8fd414d3a2 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserArgumentList1.json +++ b/crates/swc_ecma_parser/tests/tsc/parserArgumentList1.json @@ -39,7 +39,7 @@ "type": "Identifier", "span": { "start": 30, - "end": 46, + "end": 34, "ctxt": 0 }, "value": "node", @@ -85,7 +85,7 @@ "type": "Identifier", "span": { "start": 48, - "end": 64, + "end": 57, "ctxt": 0 }, "value": "className", diff --git a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression6.json b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression6.json index adffddec04e2..e2d82ed3e372 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression6.json +++ b/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression6.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 14, - "end": 23, + "end": 15, "ctxt": 0 }, "value": "q", @@ -68,7 +68,7 @@ "type": "Identifier", "span": { "start": 25, - "end": 34, + "end": 26, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/tsc/parserAstSpans1.json b/crates/swc_ecma_parser/tests/tsc/parserAstSpans1.json index 3681edec7b62..0b5b6f722674 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserAstSpans1.json +++ b/crates/swc_ecma_parser/tests/tsc/parserAstSpans1.json @@ -3187,7 +3187,7 @@ "type": "Identifier", "span": { "start": 1801, - "end": 1810, + "end": 1802, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/parserClass1.json b/crates/swc_ecma_parser/tests/tsc/parserClass1.json index 5e3f796ede11..15c752e3538a 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserClass1.json +++ b/crates/swc_ecma_parser/tests/tsc/parserClass1.json @@ -464,7 +464,7 @@ "type": "Identifier", "span": { "start": 327, - "end": 336, + "end": 328, "ctxt": 0 }, "value": "s", diff --git a/crates/swc_ecma_parser/tests/tsc/parserClass2.json b/crates/swc_ecma_parser/tests/tsc/parserClass2.json index 81ca691b6b51..d293ca856d7b 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserClass2.json +++ b/crates/swc_ecma_parser/tests/tsc/parserClass2.json @@ -66,7 +66,7 @@ "type": "Identifier", "span": { "start": 83, - "end": 98, + "end": 89, "ctxt": 0 }, "value": "logger", diff --git a/crates/swc_ecma_parser/tests/tsc/parserClassDeclaration17.json b/crates/swc_ecma_parser/tests/tsc/parserClassDeclaration17.json index 05f1d67823a9..1b59f76ebd67 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserClassDeclaration17.json +++ b/crates/swc_ecma_parser/tests/tsc/parserClassDeclaration17.json @@ -202,7 +202,7 @@ "type": "Identifier", "span": { "start": 134, - "end": 140, + "end": 135, "ctxt": 0 }, "value": "o", diff --git a/crates/swc_ecma_parser/tests/tsc/parserErrorRecovery_IncompleteMemberVariable1.json b/crates/swc_ecma_parser/tests/tsc/parserErrorRecovery_IncompleteMemberVariable1.json index 2f4856affdd0..7f9573850854 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserErrorRecovery_IncompleteMemberVariable1.json +++ b/crates/swc_ecma_parser/tests/tsc/parserErrorRecovery_IncompleteMemberVariable1.json @@ -218,7 +218,7 @@ "type": "Identifier", "span": { "start": 223, - "end": 232, + "end": 224, "ctxt": 0 }, "value": "x", @@ -257,7 +257,7 @@ "type": "Identifier", "span": { "start": 241, - "end": 250, + "end": 242, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/parserErrorRecovery_ParameterList6.json b/crates/swc_ecma_parser/tests/tsc/parserErrorRecovery_ParameterList6.json index 5859d3aae485..8cc8998ce95c 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserErrorRecovery_ParameterList6.json +++ b/crates/swc_ecma_parser/tests/tsc/parserErrorRecovery_ParameterList6.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 32, - "end": 40, + "end": 33, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/parserGenericsInTypeContexts1.json b/crates/swc_ecma_parser/tests/tsc/parserGenericsInTypeContexts1.json index a9db8324ac2b..eacb722f8b72 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserGenericsInTypeContexts1.json +++ b/crates/swc_ecma_parser/tests/tsc/parserGenericsInTypeContexts1.json @@ -632,7 +632,7 @@ "type": "Identifier", "span": { "start": 142, - "end": 149, + "end": 143, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/parserGenericsInTypeContexts2.json b/crates/swc_ecma_parser/tests/tsc/parserGenericsInTypeContexts2.json index d99c8096b517..70360ad7c243 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserGenericsInTypeContexts2.json +++ b/crates/swc_ecma_parser/tests/tsc/parserGenericsInTypeContexts2.json @@ -1353,7 +1353,7 @@ "type": "Identifier", "span": { "start": 226, - "end": 245, + "end": 227, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/parserInterfaceDeclaration9.json b/crates/swc_ecma_parser/tests/tsc/parserInterfaceDeclaration9.json index 8f21a2a35be7..354ce591680d 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserInterfaceDeclaration9.json +++ b/crates/swc_ecma_parser/tests/tsc/parserInterfaceDeclaration9.json @@ -96,7 +96,7 @@ "type": "Identifier", "span": { "start": 51, - "end": 64, + "end": 56, "ctxt": 0 }, "value": "value", @@ -213,7 +213,7 @@ "type": "Identifier", "span": { "start": 120, - "end": 133, + "end": 125, "ctxt": 0 }, "value": "value", @@ -330,7 +330,7 @@ "type": "Identifier", "span": { "start": 188, - "end": 201, + "end": 193, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/parserMemberAccessorDeclaration15.json b/crates/swc_ecma_parser/tests/tsc/parserMemberAccessorDeclaration15.json index 65e03a6a21e1..89869da76717 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserMemberAccessorDeclaration15.json +++ b/crates/swc_ecma_parser/tests/tsc/parserMemberAccessorDeclaration15.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 45, - "end": 54, + "end": 46, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/parserModule1.json b/crates/swc_ecma_parser/tests/tsc/parserModule1.json index 0207fa5bf4a1..5c21e02c5318 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserModule1.json +++ b/crates/swc_ecma_parser/tests/tsc/parserModule1.json @@ -149,7 +149,7 @@ "type": "Identifier", "span": { "start": 138, - "end": 152, + "end": 144, "ctxt": 0 }, "value": "output", @@ -369,7 +369,7 @@ "type": "Identifier", "span": { "start": 312, - "end": 326, + "end": 318, "ctxt": 0 }, "value": "output", @@ -538,7 +538,7 @@ "type": "Identifier", "span": { "start": 474, - "end": 483, + "end": 475, "ctxt": 0 }, "value": "s", @@ -689,7 +689,7 @@ "type": "Identifier", "span": { "start": 594, - "end": 612, + "end": 603, "ctxt": 0 }, "value": "condition", @@ -725,7 +725,7 @@ "type": "Identifier", "span": { "start": 614, - "end": 623, + "end": 615, "ctxt": 0 }, "value": "s", diff --git a/crates/swc_ecma_parser/tests/tsc/parserModuleDeclaration11.json b/crates/swc_ecma_parser/tests/tsc/parserModuleDeclaration11.json index 84464b977634..dd8fa990bd4b 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserModuleDeclaration11.json +++ b/crates/swc_ecma_parser/tests/tsc/parserModuleDeclaration11.json @@ -96,7 +96,7 @@ "type": "Identifier", "span": { "start": 69, - "end": 78, + "end": 70, "ctxt": 0 }, "value": "s", diff --git a/crates/swc_ecma_parser/tests/tsc/parserOptionalTypeMembers1.json b/crates/swc_ecma_parser/tests/tsc/parserOptionalTypeMembers1.json index a6e10c3ff0d2..73b930da5091 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserOptionalTypeMembers1.json +++ b/crates/swc_ecma_parser/tests/tsc/parserOptionalTypeMembers1.json @@ -263,7 +263,7 @@ "type": "Identifier", "span": { "start": 154, - "end": 160, + "end": 155, "ctxt": 0 }, "value": "v", diff --git a/crates/swc_ecma_parser/tests/tsc/parserOverloadOnConstants1.json b/crates/swc_ecma_parser/tests/tsc/parserOverloadOnConstants1.json index ca2cb4ec1037..e0690392ea58 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserOverloadOnConstants1.json +++ b/crates/swc_ecma_parser/tests/tsc/parserOverloadOnConstants1.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 40, - "end": 55, + "end": 47, "ctxt": 0 }, "value": "tagName", @@ -137,7 +137,7 @@ "type": "Identifier", "span": { "start": 89, - "end": 106, + "end": 96, "ctxt": 0 }, "value": "tagName", @@ -224,7 +224,7 @@ "type": "Identifier", "span": { "start": 146, - "end": 160, + "end": 153, "ctxt": 0 }, "value": "tagName", @@ -311,7 +311,7 @@ "type": "Identifier", "span": { "start": 197, - "end": 212, + "end": 204, "ctxt": 0 }, "value": "tagName", diff --git a/crates/swc_ecma_parser/tests/tsc/parserParameterList6.json b/crates/swc_ecma_parser/tests/tsc/parserParameterList6.json index da52bc54781e..c2207231d6d4 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserParameterList6.json +++ b/crates/swc_ecma_parser/tests/tsc/parserParameterList6.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 25, - "end": 45, + "end": 26, "ctxt": 0 }, "value": "C", diff --git a/crates/swc_ecma_parser/tests/tsc/parserParameterList7.json b/crates/swc_ecma_parser/tests/tsc/parserParameterList7.json index 8bf2f255958b..d900d7a08846 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserParameterList7.json +++ b/crates/swc_ecma_parser/tests/tsc/parserParameterList7.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 32, - "end": 41, + "end": 34, "ctxt": 0 }, "value": "p1", @@ -121,7 +121,7 @@ "type": "Identifier", "span": { "start": 74, - "end": 83, + "end": 76, "ctxt": 0 }, "value": "p2", @@ -183,7 +183,7 @@ "type": "Identifier", "span": { "start": 115, - "end": 121, + "end": 117, "ctxt": 0 }, "value": "p3", diff --git a/crates/swc_ecma_parser/tests/tsc/parserParameterList8.json b/crates/swc_ecma_parser/tests/tsc/parserParameterList8.json index 48fbaa3d84e0..928bc1d81c30 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserParameterList8.json +++ b/crates/swc_ecma_parser/tests/tsc/parserParameterList8.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 40, - "end": 49, + "end": 42, "ctxt": 0 }, "value": "p1", @@ -121,7 +121,7 @@ "type": "Identifier", "span": { "start": 82, - "end": 91, + "end": 84, "ctxt": 0 }, "value": "p2", @@ -183,7 +183,7 @@ "type": "Identifier", "span": { "start": 123, - "end": 129, + "end": 125, "ctxt": 0 }, "value": "p3", diff --git a/crates/swc_ecma_parser/tests/tsc/parserRealSource1.json b/crates/swc_ecma_parser/tests/tsc/parserRealSource1.json index ad08740d4dbf..8db66bd510ac 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserRealSource1.json +++ b/crates/swc_ecma_parser/tests/tsc/parserRealSource1.json @@ -176,7 +176,7 @@ "type": "Identifier", "span": { "start": 369, - "end": 383, + "end": 375, "ctxt": 0 }, "value": "output", @@ -396,7 +396,7 @@ "type": "Identifier", "span": { "start": 543, - "end": 557, + "end": 549, "ctxt": 0 }, "value": "output", @@ -565,7 +565,7 @@ "type": "Identifier", "span": { "start": 705, - "end": 714, + "end": 706, "ctxt": 0 }, "value": "s", @@ -716,7 +716,7 @@ "type": "Identifier", "span": { "start": 825, - "end": 843, + "end": 834, "ctxt": 0 }, "value": "condition", @@ -752,7 +752,7 @@ "type": "Identifier", "span": { "start": 845, - "end": 854, + "end": 846, "ctxt": 0 }, "value": "s", @@ -1172,7 +1172,7 @@ "type": "Identifier", "span": { "start": 1178, - "end": 1187, + "end": 1179, "ctxt": 0 }, "value": "s", @@ -1677,7 +1677,7 @@ "type": "Identifier", "span": { "start": 1529, - "end": 1538, + "end": 1530, "ctxt": 0 }, "value": "s", @@ -2058,7 +2058,7 @@ "type": "Identifier", "span": { "start": 1819, - "end": 1834, + "end": 1825, "ctxt": 0 }, "value": "logger", @@ -3107,7 +3107,7 @@ "type": "Identifier", "span": { "start": 2417, - "end": 2426, + "end": 2418, "ctxt": 0 }, "value": "s", @@ -3775,7 +3775,7 @@ "type": "Identifier", "span": { "start": 2849, - "end": 2858, + "end": 2850, "ctxt": 0 }, "value": "s", @@ -3981,7 +3981,7 @@ "type": "Identifier", "span": { "start": 2956, - "end": 2971, + "end": 2962, "ctxt": 0 }, "value": "logger", @@ -4027,7 +4027,7 @@ "type": "Identifier", "span": { "start": 2973, - "end": 2996, + "end": 2988, "ctxt": 0 }, "value": "funcDescription", @@ -4063,7 +4063,7 @@ "type": "Identifier", "span": { "start": 2998, - "end": 3012, + "end": 3002, "ctxt": 0 }, "value": "func", @@ -4513,7 +4513,7 @@ "type": "Identifier", "span": { "start": 3262, - "end": 3275, + "end": 3267, "ctxt": 0 }, "value": "value", @@ -4549,7 +4549,7 @@ "type": "Identifier", "span": { "start": 3277, - "end": 3291, + "end": 3283, "ctxt": 0 }, "value": "length", diff --git a/crates/swc_ecma_parser/tests/tsc/parserRealSource12.json b/crates/swc_ecma_parser/tests/tsc/parserRealSource12.json index 36cdf5c34ff0..401737e0a8c5 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserRealSource12.json +++ b/crates/swc_ecma_parser/tests/tsc/parserRealSource12.json @@ -93,7 +93,7 @@ "type": "Identifier", "span": { "start": 279, - "end": 287, + "end": 282, "ctxt": 0 }, "value": "ast", @@ -130,7 +130,7 @@ "type": "Identifier", "span": { "start": 289, - "end": 300, + "end": 295, "ctxt": 0 }, "value": "parent", @@ -465,7 +465,7 @@ "type": "Identifier", "span": { "start": 604, - "end": 616, + "end": 608, "ctxt": 0 }, "value": "stop", @@ -707,7 +707,7 @@ "type": "Identifier", "span": { "start": 770, - "end": 778, + "end": 773, "ctxt": 0 }, "value": "ast", @@ -744,7 +744,7 @@ "type": "Identifier", "span": { "start": 780, - "end": 791, + "end": 786, "ctxt": 0 }, "value": "parent", @@ -781,7 +781,7 @@ "type": "Identifier", "span": { "start": 793, - "end": 811, + "end": 799, "ctxt": 0 }, "value": "walker", @@ -895,7 +895,7 @@ "type": "Identifier", "span": { "start": 875, - "end": 886, + "end": 881, "ctxt": 0 }, "value": "preAst", @@ -932,7 +932,7 @@ "type": "Identifier", "span": { "start": 888, - "end": 899, + "end": 894, "ctxt": 0 }, "value": "parent", @@ -969,7 +969,7 @@ "type": "Identifier", "span": { "start": 901, - "end": 919, + "end": 907, "ctxt": 0 }, "value": "walker", @@ -1079,7 +1079,7 @@ "type": "Identifier", "span": { "start": 1021, - "end": 1056, + "end": 1036, "ctxt": 0 }, "value": "childrenWalkers", @@ -1136,7 +1136,7 @@ "type": "Identifier", "span": { "start": 1078, - "end": 1099, + "end": 1081, "ctxt": 0 }, "value": "pre", @@ -1185,7 +1185,7 @@ "type": "Identifier", "span": { "start": 1121, - "end": 1143, + "end": 1125, "ctxt": 0 }, "value": "post", @@ -1234,7 +1234,7 @@ "type": "Identifier", "span": { "start": 1164, - "end": 1187, + "end": 1171, "ctxt": 0 }, "value": "options", @@ -1283,7 +1283,7 @@ "type": "Identifier", "span": { "start": 1208, - "end": 1218, + "end": 1213, "ctxt": 0 }, "value": "state", @@ -1351,7 +1351,7 @@ "type": "Identifier", "span": { "start": 1253, - "end": 1261, + "end": 1256, "ctxt": 0 }, "value": "ast", @@ -1397,7 +1397,7 @@ "type": "Identifier", "span": { "start": 1263, - "end": 1274, + "end": 1269, "ctxt": 0 }, "value": "parent", @@ -2676,7 +2676,7 @@ "type": "Identifier", "span": { "start": 2454, - "end": 2462, + "end": 2457, "ctxt": 0 }, "value": "ast", @@ -2722,7 +2722,7 @@ "type": "Identifier", "span": { "start": 2464, - "end": 2485, + "end": 2467, "ctxt": 0 }, "value": "pre", @@ -2768,7 +2768,7 @@ "type": "Identifier", "span": { "start": 2487, - "end": 2510, + "end": 2491, "ctxt": 0 }, "value": "post", @@ -2814,7 +2814,7 @@ "type": "Identifier", "span": { "start": 2512, - "end": 2536, + "end": 2519, "ctxt": 0 }, "value": "options", @@ -2860,7 +2860,7 @@ "type": "Identifier", "span": { "start": 2538, - "end": 2549, + "end": 2543, "ctxt": 0 }, "value": "state", @@ -3120,7 +3120,7 @@ "type": "Identifier", "span": { "start": 2671, - "end": 2692, + "end": 2674, "ctxt": 0 }, "value": "pre", @@ -3166,7 +3166,7 @@ "type": "Identifier", "span": { "start": 2694, - "end": 2717, + "end": 2698, "ctxt": 0 }, "value": "post", @@ -3212,7 +3212,7 @@ "type": "Identifier", "span": { "start": 2719, - "end": 2743, + "end": 2726, "ctxt": 0 }, "value": "options", @@ -3258,7 +3258,7 @@ "type": "Identifier", "span": { "start": 2745, - "end": 2756, + "end": 2750, "ctxt": 0 }, "value": "state", @@ -3465,7 +3465,7 @@ "type": "Identifier", "span": { "start": 2879, - "end": 2900, + "end": 2882, "ctxt": 0 }, "value": "pre", @@ -3511,7 +3511,7 @@ "type": "Identifier", "span": { "start": 2902, - "end": 2925, + "end": 2906, "ctxt": 0 }, "value": "post", @@ -3557,7 +3557,7 @@ "type": "Identifier", "span": { "start": 2927, - "end": 2951, + "end": 2934, "ctxt": 0 }, "value": "options", @@ -3603,7 +3603,7 @@ "type": "Identifier", "span": { "start": 2953, - "end": 2964, + "end": 2958, "ctxt": 0 }, "value": "state", @@ -16807,7 +16807,7 @@ "type": "Identifier", "span": { "start": 13744, - "end": 13759, + "end": 13750, "ctxt": 0 }, "value": "preAst", @@ -16853,7 +16853,7 @@ "type": "Identifier", "span": { "start": 13761, - "end": 13772, + "end": 13767, "ctxt": 0 }, "value": "parent", @@ -16899,7 +16899,7 @@ "type": "Identifier", "span": { "start": 13774, - "end": 13792, + "end": 13780, "ctxt": 0 }, "value": "walker", @@ -17004,7 +17004,7 @@ "type": "Identifier", "span": { "start": 13883, - "end": 13898, + "end": 13889, "ctxt": 0 }, "value": "preAst", @@ -17050,7 +17050,7 @@ "type": "Identifier", "span": { "start": 13900, - "end": 13911, + "end": 13906, "ctxt": 0 }, "value": "parent", @@ -17096,7 +17096,7 @@ "type": "Identifier", "span": { "start": 13913, - "end": 13931, + "end": 13919, "ctxt": 0 }, "value": "walker", @@ -18081,7 +18081,7 @@ "type": "Identifier", "span": { "start": 14607, - "end": 14630, + "end": 14613, "ctxt": 0 }, "value": "preAst", @@ -18127,7 +18127,7 @@ "type": "Identifier", "span": { "start": 14632, - "end": 14643, + "end": 14638, "ctxt": 0 }, "value": "parent", @@ -18173,7 +18173,7 @@ "type": "Identifier", "span": { "start": 14645, - "end": 14663, + "end": 14651, "ctxt": 0 }, "value": "walker", @@ -18629,7 +18629,7 @@ "type": "Identifier", "span": { "start": 14976, - "end": 15000, + "end": 14982, "ctxt": 0 }, "value": "preAst", @@ -18675,7 +18675,7 @@ "type": "Identifier", "span": { "start": 15002, - "end": 15013, + "end": 15008, "ctxt": 0 }, "value": "parent", @@ -18721,7 +18721,7 @@ "type": "Identifier", "span": { "start": 15015, - "end": 15033, + "end": 15021, "ctxt": 0 }, "value": "walker", @@ -19743,7 +19743,7 @@ "type": "Identifier", "span": { "start": 15793, - "end": 15814, + "end": 15799, "ctxt": 0 }, "value": "preAst", @@ -19789,7 +19789,7 @@ "type": "Identifier", "span": { "start": 15816, - "end": 15827, + "end": 15822, "ctxt": 0 }, "value": "parent", @@ -19835,7 +19835,7 @@ "type": "Identifier", "span": { "start": 15829, - "end": 15847, + "end": 15835, "ctxt": 0 }, "value": "walker", @@ -20116,7 +20116,7 @@ "type": "Identifier", "span": { "start": 16028, - "end": 16050, + "end": 16034, "ctxt": 0 }, "value": "preAst", @@ -20162,7 +20162,7 @@ "type": "Identifier", "span": { "start": 16052, - "end": 16063, + "end": 16058, "ctxt": 0 }, "value": "parent", @@ -20208,7 +20208,7 @@ "type": "Identifier", "span": { "start": 16065, - "end": 16083, + "end": 16071, "ctxt": 0 }, "value": "walker", @@ -21045,7 +21045,7 @@ "type": "Identifier", "span": { "start": 16627, - "end": 16656, + "end": 16633, "ctxt": 0 }, "value": "preAst", @@ -21091,7 +21091,7 @@ "type": "Identifier", "span": { "start": 16658, - "end": 16669, + "end": 16664, "ctxt": 0 }, "value": "parent", @@ -21137,7 +21137,7 @@ "type": "Identifier", "span": { "start": 16671, - "end": 16689, + "end": 16677, "ctxt": 0 }, "value": "walker", @@ -21894,7 +21894,7 @@ "type": "Identifier", "span": { "start": 17186, - "end": 17202, + "end": 17192, "ctxt": 0 }, "value": "preAst", @@ -21940,7 +21940,7 @@ "type": "Identifier", "span": { "start": 17204, - "end": 17215, + "end": 17210, "ctxt": 0 }, "value": "parent", @@ -21986,7 +21986,7 @@ "type": "Identifier", "span": { "start": 17217, - "end": 17235, + "end": 17223, "ctxt": 0 }, "value": "walker", @@ -23262,7 +23262,7 @@ "type": "Identifier", "span": { "start": 18006, - "end": 18023, + "end": 18012, "ctxt": 0 }, "value": "preAst", @@ -23308,7 +23308,7 @@ "type": "Identifier", "span": { "start": 18025, - "end": 18036, + "end": 18031, "ctxt": 0 }, "value": "parent", @@ -23354,7 +23354,7 @@ "type": "Identifier", "span": { "start": 18038, - "end": 18056, + "end": 18044, "ctxt": 0 }, "value": "walker", @@ -24083,7 +24083,7 @@ "type": "Identifier", "span": { "start": 18510, - "end": 18533, + "end": 18516, "ctxt": 0 }, "value": "preAst", @@ -24129,7 +24129,7 @@ "type": "Identifier", "span": { "start": 18535, - "end": 18546, + "end": 18541, "ctxt": 0 }, "value": "parent", @@ -24175,7 +24175,7 @@ "type": "Identifier", "span": { "start": 18548, - "end": 18566, + "end": 18554, "ctxt": 0 }, "value": "walker", @@ -24456,7 +24456,7 @@ "type": "Identifier", "span": { "start": 18781, - "end": 18801, + "end": 18787, "ctxt": 0 }, "value": "preAst", @@ -24502,7 +24502,7 @@ "type": "Identifier", "span": { "start": 18803, - "end": 18814, + "end": 18809, "ctxt": 0 }, "value": "parent", @@ -24548,7 +24548,7 @@ "type": "Identifier", "span": { "start": 18816, - "end": 18834, + "end": 18822, "ctxt": 0 }, "value": "walker", @@ -25519,7 +25519,7 @@ "type": "Identifier", "span": { "start": 19441, - "end": 19463, + "end": 19447, "ctxt": 0 }, "value": "preAst", @@ -25565,7 +25565,7 @@ "type": "Identifier", "span": { "start": 19465, - "end": 19476, + "end": 19471, "ctxt": 0 }, "value": "parent", @@ -25611,7 +25611,7 @@ "type": "Identifier", "span": { "start": 19478, - "end": 19496, + "end": 19484, "ctxt": 0 }, "value": "walker", @@ -26276,7 +26276,7 @@ "type": "Identifier", "span": { "start": 19892, - "end": 19911, + "end": 19898, "ctxt": 0 }, "value": "preAst", @@ -26322,7 +26322,7 @@ "type": "Identifier", "span": { "start": 19913, - "end": 19924, + "end": 19919, "ctxt": 0 }, "value": "parent", @@ -26368,7 +26368,7 @@ "type": "Identifier", "span": { "start": 19926, - "end": 19944, + "end": 19932, "ctxt": 0 }, "value": "walker", @@ -27078,7 +27078,7 @@ "type": "Identifier", "span": { "start": 20380, - "end": 20402, + "end": 20386, "ctxt": 0 }, "value": "preAst", @@ -27124,7 +27124,7 @@ "type": "Identifier", "span": { "start": 20404, - "end": 20415, + "end": 20410, "ctxt": 0 }, "value": "parent", @@ -27170,7 +27170,7 @@ "type": "Identifier", "span": { "start": 20417, - "end": 20435, + "end": 20423, "ctxt": 0 }, "value": "walker", @@ -27642,7 +27642,7 @@ "type": "Identifier", "span": { "start": 20712, - "end": 20736, + "end": 20718, "ctxt": 0 }, "value": "preAst", @@ -27688,7 +27688,7 @@ "type": "Identifier", "span": { "start": 20738, - "end": 20749, + "end": 20744, "ctxt": 0 }, "value": "parent", @@ -27734,7 +27734,7 @@ "type": "Identifier", "span": { "start": 20751, - "end": 20769, + "end": 20757, "ctxt": 0 }, "value": "walker", @@ -28206,7 +28206,7 @@ "type": "Identifier", "span": { "start": 21035, - "end": 21048, + "end": 21041, "ctxt": 0 }, "value": "preAst", @@ -28252,7 +28252,7 @@ "type": "Identifier", "span": { "start": 21050, - "end": 21061, + "end": 21056, "ctxt": 0 }, "value": "parent", @@ -28298,7 +28298,7 @@ "type": "Identifier", "span": { "start": 21063, - "end": 21081, + "end": 21069, "ctxt": 0 }, "value": "walker", @@ -28606,7 +28606,7 @@ "type": "Identifier", "span": { "start": 21288, - "end": 21309, + "end": 21294, "ctxt": 0 }, "value": "preAst", @@ -28652,7 +28652,7 @@ "type": "Identifier", "span": { "start": 21311, - "end": 21322, + "end": 21317, "ctxt": 0 }, "value": "parent", @@ -28698,7 +28698,7 @@ "type": "Identifier", "span": { "start": 21324, - "end": 21342, + "end": 21330, "ctxt": 0 }, "value": "walker", @@ -29236,7 +29236,7 @@ "type": "Identifier", "span": { "start": 21675, - "end": 21698, + "end": 21681, "ctxt": 0 }, "value": "preAst", @@ -29282,7 +29282,7 @@ "type": "Identifier", "span": { "start": 21700, - "end": 21711, + "end": 21706, "ctxt": 0 }, "value": "parent", @@ -29328,7 +29328,7 @@ "type": "Identifier", "span": { "start": 21713, - "end": 21731, + "end": 21719, "ctxt": 0 }, "value": "walker", @@ -29874,7 +29874,7 @@ "type": "Identifier", "span": { "start": 22063, - "end": 22074, + "end": 22069, "ctxt": 0 }, "value": "preAst", @@ -29920,7 +29920,7 @@ "type": "Identifier", "span": { "start": 22076, - "end": 22087, + "end": 22082, "ctxt": 0 }, "value": "parent", @@ -29966,7 +29966,7 @@ "type": "Identifier", "span": { "start": 22089, - "end": 22107, + "end": 22095, "ctxt": 0 }, "value": "walker", @@ -30247,7 +30247,7 @@ "type": "Identifier", "span": { "start": 22282, - "end": 22298, + "end": 22288, "ctxt": 0 }, "value": "preAst", @@ -30293,7 +30293,7 @@ "type": "Identifier", "span": { "start": 22300, - "end": 22311, + "end": 22306, "ctxt": 0 }, "value": "parent", @@ -30339,7 +30339,7 @@ "type": "Identifier", "span": { "start": 22313, - "end": 22331, + "end": 22319, "ctxt": 0 }, "value": "walker", @@ -30912,7 +30912,7 @@ "type": "Identifier", "span": { "start": 22688, - "end": 22706, + "end": 22694, "ctxt": 0 }, "value": "preAst", @@ -30958,7 +30958,7 @@ "type": "Identifier", "span": { "start": 22708, - "end": 22719, + "end": 22714, "ctxt": 0 }, "value": "parent", @@ -31004,7 +31004,7 @@ "type": "Identifier", "span": { "start": 22721, - "end": 22739, + "end": 22727, "ctxt": 0 }, "value": "walker", @@ -31542,7 +31542,7 @@ "type": "Identifier", "span": { "start": 23094, - "end": 23109, + "end": 23100, "ctxt": 0 }, "value": "preAst", @@ -31588,7 +31588,7 @@ "type": "Identifier", "span": { "start": 23111, - "end": 23122, + "end": 23117, "ctxt": 0 }, "value": "parent", @@ -31634,7 +31634,7 @@ "type": "Identifier", "span": { "start": 23124, - "end": 23142, + "end": 23130, "ctxt": 0 }, "value": "walker", @@ -31915,7 +31915,7 @@ "type": "Identifier", "span": { "start": 23314, - "end": 23327, + "end": 23320, "ctxt": 0 }, "value": "preAst", @@ -31961,7 +31961,7 @@ "type": "Identifier", "span": { "start": 23329, - "end": 23340, + "end": 23335, "ctxt": 0 }, "value": "parent", @@ -32007,7 +32007,7 @@ "type": "Identifier", "span": { "start": 23342, - "end": 23360, + "end": 23348, "ctxt": 0 }, "value": "walker", @@ -32553,7 +32553,7 @@ "type": "Identifier", "span": { "start": 23689, - "end": 23713, + "end": 23695, "ctxt": 0 }, "value": "preAst", @@ -32599,7 +32599,7 @@ "type": "Identifier", "span": { "start": 23715, - "end": 23726, + "end": 23721, "ctxt": 0 }, "value": "parent", @@ -32645,7 +32645,7 @@ "type": "Identifier", "span": { "start": 23728, - "end": 23746, + "end": 23734, "ctxt": 0 }, "value": "walker", @@ -33163,7 +33163,7 @@ "type": "Identifier", "span": { "start": 24045, - "end": 24068, + "end": 24051, "ctxt": 0 }, "value": "preAst", @@ -33209,7 +33209,7 @@ "type": "Identifier", "span": { "start": 24070, - "end": 24081, + "end": 24076, "ctxt": 0 }, "value": "parent", @@ -33255,7 +33255,7 @@ "type": "Identifier", "span": { "start": 24083, - "end": 24101, + "end": 24089, "ctxt": 0 }, "value": "walker", @@ -33429,7 +33429,7 @@ "type": "Identifier", "span": { "start": 24224, - "end": 24248, + "end": 24230, "ctxt": 0 }, "value": "preAst", @@ -33475,7 +33475,7 @@ "type": "Identifier", "span": { "start": 24250, - "end": 24261, + "end": 24256, "ctxt": 0 }, "value": "parent", @@ -33521,7 +33521,7 @@ "type": "Identifier", "span": { "start": 24263, - "end": 24281, + "end": 24269, "ctxt": 0 }, "value": "walker", @@ -34209,7 +34209,7 @@ "type": "Identifier", "span": { "start": 24757, - "end": 24771, + "end": 24763, "ctxt": 0 }, "value": "preAst", @@ -34255,7 +34255,7 @@ "type": "Identifier", "span": { "start": 24773, - "end": 24784, + "end": 24779, "ctxt": 0 }, "value": "parent", @@ -34301,7 +34301,7 @@ "type": "Identifier", "span": { "start": 24786, - "end": 24804, + "end": 24792, "ctxt": 0 }, "value": "walker", @@ -34609,7 +34609,7 @@ "type": "Identifier", "span": { "start": 24985, - "end": 25013, + "end": 24991, "ctxt": 0 }, "value": "preAst", @@ -34655,7 +34655,7 @@ "type": "Identifier", "span": { "start": 25015, - "end": 25026, + "end": 25021, "ctxt": 0 }, "value": "parent", @@ -34701,7 +34701,7 @@ "type": "Identifier", "span": { "start": 25028, - "end": 25046, + "end": 25034, "ctxt": 0 }, "value": "walker", @@ -35389,7 +35389,7 @@ "type": "Identifier", "span": { "start": 25577, - "end": 25602, + "end": 25583, "ctxt": 0 }, "value": "preAst", @@ -35435,7 +35435,7 @@ "type": "Identifier", "span": { "start": 25604, - "end": 25615, + "end": 25610, "ctxt": 0 }, "value": "parent", @@ -35481,7 +35481,7 @@ "type": "Identifier", "span": { "start": 25617, - "end": 25635, + "end": 25623, "ctxt": 0 }, "value": "walker", @@ -35655,7 +35655,7 @@ "type": "Identifier", "span": { "start": 25759, - "end": 25784, + "end": 25765, "ctxt": 0 }, "value": "preAst", @@ -35701,7 +35701,7 @@ "type": "Identifier", "span": { "start": 25786, - "end": 25797, + "end": 25792, "ctxt": 0 }, "value": "parent", @@ -35747,7 +35747,7 @@ "type": "Identifier", "span": { "start": 25799, - "end": 25817, + "end": 25805, "ctxt": 0 }, "value": "walker", @@ -36230,7 +36230,7 @@ "type": "Identifier", "span": { "start": 26115, - "end": 26136, + "end": 26121, "ctxt": 0 }, "value": "preAst", @@ -36276,7 +36276,7 @@ "type": "Identifier", "span": { "start": 26138, - "end": 26149, + "end": 26144, "ctxt": 0 }, "value": "parent", @@ -36322,7 +36322,7 @@ "type": "Identifier", "span": { "start": 26151, - "end": 26169, + "end": 26157, "ctxt": 0 }, "value": "walker", @@ -36833,7 +36833,7 @@ "type": "Identifier", "span": { "start": 26483, - "end": 26496, + "end": 26489, "ctxt": 0 }, "value": "preAst", @@ -36879,7 +36879,7 @@ "type": "Identifier", "span": { "start": 26498, - "end": 26509, + "end": 26504, "ctxt": 0 }, "value": "parent", @@ -36925,7 +36925,7 @@ "type": "Identifier", "span": { "start": 26511, - "end": 26529, + "end": 26517, "ctxt": 0 }, "value": "walker", @@ -37030,7 +37030,7 @@ "type": "Identifier", "span": { "start": 26634, - "end": 26658, + "end": 26640, "ctxt": 0 }, "value": "preAst", @@ -37076,7 +37076,7 @@ "type": "Identifier", "span": { "start": 26660, - "end": 26671, + "end": 26666, "ctxt": 0 }, "value": "parent", @@ -37122,7 +37122,7 @@ "type": "Identifier", "span": { "start": 26673, - "end": 26691, + "end": 26679, "ctxt": 0 }, "value": "walker", diff --git a/crates/swc_ecma_parser/tests/tsc/parserRealSource13.json b/crates/swc_ecma_parser/tests/tsc/parserRealSource13.json index 88e4f9fc78b6..45d1c11613be 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserRealSource13.json +++ b/crates/swc_ecma_parser/tests/tsc/parserRealSource13.json @@ -123,7 +123,7 @@ "type": "Identifier", "span": { "start": 336, - "end": 344, + "end": 339, "ctxt": 0 }, "value": "ast", @@ -212,7 +212,7 @@ "type": "Identifier", "span": { "start": 389, - "end": 397, + "end": 392, "ctxt": 0 }, "value": "ast", @@ -301,7 +301,7 @@ "type": "Identifier", "span": { "start": 437, - "end": 445, + "end": 440, "ctxt": 0 }, "value": "ast", @@ -390,7 +390,7 @@ "type": "Identifier", "span": { "start": 486, - "end": 494, + "end": 489, "ctxt": 0 }, "value": "ast", @@ -479,7 +479,7 @@ "type": "Identifier", "span": { "start": 534, - "end": 542, + "end": 537, "ctxt": 0 }, "value": "ast", @@ -568,7 +568,7 @@ "type": "Identifier", "span": { "start": 583, - "end": 591, + "end": 586, "ctxt": 0 }, "value": "ast", @@ -657,7 +657,7 @@ "type": "Identifier", "span": { "start": 634, - "end": 642, + "end": 637, "ctxt": 0 }, "value": "ast", @@ -746,7 +746,7 @@ "type": "Identifier", "span": { "start": 683, - "end": 691, + "end": 686, "ctxt": 0 }, "value": "ast", @@ -835,7 +835,7 @@ "type": "Identifier", "span": { "start": 731, - "end": 739, + "end": 734, "ctxt": 0 }, "value": "ast", @@ -924,7 +924,7 @@ "type": "Identifier", "span": { "start": 783, - "end": 791, + "end": 786, "ctxt": 0 }, "value": "ast", @@ -1013,7 +1013,7 @@ "type": "Identifier", "span": { "start": 836, - "end": 844, + "end": 839, "ctxt": 0 }, "value": "ast", @@ -1102,7 +1102,7 @@ "type": "Identifier", "span": { "start": 884, - "end": 892, + "end": 887, "ctxt": 0 }, "value": "ast", @@ -1191,7 +1191,7 @@ "type": "Identifier", "span": { "start": 933, - "end": 941, + "end": 936, "ctxt": 0 }, "value": "ast", @@ -1280,7 +1280,7 @@ "type": "Identifier", "span": { "start": 980, - "end": 988, + "end": 983, "ctxt": 0 }, "value": "ast", @@ -1369,7 +1369,7 @@ "type": "Identifier", "span": { "start": 1027, - "end": 1035, + "end": 1030, "ctxt": 0 }, "value": "ast", @@ -1458,7 +1458,7 @@ "type": "Identifier", "span": { "start": 1077, - "end": 1085, + "end": 1080, "ctxt": 0 }, "value": "ast", @@ -1547,7 +1547,7 @@ "type": "Identifier", "span": { "start": 1126, - "end": 1134, + "end": 1129, "ctxt": 0 }, "value": "ast", @@ -1636,7 +1636,7 @@ "type": "Identifier", "span": { "start": 1172, - "end": 1180, + "end": 1175, "ctxt": 0 }, "value": "ast", @@ -1725,7 +1725,7 @@ "type": "Identifier", "span": { "start": 1219, - "end": 1227, + "end": 1222, "ctxt": 0 }, "value": "ast", @@ -1814,7 +1814,7 @@ "type": "Identifier", "span": { "start": 1267, - "end": 1275, + "end": 1270, "ctxt": 0 }, "value": "ast", @@ -1903,7 +1903,7 @@ "type": "Identifier", "span": { "start": 1313, - "end": 1321, + "end": 1316, "ctxt": 0 }, "value": "ast", @@ -1992,7 +1992,7 @@ "type": "Identifier", "span": { "start": 1363, - "end": 1371, + "end": 1366, "ctxt": 0 }, "value": "ast", @@ -2081,7 +2081,7 @@ "type": "Identifier", "span": { "start": 1413, - "end": 1421, + "end": 1416, "ctxt": 0 }, "value": "ast", @@ -2170,7 +2170,7 @@ "type": "Identifier", "span": { "start": 1466, - "end": 1474, + "end": 1469, "ctxt": 0 }, "value": "ast", @@ -2259,7 +2259,7 @@ "type": "Identifier", "span": { "start": 1514, - "end": 1539, + "end": 1527, "ctxt": 0 }, "value": "identifierAst", @@ -2348,7 +2348,7 @@ "type": "Identifier", "span": { "start": 1582, - "end": 1590, + "end": 1585, "ctxt": 0 }, "value": "ast", @@ -2437,7 +2437,7 @@ "type": "Identifier", "span": { "start": 1631, - "end": 1639, + "end": 1634, "ctxt": 0 }, "value": "ast", @@ -2526,7 +2526,7 @@ "type": "Identifier", "span": { "start": 1679, - "end": 1687, + "end": 1682, "ctxt": 0 }, "value": "ast", @@ -2615,7 +2615,7 @@ "type": "Identifier", "span": { "start": 1726, - "end": 1734, + "end": 1729, "ctxt": 0 }, "value": "ast", @@ -2704,7 +2704,7 @@ "type": "Identifier", "span": { "start": 1773, - "end": 1781, + "end": 1776, "ctxt": 0 }, "value": "ast", @@ -2793,7 +2793,7 @@ "type": "Identifier", "span": { "start": 1823, - "end": 1831, + "end": 1826, "ctxt": 0 }, "value": "ast", @@ -2882,7 +2882,7 @@ "type": "Identifier", "span": { "start": 1873, - "end": 1881, + "end": 1876, "ctxt": 0 }, "value": "ast", @@ -2971,7 +2971,7 @@ "type": "Identifier", "span": { "start": 1923, - "end": 1931, + "end": 1926, "ctxt": 0 }, "value": "ast", @@ -3060,7 +3060,7 @@ "type": "Identifier", "span": { "start": 1973, - "end": 1981, + "end": 1976, "ctxt": 0 }, "value": "ast", @@ -3149,7 +3149,7 @@ "type": "Identifier", "span": { "start": 2023, - "end": 2031, + "end": 2026, "ctxt": 0 }, "value": "ast", @@ -3238,7 +3238,7 @@ "type": "Identifier", "span": { "start": 2073, - "end": 2081, + "end": 2076, "ctxt": 0 }, "value": "ast", @@ -3327,7 +3327,7 @@ "type": "Identifier", "span": { "start": 2123, - "end": 2131, + "end": 2126, "ctxt": 0 }, "value": "ast", @@ -3416,7 +3416,7 @@ "type": "Identifier", "span": { "start": 2172, - "end": 2180, + "end": 2175, "ctxt": 0 }, "value": "ast", @@ -3505,7 +3505,7 @@ "type": "Identifier", "span": { "start": 2222, - "end": 2230, + "end": 2225, "ctxt": 0 }, "value": "ast", @@ -3594,7 +3594,7 @@ "type": "Identifier", "span": { "start": 2272, - "end": 2280, + "end": 2275, "ctxt": 0 }, "value": "ast", @@ -3683,7 +3683,7 @@ "type": "Identifier", "span": { "start": 2322, - "end": 2330, + "end": 2325, "ctxt": 0 }, "value": "ast", @@ -3772,7 +3772,7 @@ "type": "Identifier", "span": { "start": 2371, - "end": 2379, + "end": 2374, "ctxt": 0 }, "value": "ast", @@ -3861,7 +3861,7 @@ "type": "Identifier", "span": { "start": 2420, - "end": 2428, + "end": 2423, "ctxt": 0 }, "value": "ast", @@ -3950,7 +3950,7 @@ "type": "Identifier", "span": { "start": 2470, - "end": 2478, + "end": 2473, "ctxt": 0 }, "value": "ast", @@ -4039,7 +4039,7 @@ "type": "Identifier", "span": { "start": 2516, - "end": 2524, + "end": 2519, "ctxt": 0 }, "value": "ast", @@ -4128,7 +4128,7 @@ "type": "Identifier", "span": { "start": 2563, - "end": 2571, + "end": 2566, "ctxt": 0 }, "value": "ast", @@ -4217,7 +4217,7 @@ "type": "Identifier", "span": { "start": 2610, - "end": 2618, + "end": 2613, "ctxt": 0 }, "value": "ast", @@ -4306,7 +4306,7 @@ "type": "Identifier", "span": { "start": 2656, - "end": 2664, + "end": 2659, "ctxt": 0 }, "value": "ast", @@ -4395,7 +4395,7 @@ "type": "Identifier", "span": { "start": 2702, - "end": 2710, + "end": 2705, "ctxt": 0 }, "value": "ast", @@ -4484,7 +4484,7 @@ "type": "Identifier", "span": { "start": 2749, - "end": 2757, + "end": 2752, "ctxt": 0 }, "value": "ast", @@ -4573,7 +4573,7 @@ "type": "Identifier", "span": { "start": 2797, - "end": 2805, + "end": 2800, "ctxt": 0 }, "value": "ast", @@ -4662,7 +4662,7 @@ "type": "Identifier", "span": { "start": 2843, - "end": 2851, + "end": 2846, "ctxt": 0 }, "value": "ast", @@ -4751,7 +4751,7 @@ "type": "Identifier", "span": { "start": 2889, - "end": 2897, + "end": 2892, "ctxt": 0 }, "value": "ast", @@ -4840,7 +4840,7 @@ "type": "Identifier", "span": { "start": 2935, - "end": 2943, + "end": 2938, "ctxt": 0 }, "value": "ast", @@ -4929,7 +4929,7 @@ "type": "Identifier", "span": { "start": 2981, - "end": 2989, + "end": 2984, "ctxt": 0 }, "value": "ast", @@ -5018,7 +5018,7 @@ "type": "Identifier", "span": { "start": 3028, - "end": 3036, + "end": 3031, "ctxt": 0 }, "value": "ast", @@ -5107,7 +5107,7 @@ "type": "Identifier", "span": { "start": 3075, - "end": 3083, + "end": 3078, "ctxt": 0 }, "value": "ast", @@ -5196,7 +5196,7 @@ "type": "Identifier", "span": { "start": 3122, - "end": 3130, + "end": 3125, "ctxt": 0 }, "value": "ast", @@ -5285,7 +5285,7 @@ "type": "Identifier", "span": { "start": 3169, - "end": 3177, + "end": 3172, "ctxt": 0 }, "value": "ast", @@ -5374,7 +5374,7 @@ "type": "Identifier", "span": { "start": 3216, - "end": 3224, + "end": 3219, "ctxt": 0 }, "value": "ast", @@ -5463,7 +5463,7 @@ "type": "Identifier", "span": { "start": 3263, - "end": 3271, + "end": 3266, "ctxt": 0 }, "value": "ast", @@ -5552,7 +5552,7 @@ "type": "Identifier", "span": { "start": 3310, - "end": 3318, + "end": 3313, "ctxt": 0 }, "value": "ast", @@ -5641,7 +5641,7 @@ "type": "Identifier", "span": { "start": 3357, - "end": 3365, + "end": 3360, "ctxt": 0 }, "value": "ast", @@ -5730,7 +5730,7 @@ "type": "Identifier", "span": { "start": 3404, - "end": 3412, + "end": 3407, "ctxt": 0 }, "value": "ast", @@ -5819,7 +5819,7 @@ "type": "Identifier", "span": { "start": 3454, - "end": 3462, + "end": 3457, "ctxt": 0 }, "value": "ast", @@ -5908,7 +5908,7 @@ "type": "Identifier", "span": { "start": 3504, - "end": 3512, + "end": 3507, "ctxt": 0 }, "value": "ast", @@ -5997,7 +5997,7 @@ "type": "Identifier", "span": { "start": 3554, - "end": 3562, + "end": 3557, "ctxt": 0 }, "value": "ast", @@ -6086,7 +6086,7 @@ "type": "Identifier", "span": { "start": 3605, - "end": 3613, + "end": 3608, "ctxt": 0 }, "value": "ast", @@ -6175,7 +6175,7 @@ "type": "Identifier", "span": { "start": 3656, - "end": 3664, + "end": 3659, "ctxt": 0 }, "value": "ast", @@ -6264,7 +6264,7 @@ "type": "Identifier", "span": { "start": 3713, - "end": 3721, + "end": 3716, "ctxt": 0 }, "value": "ast", @@ -6353,7 +6353,7 @@ "type": "Identifier", "span": { "start": 3765, - "end": 3783, + "end": 3773, "ctxt": 0 }, "value": "funcDecl", @@ -6442,7 +6442,7 @@ "type": "Identifier", "span": { "start": 3825, - "end": 3833, + "end": 3828, "ctxt": 0 }, "value": "ast", @@ -6531,7 +6531,7 @@ "type": "Identifier", "span": { "start": 3876, - "end": 3892, + "end": 3883, "ctxt": 0 }, "value": "varDecl", @@ -6620,7 +6620,7 @@ "type": "Identifier", "span": { "start": 3935, - "end": 3943, + "end": 3938, "ctxt": 0 }, "value": "ast", @@ -6709,7 +6709,7 @@ "type": "Identifier", "span": { "start": 3985, - "end": 3993, + "end": 3988, "ctxt": 0 }, "value": "ast", @@ -6798,7 +6798,7 @@ "type": "Identifier", "span": { "start": 4034, - "end": 4042, + "end": 4037, "ctxt": 0 }, "value": "ast", @@ -6887,7 +6887,7 @@ "type": "Identifier", "span": { "start": 4086, - "end": 4094, + "end": 4089, "ctxt": 0 }, "value": "ast", @@ -6976,7 +6976,7 @@ "type": "Identifier", "span": { "start": 4135, - "end": 4143, + "end": 4138, "ctxt": 0 }, "value": "ast", @@ -7065,7 +7065,7 @@ "type": "Identifier", "span": { "start": 4182, - "end": 4190, + "end": 4185, "ctxt": 0 }, "value": "ast", @@ -7154,7 +7154,7 @@ "type": "Identifier", "span": { "start": 4231, - "end": 4239, + "end": 4234, "ctxt": 0 }, "value": "ast", @@ -7243,7 +7243,7 @@ "type": "Identifier", "span": { "start": 4277, - "end": 4285, + "end": 4280, "ctxt": 0 }, "value": "ast", @@ -7332,7 +7332,7 @@ "type": "Identifier", "span": { "start": 4326, - "end": 4334, + "end": 4329, "ctxt": 0 }, "value": "ast", @@ -7421,7 +7421,7 @@ "type": "Identifier", "span": { "start": 4377, - "end": 4385, + "end": 4380, "ctxt": 0 }, "value": "ast", @@ -7510,7 +7510,7 @@ "type": "Identifier", "span": { "start": 4426, - "end": 4438, + "end": 4431, "ctxt": 0 }, "value": "block", @@ -7599,7 +7599,7 @@ "type": "Identifier", "span": { "start": 4478, - "end": 4486, + "end": 4481, "ctxt": 0 }, "value": "ast", @@ -7688,7 +7688,7 @@ "type": "Identifier", "span": { "start": 4528, - "end": 4536, + "end": 4531, "ctxt": 0 }, "value": "ast", @@ -7777,7 +7777,7 @@ "type": "Identifier", "span": { "start": 4575, - "end": 4583, + "end": 4578, "ctxt": 0 }, "value": "ast", @@ -7866,7 +7866,7 @@ "type": "Identifier", "span": { "start": 4627, - "end": 4635, + "end": 4630, "ctxt": 0 }, "value": "ast", @@ -7955,7 +7955,7 @@ "type": "Identifier", "span": { "start": 4681, - "end": 4689, + "end": 4684, "ctxt": 0 }, "value": "ast", @@ -8044,7 +8044,7 @@ "type": "Identifier", "span": { "start": 4732, - "end": 4740, + "end": 4735, "ctxt": 0 }, "value": "ast", @@ -8133,7 +8133,7 @@ "type": "Identifier", "span": { "start": 4781, - "end": 4789, + "end": 4784, "ctxt": 0 }, "value": "ast", @@ -8222,7 +8222,7 @@ "type": "Identifier", "span": { "start": 4829, - "end": 4845, + "end": 4836, "ctxt": 0 }, "value": "astList", @@ -8311,7 +8311,7 @@ "type": "Identifier", "span": { "start": 4887, - "end": 4901, + "end": 4893, "ctxt": 0 }, "value": "script", @@ -8400,7 +8400,7 @@ "type": "Identifier", "span": { "start": 4953, - "end": 4961, + "end": 4956, "ctxt": 0 }, "value": "ast", @@ -8489,7 +8489,7 @@ "type": "Identifier", "span": { "start": 5017, - "end": 5052, + "end": 5030, "ctxt": 0 }, "value": "interfaceDecl", @@ -8578,7 +8578,7 @@ "type": "Identifier", "span": { "start": 5105, - "end": 5134, + "end": 5115, "ctxt": 0 }, "value": "moduleDecl", @@ -8667,7 +8667,7 @@ "type": "Identifier", "span": { "start": 5187, - "end": 5195, + "end": 5190, "ctxt": 0 }, "value": "ast", @@ -8756,7 +8756,7 @@ "type": "Identifier", "span": { "start": 5235, - "end": 5243, + "end": 5238, "ctxt": 0 }, "value": "ast", @@ -8845,7 +8845,7 @@ "type": "Identifier", "span": { "start": 5284, - "end": 5297, + "end": 5292, "ctxt": 0 }, "value": "labelAST", @@ -8934,7 +8934,7 @@ "type": "Identifier", "span": { "start": 5349, - "end": 5357, + "end": 5352, "ctxt": 0 }, "value": "ast", @@ -9023,7 +9023,7 @@ "type": "Identifier", "span": { "start": 5400, - "end": 5408, + "end": 5403, "ctxt": 0 }, "value": "ast", @@ -9112,7 +9112,7 @@ "type": "Identifier", "span": { "start": 5450, - "end": 5458, + "end": 5453, "ctxt": 0 }, "value": "ast", @@ -9201,7 +9201,7 @@ "type": "Identifier", "span": { "start": 5501, - "end": 5509, + "end": 5504, "ctxt": 0 }, "value": "ast", @@ -9290,7 +9290,7 @@ "type": "Identifier", "span": { "start": 5550, - "end": 5558, + "end": 5553, "ctxt": 0 }, "value": "ast", @@ -9379,7 +9379,7 @@ "type": "Identifier", "span": { "start": 5601, - "end": 5609, + "end": 5604, "ctxt": 0 }, "value": "ast", @@ -9468,7 +9468,7 @@ "type": "Identifier", "span": { "start": 5653, - "end": 5661, + "end": 5656, "ctxt": 0 }, "value": "ast", @@ -9557,7 +9557,7 @@ "type": "Identifier", "span": { "start": 5704, - "end": 5712, + "end": 5707, "ctxt": 0 }, "value": "ast", @@ -9647,7 +9647,7 @@ "type": "Identifier", "span": { "start": 5756, - "end": 5770, + "end": 5762, "ctxt": 0 }, "value": "script", @@ -9693,7 +9693,7 @@ "type": "Identifier", "span": { "start": 5772, - "end": 5805, + "end": 5780, "ctxt": 0 }, "value": "callback", @@ -10473,7 +10473,7 @@ "type": "Identifier", "span": { "start": 6262, - "end": 6274, + "end": 6265, "ctxt": 0 }, "value": "pre", @@ -10509,7 +10509,7 @@ "type": "Identifier", "span": { "start": 6276, - "end": 6284, + "end": 6279, "ctxt": 0 }, "value": "ast", @@ -10555,7 +10555,7 @@ "type": "Identifier", "span": { "start": 6286, - "end": 6319, + "end": 6294, "ctxt": 0 }, "value": "callback", diff --git a/crates/swc_ecma_parser/tests/tsc/parserRealSource14.json b/crates/swc_ecma_parser/tests/tsc/parserRealSource14.json index a214ebca1e1e..dd81211f4bb2 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserRealSource14.json +++ b/crates/swc_ecma_parser/tests/tsc/parserRealSource14.json @@ -66,7 +66,7 @@ "type": "Identifier", "span": { "start": 259, - "end": 271, + "end": 264, "ctxt": 0 }, "value": "items", @@ -358,7 +358,7 @@ "type": "Identifier", "span": { "start": 399, - "end": 408, + "end": 400, "ctxt": 0 }, "value": "a", @@ -394,7 +394,7 @@ "type": "Identifier", "span": { "start": 410, - "end": 419, + "end": 411, "ctxt": 0 }, "value": "b", @@ -555,7 +555,7 @@ "type": "Identifier", "span": { "start": 493, - "end": 502, + "end": 494, "ctxt": 0 }, "value": "a", @@ -591,7 +591,7 @@ "type": "Identifier", "span": { "start": 504, - "end": 513, + "end": 505, "ctxt": 0 }, "value": "b", @@ -924,7 +924,7 @@ "type": "Identifier", "span": { "start": 856, - "end": 868, + "end": 861, "ctxt": 0 }, "value": "items", @@ -968,7 +968,7 @@ "type": "Identifier", "span": { "start": 870, - "end": 883, + "end": 875, "ctxt": 0 }, "value": "index", @@ -2030,7 +2030,7 @@ "type": "Identifier", "span": { "start": 1475, - "end": 1494, + "end": 1478, "ctxt": 0 }, "value": "ast", @@ -3786,7 +3786,7 @@ "type": "Identifier", "span": { "start": 2545, - "end": 2558, + "end": 2550, "ctxt": 0 }, "value": "index", @@ -34802,7 +34802,7 @@ "type": "Identifier", "span": { "start": 19171, - "end": 19194, + "end": 19174, "ctxt": 0 }, "value": "ast", @@ -35372,7 +35372,7 @@ "type": "Identifier", "span": { "start": 20297, - "end": 20319, + "end": 20303, "ctxt": 0 }, "value": "script", @@ -35431,7 +35431,7 @@ "type": "Identifier", "span": { "start": 20321, - "end": 20332, + "end": 20324, "ctxt": 0 }, "value": "pos", @@ -36368,7 +36368,7 @@ "type": "Identifier", "span": { "start": 21069, - "end": 21088, + "end": 21072, "ctxt": 0 }, "value": "cur", @@ -36427,7 +36427,7 @@ "type": "Identifier", "span": { "start": 21090, - "end": 21112, + "end": 21096, "ctxt": 0 }, "value": "parent", @@ -36486,7 +36486,7 @@ "type": "Identifier", "span": { "start": 21114, - "end": 21132, + "end": 21120, "ctxt": 0 }, "value": "walker", @@ -38250,7 +38250,7 @@ "type": "Identifier", "span": { "start": 23692, - "end": 23717, + "end": 23698, "ctxt": 0 }, "value": "script", @@ -38309,7 +38309,7 @@ "type": "Identifier", "span": { "start": 23719, - "end": 23735, + "end": 23727, "ctxt": 0 }, "value": "position", @@ -39253,7 +39253,7 @@ "type": "Identifier", "span": { "start": 24600, - "end": 24619, + "end": 24603, "ctxt": 0 }, "value": "ast", @@ -39312,7 +39312,7 @@ "type": "Identifier", "span": { "start": 24621, - "end": 24685, + "end": 24629, "ctxt": 0 }, "value": "callback", @@ -39336,7 +39336,7 @@ "type": "Identifier", "span": { "start": 24632, - "end": 24645, + "end": 24636, "ctxt": 0 }, "value": "path", @@ -39373,7 +39373,7 @@ "type": "Identifier", "span": { "start": 24647, - "end": 24676, + "end": 24653, "ctxt": 0 }, "value": "walker", @@ -39501,7 +39501,7 @@ "type": "Identifier", "span": { "start": 24724, - "end": 24743, + "end": 24727, "ctxt": 0 }, "value": "cur", @@ -39560,7 +39560,7 @@ "type": "Identifier", "span": { "start": 24745, - "end": 24767, + "end": 24751, "ctxt": 0 }, "value": "parent", @@ -39619,7 +39619,7 @@ "type": "Identifier", "span": { "start": 24769, - "end": 24798, + "end": 24775, "ctxt": 0 }, "value": "walker", @@ -39968,7 +39968,7 @@ "type": "Identifier", "span": { "start": 24986, - "end": 25005, + "end": 24989, "ctxt": 0 }, "value": "cur", @@ -40027,7 +40027,7 @@ "type": "Identifier", "span": { "start": 25007, - "end": 25029, + "end": 25013, "ctxt": 0 }, "value": "parent", @@ -40086,7 +40086,7 @@ "type": "Identifier", "span": { "start": 25031, - "end": 25060, + "end": 25037, "ctxt": 0 }, "value": "walker", diff --git a/crates/swc_ecma_parser/tests/tsc/parserRealSource2.json b/crates/swc_ecma_parser/tests/tsc/parserRealSource2.json index 8e2f55ad1f8a..a5854cf81638 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserRealSource2.json +++ b/crates/swc_ecma_parser/tests/tsc/parserRealSource2.json @@ -66,7 +66,7 @@ "type": "Identifier", "span": { "start": 261, - "end": 272, + "end": 264, "ctxt": 0 }, "value": "val", @@ -102,7 +102,7 @@ "type": "Identifier", "span": { "start": 274, - "end": 286, + "end": 278, "ctxt": 0 }, "value": "flag", @@ -7699,7 +7699,7 @@ "type": "Identifier", "span": { "start": 6747, - "end": 6765, + "end": 6755, "ctxt": 0 }, "value": "fncFlags", @@ -7806,7 +7806,7 @@ "type": "Identifier", "span": { "start": 6812, - "end": 6830, + "end": 6820, "ctxt": 0 }, "value": "varFlags", @@ -7913,7 +7913,7 @@ "type": "Identifier", "span": { "start": 6877, - "end": 6898, + "end": 6885, "ctxt": 0 }, "value": "symFlags", @@ -8020,7 +8020,7 @@ "type": "Identifier", "span": { "start": 6944, - "end": 6968, + "end": 6955, "ctxt": 0 }, "value": "moduleFlags", @@ -8127,7 +8127,7 @@ "type": "Identifier", "span": { "start": 7014, - "end": 7048, + "end": 7043, "ctxt": 0 }, "value": "fncOrVarOrSymbolOrModuleFlags", @@ -9492,7 +9492,7 @@ "type": "Identifier", "span": { "start": 8320, - "end": 8333, + "end": 8325, "ctxt": 0 }, "value": "flags", diff --git a/crates/swc_ecma_parser/tests/tsc/parserRealSource5.json b/crates/swc_ecma_parser/tests/tsc/parserRealSource5.json index 142eaf33dbff..e65af1826b8b 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserRealSource5.json +++ b/crates/swc_ecma_parser/tests/tsc/parserRealSource5.json @@ -268,7 +268,7 @@ "type": "Identifier", "span": { "start": 479, - "end": 499, + "end": 486, "ctxt": 0 }, "value": "outfile", @@ -317,7 +317,7 @@ "type": "Identifier", "span": { "start": 508, - "end": 522, + "end": 514, "ctxt": 0 }, "value": "parser", @@ -1692,7 +1692,7 @@ "type": "Identifier", "span": { "start": 1499, - "end": 1507, + "end": 1502, "ctxt": 0 }, "value": "ast", @@ -1738,7 +1738,7 @@ "type": "Identifier", "span": { "start": 1509, - "end": 1520, + "end": 1515, "ctxt": 0 }, "value": "parent", @@ -1784,7 +1784,7 @@ "type": "Identifier", "span": { "start": 1522, - "end": 1540, + "end": 1528, "ctxt": 0 }, "value": "walker", @@ -2111,7 +2111,7 @@ "type": "Identifier", "span": { "start": 1717, - "end": 1725, + "end": 1720, "ctxt": 0 }, "value": "ast", @@ -2157,7 +2157,7 @@ "type": "Identifier", "span": { "start": 1727, - "end": 1738, + "end": 1733, "ctxt": 0 }, "value": "parent", @@ -2203,7 +2203,7 @@ "type": "Identifier", "span": { "start": 1740, - "end": 1758, + "end": 1746, "ctxt": 0 }, "value": "walker", diff --git a/crates/swc_ecma_parser/tests/tsc/parserRealSource6.json b/crates/swc_ecma_parser/tests/tsc/parserRealSource6.json index b489b1eb6f1d..5e543cfde177 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserRealSource6.json +++ b/crates/swc_ecma_parser/tests/tsc/parserRealSource6.json @@ -155,7 +155,7 @@ "type": "Identifier", "span": { "start": 340, - "end": 362, + "end": 350, "ctxt": 0 }, "value": "scopeChain", @@ -204,7 +204,7 @@ "type": "Identifier", "span": { "start": 371, - "end": 391, + "end": 378, "ctxt": 0 }, "value": "checker", @@ -546,7 +546,7 @@ "type": "Identifier", "span": { "start": 627, - "end": 641, + "end": 631, "ctxt": 0 }, "value": "flow", @@ -595,7 +595,7 @@ "type": "Identifier", "span": { "start": 650, - "end": 661, + "end": 653, "ctxt": 0 }, "value": "pos", @@ -634,7 +634,7 @@ "type": "Identifier", "span": { "start": 670, - "end": 689, + "end": 679, "ctxt": 0 }, "value": "matchFlag", @@ -1323,7 +1323,7 @@ "type": "Identifier", "span": { "start": 1281, - "end": 1296, + "end": 1287, "ctxt": 0 }, "value": "logger", @@ -1372,7 +1372,7 @@ "type": "Identifier", "span": { "start": 1325, - "end": 1339, + "end": 1331, "ctxt": 0 }, "value": "script", @@ -1421,7 +1421,7 @@ "type": "Identifier", "span": { "start": 1368, - "end": 1385, + "end": 1372, "ctxt": 0 }, "value": "text", @@ -1470,7 +1470,7 @@ "type": "Identifier", "span": { "start": 1414, - "end": 1425, + "end": 1417, "ctxt": 0 }, "value": "pos", @@ -1509,7 +1509,7 @@ "type": "Identifier", "span": { "start": 1454, - "end": 1481, + "end": 1472, "ctxt": 0 }, "value": "isMemberCompletion", @@ -2883,7 +2883,7 @@ "type": "Identifier", "span": { "start": 2629, - "end": 2637, + "end": 2632, "ctxt": 0 }, "value": "ast", @@ -2929,7 +2929,7 @@ "type": "Identifier", "span": { "start": 2639, - "end": 2650, + "end": 2645, "ctxt": 0 }, "value": "parent", @@ -2975,7 +2975,7 @@ "type": "Identifier", "span": { "start": 2652, - "end": 2670, + "end": 2658, "ctxt": 0 }, "value": "walker", @@ -3862,7 +3862,7 @@ "type": "Identifier", "span": { "start": 3178, - "end": 3195, + "end": 3187, "ctxt": 0 }, "value": "container", @@ -3908,7 +3908,7 @@ "type": "Identifier", "span": { "start": 3205, - "end": 3232, + "end": 3217, "ctxt": 0 }, "value": "valueMembers", @@ -3954,7 +3954,7 @@ "type": "Identifier", "span": { "start": 3242, - "end": 3276, + "end": 3261, "ctxt": 0 }, "value": "ambientValueMembers", @@ -4000,7 +4000,7 @@ "type": "Identifier", "span": { "start": 3286, - "end": 3314, + "end": 3299, "ctxt": 0 }, "value": "enclosedTypes", @@ -4046,7 +4046,7 @@ "type": "Identifier", "span": { "start": 3324, - "end": 3359, + "end": 3344, "ctxt": 0 }, "value": "ambientEnclosedTypes", @@ -4092,7 +4092,7 @@ "type": "Identifier", "span": { "start": 3369, - "end": 3399, + "end": 3376, "ctxt": 0 }, "value": "context", @@ -4138,7 +4138,7 @@ "type": "Identifier", "span": { "start": 3409, - "end": 3423, + "end": 3417, "ctxt": 0 }, "value": "thisType", @@ -4184,7 +4184,7 @@ "type": "Identifier", "span": { "start": 3433, - "end": 3448, + "end": 3442, "ctxt": 0 }, "value": "classType", @@ -4230,7 +4230,7 @@ "type": "Identifier", "span": { "start": 3458, - "end": 3487, + "end": 3468, "ctxt": 0 }, "value": "moduleDecl", @@ -4805,7 +4805,7 @@ "type": "Identifier", "span": { "start": 3911, - "end": 3941, + "end": 3918, "ctxt": 0 }, "value": "context", @@ -4986,7 +4986,7 @@ "type": "Identifier", "span": { "start": 4052, - "end": 4060, + "end": 4055, "ctxt": 0 }, "value": "ast", @@ -5032,7 +5032,7 @@ "type": "Identifier", "span": { "start": 4062, - "end": 4073, + "end": 4068, "ctxt": 0 }, "value": "parent", @@ -5078,7 +5078,7 @@ "type": "Identifier", "span": { "start": 4075, - "end": 4093, + "end": 4081, "ctxt": 0 }, "value": "walker", @@ -8770,7 +8770,7 @@ "type": "Identifier", "span": { "start": 8331, - "end": 8346, + "end": 8337, "ctxt": 0 }, "value": "logger", @@ -8816,7 +8816,7 @@ "type": "Identifier", "span": { "start": 8348, - "end": 8362, + "end": 8354, "ctxt": 0 }, "value": "script", @@ -8862,7 +8862,7 @@ "type": "Identifier", "span": { "start": 8364, - "end": 8381, + "end": 8368, "ctxt": 0 }, "value": "text", @@ -8908,7 +8908,7 @@ "type": "Identifier", "span": { "start": 8383, - "end": 8394, + "end": 8386, "ctxt": 0 }, "value": "pos", @@ -8944,7 +8944,7 @@ "type": "Identifier", "span": { "start": 8396, - "end": 8423, + "end": 8414, "ctxt": 0 }, "value": "isMemberCompletion", diff --git a/crates/swc_ecma_parser/tests/tsc/parserRealSource8.json b/crates/swc_ecma_parser/tests/tsc/parserRealSource8.json index 19bc8ec86d8b..f2850e997aad 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserRealSource8.json +++ b/crates/swc_ecma_parser/tests/tsc/parserRealSource8.json @@ -93,7 +93,7 @@ "type": "Identifier", "span": { "start": 299, - "end": 321, + "end": 309, "ctxt": 0 }, "value": "scopeChain", @@ -142,7 +142,7 @@ "type": "Identifier", "span": { "start": 351, - "end": 369, + "end": 359, "ctxt": 0 }, "value": "typeFlow", @@ -191,7 +191,7 @@ "type": "Identifier", "span": { "start": 399, - "end": 432, + "end": 411, "ctxt": 0 }, "value": "modDeclChain", @@ -287,7 +287,7 @@ "type": "Identifier", "span": { "start": 489, - "end": 507, + "end": 494, "ctxt": 0 }, "value": "scope", @@ -333,7 +333,7 @@ "type": "Identifier", "span": { "start": 517, - "end": 544, + "end": 524, "ctxt": 0 }, "value": "context", @@ -379,7 +379,7 @@ "type": "Identifier", "span": { "start": 554, - "end": 564, + "end": 558, "ctxt": 0 }, "value": "type", @@ -425,7 +425,7 @@ "type": "Identifier", "span": { "start": 574, - "end": 589, + "end": 583, "ctxt": 0 }, "value": "classType", @@ -471,7 +471,7 @@ "type": "Identifier", "span": { "start": 599, - "end": 612, + "end": 602, "ctxt": 0 }, "value": "fnc", @@ -889,7 +889,7 @@ "type": "Identifier", "span": { "start": 857, - "end": 884, + "end": 864, "ctxt": 0 }, "value": "context", @@ -1070,7 +1070,7 @@ "type": "Identifier", "span": { "start": 989, - "end": 998, + "end": 990, "ctxt": 0 }, "value": "a", @@ -1116,7 +1116,7 @@ "type": "Identifier", "span": { "start": 1000, - "end": 1009, + "end": 1001, "ctxt": 0 }, "value": "b", @@ -1377,7 +1377,7 @@ "type": "Identifier", "span": { "start": 1196, - "end": 1205, + "end": 1197, "ctxt": 0 }, "value": "s", @@ -1540,7 +1540,7 @@ "type": "Identifier", "span": { "start": 1321, - "end": 1360, + "end": 1327, "ctxt": 0 }, "value": "select", @@ -1564,7 +1564,7 @@ "type": "Identifier", "span": { "start": 1330, - "end": 1339, + "end": 1331, "ctxt": 0 }, "value": "a", @@ -1601,7 +1601,7 @@ "type": "Identifier", "span": { "start": 1341, - "end": 1350, + "end": 1342, "ctxt": 0 }, "value": "b", @@ -1682,7 +1682,7 @@ "type": "Identifier", "span": { "start": 1397, - "end": 1424, + "end": 1401, "ctxt": 0 }, "value": "stop", @@ -1706,7 +1706,7 @@ "type": "Identifier", "span": { "start": 1404, - "end": 1413, + "end": 1405, "ctxt": 0 }, "value": "s", @@ -1966,7 +1966,7 @@ "type": "Identifier", "span": { "start": 1560, - "end": 1569, + "end": 1561, "ctxt": 0 }, "value": "b", @@ -2440,7 +2440,7 @@ "type": "Identifier", "span": { "start": 1944, - "end": 1952, + "end": 1947, "ctxt": 0 }, "value": "ast", @@ -2486,7 +2486,7 @@ "type": "Identifier", "span": { "start": 1954, - "end": 1981, + "end": 1961, "ctxt": 0 }, "value": "context", @@ -4150,7 +4150,7 @@ "type": "Identifier", "span": { "start": 3155, - "end": 3163, + "end": 3158, "ctxt": 0 }, "value": "ast", @@ -4196,7 +4196,7 @@ "type": "Identifier", "span": { "start": 3165, - "end": 3192, + "end": 3172, "ctxt": 0 }, "value": "context", @@ -5999,7 +5999,7 @@ "type": "Identifier", "span": { "start": 4540, - "end": 4548, + "end": 4543, "ctxt": 0 }, "value": "ast", @@ -6045,7 +6045,7 @@ "type": "Identifier", "span": { "start": 4550, - "end": 4577, + "end": 4557, "ctxt": 0 }, "value": "context", @@ -7166,7 +7166,7 @@ "type": "Identifier", "span": { "start": 5375, - "end": 5383, + "end": 5378, "ctxt": 0 }, "value": "ast", @@ -7212,7 +7212,7 @@ "type": "Identifier", "span": { "start": 5385, - "end": 5412, + "end": 5392, "ctxt": 0 }, "value": "context", @@ -8555,7 +8555,7 @@ "type": "Identifier", "span": { "start": 6400, - "end": 6408, + "end": 6403, "ctxt": 0 }, "value": "ast", @@ -8601,7 +8601,7 @@ "type": "Identifier", "span": { "start": 6410, - "end": 6437, + "end": 6417, "ctxt": 0 }, "value": "context", @@ -18522,7 +18522,7 @@ "type": "Identifier", "span": { "start": 16867, - "end": 16875, + "end": 16870, "ctxt": 0 }, "value": "ast", @@ -18568,7 +18568,7 @@ "type": "Identifier", "span": { "start": 16877, - "end": 16904, + "end": 16884, "ctxt": 0 }, "value": "context", @@ -19369,7 +19369,7 @@ "type": "Identifier", "span": { "start": 17609, - "end": 17617, + "end": 17612, "ctxt": 0 }, "value": "ast", @@ -19415,7 +19415,7 @@ "type": "Identifier", "span": { "start": 17619, - "end": 17630, + "end": 17625, "ctxt": 0 }, "value": "parent", @@ -19461,7 +19461,7 @@ "type": "Identifier", "span": { "start": 17632, - "end": 17650, + "end": 17638, "ctxt": 0 }, "value": "walker", @@ -20990,7 +20990,7 @@ "type": "Identifier", "span": { "start": 18906, - "end": 18914, + "end": 18909, "ctxt": 0 }, "value": "ast", @@ -21036,7 +21036,7 @@ "type": "Identifier", "span": { "start": 18916, - "end": 18927, + "end": 18922, "ctxt": 0 }, "value": "parent", @@ -21082,7 +21082,7 @@ "type": "Identifier", "span": { "start": 18929, - "end": 18947, + "end": 18935, "ctxt": 0 }, "value": "walker", diff --git a/crates/swc_ecma_parser/tests/tsc/parserindenter.json b/crates/swc_ecma_parser/tests/tsc/parserindenter.json index 26321f349a9c..0fb1ff8f2ba3 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserindenter.json +++ b/crates/swc_ecma_parser/tests/tsc/parserindenter.json @@ -248,7 +248,7 @@ "type": "Identifier", "span": { "start": 954, - "end": 980, + "end": 960, "ctxt": 0 }, "value": "logger", @@ -310,7 +310,7 @@ "type": "Identifier", "span": { "start": 1001, - "end": 1016, + "end": 1005, "ctxt": 0 }, "value": "tree", @@ -359,7 +359,7 @@ "type": "Identifier", "span": { "start": 1037, - "end": 1060, + "end": 1045, "ctxt": 0 }, "value": "snapshot", @@ -408,7 +408,7 @@ "type": "Identifier", "span": { "start": 1081, - "end": 1112, + "end": 1104, "ctxt": 0 }, "value": "languageHostIndentation", @@ -447,7 +447,7 @@ "type": "Identifier", "span": { "start": 1133, - "end": 1170, + "end": 1146, "ctxt": 0 }, "value": "editorOptions", @@ -509,7 +509,7 @@ "type": "Identifier", "span": { "start": 1191, - "end": 1212, + "end": 1201, "ctxt": 0 }, "value": "firstToken", @@ -558,7 +558,7 @@ "type": "Identifier", "span": { "start": 1233, - "end": 1253, + "end": 1244, "ctxt": 0 }, "value": "smartIndent", @@ -1116,7 +1116,7 @@ "type": "Identifier", "span": { "start": 1797, - "end": 1813, + "end": 1802, "ctxt": 0 }, "value": "token", @@ -1162,7 +1162,7 @@ "type": "Identifier", "span": { "start": 1815, - "end": 1835, + "end": 1824, "ctxt": 0 }, "value": "nextToken", @@ -1208,7 +1208,7 @@ "type": "Identifier", "span": { "start": 1837, - "end": 1852, + "end": 1841, "ctxt": 0 }, "value": "node", @@ -1254,7 +1254,7 @@ "type": "Identifier", "span": { "start": 1854, - "end": 1877, + "end": 1868, "ctxt": 0 }, "value": "sameLineIndent", @@ -2744,7 +2744,7 @@ "type": "Identifier", "span": { "start": 2830, - "end": 2846, + "end": 2835, "ctxt": 0 }, "value": "token", @@ -2790,7 +2790,7 @@ "type": "Identifier", "span": { "start": 2848, - "end": 2868, + "end": 2857, "ctxt": 0 }, "value": "nextToken", @@ -2836,7 +2836,7 @@ "type": "Identifier", "span": { "start": 2870, - "end": 2885, + "end": 2874, "ctxt": 0 }, "value": "node", @@ -2882,7 +2882,7 @@ "type": "Identifier", "span": { "start": 2887, - "end": 2910, + "end": 2901, "ctxt": 0 }, "value": "sameLineIndent", @@ -5260,7 +5260,7 @@ "type": "Identifier", "span": { "start": 7064, - "end": 7080, + "end": 7069, "ctxt": 0 }, "value": "token", @@ -6758,7 +6758,7 @@ "type": "Identifier", "span": { "start": 8594, - "end": 8612, + "end": 8604, "ctxt": 0 }, "value": "indentText", @@ -6794,7 +6794,7 @@ "type": "Identifier", "span": { "start": 8614, - "end": 8651, + "end": 8627, "ctxt": 0 }, "value": "editorOptions", @@ -6984,7 +6984,7 @@ "type": "Identifier", "span": { "start": 8814, - "end": 8826, + "end": 8818, "ctxt": 0 }, "value": "text", @@ -7020,7 +7020,7 @@ "type": "Identifier", "span": { "start": 8828, - "end": 8865, + "end": 8841, "ctxt": 0 }, "value": "editorOptions", @@ -7079,7 +7079,7 @@ "type": "Identifier", "span": { "start": 8867, - "end": 8897, + "end": 8888, "ctxt": 0 }, "value": "includeNonIndentChars", @@ -7784,7 +7784,7 @@ "type": "Identifier", "span": { "start": 9532, - "end": 9548, + "end": 9537, "ctxt": 0 }, "value": "token", @@ -7830,7 +7830,7 @@ "type": "Identifier", "span": { "start": 9550, - "end": 9565, + "end": 9554, "ctxt": 0 }, "value": "node", @@ -9268,7 +9268,7 @@ "type": "Identifier", "span": { "start": 11428, - "end": 11443, + "end": 11432, "ctxt": 0 }, "value": "node", @@ -10141,7 +10141,7 @@ "type": "Identifier", "span": { "start": 12388, - "end": 12404, + "end": 12393, "ctxt": 0 }, "value": "token", @@ -10187,7 +10187,7 @@ "type": "Identifier", "span": { "start": 12406, - "end": 12421, + "end": 12410, "ctxt": 0 }, "value": "node", @@ -10986,7 +10986,7 @@ "type": "Identifier", "span": { "start": 13680, - "end": 13696, + "end": 13685, "ctxt": 0 }, "value": "token", @@ -11032,7 +11032,7 @@ "type": "Identifier", "span": { "start": 13698, - "end": 13713, + "end": 13702, "ctxt": 0 }, "value": "node", @@ -12030,7 +12030,7 @@ "type": "Identifier", "span": { "start": 14590, - "end": 14606, + "end": 14595, "ctxt": 0 }, "value": "token", @@ -12076,7 +12076,7 @@ "type": "Identifier", "span": { "start": 14608, - "end": 14623, + "end": 14612, "ctxt": 0 }, "value": "node", @@ -13211,7 +13211,7 @@ "type": "Identifier", "span": { "start": 16290, - "end": 16321, + "end": 16313, "ctxt": 0 }, "value": "languageHostIndentation", @@ -13247,7 +13247,7 @@ "type": "Identifier", "span": { "start": 16323, - "end": 16338, + "end": 16327, "ctxt": 0 }, "value": "tree", @@ -13629,7 +13629,7 @@ "type": "Identifier", "span": { "start": 18939, - "end": 18966, + "end": 18949, "ctxt": 0 }, "value": "indentInfo", @@ -13675,7 +13675,7 @@ "type": "Identifier", "span": { "start": 18968, - "end": 18994, + "end": 18986, "ctxt": 0 }, "value": "tokenStartPosition", @@ -13711,7 +13711,7 @@ "type": "Identifier", "span": { "start": 18996, - "end": 19019, + "end": 19010, "ctxt": 0 }, "value": "sameLineIndent", @@ -15110,7 +15110,7 @@ "type": "Identifier", "span": { "start": 20453, - "end": 20480, + "end": 20472, "ctxt": 0 }, "value": "existingIndentation", @@ -15146,7 +15146,7 @@ "type": "Identifier", "span": { "start": 20482, - "end": 20495, + "end": 20487, "ctxt": 0 }, "value": "level", @@ -16209,7 +16209,7 @@ "type": "Identifier", "span": { "start": 21559, - "end": 21573, + "end": 21565, "ctxt": 0 }, "value": "prefix", @@ -16245,7 +16245,7 @@ "type": "Identifier", "span": { "start": 21575, - "end": 21598, + "end": 21590, "ctxt": 0 }, "value": "totalIndentSize", @@ -16281,7 +16281,7 @@ "type": "Identifier", "span": { "start": 21600, - "end": 21615, + "end": 21607, "ctxt": 0 }, "value": "tabSize", @@ -16317,7 +16317,7 @@ "type": "Identifier", "span": { "start": 21617, - "end": 21645, + "end": 21636, "ctxt": 0 }, "value": "convertTabsToSpaces", @@ -17007,7 +17007,7 @@ "type": "Identifier", "span": { "start": 22301, - "end": 22317, + "end": 22306, "ctxt": 0 }, "value": "token", @@ -17053,7 +17053,7 @@ "type": "Identifier", "span": { "start": 22319, - "end": 22334, + "end": 22323, "ctxt": 0 }, "value": "node", @@ -17982,7 +17982,7 @@ "type": "Identifier", "span": { "start": 23171, - "end": 23197, + "end": 23189, "ctxt": 0 }, "value": "tokenStartPosition", @@ -18018,7 +18018,7 @@ "type": "Identifier", "span": { "start": 23199, - "end": 23212, + "end": 23204, "ctxt": 0 }, "value": "delta", @@ -18553,7 +18553,7 @@ "type": "Identifier", "span": { "start": 23756, - "end": 23777, + "end": 23769, "ctxt": 0 }, "value": "currentIndent", @@ -18589,7 +18589,7 @@ "type": "Identifier", "span": { "start": 23779, - "end": 23792, + "end": 23784, "ctxt": 0 }, "value": "delta", @@ -19317,7 +19317,7 @@ "type": "Identifier", "span": { "start": 24448, - "end": 24474, + "end": 24466, "ctxt": 0 }, "value": "tokenStartPosition", @@ -19353,7 +19353,7 @@ "type": "Identifier", "span": { "start": 24476, - "end": 24507, + "end": 24499, "ctxt": 0 }, "value": "childTokenStartPosition", @@ -21088,7 +21088,7 @@ "type": "Identifier", "span": { "start": 27446, - "end": 27461, + "end": 27450, "ctxt": 0 }, "value": "tree", @@ -25181,7 +25181,7 @@ "type": "Identifier", "span": { "start": 32372, - "end": 32386, + "end": 32378, "ctxt": 0 }, "value": "offset", @@ -26083,7 +26083,7 @@ "type": "Identifier", "span": { "start": 33236, - "end": 33256, + "end": 33242, "ctxt": 0 }, "value": "indent", @@ -26129,7 +26129,7 @@ "type": "Identifier", "span": { "start": 33258, - "end": 33281, + "end": 33272, "ctxt": 0 }, "value": "sameLineIndent", @@ -26851,7 +26851,7 @@ "type": "Identifier", "span": { "start": 34080, - "end": 34096, + "end": 34088, "ctxt": 0 }, "value": "position", @@ -26887,7 +26887,7 @@ "type": "Identifier", "span": { "start": 34098, - "end": 34112, + "end": 34104, "ctxt": 0 }, "value": "indent", @@ -27107,7 +27107,7 @@ "type": "Identifier", "span": { "start": 34267, - "end": 34283, + "end": 34272, "ctxt": 0 }, "value": "token", @@ -27153,7 +27153,7 @@ "type": "Identifier", "span": { "start": 34285, - "end": 34300, + "end": 34289, "ctxt": 0 }, "value": "node", @@ -28130,7 +28130,7 @@ "type": "Identifier", "span": { "start": 35223, - "end": 35239, + "end": 35228, "ctxt": 0 }, "value": "token", diff --git a/crates/swc_ecma_parser/tests/tsc/partiallyAnnotatedFunctionInferenceError.json b/crates/swc_ecma_parser/tests/tsc/partiallyAnnotatedFunctionInferenceError.json index b1cc7672f9f5..a38191744edb 100644 --- a/crates/swc_ecma_parser/tests/tsc/partiallyAnnotatedFunctionInferenceError.json +++ b/crates/swc_ecma_parser/tests/tsc/partiallyAnnotatedFunctionInferenceError.json @@ -185,7 +185,7 @@ "type": "Identifier", "span": { "start": 108, - "end": 132, + "end": 109, "ctxt": 0 }, "value": "a", @@ -209,7 +209,7 @@ "type": "Identifier", "span": { "start": 112, - "end": 116, + "end": 113, "ctxt": 0 }, "value": "t", @@ -246,7 +246,7 @@ "type": "Identifier", "span": { "start": 118, - "end": 123, + "end": 120, "ctxt": 0 }, "value": "t1", diff --git a/crates/swc_ecma_parser/tests/tsc/partiallyAnnotatedFunctionInferenceWithTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/partiallyAnnotatedFunctionInferenceWithTypeParameter.json index 67f3181b1f3c..5a30e9e06566 100644 --- a/crates/swc_ecma_parser/tests/tsc/partiallyAnnotatedFunctionInferenceWithTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/partiallyAnnotatedFunctionInferenceWithTypeParameter.json @@ -185,7 +185,7 @@ "type": "Identifier", "span": { "start": 103, - "end": 127, + "end": 104, "ctxt": 0 }, "value": "a", @@ -209,7 +209,7 @@ "type": "Identifier", "span": { "start": 107, - "end": 111, + "end": 108, "ctxt": 0 }, "value": "t", @@ -246,7 +246,7 @@ "type": "Identifier", "span": { "start": 113, - "end": 118, + "end": 115, "ctxt": 0 }, "value": "t1", @@ -417,7 +417,7 @@ "type": "Identifier", "span": { "start": 172, - "end": 208, + "end": 173, "ctxt": 0 }, "value": "a", @@ -441,7 +441,7 @@ "type": "Identifier", "span": { "start": 176, - "end": 180, + "end": 177, "ctxt": 0 }, "value": "t", @@ -478,7 +478,7 @@ "type": "Identifier", "span": { "start": 182, - "end": 187, + "end": 184, "ctxt": 0 }, "value": "t1", diff --git a/crates/swc_ecma_parser/tests/tsc/partiallyAnnotatedFunctionWitoutTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/partiallyAnnotatedFunctionWitoutTypeParameter.json index 1c6d01e4608e..74105ed4918d 100644 --- a/crates/swc_ecma_parser/tests/tsc/partiallyAnnotatedFunctionWitoutTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/partiallyAnnotatedFunctionWitoutTypeParameter.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 65, - "end": 98, + "end": 66, "ctxt": 0 }, "value": "f", @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 69, - "end": 78, + "end": 70, "ctxt": 0 }, "value": "a", @@ -83,7 +83,7 @@ "type": "Identifier", "span": { "start": 80, - "end": 89, + "end": 81, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/tsc/partiallyNamedTuples.json b/crates/swc_ecma_parser/tests/tsc/partiallyNamedTuples.json index 014ea5561bc5..8b9e3729439e 100644 --- a/crates/swc_ecma_parser/tests/tsc/partiallyNamedTuples.json +++ b/crates/swc_ecma_parser/tests/tsc/partiallyNamedTuples.json @@ -203,7 +203,7 @@ "type": "Identifier", "span": { "start": 105, - "end": 125, + "end": 106, "ctxt": 0 }, "value": "a", @@ -571,7 +571,7 @@ "type": "Identifier", "span": { "start": 297, - "end": 319, + "end": 298, "ctxt": 0 }, "value": "a", @@ -712,7 +712,7 @@ "type": "Identifier", "span": { "start": 367, - "end": 389, + "end": 368, "ctxt": 0 }, "value": "a", @@ -2892,7 +2892,7 @@ "type": "Identifier", "span": { "start": 1562, - "end": 1640, + "end": 1565, "ctxt": 0 }, "value": "arg", diff --git a/crates/swc_ecma_parser/tests/tsc/primtiveTypesAreIdentical.json b/crates/swc_ecma_parser/tests/tsc/primtiveTypesAreIdentical.json index 33bf06dd705a..9424b8ff7bc8 100644 --- a/crates/swc_ecma_parser/tests/tsc/primtiveTypesAreIdentical.json +++ b/crates/swc_ecma_parser/tests/tsc/primtiveTypesAreIdentical.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 104, - "end": 113, + "end": 105, "ctxt": 0 }, "value": "x", @@ -95,7 +95,7 @@ "type": "Identifier", "span": { "start": 130, - "end": 139, + "end": 131, "ctxt": 0 }, "value": "x", @@ -158,7 +158,7 @@ "type": "Identifier", "span": { "start": 156, - "end": 162, + "end": 157, "ctxt": 0 }, "value": "x", @@ -229,7 +229,7 @@ "type": "Identifier", "span": { "start": 183, - "end": 192, + "end": 184, "ctxt": 0 }, "value": "x", @@ -292,7 +292,7 @@ "type": "Identifier", "span": { "start": 209, - "end": 218, + "end": 210, "ctxt": 0 }, "value": "x", @@ -355,7 +355,7 @@ "type": "Identifier", "span": { "start": 235, - "end": 241, + "end": 236, "ctxt": 0 }, "value": "x", @@ -426,7 +426,7 @@ "type": "Identifier", "span": { "start": 262, - "end": 272, + "end": 263, "ctxt": 0 }, "value": "x", @@ -489,7 +489,7 @@ "type": "Identifier", "span": { "start": 289, - "end": 299, + "end": 290, "ctxt": 0 }, "value": "x", @@ -552,7 +552,7 @@ "type": "Identifier", "span": { "start": 316, - "end": 322, + "end": 317, "ctxt": 0 }, "value": "x", @@ -623,7 +623,7 @@ "type": "Identifier", "span": { "start": 343, - "end": 349, + "end": 344, "ctxt": 0 }, "value": "x", @@ -686,7 +686,7 @@ "type": "Identifier", "span": { "start": 366, - "end": 372, + "end": 367, "ctxt": 0 }, "value": "x", @@ -749,7 +749,7 @@ "type": "Identifier", "span": { "start": 389, - "end": 395, + "end": 390, "ctxt": 0 }, "value": "x", @@ -820,7 +820,7 @@ "type": "Identifier", "span": { "start": 416, - "end": 422, + "end": 417, "ctxt": 0 }, "value": "x", @@ -892,7 +892,7 @@ "type": "Identifier", "span": { "start": 439, - "end": 445, + "end": 440, "ctxt": 0 }, "value": "x", @@ -964,7 +964,7 @@ "type": "Identifier", "span": { "start": 462, - "end": 471, + "end": 463, "ctxt": 0 }, "value": "x", @@ -1027,7 +1027,7 @@ "type": "Identifier", "span": { "start": 488, - "end": 494, + "end": 489, "ctxt": 0 }, "value": "x", @@ -1139,7 +1139,7 @@ "type": "Identifier", "span": { "start": 528, - "end": 532, + "end": 529, "ctxt": 0 }, "value": "x", @@ -1212,7 +1212,7 @@ "type": "Identifier", "span": { "start": 549, - "end": 553, + "end": 550, "ctxt": 0 }, "value": "x", @@ -1285,7 +1285,7 @@ "type": "Identifier", "span": { "start": 570, - "end": 576, + "end": 571, "ctxt": 0 }, "value": "x", @@ -1356,7 +1356,7 @@ "type": "Identifier", "span": { "start": 597, - "end": 604, + "end": 598, "ctxt": 0 }, "value": "x", @@ -1419,7 +1419,7 @@ "type": "Identifier", "span": { "start": 621, - "end": 628, + "end": 622, "ctxt": 0 }, "value": "x", @@ -1482,7 +1482,7 @@ "type": "Identifier", "span": { "start": 645, - "end": 651, + "end": 646, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameAccessors.json b/crates/swc_ecma_parser/tests/tsc/privateNameAccessors.json index da960895146a..e69a58f6173a 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameAccessors.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNameAccessors.json @@ -138,7 +138,7 @@ "type": "Identifier", "span": { "start": 91, - "end": 104, + "end": 96, "ctxt": 0 }, "value": "param", @@ -293,7 +293,7 @@ "type": "Identifier", "span": { "start": 161, - "end": 173, + "end": 165, "ctxt": 0 }, "value": "name", diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameAndAny.json b/crates/swc_ecma_parser/tests/tsc/privateNameAndAny.json index e8a67f58ac4a..ff77792afc0f 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameAndAny.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNameAndAny.json @@ -198,7 +198,7 @@ "type": "Identifier", "span": { "start": 114, - "end": 124, + "end": 119, "ctxt": 0 }, "value": "thing", @@ -522,7 +522,7 @@ "type": "Identifier", "span": { "start": 263, - "end": 277, + "end": 268, "ctxt": 0 }, "value": "thing", @@ -846,7 +846,7 @@ "type": "Identifier", "span": { "start": 401, - "end": 413, + "end": 406, "ctxt": 0 }, "value": "thing", diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameAndIndexSignature.json b/crates/swc_ecma_parser/tests/tsc/privateNameAndIndexSignature.json index 5da95aa75ad8..e8e77176a0bb 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameAndIndexSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNameAndIndexSignature.json @@ -226,7 +226,7 @@ "type": "Identifier", "span": { "start": 212, - "end": 227, + "end": 219, "ctxt": 0 }, "value": "message", diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameAndObjectRestSpread.json b/crates/swc_ecma_parser/tests/tsc/privateNameAndObjectRestSpread.json index 5b97564d7c63..ba15b2b47d1d 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameAndObjectRestSpread.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNameAndObjectRestSpread.json @@ -145,7 +145,7 @@ "type": "Identifier", "span": { "start": 100, - "end": 108, + "end": 105, "ctxt": 0 }, "value": "other", diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameComputedPropertyName2.json b/crates/swc_ecma_parser/tests/tsc/privateNameComputedPropertyName2.json index 23f8d84df90b..dff4294a62c4 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameComputedPropertyName2.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNameComputedPropertyName2.json @@ -51,7 +51,7 @@ "type": "Identifier", "span": { "start": 48, - "end": 52, + "end": 49, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameDuplicateField.json b/crates/swc_ecma_parser/tests/tsc/privateNameDuplicateField.json index bbcdf9bac767..90a7a24be251 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameDuplicateField.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNameDuplicateField.json @@ -521,7 +521,7 @@ "type": "Identifier", "span": { "start": 413, - "end": 426, + "end": 418, "ctxt": 0 }, "value": "value", @@ -1067,7 +1067,7 @@ "type": "Identifier", "span": { "start": 849, - "end": 862, + "end": 854, "ctxt": 0 }, "value": "value", @@ -1688,7 +1688,7 @@ "type": "Identifier", "span": { "start": 1247, - "end": 1260, + "end": 1252, "ctxt": 0 }, "value": "value", @@ -2274,7 +2274,7 @@ "type": "Identifier", "span": { "start": 1675, - "end": 1688, + "end": 1680, "ctxt": 0 }, "value": "value", @@ -2971,7 +2971,7 @@ "type": "Identifier", "span": { "start": 2122, - "end": 2135, + "end": 2127, "ctxt": 0 }, "value": "value", @@ -3643,7 +3643,7 @@ "type": "Identifier", "span": { "start": 2599, - "end": 2612, + "end": 2604, "ctxt": 0 }, "value": "value", @@ -3796,7 +3796,7 @@ "type": "Identifier", "span": { "start": 2704, - "end": 2717, + "end": 2709, "ctxt": 0 }, "value": "value", @@ -3958,7 +3958,7 @@ "type": "Identifier", "span": { "start": 2810, - "end": 2823, + "end": 2815, "ctxt": 0 }, "value": "value", @@ -4130,7 +4130,7 @@ "type": "Identifier", "span": { "start": 2910, - "end": 2923, + "end": 2915, "ctxt": 0 }, "value": "value", @@ -4321,7 +4321,7 @@ "type": "Identifier", "span": { "start": 3026, - "end": 3039, + "end": 3031, "ctxt": 0 }, "value": "value", @@ -4412,7 +4412,7 @@ "type": "Identifier", "span": { "start": 3062, - "end": 3075, + "end": 3067, "ctxt": 0 }, "value": "value", @@ -4530,7 +4530,7 @@ "type": "Identifier", "span": { "start": 3151, - "end": 3164, + "end": 3156, "ctxt": 0 }, "value": "value", @@ -4692,7 +4692,7 @@ "type": "Identifier", "span": { "start": 3270, - "end": 3283, + "end": 3275, "ctxt": 0 }, "value": "value", @@ -4864,7 +4864,7 @@ "type": "Identifier", "span": { "start": 3386, - "end": 3399, + "end": 3391, "ctxt": 0 }, "value": "value", @@ -5055,7 +5055,7 @@ "type": "Identifier", "span": { "start": 3515, - "end": 3528, + "end": 3520, "ctxt": 0 }, "value": "value", @@ -5146,7 +5146,7 @@ "type": "Identifier", "span": { "start": 3558, - "end": 3571, + "end": 3563, "ctxt": 0 }, "value": "value", @@ -5727,7 +5727,7 @@ "type": "Identifier", "span": { "start": 4021, - "end": 4034, + "end": 4026, "ctxt": 0 }, "value": "value", @@ -6273,7 +6273,7 @@ "type": "Identifier", "span": { "start": 4509, - "end": 4522, + "end": 4514, "ctxt": 0 }, "value": "value", @@ -6894,7 +6894,7 @@ "type": "Identifier", "span": { "start": 4965, - "end": 4978, + "end": 4970, "ctxt": 0 }, "value": "value", @@ -7480,7 +7480,7 @@ "type": "Identifier", "span": { "start": 5445, - "end": 5458, + "end": 5450, "ctxt": 0 }, "value": "value", @@ -8177,7 +8177,7 @@ "type": "Identifier", "span": { "start": 5954, - "end": 5967, + "end": 5959, "ctxt": 0 }, "value": "value", @@ -8849,7 +8849,7 @@ "type": "Identifier", "span": { "start": 6479, - "end": 6492, + "end": 6484, "ctxt": 0 }, "value": "value", @@ -9002,7 +9002,7 @@ "type": "Identifier", "span": { "start": 6603, - "end": 6616, + "end": 6608, "ctxt": 0 }, "value": "value", @@ -9164,7 +9164,7 @@ "type": "Identifier", "span": { "start": 6722, - "end": 6735, + "end": 6727, "ctxt": 0 }, "value": "value", @@ -9336,7 +9336,7 @@ "type": "Identifier", "span": { "start": 6839, - "end": 6852, + "end": 6844, "ctxt": 0 }, "value": "value", @@ -9527,7 +9527,7 @@ "type": "Identifier", "span": { "start": 6968, - "end": 6981, + "end": 6973, "ctxt": 0 }, "value": "value", @@ -9618,7 +9618,7 @@ "type": "Identifier", "span": { "start": 7004, - "end": 7017, + "end": 7009, "ctxt": 0 }, "value": "value", @@ -9736,7 +9736,7 @@ "type": "Identifier", "span": { "start": 7106, - "end": 7119, + "end": 7111, "ctxt": 0 }, "value": "value", @@ -9898,7 +9898,7 @@ "type": "Identifier", "span": { "start": 7238, - "end": 7251, + "end": 7243, "ctxt": 0 }, "value": "value", @@ -10070,7 +10070,7 @@ "type": "Identifier", "span": { "start": 7364, - "end": 7377, + "end": 7369, "ctxt": 0 }, "value": "value", @@ -10261,7 +10261,7 @@ "type": "Identifier", "span": { "start": 7506, - "end": 7519, + "end": 7511, "ctxt": 0 }, "value": "value", @@ -10352,7 +10352,7 @@ "type": "Identifier", "span": { "start": 7549, - "end": 7562, + "end": 7554, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameES5Ban.json b/crates/swc_ecma_parser/tests/tsc/privateNameES5Ban.json index 1bb50f37e118..d51b6a74fbe5 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameES5Ban.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNameES5Ban.json @@ -364,7 +364,7 @@ "type": "Identifier", "span": { "start": 188, - "end": 197, + "end": 189, "ctxt": 0 }, "value": "x", @@ -528,7 +528,7 @@ "type": "Identifier", "span": { "start": 260, - "end": 269, + "end": 261, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameEmitHelpers.json b/crates/swc_ecma_parser/tests/tsc/privateNameEmitHelpers.json index f21c5b223841..272a4764ef7b 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameEmitHelpers.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNameEmitHelpers.json @@ -232,7 +232,7 @@ "type": "Identifier", "span": { "start": 161, - "end": 170, + "end": 162, "ctxt": 0 }, "value": "v", @@ -387,7 +387,7 @@ "type": "Identifier", "span": { "start": 380, - "end": 391, + "end": 388, "ctxt": 0 }, "value": "receiver", @@ -433,7 +433,7 @@ "type": "Identifier", "span": { "start": 393, - "end": 403, + "end": 398, "ctxt": 0 }, "value": "state", @@ -593,7 +593,7 @@ "type": "Identifier", "span": { "start": 477, - "end": 488, + "end": 485, "ctxt": 0 }, "value": "receiver", @@ -639,7 +639,7 @@ "type": "Identifier", "span": { "start": 490, - "end": 500, + "end": 495, "ctxt": 0 }, "value": "state", @@ -675,7 +675,7 @@ "type": "Identifier", "span": { "start": 502, - "end": 510, + "end": 507, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameField.json b/crates/swc_ecma_parser/tests/tsc/privateNameField.json index 057e92fbde19..06dacef994f5 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameField.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNameField.json @@ -107,7 +107,7 @@ "type": "Identifier", "span": { "start": 80, - "end": 92, + "end": 84, "ctxt": 0 }, "value": "name", diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameFieldDestructuredBinding.json b/crates/swc_ecma_parser/tests/tsc/privateNameFieldDestructuredBinding.json index 2a6888f32fae..c6dbe4e4256e 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameFieldDestructuredBinding.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNameFieldDestructuredBinding.json @@ -1468,7 +1468,7 @@ "type": "Identifier", "span": { "start": 621, - "end": 626, + "end": 623, "ctxt": 0 }, "value": "_a", diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameFieldParenthesisLeftAssignment.json b/crates/swc_ecma_parser/tests/tsc/privateNameFieldParenthesisLeftAssignment.json index f379d0f2cad5..4429745d0a86 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameFieldParenthesisLeftAssignment.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNameFieldParenthesisLeftAssignment.json @@ -107,7 +107,7 @@ "type": "Identifier", "span": { "start": 66, - "end": 79, + "end": 71, "ctxt": 0 }, "value": "value", @@ -237,7 +237,7 @@ "type": "Identifier", "span": { "start": 122, - "end": 131, + "end": 123, "ctxt": 0 }, "value": "p", @@ -407,7 +407,7 @@ "type": "Identifier", "span": { "start": 182, - "end": 191, + "end": 183, "ctxt": 0 }, "value": "p", @@ -593,7 +593,7 @@ "type": "Identifier", "span": { "start": 246, - "end": 255, + "end": 247, "ctxt": 0 }, "value": "p", @@ -746,7 +746,7 @@ "type": "Identifier", "span": { "start": 296, - "end": 305, + "end": 297, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameInInExpressionUnused.json b/crates/swc_ecma_parser/tests/tsc/privateNameInInExpressionUnused.json index 42c5ae37f532..02497f11e929 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameInInExpressionUnused.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNameInInExpressionUnused.json @@ -159,7 +159,7 @@ "type": "Identifier", "span": { "start": 183, - "end": 189, + "end": 184, "ctxt": 0 }, "value": "v", diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameInLhsReceiverExpression.json b/crates/swc_ecma_parser/tests/tsc/privateNameInLhsReceiverExpression.json index 9178b37c6dda..37f6e8a4fa86 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameInLhsReceiverExpression.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNameInLhsReceiverExpression.json @@ -101,7 +101,7 @@ "type": "Identifier", "span": { "start": 69, - "end": 97, + "end": 72, "ctxt": 0 }, "value": "obj", diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameMethod.json b/crates/swc_ecma_parser/tests/tsc/privateNameMethod.json index 8b57277d57eb..d0f14d510999 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameMethod.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNameMethod.json @@ -65,7 +65,7 @@ "type": "Identifier", "span": { "start": 58, - "end": 71, + "end": 63, "ctxt": 0 }, "value": "param", @@ -182,7 +182,7 @@ "type": "Identifier", "span": { "start": 124, - "end": 136, + "end": 128, "ctxt": 0 }, "value": "name", diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameMethodAssignment.json b/crates/swc_ecma_parser/tests/tsc/privateNameMethodAssignment.json index 20f8fbd8a21c..d3941450492e 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameMethodAssignment.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNameMethodAssignment.json @@ -118,7 +118,7 @@ "type": "Identifier", "span": { "start": 67, - "end": 72, + "end": 68, "ctxt": 0 }, "value": "a", @@ -164,7 +164,7 @@ "type": "Identifier", "span": { "start": 74, - "end": 80, + "end": 75, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameSetterExprReturnValue.json b/crates/swc_ecma_parser/tests/tsc/privateNameSetterExprReturnValue.json index 0e25670fa1bc..a54b39fa7277 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameSetterExprReturnValue.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNameSetterExprReturnValue.json @@ -65,7 +65,7 @@ "type": "Identifier", "span": { "start": 44, - "end": 53, + "end": 45, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameStaticAccessors.json b/crates/swc_ecma_parser/tests/tsc/privateNameStaticAccessors.json index b4b871006f64..bd82bfedd01c 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameStaticAccessors.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNameStaticAccessors.json @@ -138,7 +138,7 @@ "type": "Identifier", "span": { "start": 105, - "end": 118, + "end": 110, "ctxt": 0 }, "value": "param", @@ -293,7 +293,7 @@ "type": "Identifier", "span": { "start": 182, - "end": 194, + "end": 186, "ctxt": 0 }, "value": "name", diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameStaticAccessorssDerivedClasses.json b/crates/swc_ecma_parser/tests/tsc/privateNameStaticAccessorssDerivedClasses.json index 0dbbf9d20ab2..5cd8e60f77da 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameStaticAccessorssDerivedClasses.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNameStaticAccessorssDerivedClasses.json @@ -146,7 +146,7 @@ "type": "Identifier", "span": { "start": 100, - "end": 117, + "end": 101, "ctxt": 0 }, "value": "x", @@ -353,7 +353,7 @@ "type": "Identifier", "span": { "start": 206, - "end": 223, + "end": 207, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameStaticEmitHelpers.json b/crates/swc_ecma_parser/tests/tsc/privateNameStaticEmitHelpers.json index 44d6c06f9150..38284690db11 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameStaticEmitHelpers.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNameStaticEmitHelpers.json @@ -343,7 +343,7 @@ "type": "Identifier", "span": { "start": 393, - "end": 404, + "end": 401, "ctxt": 0 }, "value": "receiver", @@ -389,7 +389,7 @@ "type": "Identifier", "span": { "start": 406, - "end": 416, + "end": 411, "ctxt": 0 }, "value": "state", @@ -549,7 +549,7 @@ "type": "Identifier", "span": { "start": 490, - "end": 501, + "end": 498, "ctxt": 0 }, "value": "receiver", @@ -595,7 +595,7 @@ "type": "Identifier", "span": { "start": 503, - "end": 513, + "end": 508, "ctxt": 0 }, "value": "state", @@ -631,7 +631,7 @@ "type": "Identifier", "span": { "start": 515, - "end": 523, + "end": 520, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameStaticFieldDestructuredBinding.json b/crates/swc_ecma_parser/tests/tsc/privateNameStaticFieldDestructuredBinding.json index f064654d8c68..69c0ffe1d330 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameStaticFieldDestructuredBinding.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNameStaticFieldDestructuredBinding.json @@ -1476,7 +1476,7 @@ "type": "Identifier", "span": { "start": 628, - "end": 640, + "end": 630, "ctxt": 0 }, "value": "_a", diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameStaticMethod.json b/crates/swc_ecma_parser/tests/tsc/privateNameStaticMethod.json index 6212a812520e..33ffca7a6252 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameStaticMethod.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNameStaticMethod.json @@ -65,7 +65,7 @@ "type": "Identifier", "span": { "start": 65, - "end": 78, + "end": 70, "ctxt": 0 }, "value": "param", diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameStaticMethodAssignment.json b/crates/swc_ecma_parser/tests/tsc/privateNameStaticMethodAssignment.json index 5807da462425..dbf033428023 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameStaticMethodAssignment.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNameStaticMethodAssignment.json @@ -118,7 +118,7 @@ "type": "Identifier", "span": { "start": 74, - "end": 86, + "end": 75, "ctxt": 0 }, "value": "a", @@ -164,7 +164,7 @@ "type": "Identifier", "span": { "start": 88, - "end": 94, + "end": 89, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameStaticsAndStaticMethods.json b/crates/swc_ecma_parser/tests/tsc/privateNameStaticsAndStaticMethods.json index 81e328f07edc..abde5879beff 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameStaticsAndStaticMethods.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNameStaticsAndStaticMethods.json @@ -65,7 +65,7 @@ "type": "Identifier", "span": { "start": 131, - "end": 140, + "end": 132, "ctxt": 0 }, "value": "a", @@ -156,7 +156,7 @@ "type": "Identifier", "span": { "start": 167, - "end": 176, + "end": 168, "ctxt": 0 }, "value": "a", @@ -247,7 +247,7 @@ "type": "Identifier", "span": { "start": 204, - "end": 213, + "end": 205, "ctxt": 0 }, "value": "a", @@ -521,7 +521,7 @@ "type": "Identifier", "span": { "start": 358, - "end": 369, + "end": 361, "ctxt": 0 }, "value": "val", @@ -1098,7 +1098,7 @@ "type": "Identifier", "span": { "start": 579, - "end": 588, + "end": 580, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameUnused.json b/crates/swc_ecma_parser/tests/tsc/privateNameUnused.json index 911671251ab3..c077de740ccd 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameUnused.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNameUnused.json @@ -675,7 +675,7 @@ "type": "Identifier", "span": { "start": 369, - "end": 382, + "end": 374, "ctxt": 0 }, "value": "value", @@ -855,7 +855,7 @@ "type": "Identifier", "span": { "start": 443, - "end": 456, + "end": 448, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/privateNamesAndMethods.json b/crates/swc_ecma_parser/tests/tsc/privateNamesAndMethods.json index e0ad38e068a0..2c82e7e4fd15 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNamesAndMethods.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNamesAndMethods.json @@ -65,7 +65,7 @@ "type": "Identifier", "span": { "start": 107, - "end": 116, + "end": 108, "ctxt": 0 }, "value": "a", @@ -156,7 +156,7 @@ "type": "Identifier", "span": { "start": 136, - "end": 145, + "end": 137, "ctxt": 0 }, "value": "a", @@ -247,7 +247,7 @@ "type": "Identifier", "span": { "start": 166, - "end": 175, + "end": 167, "ctxt": 0 }, "value": "a", @@ -521,7 +521,7 @@ "type": "Identifier", "span": { "start": 299, - "end": 310, + "end": 302, "ctxt": 0 }, "value": "val", @@ -1086,7 +1086,7 @@ "type": "Identifier", "span": { "start": 531, - "end": 540, + "end": 532, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/privateNamesAndStaticMethods.json b/crates/swc_ecma_parser/tests/tsc/privateNamesAndStaticMethods.json index 81e328f07edc..abde5879beff 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNamesAndStaticMethods.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNamesAndStaticMethods.json @@ -65,7 +65,7 @@ "type": "Identifier", "span": { "start": 131, - "end": 140, + "end": 132, "ctxt": 0 }, "value": "a", @@ -156,7 +156,7 @@ "type": "Identifier", "span": { "start": 167, - "end": 176, + "end": 168, "ctxt": 0 }, "value": "a", @@ -247,7 +247,7 @@ "type": "Identifier", "span": { "start": 204, - "end": 213, + "end": 205, "ctxt": 0 }, "value": "a", @@ -521,7 +521,7 @@ "type": "Identifier", "span": { "start": 358, - "end": 369, + "end": 361, "ctxt": 0 }, "value": "val", @@ -1098,7 +1098,7 @@ "type": "Identifier", "span": { "start": 579, - "end": 588, + "end": 580, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/privateNamesAndkeyof.json b/crates/swc_ecma_parser/tests/tsc/privateNamesAndkeyof.json index c6ee9c9a479a..8d9d35a7ceca 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNamesAndkeyof.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNamesAndkeyof.json @@ -252,7 +252,7 @@ "type": "Identifier", "span": { "start": 137, - "end": 150, + "end": 142, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/privateNamesAssertion.json b/crates/swc_ecma_parser/tests/tsc/privateNamesAssertion.json index 9d0d78db60bf..02ac82387a8d 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNamesAssertion.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNamesAssertion.json @@ -190,7 +190,7 @@ "type": "Identifier", "span": { "start": 103, - "end": 109, + "end": 104, "ctxt": 0 }, "value": "v", @@ -300,7 +300,7 @@ "type": "Identifier", "span": { "start": 236, - "end": 246, + "end": 237, "ctxt": 0 }, "value": "v", @@ -503,7 +503,7 @@ "type": "Identifier", "span": { "start": 312, - "end": 318, + "end": 313, "ctxt": 0 }, "value": "v", @@ -715,7 +715,7 @@ "type": "Identifier", "span": { "start": 434, - "end": 444, + "end": 435, "ctxt": 0 }, "value": "v", diff --git a/crates/swc_ecma_parser/tests/tsc/privateNamesUnique-2.json b/crates/swc_ecma_parser/tests/tsc/privateNamesUnique-2.json index 49bd7c2d8d8c..9cd78eaf746a 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNamesUnique-2.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNamesUnique-2.json @@ -99,7 +99,7 @@ "type": "Identifier", "span": { "start": 75, - "end": 99, + "end": 80, "ctxt": 0 }, "value": "other", diff --git a/crates/swc_ecma_parser/tests/tsc/privateNamesUnique-3.json b/crates/swc_ecma_parser/tests/tsc/privateNamesUnique-3.json index 8cca21bd899c..05d225ab41c5 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNamesUnique-3.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNamesUnique-3.json @@ -214,7 +214,7 @@ "type": "Identifier", "span": { "start": 341, - "end": 345, + "end": 342, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/privateWriteOnlyAccessorRead.json b/crates/swc_ecma_parser/tests/tsc/privateWriteOnlyAccessorRead.json index 8a25014d2f59..3a04dc5637c0 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateWriteOnlyAccessorRead.json +++ b/crates/swc_ecma_parser/tests/tsc/privateWriteOnlyAccessorRead.json @@ -65,7 +65,7 @@ "type": "Identifier", "span": { "start": 46, - "end": 73, + "end": 47, "ctxt": 0 }, "value": "v", @@ -240,7 +240,7 @@ "type": "Identifier", "span": { "start": 95, - "end": 106, + "end": 96, "ctxt": 0 }, "value": "v", @@ -339,7 +339,7 @@ "type": "Identifier", "span": { "start": 127, - "end": 136, + "end": 128, "ctxt": 0 }, "value": "v", @@ -430,7 +430,7 @@ "type": "Identifier", "span": { "start": 162, - "end": 171, + "end": 163, "ctxt": 0 }, "value": "v", diff --git a/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints2.json b/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints2.json index e93d24eea783..436685a1c3ca 100644 --- a/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints2.json +++ b/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints2.json @@ -531,7 +531,7 @@ "type": "Identifier", "span": { "start": 352, - "end": 356, + "end": 353, "ctxt": 0 }, "value": "x", @@ -1773,7 +1773,7 @@ "type": "Identifier", "span": { "start": 1037, - "end": 1041, + "end": 1038, "ctxt": 0 }, "value": "x", @@ -1939,7 +1939,7 @@ "type": "Identifier", "span": { "start": 1078, - "end": 1082, + "end": 1079, "ctxt": 0 }, "value": "x", @@ -1976,7 +1976,7 @@ "type": "Identifier", "span": { "start": 1084, - "end": 1088, + "end": 1085, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints3.json b/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints3.json index 7b8d406140bd..9afc53fc1eb6 100644 --- a/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints3.json +++ b/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints3.json @@ -531,7 +531,7 @@ "type": "Identifier", "span": { "start": 374, - "end": 378, + "end": 375, "ctxt": 0 }, "value": "x", @@ -1773,7 +1773,7 @@ "type": "Identifier", "span": { "start": 755, - "end": 759, + "end": 756, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/propertyAccessWidening.json b/crates/swc_ecma_parser/tests/tsc/propertyAccessWidening.json index c4afd39e6c90..119e36a67fcd 100644 --- a/crates/swc_ecma_parser/tests/tsc/propertyAccessWidening.json +++ b/crates/swc_ecma_parser/tests/tsc/propertyAccessWidening.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 53, - "end": 69, + "end": 64, "ctxt": 0 }, "value": "headerNames", @@ -323,7 +323,7 @@ "type": "Identifier", "span": { "start": 191, - "end": 207, + "end": 202, "ctxt": 0 }, "value": "headerNames", @@ -622,7 +622,7 @@ "type": "Identifier", "span": { "start": 411, - "end": 445, + "end": 418, "ctxt": 0 }, "value": "options", diff --git a/crates/swc_ecma_parser/tests/tsc/propertyOverridesAccessors4.json b/crates/swc_ecma_parser/tests/tsc/propertyOverridesAccessors4.json index de4c85d7ccd7..291368e9ca7d 100644 --- a/crates/swc_ecma_parser/tests/tsc/propertyOverridesAccessors4.json +++ b/crates/swc_ecma_parser/tests/tsc/propertyOverridesAccessors4.json @@ -111,7 +111,7 @@ "type": "Identifier", "span": { "start": 112, - "end": 123, + "end": 115, "ctxt": 0 }, "value": "val", diff --git a/crates/swc_ecma_parser/tests/tsc/propertyOverridesAccessors5.json b/crates/swc_ecma_parser/tests/tsc/propertyOverridesAccessors5.json index 97a33ed4a2b1..7a35dc055e12 100644 --- a/crates/swc_ecma_parser/tests/tsc/propertyOverridesAccessors5.json +++ b/crates/swc_ecma_parser/tests/tsc/propertyOverridesAccessors5.json @@ -151,7 +151,7 @@ "type": "Identifier", "span": { "start": 140, - "end": 149, + "end": 141, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/prototypePropertyAssignmentMergeWithInterfaceMethod.json b/crates/swc_ecma_parser/tests/tsc/prototypePropertyAssignmentMergeWithInterfaceMethod.json index 643534437802..1202e051dffc 100644 --- a/crates/swc_ecma_parser/tests/tsc/prototypePropertyAssignmentMergeWithInterfaceMethod.json +++ b/crates/swc_ecma_parser/tests/tsc/prototypePropertyAssignmentMergeWithInterfaceMethod.json @@ -93,7 +93,7 @@ "type": "Identifier", "span": { "start": 209, - "end": 229, + "end": 214, "ctxt": 0 }, "value": "query", @@ -250,7 +250,7 @@ "type": "Identifier", "span": { "start": 265, - "end": 291, + "end": 270, "ctxt": 0 }, "value": "scope", @@ -465,7 +465,7 @@ "type": "Identifier", "span": { "start": 345, - "end": 374, + "end": 352, "ctxt": 0 }, "value": "queries", diff --git a/crates/swc_ecma_parser/tests/tsc/readonlyArraysAndTuples2.json b/crates/swc_ecma_parser/tests/tsc/readonlyArraysAndTuples2.json index 9d035ed01f4c..41db9fa2bd6c 100644 --- a/crates/swc_ecma_parser/tests/tsc/readonlyArraysAndTuples2.json +++ b/crates/swc_ecma_parser/tests/tsc/readonlyArraysAndTuples2.json @@ -370,7 +370,7 @@ "type": "Identifier", "span": { "start": 306, - "end": 318, + "end": 308, "ctxt": 0 }, "value": "ma", @@ -414,7 +414,7 @@ "type": "Identifier", "span": { "start": 320, - "end": 341, + "end": 322, "ctxt": 0 }, "value": "ra", @@ -467,7 +467,7 @@ "type": "Identifier", "span": { "start": 343, - "end": 363, + "end": 345, "ctxt": 0 }, "value": "mt", @@ -540,7 +540,7 @@ "type": "Identifier", "span": { "start": 365, - "end": 394, + "end": 367, "ctxt": 0 }, "value": "rt", diff --git a/crates/swc_ecma_parser/tests/tsc/readonlyConstructorAssignment.json b/crates/swc_ecma_parser/tests/tsc/readonlyConstructorAssignment.json index 925cafc5668d..d8ad10c2a554 100644 --- a/crates/swc_ecma_parser/tests/tsc/readonlyConstructorAssignment.json +++ b/crates/swc_ecma_parser/tests/tsc/readonlyConstructorAssignment.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 121, - "end": 130, + "end": 122, "ctxt": 0 }, "value": "x", @@ -207,7 +207,7 @@ "type": "Identifier", "span": { "start": 199, - "end": 208, + "end": 200, "ctxt": 0 }, "value": "x", @@ -407,7 +407,7 @@ "type": "Identifier", "span": { "start": 467, - "end": 476, + "end": 468, "ctxt": 0 }, "value": "x", @@ -607,7 +607,7 @@ "type": "Identifier", "span": { "start": 570, - "end": 579, + "end": 571, "ctxt": 0 }, "value": "x", @@ -758,7 +758,7 @@ "type": "Identifier", "span": { "start": 701, - "end": 710, + "end": 702, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/readonlyInAmbientClass.json b/crates/swc_ecma_parser/tests/tsc/readonlyInAmbientClass.json index 76727719c9c9..a222ecc8d6de 100644 --- a/crates/swc_ecma_parser/tests/tsc/readonlyInAmbientClass.json +++ b/crates/swc_ecma_parser/tests/tsc/readonlyInAmbientClass.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 40, - "end": 49, + "end": 41, "ctxt": 0 }, "value": "x", @@ -119,7 +119,7 @@ "type": "Identifier", "span": { "start": 69, - "end": 78, + "end": 70, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/readonlyRestParameters.json b/crates/swc_ecma_parser/tests/tsc/readonlyRestParameters.json index 4519d183def0..bf38cd220e28 100644 --- a/crates/swc_ecma_parser/tests/tsc/readonlyRestParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/readonlyRestParameters.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 53, - "end": 62, + "end": 54, "ctxt": 0 }, "value": "a", @@ -68,7 +68,7 @@ "type": "Identifier", "span": { "start": 64, - "end": 73, + "end": 65, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/tsc/recursiveMappedTypes.json b/crates/swc_ecma_parser/tests/tsc/recursiveMappedTypes.json index 986195274cfe..d68a712208ee 100644 --- a/crates/swc_ecma_parser/tests/tsc/recursiveMappedTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/recursiveMappedTypes.json @@ -686,7 +686,7 @@ "type": "Identifier", "span": { "start": 386, - "end": 404, + "end": 389, "ctxt": 0 }, "value": "arg", diff --git a/crates/swc_ecma_parser/tests/tsc/recursiveTypeReferences1.json b/crates/swc_ecma_parser/tests/tsc/recursiveTypeReferences1.json index 94a93227301c..661ec8849824 100644 --- a/crates/swc_ecma_parser/tests/tsc/recursiveTypeReferences1.json +++ b/crates/swc_ecma_parser/tests/tsc/recursiveTypeReferences1.json @@ -1777,7 +1777,7 @@ "type": "Identifier", "span": { "start": 795, - "end": 801, + "end": 797, "ctxt": 0 }, "value": "t1", @@ -1823,7 +1823,7 @@ "type": "Identifier", "span": { "start": 803, - "end": 809, + "end": 805, "ctxt": 0 }, "value": "t2", @@ -1869,7 +1869,7 @@ "type": "Identifier", "span": { "start": 811, - "end": 817, + "end": 813, "ctxt": 0 }, "value": "t3", @@ -3099,7 +3099,7 @@ "type": "Identifier", "span": { "start": 1265, - "end": 1279, + "end": 1266, "ctxt": 0 }, "value": "a", @@ -3286,7 +3286,7 @@ "type": "Identifier", "span": { "start": 1318, - "end": 1340, + "end": 1319, "ctxt": 0 }, "value": "a", @@ -3530,7 +3530,7 @@ "type": "Identifier", "span": { "start": 1378, - "end": 1411, + "end": 1379, "ctxt": 0 }, "value": "a", @@ -6143,7 +6143,7 @@ "type": "Identifier", "span": { "start": 2337, - "end": 2356, + "end": 2338, "ctxt": 0 }, "value": "a", @@ -6717,7 +6717,7 @@ "type": "Identifier", "span": { "start": 2558, - "end": 2577, + "end": 2559, "ctxt": 0 }, "value": "a", @@ -7113,7 +7113,7 @@ "type": "Identifier", "span": { "start": 2757, - "end": 2767, + "end": 2761, "ctxt": 0 }, "value": "node", @@ -7166,7 +7166,7 @@ "type": "Identifier", "span": { "start": 2769, - "end": 2784, + "end": 2774, "ctxt": 0 }, "value": "index", @@ -7961,7 +7961,7 @@ "type": "Identifier", "span": { "start": 3117, - "end": 3141, + "end": 3119, "ctxt": 0 }, "value": "hs", @@ -9056,7 +9056,7 @@ "type": "Identifier", "span": { "start": 3548, - "end": 3569, + "end": 3549, "ctxt": 0 }, "value": "h", diff --git a/crates/swc_ecma_parser/tests/tsc/recursiveTypesUsedAsFunctionParameters.json b/crates/swc_ecma_parser/tests/tsc/recursiveTypesUsedAsFunctionParameters.json index 1351fa9cfea6..47f072077bd4 100644 --- a/crates/swc_ecma_parser/tests/tsc/recursiveTypesUsedAsFunctionParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/recursiveTypesUsedAsFunctionParameters.json @@ -482,7 +482,7 @@ "type": "Identifier", "span": { "start": 137, - "end": 147, + "end": 138, "ctxt": 0 }, "value": "x", @@ -615,7 +615,7 @@ "type": "Identifier", "span": { "start": 166, - "end": 176, + "end": 167, "ctxt": 0 }, "value": "x", @@ -748,7 +748,7 @@ "type": "Identifier", "span": { "start": 215, - "end": 225, + "end": 216, "ctxt": 0 }, "value": "x", @@ -889,7 +889,7 @@ "type": "Identifier", "span": { "start": 249, - "end": 259, + "end": 250, "ctxt": 0 }, "value": "x", @@ -1022,7 +1022,7 @@ "type": "Identifier", "span": { "start": 279, - "end": 291, + "end": 280, "ctxt": 0 }, "value": "x", @@ -1155,7 +1155,7 @@ "type": "Identifier", "span": { "start": 357, - "end": 363, + "end": 358, "ctxt": 0 }, "value": "x", @@ -1286,7 +1286,7 @@ "type": "Identifier", "span": { "start": 479, - "end": 483, + "end": 480, "ctxt": 0 }, "value": "x", @@ -1391,7 +1391,7 @@ "type": "Identifier", "span": { "start": 507, - "end": 519, + "end": 508, "ctxt": 0 }, "value": "x", @@ -1532,7 +1532,7 @@ "type": "Identifier", "span": { "start": 588, - "end": 592, + "end": 589, "ctxt": 0 }, "value": "x", @@ -1637,7 +1637,7 @@ "type": "Identifier", "span": { "start": 616, - "end": 626, + "end": 617, "ctxt": 0 }, "value": "x", @@ -1778,7 +1778,7 @@ "type": "Identifier", "span": { "start": 664, - "end": 668, + "end": 665, "ctxt": 0 }, "value": "x", @@ -1899,7 +1899,7 @@ "type": "Identifier", "span": { "start": 700, - "end": 710, + "end": 701, "ctxt": 0 }, "value": "x", @@ -2048,7 +2048,7 @@ "type": "Identifier", "span": { "start": 742, - "end": 754, + "end": 743, "ctxt": 0 }, "value": "x", @@ -2197,7 +2197,7 @@ "type": "Identifier", "span": { "start": 787, - "end": 793, + "end": 788, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/recursiveTypesWithTypeof.json b/crates/swc_ecma_parser/tests/tsc/recursiveTypesWithTypeof.json index a5ca3a60a547..076ef5be78c5 100644 --- a/crates/swc_ecma_parser/tests/tsc/recursiveTypesWithTypeof.json +++ b/crates/swc_ecma_parser/tests/tsc/recursiveTypesWithTypeof.json @@ -1155,7 +1155,7 @@ "type": "Identifier", "span": { "start": 449, - "end": 460, + "end": 450, "ctxt": 0 }, "value": "x", @@ -1336,7 +1336,7 @@ "type": "Identifier", "span": { "start": 517, - "end": 521, + "end": 518, "ctxt": 0 }, "value": "x", @@ -1697,7 +1697,7 @@ "type": "Identifier", "span": { "start": 650, - "end": 662, + "end": 651, "ctxt": 0 }, "value": "x", @@ -1879,7 +1879,7 @@ "type": "Identifier", "span": { "start": 732, - "end": 736, + "end": 733, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/redefinedPararameterProperty.json b/crates/swc_ecma_parser/tests/tsc/redefinedPararameterProperty.json index f914147d01bb..93c827792a54 100644 --- a/crates/swc_ecma_parser/tests/tsc/redefinedPararameterProperty.json +++ b/crates/swc_ecma_parser/tests/tsc/redefinedPararameterProperty.json @@ -178,7 +178,7 @@ "type": "Identifier", "span": { "start": 227, - "end": 236, + "end": 228, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/relativePathToDeclarationFile.json b/crates/swc_ecma_parser/tests/tsc/relativePathToDeclarationFile.json index 6d37b1bea53f..be2e1589bff8 100644 --- a/crates/swc_ecma_parser/tests/tsc/relativePathToDeclarationFile.json +++ b/crates/swc_ecma_parser/tests/tsc/relativePathToDeclarationFile.json @@ -246,7 +246,7 @@ "type": "Identifier", "span": { "start": 265, - "end": 274, + "end": 266, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/requireAssertsFromTypescript.json b/crates/swc_ecma_parser/tests/tsc/requireAssertsFromTypescript.json index fd79c9ac8e9a..d9778eb7d488 100644 --- a/crates/swc_ecma_parser/tests/tsc/requireAssertsFromTypescript.json +++ b/crates/swc_ecma_parser/tests/tsc/requireAssertsFromTypescript.json @@ -39,7 +39,7 @@ "type": "Identifier", "span": { "start": 130, - "end": 140, + "end": 135, "ctxt": 0 }, "value": "value", @@ -75,7 +75,7 @@ "type": "Identifier", "span": { "start": 142, - "end": 166, + "end": 149, "ctxt": 0 }, "value": "message", @@ -195,7 +195,7 @@ "type": "Identifier", "span": { "start": 228, - "end": 238, + "end": 233, "ctxt": 0 }, "value": "value", @@ -231,7 +231,7 @@ "type": "Identifier", "span": { "start": 240, - "end": 264, + "end": 247, "ctxt": 0 }, "value": "message", diff --git a/crates/swc_ecma_parser/tests/tsc/restTuplesFromContextualTypes.json b/crates/swc_ecma_parser/tests/tsc/restTuplesFromContextualTypes.json index 8ab9404d024f..9cfb565a5b86 100644 --- a/crates/swc_ecma_parser/tests/tsc/restTuplesFromContextualTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/restTuplesFromContextualTypes.json @@ -797,7 +797,7 @@ "type": "Identifier", "span": { "start": 269, - "end": 301, + "end": 271, "ctxt": 0 }, "value": "cb", @@ -2201,7 +2201,7 @@ "type": "Identifier", "span": { "start": 651, - "end": 683, + "end": 653, "ctxt": 0 }, "value": "cb", @@ -3652,7 +3652,7 @@ "type": "Identifier", "span": { "start": 1040, - "end": 1083, + "end": 1042, "ctxt": 0 }, "value": "cb", @@ -3676,7 +3676,7 @@ "type": "Identifier", "span": { "start": 1045, - "end": 1054, + "end": 1046, "ctxt": 0 }, "value": "x", @@ -4302,7 +4302,7 @@ "type": "Identifier", "span": { "start": 1229, - "end": 1233, + "end": 1230, "ctxt": 0 }, "value": "t", @@ -4765,7 +4765,7 @@ "type": "Identifier", "span": { "start": 1357, - "end": 1392, + "end": 1359, "ctxt": 0 }, "value": "cb", @@ -4789,7 +4789,7 @@ "type": "Identifier", "span": { "start": 1362, - "end": 1371, + "end": 1363, "ctxt": 0 }, "value": "x", @@ -5261,7 +5261,7 @@ "type": "Identifier", "span": { "start": 1512, - "end": 1532, + "end": 1513, "ctxt": 0 }, "value": "f", @@ -6127,7 +6127,7 @@ "type": "Identifier", "span": { "start": 1769, - "end": 1789, + "end": 1770, "ctxt": 0 }, "value": "f", @@ -6243,7 +6243,7 @@ "type": "Identifier", "span": { "start": 1791, - "end": 1805, + "end": 1792, "ctxt": 0 }, "value": "g", @@ -6267,7 +6267,7 @@ "type": "Identifier", "span": { "start": 1795, - "end": 1799, + "end": 1796, "ctxt": 0 }, "value": "x", @@ -7379,7 +7379,7 @@ "type": "Identifier", "span": { "start": 2147, - "end": 2181, + "end": 2149, "ctxt": 0 }, "value": "cb", @@ -7403,7 +7403,7 @@ "type": "Identifier", "span": { "start": 2152, - "end": 2161, + "end": 2153, "ctxt": 0 }, "value": "a", @@ -7430,7 +7430,7 @@ "type": "Identifier", "span": { "start": 2163, - "end": 2172, + "end": 2164, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/tsc/scannerClass2.json b/crates/swc_ecma_parser/tests/tsc/scannerClass2.json index 81ca691b6b51..d293ca856d7b 100644 --- a/crates/swc_ecma_parser/tests/tsc/scannerClass2.json +++ b/crates/swc_ecma_parser/tests/tsc/scannerClass2.json @@ -66,7 +66,7 @@ "type": "Identifier", "span": { "start": 83, - "end": 98, + "end": 89, "ctxt": 0 }, "value": "logger", diff --git a/crates/swc_ecma_parser/tests/tsc/scannertest1.json b/crates/swc_ecma_parser/tests/tsc/scannertest1.json index e1a857175718..4a8051e85128 100644 --- a/crates/swc_ecma_parser/tests/tsc/scannertest1.json +++ b/crates/swc_ecma_parser/tests/tsc/scannertest1.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 95, - "end": 104, + "end": 96, "ctxt": 0 }, "value": "c", @@ -268,7 +268,7 @@ "type": "Identifier", "span": { "start": 218, - "end": 227, + "end": 219, "ctxt": 0 }, "value": "c", @@ -650,7 +650,7 @@ "type": "Identifier", "span": { "start": 442, - "end": 451, + "end": 443, "ctxt": 0 }, "value": "c", diff --git a/crates/swc_ecma_parser/tests/tsc/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.json b/crates/swc_ecma_parser/tests/tsc/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.json index 4fb8cc945278..6cb37f4341d9 100644 --- a/crates/swc_ecma_parser/tests/tsc/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 37, - "end": 43, + "end": 38, "ctxt": 0 }, "value": "x", @@ -104,7 +104,7 @@ "type": "Identifier", "span": { "start": 59, - "end": 68, + "end": 60, "ctxt": 0 }, "value": "x", @@ -200,7 +200,7 @@ "type": "Identifier", "span": { "start": 93, - "end": 99, + "end": 94, "ctxt": 0 }, "value": "x", @@ -284,7 +284,7 @@ "type": "Identifier", "span": { "start": 110, - "end": 119, + "end": 111, "ctxt": 0 }, "value": "x", @@ -359,7 +359,7 @@ "type": "Identifier", "span": { "start": 130, - "end": 136, + "end": 131, "ctxt": 0 }, "value": "x", @@ -469,7 +469,7 @@ "type": "Identifier", "span": { "start": 167, - "end": 173, + "end": 168, "ctxt": 0 }, "value": "x", @@ -553,7 +553,7 @@ "type": "Identifier", "span": { "start": 184, - "end": 188, + "end": 185, "ctxt": 0 }, "value": "x", @@ -638,7 +638,7 @@ "type": "Identifier", "span": { "start": 199, - "end": 205, + "end": 200, "ctxt": 0 }, "value": "x", @@ -780,7 +780,7 @@ "type": "Identifier", "span": { "start": 251, - "end": 257, + "end": 252, "ctxt": 0 }, "value": "x", @@ -864,7 +864,7 @@ "type": "Identifier", "span": { "start": 268, - "end": 272, + "end": 269, "ctxt": 0 }, "value": "x", @@ -949,7 +949,7 @@ "type": "Identifier", "span": { "start": 283, - "end": 289, + "end": 284, "ctxt": 0 }, "value": "x", @@ -1098,7 +1098,7 @@ "type": "Identifier", "span": { "start": 317, - "end": 323, + "end": 318, "ctxt": 0 }, "value": "x", @@ -1146,7 +1146,7 @@ "type": "Identifier", "span": { "start": 331, - "end": 340, + "end": 332, "ctxt": 0 }, "value": "x", @@ -1198,7 +1198,7 @@ "type": "Identifier", "span": { "start": 351, - "end": 357, + "end": 352, "ctxt": 0 }, "value": "x", @@ -1259,7 +1259,7 @@ "type": "Identifier", "span": { "start": 368, - "end": 377, + "end": 369, "ctxt": 0 }, "value": "x", @@ -1361,7 +1361,7 @@ "type": "Identifier", "span": { "start": 406, - "end": 412, + "end": 407, "ctxt": 0 }, "value": "x", @@ -1409,7 +1409,7 @@ "type": "Identifier", "span": { "start": 420, - "end": 424, + "end": 421, "ctxt": 0 }, "value": "x", @@ -1471,7 +1471,7 @@ "type": "Identifier", "span": { "start": 435, - "end": 441, + "end": 436, "ctxt": 0 }, "value": "x", @@ -1532,7 +1532,7 @@ "type": "Identifier", "span": { "start": 452, - "end": 456, + "end": 453, "ctxt": 0 }, "value": "x", @@ -1662,7 +1662,7 @@ "type": "Identifier", "span": { "start": 500, - "end": 506, + "end": 501, "ctxt": 0 }, "value": "x", @@ -1710,7 +1710,7 @@ "type": "Identifier", "span": { "start": 514, - "end": 518, + "end": 515, "ctxt": 0 }, "value": "x", @@ -1772,7 +1772,7 @@ "type": "Identifier", "span": { "start": 529, - "end": 535, + "end": 530, "ctxt": 0 }, "value": "x", @@ -1833,7 +1833,7 @@ "type": "Identifier", "span": { "start": 546, - "end": 550, + "end": 547, "ctxt": 0 }, "value": "x", @@ -1926,7 +1926,7 @@ "type": "Identifier", "span": { "start": 570, - "end": 576, + "end": 571, "ctxt": 0 }, "value": "x", @@ -1974,7 +1974,7 @@ "type": "Identifier", "span": { "start": 584, - "end": 593, + "end": 585, "ctxt": 0 }, "value": "x", @@ -2026,7 +2026,7 @@ "type": "Identifier", "span": { "start": 604, - "end": 610, + "end": 605, "ctxt": 0 }, "value": "x", @@ -2087,7 +2087,7 @@ "type": "Identifier", "span": { "start": 621, - "end": 630, + "end": 622, "ctxt": 0 }, "value": "x", @@ -2176,7 +2176,7 @@ "type": "Identifier", "span": { "start": 651, - "end": 657, + "end": 652, "ctxt": 0 }, "value": "x", @@ -2224,7 +2224,7 @@ "type": "Identifier", "span": { "start": 668, - "end": 672, + "end": 669, "ctxt": 0 }, "value": "x", @@ -2318,7 +2318,7 @@ "type": "Identifier", "span": { "start": 683, - "end": 689, + "end": 684, "ctxt": 0 }, "value": "x", @@ -2379,7 +2379,7 @@ "type": "Identifier", "span": { "start": 703, - "end": 707, + "end": 704, "ctxt": 0 }, "value": "x", @@ -2510,7 +2510,7 @@ "type": "Identifier", "span": { "start": 728, - "end": 734, + "end": 729, "ctxt": 0 }, "value": "x", @@ -2558,7 +2558,7 @@ "type": "Identifier", "span": { "start": 745, - "end": 749, + "end": 746, "ctxt": 0 }, "value": "x", @@ -2652,7 +2652,7 @@ "type": "Identifier", "span": { "start": 760, - "end": 766, + "end": 761, "ctxt": 0 }, "value": "x", @@ -2713,7 +2713,7 @@ "type": "Identifier", "span": { "start": 795, - "end": 799, + "end": 796, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/specializedSignatureIsSubtypeOfNonSpecializedSignature.json b/crates/swc_ecma_parser/tests/tsc/specializedSignatureIsSubtypeOfNonSpecializedSignature.json index e512dddd941d..32f49c56235f 100644 --- a/crates/swc_ecma_parser/tests/tsc/specializedSignatureIsSubtypeOfNonSpecializedSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/specializedSignatureIsSubtypeOfNonSpecializedSignature.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 128, - "end": 134, + "end": 129, "ctxt": 0 }, "value": "x", @@ -104,7 +104,7 @@ "type": "Identifier", "span": { "start": 150, - "end": 159, + "end": 151, "ctxt": 0 }, "value": "x", @@ -167,7 +167,7 @@ "type": "Identifier", "span": { "start": 175, - "end": 181, + "end": 176, "ctxt": 0 }, "value": "x", @@ -263,7 +263,7 @@ "type": "Identifier", "span": { "start": 206, - "end": 212, + "end": 207, "ctxt": 0 }, "value": "x", @@ -347,7 +347,7 @@ "type": "Identifier", "span": { "start": 223, - "end": 232, + "end": 224, "ctxt": 0 }, "value": "x", @@ -422,7 +422,7 @@ "type": "Identifier", "span": { "start": 243, - "end": 249, + "end": 244, "ctxt": 0 }, "value": "x", @@ -532,7 +532,7 @@ "type": "Identifier", "span": { "start": 280, - "end": 286, + "end": 281, "ctxt": 0 }, "value": "x", @@ -616,7 +616,7 @@ "type": "Identifier", "span": { "start": 297, - "end": 306, + "end": 298, "ctxt": 0 }, "value": "x", @@ -691,7 +691,7 @@ "type": "Identifier", "span": { "start": 317, - "end": 321, + "end": 318, "ctxt": 0 }, "value": "x", @@ -776,7 +776,7 @@ "type": "Identifier", "span": { "start": 332, - "end": 338, + "end": 333, "ctxt": 0 }, "value": "x", @@ -918,7 +918,7 @@ "type": "Identifier", "span": { "start": 384, - "end": 390, + "end": 385, "ctxt": 0 }, "value": "x", @@ -1002,7 +1002,7 @@ "type": "Identifier", "span": { "start": 401, - "end": 410, + "end": 402, "ctxt": 0 }, "value": "x", @@ -1077,7 +1077,7 @@ "type": "Identifier", "span": { "start": 421, - "end": 425, + "end": 422, "ctxt": 0 }, "value": "x", @@ -1162,7 +1162,7 @@ "type": "Identifier", "span": { "start": 436, - "end": 442, + "end": 437, "ctxt": 0 }, "value": "x", @@ -1311,7 +1311,7 @@ "type": "Identifier", "span": { "start": 470, - "end": 476, + "end": 471, "ctxt": 0 }, "value": "x", @@ -1359,7 +1359,7 @@ "type": "Identifier", "span": { "start": 484, - "end": 493, + "end": 485, "ctxt": 0 }, "value": "x", @@ -1398,7 +1398,7 @@ "type": "Identifier", "span": { "start": 501, - "end": 510, + "end": 502, "ctxt": 0 }, "value": "x", @@ -1450,7 +1450,7 @@ "type": "Identifier", "span": { "start": 521, - "end": 527, + "end": 522, "ctxt": 0 }, "value": "x", @@ -1511,7 +1511,7 @@ "type": "Identifier", "span": { "start": 538, - "end": 547, + "end": 539, "ctxt": 0 }, "value": "x", @@ -1563,7 +1563,7 @@ "type": "Identifier", "span": { "start": 558, - "end": 567, + "end": 559, "ctxt": 0 }, "value": "x", @@ -1665,7 +1665,7 @@ "type": "Identifier", "span": { "start": 596, - "end": 602, + "end": 597, "ctxt": 0 }, "value": "x", @@ -1713,7 +1713,7 @@ "type": "Identifier", "span": { "start": 610, - "end": 614, + "end": 611, "ctxt": 0 }, "value": "x", @@ -1762,7 +1762,7 @@ "type": "Identifier", "span": { "start": 622, - "end": 631, + "end": 623, "ctxt": 0 }, "value": "x", @@ -1814,7 +1814,7 @@ "type": "Identifier", "span": { "start": 642, - "end": 648, + "end": 643, "ctxt": 0 }, "value": "x", @@ -1875,7 +1875,7 @@ "type": "Identifier", "span": { "start": 659, - "end": 668, + "end": 660, "ctxt": 0 }, "value": "x", @@ -1927,7 +1927,7 @@ "type": "Identifier", "span": { "start": 679, - "end": 683, + "end": 680, "ctxt": 0 }, "value": "x", @@ -2057,7 +2057,7 @@ "type": "Identifier", "span": { "start": 727, - "end": 733, + "end": 728, "ctxt": 0 }, "value": "x", @@ -2105,7 +2105,7 @@ "type": "Identifier", "span": { "start": 741, - "end": 750, + "end": 742, "ctxt": 0 }, "value": "x", @@ -2144,7 +2144,7 @@ "type": "Identifier", "span": { "start": 758, - "end": 762, + "end": 759, "ctxt": 0 }, "value": "x", @@ -2206,7 +2206,7 @@ "type": "Identifier", "span": { "start": 773, - "end": 779, + "end": 774, "ctxt": 0 }, "value": "x", @@ -2267,7 +2267,7 @@ "type": "Identifier", "span": { "start": 790, - "end": 799, + "end": 791, "ctxt": 0 }, "value": "x", @@ -2319,7 +2319,7 @@ "type": "Identifier", "span": { "start": 810, - "end": 814, + "end": 811, "ctxt": 0 }, "value": "x", @@ -2412,7 +2412,7 @@ "type": "Identifier", "span": { "start": 834, - "end": 843, + "end": 835, "ctxt": 0 }, "value": "x", @@ -2451,7 +2451,7 @@ "type": "Identifier", "span": { "start": 851, - "end": 857, + "end": 852, "ctxt": 0 }, "value": "x", @@ -2499,7 +2499,7 @@ "type": "Identifier", "span": { "start": 865, - "end": 874, + "end": 866, "ctxt": 0 }, "value": "x", @@ -2551,7 +2551,7 @@ "type": "Identifier", "span": { "start": 885, - "end": 894, + "end": 886, "ctxt": 0 }, "value": "x", @@ -2603,7 +2603,7 @@ "type": "Identifier", "span": { "start": 905, - "end": 911, + "end": 906, "ctxt": 0 }, "value": "x", @@ -2664,7 +2664,7 @@ "type": "Identifier", "span": { "start": 922, - "end": 931, + "end": 923, "ctxt": 0 }, "value": "x", @@ -2753,7 +2753,7 @@ "type": "Identifier", "span": { "start": 952, - "end": 958, + "end": 953, "ctxt": 0 }, "value": "x", @@ -2801,7 +2801,7 @@ "type": "Identifier", "span": { "start": 966, - "end": 975, + "end": 967, "ctxt": 0 }, "value": "x", @@ -2840,7 +2840,7 @@ "type": "Identifier", "span": { "start": 986, - "end": 990, + "end": 987, "ctxt": 0 }, "value": "x", @@ -2934,7 +2934,7 @@ "type": "Identifier", "span": { "start": 1001, - "end": 1010, + "end": 1002, "ctxt": 0 }, "value": "x", @@ -2986,7 +2986,7 @@ "type": "Identifier", "span": { "start": 1021, - "end": 1027, + "end": 1022, "ctxt": 0 }, "value": "x", @@ -3047,7 +3047,7 @@ "type": "Identifier", "span": { "start": 1041, - "end": 1045, + "end": 1042, "ctxt": 0 }, "value": "x", @@ -3178,7 +3178,7 @@ "type": "Identifier", "span": { "start": 1066, - "end": 1072, + "end": 1067, "ctxt": 0 }, "value": "x", @@ -3226,7 +3226,7 @@ "type": "Identifier", "span": { "start": 1083, - "end": 1087, + "end": 1084, "ctxt": 0 }, "value": "x", @@ -3307,7 +3307,7 @@ "type": "Identifier", "span": { "start": 1095, - "end": 1104, + "end": 1096, "ctxt": 0 }, "value": "x", @@ -3359,7 +3359,7 @@ "type": "Identifier", "span": { "start": 1115, - "end": 1124, + "end": 1116, "ctxt": 0 }, "value": "x", @@ -3411,7 +3411,7 @@ "type": "Identifier", "span": { "start": 1135, - "end": 1141, + "end": 1136, "ctxt": 0 }, "value": "x", @@ -3472,7 +3472,7 @@ "type": "Identifier", "span": { "start": 1170, - "end": 1174, + "end": 1171, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/specializedSignatureWithOptional.json b/crates/swc_ecma_parser/tests/tsc/specializedSignatureWithOptional.json index 13a4c5614863..f71215ff4c63 100644 --- a/crates/swc_ecma_parser/tests/tsc/specializedSignatureWithOptional.json +++ b/crates/swc_ecma_parser/tests/tsc/specializedSignatureWithOptional.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 20, - "end": 28, + "end": 21, "ctxt": 0 }, "value": "x", @@ -120,7 +120,7 @@ "type": "Identifier", "span": { "start": 56, - "end": 66, + "end": 57, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/spreadObjectOrFalsy.json b/crates/swc_ecma_parser/tests/tsc/spreadObjectOrFalsy.json index 55d880c556b7..07220b9c5683 100644 --- a/crates/swc_ecma_parser/tests/tsc/spreadObjectOrFalsy.json +++ b/crates/swc_ecma_parser/tests/tsc/spreadObjectOrFalsy.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 56, - "end": 72, + "end": 57, "ctxt": 0 }, "value": "a", @@ -201,7 +201,7 @@ "type": "Identifier", "span": { "start": 125, - "end": 145, + "end": 126, "ctxt": 0 }, "value": "a", @@ -399,7 +399,7 @@ "type": "Identifier", "span": { "start": 206, - "end": 210, + "end": 207, "ctxt": 0 }, "value": "a", @@ -557,7 +557,7 @@ "type": "Identifier", "span": { "start": 281, - "end": 294, + "end": 282, "ctxt": 0 }, "value": "a", @@ -734,7 +734,7 @@ "type": "Identifier", "span": { "start": 358, - "end": 366, + "end": 359, "ctxt": 0 }, "value": "a", @@ -944,7 +944,7 @@ "type": "Identifier", "span": { "start": 436, - "end": 440, + "end": 437, "ctxt": 0 }, "value": "a", @@ -1121,7 +1121,7 @@ "type": "Identifier", "span": { "start": 554, - "end": 558, + "end": 555, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/spreadOverwritesProperty.json b/crates/swc_ecma_parser/tests/tsc/spreadOverwritesProperty.json index e91385855770..4f38a6ee17e7 100644 --- a/crates/swc_ecma_parser/tests/tsc/spreadOverwritesProperty.json +++ b/crates/swc_ecma_parser/tests/tsc/spreadOverwritesProperty.json @@ -540,7 +540,7 @@ "type": "Identifier", "span": { "start": 255, - "end": 285, + "end": 258, "ctxt": 0 }, "value": "obj", @@ -732,7 +732,7 @@ "type": "Identifier", "span": { "start": 331, - "end": 349, + "end": 334, "ctxt": 0 }, "value": "obj", diff --git a/crates/swc_ecma_parser/tests/tsc/spreadOverwritesPropertyStrict.json b/crates/swc_ecma_parser/tests/tsc/spreadOverwritesPropertyStrict.json index d72fec297103..4f96097cc20c 100644 --- a/crates/swc_ecma_parser/tests/tsc/spreadOverwritesPropertyStrict.json +++ b/crates/swc_ecma_parser/tests/tsc/spreadOverwritesPropertyStrict.json @@ -706,7 +706,7 @@ "type": "Identifier", "span": { "start": 417, - "end": 447, + "end": 420, "ctxt": 0 }, "value": "obj", @@ -898,7 +898,7 @@ "type": "Identifier", "span": { "start": 528, - "end": 558, + "end": 531, "ctxt": 0 }, "value": "obj", @@ -1090,7 +1090,7 @@ "type": "Identifier", "span": { "start": 634, - "end": 668, + "end": 637, "ctxt": 0 }, "value": "obj", @@ -1324,7 +1324,7 @@ "type": "Identifier", "span": { "start": 722, - "end": 732, + "end": 723, "ctxt": 0 }, "value": "b", @@ -1360,7 +1360,7 @@ "type": "Identifier", "span": { "start": 734, - "end": 768, + "end": 735, "ctxt": 0 }, "value": "t", @@ -1744,7 +1744,7 @@ "type": "Identifier", "span": { "start": 920, - "end": 954, + "end": 921, "ctxt": 0 }, "value": "t", @@ -2020,7 +2020,7 @@ "type": "Identifier", "span": { "start": 1054, - "end": 1077, + "end": 1065, "ctxt": 0 }, "value": "anyrequired", @@ -2193,7 +2193,7 @@ "type": "Identifier", "span": { "start": 1143, - "end": 1167, + "end": 1154, "ctxt": 0 }, "value": "anyoptional", diff --git a/crates/swc_ecma_parser/tests/tsc/spreadTypeVariable.json b/crates/swc_ecma_parser/tests/tsc/spreadTypeVariable.json index 8ece9da1d9c7..ff2aea04a65f 100644 --- a/crates/swc_ecma_parser/tests/tsc/spreadTypeVariable.json +++ b/crates/swc_ecma_parser/tests/tsc/spreadTypeVariable.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 31, - "end": 37, + "end": 34, "ctxt": 0 }, "value": "arg", @@ -190,7 +190,7 @@ "type": "Identifier", "span": { "start": 97, - "end": 103, + "end": 100, "ctxt": 0 }, "value": "arg", @@ -356,7 +356,7 @@ "type": "Identifier", "span": { "start": 171, - "end": 177, + "end": 174, "ctxt": 0 }, "value": "arg", @@ -541,7 +541,7 @@ "type": "Identifier", "span": { "start": 259, - "end": 265, + "end": 262, "ctxt": 0 }, "value": "arg", @@ -775,7 +775,7 @@ "type": "Identifier", "span": { "start": 349, - "end": 355, + "end": 352, "ctxt": 0 }, "value": "arg", @@ -1017,7 +1017,7 @@ "type": "Identifier", "span": { "start": 397, - "end": 403, + "end": 400, "ctxt": 0 }, "value": "arg", diff --git a/crates/swc_ecma_parser/tests/tsc/spreadUnion3.json b/crates/swc_ecma_parser/tests/tsc/spreadUnion3.json index 652ab4f4b47a..8e533ce15a18 100644 --- a/crates/swc_ecma_parser/tests/tsc/spreadUnion3.json +++ b/crates/swc_ecma_parser/tests/tsc/spreadUnion3.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 39, - "end": 67, + "end": 40, "ctxt": 0 }, "value": "x", @@ -324,7 +324,7 @@ "type": "Identifier", "span": { "start": 164, - "end": 188, + "end": 165, "ctxt": 0 }, "value": "t", diff --git a/crates/swc_ecma_parser/tests/tsc/staticIndexSignature6.json b/crates/swc_ecma_parser/tests/tsc/staticIndexSignature6.json index 160a9ca0409e..6ff537997a7b 100644 --- a/crates/swc_ecma_parser/tests/tsc/staticIndexSignature6.json +++ b/crates/swc_ecma_parser/tests/tsc/staticIndexSignature6.json @@ -203,7 +203,7 @@ "type": "Identifier", "span": { "start": 138, - "end": 142, + "end": 139, "ctxt": 0 }, "value": "v", diff --git a/crates/swc_ecma_parser/tests/tsc/staticMemberAssignsToConstructorFunctionMembers.json b/crates/swc_ecma_parser/tests/tsc/staticMemberAssignsToConstructorFunctionMembers.json index b153d50a0baa..83b1b65adfed 100644 --- a/crates/swc_ecma_parser/tests/tsc/staticMemberAssignsToConstructorFunctionMembers.json +++ b/crates/swc_ecma_parser/tests/tsc/staticMemberAssignsToConstructorFunctionMembers.json @@ -171,7 +171,7 @@ "type": "Identifier", "span": { "start": 78, - "end": 87, + "end": 79, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/staticMembersUsingClassTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/staticMembersUsingClassTypeParameter.json index 5f9b331ddaae..df71a3965a62 100644 --- a/crates/swc_ecma_parser/tests/tsc/staticMembersUsingClassTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/staticMembersUsingClassTypeParameter.json @@ -112,7 +112,7 @@ "type": "Identifier", "span": { "start": 58, - "end": 62, + "end": 59, "ctxt": 0 }, "value": "x", @@ -319,7 +319,7 @@ "type": "Identifier", "span": { "start": 117, - "end": 121, + "end": 118, "ctxt": 0 }, "value": "x", @@ -549,7 +549,7 @@ "type": "Identifier", "span": { "start": 187, - "end": 191, + "end": 188, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/staticPropertyNotInClassType.json b/crates/swc_ecma_parser/tests/tsc/staticPropertyNotInClassType.json index 873a55154dc9..a1b78890cbf7 100644 --- a/crates/swc_ecma_parser/tests/tsc/staticPropertyNotInClassType.json +++ b/crates/swc_ecma_parser/tests/tsc/staticPropertyNotInClassType.json @@ -281,7 +281,7 @@ "type": "Identifier", "span": { "start": 157, - "end": 166, + "end": 158, "ctxt": 0 }, "value": "a", @@ -320,7 +320,7 @@ "type": "Identifier", "span": { "start": 176, - "end": 185, + "end": 177, "ctxt": 0 }, "value": "b", @@ -1096,7 +1096,7 @@ "type": "Identifier", "span": { "start": 631, - "end": 635, + "end": 632, "ctxt": 0 }, "value": "a", @@ -1145,7 +1145,7 @@ "type": "Identifier", "span": { "start": 645, - "end": 649, + "end": 646, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/tsc/strictBindCallApply1.json b/crates/swc_ecma_parser/tests/tsc/strictBindCallApply1.json index 7b95fdbca3bf..493d0d140079 100644 --- a/crates/swc_ecma_parser/tests/tsc/strictBindCallApply1.json +++ b/crates/swc_ecma_parser/tests/tsc/strictBindCallApply1.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 40, - "end": 49, + "end": 41, "ctxt": 0 }, "value": "a", @@ -68,7 +68,7 @@ "type": "Identifier", "span": { "start": 51, - "end": 60, + "end": 52, "ctxt": 0 }, "value": "b", @@ -147,7 +147,7 @@ "type": "Identifier", "span": { "start": 100, - "end": 109, + "end": 101, "ctxt": 0 }, "value": "s", @@ -226,7 +226,7 @@ "type": "Identifier", "span": { "start": 148, - "end": 157, + "end": 149, "ctxt": 0 }, "value": "n", @@ -305,7 +305,7 @@ "type": "Identifier", "span": { "start": 197, - "end": 201, + "end": 198, "ctxt": 0 }, "value": "x", @@ -1961,7 +1961,7 @@ "type": "Identifier", "span": { "start": 915, - "end": 924, + "end": 916, "ctxt": 0 }, "value": "a", @@ -1997,7 +1997,7 @@ "type": "Identifier", "span": { "start": 926, - "end": 935, + "end": 927, "ctxt": 0 }, "value": "b", @@ -2065,7 +2065,7 @@ "type": "Identifier", "span": { "start": 948, - "end": 958, + "end": 952, "ctxt": 0 }, "value": "this", @@ -2100,7 +2100,7 @@ "type": "Identifier", "span": { "start": 960, - "end": 969, + "end": 961, "ctxt": 0 }, "value": "a", @@ -2136,7 +2136,7 @@ "type": "Identifier", "span": { "start": 971, - "end": 980, + "end": 972, "ctxt": 0 }, "value": "b", @@ -2254,7 +2254,7 @@ "type": "Identifier", "span": { "start": 1019, - "end": 1028, + "end": 1020, "ctxt": 0 }, "value": "s", @@ -2345,7 +2345,7 @@ "type": "Identifier", "span": { "start": 1054, - "end": 1063, + "end": 1055, "ctxt": 0 }, "value": "n", @@ -2436,7 +2436,7 @@ "type": "Identifier", "span": { "start": 1089, - "end": 1095, + "end": 1090, "ctxt": 0 }, "value": "x", @@ -2571,7 +2571,7 @@ "type": "Identifier", "span": { "start": 1143, - "end": 1147, + "end": 1144, "ctxt": 0 }, "value": "x", @@ -6116,7 +6116,7 @@ "type": "Identifier", "span": { "start": 2419, - "end": 2458, + "end": 2427, "ctxt": 0 }, "value": "callback", @@ -6140,7 +6140,7 @@ "type": "Identifier", "span": { "start": 2430, - "end": 2437, + "end": 2434, "ctxt": 0 }, "value": "this", @@ -6462,7 +6462,7 @@ "type": "Identifier", "span": { "start": 2548, - "end": 2630, + "end": 2556, "ctxt": 0 }, "value": "callback", @@ -6486,7 +6486,7 @@ "type": "Identifier", "span": { "start": 2559, - "end": 2566, + "end": 2563, "ctxt": 0 }, "value": "this", diff --git a/crates/swc_ecma_parser/tests/tsc/strictBindCallApply2.json b/crates/swc_ecma_parser/tests/tsc/strictBindCallApply2.json index 906cde1432d9..56a8222dbc6e 100644 --- a/crates/swc_ecma_parser/tests/tsc/strictBindCallApply2.json +++ b/crates/swc_ecma_parser/tests/tsc/strictBindCallApply2.json @@ -112,7 +112,7 @@ "type": "Identifier", "span": { "start": 129, - "end": 138, + "end": 133, "ctxt": 0 }, "value": "this", diff --git a/crates/swc_ecma_parser/tests/tsc/strictNullChecksNoWidening.json b/crates/swc_ecma_parser/tests/tsc/strictNullChecksNoWidening.json index 380bd9a549a6..0a9bce4cfb4f 100644 --- a/crates/swc_ecma_parser/tests/tsc/strictNullChecksNoWidening.json +++ b/crates/swc_ecma_parser/tests/tsc/strictNullChecksNoWidening.json @@ -438,7 +438,7 @@ "type": "Identifier", "span": { "start": 193, - "end": 197, + "end": 194, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/strictPropertyInitialization.json b/crates/swc_ecma_parser/tests/tsc/strictPropertyInitialization.json index aa1499c0b03f..a23b65e35785 100644 --- a/crates/swc_ecma_parser/tests/tsc/strictPropertyInitialization.json +++ b/crates/swc_ecma_parser/tests/tsc/strictPropertyInitialization.json @@ -1976,7 +1976,7 @@ "type": "Identifier", "span": { "start": 1224, - "end": 1237, + "end": 1228, "ctxt": 0 }, "value": "cond", @@ -2319,7 +2319,7 @@ "type": "Identifier", "span": { "start": 1399, - "end": 1412, + "end": 1403, "ctxt": 0 }, "value": "cond", diff --git a/crates/swc_ecma_parser/tests/tsc/stringEnumLiteralTypes1.json b/crates/swc_ecma_parser/tests/tsc/stringEnumLiteralTypes1.json index 2dcaae7c7e3f..17c5aa949efc 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringEnumLiteralTypes1.json +++ b/crates/swc_ecma_parser/tests/tsc/stringEnumLiteralTypes1.json @@ -841,7 +841,7 @@ "type": "Identifier", "span": { "start": 335, - "end": 343, + "end": 336, "ctxt": 0 }, "value": "a", @@ -887,7 +887,7 @@ "type": "Identifier", "span": { "start": 345, - "end": 360, + "end": 346, "ctxt": 0 }, "value": "b", @@ -933,7 +933,7 @@ "type": "Identifier", "span": { "start": 362, - "end": 371, + "end": 363, "ctxt": 0 }, "value": "c", @@ -1129,7 +1129,7 @@ "type": "Identifier", "span": { "start": 423, - "end": 436, + "end": 424, "ctxt": 0 }, "value": "a", @@ -1188,7 +1188,7 @@ "type": "Identifier", "span": { "start": 438, - "end": 446, + "end": 439, "ctxt": 0 }, "value": "b", @@ -1870,7 +1870,7 @@ "type": "Identifier", "span": { "start": 667, - "end": 680, + "end": 668, "ctxt": 0 }, "value": "x", @@ -1972,7 +1972,7 @@ "type": "Identifier", "span": { "start": 710, - "end": 722, + "end": 711, "ctxt": 0 }, "value": "x", @@ -2074,7 +2074,7 @@ "type": "Identifier", "span": { "start": 753, - "end": 762, + "end": 754, "ctxt": 0 }, "value": "x", @@ -2163,7 +2163,7 @@ "type": "Identifier", "span": { "start": 786, - "end": 794, + "end": 787, "ctxt": 0 }, "value": "a", @@ -2209,7 +2209,7 @@ "type": "Identifier", "span": { "start": 796, - "end": 811, + "end": 797, "ctxt": 0 }, "value": "b", @@ -2255,7 +2255,7 @@ "type": "Identifier", "span": { "start": 813, - "end": 822, + "end": 814, "ctxt": 0 }, "value": "c", @@ -2703,7 +2703,7 @@ "type": "Identifier", "span": { "start": 962, - "end": 970, + "end": 963, "ctxt": 0 }, "value": "x", @@ -2833,7 +2833,7 @@ "type": "Identifier", "span": { "start": 1038, - "end": 1046, + "end": 1039, "ctxt": 0 }, "value": "x", @@ -3047,7 +3047,7 @@ "type": "Identifier", "span": { "start": 1169, - "end": 1177, + "end": 1170, "ctxt": 0 }, "value": "x", @@ -3303,7 +3303,7 @@ "type": "Identifier", "span": { "start": 1327, - "end": 1342, + "end": 1328, "ctxt": 0 }, "value": "x", @@ -3459,7 +3459,7 @@ "type": "Identifier", "span": { "start": 1420, - "end": 1435, + "end": 1421, "ctxt": 0 }, "value": "x", @@ -3912,7 +3912,7 @@ "type": "Identifier", "span": { "start": 1615, - "end": 1622, + "end": 1616, "ctxt": 0 }, "value": "x", @@ -4180,7 +4180,7 @@ "type": "Identifier", "span": { "start": 1743, - "end": 1750, + "end": 1744, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/stringEnumLiteralTypes2.json b/crates/swc_ecma_parser/tests/tsc/stringEnumLiteralTypes2.json index 800cf7506c4e..0c1b0e2ec3d4 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringEnumLiteralTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/stringEnumLiteralTypes2.json @@ -841,7 +841,7 @@ "type": "Identifier", "span": { "start": 363, - "end": 371, + "end": 364, "ctxt": 0 }, "value": "a", @@ -887,7 +887,7 @@ "type": "Identifier", "span": { "start": 373, - "end": 388, + "end": 374, "ctxt": 0 }, "value": "b", @@ -933,7 +933,7 @@ "type": "Identifier", "span": { "start": 390, - "end": 399, + "end": 391, "ctxt": 0 }, "value": "c", @@ -1129,7 +1129,7 @@ "type": "Identifier", "span": { "start": 451, - "end": 464, + "end": 452, "ctxt": 0 }, "value": "a", @@ -1188,7 +1188,7 @@ "type": "Identifier", "span": { "start": 466, - "end": 474, + "end": 467, "ctxt": 0 }, "value": "b", @@ -1870,7 +1870,7 @@ "type": "Identifier", "span": { "start": 695, - "end": 708, + "end": 696, "ctxt": 0 }, "value": "x", @@ -1972,7 +1972,7 @@ "type": "Identifier", "span": { "start": 738, - "end": 750, + "end": 739, "ctxt": 0 }, "value": "x", @@ -2074,7 +2074,7 @@ "type": "Identifier", "span": { "start": 781, - "end": 790, + "end": 782, "ctxt": 0 }, "value": "x", @@ -2163,7 +2163,7 @@ "type": "Identifier", "span": { "start": 814, - "end": 822, + "end": 815, "ctxt": 0 }, "value": "a", @@ -2209,7 +2209,7 @@ "type": "Identifier", "span": { "start": 824, - "end": 839, + "end": 825, "ctxt": 0 }, "value": "b", @@ -2255,7 +2255,7 @@ "type": "Identifier", "span": { "start": 841, - "end": 850, + "end": 842, "ctxt": 0 }, "value": "c", @@ -2703,7 +2703,7 @@ "type": "Identifier", "span": { "start": 990, - "end": 998, + "end": 991, "ctxt": 0 }, "value": "x", @@ -2833,7 +2833,7 @@ "type": "Identifier", "span": { "start": 1066, - "end": 1074, + "end": 1067, "ctxt": 0 }, "value": "x", @@ -3047,7 +3047,7 @@ "type": "Identifier", "span": { "start": 1197, - "end": 1205, + "end": 1198, "ctxt": 0 }, "value": "x", @@ -3303,7 +3303,7 @@ "type": "Identifier", "span": { "start": 1355, - "end": 1370, + "end": 1356, "ctxt": 0 }, "value": "x", @@ -3459,7 +3459,7 @@ "type": "Identifier", "span": { "start": 1448, - "end": 1463, + "end": 1449, "ctxt": 0 }, "value": "x", @@ -3912,7 +3912,7 @@ "type": "Identifier", "span": { "start": 1643, - "end": 1650, + "end": 1644, "ctxt": 0 }, "value": "x", @@ -4180,7 +4180,7 @@ "type": "Identifier", "span": { "start": 1771, - "end": 1778, + "end": 1772, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/stringEnumLiteralTypes3.json b/crates/swc_ecma_parser/tests/tsc/stringEnumLiteralTypes3.json index a225d245f5d0..c7eea43e9d24 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringEnumLiteralTypes3.json +++ b/crates/swc_ecma_parser/tests/tsc/stringEnumLiteralTypes3.json @@ -512,7 +512,7 @@ "type": "Identifier", "span": { "start": 233, - "end": 239, + "end": 234, "ctxt": 0 }, "value": "a", @@ -558,7 +558,7 @@ "type": "Identifier", "span": { "start": 241, - "end": 249, + "end": 242, "ctxt": 0 }, "value": "b", @@ -604,7 +604,7 @@ "type": "Identifier", "span": { "start": 251, - "end": 266, + "end": 252, "ctxt": 0 }, "value": "c", @@ -650,7 +650,7 @@ "type": "Identifier", "span": { "start": 268, - "end": 277, + "end": 269, "ctxt": 0 }, "value": "d", @@ -884,7 +884,7 @@ "type": "Identifier", "span": { "start": 340, - "end": 346, + "end": 341, "ctxt": 0 }, "value": "a", @@ -930,7 +930,7 @@ "type": "Identifier", "span": { "start": 348, - "end": 356, + "end": 349, "ctxt": 0 }, "value": "b", @@ -976,7 +976,7 @@ "type": "Identifier", "span": { "start": 358, - "end": 373, + "end": 359, "ctxt": 0 }, "value": "c", @@ -1022,7 +1022,7 @@ "type": "Identifier", "span": { "start": 375, - "end": 384, + "end": 376, "ctxt": 0 }, "value": "d", @@ -1256,7 +1256,7 @@ "type": "Identifier", "span": { "start": 447, - "end": 453, + "end": 448, "ctxt": 0 }, "value": "a", @@ -1302,7 +1302,7 @@ "type": "Identifier", "span": { "start": 455, - "end": 463, + "end": 456, "ctxt": 0 }, "value": "b", @@ -1348,7 +1348,7 @@ "type": "Identifier", "span": { "start": 465, - "end": 480, + "end": 466, "ctxt": 0 }, "value": "c", @@ -1394,7 +1394,7 @@ "type": "Identifier", "span": { "start": 482, - "end": 491, + "end": 483, "ctxt": 0 }, "value": "d", @@ -1628,7 +1628,7 @@ "type": "Identifier", "span": { "start": 554, - "end": 560, + "end": 555, "ctxt": 0 }, "value": "a", @@ -1674,7 +1674,7 @@ "type": "Identifier", "span": { "start": 562, - "end": 570, + "end": 563, "ctxt": 0 }, "value": "b", @@ -1720,7 +1720,7 @@ "type": "Identifier", "span": { "start": 572, - "end": 587, + "end": 573, "ctxt": 0 }, "value": "c", @@ -1766,7 +1766,7 @@ "type": "Identifier", "span": { "start": 589, - "end": 598, + "end": 590, "ctxt": 0 }, "value": "d", @@ -2000,7 +2000,7 @@ "type": "Identifier", "span": { "start": 661, - "end": 667, + "end": 662, "ctxt": 0 }, "value": "a", @@ -2046,7 +2046,7 @@ "type": "Identifier", "span": { "start": 669, - "end": 677, + "end": 670, "ctxt": 0 }, "value": "b", @@ -2092,7 +2092,7 @@ "type": "Identifier", "span": { "start": 679, - "end": 694, + "end": 680, "ctxt": 0 }, "value": "c", @@ -2138,7 +2138,7 @@ "type": "Identifier", "span": { "start": 696, - "end": 705, + "end": 697, "ctxt": 0 }, "value": "d", @@ -2892,7 +2892,7 @@ "type": "Identifier", "span": { "start": 976, - "end": 982, + "end": 977, "ctxt": 0 }, "value": "a", @@ -2938,7 +2938,7 @@ "type": "Identifier", "span": { "start": 984, - "end": 992, + "end": 985, "ctxt": 0 }, "value": "b", @@ -2984,7 +2984,7 @@ "type": "Identifier", "span": { "start": 994, - "end": 1009, + "end": 995, "ctxt": 0 }, "value": "c", @@ -3030,7 +3030,7 @@ "type": "Identifier", "span": { "start": 1011, - "end": 1020, + "end": 1012, "ctxt": 0 }, "value": "d", @@ -3772,7 +3772,7 @@ "type": "Identifier", "span": { "start": 1315, - "end": 1321, + "end": 1316, "ctxt": 0 }, "value": "a", @@ -3818,7 +3818,7 @@ "type": "Identifier", "span": { "start": 1323, - "end": 1331, + "end": 1324, "ctxt": 0 }, "value": "b", @@ -3864,7 +3864,7 @@ "type": "Identifier", "span": { "start": 1333, - "end": 1348, + "end": 1334, "ctxt": 0 }, "value": "c", @@ -3910,7 +3910,7 @@ "type": "Identifier", "span": { "start": 1350, - "end": 1359, + "end": 1351, "ctxt": 0 }, "value": "d", @@ -4584,7 +4584,7 @@ "type": "Identifier", "span": { "start": 1587, - "end": 1593, + "end": 1588, "ctxt": 0 }, "value": "x", @@ -4898,7 +4898,7 @@ "type": "Identifier", "span": { "start": 1763, - "end": 1771, + "end": 1764, "ctxt": 0 }, "value": "x", @@ -5212,7 +5212,7 @@ "type": "Identifier", "span": { "start": 1943, - "end": 1958, + "end": 1944, "ctxt": 0 }, "value": "x", @@ -5526,7 +5526,7 @@ "type": "Identifier", "span": { "start": 2137, - "end": 2146, + "end": 2138, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralCheckedInIf01.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralCheckedInIf01.json index 34d04fbc1293..aaf123afcf7f 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralCheckedInIf01.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralCheckedInIf01.json @@ -174,7 +174,7 @@ "type": "Identifier", "span": { "start": 52, - "end": 58, + "end": 55, "ctxt": 0 }, "value": "foo", diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralCheckedInIf02.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralCheckedInIf02.json index 4dc456c24ef5..1182d01bf233 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralCheckedInIf02.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralCheckedInIf02.json @@ -174,7 +174,7 @@ "type": "Identifier", "span": { "start": 54, - "end": 58, + "end": 55, "ctxt": 0 }, "value": "t", @@ -384,7 +384,7 @@ "type": "Identifier", "span": { "start": 119, - "end": 125, + "end": 122, "ctxt": 0 }, "value": "foo", diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralType.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralType.json index 674bf0251820..8f4142519b43 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralType.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralType.json @@ -90,7 +90,7 @@ "type": "Identifier", "span": { "start": 26, - "end": 33, + "end": 27, "ctxt": 0 }, "value": "x", @@ -162,7 +162,7 @@ "type": "Identifier", "span": { "start": 47, - "end": 56, + "end": 48, "ctxt": 0 }, "value": "x", @@ -225,7 +225,7 @@ "type": "Identifier", "span": { "start": 70, - "end": 76, + "end": 71, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypeIsSubtypeOfString.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypeIsSubtypeOfString.json index 071e3d7ee1cc..3f4b68fc278f 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypeIsSubtypeOfString.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypeIsSubtypeOfString.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 72, - "end": 78, + "end": 73, "ctxt": 0 }, "value": "x", @@ -104,7 +104,7 @@ "type": "Identifier", "span": { "start": 93, - "end": 102, + "end": 94, "ctxt": 0 }, "value": "x", @@ -167,7 +167,7 @@ "type": "Identifier", "span": { "start": 117, - "end": 126, + "end": 118, "ctxt": 0 }, "value": "x", @@ -238,7 +238,7 @@ "type": "Identifier", "span": { "start": 151, - "end": 157, + "end": 152, "ctxt": 0 }, "value": "x", @@ -310,7 +310,7 @@ "type": "Identifier", "span": { "start": 172, - "end": 178, + "end": 173, "ctxt": 0 }, "value": "x", @@ -373,7 +373,7 @@ "type": "Identifier", "span": { "start": 193, - "end": 199, + "end": 194, "ctxt": 0 }, "value": "x", @@ -444,7 +444,7 @@ "type": "Identifier", "span": { "start": 228, - "end": 234, + "end": 229, "ctxt": 0 }, "value": "x", @@ -516,7 +516,7 @@ "type": "Identifier", "span": { "start": 249, - "end": 258, + "end": 250, "ctxt": 0 }, "value": "x", @@ -589,7 +589,7 @@ "type": "Identifier", "span": { "start": 273, - "end": 279, + "end": 274, "ctxt": 0 }, "value": "x", @@ -660,7 +660,7 @@ "type": "Identifier", "span": { "start": 298, - "end": 304, + "end": 299, "ctxt": 0 }, "value": "x", @@ -732,7 +732,7 @@ "type": "Identifier", "span": { "start": 319, - "end": 324, + "end": 320, "ctxt": 0 }, "value": "x", @@ -795,7 +795,7 @@ "type": "Identifier", "span": { "start": 339, - "end": 345, + "end": 340, "ctxt": 0 }, "value": "x", @@ -866,7 +866,7 @@ "type": "Identifier", "span": { "start": 364, - "end": 370, + "end": 365, "ctxt": 0 }, "value": "x", @@ -938,7 +938,7 @@ "type": "Identifier", "span": { "start": 385, - "end": 394, + "end": 386, "ctxt": 0 }, "value": "x", @@ -1001,7 +1001,7 @@ "type": "Identifier", "span": { "start": 409, - "end": 415, + "end": 410, "ctxt": 0 }, "value": "x", @@ -1072,7 +1072,7 @@ "type": "Identifier", "span": { "start": 434, - "end": 440, + "end": 435, "ctxt": 0 }, "value": "x", @@ -1144,7 +1144,7 @@ "type": "Identifier", "span": { "start": 455, - "end": 465, + "end": 456, "ctxt": 0 }, "value": "x", @@ -1207,7 +1207,7 @@ "type": "Identifier", "span": { "start": 480, - "end": 486, + "end": 481, "ctxt": 0 }, "value": "x", @@ -1278,7 +1278,7 @@ "type": "Identifier", "span": { "start": 505, - "end": 511, + "end": 506, "ctxt": 0 }, "value": "x", @@ -1350,7 +1350,7 @@ "type": "Identifier", "span": { "start": 526, - "end": 533, + "end": 527, "ctxt": 0 }, "value": "x", @@ -1423,7 +1423,7 @@ "type": "Identifier", "span": { "start": 548, - "end": 554, + "end": 549, "ctxt": 0 }, "value": "x", @@ -1494,7 +1494,7 @@ "type": "Identifier", "span": { "start": 573, - "end": 579, + "end": 574, "ctxt": 0 }, "value": "x", @@ -1566,7 +1566,7 @@ "type": "Identifier", "span": { "start": 594, - "end": 603, + "end": 595, "ctxt": 0 }, "value": "x", @@ -1639,7 +1639,7 @@ "type": "Identifier", "span": { "start": 618, - "end": 624, + "end": 619, "ctxt": 0 }, "value": "x", @@ -1710,7 +1710,7 @@ "type": "Identifier", "span": { "start": 643, - "end": 649, + "end": 644, "ctxt": 0 }, "value": "x", @@ -1782,7 +1782,7 @@ "type": "Identifier", "span": { "start": 664, - "end": 675, + "end": 665, "ctxt": 0 }, "value": "x", @@ -1863,7 +1863,7 @@ "type": "Identifier", "span": { "start": 690, - "end": 696, + "end": 691, "ctxt": 0 }, "value": "x", @@ -2038,7 +2038,7 @@ "type": "Identifier", "span": { "start": 782, - "end": 793, + "end": 785, "ctxt": 0 }, "value": "pos", @@ -2154,7 +2154,7 @@ "type": "Identifier", "span": { "start": 835, - "end": 848, + "end": 840, "ctxt": 0 }, "value": "index", @@ -2408,7 +2408,7 @@ "type": "Identifier", "span": { "start": 945, - "end": 965, + "end": 957, "ctxt": 0 }, "value": "searchString", @@ -2444,7 +2444,7 @@ "type": "Identifier", "span": { "start": 967, - "end": 984, + "end": 975, "ctxt": 0 }, "value": "position", @@ -2560,7 +2560,7 @@ "type": "Identifier", "span": { "start": 1027, - "end": 1047, + "end": 1039, "ctxt": 0 }, "value": "searchString", @@ -2596,7 +2596,7 @@ "type": "Identifier", "span": { "start": 1049, - "end": 1066, + "end": 1057, "ctxt": 0 }, "value": "position", @@ -2712,7 +2712,7 @@ "type": "Identifier", "span": { "start": 1111, - "end": 1123, + "end": 1115, "ctxt": 0 }, "value": "that", @@ -2828,7 +2828,7 @@ "type": "Identifier", "span": { "start": 1160, - "end": 1171, + "end": 1166, "ctxt": 0 }, "value": "regexp", @@ -2954,7 +2954,7 @@ "type": "Identifier", "span": { "start": 1220, - "end": 1236, + "end": 1231, "ctxt": 0 }, "value": "searchValue", @@ -2990,7 +2990,7 @@ "type": "Identifier", "span": { "start": 1238, - "end": 1255, + "end": 1250, "ctxt": 0 }, "value": "replaceValue", @@ -3106,7 +3106,7 @@ "type": "Identifier", "span": { "start": 1293, - "end": 1304, + "end": 1299, "ctxt": 0 }, "value": "regexp", @@ -3222,7 +3222,7 @@ "type": "Identifier", "span": { "start": 1341, - "end": 1355, + "end": 1346, "ctxt": 0 }, "value": "start", @@ -3258,7 +3258,7 @@ "type": "Identifier", "span": { "start": 1357, - "end": 1369, + "end": 1360, "ctxt": 0 }, "value": "end", @@ -3374,7 +3374,7 @@ "type": "Identifier", "span": { "start": 1406, - "end": 1420, + "end": 1415, "ctxt": 0 }, "value": "separator", @@ -3410,7 +3410,7 @@ "type": "Identifier", "span": { "start": 1422, - "end": 1436, + "end": 1427, "ctxt": 0 }, "value": "limit", @@ -3534,7 +3534,7 @@ "type": "Identifier", "span": { "start": 1479, - "end": 1492, + "end": 1484, "ctxt": 0 }, "value": "start", @@ -3570,7 +3570,7 @@ "type": "Identifier", "span": { "start": 1494, - "end": 1506, + "end": 1497, "ctxt": 0 }, "value": "end", @@ -4126,7 +4126,7 @@ "type": "Identifier", "span": { "start": 1784, - "end": 1796, + "end": 1788, "ctxt": 0 }, "value": "from", @@ -4162,7 +4162,7 @@ "type": "Identifier", "span": { "start": 1798, - "end": 1813, + "end": 1804, "ctxt": 0 }, "value": "length", @@ -4435,7 +4435,7 @@ "type": "Identifier", "span": { "start": 1938, - "end": 1944, + "end": 1939, "ctxt": 0 }, "value": "x", @@ -4507,7 +4507,7 @@ "type": "Identifier", "span": { "start": 1960, - "end": 1964, + "end": 1961, "ctxt": 0 }, "value": "x", @@ -4580,7 +4580,7 @@ "type": "Identifier", "span": { "start": 1980, - "end": 1986, + "end": 1981, "ctxt": 0 }, "value": "x", @@ -4743,7 +4743,7 @@ "type": "Identifier", "span": { "start": 2069, - "end": 2075, + "end": 2070, "ctxt": 0 }, "value": "x", @@ -4815,7 +4815,7 @@ "type": "Identifier", "span": { "start": 2091, - "end": 2095, + "end": 2092, "ctxt": 0 }, "value": "x", @@ -4888,7 +4888,7 @@ "type": "Identifier", "span": { "start": 2111, - "end": 2117, + "end": 2112, "ctxt": 0 }, "value": "x", @@ -4959,7 +4959,7 @@ "type": "Identifier", "span": { "start": 2140, - "end": 2146, + "end": 2141, "ctxt": 0 }, "value": "x", @@ -5063,7 +5063,7 @@ "type": "Identifier", "span": { "start": 2165, - "end": 2169, + "end": 2166, "ctxt": 0 }, "value": "x", @@ -5168,7 +5168,7 @@ "type": "Identifier", "span": { "start": 2188, - "end": 2194, + "end": 2189, "ctxt": 0 }, "value": "x", @@ -5271,7 +5271,7 @@ "type": "Identifier", "span": { "start": 2232, - "end": 2238, + "end": 2233, "ctxt": 0 }, "value": "x", @@ -5393,7 +5393,7 @@ "type": "Identifier", "span": { "start": 2272, - "end": 2276, + "end": 2273, "ctxt": 0 }, "value": "x", @@ -5516,7 +5516,7 @@ "type": "Identifier", "span": { "start": 2310, - "end": 2316, + "end": 2311, "ctxt": 0 }, "value": "x", @@ -5678,7 +5678,7 @@ "type": "Identifier", "span": { "start": 2349, - "end": 2355, + "end": 2350, "ctxt": 0 }, "value": "x", @@ -5750,7 +5750,7 @@ "type": "Identifier", "span": { "start": 2371, - "end": 2375, + "end": 2372, "ctxt": 0 }, "value": "x", @@ -5823,7 +5823,7 @@ "type": "Identifier", "span": { "start": 2391, - "end": 2397, + "end": 2392, "ctxt": 0 }, "value": "x", @@ -5894,7 +5894,7 @@ "type": "Identifier", "span": { "start": 2433, - "end": 2439, + "end": 2434, "ctxt": 0 }, "value": "x", @@ -6039,7 +6039,7 @@ "type": "Identifier", "span": { "start": 2471, - "end": 2475, + "end": 2472, "ctxt": 0 }, "value": "x", @@ -6185,7 +6185,7 @@ "type": "Identifier", "span": { "start": 2507, - "end": 2513, + "end": 2508, "ctxt": 0 }, "value": "x", @@ -6329,7 +6329,7 @@ "type": "Identifier", "span": { "start": 2564, - "end": 2570, + "end": 2565, "ctxt": 0 }, "value": "x", @@ -6492,7 +6492,7 @@ "type": "Identifier", "span": { "start": 2617, - "end": 2621, + "end": 2618, "ctxt": 0 }, "value": "x", @@ -6656,7 +6656,7 @@ "type": "Identifier", "span": { "start": 2668, - "end": 2674, + "end": 2669, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAndTuples01.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAndTuples01.json index d9bf3f701116..7794f2cf7274 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAndTuples01.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAndTuples01.json @@ -493,7 +493,7 @@ "type": "Identifier", "span": { "start": 268, - "end": 285, + "end": 272, "ctxt": 0 }, "value": "dino", diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTags01.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTags01.json index d79e40f02be6..b3f05fdea8b2 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTags01.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTags01.json @@ -464,7 +464,7 @@ "type": "Identifier", "span": { "start": 226, - "end": 240, + "end": 232, "ctxt": 0 }, "value": "entity", @@ -510,7 +510,7 @@ "type": "Identifier", "span": { "start": 242, - "end": 251, + "end": 246, "ctxt": 0 }, "value": "kind", @@ -635,7 +635,7 @@ "type": "Identifier", "span": { "start": 284, - "end": 298, + "end": 290, "ctxt": 0 }, "value": "entity", @@ -681,7 +681,7 @@ "type": "Identifier", "span": { "start": 300, - "end": 309, + "end": 304, "ctxt": 0 }, "value": "kind", @@ -806,7 +806,7 @@ "type": "Identifier", "span": { "start": 342, - "end": 356, + "end": 348, "ctxt": 0 }, "value": "entity", @@ -852,7 +852,7 @@ "type": "Identifier", "span": { "start": 358, - "end": 368, + "end": 362, "ctxt": 0 }, "value": "kind", @@ -978,7 +978,7 @@ "type": "Identifier", "span": { "start": 406, - "end": 420, + "end": 412, "ctxt": 0 }, "value": "entity", @@ -1024,7 +1024,7 @@ "type": "Identifier", "span": { "start": 422, - "end": 432, + "end": 426, "ctxt": 0 }, "value": "kind", diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTags02.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTags02.json index b79836b5c30f..a3d8bdb4e35e 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTags02.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTags02.json @@ -464,7 +464,7 @@ "type": "Identifier", "span": { "start": 226, - "end": 240, + "end": 232, "ctxt": 0 }, "value": "entity", @@ -510,7 +510,7 @@ "type": "Identifier", "span": { "start": 242, - "end": 251, + "end": 246, "ctxt": 0 }, "value": "kind", @@ -635,7 +635,7 @@ "type": "Identifier", "span": { "start": 284, - "end": 298, + "end": 290, "ctxt": 0 }, "value": "entity", @@ -681,7 +681,7 @@ "type": "Identifier", "span": { "start": 300, - "end": 309, + "end": 304, "ctxt": 0 }, "value": "kind", @@ -806,7 +806,7 @@ "type": "Identifier", "span": { "start": 342, - "end": 356, + "end": 348, "ctxt": 0 }, "value": "entity", @@ -852,7 +852,7 @@ "type": "Identifier", "span": { "start": 358, - "end": 368, + "end": 362, "ctxt": 0 }, "value": "kind", diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTags03.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTags03.json index e3baba3447c1..f1ada73967c1 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTags03.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTags03.json @@ -464,7 +464,7 @@ "type": "Identifier", "span": { "start": 503, - "end": 517, + "end": 509, "ctxt": 0 }, "value": "entity", @@ -510,7 +510,7 @@ "type": "Identifier", "span": { "start": 519, - "end": 534, + "end": 523, "ctxt": 0 }, "value": "kind", @@ -663,7 +663,7 @@ "type": "Identifier", "span": { "start": 567, - "end": 581, + "end": 573, "ctxt": 0 }, "value": "entity", @@ -709,7 +709,7 @@ "type": "Identifier", "span": { "start": 583, - "end": 598, + "end": 587, "ctxt": 0 }, "value": "kind", @@ -862,7 +862,7 @@ "type": "Identifier", "span": { "start": 631, - "end": 645, + "end": 637, "ctxt": 0 }, "value": "entity", @@ -908,7 +908,7 @@ "type": "Identifier", "span": { "start": 647, - "end": 657, + "end": 651, "ctxt": 0 }, "value": "kind", diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTypeParameterConstraint01.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTypeParameterConstraint01.json index 568abf38efc8..2b95d9b78927 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTypeParameterConstraint01.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTypeParameterConstraint01.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 54, - "end": 68, + "end": 55, "ctxt": 0 }, "value": "f", @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 58, - "end": 62, + "end": 59, "ctxt": 0 }, "value": "x", @@ -237,7 +237,7 @@ "type": "Identifier", "span": { "start": 127, - "end": 141, + "end": 128, "ctxt": 0 }, "value": "f", @@ -261,7 +261,7 @@ "type": "Identifier", "span": { "start": 131, - "end": 135, + "end": 132, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTypeParameterConstraint02.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTypeParameterConstraint02.json index 549531d503ce..12f350bb0578 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTypeParameterConstraint02.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTypeParameterConstraint02.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 54, - "end": 68, + "end": 55, "ctxt": 0 }, "value": "f", @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 58, - "end": 62, + "end": 59, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesInImplementationSignatures.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesInImplementationSignatures.json index 06ed9d177135..3a494505a30f 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesInImplementationSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesInImplementationSignatures.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 77, - "end": 84, + "end": 78, "ctxt": 0 }, "value": "x", @@ -139,7 +139,7 @@ "type": "Identifier", "span": { "start": 111, - "end": 118, + "end": 112, "ctxt": 0 }, "value": "x", @@ -375,7 +375,7 @@ "type": "Identifier", "span": { "start": 178, - "end": 185, + "end": 179, "ctxt": 0 }, "value": "x", @@ -483,7 +483,7 @@ "type": "Identifier", "span": { "start": 213, - "end": 220, + "end": 214, "ctxt": 0 }, "value": "x", @@ -544,7 +544,7 @@ "type": "Identifier", "span": { "start": 231, - "end": 238, + "end": 232, "ctxt": 0 }, "value": "x", @@ -580,7 +580,7 @@ "type": "Identifier", "span": { "start": 240, - "end": 247, + "end": 241, "ctxt": 0 }, "value": "y", @@ -672,7 +672,7 @@ "type": "Identifier", "span": { "start": 267, - "end": 274, + "end": 268, "ctxt": 0 }, "value": "x", @@ -733,7 +733,7 @@ "type": "Identifier", "span": { "start": 285, - "end": 292, + "end": 286, "ctxt": 0 }, "value": "x", @@ -839,7 +839,7 @@ "type": "Identifier", "span": { "start": 316, - "end": 323, + "end": 317, "ctxt": 0 }, "value": "x", @@ -930,7 +930,7 @@ "type": "Identifier", "span": { "start": 350, - "end": 357, + "end": 351, "ctxt": 0 }, "value": "x", @@ -975,7 +975,7 @@ "type": "Identifier", "span": { "start": 359, - "end": 366, + "end": 360, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesInImplementationSignatures2.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesInImplementationSignatures2.json index 977207ba7d4c..709790090ca1 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesInImplementationSignatures2.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesInImplementationSignatures2.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 77, - "end": 83, + "end": 78, "ctxt": 0 }, "value": "x", @@ -95,7 +95,7 @@ "type": "Identifier", "span": { "start": 99, - "end": 106, + "end": 100, "ctxt": 0 }, "value": "x", @@ -200,7 +200,7 @@ "type": "Identifier", "span": { "start": 131, - "end": 140, + "end": 132, "ctxt": 0 }, "value": "x", @@ -275,7 +275,7 @@ "type": "Identifier", "span": { "start": 151, - "end": 158, + "end": 152, "ctxt": 0 }, "value": "x", @@ -383,7 +383,7 @@ "type": "Identifier", "span": { "start": 186, - "end": 192, + "end": 187, "ctxt": 0 }, "value": "x", @@ -431,7 +431,7 @@ "type": "Identifier", "span": { "start": 200, - "end": 207, + "end": 201, "ctxt": 0 }, "value": "x", @@ -492,7 +492,7 @@ "type": "Identifier", "span": { "start": 218, - "end": 224, + "end": 219, "ctxt": 0 }, "value": "x", @@ -528,7 +528,7 @@ "type": "Identifier", "span": { "start": 226, - "end": 232, + "end": 227, "ctxt": 0 }, "value": "y", @@ -589,7 +589,7 @@ "type": "Identifier", "span": { "start": 243, - "end": 250, + "end": 244, "ctxt": 0 }, "value": "x", @@ -625,7 +625,7 @@ "type": "Identifier", "span": { "start": 252, - "end": 259, + "end": 253, "ctxt": 0 }, "value": "y", @@ -717,7 +717,7 @@ "type": "Identifier", "span": { "start": 279, - "end": 286, + "end": 280, "ctxt": 0 }, "value": "x", @@ -765,7 +765,7 @@ "type": "Identifier", "span": { "start": 294, - "end": 300, + "end": 295, "ctxt": 0 }, "value": "x", @@ -826,7 +826,7 @@ "type": "Identifier", "span": { "start": 311, - "end": 318, + "end": 312, "ctxt": 0 }, "value": "x", @@ -887,7 +887,7 @@ "type": "Identifier", "span": { "start": 329, - "end": 335, + "end": 330, "ctxt": 0 }, "value": "x", @@ -993,7 +993,7 @@ "type": "Identifier", "span": { "start": 359, - "end": 366, + "end": 360, "ctxt": 0 }, "value": "x", @@ -1072,7 +1072,7 @@ "type": "Identifier", "span": { "start": 381, - "end": 387, + "end": 382, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloadAssignability01.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloadAssignability01.json index d62e1663dc5b..f512904f4a1d 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloadAssignability01.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloadAssignability01.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 35, - "end": 43, + "end": 36, "ctxt": 0 }, "value": "x", @@ -120,7 +120,7 @@ "type": "Identifier", "span": { "start": 65, - "end": 74, + "end": 66, "ctxt": 0 }, "value": "x", @@ -226,7 +226,7 @@ "type": "Identifier", "span": { "start": 114, - "end": 122, + "end": 115, "ctxt": 0 }, "value": "x", @@ -314,7 +314,7 @@ "type": "Identifier", "span": { "start": 144, - "end": 153, + "end": 145, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloadAssignability02.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloadAssignability02.json index e884fb4cf467..4a1bed3619ea 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloadAssignability02.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloadAssignability02.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 35, - "end": 43, + "end": 36, "ctxt": 0 }, "value": "x", @@ -120,7 +120,7 @@ "type": "Identifier", "span": { "start": 65, - "end": 73, + "end": 66, "ctxt": 0 }, "value": "x", @@ -235,7 +235,7 @@ "type": "Identifier", "span": { "start": 113, - "end": 121, + "end": 114, "ctxt": 0 }, "value": "x", @@ -323,7 +323,7 @@ "type": "Identifier", "span": { "start": 143, - "end": 151, + "end": 144, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloadAssignability03.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloadAssignability03.json index 9ea5b6ffd524..67be60146d3b 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloadAssignability03.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloadAssignability03.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 35, - "end": 43, + "end": 36, "ctxt": 0 }, "value": "x", @@ -120,7 +120,7 @@ "type": "Identifier", "span": { "start": 65, - "end": 74, + "end": 66, "ctxt": 0 }, "value": "x", @@ -226,7 +226,7 @@ "type": "Identifier", "span": { "start": 114, - "end": 122, + "end": 115, "ctxt": 0 }, "value": "x", @@ -314,7 +314,7 @@ "type": "Identifier", "span": { "start": 144, - "end": 153, + "end": 145, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloadAssignability04.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloadAssignability04.json index 2858614bff46..240741358905 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloadAssignability04.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloadAssignability04.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 35, - "end": 43, + "end": 36, "ctxt": 0 }, "value": "x", @@ -120,7 +120,7 @@ "type": "Identifier", "span": { "start": 65, - "end": 73, + "end": 66, "ctxt": 0 }, "value": "x", @@ -235,7 +235,7 @@ "type": "Identifier", "span": { "start": 113, - "end": 121, + "end": 114, "ctxt": 0 }, "value": "x", @@ -323,7 +323,7 @@ "type": "Identifier", "span": { "start": 143, - "end": 151, + "end": 144, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloadAssignability05.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloadAssignability05.json index 1bf0ae8ecd77..7d61f31c9f9a 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloadAssignability05.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloadAssignability05.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 35, - "end": 43, + "end": 36, "ctxt": 0 }, "value": "x", @@ -120,7 +120,7 @@ "type": "Identifier", "span": { "start": 65, - "end": 74, + "end": 66, "ctxt": 0 }, "value": "x", @@ -199,7 +199,7 @@ "type": "Identifier", "span": { "start": 96, - "end": 105, + "end": 97, "ctxt": 0 }, "value": "x", @@ -305,7 +305,7 @@ "type": "Identifier", "span": { "start": 145, - "end": 153, + "end": 146, "ctxt": 0 }, "value": "x", @@ -393,7 +393,7 @@ "type": "Identifier", "span": { "start": 175, - "end": 184, + "end": 176, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloads01.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloads01.json index 43f231e048b7..c138a02856d4 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloads01.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloads01.json @@ -116,7 +116,7 @@ "type": "Identifier", "span": { "start": 106, - "end": 117, + "end": 107, "ctxt": 0 }, "value": "x", @@ -204,7 +204,7 @@ "type": "Identifier", "span": { "start": 155, - "end": 166, + "end": 156, "ctxt": 0 }, "value": "x", @@ -292,7 +292,7 @@ "type": "Identifier", "span": { "start": 204, - "end": 216, + "end": 205, "ctxt": 0 }, "value": "x", @@ -380,7 +380,7 @@ "type": "Identifier", "span": { "start": 255, - "end": 278, + "end": 256, "ctxt": 0 }, "value": "x", @@ -515,7 +515,7 @@ "type": "Identifier", "span": { "start": 326, - "end": 349, + "end": 327, "ctxt": 0 }, "value": "x", @@ -650,7 +650,7 @@ "type": "Identifier", "span": { "start": 397, - "end": 419, + "end": 398, "ctxt": 0 }, "value": "x", @@ -785,7 +785,7 @@ "type": "Identifier", "span": { "start": 466, - "end": 500, + "end": 467, "ctxt": 0 }, "value": "x", @@ -947,7 +947,7 @@ "type": "Identifier", "span": { "start": 557, - "end": 573, + "end": 558, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloads02.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloads02.json index 4a0d573e3d7c..42dc55a97fbb 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloads02.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloads02.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 51, - "end": 62, + "end": 52, "ctxt": 0 }, "value": "x", @@ -120,7 +120,7 @@ "type": "Identifier", "span": { "start": 100, - "end": 111, + "end": 101, "ctxt": 0 }, "value": "x", @@ -208,7 +208,7 @@ "type": "Identifier", "span": { "start": 149, - "end": 161, + "end": 150, "ctxt": 0 }, "value": "x", @@ -296,7 +296,7 @@ "type": "Identifier", "span": { "start": 200, - "end": 223, + "end": 201, "ctxt": 0 }, "value": "x", @@ -431,7 +431,7 @@ "type": "Identifier", "span": { "start": 271, - "end": 294, + "end": 272, "ctxt": 0 }, "value": "x", @@ -566,7 +566,7 @@ "type": "Identifier", "span": { "start": 342, - "end": 364, + "end": 343, "ctxt": 0 }, "value": "x", @@ -701,7 +701,7 @@ "type": "Identifier", "span": { "start": 411, - "end": 445, + "end": 412, "ctxt": 0 }, "value": "x", @@ -863,7 +863,7 @@ "type": "Identifier", "span": { "start": 502, - "end": 511, + "end": 503, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloads03.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloads03.json index 2c76b7b399f9..e93478328a3c 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloads03.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloads03.json @@ -623,7 +623,7 @@ "type": "Identifier", "span": { "start": 331, - "end": 341, + "end": 332, "ctxt": 0 }, "value": "p", @@ -721,7 +721,7 @@ "type": "Identifier", "span": { "start": 366, - "end": 386, + "end": 367, "ctxt": 0 }, "value": "p", @@ -847,7 +847,7 @@ "type": "Identifier", "span": { "start": 414, - "end": 424, + "end": 415, "ctxt": 0 }, "value": "p", @@ -945,7 +945,7 @@ "type": "Identifier", "span": { "start": 449, - "end": 458, + "end": 450, "ctxt": 0 }, "value": "p", @@ -1360,7 +1360,7 @@ "type": "Identifier", "span": { "start": 620, - "end": 629, + "end": 621, "ctxt": 0 }, "value": "p", @@ -1449,7 +1449,7 @@ "type": "Identifier", "span": { "start": 649, - "end": 659, + "end": 650, "ctxt": 0 }, "value": "p", @@ -1547,7 +1547,7 @@ "type": "Identifier", "span": { "start": 684, - "end": 704, + "end": 685, "ctxt": 0 }, "value": "p", @@ -1673,7 +1673,7 @@ "type": "Identifier", "span": { "start": 732, - "end": 742, + "end": 733, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloads04.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloads04.json index ef3b7df15018..c9deff0178d9 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloads04.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloads04.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 43, - "end": 73, + "end": 44, "ctxt": 0 }, "value": "x", @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 47, - "end": 63, + "end": 48, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloads05.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloads05.json index 17230b36c031..6735c7e1c11a 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloads05.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloads05.json @@ -388,7 +388,7 @@ "type": "Identifier", "span": { "start": 202, - "end": 210, + "end": 203, "ctxt": 0 }, "value": "x", @@ -486,7 +486,7 @@ "type": "Identifier", "span": { "start": 235, - "end": 243, + "end": 236, "ctxt": 0 }, "value": "x", @@ -584,7 +584,7 @@ "type": "Identifier", "span": { "start": 268, - "end": 277, + "end": 269, "ctxt": 0 }, "value": "x", @@ -673,7 +673,7 @@ "type": "Identifier", "span": { "start": 305, - "end": 314, + "end": 306, "ctxt": 0 }, "value": "x", @@ -709,7 +709,7 @@ "type": "Identifier", "span": { "start": 316, - "end": 326, + "end": 317, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesTypePredicates01.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesTypePredicates01.json index 0fe0af9b4df7..95eeaf3dfdb5 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesTypePredicates01.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesTypePredicates01.json @@ -98,7 +98,7 @@ "type": "Identifier", "span": { "start": 63, - "end": 73, + "end": 67, "ctxt": 0 }, "value": "kind", @@ -144,7 +144,7 @@ "type": "Identifier", "span": { "start": 75, - "end": 82, + "end": 77, "ctxt": 0 }, "value": "is", @@ -268,7 +268,7 @@ "type": "Identifier", "span": { "start": 114, - "end": 124, + "end": 118, "ctxt": 0 }, "value": "kind", @@ -314,7 +314,7 @@ "type": "Identifier", "span": { "start": 126, - "end": 133, + "end": 128, "ctxt": 0 }, "value": "is", @@ -438,7 +438,7 @@ "type": "Identifier", "span": { "start": 165, - "end": 175, + "end": 169, "ctxt": 0 }, "value": "kind", @@ -484,7 +484,7 @@ "type": "Identifier", "span": { "start": 177, - "end": 185, + "end": 179, "ctxt": 0 }, "value": "is", diff --git a/crates/swc_ecma_parser/tests/tsc/stringMappingOverPatternLiterals.json b/crates/swc_ecma_parser/tests/tsc/stringMappingOverPatternLiterals.json index e9c8fc88f734..236fdeb78606 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringMappingOverPatternLiterals.json +++ b/crates/swc_ecma_parser/tests/tsc/stringMappingOverPatternLiterals.json @@ -409,7 +409,7 @@ "type": "Identifier", "span": { "start": 220, - "end": 224, + "end": 221, "ctxt": 0 }, "value": "a", @@ -455,7 +455,7 @@ "type": "Identifier", "span": { "start": 230, - "end": 234, + "end": 231, "ctxt": 0 }, "value": "b", @@ -501,7 +501,7 @@ "type": "Identifier", "span": { "start": 240, - "end": 244, + "end": 241, "ctxt": 0 }, "value": "c", @@ -547,7 +547,7 @@ "type": "Identifier", "span": { "start": 250, - "end": 271, + "end": 260, "ctxt": 0 }, "value": "a_template", @@ -593,7 +593,7 @@ "type": "Identifier", "span": { "start": 277, - "end": 298, + "end": 287, "ctxt": 0 }, "value": "b_template", @@ -639,7 +639,7 @@ "type": "Identifier", "span": { "start": 304, - "end": 325, + "end": 314, "ctxt": 0 }, "value": "c_template", @@ -1177,7 +1177,7 @@ "type": "Identifier", "span": { "start": 924, - "end": 934, + "end": 926, "ctxt": 0 }, "value": "x1", @@ -1213,7 +1213,7 @@ "type": "Identifier", "span": { "start": 936, - "end": 957, + "end": 938, "ctxt": 0 }, "value": "x2", @@ -1277,7 +1277,7 @@ "type": "Identifier", "span": { "start": 959, - "end": 980, + "end": 961, "ctxt": 0 }, "value": "x3", @@ -1757,7 +1757,7 @@ "type": "Identifier", "span": { "start": 1225, - "end": 1246, + "end": 1227, "ctxt": 0 }, "value": "x1", @@ -1821,7 +1821,7 @@ "type": "Identifier", "span": { "start": 1252, - "end": 1284, + "end": 1254, "ctxt": 0 }, "value": "x2", @@ -1913,7 +1913,7 @@ "type": "Identifier", "span": { "start": 1290, - "end": 1322, + "end": 1292, "ctxt": 0 }, "value": "x3", @@ -3086,7 +3086,7 @@ "type": "Identifier", "span": { "start": 2228, - "end": 2244, + "end": 2230, "ctxt": 0 }, "value": "x1", @@ -3132,7 +3132,7 @@ "type": "Identifier", "span": { "start": 2246, - "end": 2272, + "end": 2248, "ctxt": 0 }, "value": "x2", @@ -3290,7 +3290,7 @@ "type": "Identifier", "span": { "start": 2399, - "end": 2420, + "end": 2406, "ctxt": 0 }, "value": "cap_tem", @@ -3368,7 +3368,7 @@ "type": "Identifier", "span": { "start": 2426, - "end": 2453, + "end": 2433, "ctxt": 0 }, "value": "cap_str", @@ -3432,7 +3432,7 @@ "type": "Identifier", "span": { "start": 2459, - "end": 2496, + "end": 2470, "ctxt": 0 }, "value": "cap_tem_map", @@ -3538,7 +3538,7 @@ "type": "Identifier", "span": { "start": 2502, - "end": 2540, + "end": 2514, "ctxt": 0 }, "value": "cap_tem_map2", @@ -3644,7 +3644,7 @@ "type": "Identifier", "span": { "start": 2546, - "end": 2569, + "end": 2555, "ctxt": 0 }, "value": "uncap_tem", @@ -3722,7 +3722,7 @@ "type": "Identifier", "span": { "start": 2575, - "end": 2606, + "end": 2584, "ctxt": 0 }, "value": "uncap_str", @@ -3786,7 +3786,7 @@ "type": "Identifier", "span": { "start": 2612, - "end": 2653, + "end": 2625, "ctxt": 0 }, "value": "uncap_tem_map", @@ -3892,7 +3892,7 @@ "type": "Identifier", "span": { "start": 2659, - "end": 2701, + "end": 2673, "ctxt": 0 }, "value": "uncap_tem_map2", diff --git a/crates/swc_ecma_parser/tests/tsc/stringMappingReduction.json b/crates/swc_ecma_parser/tests/tsc/stringMappingReduction.json index 029bade75562..31cfba96899d 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringMappingReduction.json +++ b/crates/swc_ecma_parser/tests/tsc/stringMappingReduction.json @@ -1492,7 +1492,7 @@ "type": "Identifier", "span": { "start": 951, - "end": 985, + "end": 956, "ctxt": 0 }, "value": "event", @@ -1668,7 +1668,7 @@ "type": "Identifier", "span": { "start": 1041, - "end": 1069, + "end": 1049, "ctxt": 0 }, "value": "eventQrl", diff --git a/crates/swc_ecma_parser/tests/tsc/subtypesOfAny.json b/crates/swc_ecma_parser/tests/tsc/subtypesOfAny.json index ec7c37ca6f51..19d526876206 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypesOfAny.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypesOfAny.json @@ -2001,7 +2001,7 @@ "type": "Identifier", "span": { "start": 861, - "end": 864, + "end": 862, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameter.json index 5e4dd8722d30..e1068f0e1dc3 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameter.json @@ -320,7 +320,7 @@ "type": "Identifier", "span": { "start": 168, - "end": 172, + "end": 169, "ctxt": 0 }, "value": "x", @@ -366,7 +366,7 @@ "type": "Identifier", "span": { "start": 174, - "end": 178, + "end": 175, "ctxt": 0 }, "value": "y", @@ -1206,7 +1206,7 @@ "type": "Identifier", "span": { "start": 503, - "end": 507, + "end": 504, "ctxt": 0 }, "value": "x", @@ -1252,7 +1252,7 @@ "type": "Identifier", "span": { "start": 509, - "end": 513, + "end": 510, "ctxt": 0 }, "value": "y", @@ -4367,7 +4367,7 @@ "type": "Identifier", "span": { "start": 1804, - "end": 1808, + "end": 1805, "ctxt": 0 }, "value": "a", @@ -4619,7 +4619,7 @@ "type": "Identifier", "span": { "start": 1916, - "end": 1920, + "end": 1917, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints2.json b/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints2.json index 9e6c99f7b391..566c0246e312 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints2.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints2.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 111, - "end": 115, + "end": 112, "ctxt": 0 }, "value": "x", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 117, - "end": 121, + "end": 118, "ctxt": 0 }, "value": "y", @@ -371,7 +371,7 @@ "type": "Identifier", "span": { "start": 234, - "end": 238, + "end": 235, "ctxt": 0 }, "value": "x", @@ -417,7 +417,7 @@ "type": "Identifier", "span": { "start": 240, - "end": 244, + "end": 241, "ctxt": 0 }, "value": "y", @@ -463,7 +463,7 @@ "type": "Identifier", "span": { "start": 246, - "end": 250, + "end": 247, "ctxt": 0 }, "value": "z", @@ -1073,7 +1073,7 @@ "type": "Identifier", "span": { "start": 498, - "end": 502, + "end": 499, "ctxt": 0 }, "value": "x", @@ -1119,7 +1119,7 @@ "type": "Identifier", "span": { "start": 504, - "end": 508, + "end": 505, "ctxt": 0 }, "value": "y", @@ -2311,7 +2311,7 @@ "type": "Identifier", "span": { "start": 975, - "end": 979, + "end": 976, "ctxt": 0 }, "value": "x", @@ -2774,7 +2774,7 @@ "type": "Identifier", "span": { "start": 1186, - "end": 1190, + "end": 1187, "ctxt": 0 }, "value": "x", @@ -3044,7 +3044,7 @@ "type": "Identifier", "span": { "start": 1293, - "end": 1297, + "end": 1294, "ctxt": 0 }, "value": "x", @@ -3314,7 +3314,7 @@ "type": "Identifier", "span": { "start": 1403, - "end": 1407, + "end": 1404, "ctxt": 0 }, "value": "x", @@ -3582,7 +3582,7 @@ "type": "Identifier", "span": { "start": 1514, - "end": 1518, + "end": 1515, "ctxt": 0 }, "value": "x", @@ -3872,7 +3872,7 @@ "type": "Identifier", "span": { "start": 1639, - "end": 1643, + "end": 1640, "ctxt": 0 }, "value": "x", @@ -4142,7 +4142,7 @@ "type": "Identifier", "span": { "start": 1760, - "end": 1764, + "end": 1761, "ctxt": 0 }, "value": "x", @@ -4490,7 +4490,7 @@ "type": "Identifier", "span": { "start": 1890, - "end": 1894, + "end": 1891, "ctxt": 0 }, "value": "x", @@ -4792,7 +4792,7 @@ "type": "Identifier", "span": { "start": 2022, - "end": 2026, + "end": 2023, "ctxt": 0 }, "value": "x", @@ -5225,7 +5225,7 @@ "type": "Identifier", "span": { "start": 2010, - "end": 2014, + "end": 2011, "ctxt": 0 }, "value": "x", @@ -5352,7 +5352,7 @@ "type": "Identifier", "span": { "start": 2226, - "end": 2230, + "end": 2227, "ctxt": 0 }, "value": "x", @@ -5681,7 +5681,7 @@ "type": "Identifier", "span": { "start": 2348, - "end": 2352, + "end": 2349, "ctxt": 0 }, "value": "x", @@ -6010,7 +6010,7 @@ "type": "Identifier", "span": { "start": 2480, - "end": 2484, + "end": 2481, "ctxt": 0 }, "value": "x", @@ -6375,7 +6375,7 @@ "type": "Identifier", "span": { "start": 2611, - "end": 2615, + "end": 2612, "ctxt": 0 }, "value": "x", @@ -6819,7 +6819,7 @@ "type": "Identifier", "span": { "start": 2796, - "end": 2800, + "end": 2797, "ctxt": 0 }, "value": "x", @@ -7148,7 +7148,7 @@ "type": "Identifier", "span": { "start": 2932, - "end": 2936, + "end": 2933, "ctxt": 0 }, "value": "x", @@ -7477,7 +7477,7 @@ "type": "Identifier", "span": { "start": 3051, - "end": 3055, + "end": 3052, "ctxt": 0 }, "value": "x", @@ -7552,7 +7552,7 @@ "type": "Identifier", "span": { "start": 3089, - "end": 3093, + "end": 3090, "ctxt": 0 }, "value": "a", @@ -7822,7 +7822,7 @@ "type": "Identifier", "span": { "start": 3223, - "end": 3227, + "end": 3224, "ctxt": 0 }, "value": "a", @@ -8172,7 +8172,7 @@ "type": "Identifier", "span": { "start": 3347, - "end": 3351, + "end": 3348, "ctxt": 0 }, "value": "x", @@ -8462,7 +8462,7 @@ "type": "Identifier", "span": { "start": 3479, - "end": 3483, + "end": 3480, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints3.json b/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints3.json index 449a556bc76e..addc7d0ca559 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints3.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints3.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 113, - "end": 117, + "end": 114, "ctxt": 0 }, "value": "t", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 119, - "end": 123, + "end": 120, "ctxt": 0 }, "value": "u", @@ -124,7 +124,7 @@ "type": "Identifier", "span": { "start": 125, - "end": 129, + "end": 126, "ctxt": 0 }, "value": "v", diff --git a/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints4.json b/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints4.json index a99c9338324b..864a27700018 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints4.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints4.json @@ -104,7 +104,7 @@ "type": "Identifier", "span": { "start": 154, - "end": 158, + "end": 155, "ctxt": 0 }, "value": "t", @@ -150,7 +150,7 @@ "type": "Identifier", "span": { "start": 160, - "end": 164, + "end": 161, "ctxt": 0 }, "value": "u", @@ -196,7 +196,7 @@ "type": "Identifier", "span": { "start": 166, - "end": 170, + "end": 167, "ctxt": 0 }, "value": "v", diff --git a/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithRecursiveConstraints.json b/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithRecursiveConstraints.json index 5d9bc5910fc8..d49577c9527c 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithRecursiveConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithRecursiveConstraints.json @@ -146,7 +146,7 @@ "type": "Identifier", "span": { "start": 173, - "end": 177, + "end": 174, "ctxt": 0 }, "value": "t", @@ -192,7 +192,7 @@ "type": "Identifier", "span": { "start": 179, - "end": 183, + "end": 180, "ctxt": 0 }, "value": "u", @@ -238,7 +238,7 @@ "type": "Identifier", "span": { "start": 185, - "end": 189, + "end": 186, "ctxt": 0 }, "value": "v", diff --git a/crates/swc_ecma_parser/tests/tsc/subtypesOfUnion.json b/crates/swc_ecma_parser/tests/tsc/subtypesOfUnion.json index 90e9aa695dc2..3c8e71ad43bc 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypesOfUnion.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypesOfUnion.json @@ -1431,7 +1431,7 @@ "type": "Identifier", "span": { "start": 699, - "end": 703, + "end": 700, "ctxt": 0 }, "value": "x", @@ -2605,7 +2605,7 @@ "type": "Identifier", "span": { "start": 1238, - "end": 1242, + "end": 1239, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures.json index 2ceafbd145b1..e00f1e6f6159 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 50, - "end": 73, + "end": 52, "ctxt": 0 }, "value": "cb", @@ -83,7 +83,7 @@ "type": "Identifier", "span": { "start": 55, - "end": 64, + "end": 56, "ctxt": 0 }, "value": "x", @@ -194,7 +194,7 @@ "type": "Identifier", "span": { "start": 113, - "end": 120, + "end": 115, "ctxt": 0 }, "value": "cb", @@ -529,7 +529,7 @@ "type": "Identifier", "span": { "start": 291, - "end": 325, + "end": 293, "ctxt": 0 }, "value": "cb", @@ -553,7 +553,7 @@ "type": "Identifier", "span": { "start": 296, - "end": 305, + "end": 297, "ctxt": 0 }, "value": "x", @@ -580,7 +580,7 @@ "type": "Identifier", "span": { "start": 307, - "end": 316, + "end": 308, "ctxt": 0 }, "value": "y", @@ -691,7 +691,7 @@ "type": "Identifier", "span": { "start": 365, - "end": 372, + "end": 367, "ctxt": 0 }, "value": "cb", diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures2.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures2.json index 0f96571357c8..411dbc985fd1 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures2.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures2.json @@ -347,7 +347,7 @@ "type": "Identifier", "span": { "start": 296, - "end": 322, + "end": 297, "ctxt": 0 }, "value": "a", @@ -371,7 +371,7 @@ "type": "Identifier", "span": { "start": 300, - "end": 309, + "end": 301, "ctxt": 0 }, "value": "x", @@ -490,7 +490,7 @@ "type": "Identifier", "span": { "start": 357, - "end": 363, + "end": 358, "ctxt": 0 }, "value": "a", @@ -569,7 +569,7 @@ "type": "Identifier", "span": { "start": 394, - "end": 420, + "end": 395, "ctxt": 0 }, "value": "a", @@ -593,7 +593,7 @@ "type": "Identifier", "span": { "start": 398, - "end": 407, + "end": 399, "ctxt": 0 }, "value": "x", @@ -712,7 +712,7 @@ "type": "Identifier", "span": { "start": 455, - "end": 461, + "end": 456, "ctxt": 0 }, "value": "a", @@ -791,7 +791,7 @@ "type": "Identifier", "span": { "start": 492, - "end": 514, + "end": 493, "ctxt": 0 }, "value": "a", @@ -815,7 +815,7 @@ "type": "Identifier", "span": { "start": 496, - "end": 505, + "end": 497, "ctxt": 0 }, "value": "x", @@ -926,7 +926,7 @@ "type": "Identifier", "span": { "start": 549, - "end": 555, + "end": 550, "ctxt": 0 }, "value": "a", @@ -1005,7 +1005,7 @@ "type": "Identifier", "span": { "start": 586, - "end": 621, + "end": 587, "ctxt": 0 }, "value": "a", @@ -1029,7 +1029,7 @@ "type": "Identifier", "span": { "start": 590, - "end": 599, + "end": 591, "ctxt": 0 }, "value": "x", @@ -1056,7 +1056,7 @@ "type": "Identifier", "span": { "start": 601, - "end": 610, + "end": 602, "ctxt": 0 }, "value": "y", @@ -1167,7 +1167,7 @@ "type": "Identifier", "span": { "start": 656, - "end": 662, + "end": 657, "ctxt": 0 }, "value": "a", @@ -1246,7 +1246,7 @@ "type": "Identifier", "span": { "start": 693, - "end": 734, + "end": 694, "ctxt": 0 }, "value": "a", @@ -1270,7 +1270,7 @@ "type": "Identifier", "span": { "start": 697, - "end": 723, + "end": 698, "ctxt": 0 }, "value": "x", @@ -1294,7 +1294,7 @@ "type": "Identifier", "span": { "start": 701, - "end": 712, + "end": 704, "ctxt": 0 }, "value": "arg", @@ -1427,7 +1427,7 @@ "type": "Identifier", "span": { "start": 769, - "end": 775, + "end": 770, "ctxt": 0 }, "value": "a", @@ -1506,7 +1506,7 @@ "type": "Identifier", "span": { "start": 806, - "end": 844, + "end": 807, "ctxt": 0 }, "value": "a", @@ -1530,7 +1530,7 @@ "type": "Identifier", "span": { "start": 810, - "end": 835, + "end": 811, "ctxt": 0 }, "value": "x", @@ -1554,7 +1554,7 @@ "type": "Identifier", "span": { "start": 814, - "end": 823, + "end": 817, "ctxt": 0 }, "value": "arg", @@ -1717,7 +1717,7 @@ "type": "Identifier", "span": { "start": 879, - "end": 885, + "end": 880, "ctxt": 0 }, "value": "a", @@ -1796,7 +1796,7 @@ "type": "Identifier", "span": { "start": 916, - "end": 970, + "end": 917, "ctxt": 0 }, "value": "a", @@ -1820,7 +1820,7 @@ "type": "Identifier", "span": { "start": 920, - "end": 945, + "end": 921, "ctxt": 0 }, "value": "x", @@ -1844,7 +1844,7 @@ "type": "Identifier", "span": { "start": 924, - "end": 933, + "end": 927, "ctxt": 0 }, "value": "arg", @@ -1930,7 +1930,7 @@ "type": "Identifier", "span": { "start": 951, - "end": 958, + "end": 952, "ctxt": 0 }, "value": "r", @@ -2063,7 +2063,7 @@ "type": "Identifier", "span": { "start": 1005, - "end": 1011, + "end": 1006, "ctxt": 0 }, "value": "a", @@ -2142,7 +2142,7 @@ "type": "Identifier", "span": { "start": 1042, - "end": 1124, + "end": 1043, "ctxt": 0 }, "value": "a", @@ -2166,7 +2166,7 @@ "type": "Identifier", "span": { "start": 1046, - "end": 1071, + "end": 1047, "ctxt": 0 }, "value": "x", @@ -2190,7 +2190,7 @@ "type": "Identifier", "span": { "start": 1050, - "end": 1059, + "end": 1053, "ctxt": 0 }, "value": "arg", @@ -2259,7 +2259,7 @@ "type": "Identifier", "span": { "start": 1073, - "end": 1099, + "end": 1074, "ctxt": 0 }, "value": "y", @@ -2283,7 +2283,7 @@ "type": "Identifier", "span": { "start": 1077, - "end": 1087, + "end": 1081, "ctxt": 0 }, "value": "arg2", @@ -2369,7 +2369,7 @@ "type": "Identifier", "span": { "start": 1105, - "end": 1112, + "end": 1106, "ctxt": 0 }, "value": "r", @@ -2502,7 +2502,7 @@ "type": "Identifier", "span": { "start": 1159, - "end": 1165, + "end": 1160, "ctxt": 0 }, "value": "a", @@ -2581,7 +2581,7 @@ "type": "Identifier", "span": { "start": 1196, - "end": 1278, + "end": 1197, "ctxt": 0 }, "value": "a", @@ -2605,7 +2605,7 @@ "type": "Identifier", "span": { "start": 1200, - "end": 1225, + "end": 1201, "ctxt": 0 }, "value": "x", @@ -2629,7 +2629,7 @@ "type": "Identifier", "span": { "start": 1204, - "end": 1213, + "end": 1207, "ctxt": 0 }, "value": "arg", @@ -2698,7 +2698,7 @@ "type": "Identifier", "span": { "start": 1227, - "end": 1253, + "end": 1228, "ctxt": 0 }, "value": "y", @@ -2722,7 +2722,7 @@ "type": "Identifier", "span": { "start": 1231, - "end": 1241, + "end": 1235, "ctxt": 0 }, "value": "arg2", @@ -2808,7 +2808,7 @@ "type": "Identifier", "span": { "start": 1259, - "end": 1266, + "end": 1260, "ctxt": 0 }, "value": "r", @@ -2941,7 +2941,7 @@ "type": "Identifier", "span": { "start": 1313, - "end": 1319, + "end": 1314, "ctxt": 0 }, "value": "a", @@ -3020,7 +3020,7 @@ "type": "Identifier", "span": { "start": 1351, - "end": 1382, + "end": 1352, "ctxt": 0 }, "value": "a", @@ -3197,7 +3197,7 @@ "type": "Identifier", "span": { "start": 1418, - "end": 1424, + "end": 1419, "ctxt": 0 }, "value": "a", @@ -3276,7 +3276,7 @@ "type": "Identifier", "span": { "start": 1456, - "end": 1520, + "end": 1457, "ctxt": 0 }, "value": "a", @@ -3300,7 +3300,7 @@ "type": "Identifier", "span": { "start": 1460, - "end": 1478, + "end": 1461, "ctxt": 0 }, "value": "x", @@ -3369,7 +3369,7 @@ "type": "Identifier", "span": { "start": 1480, - "end": 1511, + "end": 1481, "ctxt": 0 }, "value": "y", @@ -3573,7 +3573,7 @@ "type": "Identifier", "span": { "start": 1556, - "end": 1562, + "end": 1557, "ctxt": 0 }, "value": "a", @@ -3652,7 +3652,7 @@ "type": "Identifier", "span": { "start": 1594, - "end": 1651, + "end": 1595, "ctxt": 0 }, "value": "a", @@ -3676,7 +3676,7 @@ "type": "Identifier", "span": { "start": 1598, - "end": 1612, + "end": 1599, "ctxt": 0 }, "value": "x", @@ -3741,7 +3741,7 @@ "type": "Identifier", "span": { "start": 1614, - "end": 1632, + "end": 1615, "ctxt": 0 }, "value": "y", @@ -3928,7 +3928,7 @@ "type": "Identifier", "span": { "start": 1687, - "end": 1693, + "end": 1688, "ctxt": 0 }, "value": "a", @@ -4007,7 +4007,7 @@ "type": "Identifier", "span": { "start": 1725, - "end": 1781, + "end": 1726, "ctxt": 0 }, "value": "a", @@ -4031,7 +4031,7 @@ "type": "Identifier", "span": { "start": 1729, - "end": 1743, + "end": 1730, "ctxt": 0 }, "value": "x", @@ -4096,7 +4096,7 @@ "type": "Identifier", "span": { "start": 1745, - "end": 1762, + "end": 1746, "ctxt": 0 }, "value": "y", @@ -4283,7 +4283,7 @@ "type": "Identifier", "span": { "start": 1817, - "end": 1823, + "end": 1818, "ctxt": 0 }, "value": "a", @@ -4362,7 +4362,7 @@ "type": "Identifier", "span": { "start": 1855, - "end": 1897, + "end": 1856, "ctxt": 0 }, "value": "a", @@ -4386,7 +4386,7 @@ "type": "Identifier", "span": { "start": 1859, - "end": 1886, + "end": 1860, "ctxt": 0 }, "value": "x", @@ -4590,7 +4590,7 @@ "type": "Identifier", "span": { "start": 1933, - "end": 1939, + "end": 1934, "ctxt": 0 }, "value": "a", @@ -4669,7 +4669,7 @@ "type": "Identifier", "span": { "start": 1971, - "end": 2033, + "end": 1972, "ctxt": 0 }, "value": "a", @@ -4701,7 +4701,7 @@ "type": "Identifier", "span": { "start": 1982, - "end": 1991, + "end": 1983, "ctxt": 0 }, "value": "x", @@ -4764,7 +4764,7 @@ "type": "Identifier", "span": { "start": 2009, - "end": 2018, + "end": 2010, "ctxt": 0 }, "value": "x", @@ -4885,7 +4885,7 @@ "type": "Identifier", "span": { "start": 2069, - "end": 2075, + "end": 2070, "ctxt": 0 }, "value": "a", @@ -4964,7 +4964,7 @@ "type": "Identifier", "span": { "start": 2107, - "end": 2192, + "end": 2108, "ctxt": 0 }, "value": "a", @@ -4996,7 +4996,7 @@ "type": "Identifier", "span": { "start": 2136, - "end": 2140, + "end": 2137, "ctxt": 0 }, "value": "x", @@ -5119,7 +5119,7 @@ "type": "Identifier", "span": { "start": 2174, - "end": 2178, + "end": 2175, "ctxt": 0 }, "value": "x", @@ -5300,7 +5300,7 @@ "type": "Identifier", "span": { "start": 2228, - "end": 2234, + "end": 2229, "ctxt": 0 }, "value": "a", @@ -5379,7 +5379,7 @@ "type": "Identifier", "span": { "start": 2266, - "end": 2356, + "end": 2267, "ctxt": 0 }, "value": "a", @@ -5411,7 +5411,7 @@ "type": "Identifier", "span": { "start": 2276, - "end": 2300, + "end": 2277, "ctxt": 0 }, "value": "x", @@ -5435,7 +5435,7 @@ "type": "Identifier", "span": { "start": 2280, - "end": 2289, + "end": 2281, "ctxt": 0 }, "value": "a", @@ -5520,7 +5520,7 @@ "type": "Identifier", "span": { "start": 2318, - "end": 2342, + "end": 2319, "ctxt": 0 }, "value": "x", @@ -5544,7 +5544,7 @@ "type": "Identifier", "span": { "start": 2322, - "end": 2331, + "end": 2323, "ctxt": 0 }, "value": "a", @@ -5687,7 +5687,7 @@ "type": "Identifier", "span": { "start": 2392, - "end": 2398, + "end": 2393, "ctxt": 0 }, "value": "a", @@ -5766,7 +5766,7 @@ "type": "Identifier", "span": { "start": 2430, - "end": 2600, + "end": 2431, "ctxt": 0 }, "value": "a", @@ -5798,7 +5798,7 @@ "type": "Identifier", "span": { "start": 2440, - "end": 2508, + "end": 2441, "ctxt": 0 }, "value": "x", @@ -5830,7 +5830,7 @@ "type": "Identifier", "span": { "start": 2454, - "end": 2463, + "end": 2455, "ctxt": 0 }, "value": "a", @@ -5885,7 +5885,7 @@ "type": "Identifier", "span": { "start": 2483, - "end": 2492, + "end": 2484, "ctxt": 0 }, "value": "a", @@ -5972,7 +5972,7 @@ "type": "Identifier", "span": { "start": 2523, - "end": 2589, + "end": 2524, "ctxt": 0 }, "value": "x", @@ -6004,7 +6004,7 @@ "type": "Identifier", "span": { "start": 2537, - "end": 2547, + "end": 2538, "ctxt": 0 }, "value": "a", @@ -6059,7 +6059,7 @@ "type": "Identifier", "span": { "start": 2568, - "end": 2575, + "end": 2569, "ctxt": 0 }, "value": "a", @@ -6224,7 +6224,7 @@ "type": "Identifier", "span": { "start": 2636, - "end": 2642, + "end": 2637, "ctxt": 0 }, "value": "a", @@ -8119,7 +8119,7 @@ "type": "Identifier", "span": { "start": 3430, - "end": 3436, + "end": 3433, "ctxt": 0 }, "value": "arg", @@ -8348,7 +8348,7 @@ "type": "Identifier", "span": { "start": 3474, - "end": 3485, + "end": 3477, "ctxt": 0 }, "value": "arg", @@ -8679,7 +8679,7 @@ "type": "Identifier", "span": { "start": 3645, - "end": 3651, + "end": 3648, "ctxt": 0 }, "value": "arg", @@ -8944,7 +8944,7 @@ "type": "Identifier", "span": { "start": 3689, - "end": 3698, + "end": 3692, "ctxt": 0 }, "value": "arg", @@ -9320,7 +9320,7 @@ "type": "Identifier", "span": { "start": 3867, - "end": 3873, + "end": 3870, "ctxt": 0 }, "value": "arg", @@ -9636,7 +9636,7 @@ "type": "Identifier", "span": { "start": 3921, - "end": 3930, + "end": 3924, "ctxt": 0 }, "value": "arg", @@ -10063,7 +10063,7 @@ "type": "Identifier", "span": { "start": 4115, - "end": 4121, + "end": 4118, "ctxt": 0 }, "value": "arg", @@ -10156,7 +10156,7 @@ "type": "Identifier", "span": { "start": 4133, - "end": 4140, + "end": 4137, "ctxt": 0 }, "value": "arg2", @@ -10472,7 +10472,7 @@ "type": "Identifier", "span": { "start": 4188, - "end": 4197, + "end": 4191, "ctxt": 0 }, "value": "arg", @@ -10565,7 +10565,7 @@ "type": "Identifier", "span": { "start": 4215, - "end": 4225, + "end": 4219, "ctxt": 0 }, "value": "arg2", @@ -10992,7 +10992,7 @@ "type": "Identifier", "span": { "start": 4410, - "end": 4416, + "end": 4413, "ctxt": 0 }, "value": "arg", @@ -11085,7 +11085,7 @@ "type": "Identifier", "span": { "start": 4428, - "end": 4463, + "end": 4432, "ctxt": 0 }, "value": "arg2", @@ -11474,7 +11474,7 @@ "type": "Identifier", "span": { "start": 4511, - "end": 4520, + "end": 4514, "ctxt": 0 }, "value": "arg", @@ -11567,7 +11567,7 @@ "type": "Identifier", "span": { "start": 4538, - "end": 4548, + "end": 4542, "ctxt": 0 }, "value": "arg2", @@ -15651,7 +15651,7 @@ "type": "Identifier", "span": { "start": 5971, - "end": 5975, + "end": 5972, "ctxt": 0 }, "value": "a", @@ -15931,7 +15931,7 @@ "type": "Identifier", "span": { "start": 6052, - "end": 6056, + "end": 6053, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures3.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures3.json index 138c7e4fafc0..de7e2a85d3f8 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures3.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures3.json @@ -374,7 +374,7 @@ "type": "Identifier", "span": { "start": 391, - "end": 418, + "end": 393, "ctxt": 0 }, "value": "a2", @@ -398,7 +398,7 @@ "type": "Identifier", "span": { "start": 396, - "end": 405, + "end": 397, "ctxt": 0 }, "value": "x", @@ -517,7 +517,7 @@ "type": "Identifier", "span": { "start": 458, - "end": 465, + "end": 460, "ctxt": 0 }, "value": "a2", @@ -596,7 +596,7 @@ "type": "Identifier", "span": { "start": 500, - "end": 556, + "end": 502, "ctxt": 0 }, "value": "a2", @@ -620,7 +620,7 @@ "type": "Identifier", "span": { "start": 505, - "end": 530, + "end": 506, "ctxt": 0 }, "value": "x", @@ -644,7 +644,7 @@ "type": "Identifier", "span": { "start": 509, - "end": 518, + "end": 512, "ctxt": 0 }, "value": "arg", @@ -730,7 +730,7 @@ "type": "Identifier", "span": { "start": 536, - "end": 543, + "end": 537, "ctxt": 0 }, "value": "r", @@ -863,7 +863,7 @@ "type": "Identifier", "span": { "start": 596, - "end": 603, + "end": 598, "ctxt": 0 }, "value": "a2", @@ -942,7 +942,7 @@ "type": "Identifier", "span": { "start": 638, - "end": 721, + "end": 640, "ctxt": 0 }, "value": "a2", @@ -966,7 +966,7 @@ "type": "Identifier", "span": { "start": 643, - "end": 668, + "end": 644, "ctxt": 0 }, "value": "x", @@ -990,7 +990,7 @@ "type": "Identifier", "span": { "start": 647, - "end": 656, + "end": 650, "ctxt": 0 }, "value": "arg", @@ -1059,7 +1059,7 @@ "type": "Identifier", "span": { "start": 670, - "end": 696, + "end": 671, "ctxt": 0 }, "value": "y", @@ -1083,7 +1083,7 @@ "type": "Identifier", "span": { "start": 674, - "end": 684, + "end": 678, "ctxt": 0 }, "value": "arg2", @@ -1169,7 +1169,7 @@ "type": "Identifier", "span": { "start": 702, - "end": 709, + "end": 703, "ctxt": 0 }, "value": "r", @@ -1302,7 +1302,7 @@ "type": "Identifier", "span": { "start": 761, - "end": 768, + "end": 763, "ctxt": 0 }, "value": "a2", @@ -1381,7 +1381,7 @@ "type": "Identifier", "span": { "start": 804, - "end": 830, + "end": 806, "ctxt": 0 }, "value": "a2", @@ -1558,7 +1558,7 @@ "type": "Identifier", "span": { "start": 871, - "end": 878, + "end": 873, "ctxt": 0 }, "value": "a2", @@ -1637,7 +1637,7 @@ "type": "Identifier", "span": { "start": 914, - "end": 979, + "end": 916, "ctxt": 0 }, "value": "a2", @@ -1661,7 +1661,7 @@ "type": "Identifier", "span": { "start": 919, - "end": 937, + "end": 920, "ctxt": 0 }, "value": "x", @@ -1730,7 +1730,7 @@ "type": "Identifier", "span": { "start": 939, - "end": 970, + "end": 940, "ctxt": 0 }, "value": "y", @@ -1934,7 +1934,7 @@ "type": "Identifier", "span": { "start": 1020, - "end": 1027, + "end": 1022, "ctxt": 0 }, "value": "a2", @@ -2013,7 +2013,7 @@ "type": "Identifier", "span": { "start": 1063, - "end": 1121, + "end": 1065, "ctxt": 0 }, "value": "a2", @@ -2037,7 +2037,7 @@ "type": "Identifier", "span": { "start": 1068, - "end": 1082, + "end": 1069, "ctxt": 0 }, "value": "x", @@ -2102,7 +2102,7 @@ "type": "Identifier", "span": { "start": 1084, - "end": 1102, + "end": 1085, "ctxt": 0 }, "value": "y", @@ -2289,7 +2289,7 @@ "type": "Identifier", "span": { "start": 1162, - "end": 1169, + "end": 1164, "ctxt": 0 }, "value": "a2", @@ -2368,7 +2368,7 @@ "type": "Identifier", "span": { "start": 1205, - "end": 1248, + "end": 1207, "ctxt": 0 }, "value": "a2", @@ -2392,7 +2392,7 @@ "type": "Identifier", "span": { "start": 1210, - "end": 1237, + "end": 1211, "ctxt": 0 }, "value": "x", @@ -2586,7 +2586,7 @@ "type": "Identifier", "span": { "start": 1289, - "end": 1296, + "end": 1291, "ctxt": 0 }, "value": "a2", @@ -2665,7 +2665,7 @@ "type": "Identifier", "span": { "start": 1332, - "end": 1652, + "end": 1334, "ctxt": 0 }, "value": "a2", @@ -2697,7 +2697,7 @@ "type": "Identifier", "span": { "start": 1445, - "end": 1526, + "end": 1446, "ctxt": 0 }, "value": "x", @@ -2729,7 +2729,7 @@ "type": "Identifier", "span": { "start": 1463, - "end": 1472, + "end": 1464, "ctxt": 0 }, "value": "a", @@ -2784,7 +2784,7 @@ "type": "Identifier", "span": { "start": 1496, - "end": 1506, + "end": 1497, "ctxt": 0 }, "value": "a", @@ -2871,7 +2871,7 @@ "type": "Identifier", "span": { "start": 1548, - "end": 1633, + "end": 1549, "ctxt": 0 }, "value": "x", @@ -2903,7 +2903,7 @@ "type": "Identifier", "span": { "start": 1566, - "end": 1576, + "end": 1567, "ctxt": 0 }, "value": "a", @@ -2958,7 +2958,7 @@ "type": "Identifier", "span": { "start": 1601, - "end": 1612, + "end": 1602, "ctxt": 0 }, "value": "a", @@ -3103,7 +3103,7 @@ "type": "Identifier", "span": { "start": 1693, - "end": 1700, + "end": 1695, "ctxt": 0 }, "value": "a2", @@ -3182,7 +3182,7 @@ "type": "Identifier", "span": { "start": 1736, - "end": 1976, + "end": 1738, "ctxt": 0 }, "value": "a2", @@ -3214,7 +3214,7 @@ "type": "Identifier", "span": { "start": 1751, - "end": 1846, + "end": 1752, "ctxt": 0 }, "value": "x", @@ -3246,7 +3246,7 @@ "type": "Identifier", "span": { "start": 1788, - "end": 1792, + "end": 1789, "ctxt": 0 }, "value": "a", @@ -3371,7 +3371,7 @@ "type": "Identifier", "span": { "start": 1827, - "end": 1831, + "end": 1828, "ctxt": 0 }, "value": "a", @@ -3528,7 +3528,7 @@ "type": "Identifier", "span": { "start": 1865, - "end": 1961, + "end": 1866, "ctxt": 0 }, "value": "x", @@ -3560,7 +3560,7 @@ "type": "Identifier", "span": { "start": 1903, - "end": 1907, + "end": 1904, "ctxt": 0 }, "value": "a", @@ -3685,7 +3685,7 @@ "type": "Identifier", "span": { "start": 1942, - "end": 1946, + "end": 1943, "ctxt": 0 }, "value": "a", @@ -3900,7 +3900,7 @@ "type": "Identifier", "span": { "start": 2017, - "end": 2024, + "end": 2019, "ctxt": 0 }, "value": "a2", @@ -4744,7 +4744,7 @@ "type": "Identifier", "span": { "start": 2291, - "end": 2297, + "end": 2294, "ctxt": 0 }, "value": "arg", @@ -5101,7 +5101,7 @@ "type": "Identifier", "span": { "start": 2349, - "end": 2358, + "end": 2352, "ctxt": 0 }, "value": "arg", @@ -5528,7 +5528,7 @@ "type": "Identifier", "span": { "start": 2556, - "end": 2562, + "end": 2559, "ctxt": 0 }, "value": "arg", @@ -5621,7 +5621,7 @@ "type": "Identifier", "span": { "start": 2574, - "end": 2596, + "end": 2578, "ctxt": 0 }, "value": "arg2", @@ -5969,7 +5969,7 @@ "type": "Identifier", "span": { "start": 2648, - "end": 2657, + "end": 2651, "ctxt": 0 }, "value": "arg", @@ -6062,7 +6062,7 @@ "type": "Identifier", "span": { "start": 2675, - "end": 2685, + "end": 2679, "ctxt": 0 }, "value": "arg2", @@ -9467,7 +9467,7 @@ "type": "Identifier", "span": { "start": 4018, - "end": 4022, + "end": 4019, "ctxt": 0 }, "value": "a", @@ -9747,7 +9747,7 @@ "type": "Identifier", "span": { "start": 4103, - "end": 4107, + "end": 4104, "ctxt": 0 }, "value": "a", @@ -10009,7 +10009,7 @@ "type": "Identifier", "span": { "start": 4382, - "end": 4402, + "end": 4384, "ctxt": 0 }, "value": "a2", @@ -10033,7 +10033,7 @@ "type": "Identifier", "span": { "start": 4390, - "end": 4394, + "end": 4391, "ctxt": 0 }, "value": "x", @@ -10204,7 +10204,7 @@ "type": "Identifier", "span": { "start": 4442, - "end": 4449, + "end": 4444, "ctxt": 0 }, "value": "a2", @@ -10487,7 +10487,7 @@ "type": "Identifier", "span": { "start": 4613, - "end": 4638, + "end": 4615, "ctxt": 0 }, "value": "a2", @@ -10511,7 +10511,7 @@ "type": "Identifier", "span": { "start": 4621, - "end": 4625, + "end": 4622, "ctxt": 0 }, "value": "x", @@ -10672,7 +10672,7 @@ "type": "Identifier", "span": { "start": 4678, - "end": 4685, + "end": 4680, "ctxt": 0 }, "value": "a2", diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures4.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures4.json index 9cadf14996ee..914c13fe4fc5 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures4.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures4.json @@ -347,7 +347,7 @@ "type": "Identifier", "span": { "start": 296, - "end": 315, + "end": 297, "ctxt": 0 }, "value": "a", @@ -371,7 +371,7 @@ "type": "Identifier", "span": { "start": 303, - "end": 307, + "end": 304, "ctxt": 0 }, "value": "x", @@ -516,7 +516,7 @@ "type": "Identifier", "span": { "start": 340, - "end": 346, + "end": 341, "ctxt": 0 }, "value": "a", @@ -595,7 +595,7 @@ "type": "Identifier", "span": { "start": 377, - "end": 402, + "end": 379, "ctxt": 0 }, "value": "a2", @@ -619,7 +619,7 @@ "type": "Identifier", "span": { "start": 385, - "end": 389, + "end": 386, "ctxt": 0 }, "value": "x", @@ -754,7 +754,7 @@ "type": "Identifier", "span": { "start": 427, - "end": 433, + "end": 428, "ctxt": 0 }, "value": "a", @@ -833,7 +833,7 @@ "type": "Identifier", "span": { "start": 464, - "end": 485, + "end": 466, "ctxt": 0 }, "value": "a3", @@ -857,7 +857,7 @@ "type": "Identifier", "span": { "start": 472, - "end": 476, + "end": 473, "ctxt": 0 }, "value": "x", @@ -984,7 +984,7 @@ "type": "Identifier", "span": { "start": 510, - "end": 516, + "end": 511, "ctxt": 0 }, "value": "a", @@ -1063,7 +1063,7 @@ "type": "Identifier", "span": { "start": 547, - "end": 579, + "end": 549, "ctxt": 0 }, "value": "a4", @@ -1087,7 +1087,7 @@ "type": "Identifier", "span": { "start": 558, - "end": 562, + "end": 559, "ctxt": 0 }, "value": "x", @@ -1124,7 +1124,7 @@ "type": "Identifier", "span": { "start": 564, - "end": 568, + "end": 565, "ctxt": 0 }, "value": "y", @@ -1274,7 +1274,7 @@ "type": "Identifier", "span": { "start": 604, - "end": 610, + "end": 605, "ctxt": 0 }, "value": "a", @@ -1353,7 +1353,7 @@ "type": "Identifier", "span": { "start": 641, - "end": 674, + "end": 643, "ctxt": 0 }, "value": "a5", @@ -1377,7 +1377,7 @@ "type": "Identifier", "span": { "start": 652, - "end": 668, + "end": 653, "ctxt": 0 }, "value": "x", @@ -1401,7 +1401,7 @@ "type": "Identifier", "span": { "start": 656, - "end": 662, + "end": 659, "ctxt": 0 }, "value": "arg", @@ -1593,7 +1593,7 @@ "type": "Identifier", "span": { "start": 699, - "end": 705, + "end": 700, "ctxt": 0 }, "value": "a", @@ -1672,7 +1672,7 @@ "type": "Identifier", "span": { "start": 736, - "end": 785, + "end": 738, "ctxt": 0 }, "value": "a6", @@ -1696,7 +1696,7 @@ "type": "Identifier", "span": { "start": 757, - "end": 779, + "end": 758, "ctxt": 0 }, "value": "x", @@ -1720,7 +1720,7 @@ "type": "Identifier", "span": { "start": 761, - "end": 767, + "end": 764, "ctxt": 0 }, "value": "arg", @@ -1907,7 +1907,7 @@ "type": "Identifier", "span": { "start": 810, - "end": 816, + "end": 811, "ctxt": 0 }, "value": "a", @@ -1986,7 +1986,7 @@ "type": "Identifier", "span": { "start": 848, - "end": 902, + "end": 851, "ctxt": 0 }, "value": "a11", @@ -2010,7 +2010,7 @@ "type": "Identifier", "span": { "start": 857, - "end": 870, + "end": 858, "ctxt": 0 }, "value": "x", @@ -2089,7 +2089,7 @@ "type": "Identifier", "span": { "start": 872, - "end": 893, + "end": 873, "ctxt": 0 }, "value": "y", @@ -2319,7 +2319,7 @@ "type": "Identifier", "span": { "start": 928, - "end": 934, + "end": 929, "ctxt": 0 }, "value": "a", @@ -2398,7 +2398,7 @@ "type": "Identifier", "span": { "start": 966, - "end": 1000, + "end": 969, "ctxt": 0 }, "value": "a15", @@ -2422,7 +2422,7 @@ "type": "Identifier", "span": { "start": 975, - "end": 992, + "end": 976, "ctxt": 0 }, "value": "x", @@ -2660,7 +2660,7 @@ "type": "Identifier", "span": { "start": 1026, - "end": 1032, + "end": 1027, "ctxt": 0 }, "value": "a", @@ -2739,7 +2739,7 @@ "type": "Identifier", "span": { "start": 1064, - "end": 1111, + "end": 1067, "ctxt": 0 }, "value": "a16", @@ -2763,7 +2763,7 @@ "type": "Identifier", "span": { "start": 1086, - "end": 1103, + "end": 1087, "ctxt": 0 }, "value": "x", @@ -3019,7 +3019,7 @@ "type": "Identifier", "span": { "start": 1137, - "end": 1143, + "end": 1138, "ctxt": 0 }, "value": "a", @@ -3098,7 +3098,7 @@ "type": "Identifier", "span": { "start": 1175, - "end": 1280, + "end": 1178, "ctxt": 0 }, "value": "a17", @@ -3130,7 +3130,7 @@ "type": "Identifier", "span": { "start": 1206, - "end": 1220, + "end": 1207, "ctxt": 0 }, "value": "x", @@ -3154,7 +3154,7 @@ "type": "Identifier", "span": { "start": 1210, - "end": 1214, + "end": 1211, "ctxt": 0 }, "value": "a", @@ -3319,7 +3319,7 @@ "type": "Identifier", "span": { "start": 1249, - "end": 1263, + "end": 1250, "ctxt": 0 }, "value": "x", @@ -3343,7 +3343,7 @@ "type": "Identifier", "span": { "start": 1253, - "end": 1257, + "end": 1254, "ctxt": 0 }, "value": "a", @@ -3540,7 +3540,7 @@ "type": "Identifier", "span": { "start": 1306, - "end": 1312, + "end": 1307, "ctxt": 0 }, "value": "a", @@ -3619,7 +3619,7 @@ "type": "Identifier", "span": { "start": 1344, - "end": 1549, + "end": 1347, "ctxt": 0 }, "value": "a18", @@ -3651,7 +3651,7 @@ "type": "Identifier", "span": { "start": 1356, - "end": 1439, + "end": 1357, "ctxt": 0 }, "value": "x", @@ -3683,7 +3683,7 @@ "type": "Identifier", "span": { "start": 1389, - "end": 1393, + "end": 1390, "ctxt": 0 }, "value": "a", @@ -3808,7 +3808,7 @@ "type": "Identifier", "span": { "start": 1424, - "end": 1428, + "end": 1425, "ctxt": 0 }, "value": "a", @@ -3965,7 +3965,7 @@ "type": "Identifier", "span": { "start": 1454, - "end": 1538, + "end": 1455, "ctxt": 0 }, "value": "x", @@ -3997,7 +3997,7 @@ "type": "Identifier", "span": { "start": 1488, - "end": 1492, + "end": 1489, "ctxt": 0 }, "value": "a", @@ -4122,7 +4122,7 @@ "type": "Identifier", "span": { "start": 1523, - "end": 1527, + "end": 1524, "ctxt": 0 }, "value": "a", @@ -4311,7 +4311,7 @@ "type": "Identifier", "span": { "start": 1575, - "end": 1581, + "end": 1576, "ctxt": 0 }, "value": "a", @@ -6472,7 +6472,7 @@ "type": "Identifier", "span": { "start": 2199, - "end": 2205, + "end": 2202, "ctxt": 0 }, "value": "arg", @@ -6701,7 +6701,7 @@ "type": "Identifier", "span": { "start": 2249, - "end": 2255, + "end": 2252, "ctxt": 0 }, "value": "arg", @@ -7132,7 +7132,7 @@ "type": "Identifier", "span": { "start": 2404, - "end": 2410, + "end": 2407, "ctxt": 0 }, "value": "arg", @@ -7397,7 +7397,7 @@ "type": "Identifier", "span": { "start": 2464, - "end": 2470, + "end": 2467, "ctxt": 0 }, "value": "arg", @@ -10159,7 +10159,7 @@ "type": "Identifier", "span": { "start": 3228, - "end": 3232, + "end": 3229, "ctxt": 0 }, "value": "a", @@ -10439,7 +10439,7 @@ "type": "Identifier", "span": { "start": 3301, - "end": 3305, + "end": 3302, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesA.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesA.json index d83e77680fcc..98b80c468a68 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesA.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesA.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 23, - "end": 48, + "end": 25, "ctxt": 0 }, "value": "cb", @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 28, - "end": 37, + "end": 29, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesWithOptionalParameters.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesWithOptionalParameters.json index be7eb3c2187b..27c535abdbd8 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesWithOptionalParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesWithOptionalParameters.json @@ -134,7 +134,7 @@ "type": "Identifier", "span": { "start": 151, - "end": 161, + "end": 152, "ctxt": 0 }, "value": "x", @@ -221,7 +221,7 @@ "type": "Identifier", "span": { "start": 183, - "end": 192, + "end": 184, "ctxt": 0 }, "value": "x", @@ -308,7 +308,7 @@ "type": "Identifier", "span": { "start": 214, - "end": 223, + "end": 215, "ctxt": 0 }, "value": "x", @@ -335,7 +335,7 @@ "type": "Identifier", "span": { "start": 225, - "end": 235, + "end": 226, "ctxt": 0 }, "value": "y", @@ -422,7 +422,7 @@ "type": "Identifier", "span": { "start": 257, - "end": 267, + "end": 258, "ctxt": 0 }, "value": "x", @@ -449,7 +449,7 @@ "type": "Identifier", "span": { "start": 269, - "end": 279, + "end": 270, "ctxt": 0 }, "value": "y", @@ -697,7 +697,7 @@ "type": "Identifier", "span": { "start": 421, - "end": 431, + "end": 422, "ctxt": 0 }, "value": "x", @@ -835,7 +835,7 @@ "type": "Identifier", "span": { "start": 521, - "end": 530, + "end": 522, "ctxt": 0 }, "value": "x", @@ -1083,7 +1083,7 @@ "type": "Identifier", "span": { "start": 710, - "end": 720, + "end": 711, "ctxt": 0 }, "value": "x", @@ -1221,7 +1221,7 @@ "type": "Identifier", "span": { "start": 811, - "end": 820, + "end": 812, "ctxt": 0 }, "value": "x", @@ -1469,7 +1469,7 @@ "type": "Identifier", "span": { "start": 985, - "end": 995, + "end": 986, "ctxt": 0 }, "value": "x", @@ -1607,7 +1607,7 @@ "type": "Identifier", "span": { "start": 1077, - "end": 1086, + "end": 1078, "ctxt": 0 }, "value": "x", @@ -1745,7 +1745,7 @@ "type": "Identifier", "span": { "start": 1178, - "end": 1187, + "end": 1179, "ctxt": 0 }, "value": "x", @@ -1772,7 +1772,7 @@ "type": "Identifier", "span": { "start": 1189, - "end": 1198, + "end": 1190, "ctxt": 0 }, "value": "y", @@ -2020,7 +2020,7 @@ "type": "Identifier", "span": { "start": 1372, - "end": 1382, + "end": 1373, "ctxt": 0 }, "value": "x", @@ -2047,7 +2047,7 @@ "type": "Identifier", "span": { "start": 1384, - "end": 1394, + "end": 1385, "ctxt": 0 }, "value": "y", @@ -2185,7 +2185,7 @@ "type": "Identifier", "span": { "start": 1477, - "end": 1486, + "end": 1478, "ctxt": 0 }, "value": "x", @@ -2323,7 +2323,7 @@ "type": "Identifier", "span": { "start": 1578, - "end": 1587, + "end": 1579, "ctxt": 0 }, "value": "x", @@ -2350,7 +2350,7 @@ "type": "Identifier", "span": { "start": 1589, - "end": 1598, + "end": 1590, "ctxt": 0 }, "value": "y", @@ -2598,7 +2598,7 @@ "type": "Identifier", "span": { "start": 1766, - "end": 1776, + "end": 1767, "ctxt": 0 }, "value": "x", @@ -2625,7 +2625,7 @@ "type": "Identifier", "span": { "start": 1778, - "end": 1788, + "end": 1779, "ctxt": 0 }, "value": "y", @@ -2763,7 +2763,7 @@ "type": "Identifier", "span": { "start": 1871, - "end": 1880, + "end": 1872, "ctxt": 0 }, "value": "x", @@ -2901,7 +2901,7 @@ "type": "Identifier", "span": { "start": 1966, - "end": 1975, + "end": 1967, "ctxt": 0 }, "value": "x", @@ -2928,7 +2928,7 @@ "type": "Identifier", "span": { "start": 1977, - "end": 1986, + "end": 1978, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesWithRestParameters.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesWithRestParameters.json index 5761f134c45b..f58a727a5815 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesWithRestParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesWithRestParameters.json @@ -184,7 +184,7 @@ "type": "Identifier", "span": { "start": 168, - "end": 177, + "end": 169, "ctxt": 0 }, "value": "x", @@ -320,7 +320,7 @@ "type": "Identifier", "span": { "start": 215, - "end": 224, + "end": 216, "ctxt": 0 }, "value": "x", @@ -347,7 +347,7 @@ "type": "Identifier", "span": { "start": 226, - "end": 236, + "end": 227, "ctxt": 0 }, "value": "y", @@ -483,7 +483,7 @@ "type": "Identifier", "span": { "start": 274, - "end": 284, + "end": 275, "ctxt": 0 }, "value": "x", @@ -510,7 +510,7 @@ "type": "Identifier", "span": { "start": 286, - "end": 296, + "end": 287, "ctxt": 0 }, "value": "y", @@ -1127,7 +1127,7 @@ "type": "Identifier", "span": { "start": 656, - "end": 666, + "end": 657, "ctxt": 0 }, "value": "x", @@ -1265,7 +1265,7 @@ "type": "Identifier", "span": { "start": 757, - "end": 767, + "end": 758, "ctxt": 0 }, "value": "x", @@ -1292,7 +1292,7 @@ "type": "Identifier", "span": { "start": 769, - "end": 779, + "end": 770, "ctxt": 0 }, "value": "y", @@ -1319,7 +1319,7 @@ "type": "Identifier", "span": { "start": 781, - "end": 791, + "end": 782, "ctxt": 0 }, "value": "z", @@ -1457,7 +1457,7 @@ "type": "Identifier", "span": { "start": 881, - "end": 890, + "end": 882, "ctxt": 0 }, "value": "x", @@ -1595,7 +1595,7 @@ "type": "Identifier", "span": { "start": 975, - "end": 985, + "end": 976, "ctxt": 0 }, "value": "x", @@ -2003,7 +2003,7 @@ "type": "Identifier", "span": { "start": 1250, - "end": 1260, + "end": 1251, "ctxt": 0 }, "value": "x", @@ -2141,7 +2141,7 @@ "type": "Identifier", "span": { "start": 1342, - "end": 1351, + "end": 1343, "ctxt": 0 }, "value": "x", @@ -2279,7 +2279,7 @@ "type": "Identifier", "span": { "start": 1443, - "end": 1452, + "end": 1444, "ctxt": 0 }, "value": "x", @@ -2466,7 +2466,7 @@ "type": "Identifier", "span": { "start": 1563, - "end": 1572, + "end": 1564, "ctxt": 0 }, "value": "x", @@ -2653,7 +2653,7 @@ "type": "Identifier", "span": { "start": 1654, - "end": 1663, + "end": 1655, "ctxt": 0 }, "value": "x", @@ -2680,7 +2680,7 @@ "type": "Identifier", "span": { "start": 1665, - "end": 1674, + "end": 1666, "ctxt": 0 }, "value": "y", @@ -2818,7 +2818,7 @@ "type": "Identifier", "span": { "start": 1760, - "end": 1769, + "end": 1761, "ctxt": 0 }, "value": "x", @@ -2845,7 +2845,7 @@ "type": "Identifier", "span": { "start": 1771, - "end": 1781, + "end": 1772, "ctxt": 0 }, "value": "y", @@ -3093,7 +3093,7 @@ "type": "Identifier", "span": { "start": 1956, - "end": 1966, + "end": 1957, "ctxt": 0 }, "value": "x", @@ -3231,7 +3231,7 @@ "type": "Identifier", "span": { "start": 2048, - "end": 2057, + "end": 2049, "ctxt": 0 }, "value": "x", @@ -3369,7 +3369,7 @@ "type": "Identifier", "span": { "start": 2149, - "end": 2158, + "end": 2150, "ctxt": 0 }, "value": "x", @@ -3396,7 +3396,7 @@ "type": "Identifier", "span": { "start": 2160, - "end": 2169, + "end": 2161, "ctxt": 0 }, "value": "y", @@ -3534,7 +3534,7 @@ "type": "Identifier", "span": { "start": 2257, - "end": 2266, + "end": 2258, "ctxt": 0 }, "value": "x", @@ -3561,7 +3561,7 @@ "type": "Identifier", "span": { "start": 2268, - "end": 2278, + "end": 2269, "ctxt": 0 }, "value": "y", @@ -3588,7 +3588,7 @@ "type": "Identifier", "span": { "start": 2280, - "end": 2290, + "end": 2281, "ctxt": 0 }, "value": "z", @@ -3726,7 +3726,7 @@ "type": "Identifier", "span": { "start": 2355, - "end": 2364, + "end": 2356, "ctxt": 0 }, "value": "x", @@ -3913,7 +3913,7 @@ "type": "Identifier", "span": { "start": 2445, - "end": 2454, + "end": 2446, "ctxt": 0 }, "value": "x", @@ -3940,7 +3940,7 @@ "type": "Identifier", "span": { "start": 2456, - "end": 2466, + "end": 2457, "ctxt": 0 }, "value": "y", @@ -3967,7 +3967,7 @@ "type": "Identifier", "span": { "start": 2468, - "end": 2478, + "end": 2469, "ctxt": 0 }, "value": "z", @@ -4105,7 +4105,7 @@ "type": "Identifier", "span": { "start": 2563, - "end": 2572, + "end": 2564, "ctxt": 0 }, "value": "x", @@ -4402,7 +4402,7 @@ "type": "Identifier", "span": { "start": 2735, - "end": 2745, + "end": 2736, "ctxt": 0 }, "value": "x", @@ -4429,7 +4429,7 @@ "type": "Identifier", "span": { "start": 2747, - "end": 2757, + "end": 2748, "ctxt": 0 }, "value": "y", @@ -4567,7 +4567,7 @@ "type": "Identifier", "span": { "start": 2835, - "end": 2844, + "end": 2836, "ctxt": 0 }, "value": "x", @@ -4705,7 +4705,7 @@ "type": "Identifier", "span": { "start": 2930, - "end": 2939, + "end": 2931, "ctxt": 0 }, "value": "x", @@ -4732,7 +4732,7 @@ "type": "Identifier", "span": { "start": 2941, - "end": 2951, + "end": 2942, "ctxt": 0 }, "value": "y", @@ -4870,7 +4870,7 @@ "type": "Identifier", "span": { "start": 3047, - "end": 3057, + "end": 3048, "ctxt": 0 }, "value": "x", @@ -4897,7 +4897,7 @@ "type": "Identifier", "span": { "start": 3059, - "end": 3069, + "end": 3060, "ctxt": 0 }, "value": "y", @@ -5035,7 +5035,7 @@ "type": "Identifier", "span": { "start": 3182, - "end": 3191, + "end": 3183, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesWithSpecializedSignatures.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesWithSpecializedSignatures.json index 35ae981a4784..d204c471606c 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesWithSpecializedSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesWithSpecializedSignatures.json @@ -73,7 +73,7 @@ "type": "Identifier", "span": { "start": 192, - "end": 198, + "end": 193, "ctxt": 0 }, "value": "x", @@ -137,7 +137,7 @@ "type": "Identifier", "span": { "start": 216, - "end": 225, + "end": 217, "ctxt": 0 }, "value": "x", @@ -164,7 +164,7 @@ "type": "Identifier", "span": { "start": 227, - "end": 236, + "end": 228, "ctxt": 0 }, "value": "y", @@ -270,7 +270,7 @@ "type": "Identifier", "span": { "start": 318, - "end": 324, + "end": 319, "ctxt": 0 }, "value": "x", @@ -334,7 +334,7 @@ "type": "Identifier", "span": { "start": 376, - "end": 385, + "end": 377, "ctxt": 0 }, "value": "x", @@ -361,7 +361,7 @@ "type": "Identifier", "span": { "start": 387, - "end": 396, + "end": 388, "ctxt": 0 }, "value": "y", @@ -416,7 +416,7 @@ "type": "Identifier", "span": { "start": 451, - "end": 455, + "end": 452, "ctxt": 0 }, "value": "x", @@ -544,7 +544,7 @@ "type": "Identifier", "span": { "start": 556, - "end": 562, + "end": 557, "ctxt": 0 }, "value": "x", @@ -608,7 +608,7 @@ "type": "Identifier", "span": { "start": 582, - "end": 591, + "end": 583, "ctxt": 0 }, "value": "x", @@ -714,7 +714,7 @@ "type": "Identifier", "span": { "start": 677, - "end": 683, + "end": 678, "ctxt": 0 }, "value": "x", @@ -778,7 +778,7 @@ "type": "Identifier", "span": { "start": 703, - "end": 712, + "end": 704, "ctxt": 0 }, "value": "x", @@ -884,7 +884,7 @@ "type": "Identifier", "span": { "start": 841, - "end": 845, + "end": 842, "ctxt": 0 }, "value": "x", @@ -1079,7 +1079,7 @@ "type": "Identifier", "span": { "start": 998, - "end": 1004, + "end": 999, "ctxt": 0 }, "value": "x", @@ -1143,7 +1143,7 @@ "type": "Identifier", "span": { "start": 1026, - "end": 1035, + "end": 1027, "ctxt": 0 }, "value": "x", @@ -1240,7 +1240,7 @@ "type": "Identifier", "span": { "start": 1081, - "end": 1087, + "end": 1082, "ctxt": 0 }, "value": "x", @@ -1276,7 +1276,7 @@ "type": "Identifier", "span": { "start": 1089, - "end": 1098, + "end": 1090, "ctxt": 0 }, "value": "y", @@ -1331,7 +1331,7 @@ "type": "Identifier", "span": { "start": 1120, - "end": 1129, + "end": 1121, "ctxt": 0 }, "value": "x", @@ -1358,7 +1358,7 @@ "type": "Identifier", "span": { "start": 1131, - "end": 1140, + "end": 1132, "ctxt": 0 }, "value": "y", @@ -1447,7 +1447,7 @@ "type": "Identifier", "span": { "start": 1175, - "end": 1179, + "end": 1176, "ctxt": 0 }, "value": "x", @@ -1627,7 +1627,7 @@ "type": "Identifier", "span": { "start": 1266, - "end": 1275, + "end": 1267, "ctxt": 0 }, "value": "x", @@ -1714,7 +1714,7 @@ "type": "Identifier", "span": { "start": 1333, - "end": 1342, + "end": 1334, "ctxt": 0 }, "value": "x", @@ -1741,7 +1741,7 @@ "type": "Identifier", "span": { "start": 1344, - "end": 1353, + "end": 1345, "ctxt": 0 }, "value": "y", @@ -1828,7 +1828,7 @@ "type": "Identifier", "span": { "start": 1415, - "end": 1419, + "end": 1416, "ctxt": 0 }, "value": "x", @@ -1996,7 +1996,7 @@ "type": "Identifier", "span": { "start": 1539, - "end": 1545, + "end": 1540, "ctxt": 0 }, "value": "x", @@ -2060,7 +2060,7 @@ "type": "Identifier", "span": { "start": 1569, - "end": 1578, + "end": 1570, "ctxt": 0 }, "value": "x", @@ -2149,7 +2149,7 @@ "type": "Identifier", "span": { "start": 1615, - "end": 1619, + "end": 1616, "ctxt": 0 }, "value": "x", @@ -2339,7 +2339,7 @@ "type": "Identifier", "span": { "start": 1705, - "end": 1714, + "end": 1706, "ctxt": 0 }, "value": "x", @@ -2477,7 +2477,7 @@ "type": "Identifier", "span": { "start": 1849, - "end": 1853, + "end": 1850, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures.json index 6f2d1cdca6e3..a28307d9094c 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 55, - "end": 82, + "end": 57, "ctxt": 0 }, "value": "cb", @@ -83,7 +83,7 @@ "type": "Identifier", "span": { "start": 64, - "end": 73, + "end": 65, "ctxt": 0 }, "value": "x", @@ -195,7 +195,7 @@ "type": "Identifier", "span": { "start": 122, - "end": 129, + "end": 124, "ctxt": 0 }, "value": "cb", @@ -293,7 +293,7 @@ "type": "Identifier", "span": { "start": 157, - "end": 166, + "end": 158, "ctxt": 0 }, "value": "x", @@ -455,7 +455,7 @@ "type": "Identifier", "span": { "start": 259, - "end": 263, + "end": 260, "ctxt": 0 }, "value": "x", @@ -640,7 +640,7 @@ "type": "Identifier", "span": { "start": 361, - "end": 399, + "end": 363, "ctxt": 0 }, "value": "cb", @@ -664,7 +664,7 @@ "type": "Identifier", "span": { "start": 370, - "end": 379, + "end": 371, "ctxt": 0 }, "value": "x", @@ -691,7 +691,7 @@ "type": "Identifier", "span": { "start": 381, - "end": 390, + "end": 382, "ctxt": 0 }, "value": "y", @@ -803,7 +803,7 @@ "type": "Identifier", "span": { "start": 439, - "end": 446, + "end": 441, "ctxt": 0 }, "value": "cb", @@ -901,7 +901,7 @@ "type": "Identifier", "span": { "start": 475, - "end": 484, + "end": 476, "ctxt": 0 }, "value": "x", @@ -928,7 +928,7 @@ "type": "Identifier", "span": { "start": 486, - "end": 495, + "end": 487, "ctxt": 0 }, "value": "y", @@ -1090,7 +1090,7 @@ "type": "Identifier", "span": { "start": 591, - "end": 595, + "end": 592, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures2.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures2.json index 849fecc0ca88..1f7b83b571c9 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures2.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures2.json @@ -347,7 +347,7 @@ "type": "Identifier", "span": { "start": 296, - "end": 326, + "end": 297, "ctxt": 0 }, "value": "a", @@ -371,7 +371,7 @@ "type": "Identifier", "span": { "start": 304, - "end": 313, + "end": 305, "ctxt": 0 }, "value": "x", @@ -491,7 +491,7 @@ "type": "Identifier", "span": { "start": 361, - "end": 367, + "end": 362, "ctxt": 0 }, "value": "a", @@ -570,7 +570,7 @@ "type": "Identifier", "span": { "start": 398, - "end": 428, + "end": 399, "ctxt": 0 }, "value": "a", @@ -594,7 +594,7 @@ "type": "Identifier", "span": { "start": 406, - "end": 415, + "end": 407, "ctxt": 0 }, "value": "x", @@ -714,7 +714,7 @@ "type": "Identifier", "span": { "start": 463, - "end": 469, + "end": 464, "ctxt": 0 }, "value": "a", @@ -793,7 +793,7 @@ "type": "Identifier", "span": { "start": 500, - "end": 526, + "end": 501, "ctxt": 0 }, "value": "a", @@ -817,7 +817,7 @@ "type": "Identifier", "span": { "start": 508, - "end": 517, + "end": 509, "ctxt": 0 }, "value": "x", @@ -929,7 +929,7 @@ "type": "Identifier", "span": { "start": 561, - "end": 567, + "end": 562, "ctxt": 0 }, "value": "a", @@ -1008,7 +1008,7 @@ "type": "Identifier", "span": { "start": 598, - "end": 637, + "end": 599, "ctxt": 0 }, "value": "a", @@ -1032,7 +1032,7 @@ "type": "Identifier", "span": { "start": 606, - "end": 615, + "end": 607, "ctxt": 0 }, "value": "x", @@ -1059,7 +1059,7 @@ "type": "Identifier", "span": { "start": 617, - "end": 626, + "end": 618, "ctxt": 0 }, "value": "y", @@ -1171,7 +1171,7 @@ "type": "Identifier", "span": { "start": 672, - "end": 678, + "end": 673, "ctxt": 0 }, "value": "a", @@ -1250,7 +1250,7 @@ "type": "Identifier", "span": { "start": 709, - "end": 758, + "end": 710, "ctxt": 0 }, "value": "a", @@ -1274,7 +1274,7 @@ "type": "Identifier", "span": { "start": 717, - "end": 747, + "end": 718, "ctxt": 0 }, "value": "x", @@ -1298,7 +1298,7 @@ "type": "Identifier", "span": { "start": 725, - "end": 736, + "end": 728, "ctxt": 0 }, "value": "arg", @@ -1433,7 +1433,7 @@ "type": "Identifier", "span": { "start": 793, - "end": 799, + "end": 794, "ctxt": 0 }, "value": "a", @@ -1512,7 +1512,7 @@ "type": "Identifier", "span": { "start": 830, - "end": 876, + "end": 831, "ctxt": 0 }, "value": "a", @@ -1536,7 +1536,7 @@ "type": "Identifier", "span": { "start": 838, - "end": 867, + "end": 839, "ctxt": 0 }, "value": "x", @@ -1560,7 +1560,7 @@ "type": "Identifier", "span": { "start": 846, - "end": 855, + "end": 849, "ctxt": 0 }, "value": "arg", @@ -1725,7 +1725,7 @@ "type": "Identifier", "span": { "start": 911, - "end": 917, + "end": 912, "ctxt": 0 }, "value": "a", @@ -1804,7 +1804,7 @@ "type": "Identifier", "span": { "start": 948, - "end": 1014, + "end": 949, "ctxt": 0 }, "value": "a", @@ -1828,7 +1828,7 @@ "type": "Identifier", "span": { "start": 956, - "end": 985, + "end": 957, "ctxt": 0 }, "value": "x", @@ -1852,7 +1852,7 @@ "type": "Identifier", "span": { "start": 964, - "end": 973, + "end": 967, "ctxt": 0 }, "value": "arg", @@ -1939,7 +1939,7 @@ "type": "Identifier", "span": { "start": 995, - "end": 1002, + "end": 996, "ctxt": 0 }, "value": "r", @@ -2074,7 +2074,7 @@ "type": "Identifier", "span": { "start": 1049, - "end": 1055, + "end": 1050, "ctxt": 0 }, "value": "a", @@ -2153,7 +2153,7 @@ "type": "Identifier", "span": { "start": 1086, - "end": 1184, + "end": 1087, "ctxt": 0 }, "value": "a", @@ -2177,7 +2177,7 @@ "type": "Identifier", "span": { "start": 1094, - "end": 1123, + "end": 1095, "ctxt": 0 }, "value": "x", @@ -2201,7 +2201,7 @@ "type": "Identifier", "span": { "start": 1102, - "end": 1111, + "end": 1105, "ctxt": 0 }, "value": "arg", @@ -2271,7 +2271,7 @@ "type": "Identifier", "span": { "start": 1125, - "end": 1155, + "end": 1126, "ctxt": 0 }, "value": "y", @@ -2295,7 +2295,7 @@ "type": "Identifier", "span": { "start": 1133, - "end": 1143, + "end": 1137, "ctxt": 0 }, "value": "arg2", @@ -2382,7 +2382,7 @@ "type": "Identifier", "span": { "start": 1165, - "end": 1172, + "end": 1166, "ctxt": 0 }, "value": "r", @@ -2517,7 +2517,7 @@ "type": "Identifier", "span": { "start": 1219, - "end": 1225, + "end": 1220, "ctxt": 0 }, "value": "a", @@ -2596,7 +2596,7 @@ "type": "Identifier", "span": { "start": 1256, - "end": 1354, + "end": 1257, "ctxt": 0 }, "value": "a", @@ -2620,7 +2620,7 @@ "type": "Identifier", "span": { "start": 1264, - "end": 1293, + "end": 1265, "ctxt": 0 }, "value": "x", @@ -2644,7 +2644,7 @@ "type": "Identifier", "span": { "start": 1272, - "end": 1281, + "end": 1275, "ctxt": 0 }, "value": "arg", @@ -2714,7 +2714,7 @@ "type": "Identifier", "span": { "start": 1295, - "end": 1325, + "end": 1296, "ctxt": 0 }, "value": "y", @@ -2738,7 +2738,7 @@ "type": "Identifier", "span": { "start": 1303, - "end": 1313, + "end": 1307, "ctxt": 0 }, "value": "arg2", @@ -2825,7 +2825,7 @@ "type": "Identifier", "span": { "start": 1335, - "end": 1342, + "end": 1336, "ctxt": 0 }, "value": "r", @@ -2960,7 +2960,7 @@ "type": "Identifier", "span": { "start": 1389, - "end": 1395, + "end": 1390, "ctxt": 0 }, "value": "a", @@ -3039,7 +3039,7 @@ "type": "Identifier", "span": { "start": 1427, - "end": 1462, + "end": 1428, "ctxt": 0 }, "value": "a", @@ -3217,7 +3217,7 @@ "type": "Identifier", "span": { "start": 1498, - "end": 1504, + "end": 1499, "ctxt": 0 }, "value": "a", @@ -3296,7 +3296,7 @@ "type": "Identifier", "span": { "start": 1536, - "end": 1604, + "end": 1537, "ctxt": 0 }, "value": "a", @@ -3320,7 +3320,7 @@ "type": "Identifier", "span": { "start": 1544, - "end": 1562, + "end": 1545, "ctxt": 0 }, "value": "x", @@ -3389,7 +3389,7 @@ "type": "Identifier", "span": { "start": 1564, - "end": 1595, + "end": 1565, "ctxt": 0 }, "value": "y", @@ -3594,7 +3594,7 @@ "type": "Identifier", "span": { "start": 1640, - "end": 1646, + "end": 1641, "ctxt": 0 }, "value": "a", @@ -3673,7 +3673,7 @@ "type": "Identifier", "span": { "start": 1678, - "end": 1739, + "end": 1679, "ctxt": 0 }, "value": "a", @@ -3697,7 +3697,7 @@ "type": "Identifier", "span": { "start": 1686, - "end": 1700, + "end": 1687, "ctxt": 0 }, "value": "x", @@ -3762,7 +3762,7 @@ "type": "Identifier", "span": { "start": 1702, - "end": 1720, + "end": 1703, "ctxt": 0 }, "value": "y", @@ -3950,7 +3950,7 @@ "type": "Identifier", "span": { "start": 1775, - "end": 1781, + "end": 1776, "ctxt": 0 }, "value": "a", @@ -4029,7 +4029,7 @@ "type": "Identifier", "span": { "start": 1813, - "end": 1873, + "end": 1814, "ctxt": 0 }, "value": "a", @@ -4053,7 +4053,7 @@ "type": "Identifier", "span": { "start": 1821, - "end": 1835, + "end": 1822, "ctxt": 0 }, "value": "x", @@ -4118,7 +4118,7 @@ "type": "Identifier", "span": { "start": 1837, - "end": 1854, + "end": 1838, "ctxt": 0 }, "value": "y", @@ -4306,7 +4306,7 @@ "type": "Identifier", "span": { "start": 1909, - "end": 1915, + "end": 1910, "ctxt": 0 }, "value": "a", @@ -4385,7 +4385,7 @@ "type": "Identifier", "span": { "start": 1947, - "end": 1993, + "end": 1948, "ctxt": 0 }, "value": "a", @@ -4409,7 +4409,7 @@ "type": "Identifier", "span": { "start": 1955, - "end": 1982, + "end": 1956, "ctxt": 0 }, "value": "x", @@ -4614,7 +4614,7 @@ "type": "Identifier", "span": { "start": 2029, - "end": 2035, + "end": 2030, "ctxt": 0 }, "value": "a", @@ -4693,7 +4693,7 @@ "type": "Identifier", "span": { "start": 2067, - "end": 2137, + "end": 2068, "ctxt": 0 }, "value": "a", @@ -4725,7 +4725,7 @@ "type": "Identifier", "span": { "start": 2082, - "end": 2091, + "end": 2083, "ctxt": 0 }, "value": "x", @@ -4788,7 +4788,7 @@ "type": "Identifier", "span": { "start": 2113, - "end": 2122, + "end": 2114, "ctxt": 0 }, "value": "x", @@ -4909,7 +4909,7 @@ "type": "Identifier", "span": { "start": 2173, - "end": 2179, + "end": 2174, "ctxt": 0 }, "value": "a", @@ -4988,7 +4988,7 @@ "type": "Identifier", "span": { "start": 2211, - "end": 2304, + "end": 2212, "ctxt": 0 }, "value": "a", @@ -5020,7 +5020,7 @@ "type": "Identifier", "span": { "start": 2244, - "end": 2248, + "end": 2245, "ctxt": 0 }, "value": "x", @@ -5143,7 +5143,7 @@ "type": "Identifier", "span": { "start": 2286, - "end": 2290, + "end": 2287, "ctxt": 0 }, "value": "x", @@ -5324,7 +5324,7 @@ "type": "Identifier", "span": { "start": 2340, - "end": 2346, + "end": 2341, "ctxt": 0 }, "value": "a", @@ -5403,7 +5403,7 @@ "type": "Identifier", "span": { "start": 2378, - "end": 2476, + "end": 2379, "ctxt": 0 }, "value": "a", @@ -5435,7 +5435,7 @@ "type": "Identifier", "span": { "start": 2392, - "end": 2416, + "end": 2393, "ctxt": 0 }, "value": "x", @@ -5459,7 +5459,7 @@ "type": "Identifier", "span": { "start": 2396, - "end": 2405, + "end": 2397, "ctxt": 0 }, "value": "a", @@ -5544,7 +5544,7 @@ "type": "Identifier", "span": { "start": 2438, - "end": 2462, + "end": 2439, "ctxt": 0 }, "value": "x", @@ -5568,7 +5568,7 @@ "type": "Identifier", "span": { "start": 2442, - "end": 2451, + "end": 2443, "ctxt": 0 }, "value": "a", @@ -5711,7 +5711,7 @@ "type": "Identifier", "span": { "start": 2512, - "end": 2518, + "end": 2513, "ctxt": 0 }, "value": "a", @@ -5790,7 +5790,7 @@ "type": "Identifier", "span": { "start": 2550, - "end": 2744, + "end": 2551, "ctxt": 0 }, "value": "a", @@ -5822,7 +5822,7 @@ "type": "Identifier", "span": { "start": 2564, - "end": 2640, + "end": 2565, "ctxt": 0 }, "value": "x", @@ -5854,7 +5854,7 @@ "type": "Identifier", "span": { "start": 2582, - "end": 2591, + "end": 2583, "ctxt": 0 }, "value": "a", @@ -5909,7 +5909,7 @@ "type": "Identifier", "span": { "start": 2615, - "end": 2624, + "end": 2616, "ctxt": 0 }, "value": "a", @@ -5996,7 +5996,7 @@ "type": "Identifier", "span": { "start": 2659, - "end": 2733, + "end": 2660, "ctxt": 0 }, "value": "x", @@ -6028,7 +6028,7 @@ "type": "Identifier", "span": { "start": 2677, - "end": 2687, + "end": 2678, "ctxt": 0 }, "value": "a", @@ -6083,7 +6083,7 @@ "type": "Identifier", "span": { "start": 2712, - "end": 2719, + "end": 2713, "ctxt": 0 }, "value": "a", @@ -6248,7 +6248,7 @@ "type": "Identifier", "span": { "start": 2780, - "end": 2786, + "end": 2781, "ctxt": 0 }, "value": "a", @@ -6346,7 +6346,7 @@ "type": "Identifier", "span": { "start": 2815, - "end": 2819, + "end": 2816, "ctxt": 0 }, "value": "x", @@ -6502,7 +6502,7 @@ "type": "Identifier", "span": { "start": 2846, - "end": 2855, + "end": 2847, "ctxt": 0 }, "value": "x", @@ -6808,7 +6808,7 @@ "type": "Identifier", "span": { "start": 3123, - "end": 3127, + "end": 3124, "ctxt": 0 }, "value": "x", @@ -6954,7 +6954,7 @@ "type": "Identifier", "span": { "start": 3159, - "end": 3168, + "end": 3160, "ctxt": 0 }, "value": "x", @@ -7260,7 +7260,7 @@ "type": "Identifier", "span": { "start": 3283, - "end": 3287, + "end": 3284, "ctxt": 0 }, "value": "x", @@ -7408,7 +7408,7 @@ "type": "Identifier", "span": { "start": 3312, - "end": 3321, + "end": 3313, "ctxt": 0 }, "value": "x", @@ -7706,7 +7706,7 @@ "type": "Identifier", "span": { "start": 3435, - "end": 3439, + "end": 3436, "ctxt": 0 }, "value": "x", @@ -7743,7 +7743,7 @@ "type": "Identifier", "span": { "start": 3441, - "end": 3445, + "end": 3442, "ctxt": 0 }, "value": "y", @@ -7914,7 +7914,7 @@ "type": "Identifier", "span": { "start": 3470, - "end": 3479, + "end": 3471, "ctxt": 0 }, "value": "x", @@ -7941,7 +7941,7 @@ "type": "Identifier", "span": { "start": 3481, - "end": 3490, + "end": 3482, "ctxt": 0 }, "value": "y", @@ -8239,7 +8239,7 @@ "type": "Identifier", "span": { "start": 3613, - "end": 3633, + "end": 3614, "ctxt": 0 }, "value": "x", @@ -8263,7 +8263,7 @@ "type": "Identifier", "span": { "start": 3621, - "end": 3627, + "end": 3624, "ctxt": 0 }, "value": "arg", @@ -8467,7 +8467,7 @@ "type": "Identifier", "span": { "start": 3658, - "end": 3688, + "end": 3659, "ctxt": 0 }, "value": "x", @@ -8491,7 +8491,7 @@ "type": "Identifier", "span": { "start": 3666, - "end": 3677, + "end": 3669, "ctxt": 0 }, "value": "arg", @@ -8812,7 +8812,7 @@ "type": "Identifier", "span": { "start": 3840, - "end": 3860, + "end": 3841, "ctxt": 0 }, "value": "x", @@ -8836,7 +8836,7 @@ "type": "Identifier", "span": { "start": 3848, - "end": 3854, + "end": 3851, "ctxt": 0 }, "value": "arg", @@ -9076,7 +9076,7 @@ "type": "Identifier", "span": { "start": 3885, - "end": 3914, + "end": 3886, "ctxt": 0 }, "value": "x", @@ -9100,7 +9100,7 @@ "type": "Identifier", "span": { "start": 3893, - "end": 3902, + "end": 3896, "ctxt": 0 }, "value": "arg", @@ -9451,7 +9451,7 @@ "type": "Identifier", "span": { "start": 4064, - "end": 4084, + "end": 4065, "ctxt": 0 }, "value": "x", @@ -9475,7 +9475,7 @@ "type": "Identifier", "span": { "start": 4072, - "end": 4078, + "end": 4075, "ctxt": 0 }, "value": "arg", @@ -9653,7 +9653,7 @@ "type": "Identifier", "span": { "start": 4094, - "end": 4098, + "end": 4095, "ctxt": 0 }, "value": "r", @@ -9772,7 +9772,7 @@ "type": "Identifier", "span": { "start": 4123, - "end": 4152, + "end": 4124, "ctxt": 0 }, "value": "x", @@ -9796,7 +9796,7 @@ "type": "Identifier", "span": { "start": 4131, - "end": 4140, + "end": 4134, "ctxt": 0 }, "value": "arg", @@ -9883,7 +9883,7 @@ "type": "Identifier", "span": { "start": 4162, - "end": 4169, + "end": 4163, "ctxt": 0 }, "value": "r", @@ -10204,7 +10204,7 @@ "type": "Identifier", "span": { "start": 4322, - "end": 4342, + "end": 4323, "ctxt": 0 }, "value": "x", @@ -10228,7 +10228,7 @@ "type": "Identifier", "span": { "start": 4330, - "end": 4336, + "end": 4333, "ctxt": 0 }, "value": "arg", @@ -10298,7 +10298,7 @@ "type": "Identifier", "span": { "start": 4344, - "end": 4365, + "end": 4345, "ctxt": 0 }, "value": "y", @@ -10322,7 +10322,7 @@ "type": "Identifier", "span": { "start": 4352, - "end": 4359, + "end": 4356, "ctxt": 0 }, "value": "arg2", @@ -10500,7 +10500,7 @@ "type": "Identifier", "span": { "start": 4375, - "end": 4379, + "end": 4376, "ctxt": 0 }, "value": "r", @@ -10619,7 +10619,7 @@ "type": "Identifier", "span": { "start": 4404, - "end": 4433, + "end": 4405, "ctxt": 0 }, "value": "x", @@ -10643,7 +10643,7 @@ "type": "Identifier", "span": { "start": 4412, - "end": 4421, + "end": 4415, "ctxt": 0 }, "value": "arg", @@ -10713,7 +10713,7 @@ "type": "Identifier", "span": { "start": 4435, - "end": 4465, + "end": 4436, "ctxt": 0 }, "value": "y", @@ -10737,7 +10737,7 @@ "type": "Identifier", "span": { "start": 4443, - "end": 4453, + "end": 4447, "ctxt": 0 }, "value": "arg2", @@ -10824,7 +10824,7 @@ "type": "Identifier", "span": { "start": 4475, - "end": 4482, + "end": 4476, "ctxt": 0 }, "value": "r", @@ -11145,7 +11145,7 @@ "type": "Identifier", "span": { "start": 4635, - "end": 4655, + "end": 4636, "ctxt": 0 }, "value": "x", @@ -11169,7 +11169,7 @@ "type": "Identifier", "span": { "start": 4643, - "end": 4649, + "end": 4646, "ctxt": 0 }, "value": "arg", @@ -11239,7 +11239,7 @@ "type": "Identifier", "span": { "start": 4657, - "end": 4702, + "end": 4658, "ctxt": 0 }, "value": "y", @@ -11263,7 +11263,7 @@ "type": "Identifier", "span": { "start": 4661, - "end": 4696, + "end": 4665, "ctxt": 0 }, "value": "arg2", @@ -11513,7 +11513,7 @@ "type": "Identifier", "span": { "start": 4712, - "end": 4716, + "end": 4713, "ctxt": 0 }, "value": "r", @@ -11632,7 +11632,7 @@ "type": "Identifier", "span": { "start": 4741, - "end": 4770, + "end": 4742, "ctxt": 0 }, "value": "x", @@ -11656,7 +11656,7 @@ "type": "Identifier", "span": { "start": 4749, - "end": 4758, + "end": 4752, "ctxt": 0 }, "value": "arg", @@ -11726,7 +11726,7 @@ "type": "Identifier", "span": { "start": 4772, - "end": 4802, + "end": 4773, "ctxt": 0 }, "value": "y", @@ -11750,7 +11750,7 @@ "type": "Identifier", "span": { "start": 4780, - "end": 4790, + "end": 4784, "ctxt": 0 }, "value": "arg2", @@ -11837,7 +11837,7 @@ "type": "Identifier", "span": { "start": 4812, - "end": 4819, + "end": 4813, "ctxt": 0 }, "value": "r", @@ -12686,7 +12686,7 @@ "type": "Identifier", "span": { "start": 5151, - "end": 5155, + "end": 5152, "ctxt": 0 }, "value": "x", @@ -12723,7 +12723,7 @@ "type": "Identifier", "span": { "start": 5157, - "end": 5161, + "end": 5158, "ctxt": 0 }, "value": "y", @@ -12889,7 +12889,7 @@ "type": "Identifier", "span": { "start": 5187, - "end": 5205, + "end": 5188, "ctxt": 0 }, "value": "x", @@ -12958,7 +12958,7 @@ "type": "Identifier", "span": { "start": 5207, - "end": 5238, + "end": 5208, "ctxt": 0 }, "value": "y", @@ -13349,7 +13349,7 @@ "type": "Identifier", "span": { "start": 5386, - "end": 5400, + "end": 5387, "ctxt": 0 }, "value": "x", @@ -13414,7 +13414,7 @@ "type": "Identifier", "span": { "start": 5402, - "end": 5406, + "end": 5403, "ctxt": 0 }, "value": "y", @@ -13636,7 +13636,7 @@ "type": "Identifier", "span": { "start": 5445, - "end": 5459, + "end": 5446, "ctxt": 0 }, "value": "x", @@ -13701,7 +13701,7 @@ "type": "Identifier", "span": { "start": 5461, - "end": 5479, + "end": 5462, "ctxt": 0 }, "value": "y", @@ -14075,7 +14075,7 @@ "type": "Identifier", "span": { "start": 5640, - "end": 5654, + "end": 5641, "ctxt": 0 }, "value": "x", @@ -14140,7 +14140,7 @@ "type": "Identifier", "span": { "start": 5656, - "end": 5660, + "end": 5657, "ctxt": 0 }, "value": "y", @@ -14334,7 +14334,7 @@ "type": "Identifier", "span": { "start": 5686, - "end": 5700, + "end": 5687, "ctxt": 0 }, "value": "x", @@ -14399,7 +14399,7 @@ "type": "Identifier", "span": { "start": 5702, - "end": 5719, + "end": 5703, "ctxt": 0 }, "value": "y", @@ -14773,7 +14773,7 @@ "type": "Identifier", "span": { "start": 5857, - "end": 5874, + "end": 5858, "ctxt": 0 }, "value": "x", @@ -15014,7 +15014,7 @@ "type": "Identifier", "span": { "start": 5900, - "end": 5927, + "end": 5901, "ctxt": 0 }, "value": "x", @@ -15405,7 +15405,7 @@ "type": "Identifier", "span": { "start": 6057, - "end": 6061, + "end": 6058, "ctxt": 0 }, "value": "x", @@ -15627,7 +15627,7 @@ "type": "Identifier", "span": { "start": 6138, - "end": 6142, + "end": 6139, "ctxt": 0 }, "value": "x", @@ -15857,7 +15857,7 @@ "type": "Identifier", "span": { "start": 6204, - "end": 6218, + "end": 6205, "ctxt": 0 }, "value": "x", @@ -15881,7 +15881,7 @@ "type": "Identifier", "span": { "start": 6208, - "end": 6212, + "end": 6209, "ctxt": 0 }, "value": "a", @@ -16135,7 +16135,7 @@ "type": "Identifier", "span": { "start": 6282, - "end": 6296, + "end": 6283, "ctxt": 0 }, "value": "x", @@ -16159,7 +16159,7 @@ "type": "Identifier", "span": { "start": 6286, - "end": 6290, + "end": 6287, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures3.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures3.json index 3ee2b3aae1e8..19791653819a 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures3.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures3.json @@ -374,7 +374,7 @@ "type": "Identifier", "span": { "start": 391, - "end": 422, + "end": 393, "ctxt": 0 }, "value": "a2", @@ -398,7 +398,7 @@ "type": "Identifier", "span": { "start": 400, - "end": 409, + "end": 401, "ctxt": 0 }, "value": "x", @@ -518,7 +518,7 @@ "type": "Identifier", "span": { "start": 462, - "end": 469, + "end": 464, "ctxt": 0 }, "value": "a2", @@ -597,7 +597,7 @@ "type": "Identifier", "span": { "start": 504, - "end": 572, + "end": 506, "ctxt": 0 }, "value": "a2", @@ -621,7 +621,7 @@ "type": "Identifier", "span": { "start": 513, - "end": 542, + "end": 514, "ctxt": 0 }, "value": "x", @@ -645,7 +645,7 @@ "type": "Identifier", "span": { "start": 521, - "end": 530, + "end": 524, "ctxt": 0 }, "value": "arg", @@ -732,7 +732,7 @@ "type": "Identifier", "span": { "start": 552, - "end": 559, + "end": 553, "ctxt": 0 }, "value": "r", @@ -867,7 +867,7 @@ "type": "Identifier", "span": { "start": 612, - "end": 619, + "end": 614, "ctxt": 0 }, "value": "a2", @@ -946,7 +946,7 @@ "type": "Identifier", "span": { "start": 654, - "end": 753, + "end": 656, "ctxt": 0 }, "value": "a2", @@ -970,7 +970,7 @@ "type": "Identifier", "span": { "start": 663, - "end": 692, + "end": 664, "ctxt": 0 }, "value": "x", @@ -994,7 +994,7 @@ "type": "Identifier", "span": { "start": 671, - "end": 680, + "end": 674, "ctxt": 0 }, "value": "arg", @@ -1064,7 +1064,7 @@ "type": "Identifier", "span": { "start": 694, - "end": 724, + "end": 695, "ctxt": 0 }, "value": "y", @@ -1088,7 +1088,7 @@ "type": "Identifier", "span": { "start": 702, - "end": 712, + "end": 706, "ctxt": 0 }, "value": "arg2", @@ -1175,7 +1175,7 @@ "type": "Identifier", "span": { "start": 734, - "end": 741, + "end": 735, "ctxt": 0 }, "value": "r", @@ -1310,7 +1310,7 @@ "type": "Identifier", "span": { "start": 793, - "end": 800, + "end": 795, "ctxt": 0 }, "value": "a2", @@ -1389,7 +1389,7 @@ "type": "Identifier", "span": { "start": 836, - "end": 866, + "end": 838, "ctxt": 0 }, "value": "a2", @@ -1567,7 +1567,7 @@ "type": "Identifier", "span": { "start": 907, - "end": 914, + "end": 909, "ctxt": 0 }, "value": "a2", @@ -1646,7 +1646,7 @@ "type": "Identifier", "span": { "start": 950, - "end": 1019, + "end": 952, "ctxt": 0 }, "value": "a2", @@ -1670,7 +1670,7 @@ "type": "Identifier", "span": { "start": 959, - "end": 977, + "end": 960, "ctxt": 0 }, "value": "x", @@ -1739,7 +1739,7 @@ "type": "Identifier", "span": { "start": 979, - "end": 1010, + "end": 980, "ctxt": 0 }, "value": "y", @@ -1944,7 +1944,7 @@ "type": "Identifier", "span": { "start": 1060, - "end": 1067, + "end": 1062, "ctxt": 0 }, "value": "a2", @@ -2023,7 +2023,7 @@ "type": "Identifier", "span": { "start": 1103, - "end": 1165, + "end": 1105, "ctxt": 0 }, "value": "a2", @@ -2047,7 +2047,7 @@ "type": "Identifier", "span": { "start": 1112, - "end": 1126, + "end": 1113, "ctxt": 0 }, "value": "x", @@ -2112,7 +2112,7 @@ "type": "Identifier", "span": { "start": 1128, - "end": 1146, + "end": 1129, "ctxt": 0 }, "value": "y", @@ -2300,7 +2300,7 @@ "type": "Identifier", "span": { "start": 1206, - "end": 1213, + "end": 1208, "ctxt": 0 }, "value": "a2", @@ -2379,7 +2379,7 @@ "type": "Identifier", "span": { "start": 1249, - "end": 1296, + "end": 1251, "ctxt": 0 }, "value": "a2", @@ -2403,7 +2403,7 @@ "type": "Identifier", "span": { "start": 1258, - "end": 1285, + "end": 1259, "ctxt": 0 }, "value": "x", @@ -2598,7 +2598,7 @@ "type": "Identifier", "span": { "start": 1337, - "end": 1344, + "end": 1339, "ctxt": 0 }, "value": "a2", @@ -2677,7 +2677,7 @@ "type": "Identifier", "span": { "start": 1380, - "end": 1724, + "end": 1382, "ctxt": 0 }, "value": "a2", @@ -2709,7 +2709,7 @@ "type": "Identifier", "span": { "start": 1497, - "end": 1586, + "end": 1498, "ctxt": 0 }, "value": "x", @@ -2741,7 +2741,7 @@ "type": "Identifier", "span": { "start": 1519, - "end": 1528, + "end": 1520, "ctxt": 0 }, "value": "a", @@ -2796,7 +2796,7 @@ "type": "Identifier", "span": { "start": 1556, - "end": 1566, + "end": 1557, "ctxt": 0 }, "value": "a", @@ -2883,7 +2883,7 @@ "type": "Identifier", "span": { "start": 1612, - "end": 1705, + "end": 1613, "ctxt": 0 }, "value": "x", @@ -2915,7 +2915,7 @@ "type": "Identifier", "span": { "start": 1634, - "end": 1644, + "end": 1635, "ctxt": 0 }, "value": "a", @@ -2970,7 +2970,7 @@ "type": "Identifier", "span": { "start": 1673, - "end": 1684, + "end": 1674, "ctxt": 0 }, "value": "a", @@ -3115,7 +3115,7 @@ "type": "Identifier", "span": { "start": 1765, - "end": 1772, + "end": 1767, "ctxt": 0 }, "value": "a2", @@ -3194,7 +3194,7 @@ "type": "Identifier", "span": { "start": 1808, - "end": 2072, + "end": 1810, "ctxt": 0 }, "value": "a2", @@ -3226,7 +3226,7 @@ "type": "Identifier", "span": { "start": 1827, - "end": 1930, + "end": 1828, "ctxt": 0 }, "value": "x", @@ -3258,7 +3258,7 @@ "type": "Identifier", "span": { "start": 1868, - "end": 1872, + "end": 1869, "ctxt": 0 }, "value": "a", @@ -3383,7 +3383,7 @@ "type": "Identifier", "span": { "start": 1911, - "end": 1915, + "end": 1912, "ctxt": 0 }, "value": "a", @@ -3540,7 +3540,7 @@ "type": "Identifier", "span": { "start": 1953, - "end": 2057, + "end": 1954, "ctxt": 0 }, "value": "x", @@ -3572,7 +3572,7 @@ "type": "Identifier", "span": { "start": 1995, - "end": 1999, + "end": 1996, "ctxt": 0 }, "value": "a", @@ -3697,7 +3697,7 @@ "type": "Identifier", "span": { "start": 2038, - "end": 2042, + "end": 2039, "ctxt": 0 }, "value": "a", @@ -3912,7 +3912,7 @@ "type": "Identifier", "span": { "start": 2113, - "end": 2120, + "end": 2115, "ctxt": 0 }, "value": "a2", @@ -4010,7 +4010,7 @@ "type": "Identifier", "span": { "start": 2156, - "end": 2160, + "end": 2157, "ctxt": 0 }, "value": "x", @@ -4189,7 +4189,7 @@ "type": "Identifier", "span": { "start": 2191, - "end": 2200, + "end": 2192, "ctxt": 0 }, "value": "x", @@ -4495,7 +4495,7 @@ "type": "Identifier", "span": { "start": 2391, - "end": 2411, + "end": 2392, "ctxt": 0 }, "value": "x", @@ -4519,7 +4519,7 @@ "type": "Identifier", "span": { "start": 2399, - "end": 2405, + "end": 2402, "ctxt": 0 }, "value": "arg", @@ -4738,7 +4738,7 @@ "type": "Identifier", "span": { "start": 2421, - "end": 2425, + "end": 2422, "ctxt": 0 }, "value": "r", @@ -4857,7 +4857,7 @@ "type": "Identifier", "span": { "start": 2454, - "end": 2483, + "end": 2455, "ctxt": 0 }, "value": "x", @@ -4881,7 +4881,7 @@ "type": "Identifier", "span": { "start": 2462, - "end": 2471, + "end": 2465, "ctxt": 0 }, "value": "arg", @@ -4968,7 +4968,7 @@ "type": "Identifier", "span": { "start": 2493, - "end": 2500, + "end": 2494, "ctxt": 0 }, "value": "r", @@ -5289,7 +5289,7 @@ "type": "Identifier", "span": { "start": 2670, - "end": 2690, + "end": 2671, "ctxt": 0 }, "value": "x", @@ -5313,7 +5313,7 @@ "type": "Identifier", "span": { "start": 2678, - "end": 2684, + "end": 2681, "ctxt": 0 }, "value": "arg", @@ -5383,7 +5383,7 @@ "type": "Identifier", "span": { "start": 2692, - "end": 2724, + "end": 2693, "ctxt": 0 }, "value": "y", @@ -5407,7 +5407,7 @@ "type": "Identifier", "span": { "start": 2696, - "end": 2718, + "end": 2700, "ctxt": 0 }, "value": "arg2", @@ -5616,7 +5616,7 @@ "type": "Identifier", "span": { "start": 2734, - "end": 2738, + "end": 2735, "ctxt": 0 }, "value": "r", @@ -5735,7 +5735,7 @@ "type": "Identifier", "span": { "start": 2767, - "end": 2792, + "end": 2768, "ctxt": 0 }, "value": "x", @@ -5759,7 +5759,7 @@ "type": "Identifier", "span": { "start": 2771, - "end": 2780, + "end": 2774, "ctxt": 0 }, "value": "arg", @@ -5828,7 +5828,7 @@ "type": "Identifier", "span": { "start": 2794, - "end": 2824, + "end": 2795, "ctxt": 0 }, "value": "y", @@ -5852,7 +5852,7 @@ "type": "Identifier", "span": { "start": 2802, - "end": 2812, + "end": 2806, "ctxt": 0 }, "value": "arg2", @@ -5939,7 +5939,7 @@ "type": "Identifier", "span": { "start": 2834, - "end": 2841, + "end": 2835, "ctxt": 0 }, "value": "r", @@ -6788,7 +6788,7 @@ "type": "Identifier", "span": { "start": 3195, - "end": 3199, + "end": 3196, "ctxt": 0 }, "value": "x", @@ -6825,7 +6825,7 @@ "type": "Identifier", "span": { "start": 3201, - "end": 3205, + "end": 3202, "ctxt": 0 }, "value": "y", @@ -6991,7 +6991,7 @@ "type": "Identifier", "span": { "start": 3234, - "end": 3252, + "end": 3235, "ctxt": 0 }, "value": "x", @@ -7060,7 +7060,7 @@ "type": "Identifier", "span": { "start": 3254, - "end": 3285, + "end": 3255, "ctxt": 0 }, "value": "y", @@ -7451,7 +7451,7 @@ "type": "Identifier", "span": { "start": 3417, - "end": 3431, + "end": 3418, "ctxt": 0 }, "value": "x", @@ -7516,7 +7516,7 @@ "type": "Identifier", "span": { "start": 3433, - "end": 3451, + "end": 3434, "ctxt": 0 }, "value": "y", @@ -7688,7 +7688,7 @@ "type": "Identifier", "span": { "start": 3520, - "end": 3534, + "end": 3521, "ctxt": 0 }, "value": "x", @@ -7753,7 +7753,7 @@ "type": "Identifier", "span": { "start": 3536, - "end": 3550, + "end": 3537, "ctxt": 0 }, "value": "y", @@ -8177,7 +8177,7 @@ "type": "Identifier", "span": { "start": 3737, - "end": 3754, + "end": 3738, "ctxt": 0 }, "value": "x", @@ -8418,7 +8418,7 @@ "type": "Identifier", "span": { "start": 3783, - "end": 3810, + "end": 3784, "ctxt": 0 }, "value": "x", @@ -8799,7 +8799,7 @@ "type": "Identifier", "span": { "start": 4006, - "end": 4023, + "end": 4007, "ctxt": 0 }, "value": "x", @@ -9250,7 +9250,7 @@ "type": "Identifier", "span": { "start": 4160, - "end": 4178, + "end": 4161, "ctxt": 0 }, "value": "x", @@ -9274,7 +9274,7 @@ "type": "Identifier", "span": { "start": 4168, - "end": 4172, + "end": 4169, "ctxt": 0 }, "value": "a", @@ -9529,7 +9529,7 @@ "type": "Identifier", "span": { "start": 4246, - "end": 4264, + "end": 4247, "ctxt": 0 }, "value": "x", @@ -9553,7 +9553,7 @@ "type": "Identifier", "span": { "start": 4254, - "end": 4258, + "end": 4255, "ctxt": 0 }, "value": "a", @@ -9809,7 +9809,7 @@ "type": "Identifier", "span": { "start": 4530, - "end": 4554, + "end": 4532, "ctxt": 0 }, "value": "a2", @@ -9833,7 +9833,7 @@ "type": "Identifier", "span": { "start": 4542, - "end": 4546, + "end": 4543, "ctxt": 0 }, "value": "x", @@ -10005,7 +10005,7 @@ "type": "Identifier", "span": { "start": 4594, - "end": 4601, + "end": 4596, "ctxt": 0 }, "value": "a2", @@ -10103,7 +10103,7 @@ "type": "Identifier", "span": { "start": 4633, - "end": 4637, + "end": 4634, "ctxt": 0 }, "value": "x", @@ -10296,7 +10296,7 @@ "type": "Identifier", "span": { "start": 4772, - "end": 4801, + "end": 4774, "ctxt": 0 }, "value": "a2", @@ -10320,7 +10320,7 @@ "type": "Identifier", "span": { "start": 4784, - "end": 4788, + "end": 4785, "ctxt": 0 }, "value": "x", @@ -10482,7 +10482,7 @@ "type": "Identifier", "span": { "start": 4841, - "end": 4848, + "end": 4843, "ctxt": 0 }, "value": "a2", @@ -10580,7 +10580,7 @@ "type": "Identifier", "span": { "start": 4880, - "end": 4884, + "end": 4881, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures4.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures4.json index 763e60a146e8..0b9104f0af31 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures4.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures4.json @@ -347,7 +347,7 @@ "type": "Identifier", "span": { "start": 296, - "end": 319, + "end": 297, "ctxt": 0 }, "value": "a", @@ -371,7 +371,7 @@ "type": "Identifier", "span": { "start": 307, - "end": 311, + "end": 308, "ctxt": 0 }, "value": "x", @@ -517,7 +517,7 @@ "type": "Identifier", "span": { "start": 344, - "end": 350, + "end": 345, "ctxt": 0 }, "value": "a", @@ -596,7 +596,7 @@ "type": "Identifier", "span": { "start": 381, - "end": 410, + "end": 383, "ctxt": 0 }, "value": "a2", @@ -620,7 +620,7 @@ "type": "Identifier", "span": { "start": 393, - "end": 397, + "end": 394, "ctxt": 0 }, "value": "x", @@ -756,7 +756,7 @@ "type": "Identifier", "span": { "start": 435, - "end": 441, + "end": 436, "ctxt": 0 }, "value": "a", @@ -835,7 +835,7 @@ "type": "Identifier", "span": { "start": 472, - "end": 497, + "end": 474, "ctxt": 0 }, "value": "a3", @@ -859,7 +859,7 @@ "type": "Identifier", "span": { "start": 484, - "end": 488, + "end": 485, "ctxt": 0 }, "value": "x", @@ -987,7 +987,7 @@ "type": "Identifier", "span": { "start": 522, - "end": 528, + "end": 523, "ctxt": 0 }, "value": "a", @@ -1066,7 +1066,7 @@ "type": "Identifier", "span": { "start": 559, - "end": 595, + "end": 561, "ctxt": 0 }, "value": "a4", @@ -1090,7 +1090,7 @@ "type": "Identifier", "span": { "start": 574, - "end": 578, + "end": 575, "ctxt": 0 }, "value": "x", @@ -1127,7 +1127,7 @@ "type": "Identifier", "span": { "start": 580, - "end": 584, + "end": 581, "ctxt": 0 }, "value": "y", @@ -1278,7 +1278,7 @@ "type": "Identifier", "span": { "start": 620, - "end": 626, + "end": 621, "ctxt": 0 }, "value": "a", @@ -1357,7 +1357,7 @@ "type": "Identifier", "span": { "start": 657, - "end": 698, + "end": 659, "ctxt": 0 }, "value": "a5", @@ -1381,7 +1381,7 @@ "type": "Identifier", "span": { "start": 672, - "end": 692, + "end": 673, "ctxt": 0 }, "value": "x", @@ -1405,7 +1405,7 @@ "type": "Identifier", "span": { "start": 680, - "end": 686, + "end": 683, "ctxt": 0 }, "value": "arg", @@ -1599,7 +1599,7 @@ "type": "Identifier", "span": { "start": 723, - "end": 729, + "end": 724, "ctxt": 0 }, "value": "a", @@ -1678,7 +1678,7 @@ "type": "Identifier", "span": { "start": 760, - "end": 817, + "end": 762, "ctxt": 0 }, "value": "a6", @@ -1702,7 +1702,7 @@ "type": "Identifier", "span": { "start": 785, - "end": 811, + "end": 786, "ctxt": 0 }, "value": "x", @@ -1726,7 +1726,7 @@ "type": "Identifier", "span": { "start": 793, - "end": 799, + "end": 796, "ctxt": 0 }, "value": "arg", @@ -1915,7 +1915,7 @@ "type": "Identifier", "span": { "start": 842, - "end": 848, + "end": 843, "ctxt": 0 }, "value": "a", @@ -1994,7 +1994,7 @@ "type": "Identifier", "span": { "start": 880, - "end": 938, + "end": 883, "ctxt": 0 }, "value": "a11", @@ -2018,7 +2018,7 @@ "type": "Identifier", "span": { "start": 893, - "end": 906, + "end": 894, "ctxt": 0 }, "value": "x", @@ -2097,7 +2097,7 @@ "type": "Identifier", "span": { "start": 908, - "end": 929, + "end": 909, "ctxt": 0 }, "value": "y", @@ -2328,7 +2328,7 @@ "type": "Identifier", "span": { "start": 964, - "end": 970, + "end": 965, "ctxt": 0 }, "value": "a", @@ -2407,7 +2407,7 @@ "type": "Identifier", "span": { "start": 1002, - "end": 1040, + "end": 1005, "ctxt": 0 }, "value": "a15", @@ -2431,7 +2431,7 @@ "type": "Identifier", "span": { "start": 1015, - "end": 1032, + "end": 1016, "ctxt": 0 }, "value": "x", @@ -2670,7 +2670,7 @@ "type": "Identifier", "span": { "start": 1066, - "end": 1072, + "end": 1067, "ctxt": 0 }, "value": "a", @@ -2749,7 +2749,7 @@ "type": "Identifier", "span": { "start": 1104, - "end": 1155, + "end": 1107, "ctxt": 0 }, "value": "a16", @@ -2773,7 +2773,7 @@ "type": "Identifier", "span": { "start": 1130, - "end": 1147, + "end": 1131, "ctxt": 0 }, "value": "x", @@ -3030,7 +3030,7 @@ "type": "Identifier", "span": { "start": 1181, - "end": 1187, + "end": 1182, "ctxt": 0 }, "value": "a", @@ -3109,7 +3109,7 @@ "type": "Identifier", "span": { "start": 1219, - "end": 1340, + "end": 1222, "ctxt": 0 }, "value": "a17", @@ -3141,7 +3141,7 @@ "type": "Identifier", "span": { "start": 1254, - "end": 1272, + "end": 1255, "ctxt": 0 }, "value": "x", @@ -3165,7 +3165,7 @@ "type": "Identifier", "span": { "start": 1262, - "end": 1266, + "end": 1263, "ctxt": 0 }, "value": "a", @@ -3331,7 +3331,7 @@ "type": "Identifier", "span": { "start": 1305, - "end": 1323, + "end": 1306, "ctxt": 0 }, "value": "x", @@ -3355,7 +3355,7 @@ "type": "Identifier", "span": { "start": 1313, - "end": 1317, + "end": 1314, "ctxt": 0 }, "value": "a", @@ -3553,7 +3553,7 @@ "type": "Identifier", "span": { "start": 1366, - "end": 1372, + "end": 1367, "ctxt": 0 }, "value": "a", @@ -3632,7 +3632,7 @@ "type": "Identifier", "span": { "start": 1404, - "end": 1633, + "end": 1407, "ctxt": 0 }, "value": "a18", @@ -3664,7 +3664,7 @@ "type": "Identifier", "span": { "start": 1420, - "end": 1511, + "end": 1421, "ctxt": 0 }, "value": "x", @@ -3696,7 +3696,7 @@ "type": "Identifier", "span": { "start": 1457, - "end": 1461, + "end": 1458, "ctxt": 0 }, "value": "a", @@ -3821,7 +3821,7 @@ "type": "Identifier", "span": { "start": 1496, - "end": 1500, + "end": 1497, "ctxt": 0 }, "value": "a", @@ -3978,7 +3978,7 @@ "type": "Identifier", "span": { "start": 1530, - "end": 1622, + "end": 1531, "ctxt": 0 }, "value": "x", @@ -4010,7 +4010,7 @@ "type": "Identifier", "span": { "start": 1568, - "end": 1572, + "end": 1569, "ctxt": 0 }, "value": "a", @@ -4135,7 +4135,7 @@ "type": "Identifier", "span": { "start": 1607, - "end": 1611, + "end": 1608, "ctxt": 0 }, "value": "a", @@ -4324,7 +4324,7 @@ "type": "Identifier", "span": { "start": 1659, - "end": 1665, + "end": 1660, "ctxt": 0 }, "value": "a", @@ -4422,7 +4422,7 @@ "type": "Identifier", "span": { "start": 1693, - "end": 1697, + "end": 1694, "ctxt": 0 }, "value": "x", @@ -4578,7 +4578,7 @@ "type": "Identifier", "span": { "start": 1727, - "end": 1731, + "end": 1728, "ctxt": 0 }, "value": "x", @@ -4936,7 +4936,7 @@ "type": "Identifier", "span": { "start": 1837, - "end": 1841, + "end": 1838, "ctxt": 0 }, "value": "x", @@ -5082,7 +5082,7 @@ "type": "Identifier", "span": { "start": 1876, - "end": 1880, + "end": 1877, "ctxt": 0 }, "value": "x", @@ -5430,7 +5430,7 @@ "type": "Identifier", "span": { "start": 1991, - "end": 1995, + "end": 1992, "ctxt": 0 }, "value": "x", @@ -5578,7 +5578,7 @@ "type": "Identifier", "span": { "start": 2023, - "end": 2027, + "end": 2024, "ctxt": 0 }, "value": "x", @@ -5918,7 +5918,7 @@ "type": "Identifier", "span": { "start": 2137, - "end": 2141, + "end": 2138, "ctxt": 0 }, "value": "x", @@ -5955,7 +5955,7 @@ "type": "Identifier", "span": { "start": 2143, - "end": 2147, + "end": 2144, "ctxt": 0 }, "value": "y", @@ -6116,7 +6116,7 @@ "type": "Identifier", "span": { "start": 2183, - "end": 2187, + "end": 2184, "ctxt": 0 }, "value": "x", @@ -6153,7 +6153,7 @@ "type": "Identifier", "span": { "start": 2189, - "end": 2193, + "end": 2190, "ctxt": 0 }, "value": "y", @@ -6516,7 +6516,7 @@ "type": "Identifier", "span": { "start": 2305, - "end": 2325, + "end": 2306, "ctxt": 0 }, "value": "x", @@ -6540,7 +6540,7 @@ "type": "Identifier", "span": { "start": 2313, - "end": 2319, + "end": 2316, "ctxt": 0 }, "value": "arg", @@ -6744,7 +6744,7 @@ "type": "Identifier", "span": { "start": 2356, - "end": 2376, + "end": 2357, "ctxt": 0 }, "value": "x", @@ -6768,7 +6768,7 @@ "type": "Identifier", "span": { "start": 2364, - "end": 2370, + "end": 2367, "ctxt": 0 }, "value": "arg", @@ -7174,7 +7174,7 @@ "type": "Identifier", "span": { "start": 2512, - "end": 2532, + "end": 2513, "ctxt": 0 }, "value": "x", @@ -7198,7 +7198,7 @@ "type": "Identifier", "span": { "start": 2520, - "end": 2526, + "end": 2523, "ctxt": 0 }, "value": "arg", @@ -7438,7 +7438,7 @@ "type": "Identifier", "span": { "start": 2573, - "end": 2599, + "end": 2574, "ctxt": 0 }, "value": "x", @@ -7462,7 +7462,7 @@ "type": "Identifier", "span": { "start": 2581, - "end": 2587, + "end": 2584, "ctxt": 0 }, "value": "arg", @@ -7863,7 +7863,7 @@ "type": "Identifier", "span": { "start": 2707, - "end": 2720, + "end": 2708, "ctxt": 0 }, "value": "x", @@ -7942,7 +7942,7 @@ "type": "Identifier", "span": { "start": 2722, - "end": 2743, + "end": 2723, "ctxt": 0 }, "value": "y", @@ -8206,7 +8206,7 @@ "type": "Identifier", "span": { "start": 2775, - "end": 2788, + "end": 2776, "ctxt": 0 }, "value": "x", @@ -8285,7 +8285,7 @@ "type": "Identifier", "span": { "start": 2790, - "end": 2811, + "end": 2791, "ctxt": 0 }, "value": "y", @@ -8728,7 +8728,7 @@ "type": "Identifier", "span": { "start": 2931, - "end": 2949, + "end": 2932, "ctxt": 0 }, "value": "x", @@ -9000,7 +9000,7 @@ "type": "Identifier", "span": { "start": 2980, - "end": 2997, + "end": 2981, "ctxt": 0 }, "value": "x", @@ -9451,7 +9451,7 @@ "type": "Identifier", "span": { "start": 3126, - "end": 3143, + "end": 3127, "ctxt": 0 }, "value": "x", @@ -9718,7 +9718,7 @@ "type": "Identifier", "span": { "start": 3187, - "end": 3204, + "end": 3188, "ctxt": 0 }, "value": "x", @@ -10187,7 +10187,7 @@ "type": "Identifier", "span": { "start": 3320, - "end": 3338, + "end": 3321, "ctxt": 0 }, "value": "x", @@ -10211,7 +10211,7 @@ "type": "Identifier", "span": { "start": 3328, - "end": 3332, + "end": 3329, "ctxt": 0 }, "value": "a", @@ -10466,7 +10466,7 @@ "type": "Identifier", "span": { "start": 3391, - "end": 3412, + "end": 3392, "ctxt": 0 }, "value": "x", @@ -10490,7 +10490,7 @@ "type": "Identifier", "span": { "start": 3402, - "end": 3406, + "end": 3403, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures5.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures5.json index c81525c264fe..f9885758a414 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures5.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures5.json @@ -390,7 +390,7 @@ "type": "Identifier", "span": { "start": 426, - "end": 435, + "end": 427, "ctxt": 0 }, "value": "x", @@ -486,7 +486,7 @@ "type": "Identifier", "span": { "start": 463, - "end": 472, + "end": 464, "ctxt": 0 }, "value": "x", @@ -582,7 +582,7 @@ "type": "Identifier", "span": { "start": 500, - "end": 509, + "end": 501, "ctxt": 0 }, "value": "x", @@ -670,7 +670,7 @@ "type": "Identifier", "span": { "start": 533, - "end": 542, + "end": 534, "ctxt": 0 }, "value": "x", @@ -697,7 +697,7 @@ "type": "Identifier", "span": { "start": 544, - "end": 553, + "end": 545, "ctxt": 0 }, "value": "y", @@ -785,7 +785,7 @@ "type": "Identifier", "span": { "start": 579, - "end": 605, + "end": 580, "ctxt": 0 }, "value": "x", @@ -809,7 +809,7 @@ "type": "Identifier", "span": { "start": 583, - "end": 594, + "end": 586, "ctxt": 0 }, "value": "arg", @@ -919,7 +919,7 @@ "type": "Identifier", "span": { "start": 631, - "end": 656, + "end": 632, "ctxt": 0 }, "value": "x", @@ -943,7 +943,7 @@ "type": "Identifier", "span": { "start": 635, - "end": 644, + "end": 638, "ctxt": 0 }, "value": "arg", @@ -1083,7 +1083,7 @@ "type": "Identifier", "span": { "start": 680, - "end": 705, + "end": 681, "ctxt": 0 }, "value": "x", @@ -1107,7 +1107,7 @@ "type": "Identifier", "span": { "start": 684, - "end": 693, + "end": 687, "ctxt": 0 }, "value": "arg", @@ -1193,7 +1193,7 @@ "type": "Identifier", "span": { "start": 711, - "end": 718, + "end": 712, "ctxt": 0 }, "value": "r", @@ -1303,7 +1303,7 @@ "type": "Identifier", "span": { "start": 745, - "end": 770, + "end": 746, "ctxt": 0 }, "value": "x", @@ -1327,7 +1327,7 @@ "type": "Identifier", "span": { "start": 749, - "end": 758, + "end": 752, "ctxt": 0 }, "value": "arg", @@ -1396,7 +1396,7 @@ "type": "Identifier", "span": { "start": 772, - "end": 798, + "end": 773, "ctxt": 0 }, "value": "y", @@ -1420,7 +1420,7 @@ "type": "Identifier", "span": { "start": 776, - "end": 786, + "end": 780, "ctxt": 0 }, "value": "arg2", @@ -1506,7 +1506,7 @@ "type": "Identifier", "span": { "start": 804, - "end": 811, + "end": 805, "ctxt": 0 }, "value": "r", @@ -1616,7 +1616,7 @@ "type": "Identifier", "span": { "start": 838, - "end": 863, + "end": 839, "ctxt": 0 }, "value": "x", @@ -1640,7 +1640,7 @@ "type": "Identifier", "span": { "start": 842, - "end": 851, + "end": 845, "ctxt": 0 }, "value": "arg", @@ -1709,7 +1709,7 @@ "type": "Identifier", "span": { "start": 865, - "end": 891, + "end": 866, "ctxt": 0 }, "value": "y", @@ -1733,7 +1733,7 @@ "type": "Identifier", "span": { "start": 869, - "end": 879, + "end": 873, "ctxt": 0 }, "value": "arg2", @@ -1819,7 +1819,7 @@ "type": "Identifier", "span": { "start": 897, - "end": 904, + "end": 898, "ctxt": 0 }, "value": "r", @@ -2059,7 +2059,7 @@ "type": "Identifier", "span": { "start": 975, - "end": 993, + "end": 976, "ctxt": 0 }, "value": "x", @@ -2128,7 +2128,7 @@ "type": "Identifier", "span": { "start": 995, - "end": 1026, + "end": 996, "ctxt": 0 }, "value": "y", @@ -2309,7 +2309,7 @@ "type": "Identifier", "span": { "start": 1051, - "end": 1065, + "end": 1052, "ctxt": 0 }, "value": "x", @@ -2374,7 +2374,7 @@ "type": "Identifier", "span": { "start": 1067, - "end": 1085, + "end": 1068, "ctxt": 0 }, "value": "y", @@ -2538,7 +2538,7 @@ "type": "Identifier", "span": { "start": 1120, - "end": 1134, + "end": 1121, "ctxt": 0 }, "value": "x", @@ -2603,7 +2603,7 @@ "type": "Identifier", "span": { "start": 1136, - "end": 1153, + "end": 1137, "ctxt": 0 }, "value": "y", @@ -2767,7 +2767,7 @@ "type": "Identifier", "span": { "start": 1188, - "end": 1215, + "end": 1189, "ctxt": 0 }, "value": "x", @@ -2999,7 +2999,7 @@ "type": "Identifier", "span": { "start": 1270, - "end": 1274, + "end": 1271, "ctxt": 0 }, "value": "x", @@ -3198,7 +3198,7 @@ "type": "Identifier", "span": { "start": 1344, - "end": 1348, + "end": 1345, "ctxt": 0 }, "value": "x", @@ -3346,7 +3346,7 @@ "type": "Identifier", "span": { "start": 1431, - "end": 1435, + "end": 1432, "ctxt": 0 }, "value": "x", @@ -3484,7 +3484,7 @@ "type": "Identifier", "span": { "start": 1472, - "end": 1476, + "end": 1473, "ctxt": 0 }, "value": "x", @@ -3624,7 +3624,7 @@ "type": "Identifier", "span": { "start": 1533, - "end": 1537, + "end": 1534, "ctxt": 0 }, "value": "x", @@ -3661,7 +3661,7 @@ "type": "Identifier", "span": { "start": 1539, - "end": 1543, + "end": 1540, "ctxt": 0 }, "value": "y", @@ -3824,7 +3824,7 @@ "type": "Identifier", "span": { "start": 1640, - "end": 1656, + "end": 1641, "ctxt": 0 }, "value": "x", @@ -3848,7 +3848,7 @@ "type": "Identifier", "span": { "start": 1644, - "end": 1650, + "end": 1647, "ctxt": 0 }, "value": "arg", @@ -4043,7 +4043,7 @@ "type": "Identifier", "span": { "start": 1774, - "end": 1790, + "end": 1775, "ctxt": 0 }, "value": "x", @@ -4067,7 +4067,7 @@ "type": "Identifier", "span": { "start": 1778, - "end": 1784, + "end": 1781, "ctxt": 0 }, "value": "arg", @@ -4298,7 +4298,7 @@ "type": "Identifier", "span": { "start": 1895, - "end": 1911, + "end": 1896, "ctxt": 0 }, "value": "x", @@ -4322,7 +4322,7 @@ "type": "Identifier", "span": { "start": 1899, - "end": 1905, + "end": 1902, "ctxt": 0 }, "value": "arg", @@ -4499,7 +4499,7 @@ "type": "Identifier", "span": { "start": 1917, - "end": 1921, + "end": 1918, "ctxt": 0 }, "value": "r", @@ -4609,7 +4609,7 @@ "type": "Identifier", "span": { "start": 1983, - "end": 1999, + "end": 1984, "ctxt": 0 }, "value": "x", @@ -4633,7 +4633,7 @@ "type": "Identifier", "span": { "start": 1987, - "end": 1993, + "end": 1990, "ctxt": 0 }, "value": "arg", @@ -4702,7 +4702,7 @@ "type": "Identifier", "span": { "start": 2001, - "end": 2018, + "end": 2002, "ctxt": 0 }, "value": "y", @@ -4726,7 +4726,7 @@ "type": "Identifier", "span": { "start": 2005, - "end": 2012, + "end": 2009, "ctxt": 0 }, "value": "arg2", @@ -4903,7 +4903,7 @@ "type": "Identifier", "span": { "start": 2024, - "end": 2028, + "end": 2025, "ctxt": 0 }, "value": "r", @@ -5013,7 +5013,7 @@ "type": "Identifier", "span": { "start": 2090, - "end": 2106, + "end": 2091, "ctxt": 0 }, "value": "x", @@ -5037,7 +5037,7 @@ "type": "Identifier", "span": { "start": 2094, - "end": 2100, + "end": 2097, "ctxt": 0 }, "value": "arg", @@ -5106,7 +5106,7 @@ "type": "Identifier", "span": { "start": 2108, - "end": 2153, + "end": 2109, "ctxt": 0 }, "value": "y", @@ -5130,7 +5130,7 @@ "type": "Identifier", "span": { "start": 2112, - "end": 2147, + "end": 2116, "ctxt": 0 }, "value": "arg2", @@ -5380,7 +5380,7 @@ "type": "Identifier", "span": { "start": 2159, - "end": 2163, + "end": 2160, "ctxt": 0 }, "value": "r", @@ -5670,7 +5670,7 @@ "type": "Identifier", "span": { "start": 2306, - "end": 2310, + "end": 2307, "ctxt": 0 }, "value": "x", @@ -5707,7 +5707,7 @@ "type": "Identifier", "span": { "start": 2312, - "end": 2316, + "end": 2313, "ctxt": 0 }, "value": "y", @@ -5865,7 +5865,7 @@ "type": "Identifier", "span": { "start": 2367, - "end": 2381, + "end": 2368, "ctxt": 0 }, "value": "x", @@ -5930,7 +5930,7 @@ "type": "Identifier", "span": { "start": 2383, - "end": 2387, + "end": 2384, "ctxt": 0 }, "value": "y", @@ -6144,7 +6144,7 @@ "type": "Identifier", "span": { "start": 2484, - "end": 2498, + "end": 2485, "ctxt": 0 }, "value": "x", @@ -6209,7 +6209,7 @@ "type": "Identifier", "span": { "start": 2500, - "end": 2504, + "end": 2501, "ctxt": 0 }, "value": "y", @@ -6395,7 +6395,7 @@ "type": "Identifier", "span": { "start": 2625, - "end": 2642, + "end": 2626, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures6.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures6.json index fc912c21b26f..c65bf11dff80 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures6.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures6.json @@ -390,7 +390,7 @@ "type": "Identifier", "span": { "start": 444, - "end": 448, + "end": 445, "ctxt": 0 }, "value": "x", @@ -538,7 +538,7 @@ "type": "Identifier", "span": { "start": 474, - "end": 478, + "end": 475, "ctxt": 0 }, "value": "x", @@ -676,7 +676,7 @@ "type": "Identifier", "span": { "start": 509, - "end": 513, + "end": 510, "ctxt": 0 }, "value": "x", @@ -806,7 +806,7 @@ "type": "Identifier", "span": { "start": 543, - "end": 547, + "end": 544, "ctxt": 0 }, "value": "x", @@ -843,7 +843,7 @@ "type": "Identifier", "span": { "start": 549, - "end": 553, + "end": 550, "ctxt": 0 }, "value": "y", @@ -996,7 +996,7 @@ "type": "Identifier", "span": { "start": 585, - "end": 601, + "end": 586, "ctxt": 0 }, "value": "x", @@ -1020,7 +1020,7 @@ "type": "Identifier", "span": { "start": 589, - "end": 595, + "end": 592, "ctxt": 0 }, "value": "arg", @@ -1215,7 +1215,7 @@ "type": "Identifier", "span": { "start": 638, - "end": 660, + "end": 639, "ctxt": 0 }, "value": "x", @@ -1239,7 +1239,7 @@ "type": "Identifier", "span": { "start": 642, - "end": 648, + "end": 645, "ctxt": 0 }, "value": "arg", @@ -1429,7 +1429,7 @@ "type": "Identifier", "span": { "start": 685, - "end": 698, + "end": 686, "ctxt": 0 }, "value": "x", @@ -1508,7 +1508,7 @@ "type": "Identifier", "span": { "start": 700, - "end": 721, + "end": 701, "ctxt": 0 }, "value": "y", @@ -1741,7 +1741,7 @@ "type": "Identifier", "span": { "start": 749, - "end": 766, + "end": 750, "ctxt": 0 }, "value": "x", @@ -1982,7 +1982,7 @@ "type": "Identifier", "span": { "start": 806, - "end": 823, + "end": 807, "ctxt": 0 }, "value": "x", @@ -2324,7 +2324,7 @@ "type": "Identifier", "span": { "start": 882, - "end": 886, + "end": 883, "ctxt": 0 }, "value": "x", @@ -2523,7 +2523,7 @@ "type": "Identifier", "span": { "start": 941, - "end": 945, + "end": 942, "ctxt": 0 }, "value": "x", @@ -2712,7 +2712,7 @@ "type": "Identifier", "span": { "start": 1005, - "end": 1009, + "end": 1006, "ctxt": 0 }, "value": "x", @@ -2903,7 +2903,7 @@ "type": "Identifier", "span": { "start": 1064, - "end": 1068, + "end": 1065, "ctxt": 0 }, "value": "x", @@ -2940,7 +2940,7 @@ "type": "Identifier", "span": { "start": 1070, - "end": 1074, + "end": 1071, "ctxt": 0 }, "value": "y", @@ -3153,7 +3153,7 @@ "type": "Identifier", "span": { "start": 1135, - "end": 1151, + "end": 1136, "ctxt": 0 }, "value": "x", @@ -3177,7 +3177,7 @@ "type": "Identifier", "span": { "start": 1139, - "end": 1145, + "end": 1142, "ctxt": 0 }, "value": "arg", @@ -3432,7 +3432,7 @@ "type": "Identifier", "span": { "start": 1208, - "end": 1221, + "end": 1209, "ctxt": 0 }, "value": "x", @@ -3511,7 +3511,7 @@ "type": "Identifier", "span": { "start": 1223, - "end": 1244, + "end": 1224, "ctxt": 0 }, "value": "y", @@ -3827,7 +3827,7 @@ "type": "Identifier", "span": { "start": 1301, - "end": 1318, + "end": 1302, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignaturesWithOptionalParameters.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignaturesWithOptionalParameters.json index 028e8e64c660..41da38a3e5f9 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignaturesWithOptionalParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignaturesWithOptionalParameters.json @@ -135,7 +135,7 @@ "type": "Identifier", "span": { "start": 159, - "end": 169, + "end": 160, "ctxt": 0 }, "value": "x", @@ -223,7 +223,7 @@ "type": "Identifier", "span": { "start": 195, - "end": 204, + "end": 196, "ctxt": 0 }, "value": "x", @@ -311,7 +311,7 @@ "type": "Identifier", "span": { "start": 230, - "end": 239, + "end": 231, "ctxt": 0 }, "value": "x", @@ -338,7 +338,7 @@ "type": "Identifier", "span": { "start": 241, - "end": 251, + "end": 242, "ctxt": 0 }, "value": "y", @@ -426,7 +426,7 @@ "type": "Identifier", "span": { "start": 277, - "end": 287, + "end": 278, "ctxt": 0 }, "value": "x", @@ -453,7 +453,7 @@ "type": "Identifier", "span": { "start": 289, - "end": 299, + "end": 290, "ctxt": 0 }, "value": "y", @@ -703,7 +703,7 @@ "type": "Identifier", "span": { "start": 449, - "end": 459, + "end": 450, "ctxt": 0 }, "value": "x", @@ -842,7 +842,7 @@ "type": "Identifier", "span": { "start": 553, - "end": 562, + "end": 554, "ctxt": 0 }, "value": "x", @@ -1092,7 +1092,7 @@ "type": "Identifier", "span": { "start": 750, - "end": 760, + "end": 751, "ctxt": 0 }, "value": "x", @@ -1231,7 +1231,7 @@ "type": "Identifier", "span": { "start": 855, - "end": 864, + "end": 856, "ctxt": 0 }, "value": "x", @@ -1481,7 +1481,7 @@ "type": "Identifier", "span": { "start": 1037, - "end": 1047, + "end": 1038, "ctxt": 0 }, "value": "x", @@ -1620,7 +1620,7 @@ "type": "Identifier", "span": { "start": 1133, - "end": 1142, + "end": 1134, "ctxt": 0 }, "value": "x", @@ -1759,7 +1759,7 @@ "type": "Identifier", "span": { "start": 1238, - "end": 1247, + "end": 1239, "ctxt": 0 }, "value": "x", @@ -1786,7 +1786,7 @@ "type": "Identifier", "span": { "start": 1249, - "end": 1258, + "end": 1250, "ctxt": 0 }, "value": "y", @@ -2036,7 +2036,7 @@ "type": "Identifier", "span": { "start": 1440, - "end": 1450, + "end": 1441, "ctxt": 0 }, "value": "x", @@ -2063,7 +2063,7 @@ "type": "Identifier", "span": { "start": 1452, - "end": 1462, + "end": 1453, "ctxt": 0 }, "value": "y", @@ -2202,7 +2202,7 @@ "type": "Identifier", "span": { "start": 1549, - "end": 1558, + "end": 1550, "ctxt": 0 }, "value": "x", @@ -2341,7 +2341,7 @@ "type": "Identifier", "span": { "start": 1654, - "end": 1663, + "end": 1655, "ctxt": 0 }, "value": "x", @@ -2368,7 +2368,7 @@ "type": "Identifier", "span": { "start": 1665, - "end": 1674, + "end": 1666, "ctxt": 0 }, "value": "y", @@ -2618,7 +2618,7 @@ "type": "Identifier", "span": { "start": 1850, - "end": 1860, + "end": 1851, "ctxt": 0 }, "value": "x", @@ -2645,7 +2645,7 @@ "type": "Identifier", "span": { "start": 1862, - "end": 1872, + "end": 1863, "ctxt": 0 }, "value": "y", @@ -2784,7 +2784,7 @@ "type": "Identifier", "span": { "start": 1959, - "end": 1968, + "end": 1960, "ctxt": 0 }, "value": "x", @@ -2923,7 +2923,7 @@ "type": "Identifier", "span": { "start": 2058, - "end": 2067, + "end": 2059, "ctxt": 0 }, "value": "x", @@ -2950,7 +2950,7 @@ "type": "Identifier", "span": { "start": 2069, - "end": 2078, + "end": 2070, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignaturesWithSpecializedSignatures.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignaturesWithSpecializedSignatures.json index 1d15f83e70e4..bb2a0730b80a 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignaturesWithSpecializedSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignaturesWithSpecializedSignatures.json @@ -73,7 +73,7 @@ "type": "Identifier", "span": { "start": 196, - "end": 202, + "end": 197, "ctxt": 0 }, "value": "x", @@ -137,7 +137,7 @@ "type": "Identifier", "span": { "start": 224, - "end": 233, + "end": 225, "ctxt": 0 }, "value": "x", @@ -164,7 +164,7 @@ "type": "Identifier", "span": { "start": 235, - "end": 244, + "end": 236, "ctxt": 0 }, "value": "y", @@ -270,7 +270,7 @@ "type": "Identifier", "span": { "start": 330, - "end": 336, + "end": 331, "ctxt": 0 }, "value": "x", @@ -334,7 +334,7 @@ "type": "Identifier", "span": { "start": 392, - "end": 401, + "end": 393, "ctxt": 0 }, "value": "x", @@ -361,7 +361,7 @@ "type": "Identifier", "span": { "start": 403, - "end": 412, + "end": 404, "ctxt": 0 }, "value": "y", @@ -416,7 +416,7 @@ "type": "Identifier", "span": { "start": 471, - "end": 475, + "end": 472, "ctxt": 0 }, "value": "x", @@ -544,7 +544,7 @@ "type": "Identifier", "span": { "start": 583, - "end": 589, + "end": 584, "ctxt": 0 }, "value": "x", @@ -608,7 +608,7 @@ "type": "Identifier", "span": { "start": 613, - "end": 622, + "end": 614, "ctxt": 0 }, "value": "x", @@ -714,7 +714,7 @@ "type": "Identifier", "span": { "start": 712, - "end": 718, + "end": 713, "ctxt": 0 }, "value": "x", @@ -778,7 +778,7 @@ "type": "Identifier", "span": { "start": 742, - "end": 751, + "end": 743, "ctxt": 0 }, "value": "x", @@ -884,7 +884,7 @@ "type": "Identifier", "span": { "start": 884, - "end": 888, + "end": 885, "ctxt": 0 }, "value": "x", @@ -1079,7 +1079,7 @@ "type": "Identifier", "span": { "start": 1045, - "end": 1051, + "end": 1046, "ctxt": 0 }, "value": "x", @@ -1143,7 +1143,7 @@ "type": "Identifier", "span": { "start": 1077, - "end": 1086, + "end": 1078, "ctxt": 0 }, "value": "x", @@ -1240,7 +1240,7 @@ "type": "Identifier", "span": { "start": 1136, - "end": 1142, + "end": 1137, "ctxt": 0 }, "value": "x", @@ -1276,7 +1276,7 @@ "type": "Identifier", "span": { "start": 1144, - "end": 1153, + "end": 1145, "ctxt": 0 }, "value": "y", @@ -1331,7 +1331,7 @@ "type": "Identifier", "span": { "start": 1179, - "end": 1188, + "end": 1180, "ctxt": 0 }, "value": "x", @@ -1358,7 +1358,7 @@ "type": "Identifier", "span": { "start": 1190, - "end": 1199, + "end": 1191, "ctxt": 0 }, "value": "y", @@ -1447,7 +1447,7 @@ "type": "Identifier", "span": { "start": 1238, - "end": 1242, + "end": 1239, "ctxt": 0 }, "value": "x", @@ -1628,7 +1628,7 @@ "type": "Identifier", "span": { "start": 1333, - "end": 1342, + "end": 1334, "ctxt": 0 }, "value": "x", @@ -1716,7 +1716,7 @@ "type": "Identifier", "span": { "start": 1405, - "end": 1414, + "end": 1406, "ctxt": 0 }, "value": "x", @@ -1743,7 +1743,7 @@ "type": "Identifier", "span": { "start": 1416, - "end": 1425, + "end": 1417, "ctxt": 0 }, "value": "y", @@ -1831,7 +1831,7 @@ "type": "Identifier", "span": { "start": 1491, - "end": 1495, + "end": 1492, "ctxt": 0 }, "value": "x", @@ -2000,7 +2000,7 @@ "type": "Identifier", "span": { "start": 1619, - "end": 1625, + "end": 1620, "ctxt": 0 }, "value": "x", @@ -2064,7 +2064,7 @@ "type": "Identifier", "span": { "start": 1653, - "end": 1662, + "end": 1654, "ctxt": 0 }, "value": "x", @@ -2153,7 +2153,7 @@ "type": "Identifier", "span": { "start": 1703, - "end": 1707, + "end": 1704, "ctxt": 0 }, "value": "x", @@ -2344,7 +2344,7 @@ "type": "Identifier", "span": { "start": 1797, - "end": 1806, + "end": 1798, "ctxt": 0 }, "value": "x", @@ -2483,7 +2483,7 @@ "type": "Identifier", "span": { "start": 1945, - "end": 1949, + "end": 1946, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithGenericCallSignaturesWithOptionalParameters.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithGenericCallSignaturesWithOptionalParameters.json index 4fac07fe7e16..e66265688d25 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithGenericCallSignaturesWithOptionalParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithGenericCallSignaturesWithOptionalParameters.json @@ -203,7 +203,7 @@ "type": "Identifier", "span": { "start": 184, - "end": 189, + "end": 185, "ctxt": 0 }, "value": "x", @@ -310,7 +310,7 @@ "type": "Identifier", "span": { "start": 210, - "end": 214, + "end": 211, "ctxt": 0 }, "value": "x", @@ -417,7 +417,7 @@ "type": "Identifier", "span": { "start": 235, - "end": 239, + "end": 236, "ctxt": 0 }, "value": "x", @@ -454,7 +454,7 @@ "type": "Identifier", "span": { "start": 241, - "end": 246, + "end": 242, "ctxt": 0 }, "value": "y", @@ -561,7 +561,7 @@ "type": "Identifier", "span": { "start": 267, - "end": 272, + "end": 268, "ctxt": 0 }, "value": "x", @@ -598,7 +598,7 @@ "type": "Identifier", "span": { "start": 274, - "end": 279, + "end": 275, "ctxt": 0 }, "value": "y", @@ -996,7 +996,7 @@ "type": "Identifier", "span": { "start": 442, - "end": 447, + "end": 443, "ctxt": 0 }, "value": "x", @@ -1214,7 +1214,7 @@ "type": "Identifier", "span": { "start": 545, - "end": 549, + "end": 546, "ctxt": 0 }, "value": "x", @@ -1612,7 +1612,7 @@ "type": "Identifier", "span": { "start": 750, - "end": 755, + "end": 751, "ctxt": 0 }, "value": "x", @@ -1830,7 +1830,7 @@ "type": "Identifier", "span": { "start": 854, - "end": 858, + "end": 855, "ctxt": 0 }, "value": "x", @@ -2228,7 +2228,7 @@ "type": "Identifier", "span": { "start": 1049, - "end": 1054, + "end": 1050, "ctxt": 0 }, "value": "x", @@ -2446,7 +2446,7 @@ "type": "Identifier", "span": { "start": 1149, - "end": 1153, + "end": 1150, "ctxt": 0 }, "value": "x", @@ -2664,7 +2664,7 @@ "type": "Identifier", "span": { "start": 1253, - "end": 1257, + "end": 1254, "ctxt": 0 }, "value": "x", @@ -2701,7 +2701,7 @@ "type": "Identifier", "span": { "start": 1259, - "end": 1263, + "end": 1260, "ctxt": 0 }, "value": "y", @@ -3099,7 +3099,7 @@ "type": "Identifier", "span": { "start": 1463, - "end": 1468, + "end": 1464, "ctxt": 0 }, "value": "x", @@ -3136,7 +3136,7 @@ "type": "Identifier", "span": { "start": 1470, - "end": 1475, + "end": 1471, "ctxt": 0 }, "value": "y", @@ -3354,7 +3354,7 @@ "type": "Identifier", "span": { "start": 1571, - "end": 1575, + "end": 1572, "ctxt": 0 }, "value": "x", @@ -3572,7 +3572,7 @@ "type": "Identifier", "span": { "start": 1675, - "end": 1679, + "end": 1676, "ctxt": 0 }, "value": "x", @@ -3609,7 +3609,7 @@ "type": "Identifier", "span": { "start": 1681, - "end": 1685, + "end": 1682, "ctxt": 0 }, "value": "y", @@ -4007,7 +4007,7 @@ "type": "Identifier", "span": { "start": 1879, - "end": 1884, + "end": 1880, "ctxt": 0 }, "value": "x", @@ -4044,7 +4044,7 @@ "type": "Identifier", "span": { "start": 1886, - "end": 1891, + "end": 1887, "ctxt": 0 }, "value": "y", @@ -4262,7 +4262,7 @@ "type": "Identifier", "span": { "start": 1987, - "end": 1991, + "end": 1988, "ctxt": 0 }, "value": "x", @@ -4480,7 +4480,7 @@ "type": "Identifier", "span": { "start": 2090, - "end": 2094, + "end": 2091, "ctxt": 0 }, "value": "x", @@ -4517,7 +4517,7 @@ "type": "Identifier", "span": { "start": 2096, - "end": 2100, + "end": 2097, "ctxt": 0 }, "value": "y", @@ -4786,7 +4786,7 @@ "type": "Identifier", "span": { "start": 2274, - "end": 2279, + "end": 2275, "ctxt": 0 }, "value": "x", @@ -4925,7 +4925,7 @@ "type": "Identifier", "span": { "start": 2303, - "end": 2307, + "end": 2304, "ctxt": 0 }, "value": "x", @@ -5064,7 +5064,7 @@ "type": "Identifier", "span": { "start": 2331, - "end": 2335, + "end": 2332, "ctxt": 0 }, "value": "x", @@ -5101,7 +5101,7 @@ "type": "Identifier", "span": { "start": 2337, - "end": 2342, + "end": 2338, "ctxt": 0 }, "value": "y", @@ -5240,7 +5240,7 @@ "type": "Identifier", "span": { "start": 2366, - "end": 2371, + "end": 2367, "ctxt": 0 }, "value": "x", @@ -5277,7 +5277,7 @@ "type": "Identifier", "span": { "start": 2373, - "end": 2378, + "end": 2374, "ctxt": 0 }, "value": "y", @@ -5651,7 +5651,7 @@ "type": "Identifier", "span": { "start": 2505, - "end": 2510, + "end": 2506, "ctxt": 0 }, "value": "x", @@ -5841,7 +5841,7 @@ "type": "Identifier", "span": { "start": 2573, - "end": 2577, + "end": 2574, "ctxt": 0 }, "value": "x", @@ -6183,7 +6183,7 @@ "type": "Identifier", "span": { "start": 2708, - "end": 2713, + "end": 2709, "ctxt": 0 }, "value": "x", @@ -6373,7 +6373,7 @@ "type": "Identifier", "span": { "start": 2776, - "end": 2780, + "end": 2777, "ctxt": 0 }, "value": "x", @@ -6715,7 +6715,7 @@ "type": "Identifier", "span": { "start": 2909, - "end": 2914, + "end": 2910, "ctxt": 0 }, "value": "x", @@ -6905,7 +6905,7 @@ "type": "Identifier", "span": { "start": 2979, - "end": 2983, + "end": 2980, "ctxt": 0 }, "value": "x", @@ -7095,7 +7095,7 @@ "type": "Identifier", "span": { "start": 3049, - "end": 3053, + "end": 3050, "ctxt": 0 }, "value": "x", @@ -7132,7 +7132,7 @@ "type": "Identifier", "span": { "start": 3055, - "end": 3059, + "end": 3056, "ctxt": 0 }, "value": "y", @@ -7474,7 +7474,7 @@ "type": "Identifier", "span": { "start": 3193, - "end": 3198, + "end": 3194, "ctxt": 0 }, "value": "x", @@ -7511,7 +7511,7 @@ "type": "Identifier", "span": { "start": 3200, - "end": 3205, + "end": 3201, "ctxt": 0 }, "value": "y", @@ -7701,7 +7701,7 @@ "type": "Identifier", "span": { "start": 3271, - "end": 3275, + "end": 3272, "ctxt": 0 }, "value": "x", @@ -7891,7 +7891,7 @@ "type": "Identifier", "span": { "start": 3341, - "end": 3345, + "end": 3342, "ctxt": 0 }, "value": "x", @@ -7928,7 +7928,7 @@ "type": "Identifier", "span": { "start": 3347, - "end": 3351, + "end": 3348, "ctxt": 0 }, "value": "y", @@ -8270,7 +8270,7 @@ "type": "Identifier", "span": { "start": 3484, - "end": 3489, + "end": 3485, "ctxt": 0 }, "value": "x", @@ -8307,7 +8307,7 @@ "type": "Identifier", "span": { "start": 3491, - "end": 3496, + "end": 3492, "ctxt": 0 }, "value": "y", @@ -8497,7 +8497,7 @@ "type": "Identifier", "span": { "start": 3562, - "end": 3566, + "end": 3563, "ctxt": 0 }, "value": "x", @@ -8687,7 +8687,7 @@ "type": "Identifier", "span": { "start": 3631, - "end": 3635, + "end": 3632, "ctxt": 0 }, "value": "x", @@ -8724,7 +8724,7 @@ "type": "Identifier", "span": { "start": 3637, - "end": 3641, + "end": 3638, "ctxt": 0 }, "value": "y", @@ -8993,7 +8993,7 @@ "type": "Identifier", "span": { "start": 3753, - "end": 3758, + "end": 3754, "ctxt": 0 }, "value": "x", @@ -9132,7 +9132,7 @@ "type": "Identifier", "span": { "start": 3782, - "end": 3786, + "end": 3783, "ctxt": 0 }, "value": "x", @@ -9271,7 +9271,7 @@ "type": "Identifier", "span": { "start": 3810, - "end": 3814, + "end": 3811, "ctxt": 0 }, "value": "x", @@ -9308,7 +9308,7 @@ "type": "Identifier", "span": { "start": 3816, - "end": 3821, + "end": 3817, "ctxt": 0 }, "value": "y", @@ -9447,7 +9447,7 @@ "type": "Identifier", "span": { "start": 3845, - "end": 3850, + "end": 3846, "ctxt": 0 }, "value": "x", @@ -9484,7 +9484,7 @@ "type": "Identifier", "span": { "start": 3852, - "end": 3857, + "end": 3853, "ctxt": 0 }, "value": "y", @@ -9826,7 +9826,7 @@ "type": "Identifier", "span": { "start": 4039, - "end": 4044, + "end": 4040, "ctxt": 0 }, "value": "x", @@ -10016,7 +10016,7 @@ "type": "Identifier", "span": { "start": 4202, - "end": 4206, + "end": 4203, "ctxt": 0 }, "value": "x", @@ -10358,7 +10358,7 @@ "type": "Identifier", "span": { "start": 4525, - "end": 4530, + "end": 4526, "ctxt": 0 }, "value": "x", @@ -10548,7 +10548,7 @@ "type": "Identifier", "span": { "start": 4611, - "end": 4615, + "end": 4612, "ctxt": 0 }, "value": "x", @@ -10890,7 +10890,7 @@ "type": "Identifier", "span": { "start": 4845, - "end": 4850, + "end": 4846, "ctxt": 0 }, "value": "x", @@ -11080,7 +11080,7 @@ "type": "Identifier", "span": { "start": 4943, - "end": 4947, + "end": 4944, "ctxt": 0 }, "value": "x", @@ -11270,7 +11270,7 @@ "type": "Identifier", "span": { "start": 5061, - "end": 5065, + "end": 5062, "ctxt": 0 }, "value": "x", @@ -11307,7 +11307,7 @@ "type": "Identifier", "span": { "start": 5067, - "end": 5071, + "end": 5068, "ctxt": 0 }, "value": "y", @@ -11649,7 +11649,7 @@ "type": "Identifier", "span": { "start": 5333, - "end": 5338, + "end": 5334, "ctxt": 0 }, "value": "x", @@ -11686,7 +11686,7 @@ "type": "Identifier", "span": { "start": 5340, - "end": 5345, + "end": 5341, "ctxt": 0 }, "value": "y", @@ -11876,7 +11876,7 @@ "type": "Identifier", "span": { "start": 5439, - "end": 5443, + "end": 5440, "ctxt": 0 }, "value": "x", @@ -12066,7 +12066,7 @@ "type": "Identifier", "span": { "start": 5541, - "end": 5545, + "end": 5542, "ctxt": 0 }, "value": "x", @@ -12103,7 +12103,7 @@ "type": "Identifier", "span": { "start": 5547, - "end": 5551, + "end": 5548, "ctxt": 0 }, "value": "y", @@ -12445,7 +12445,7 @@ "type": "Identifier", "span": { "start": 5813, - "end": 5818, + "end": 5814, "ctxt": 0 }, "value": "x", @@ -12482,7 +12482,7 @@ "type": "Identifier", "span": { "start": 5820, - "end": 5825, + "end": 5821, "ctxt": 0 }, "value": "y", @@ -12672,7 +12672,7 @@ "type": "Identifier", "span": { "start": 5919, - "end": 5923, + "end": 5920, "ctxt": 0 }, "value": "x", @@ -12862,7 +12862,7 @@ "type": "Identifier", "span": { "start": 6020, - "end": 6024, + "end": 6021, "ctxt": 0 }, "value": "x", @@ -12899,7 +12899,7 @@ "type": "Identifier", "span": { "start": 6026, - "end": 6030, + "end": 6027, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithGenericConstructSignaturesWithOptionalParameters.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithGenericConstructSignaturesWithOptionalParameters.json index 51dc49cd08a5..db0c325b4e00 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithGenericConstructSignaturesWithOptionalParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithGenericConstructSignaturesWithOptionalParameters.json @@ -204,7 +204,7 @@ "type": "Identifier", "span": { "start": 192, - "end": 197, + "end": 193, "ctxt": 0 }, "value": "x", @@ -312,7 +312,7 @@ "type": "Identifier", "span": { "start": 222, - "end": 226, + "end": 223, "ctxt": 0 }, "value": "x", @@ -420,7 +420,7 @@ "type": "Identifier", "span": { "start": 251, - "end": 255, + "end": 252, "ctxt": 0 }, "value": "x", @@ -457,7 +457,7 @@ "type": "Identifier", "span": { "start": 257, - "end": 262, + "end": 258, "ctxt": 0 }, "value": "y", @@ -565,7 +565,7 @@ "type": "Identifier", "span": { "start": 287, - "end": 292, + "end": 288, "ctxt": 0 }, "value": "x", @@ -602,7 +602,7 @@ "type": "Identifier", "span": { "start": 294, - "end": 299, + "end": 295, "ctxt": 0 }, "value": "y", @@ -1002,7 +1002,7 @@ "type": "Identifier", "span": { "start": 470, - "end": 475, + "end": 471, "ctxt": 0 }, "value": "x", @@ -1221,7 +1221,7 @@ "type": "Identifier", "span": { "start": 577, - "end": 581, + "end": 578, "ctxt": 0 }, "value": "x", @@ -1621,7 +1621,7 @@ "type": "Identifier", "span": { "start": 790, - "end": 795, + "end": 791, "ctxt": 0 }, "value": "x", @@ -1840,7 +1840,7 @@ "type": "Identifier", "span": { "start": 898, - "end": 902, + "end": 899, "ctxt": 0 }, "value": "x", @@ -2240,7 +2240,7 @@ "type": "Identifier", "span": { "start": 1101, - "end": 1106, + "end": 1102, "ctxt": 0 }, "value": "x", @@ -2459,7 +2459,7 @@ "type": "Identifier", "span": { "start": 1205, - "end": 1209, + "end": 1206, "ctxt": 0 }, "value": "x", @@ -2678,7 +2678,7 @@ "type": "Identifier", "span": { "start": 1313, - "end": 1317, + "end": 1314, "ctxt": 0 }, "value": "x", @@ -2715,7 +2715,7 @@ "type": "Identifier", "span": { "start": 1319, - "end": 1323, + "end": 1320, "ctxt": 0 }, "value": "y", @@ -3115,7 +3115,7 @@ "type": "Identifier", "span": { "start": 1531, - "end": 1536, + "end": 1532, "ctxt": 0 }, "value": "x", @@ -3152,7 +3152,7 @@ "type": "Identifier", "span": { "start": 1538, - "end": 1543, + "end": 1539, "ctxt": 0 }, "value": "y", @@ -3371,7 +3371,7 @@ "type": "Identifier", "span": { "start": 1643, - "end": 1647, + "end": 1644, "ctxt": 0 }, "value": "x", @@ -3590,7 +3590,7 @@ "type": "Identifier", "span": { "start": 1751, - "end": 1755, + "end": 1752, "ctxt": 0 }, "value": "x", @@ -3627,7 +3627,7 @@ "type": "Identifier", "span": { "start": 1757, - "end": 1761, + "end": 1758, "ctxt": 0 }, "value": "y", @@ -4027,7 +4027,7 @@ "type": "Identifier", "span": { "start": 1963, - "end": 1968, + "end": 1964, "ctxt": 0 }, "value": "x", @@ -4064,7 +4064,7 @@ "type": "Identifier", "span": { "start": 1970, - "end": 1975, + "end": 1971, "ctxt": 0 }, "value": "y", @@ -4283,7 +4283,7 @@ "type": "Identifier", "span": { "start": 2075, - "end": 2079, + "end": 2076, "ctxt": 0 }, "value": "x", @@ -4502,7 +4502,7 @@ "type": "Identifier", "span": { "start": 2182, - "end": 2186, + "end": 2183, "ctxt": 0 }, "value": "x", @@ -4539,7 +4539,7 @@ "type": "Identifier", "span": { "start": 2188, - "end": 2192, + "end": 2189, "ctxt": 0 }, "value": "y", @@ -4810,7 +4810,7 @@ "type": "Identifier", "span": { "start": 2374, - "end": 2379, + "end": 2375, "ctxt": 0 }, "value": "x", @@ -4950,7 +4950,7 @@ "type": "Identifier", "span": { "start": 2407, - "end": 2411, + "end": 2408, "ctxt": 0 }, "value": "x", @@ -5090,7 +5090,7 @@ "type": "Identifier", "span": { "start": 2439, - "end": 2443, + "end": 2440, "ctxt": 0 }, "value": "x", @@ -5127,7 +5127,7 @@ "type": "Identifier", "span": { "start": 2445, - "end": 2450, + "end": 2446, "ctxt": 0 }, "value": "y", @@ -5267,7 +5267,7 @@ "type": "Identifier", "span": { "start": 2478, - "end": 2483, + "end": 2479, "ctxt": 0 }, "value": "x", @@ -5304,7 +5304,7 @@ "type": "Identifier", "span": { "start": 2485, - "end": 2490, + "end": 2486, "ctxt": 0 }, "value": "y", @@ -5680,7 +5680,7 @@ "type": "Identifier", "span": { "start": 2625, - "end": 2630, + "end": 2626, "ctxt": 0 }, "value": "x", @@ -5871,7 +5871,7 @@ "type": "Identifier", "span": { "start": 2697, - "end": 2701, + "end": 2698, "ctxt": 0 }, "value": "x", @@ -6215,7 +6215,7 @@ "type": "Identifier", "span": { "start": 2840, - "end": 2845, + "end": 2841, "ctxt": 0 }, "value": "x", @@ -6406,7 +6406,7 @@ "type": "Identifier", "span": { "start": 2912, - "end": 2916, + "end": 2913, "ctxt": 0 }, "value": "x", @@ -6750,7 +6750,7 @@ "type": "Identifier", "span": { "start": 3053, - "end": 3058, + "end": 3054, "ctxt": 0 }, "value": "x", @@ -6941,7 +6941,7 @@ "type": "Identifier", "span": { "start": 3127, - "end": 3131, + "end": 3128, "ctxt": 0 }, "value": "x", @@ -7132,7 +7132,7 @@ "type": "Identifier", "span": { "start": 3201, - "end": 3205, + "end": 3202, "ctxt": 0 }, "value": "x", @@ -7169,7 +7169,7 @@ "type": "Identifier", "span": { "start": 3207, - "end": 3211, + "end": 3208, "ctxt": 0 }, "value": "y", @@ -7513,7 +7513,7 @@ "type": "Identifier", "span": { "start": 3353, - "end": 3358, + "end": 3354, "ctxt": 0 }, "value": "x", @@ -7550,7 +7550,7 @@ "type": "Identifier", "span": { "start": 3360, - "end": 3365, + "end": 3361, "ctxt": 0 }, "value": "y", @@ -7741,7 +7741,7 @@ "type": "Identifier", "span": { "start": 3435, - "end": 3439, + "end": 3436, "ctxt": 0 }, "value": "x", @@ -7932,7 +7932,7 @@ "type": "Identifier", "span": { "start": 3509, - "end": 3513, + "end": 3510, "ctxt": 0 }, "value": "x", @@ -7969,7 +7969,7 @@ "type": "Identifier", "span": { "start": 3515, - "end": 3519, + "end": 3516, "ctxt": 0 }, "value": "y", @@ -8313,7 +8313,7 @@ "type": "Identifier", "span": { "start": 3660, - "end": 3665, + "end": 3661, "ctxt": 0 }, "value": "x", @@ -8350,7 +8350,7 @@ "type": "Identifier", "span": { "start": 3667, - "end": 3672, + "end": 3668, "ctxt": 0 }, "value": "y", @@ -8541,7 +8541,7 @@ "type": "Identifier", "span": { "start": 3742, - "end": 3746, + "end": 3743, "ctxt": 0 }, "value": "x", @@ -8732,7 +8732,7 @@ "type": "Identifier", "span": { "start": 3815, - "end": 3819, + "end": 3816, "ctxt": 0 }, "value": "x", @@ -8769,7 +8769,7 @@ "type": "Identifier", "span": { "start": 3821, - "end": 3825, + "end": 3822, "ctxt": 0 }, "value": "y", @@ -9040,7 +9040,7 @@ "type": "Identifier", "span": { "start": 3945, - "end": 3950, + "end": 3946, "ctxt": 0 }, "value": "x", @@ -9180,7 +9180,7 @@ "type": "Identifier", "span": { "start": 3978, - "end": 3982, + "end": 3979, "ctxt": 0 }, "value": "x", @@ -9320,7 +9320,7 @@ "type": "Identifier", "span": { "start": 4010, - "end": 4014, + "end": 4011, "ctxt": 0 }, "value": "x", @@ -9357,7 +9357,7 @@ "type": "Identifier", "span": { "start": 4016, - "end": 4021, + "end": 4017, "ctxt": 0 }, "value": "y", @@ -9497,7 +9497,7 @@ "type": "Identifier", "span": { "start": 4049, - "end": 4054, + "end": 4050, "ctxt": 0 }, "value": "x", @@ -9534,7 +9534,7 @@ "type": "Identifier", "span": { "start": 4056, - "end": 4061, + "end": 4057, "ctxt": 0 }, "value": "y", @@ -9878,7 +9878,7 @@ "type": "Identifier", "span": { "start": 4251, - "end": 4256, + "end": 4252, "ctxt": 0 }, "value": "x", @@ -10069,7 +10069,7 @@ "type": "Identifier", "span": { "start": 4418, - "end": 4422, + "end": 4419, "ctxt": 0 }, "value": "x", @@ -10413,7 +10413,7 @@ "type": "Identifier", "span": { "start": 4749, - "end": 4754, + "end": 4750, "ctxt": 0 }, "value": "x", @@ -10604,7 +10604,7 @@ "type": "Identifier", "span": { "start": 4839, - "end": 4843, + "end": 4840, "ctxt": 0 }, "value": "x", @@ -10948,7 +10948,7 @@ "type": "Identifier", "span": { "start": 5038, - "end": 5043, + "end": 5039, "ctxt": 0 }, "value": "x", @@ -11139,7 +11139,7 @@ "type": "Identifier", "span": { "start": 5183, - "end": 5187, + "end": 5184, "ctxt": 0 }, "value": "x", @@ -11330,7 +11330,7 @@ "type": "Identifier", "span": { "start": 5305, - "end": 5309, + "end": 5306, "ctxt": 0 }, "value": "x", @@ -11367,7 +11367,7 @@ "type": "Identifier", "span": { "start": 5311, - "end": 5315, + "end": 5312, "ctxt": 0 }, "value": "y", @@ -11711,7 +11711,7 @@ "type": "Identifier", "span": { "start": 5585, - "end": 5590, + "end": 5586, "ctxt": 0 }, "value": "x", @@ -11748,7 +11748,7 @@ "type": "Identifier", "span": { "start": 5592, - "end": 5597, + "end": 5593, "ctxt": 0 }, "value": "y", @@ -11939,7 +11939,7 @@ "type": "Identifier", "span": { "start": 5695, - "end": 5699, + "end": 5696, "ctxt": 0 }, "value": "x", @@ -12130,7 +12130,7 @@ "type": "Identifier", "span": { "start": 5801, - "end": 5805, + "end": 5802, "ctxt": 0 }, "value": "x", @@ -12167,7 +12167,7 @@ "type": "Identifier", "span": { "start": 5807, - "end": 5811, + "end": 5808, "ctxt": 0 }, "value": "y", @@ -12511,7 +12511,7 @@ "type": "Identifier", "span": { "start": 6075, - "end": 6080, + "end": 6076, "ctxt": 0 }, "value": "x", @@ -12548,7 +12548,7 @@ "type": "Identifier", "span": { "start": 6082, - "end": 6087, + "end": 6083, "ctxt": 0 }, "value": "y", @@ -12739,7 +12739,7 @@ "type": "Identifier", "span": { "start": 6185, - "end": 6189, + "end": 6186, "ctxt": 0 }, "value": "x", @@ -12930,7 +12930,7 @@ "type": "Identifier", "span": { "start": 6290, - "end": 6294, + "end": 6291, "ctxt": 0 }, "value": "x", @@ -12967,7 +12967,7 @@ "type": "Identifier", "span": { "start": 6296, - "end": 6300, + "end": 6297, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithOptionalProperties.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithOptionalProperties.json index 7fb2187484f5..28e987ee2711 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithOptionalProperties.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithOptionalProperties.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 160, - "end": 164, + "end": 161, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/superCallInConstructorWithNoBaseType.json b/crates/swc_ecma_parser/tests/tsc/superCallInConstructorWithNoBaseType.json index 3b41824429e3..7801e5cb8402 100644 --- a/crates/swc_ecma_parser/tests/tsc/superCallInConstructorWithNoBaseType.json +++ b/crates/swc_ecma_parser/tests/tsc/superCallInConstructorWithNoBaseType.json @@ -143,7 +143,7 @@ "type": "Identifier", "span": { "start": 109, - "end": 113, + "end": 110, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/superCallParameterContextualTyping1.json b/crates/swc_ecma_parser/tests/tsc/superCallParameterContextualTyping1.json index 4328b02912e8..8d3fb30d72ec 100644 --- a/crates/swc_ecma_parser/tests/tsc/superCallParameterContextualTyping1.json +++ b/crates/swc_ecma_parser/tests/tsc/superCallParameterContextualTyping1.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 44, - "end": 66, + "end": 47, "ctxt": 0 }, "value": "map", @@ -83,7 +83,7 @@ "type": "Identifier", "span": { "start": 50, - "end": 59, + "end": 55, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/superCallParameterContextualTyping2.json b/crates/swc_ecma_parser/tests/tsc/superCallParameterContextualTyping2.json index 5b5251aa6487..6ddb6d670178 100644 --- a/crates/swc_ecma_parser/tests/tsc/superCallParameterContextualTyping2.json +++ b/crates/swc_ecma_parser/tests/tsc/superCallParameterContextualTyping2.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 44, - "end": 66, + "end": 47, "ctxt": 0 }, "value": "map", @@ -83,7 +83,7 @@ "type": "Identifier", "span": { "start": 50, - "end": 59, + "end": 55, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/superCallParameterContextualTyping3.json b/crates/swc_ecma_parser/tests/tsc/superCallParameterContextualTyping3.json index d4031d25d280..ea2fa32ecd0f 100644 --- a/crates/swc_ecma_parser/tests/tsc/superCallParameterContextualTyping3.json +++ b/crates/swc_ecma_parser/tests/tsc/superCallParameterContextualTyping3.json @@ -91,7 +91,7 @@ "type": "Identifier", "span": { "start": 42, - "end": 54, + "end": 51, "ctxt": 0 }, "value": "parameter", @@ -197,7 +197,7 @@ "type": "Identifier", "span": { "start": 100, - "end": 124, + "end": 105, "ctxt": 0 }, "value": "param", @@ -303,7 +303,7 @@ "type": "Identifier", "span": { "start": 143, - "end": 167, + "end": 148, "ctxt": 0 }, "value": "param", diff --git a/crates/swc_ecma_parser/tests/tsc/superCalls.json b/crates/swc_ecma_parser/tests/tsc/superCalls.json index ad0113731ce8..f576b6dda489 100644 --- a/crates/swc_ecma_parser/tests/tsc/superCalls.json +++ b/crates/swc_ecma_parser/tests/tsc/superCalls.json @@ -94,7 +94,7 @@ "type": "Identifier", "span": { "start": 42, - "end": 51, + "end": 43, "ctxt": 0 }, "value": "n", @@ -241,7 +241,7 @@ "type": "Identifier", "span": { "start": 195, - "end": 204, + "end": 196, "ctxt": 0 }, "value": "q", diff --git a/crates/swc_ecma_parser/tests/tsc/switchStatements.json b/crates/swc_ecma_parser/tests/tsc/switchStatements.json index 4cf42f726316..334d823a1d94 100644 --- a/crates/swc_ecma_parser/tests/tsc/switchStatements.json +++ b/crates/swc_ecma_parser/tests/tsc/switchStatements.json @@ -66,7 +66,7 @@ "type": "Identifier", "span": { "start": 35, - "end": 44, + "end": 36, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/switchWithConstrainedTypeVariable.json b/crates/swc_ecma_parser/tests/tsc/switchWithConstrainedTypeVariable.json index 124ac21d1f0e..722288eab0d6 100644 --- a/crates/swc_ecma_parser/tests/tsc/switchWithConstrainedTypeVariable.json +++ b/crates/swc_ecma_parser/tests/tsc/switchWithConstrainedTypeVariable.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 81, - "end": 87, + "end": 84, "ctxt": 0 }, "value": "key", diff --git a/crates/swc_ecma_parser/tests/tsc/symbolDeclarationEmit12.json b/crates/swc_ecma_parser/tests/tsc/symbolDeclarationEmit12.json index f0d78a2da590..ed645d1c06dc 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolDeclarationEmit12.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolDeclarationEmit12.json @@ -228,7 +228,7 @@ "type": "Identifier", "span": { "start": 148, - "end": 152, + "end": 149, "ctxt": 0 }, "value": "x", @@ -555,7 +555,7 @@ "type": "Identifier", "span": { "start": 330, - "end": 334, + "end": 331, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/symbolDeclarationEmit3.json b/crates/swc_ecma_parser/tests/tsc/symbolDeclarationEmit3.json index 4159e4aabeb6..662f5c5f08b4 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolDeclarationEmit3.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolDeclarationEmit3.json @@ -83,7 +83,7 @@ "type": "Identifier", "span": { "start": 72, - "end": 81, + "end": 73, "ctxt": 0 }, "value": "x", @@ -184,7 +184,7 @@ "type": "Identifier", "span": { "start": 109, - "end": 118, + "end": 110, "ctxt": 0 }, "value": "x", @@ -285,7 +285,7 @@ "type": "Identifier", "span": { "start": 146, - "end": 152, + "end": 147, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty13.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty13.json index 4f099a56c582..9ae3d408588a 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty13.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty13.json @@ -297,7 +297,7 @@ "type": "Identifier", "span": { "start": 129, - "end": 133, + "end": 130, "ctxt": 0 }, "value": "i", @@ -396,7 +396,7 @@ "type": "Identifier", "span": { "start": 160, - "end": 166, + "end": 161, "ctxt": 0 }, "value": "a", @@ -475,7 +475,7 @@ "type": "Identifier", "span": { "start": 196, - "end": 200, + "end": 197, "ctxt": 0 }, "value": "i", @@ -574,7 +574,7 @@ "type": "Identifier", "span": { "start": 227, - "end": 233, + "end": 228, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty14.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty14.json index 085eabf4826c..53528061de6d 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty14.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty14.json @@ -297,7 +297,7 @@ "type": "Identifier", "span": { "start": 130, - "end": 134, + "end": 131, "ctxt": 0 }, "value": "i", @@ -396,7 +396,7 @@ "type": "Identifier", "span": { "start": 161, - "end": 167, + "end": 162, "ctxt": 0 }, "value": "a", @@ -475,7 +475,7 @@ "type": "Identifier", "span": { "start": 197, - "end": 201, + "end": 198, "ctxt": 0 }, "value": "i", @@ -574,7 +574,7 @@ "type": "Identifier", "span": { "start": 228, - "end": 234, + "end": 229, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty15.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty15.json index f566037f63de..802f8990b598 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty15.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty15.json @@ -174,7 +174,7 @@ "type": "Identifier", "span": { "start": 97, - "end": 101, + "end": 98, "ctxt": 0 }, "value": "i", @@ -273,7 +273,7 @@ "type": "Identifier", "span": { "start": 128, - "end": 134, + "end": 129, "ctxt": 0 }, "value": "a", @@ -352,7 +352,7 @@ "type": "Identifier", "span": { "start": 164, - "end": 168, + "end": 165, "ctxt": 0 }, "value": "i", @@ -451,7 +451,7 @@ "type": "Identifier", "span": { "start": 195, - "end": 201, + "end": 196, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty16.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty16.json index ff2b045e560f..b2a20018d2cc 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty16.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty16.json @@ -272,7 +272,7 @@ "type": "Identifier", "span": { "start": 134, - "end": 138, + "end": 135, "ctxt": 0 }, "value": "i", @@ -371,7 +371,7 @@ "type": "Identifier", "span": { "start": 165, - "end": 171, + "end": 166, "ctxt": 0 }, "value": "a", @@ -450,7 +450,7 @@ "type": "Identifier", "span": { "start": 201, - "end": 205, + "end": 202, "ctxt": 0 }, "value": "i", @@ -549,7 +549,7 @@ "type": "Identifier", "span": { "start": 232, - "end": 238, + "end": 233, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty18.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty18.json index 39da0afcf8c5..8c2d8f446748 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty18.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty18.json @@ -217,7 +217,7 @@ "type": "Identifier", "span": { "start": 123, - "end": 133, + "end": 124, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty20.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty20.json index dd2d834bd264..e74fffc7dd94 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty20.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty20.json @@ -93,7 +93,7 @@ "type": "Identifier", "span": { "start": 54, - "end": 63, + "end": 55, "ctxt": 0 }, "value": "s", @@ -182,7 +182,7 @@ "type": "Identifier", "span": { "start": 101, - "end": 110, + "end": 102, "ctxt": 0 }, "value": "s", diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty21.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty21.json index ba9bbac37f5b..2c54a8659f18 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty21.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty21.json @@ -256,7 +256,7 @@ "type": "Identifier", "span": { "start": 131, - "end": 141, + "end": 132, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty22.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty22.json index bddbda222de1..1ac0b0ed4c78 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty22.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty22.json @@ -132,7 +132,7 @@ "type": "Identifier", "span": { "start": 61, - "end": 65, + "end": 62, "ctxt": 0 }, "value": "x", @@ -224,7 +224,7 @@ "type": "Identifier", "span": { "start": 101, - "end": 106, + "end": 103, "ctxt": 0 }, "value": "p1", @@ -270,7 +270,7 @@ "type": "Identifier", "span": { "start": 108, - "end": 119, + "end": 110, "ctxt": 0 }, "value": "p2", diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty39.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty39.json index 7099d25d4895..3156b5670208 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty39.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty39.json @@ -83,7 +83,7 @@ "type": "Identifier", "span": { "start": 48, - "end": 57, + "end": 49, "ctxt": 0 }, "value": "x", @@ -200,7 +200,7 @@ "type": "Identifier", "span": { "start": 90, - "end": 99, + "end": 91, "ctxt": 0 }, "value": "x", @@ -317,7 +317,7 @@ "type": "Identifier", "span": { "start": 132, - "end": 138, + "end": 133, "ctxt": 0 }, "value": "x", @@ -445,7 +445,7 @@ "type": "Identifier", "span": { "start": 196, - "end": 202, + "end": 197, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty40.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty40.json index bf5f75245015..23d92828b11d 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty40.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty40.json @@ -83,7 +83,7 @@ "type": "Identifier", "span": { "start": 48, - "end": 57, + "end": 49, "ctxt": 0 }, "value": "x", @@ -200,7 +200,7 @@ "type": "Identifier", "span": { "start": 90, - "end": 99, + "end": 91, "ctxt": 0 }, "value": "x", @@ -317,7 +317,7 @@ "type": "Identifier", "span": { "start": 132, - "end": 138, + "end": 133, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty41.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty41.json index ac8fc285a20c..9fc7063e95c3 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty41.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty41.json @@ -83,7 +83,7 @@ "type": "Identifier", "span": { "start": 48, - "end": 57, + "end": 49, "ctxt": 0 }, "value": "x", @@ -242,7 +242,7 @@ "type": "Identifier", "span": { "start": 97, - "end": 107, + "end": 98, "ctxt": 0 }, "value": "x", @@ -451,7 +451,7 @@ "type": "Identifier", "span": { "start": 162, - "end": 168, + "end": 163, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty42.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty42.json index b8be0914710a..6ef846d24580 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty42.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty42.json @@ -83,7 +83,7 @@ "type": "Identifier", "span": { "start": 48, - "end": 57, + "end": 49, "ctxt": 0 }, "value": "x", @@ -200,7 +200,7 @@ "type": "Identifier", "span": { "start": 97, - "end": 106, + "end": 98, "ctxt": 0 }, "value": "x", @@ -317,7 +317,7 @@ "type": "Identifier", "span": { "start": 139, - "end": 145, + "end": 140, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty43.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty43.json index 1de0dc511790..96c4c508ad00 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty43.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty43.json @@ -83,7 +83,7 @@ "type": "Identifier", "span": { "start": 48, - "end": 57, + "end": 49, "ctxt": 0 }, "value": "x", @@ -200,7 +200,7 @@ "type": "Identifier", "span": { "start": 90, - "end": 99, + "end": 91, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty47.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty47.json index 32fff69ad2b3..4dc381d3c5fe 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty47.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty47.json @@ -174,7 +174,7 @@ "type": "Identifier", "span": { "start": 141, - "end": 150, + "end": 142, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty61.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty61.json index f39d39a564a0..a68873b7c1ea 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty61.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty61.json @@ -267,7 +267,7 @@ "type": "Identifier", "span": { "start": 226, - "end": 233, + "end": 230, "ctxt": 0 }, "value": "_val", @@ -345,7 +345,7 @@ "type": "Identifier", "span": { "start": 253, - "end": 275, + "end": 257, "ctxt": 0 }, "value": "next", @@ -369,7 +369,7 @@ "type": "Identifier", "span": { "start": 260, - "end": 266, + "end": 263, "ctxt": 0 }, "value": "val", @@ -778,7 +778,7 @@ "type": "Identifier", "span": { "start": 426, - "end": 448, + "end": 430, "ctxt": 0 }, "value": "next", @@ -802,7 +802,7 @@ "type": "Identifier", "span": { "start": 433, - "end": 439, + "end": 436, "ctxt": 0 }, "value": "val", @@ -913,7 +913,7 @@ "type": "Identifier", "span": { "start": 478, - "end": 503, + "end": 481, "ctxt": 0 }, "value": "obs", diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateContextualTyping1.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateContextualTyping1.json index 0a61f6cc3972..810ec7bbfbde 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateContextualTyping1.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateContextualTyping1.json @@ -37,7 +37,7 @@ "type": "Identifier", "span": { "start": 35, - "end": 52, + "end": 36, "ctxt": 0 }, "value": "x", @@ -61,7 +61,7 @@ "type": "Identifier", "span": { "start": 42, - "end": 46, + "end": 43, "ctxt": 0 }, "value": "p", @@ -215,7 +215,7 @@ "type": "Identifier", "span": { "start": 89, - "end": 123, + "end": 101, "ctxt": 0 }, "value": "templateStrs", @@ -261,7 +261,7 @@ "type": "Identifier", "span": { "start": 125, - "end": 136, + "end": 126, "ctxt": 0 }, "value": "f", @@ -307,7 +307,7 @@ "type": "Identifier", "span": { "start": 138, - "end": 142, + "end": 139, "ctxt": 0 }, "value": "x", @@ -438,7 +438,7 @@ "type": "Identifier", "span": { "start": 169, - "end": 203, + "end": 181, "ctxt": 0 }, "value": "templateStrs", @@ -484,7 +484,7 @@ "type": "Identifier", "span": { "start": 205, - "end": 216, + "end": 206, "ctxt": 0 }, "value": "f", @@ -530,7 +530,7 @@ "type": "Identifier", "span": { "start": 218, - "end": 229, + "end": 219, "ctxt": 0 }, "value": "h", @@ -576,7 +576,7 @@ "type": "Identifier", "span": { "start": 231, - "end": 235, + "end": 232, "ctxt": 0 }, "value": "x", @@ -1547,7 +1547,7 @@ "type": "Identifier", "span": { "start": 856, - "end": 860, + "end": 857, "ctxt": 0 }, "value": "p", @@ -1867,7 +1867,7 @@ "type": "Identifier", "span": { "start": 945, - "end": 949, + "end": 946, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateContextualTyping2.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateContextualTyping2.json index 054f14805122..7d5d0468a408 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateContextualTyping2.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateContextualTyping2.json @@ -37,7 +37,7 @@ "type": "Identifier", "span": { "start": 36, - "end": 53, + "end": 37, "ctxt": 0 }, "value": "x", @@ -61,7 +61,7 @@ "type": "Identifier", "span": { "start": 43, - "end": 47, + "end": 44, "ctxt": 0 }, "value": "p", @@ -220,7 +220,7 @@ "type": "Identifier", "span": { "start": 86, - "end": 106, + "end": 87, "ctxt": 0 }, "value": "x", @@ -244,7 +244,7 @@ "type": "Identifier", "span": { "start": 96, - "end": 100, + "end": 97, "ctxt": 0 }, "value": "p", @@ -421,7 +421,7 @@ "type": "Identifier", "span": { "start": 140, - "end": 174, + "end": 152, "ctxt": 0 }, "value": "templateStrs", @@ -467,7 +467,7 @@ "type": "Identifier", "span": { "start": 176, - "end": 188, + "end": 177, "ctxt": 0 }, "value": "f", @@ -513,7 +513,7 @@ "type": "Identifier", "span": { "start": 190, - "end": 199, + "end": 191, "ctxt": 0 }, "value": "x", @@ -592,7 +592,7 @@ "type": "Identifier", "span": { "start": 228, - "end": 262, + "end": 240, "ctxt": 0 }, "value": "templateStrs", @@ -638,7 +638,7 @@ "type": "Identifier", "span": { "start": 264, - "end": 276, + "end": 265, "ctxt": 0 }, "value": "f", @@ -684,7 +684,7 @@ "type": "Identifier", "span": { "start": 278, - "end": 290, + "end": 279, "ctxt": 0 }, "value": "h", @@ -730,7 +730,7 @@ "type": "Identifier", "span": { "start": 292, - "end": 301, + "end": 293, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsTypeArgumentInference.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsTypeArgumentInference.json index 8faf45a8b93c..f95a2d64ce05 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsTypeArgumentInference.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsTypeArgumentInference.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 58, - "end": 62, + "end": 59, "ctxt": 0 }, "value": "n", @@ -194,7 +194,7 @@ "type": "Identifier", "span": { "start": 174, - "end": 197, + "end": 175, "ctxt": 0 }, "value": "n", @@ -356,7 +356,7 @@ "type": "Identifier", "span": { "start": 346, - "end": 350, + "end": 347, "ctxt": 0 }, "value": "n", @@ -402,7 +402,7 @@ "type": "Identifier", "span": { "start": 352, - "end": 361, + "end": 353, "ctxt": 0 }, "value": "m", @@ -599,7 +599,7 @@ "type": "Identifier", "span": { "start": 421, - "end": 444, + "end": 422, "ctxt": 0 }, "value": "n", @@ -645,7 +645,7 @@ "type": "Identifier", "span": { "start": 446, - "end": 450, + "end": 447, "ctxt": 0 }, "value": "m", @@ -852,7 +852,7 @@ "type": "Identifier", "span": { "start": 595, - "end": 621, + "end": 599, "ctxt": 0 }, "value": "strs", @@ -898,7 +898,7 @@ "type": "Identifier", "span": { "start": 623, - "end": 640, + "end": 624, "ctxt": 0 }, "value": "n", @@ -922,7 +922,7 @@ "type": "Identifier", "span": { "start": 627, - "end": 631, + "end": 628, "ctxt": 0 }, "value": "x", @@ -1169,7 +1169,7 @@ "type": "Identifier", "span": { "start": 715, - "end": 741, + "end": 719, "ctxt": 0 }, "value": "strs", @@ -1215,7 +1215,7 @@ "type": "Identifier", "span": { "start": 743, - "end": 766, + "end": 744, "ctxt": 0 }, "value": "n", @@ -1239,7 +1239,7 @@ "type": "Identifier", "span": { "start": 747, - "end": 751, + "end": 748, "ctxt": 0 }, "value": "x", @@ -1276,7 +1276,7 @@ "type": "Identifier", "span": { "start": 753, - "end": 757, + "end": 754, "ctxt": 0 }, "value": "y", @@ -1573,7 +1573,7 @@ "type": "Identifier", "span": { "start": 983, - "end": 1009, + "end": 987, "ctxt": 0 }, "value": "strs", @@ -1619,7 +1619,7 @@ "type": "Identifier", "span": { "start": 1011, - "end": 1028, + "end": 1019, "ctxt": 0 }, "value": "producer", @@ -2002,7 +2002,7 @@ "type": "Identifier", "span": { "start": 1297, - "end": 1323, + "end": 1301, "ctxt": 0 }, "value": "strs", @@ -2048,7 +2048,7 @@ "type": "Identifier", "span": { "start": 1325, - "end": 1329, + "end": 1326, "ctxt": 0 }, "value": "n", @@ -2094,7 +2094,7 @@ "type": "Identifier", "span": { "start": 1331, - "end": 1348, + "end": 1332, "ctxt": 0 }, "value": "f", @@ -2118,7 +2118,7 @@ "type": "Identifier", "span": { "start": 1335, - "end": 1339, + "end": 1336, "ctxt": 0 }, "value": "x", @@ -2572,7 +2572,7 @@ "type": "Identifier", "span": { "start": 1632, - "end": 1658, + "end": 1636, "ctxt": 0 }, "value": "strs", @@ -2618,7 +2618,7 @@ "type": "Identifier", "span": { "start": 1660, - "end": 1664, + "end": 1661, "ctxt": 0 }, "value": "n", @@ -2664,7 +2664,7 @@ "type": "Identifier", "span": { "start": 1666, - "end": 1683, + "end": 1667, "ctxt": 0 }, "value": "f", @@ -2688,7 +2688,7 @@ "type": "Identifier", "span": { "start": 1670, - "end": 1674, + "end": 1671, "ctxt": 0 }, "value": "x", @@ -3142,7 +3142,7 @@ "type": "Identifier", "span": { "start": 1933, - "end": 1959, + "end": 1937, "ctxt": 0 }, "value": "strs", @@ -3188,7 +3188,7 @@ "type": "Identifier", "span": { "start": 1961, - "end": 1975, + "end": 1962, "ctxt": 0 }, "value": "a", @@ -3212,7 +3212,7 @@ "type": "Identifier", "span": { "start": 1965, - "end": 1969, + "end": 1966, "ctxt": 0 }, "value": "a", @@ -3290,7 +3290,7 @@ "type": "Identifier", "span": { "start": 1977, - "end": 1991, + "end": 1978, "ctxt": 0 }, "value": "b", @@ -3314,7 +3314,7 @@ "type": "Identifier", "span": { "start": 1981, - "end": 1985, + "end": 1982, "ctxt": 0 }, "value": "b", @@ -3392,7 +3392,7 @@ "type": "Identifier", "span": { "start": 1993, - "end": 2007, + "end": 1994, "ctxt": 0 }, "value": "c", @@ -3416,7 +3416,7 @@ "type": "Identifier", "span": { "start": 1997, - "end": 2001, + "end": 1998, "ctxt": 0 }, "value": "c", @@ -4173,7 +4173,7 @@ "type": "Identifier", "span": { "start": 2334, - "end": 2360, + "end": 2338, "ctxt": 0 }, "value": "strs", @@ -4219,7 +4219,7 @@ "type": "Identifier", "span": { "start": 2362, - "end": 2376, + "end": 2363, "ctxt": 0 }, "value": "a", @@ -4243,7 +4243,7 @@ "type": "Identifier", "span": { "start": 2366, - "end": 2370, + "end": 2367, "ctxt": 0 }, "value": "a", @@ -4321,7 +4321,7 @@ "type": "Identifier", "span": { "start": 2378, - "end": 2392, + "end": 2379, "ctxt": 0 }, "value": "b", @@ -4345,7 +4345,7 @@ "type": "Identifier", "span": { "start": 2382, - "end": 2386, + "end": 2383, "ctxt": 0 }, "value": "b", @@ -4423,7 +4423,7 @@ "type": "Identifier", "span": { "start": 2394, - "end": 2408, + "end": 2395, "ctxt": 0 }, "value": "c", @@ -4447,7 +4447,7 @@ "type": "Identifier", "span": { "start": 2398, - "end": 2402, + "end": 2399, "ctxt": 0 }, "value": "c", @@ -5250,7 +5250,7 @@ "type": "Identifier", "span": { "start": 2674, - "end": 2700, + "end": 2678, "ctxt": 0 }, "value": "strs", @@ -5296,7 +5296,7 @@ "type": "Identifier", "span": { "start": 2702, - "end": 2706, + "end": 2703, "ctxt": 0 }, "value": "n", @@ -5656,7 +5656,7 @@ "type": "Identifier", "span": { "start": 2921, - "end": 2947, + "end": 2925, "ctxt": 0 }, "value": "strs", @@ -5702,7 +5702,7 @@ "type": "Identifier", "span": { "start": 2949, - "end": 2953, + "end": 2950, "ctxt": 0 }, "value": "a", @@ -5748,7 +5748,7 @@ "type": "Identifier", "span": { "start": 2955, - "end": 2959, + "end": 2956, "ctxt": 0 }, "value": "b", @@ -5794,7 +5794,7 @@ "type": "Identifier", "span": { "start": 2961, - "end": 2965, + "end": 2962, "ctxt": 0 }, "value": "c", diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsTypeArgumentInferenceES6.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsTypeArgumentInferenceES6.json index 63489f26f6fb..6fbf7a887f51 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsTypeArgumentInferenceES6.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsTypeArgumentInferenceES6.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 72, - "end": 76, + "end": 73, "ctxt": 0 }, "value": "n", @@ -194,7 +194,7 @@ "type": "Identifier", "span": { "start": 188, - "end": 211, + "end": 189, "ctxt": 0 }, "value": "n", @@ -356,7 +356,7 @@ "type": "Identifier", "span": { "start": 360, - "end": 364, + "end": 361, "ctxt": 0 }, "value": "n", @@ -402,7 +402,7 @@ "type": "Identifier", "span": { "start": 366, - "end": 375, + "end": 367, "ctxt": 0 }, "value": "m", @@ -599,7 +599,7 @@ "type": "Identifier", "span": { "start": 435, - "end": 458, + "end": 436, "ctxt": 0 }, "value": "n", @@ -645,7 +645,7 @@ "type": "Identifier", "span": { "start": 460, - "end": 464, + "end": 461, "ctxt": 0 }, "value": "m", @@ -852,7 +852,7 @@ "type": "Identifier", "span": { "start": 609, - "end": 635, + "end": 613, "ctxt": 0 }, "value": "strs", @@ -898,7 +898,7 @@ "type": "Identifier", "span": { "start": 637, - "end": 654, + "end": 638, "ctxt": 0 }, "value": "n", @@ -922,7 +922,7 @@ "type": "Identifier", "span": { "start": 641, - "end": 645, + "end": 642, "ctxt": 0 }, "value": "x", @@ -1169,7 +1169,7 @@ "type": "Identifier", "span": { "start": 729, - "end": 755, + "end": 733, "ctxt": 0 }, "value": "strs", @@ -1215,7 +1215,7 @@ "type": "Identifier", "span": { "start": 757, - "end": 780, + "end": 758, "ctxt": 0 }, "value": "n", @@ -1239,7 +1239,7 @@ "type": "Identifier", "span": { "start": 761, - "end": 765, + "end": 762, "ctxt": 0 }, "value": "x", @@ -1276,7 +1276,7 @@ "type": "Identifier", "span": { "start": 767, - "end": 771, + "end": 768, "ctxt": 0 }, "value": "y", @@ -1573,7 +1573,7 @@ "type": "Identifier", "span": { "start": 997, - "end": 1023, + "end": 1001, "ctxt": 0 }, "value": "strs", @@ -1619,7 +1619,7 @@ "type": "Identifier", "span": { "start": 1025, - "end": 1042, + "end": 1033, "ctxt": 0 }, "value": "producer", @@ -2002,7 +2002,7 @@ "type": "Identifier", "span": { "start": 1311, - "end": 1337, + "end": 1315, "ctxt": 0 }, "value": "strs", @@ -2048,7 +2048,7 @@ "type": "Identifier", "span": { "start": 1339, - "end": 1343, + "end": 1340, "ctxt": 0 }, "value": "n", @@ -2094,7 +2094,7 @@ "type": "Identifier", "span": { "start": 1345, - "end": 1362, + "end": 1346, "ctxt": 0 }, "value": "f", @@ -2118,7 +2118,7 @@ "type": "Identifier", "span": { "start": 1349, - "end": 1353, + "end": 1350, "ctxt": 0 }, "value": "x", @@ -2572,7 +2572,7 @@ "type": "Identifier", "span": { "start": 1646, - "end": 1672, + "end": 1650, "ctxt": 0 }, "value": "strs", @@ -2618,7 +2618,7 @@ "type": "Identifier", "span": { "start": 1674, - "end": 1678, + "end": 1675, "ctxt": 0 }, "value": "n", @@ -2664,7 +2664,7 @@ "type": "Identifier", "span": { "start": 1680, - "end": 1697, + "end": 1681, "ctxt": 0 }, "value": "f", @@ -2688,7 +2688,7 @@ "type": "Identifier", "span": { "start": 1684, - "end": 1688, + "end": 1685, "ctxt": 0 }, "value": "x", @@ -3142,7 +3142,7 @@ "type": "Identifier", "span": { "start": 1947, - "end": 1973, + "end": 1951, "ctxt": 0 }, "value": "strs", @@ -3188,7 +3188,7 @@ "type": "Identifier", "span": { "start": 1975, - "end": 1989, + "end": 1976, "ctxt": 0 }, "value": "a", @@ -3212,7 +3212,7 @@ "type": "Identifier", "span": { "start": 1979, - "end": 1983, + "end": 1980, "ctxt": 0 }, "value": "a", @@ -3290,7 +3290,7 @@ "type": "Identifier", "span": { "start": 1991, - "end": 2005, + "end": 1992, "ctxt": 0 }, "value": "b", @@ -3314,7 +3314,7 @@ "type": "Identifier", "span": { "start": 1995, - "end": 1999, + "end": 1996, "ctxt": 0 }, "value": "b", @@ -3392,7 +3392,7 @@ "type": "Identifier", "span": { "start": 2007, - "end": 2021, + "end": 2008, "ctxt": 0 }, "value": "c", @@ -3416,7 +3416,7 @@ "type": "Identifier", "span": { "start": 2011, - "end": 2015, + "end": 2012, "ctxt": 0 }, "value": "c", @@ -4173,7 +4173,7 @@ "type": "Identifier", "span": { "start": 2348, - "end": 2374, + "end": 2352, "ctxt": 0 }, "value": "strs", @@ -4219,7 +4219,7 @@ "type": "Identifier", "span": { "start": 2376, - "end": 2390, + "end": 2377, "ctxt": 0 }, "value": "a", @@ -4243,7 +4243,7 @@ "type": "Identifier", "span": { "start": 2380, - "end": 2384, + "end": 2381, "ctxt": 0 }, "value": "a", @@ -4321,7 +4321,7 @@ "type": "Identifier", "span": { "start": 2392, - "end": 2406, + "end": 2393, "ctxt": 0 }, "value": "b", @@ -4345,7 +4345,7 @@ "type": "Identifier", "span": { "start": 2396, - "end": 2400, + "end": 2397, "ctxt": 0 }, "value": "b", @@ -4423,7 +4423,7 @@ "type": "Identifier", "span": { "start": 2408, - "end": 2422, + "end": 2409, "ctxt": 0 }, "value": "c", @@ -4447,7 +4447,7 @@ "type": "Identifier", "span": { "start": 2412, - "end": 2416, + "end": 2413, "ctxt": 0 }, "value": "c", @@ -5250,7 +5250,7 @@ "type": "Identifier", "span": { "start": 2688, - "end": 2714, + "end": 2692, "ctxt": 0 }, "value": "strs", @@ -5296,7 +5296,7 @@ "type": "Identifier", "span": { "start": 2716, - "end": 2720, + "end": 2717, "ctxt": 0 }, "value": "n", @@ -5656,7 +5656,7 @@ "type": "Identifier", "span": { "start": 2935, - "end": 2961, + "end": 2939, "ctxt": 0 }, "value": "strs", @@ -5702,7 +5702,7 @@ "type": "Identifier", "span": { "start": 2963, - "end": 2967, + "end": 2964, "ctxt": 0 }, "value": "a", @@ -5748,7 +5748,7 @@ "type": "Identifier", "span": { "start": 2969, - "end": 2973, + "end": 2970, "ctxt": 0 }, "value": "b", @@ -5794,7 +5794,7 @@ "type": "Identifier", "span": { "start": 2975, - "end": 2979, + "end": 2976, "ctxt": 0 }, "value": "c", diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithIncompatibleTypedTags.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithIncompatibleTypedTags.json index 3e0f0ed5c7de..696d54c75bbc 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithIncompatibleTypedTags.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithIncompatibleTypedTags.json @@ -46,7 +46,7 @@ "type": "Identifier", "span": { "start": 20, - "end": 53, + "end": 31, "ctxt": 0 }, "value": "stringParts", @@ -336,7 +336,7 @@ "type": "Identifier", "span": { "start": 132, - "end": 141, + "end": 133, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithIncompatibleTypedTagsES6.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithIncompatibleTypedTagsES6.json index 2a1f7a4c7940..0df98ed78d12 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithIncompatibleTypedTagsES6.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithIncompatibleTypedTagsES6.json @@ -46,7 +46,7 @@ "type": "Identifier", "span": { "start": 36, - "end": 69, + "end": 47, "ctxt": 0 }, "value": "stringParts", @@ -336,7 +336,7 @@ "type": "Identifier", "span": { "start": 148, - "end": 157, + "end": 149, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithManyCallAndMemberExpressions.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithManyCallAndMemberExpressions.json index e8bf708f6c7f..167d6b03c041 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithManyCallAndMemberExpressions.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithManyCallAndMemberExpressions.json @@ -46,7 +46,7 @@ "type": "Identifier", "span": { "start": 20, - "end": 46, + "end": 24, "ctxt": 0 }, "value": "strs", @@ -207,7 +207,7 @@ "type": "Identifier", "span": { "start": 98, - "end": 107, + "end": 99, "ctxt": 0 }, "value": "s", @@ -258,7 +258,7 @@ "type": "Identifier", "span": { "start": 129, - "end": 138, + "end": 130, "ctxt": 0 }, "value": "n", diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.json index c6041cf820ab..8cf2e465e041 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.json @@ -46,7 +46,7 @@ "type": "Identifier", "span": { "start": 36, - "end": 62, + "end": 40, "ctxt": 0 }, "value": "strs", @@ -207,7 +207,7 @@ "type": "Identifier", "span": { "start": 114, - "end": 123, + "end": 115, "ctxt": 0 }, "value": "s", @@ -258,7 +258,7 @@ "type": "Identifier", "span": { "start": 145, - "end": 154, + "end": 146, "ctxt": 0 }, "value": "n", diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution1.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution1.json index 5cae22bb321f..b0d367771827 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution1.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution1.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 14, - "end": 40, + "end": 18, "ctxt": 0 }, "value": "strs", @@ -121,7 +121,7 @@ "type": "Identifier", "span": { "start": 64, - "end": 90, + "end": 68, "ctxt": 0 }, "value": "strs", @@ -167,7 +167,7 @@ "type": "Identifier", "span": { "start": 92, - "end": 101, + "end": 93, "ctxt": 0 }, "value": "x", @@ -246,7 +246,7 @@ "type": "Identifier", "span": { "start": 125, - "end": 151, + "end": 129, "ctxt": 0 }, "value": "strs", @@ -292,7 +292,7 @@ "type": "Identifier", "span": { "start": 153, - "end": 162, + "end": 154, "ctxt": 0 }, "value": "x", @@ -328,7 +328,7 @@ "type": "Identifier", "span": { "start": 164, - "end": 173, + "end": 165, "ctxt": 0 }, "value": "y", @@ -407,7 +407,7 @@ "type": "Identifier", "span": { "start": 198, - "end": 224, + "end": 202, "ctxt": 0 }, "value": "strs", @@ -453,7 +453,7 @@ "type": "Identifier", "span": { "start": 226, - "end": 235, + "end": 227, "ctxt": 0 }, "value": "x", @@ -489,7 +489,7 @@ "type": "Identifier", "span": { "start": 237, - "end": 246, + "end": 238, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution1_ES6.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution1_ES6.json index d298f3122b8f..21f32da59576 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution1_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution1_ES6.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 29, - "end": 55, + "end": 33, "ctxt": 0 }, "value": "strs", @@ -121,7 +121,7 @@ "type": "Identifier", "span": { "start": 79, - "end": 105, + "end": 83, "ctxt": 0 }, "value": "strs", @@ -167,7 +167,7 @@ "type": "Identifier", "span": { "start": 107, - "end": 116, + "end": 108, "ctxt": 0 }, "value": "x", @@ -246,7 +246,7 @@ "type": "Identifier", "span": { "start": 140, - "end": 166, + "end": 144, "ctxt": 0 }, "value": "strs", @@ -292,7 +292,7 @@ "type": "Identifier", "span": { "start": 168, - "end": 177, + "end": 169, "ctxt": 0 }, "value": "x", @@ -328,7 +328,7 @@ "type": "Identifier", "span": { "start": 179, - "end": 188, + "end": 180, "ctxt": 0 }, "value": "y", @@ -407,7 +407,7 @@ "type": "Identifier", "span": { "start": 213, - "end": 239, + "end": 217, "ctxt": 0 }, "value": "strs", @@ -453,7 +453,7 @@ "type": "Identifier", "span": { "start": 241, - "end": 250, + "end": 242, "ctxt": 0 }, "value": "x", @@ -489,7 +489,7 @@ "type": "Identifier", "span": { "start": 252, - "end": 261, + "end": 253, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution2.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution2.json index f918cc031eb1..346a845d4e98 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution2.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution2.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 16, - "end": 42, + "end": 20, "ctxt": 0 }, "value": "strs", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 44, - "end": 53, + "end": 45, "ctxt": 0 }, "value": "x", @@ -157,7 +157,7 @@ "type": "Identifier", "span": { "start": 78, - "end": 92, + "end": 82, "ctxt": 0 }, "value": "strs", @@ -201,7 +201,7 @@ "type": "Identifier", "span": { "start": 94, - "end": 103, + "end": 95, "ctxt": 0 }, "value": "x", @@ -581,7 +581,7 @@ "type": "Identifier", "span": { "start": 234, - "end": 248, + "end": 238, "ctxt": 0 }, "value": "strs", @@ -625,7 +625,7 @@ "type": "Identifier", "span": { "start": 250, - "end": 259, + "end": 251, "ctxt": 0 }, "value": "x", @@ -704,7 +704,7 @@ "type": "Identifier", "span": { "start": 284, - "end": 310, + "end": 288, "ctxt": 0 }, "value": "strs", @@ -750,7 +750,7 @@ "type": "Identifier", "span": { "start": 312, - "end": 321, + "end": 313, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution2_ES6.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution2_ES6.json index 70ac9f642299..298894ca2180 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution2_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution2_ES6.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 30, - "end": 56, + "end": 34, "ctxt": 0 }, "value": "strs", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 58, - "end": 67, + "end": 59, "ctxt": 0 }, "value": "x", @@ -157,7 +157,7 @@ "type": "Identifier", "span": { "start": 92, - "end": 106, + "end": 96, "ctxt": 0 }, "value": "strs", @@ -201,7 +201,7 @@ "type": "Identifier", "span": { "start": 108, - "end": 117, + "end": 109, "ctxt": 0 }, "value": "x", @@ -581,7 +581,7 @@ "type": "Identifier", "span": { "start": 248, - "end": 262, + "end": 252, "ctxt": 0 }, "value": "strs", @@ -625,7 +625,7 @@ "type": "Identifier", "span": { "start": 264, - "end": 273, + "end": 265, "ctxt": 0 }, "value": "x", @@ -704,7 +704,7 @@ "type": "Identifier", "span": { "start": 298, - "end": 324, + "end": 302, "ctxt": 0 }, "value": "strs", @@ -750,7 +750,7 @@ "type": "Identifier", "span": { "start": 326, - "end": 335, + "end": 327, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution3.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution3.json index 4dc49303cf06..9a7858edc87f 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution3.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution3.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 79, - "end": 105, + "end": 83, "ctxt": 0 }, "value": "strs", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 107, - "end": 116, + "end": 108, "ctxt": 0 }, "value": "s", @@ -157,7 +157,7 @@ "type": "Identifier", "span": { "start": 140, - "end": 166, + "end": 144, "ctxt": 0 }, "value": "strs", @@ -203,7 +203,7 @@ "type": "Identifier", "span": { "start": 168, - "end": 177, + "end": 169, "ctxt": 0 }, "value": "n", @@ -514,7 +514,7 @@ "type": "Identifier", "span": { "start": 330, - "end": 356, + "end": 334, "ctxt": 0 }, "value": "strs", @@ -560,7 +560,7 @@ "type": "Identifier", "span": { "start": 358, - "end": 367, + "end": 359, "ctxt": 0 }, "value": "s", @@ -596,7 +596,7 @@ "type": "Identifier", "span": { "start": 369, - "end": 378, + "end": 370, "ctxt": 0 }, "value": "n", @@ -675,7 +675,7 @@ "type": "Identifier", "span": { "start": 405, - "end": 431, + "end": 409, "ctxt": 0 }, "value": "strs", @@ -721,7 +721,7 @@ "type": "Identifier", "span": { "start": 433, - "end": 442, + "end": 434, "ctxt": 0 }, "value": "n", @@ -757,7 +757,7 @@ "type": "Identifier", "span": { "start": 444, - "end": 448, + "end": 445, "ctxt": 0 }, "value": "t", @@ -1457,7 +1457,7 @@ "type": "Identifier", "span": { "start": 945, - "end": 971, + "end": 949, "ctxt": 0 }, "value": "strs", @@ -1503,7 +1503,7 @@ "type": "Identifier", "span": { "start": 973, - "end": 977, + "end": 974, "ctxt": 0 }, "value": "n", @@ -1624,7 +1624,7 @@ "type": "Identifier", "span": { "start": 1007, - "end": 1033, + "end": 1011, "ctxt": 0 }, "value": "strs", @@ -1670,7 +1670,7 @@ "type": "Identifier", "span": { "start": 1035, - "end": 1044, + "end": 1036, "ctxt": 0 }, "value": "s", @@ -1706,7 +1706,7 @@ "type": "Identifier", "span": { "start": 1046, - "end": 1050, + "end": 1047, "ctxt": 0 }, "value": "t", @@ -1752,7 +1752,7 @@ "type": "Identifier", "span": { "start": 1052, - "end": 1056, + "end": 1053, "ctxt": 0 }, "value": "u", @@ -1906,7 +1906,7 @@ "type": "Identifier", "span": { "start": 1084, - "end": 1110, + "end": 1088, "ctxt": 0 }, "value": "strs", @@ -1952,7 +1952,7 @@ "type": "Identifier", "span": { "start": 1112, - "end": 1116, + "end": 1113, "ctxt": 0 }, "value": "v", @@ -1998,7 +1998,7 @@ "type": "Identifier", "span": { "start": 1118, - "end": 1122, + "end": 1119, "ctxt": 0 }, "value": "u", @@ -2044,7 +2044,7 @@ "type": "Identifier", "span": { "start": 1124, - "end": 1128, + "end": 1125, "ctxt": 0 }, "value": "t", @@ -3098,7 +3098,7 @@ "type": "Identifier", "span": { "start": 1690, - "end": 1716, + "end": 1694, "ctxt": 0 }, "value": "strs", @@ -3144,7 +3144,7 @@ "type": "Identifier", "span": { "start": 1718, - "end": 1722, + "end": 1719, "ctxt": 0 }, "value": "n", @@ -3190,7 +3190,7 @@ "type": "Identifier", "span": { "start": 1724, - "end": 1728, + "end": 1725, "ctxt": 0 }, "value": "m", @@ -3334,7 +3334,7 @@ "type": "Identifier", "span": { "start": 1780, - "end": 1806, + "end": 1784, "ctxt": 0 }, "value": "strs", @@ -3380,7 +3380,7 @@ "type": "Identifier", "span": { "start": 1808, - "end": 1812, + "end": 1809, "ctxt": 0 }, "value": "n", @@ -3426,7 +3426,7 @@ "type": "Identifier", "span": { "start": 1814, - "end": 1818, + "end": 1815, "ctxt": 0 }, "value": "m", @@ -3570,7 +3570,7 @@ "type": "Identifier", "span": { "start": 1834, - "end": 1860, + "end": 1838, "ctxt": 0 }, "value": "strs", @@ -4309,7 +4309,7 @@ "type": "Identifier", "span": { "start": 2471, - "end": 2497, + "end": 2475, "ctxt": 0 }, "value": "strs", @@ -4355,7 +4355,7 @@ "type": "Identifier", "span": { "start": 2499, - "end": 2521, + "end": 2500, "ctxt": 0 }, "value": "f", @@ -4379,7 +4379,7 @@ "type": "Identifier", "span": { "start": 2503, - "end": 2512, + "end": 2504, "ctxt": 0 }, "value": "n", @@ -4480,7 +4480,7 @@ "type": "Identifier", "span": { "start": 2545, - "end": 2571, + "end": 2549, "ctxt": 0 }, "value": "strs", @@ -4526,7 +4526,7 @@ "type": "Identifier", "span": { "start": 2573, - "end": 2595, + "end": 2574, "ctxt": 0 }, "value": "f", @@ -4550,7 +4550,7 @@ "type": "Identifier", "span": { "start": 2577, - "end": 2586, + "end": 2578, "ctxt": 0 }, "value": "n", diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution3_ES6.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution3_ES6.json index 69ee8989d2f4..6889e6136f63 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution3_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution3_ES6.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 93, - "end": 119, + "end": 97, "ctxt": 0 }, "value": "strs", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 121, - "end": 130, + "end": 122, "ctxt": 0 }, "value": "s", @@ -157,7 +157,7 @@ "type": "Identifier", "span": { "start": 154, - "end": 180, + "end": 158, "ctxt": 0 }, "value": "strs", @@ -203,7 +203,7 @@ "type": "Identifier", "span": { "start": 182, - "end": 191, + "end": 183, "ctxt": 0 }, "value": "n", @@ -514,7 +514,7 @@ "type": "Identifier", "span": { "start": 344, - "end": 370, + "end": 348, "ctxt": 0 }, "value": "strs", @@ -560,7 +560,7 @@ "type": "Identifier", "span": { "start": 372, - "end": 381, + "end": 373, "ctxt": 0 }, "value": "s", @@ -596,7 +596,7 @@ "type": "Identifier", "span": { "start": 383, - "end": 392, + "end": 384, "ctxt": 0 }, "value": "n", @@ -675,7 +675,7 @@ "type": "Identifier", "span": { "start": 419, - "end": 445, + "end": 423, "ctxt": 0 }, "value": "strs", @@ -721,7 +721,7 @@ "type": "Identifier", "span": { "start": 447, - "end": 456, + "end": 448, "ctxt": 0 }, "value": "n", @@ -757,7 +757,7 @@ "type": "Identifier", "span": { "start": 458, - "end": 462, + "end": 459, "ctxt": 0 }, "value": "t", @@ -1457,7 +1457,7 @@ "type": "Identifier", "span": { "start": 953, - "end": 979, + "end": 957, "ctxt": 0 }, "value": "strs", @@ -1503,7 +1503,7 @@ "type": "Identifier", "span": { "start": 981, - "end": 985, + "end": 982, "ctxt": 0 }, "value": "n", @@ -1624,7 +1624,7 @@ "type": "Identifier", "span": { "start": 1015, - "end": 1041, + "end": 1019, "ctxt": 0 }, "value": "strs", @@ -1670,7 +1670,7 @@ "type": "Identifier", "span": { "start": 1043, - "end": 1052, + "end": 1044, "ctxt": 0 }, "value": "s", @@ -1706,7 +1706,7 @@ "type": "Identifier", "span": { "start": 1054, - "end": 1058, + "end": 1055, "ctxt": 0 }, "value": "t", @@ -1752,7 +1752,7 @@ "type": "Identifier", "span": { "start": 1060, - "end": 1064, + "end": 1061, "ctxt": 0 }, "value": "u", @@ -1906,7 +1906,7 @@ "type": "Identifier", "span": { "start": 1092, - "end": 1118, + "end": 1096, "ctxt": 0 }, "value": "strs", @@ -1952,7 +1952,7 @@ "type": "Identifier", "span": { "start": 1120, - "end": 1124, + "end": 1121, "ctxt": 0 }, "value": "v", @@ -1998,7 +1998,7 @@ "type": "Identifier", "span": { "start": 1126, - "end": 1130, + "end": 1127, "ctxt": 0 }, "value": "u", @@ -2044,7 +2044,7 @@ "type": "Identifier", "span": { "start": 1132, - "end": 1136, + "end": 1133, "ctxt": 0 }, "value": "t", @@ -3098,7 +3098,7 @@ "type": "Identifier", "span": { "start": 1698, - "end": 1724, + "end": 1702, "ctxt": 0 }, "value": "strs", @@ -3144,7 +3144,7 @@ "type": "Identifier", "span": { "start": 1726, - "end": 1730, + "end": 1727, "ctxt": 0 }, "value": "n", @@ -3190,7 +3190,7 @@ "type": "Identifier", "span": { "start": 1732, - "end": 1736, + "end": 1733, "ctxt": 0 }, "value": "m", @@ -3334,7 +3334,7 @@ "type": "Identifier", "span": { "start": 1788, - "end": 1814, + "end": 1792, "ctxt": 0 }, "value": "strs", @@ -3380,7 +3380,7 @@ "type": "Identifier", "span": { "start": 1816, - "end": 1820, + "end": 1817, "ctxt": 0 }, "value": "n", @@ -3426,7 +3426,7 @@ "type": "Identifier", "span": { "start": 1822, - "end": 1826, + "end": 1823, "ctxt": 0 }, "value": "m", @@ -3570,7 +3570,7 @@ "type": "Identifier", "span": { "start": 1842, - "end": 1868, + "end": 1846, "ctxt": 0 }, "value": "strs", @@ -4309,7 +4309,7 @@ "type": "Identifier", "span": { "start": 2479, - "end": 2505, + "end": 2483, "ctxt": 0 }, "value": "strs", @@ -4355,7 +4355,7 @@ "type": "Identifier", "span": { "start": 2507, - "end": 2529, + "end": 2508, "ctxt": 0 }, "value": "f", @@ -4379,7 +4379,7 @@ "type": "Identifier", "span": { "start": 2511, - "end": 2520, + "end": 2512, "ctxt": 0 }, "value": "n", @@ -4480,7 +4480,7 @@ "type": "Identifier", "span": { "start": 2553, - "end": 2579, + "end": 2557, "ctxt": 0 }, "value": "strs", @@ -4526,7 +4526,7 @@ "type": "Identifier", "span": { "start": 2581, - "end": 2603, + "end": 2582, "ctxt": 0 }, "value": "f", @@ -4550,7 +4550,7 @@ "type": "Identifier", "span": { "start": 2585, - "end": 2594, + "end": 2586, "ctxt": 0 }, "value": "n", diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTagNamedDeclare.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTagNamedDeclare.json index 225706b6450f..3a232c271f05 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTagNamedDeclare.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTagNamedDeclare.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 20, - "end": 26, + "end": 21, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTagNamedDeclareES6.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTagNamedDeclareES6.json index da99fc04ac7d..7c85373c5625 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTagNamedDeclareES6.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTagNamedDeclareES6.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 34, - "end": 40, + "end": 35, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.json index a19e63ed955c..b4c88ae4012a 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.json @@ -148,7 +148,7 @@ "type": "Identifier", "span": { "start": 54, - "end": 63, + "end": 55, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.json index deaf9323b2d5..0fea2165f88b 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.json @@ -148,7 +148,7 @@ "type": "Identifier", "span": { "start": 68, - "end": 77, + "end": 69, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTypedTags.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTypedTags.json index df6fb22e242a..a22526b1bc8f 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTypedTags.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTypedTags.json @@ -46,7 +46,7 @@ "type": "Identifier", "span": { "start": 20, - "end": 53, + "end": 31, "ctxt": 0 }, "value": "stringParts", @@ -336,7 +336,7 @@ "type": "Identifier", "span": { "start": 131, - "end": 140, + "end": 132, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTypedTagsES6.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTypedTagsES6.json index 9519f5ee6c78..04f1465e537a 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTypedTagsES6.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTypedTagsES6.json @@ -46,7 +46,7 @@ "type": "Identifier", "span": { "start": 36, - "end": 69, + "end": 47, "ctxt": 0 }, "value": "stringParts", @@ -336,7 +336,7 @@ "type": "Identifier", "span": { "start": 147, - "end": 156, + "end": 148, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplatesWithTypeArguments1.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplatesWithTypeArguments1.json index d4a7ea79c95e..1a3a10fb2865 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplatesWithTypeArguments1.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplatesWithTypeArguments1.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 43, - "end": 69, + "end": 47, "ctxt": 0 }, "value": "strs", @@ -141,7 +141,7 @@ "type": "Identifier", "span": { "start": 92, - "end": 96, + "end": 93, "ctxt": 0 }, "value": "x", @@ -743,7 +743,7 @@ "type": "Identifier", "span": { "start": 356, - "end": 382, + "end": 360, "ctxt": 0 }, "value": "strs", @@ -789,7 +789,7 @@ "type": "Identifier", "span": { "start": 388, - "end": 406, + "end": 389, "ctxt": 0 }, "value": "t", @@ -813,7 +813,7 @@ "type": "Identifier", "span": { "start": 392, - "end": 400, + "end": 393, "ctxt": 0 }, "value": "i", @@ -891,7 +891,7 @@ "type": "Identifier", "span": { "start": 408, - "end": 426, + "end": 409, "ctxt": 0 }, "value": "u", @@ -915,7 +915,7 @@ "type": "Identifier", "span": { "start": 412, - "end": 420, + "end": 413, "ctxt": 0 }, "value": "i", @@ -993,7 +993,7 @@ "type": "Identifier", "span": { "start": 428, - "end": 446, + "end": 429, "ctxt": 0 }, "value": "v", @@ -1017,7 +1017,7 @@ "type": "Identifier", "span": { "start": 432, - "end": 440, + "end": 433, "ctxt": 0 }, "value": "i", @@ -1682,7 +1682,7 @@ "type": "Identifier", "span": { "start": 653, - "end": 679, + "end": 657, "ctxt": 0 }, "value": "strs", @@ -1719,7 +1719,7 @@ "type": "Identifier", "span": { "start": 681, - "end": 699, + "end": 682, "ctxt": 0 }, "value": "x", @@ -1743,7 +1743,7 @@ "type": "Identifier", "span": { "start": 685, - "end": 693, + "end": 690, "ctxt": 0 }, "value": "input", diff --git a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes2.json b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes2.json index 1a3245840c5f..c5780e151e78 100644 --- a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes2.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 72, - "end": 81, + "end": 73, "ctxt": 0 }, "value": "s", @@ -68,7 +68,7 @@ "type": "Identifier", "span": { "start": 83, - "end": 92, + "end": 84, "ctxt": 0 }, "value": "n", @@ -104,7 +104,7 @@ "type": "Identifier", "span": { "start": 94, - "end": 118, + "end": 95, "ctxt": 0 }, "value": "u", @@ -195,7 +195,7 @@ "type": "Identifier", "span": { "start": 120, - "end": 124, + "end": 121, "ctxt": 0 }, "value": "t", @@ -1222,7 +1222,7 @@ "type": "Identifier", "span": { "start": 426, - "end": 435, + "end": 427, "ctxt": 0 }, "value": "s", @@ -1346,7 +1346,7 @@ "type": "Identifier", "span": { "start": 478, - "end": 487, + "end": 479, "ctxt": 0 }, "value": "s", @@ -1938,7 +1938,7 @@ "type": "Identifier", "span": { "start": 834, - "end": 843, + "end": 835, "ctxt": 0 }, "value": "s", @@ -1974,7 +1974,7 @@ "type": "Identifier", "span": { "start": 845, - "end": 858, + "end": 849, "ctxt": 0 }, "value": "cond", @@ -2941,7 +2941,7 @@ "type": "Identifier", "span": { "start": 1442, - "end": 1451, + "end": 1443, "ctxt": 0 }, "value": "s", @@ -3787,7 +3787,7 @@ "type": "Identifier", "span": { "start": 1761, - "end": 1765, + "end": 1762, "ctxt": 0 }, "value": "x", @@ -3918,7 +3918,7 @@ "type": "Identifier", "span": { "start": 1836, - "end": 1840, + "end": 1837, "ctxt": 0 }, "value": "x", @@ -4085,7 +4085,7 @@ "type": "Identifier", "span": { "start": 1861, - "end": 1870, + "end": 1862, "ctxt": 0 }, "value": "s", @@ -4121,7 +4121,7 @@ "type": "Identifier", "span": { "start": 1872, - "end": 1885, + "end": 1876, "ctxt": 0 }, "value": "cond", @@ -4739,7 +4739,7 @@ "type": "Identifier", "span": { "start": 2109, - "end": 2126, + "end": 2110, "ctxt": 0 }, "value": "t", @@ -5205,7 +5205,7 @@ "type": "Identifier", "span": { "start": 2284, - "end": 2288, + "end": 2285, "ctxt": 0 }, "value": "x", @@ -5336,7 +5336,7 @@ "type": "Identifier", "span": { "start": 2332, - "end": 2336, + "end": 2333, "ctxt": 0 }, "value": "x", @@ -5475,7 +5475,7 @@ "type": "Identifier", "span": { "start": 2357, - "end": 2366, + "end": 2358, "ctxt": 0 }, "value": "s", @@ -5747,7 +5747,7 @@ "type": "Identifier", "span": { "start": 2532, - "end": 2542, + "end": 2539, "ctxt": 0 }, "value": "literal", @@ -6975,7 +6975,7 @@ "type": "Identifier", "span": { "start": 3257, - "end": 3270, + "end": 3262, "ctxt": 0 }, "value": "title", @@ -7222,7 +7222,7 @@ "type": "Identifier", "span": { "start": 3399, - "end": 3440, + "end": 3408, "ctxt": 0 }, "value": "transform", diff --git a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes3.json b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes3.json index 9594e49f0805..92c76bb806c8 100644 --- a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes3.json +++ b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes3.json @@ -1297,7 +1297,7 @@ "type": "Identifier", "span": { "start": 580, - "end": 593, + "end": 583, "ctxt": 0 }, "value": "arg", @@ -1478,7 +1478,7 @@ "type": "Identifier", "span": { "start": 630, - "end": 639, + "end": 631, "ctxt": 0 }, "value": "s", @@ -1514,7 +1514,7 @@ "type": "Identifier", "span": { "start": 641, - "end": 650, + "end": 642, "ctxt": 0 }, "value": "n", @@ -1550,7 +1550,7 @@ "type": "Identifier", "span": { "start": 652, - "end": 662, + "end": 653, "ctxt": 0 }, "value": "b", @@ -1586,7 +1586,7 @@ "type": "Identifier", "span": { "start": 664, - "end": 668, + "end": 665, "ctxt": 0 }, "value": "t", @@ -4203,7 +4203,7 @@ "type": "Identifier", "span": { "start": 1772, - "end": 1781, + "end": 1773, "ctxt": 0 }, "value": "s", @@ -4239,7 +4239,7 @@ "type": "Identifier", "span": { "start": 1783, - "end": 1792, + "end": 1784, "ctxt": 0 }, "value": "n", @@ -4275,7 +4275,7 @@ "type": "Identifier", "span": { "start": 1794, - "end": 1804, + "end": 1795, "ctxt": 0 }, "value": "b", @@ -4311,7 +4311,7 @@ "type": "Identifier", "span": { "start": 1806, - "end": 1810, + "end": 1807, "ctxt": 0 }, "value": "t", @@ -5038,7 +5038,7 @@ "type": "Identifier", "span": { "start": 2077, - "end": 2086, + "end": 2078, "ctxt": 0 }, "value": "s", @@ -5074,7 +5074,7 @@ "type": "Identifier", "span": { "start": 2088, - "end": 2097, + "end": 2089, "ctxt": 0 }, "value": "n", @@ -5110,7 +5110,7 @@ "type": "Identifier", "span": { "start": 2099, - "end": 2109, + "end": 2100, "ctxt": 0 }, "value": "b", @@ -5146,7 +5146,7 @@ "type": "Identifier", "span": { "start": 2111, - "end": 2115, + "end": 2112, "ctxt": 0 }, "value": "t", @@ -8441,7 +8441,7 @@ "type": "Identifier", "span": { "start": 3657, - "end": 3679, + "end": 3662, "ctxt": 0 }, "value": "field", @@ -8732,7 +8732,7 @@ "type": "Identifier", "span": { "start": 3737, - "end": 3755, + "end": 3738, "ctxt": 0 }, "value": "x", @@ -8810,7 +8810,7 @@ "type": "Identifier", "span": { "start": 3757, - "end": 3775, + "end": 3758, "ctxt": 0 }, "value": "y", @@ -8888,7 +8888,7 @@ "type": "Identifier", "span": { "start": 3777, - "end": 3795, + "end": 3778, "ctxt": 0 }, "value": "z", @@ -9115,7 +9115,7 @@ "type": "Identifier", "span": { "start": 3924, - "end": 3937, + "end": 3925, "ctxt": 0 }, "value": "x", @@ -9203,7 +9203,7 @@ "type": "Identifier", "span": { "start": 3939, - "end": 3952, + "end": 3940, "ctxt": 0 }, "value": "y", @@ -9291,7 +9291,7 @@ "type": "Identifier", "span": { "start": 3954, - "end": 3967, + "end": 3955, "ctxt": 0 }, "value": "z", @@ -9568,7 +9568,7 @@ "type": "Identifier", "span": { "start": 4073, - "end": 4082, + "end": 4074, "ctxt": 0 }, "value": "x", @@ -9604,7 +9604,7 @@ "type": "Identifier", "span": { "start": 4084, - "end": 4110, + "end": 4085, "ctxt": 0 }, "value": "y", @@ -9812,7 +9812,7 @@ "type": "Identifier", "span": { "start": 4194, - "end": 4203, + "end": 4195, "ctxt": 0 }, "value": "x", @@ -9848,7 +9848,7 @@ "type": "Identifier", "span": { "start": 4205, - "end": 4223, + "end": 4206, "ctxt": 0 }, "value": "y", @@ -10351,7 +10351,7 @@ "type": "Identifier", "span": { "start": 4495, - "end": 4509, + "end": 4501, "ctxt": 0 }, "value": "action", @@ -10682,7 +10682,7 @@ "type": "Identifier", "span": { "start": 4729, - "end": 4738, + "end": 4733, "ctxt": 0 }, "value": "args", @@ -11596,7 +11596,7 @@ "type": "Identifier", "span": { "start": 5033, - "end": 5037, + "end": 5034, "ctxt": 0 }, "value": "t", @@ -11642,7 +11642,7 @@ "type": "Identifier", "span": { "start": 5039, - "end": 5054, + "end": 5040, "ctxt": 0 }, "value": "u", @@ -11716,7 +11716,7 @@ "type": "Identifier", "span": { "start": 5056, - "end": 5081, + "end": 5058, "ctxt": 0 }, "value": "u1", @@ -11832,7 +11832,7 @@ "type": "Identifier", "span": { "start": 5083, - "end": 5108, + "end": 5085, "ctxt": 0 }, "value": "u2", diff --git a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes4.json b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes4.json index ccbbe36c518c..9d5f9ec2a0fb 100644 --- a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes4.json +++ b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes4.json @@ -20399,7 +20399,7 @@ "type": "Identifier", "span": { "start": 14055, - "end": 14061, + "end": 14058, "ctxt": 0 }, "value": "key", @@ -20744,7 +20744,7 @@ "type": "Identifier", "span": { "start": 14168, - "end": 14174, + "end": 14171, "ctxt": 0 }, "value": "key", @@ -20781,7 +20781,7 @@ "type": "Identifier", "span": { "start": 14176, - "end": 14245, + "end": 14181, "ctxt": 0 }, "value": "value", @@ -21116,7 +21116,7 @@ "type": "Identifier", "span": { "start": 14327, - "end": 14335, + "end": 14332, "ctxt": 0 }, "value": "index", @@ -21412,7 +21412,7 @@ "type": "Identifier", "span": { "start": 14432, - "end": 14440, + "end": 14437, "ctxt": 0 }, "value": "index", @@ -21449,7 +21449,7 @@ "type": "Identifier", "span": { "start": 14442, - "end": 14501, + "end": 14447, "ctxt": 0 }, "value": "value", @@ -22731,7 +22731,7 @@ "type": "Identifier", "span": { "start": 15270, - "end": 15283, + "end": 15271, "ctxt": 0 }, "value": "s", @@ -22973,7 +22973,7 @@ "type": "Identifier", "span": { "start": 15352, - "end": 15365, + "end": 15353, "ctxt": 0 }, "value": "s", @@ -23196,7 +23196,7 @@ "type": "Identifier", "span": { "start": 15432, - "end": 15445, + "end": 15433, "ctxt": 0 }, "value": "s", @@ -23419,7 +23419,7 @@ "type": "Identifier", "span": { "start": 15514, - "end": 15527, + "end": 15515, "ctxt": 0 }, "value": "s", diff --git a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes5.json b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes5.json index a6606fe6a20d..fe789744ad4d 100644 --- a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes5.json +++ b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes5.json @@ -182,7 +182,7 @@ "type": "Identifier", "span": { "start": 193, - "end": 203, + "end": 194, "ctxt": 0 }, "value": "x", @@ -430,7 +430,7 @@ "type": "Identifier", "span": { "start": 254, - "end": 264, + "end": 255, "ctxt": 0 }, "value": "x", @@ -740,7 +740,7 @@ "type": "Identifier", "span": { "start": 334, - "end": 344, + "end": 335, "ctxt": 0 }, "value": "x", @@ -1087,7 +1087,7 @@ "type": "Identifier", "span": { "start": 418, - "end": 423, + "end": 419, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes6.json b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes6.json index a8f9300cfca9..e8c4644b4838 100644 --- a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes6.json +++ b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes6.json @@ -327,7 +327,7 @@ "type": "Identifier", "span": { "start": 299, - "end": 329, + "end": 308, "ctxt": 0 }, "value": "eventPath", @@ -663,7 +663,7 @@ "type": "Identifier", "span": { "start": 427, - "end": 439, + "end": 432, "ctxt": 0 }, "value": "scope", @@ -709,7 +709,7 @@ "type": "Identifier", "span": { "start": 441, - "end": 453, + "end": 446, "ctxt": 0 }, "value": "event", diff --git a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes7.json b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes7.json index b13ed167a458..3d11cae02c57 100644 --- a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes7.json +++ b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes7.json @@ -282,7 +282,7 @@ "type": "Identifier", "span": { "start": 207, - "end": 216, + "end": 208, "ctxt": 0 }, "value": "x", @@ -548,7 +548,7 @@ "type": "Identifier", "span": { "start": 262, - "end": 271, + "end": 263, "ctxt": 0 }, "value": "x", @@ -876,7 +876,7 @@ "type": "Identifier", "span": { "start": 345, - "end": 354, + "end": 346, "ctxt": 0 }, "value": "x", @@ -1222,7 +1222,7 @@ "type": "Identifier", "span": { "start": 423, - "end": 432, + "end": 424, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypesPatterns.json b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypesPatterns.json index 924eb64c6db3..afbf2d0e4b81 100644 --- a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypesPatterns.json +++ b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypesPatterns.json @@ -421,7 +421,7 @@ "type": "Identifier", "span": { "start": 248, - "end": 300, + "end": 256, "ctxt": 0 }, "value": "hostSpec", @@ -828,7 +828,7 @@ "type": "Identifier", "span": { "start": 605, - "end": 620, + "end": 606, "ctxt": 0 }, "value": "x", @@ -1224,7 +1224,7 @@ "type": "Identifier", "span": { "start": 776, - "end": 800, + "end": 777, "ctxt": 0 }, "value": "x", @@ -1644,7 +1644,7 @@ "type": "Identifier", "span": { "start": 984, - "end": 998, + "end": 985, "ctxt": 0 }, "value": "x", @@ -2815,7 +2815,7 @@ "type": "Identifier", "span": { "start": 1680, - "end": 1694, + "end": 1681, "ctxt": 0 }, "value": "x", @@ -7588,7 +7588,7 @@ "type": "Identifier", "span": { "start": 4357, - "end": 4381, + "end": 4358, "ctxt": 0 }, "value": "x", @@ -8100,7 +8100,7 @@ "type": "Identifier", "span": { "start": 4623, - "end": 4633, + "end": 4625, "ctxt": 0 }, "value": "id", @@ -8229,7 +8229,7 @@ "type": "Identifier", "span": { "start": 4653, - "end": 4663, + "end": 4655, "ctxt": 0 }, "value": "id", @@ -8436,7 +8436,7 @@ "type": "Identifier", "span": { "start": 4820, - "end": 4907, + "end": 4829, "ctxt": 0 }, "value": "groupName", @@ -8674,7 +8674,7 @@ "type": "Identifier", "span": { "start": 4969, - "end": 5056, + "end": 4978, "ctxt": 0 }, "value": "groupName", @@ -8912,7 +8912,7 @@ "type": "Identifier", "span": { "start": 5119, - "end": 5206, + "end": 5128, "ctxt": 0 }, "value": "groupName", @@ -9150,7 +9150,7 @@ "type": "Identifier", "span": { "start": 5269, - "end": 5356, + "end": 5278, "ctxt": 0 }, "value": "groupName", @@ -9388,7 +9388,7 @@ "type": "Identifier", "span": { "start": 5408, - "end": 5449, + "end": 5411, "ctxt": 0 }, "value": "str", diff --git a/crates/swc_ecma_parser/tests/tsc/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.json b/crates/swc_ecma_parser/tests/tsc/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.json index 15ef4f86e0ff..cf96c9920af9 100644 --- a/crates/swc_ecma_parser/tests/tsc/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.json +++ b/crates/swc_ecma_parser/tests/tsc/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.json @@ -37,7 +37,7 @@ "type": "Identifier", "span": { "start": 16, - "end": 25, + "end": 17, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.json b/crates/swc_ecma_parser/tests/tsc/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.json index d3523db184d6..897c8f533609 100644 --- a/crates/swc_ecma_parser/tests/tsc/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.json +++ b/crates/swc_ecma_parser/tests/tsc/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.json @@ -37,7 +37,7 @@ "type": "Identifier", "span": { "start": 30, - "end": 39, + "end": 31, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeAccessibility.json b/crates/swc_ecma_parser/tests/tsc/thisTypeAccessibility.json index b7b5ea16ba51..79b391272306 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeAccessibility.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeAccessibility.json @@ -410,7 +410,7 @@ "type": "Identifier", "span": { "start": 261, - "end": 270, + "end": 262, "ctxt": 0 }, "value": "p", @@ -478,7 +478,7 @@ "type": "Identifier", "span": { "start": 294, - "end": 303, + "end": 295, "ctxt": 0 }, "value": "p", @@ -546,7 +546,7 @@ "type": "Identifier", "span": { "start": 327, - "end": 336, + "end": 328, "ctxt": 0 }, "value": "p", @@ -1028,7 +1028,7 @@ "type": "Identifier", "span": { "start": 573, - "end": 586, + "end": 577, "ctxt": 0 }, "value": "this", @@ -1074,7 +1074,7 @@ "type": "Identifier", "span": { "start": 588, - "end": 597, + "end": 589, "ctxt": 0 }, "value": "p", @@ -1523,7 +1523,7 @@ "type": "Identifier", "span": { "start": 779, - "end": 786, + "end": 783, "ctxt": 0 }, "value": "this", @@ -1569,7 +1569,7 @@ "type": "Identifier", "span": { "start": 788, - "end": 797, + "end": 789, "ctxt": 0 }, "value": "p", @@ -2017,7 +2017,7 @@ "type": "Identifier", "span": { "start": 959, - "end": 966, + "end": 963, "ctxt": 0 }, "value": "this", @@ -2063,7 +2063,7 @@ "type": "Identifier", "span": { "start": 968, - "end": 977, + "end": 969, "ctxt": 0 }, "value": "p", @@ -2582,7 +2582,7 @@ "type": "Identifier", "span": { "start": 1181, - "end": 1204, + "end": 1185, "ctxt": 0 }, "value": "this", @@ -2656,7 +2656,7 @@ "type": "Identifier", "span": { "start": 1206, - "end": 1210, + "end": 1207, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeAndConstraints.json b/crates/swc_ecma_parser/tests/tsc/thisTypeAndConstraints.json index 1c90a1858d79..5656bb93744c 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeAndConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeAndConstraints.json @@ -122,7 +122,7 @@ "type": "Identifier", "span": { "start": 78, - "end": 82, + "end": 79, "ctxt": 0 }, "value": "x", @@ -197,7 +197,7 @@ "type": "Identifier", "span": { "start": 114, - "end": 118, + "end": 115, "ctxt": 0 }, "value": "x", @@ -543,7 +543,7 @@ "type": "Identifier", "span": { "start": 202, - "end": 206, + "end": 203, "ctxt": 0 }, "value": "x", @@ -703,7 +703,7 @@ "type": "Identifier", "span": { "start": 259, - "end": 263, + "end": 260, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeErrors.json b/crates/swc_ecma_parser/tests/tsc/thisTypeErrors.json index 5977d9eb92dc..7d68d4aa6aba 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeErrors.json @@ -226,7 +226,7 @@ "type": "Identifier", "span": { "start": 65, - "end": 72, + "end": 66, "ctxt": 0 }, "value": "x", @@ -755,7 +755,7 @@ "type": "Identifier", "span": { "start": 241, - "end": 248, + "end": 242, "ctxt": 0 }, "value": "x", @@ -1213,7 +1213,7 @@ "type": "Identifier", "span": { "start": 380, - "end": 387, + "end": 381, "ctxt": 0 }, "value": "x", @@ -1423,7 +1423,7 @@ "type": "Identifier", "span": { "start": 479, - "end": 486, + "end": 480, "ctxt": 0 }, "value": "x", @@ -1719,7 +1719,7 @@ "type": "Identifier", "span": { "start": 630, - "end": 637, + "end": 631, "ctxt": 0 }, "value": "x", @@ -1869,7 +1869,7 @@ "type": "Identifier", "span": { "start": 722, - "end": 729, + "end": 723, "ctxt": 0 }, "value": "x", @@ -2008,7 +2008,7 @@ "type": "Identifier", "span": { "start": 812, - "end": 819, + "end": 813, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeErrors2.json b/crates/swc_ecma_parser/tests/tsc/thisTypeErrors2.json index 22f918ca4b68..4071d5975203 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeErrors2.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeErrors2.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 30, - "end": 37, + "end": 31, "ctxt": 0 }, "value": "a", @@ -255,7 +255,7 @@ "type": "Identifier", "span": { "start": 124, - "end": 143, + "end": 128, "ctxt": 0 }, "value": "host", diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInAccessors.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInAccessors.json index 8d3fb74b8d96..2ea14cf45122 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInAccessors.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInAccessors.json @@ -278,7 +278,7 @@ "type": "Identifier", "span": { "start": 204, - "end": 213, + "end": 208, "ctxt": 0 }, "value": "this", @@ -315,7 +315,7 @@ "type": "Identifier", "span": { "start": 215, - "end": 224, + "end": 216, "ctxt": 0 }, "value": "n", @@ -788,7 +788,7 @@ "type": "Identifier", "span": { "start": 441, - "end": 450, + "end": 445, "ctxt": 0 }, "value": "this", @@ -825,7 +825,7 @@ "type": "Identifier", "span": { "start": 452, - "end": 461, + "end": 453, "ctxt": 0 }, "value": "n", @@ -1238,7 +1238,7 @@ "type": "Identifier", "span": { "start": 647, - "end": 656, + "end": 651, "ctxt": 0 }, "value": "this", @@ -1382,7 +1382,7 @@ "type": "Identifier", "span": { "start": 695, - "end": 704, + "end": 699, "ctxt": 0 }, "value": "this", @@ -1428,7 +1428,7 @@ "type": "Identifier", "span": { "start": 706, - "end": 715, + "end": 707, "ctxt": 0 }, "value": "n", diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInAccessorsNegative.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInAccessorsNegative.json index 6925571e7d5b..b9b2881759b7 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInAccessorsNegative.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInAccessorsNegative.json @@ -407,7 +407,7 @@ "type": "Identifier", "span": { "start": 267, - "end": 276, + "end": 271, "ctxt": 0 }, "value": "this", diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInClasses.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInClasses.json index 49598db9150a..1531795ec170 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInClasses.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInClasses.json @@ -101,7 +101,7 @@ "type": "Identifier", "span": { "start": 31, - "end": 38, + "end": 32, "ctxt": 0 }, "value": "x", @@ -832,7 +832,7 @@ "type": "Identifier", "span": { "start": 267, - "end": 274, + "end": 268, "ctxt": 0 }, "value": "x", @@ -921,7 +921,7 @@ "type": "Identifier", "span": { "start": 297, - "end": 304, + "end": 298, "ctxt": 0 }, "value": "x", @@ -1199,7 +1199,7 @@ "type": "Identifier", "span": { "start": 374, - "end": 380, + "end": 375, "ctxt": 0 }, "value": "x", @@ -1381,7 +1381,7 @@ "type": "Identifier", "span": { "start": 437, - "end": 444, + "end": 438, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions.json index 9dcc22b4d5c2..93aa1af3e785 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions.json @@ -174,7 +174,7 @@ "type": "Identifier", "span": { "start": 87, - "end": 97, + "end": 91, "ctxt": 0 }, "value": "this", @@ -209,7 +209,7 @@ "type": "Identifier", "span": { "start": 99, - "end": 108, + "end": 100, "ctxt": 0 }, "value": "m", @@ -362,7 +362,7 @@ "type": "Identifier", "span": { "start": 167, - "end": 174, + "end": 171, "ctxt": 0 }, "value": "this", @@ -408,7 +408,7 @@ "type": "Identifier", "span": { "start": 176, - "end": 185, + "end": 177, "ctxt": 0 }, "value": "m", @@ -561,7 +561,7 @@ "type": "Identifier", "span": { "start": 251, - "end": 268, + "end": 255, "ctxt": 0 }, "value": "this", @@ -639,7 +639,7 @@ "type": "Identifier", "span": { "start": 270, - "end": 279, + "end": 271, "ctxt": 0 }, "value": "m", @@ -792,7 +792,7 @@ "type": "Identifier", "span": { "start": 341, - "end": 351, + "end": 345, "ctxt": 0 }, "value": "this", @@ -828,7 +828,7 @@ "type": "Identifier", "span": { "start": 353, - "end": 362, + "end": 354, "ctxt": 0 }, "value": "m", @@ -1070,7 +1070,7 @@ "type": "Identifier", "span": { "start": 473, - "end": 483, + "end": 477, "ctxt": 0 }, "value": "this", @@ -1138,7 +1138,7 @@ "type": "Identifier", "span": { "start": 512, - "end": 522, + "end": 516, "ctxt": 0 }, "value": "this", @@ -1206,7 +1206,7 @@ "type": "Identifier", "span": { "start": 556, - "end": 573, + "end": 560, "ctxt": 0 }, "value": "this", @@ -1316,7 +1316,7 @@ "type": "Identifier", "span": { "start": 606, - "end": 613, + "end": 610, "ctxt": 0 }, "value": "this", @@ -1394,7 +1394,7 @@ "type": "Identifier", "span": { "start": 641, - "end": 651, + "end": 645, "ctxt": 0 }, "value": "this", @@ -1465,7 +1465,7 @@ "type": "Identifier", "span": { "start": 692, - "end": 711, + "end": 696, "ctxt": 0 }, "value": "this", @@ -1543,7 +1543,7 @@ "type": "Identifier", "span": { "start": 713, - "end": 722, + "end": 714, "ctxt": 0 }, "value": "x", @@ -1684,7 +1684,7 @@ "type": "Identifier", "span": { "start": 777, - "end": 796, + "end": 781, "ctxt": 0 }, "value": "this", @@ -1848,7 +1848,7 @@ "type": "Identifier", "span": { "start": 851, - "end": 860, + "end": 852, "ctxt": 0 }, "value": "n", @@ -3108,7 +3108,7 @@ "type": "Identifier", "span": { "start": 1592, - "end": 1611, + "end": 1596, "ctxt": 0 }, "value": "this", @@ -3177,7 +3177,7 @@ "type": "Identifier", "span": { "start": 1613, - "end": 1622, + "end": 1614, "ctxt": 0 }, "value": "x", @@ -3410,7 +3410,7 @@ "type": "Identifier", "span": { "start": 1717, - "end": 1726, + "end": 1718, "ctxt": 0 }, "value": "x", @@ -4313,7 +4313,7 @@ "type": "Identifier", "span": { "start": 2066, - "end": 2073, + "end": 2070, "ctxt": 0 }, "value": "this", @@ -4350,7 +4350,7 @@ "type": "Identifier", "span": { "start": 2075, - "end": 2084, + "end": 2076, "ctxt": 0 }, "value": "m", @@ -4418,7 +4418,7 @@ "type": "Identifier", "span": { "start": 2171, - "end": 2178, + "end": 2175, "ctxt": 0 }, "value": "this", @@ -4455,7 +4455,7 @@ "type": "Identifier", "span": { "start": 2180, - "end": 2189, + "end": 2181, "ctxt": 0 }, "value": "m", @@ -4539,7 +4539,7 @@ "type": "Identifier", "span": { "start": 2223, - "end": 2241, + "end": 2227, "ctxt": 0 }, "value": "this", @@ -4608,7 +4608,7 @@ "type": "Identifier", "span": { "start": 2243, - "end": 2252, + "end": 2244, "ctxt": 0 }, "value": "m", @@ -4679,7 +4679,7 @@ "type": "Identifier", "span": { "start": 2282, - "end": 2292, + "end": 2286, "ctxt": 0 }, "value": "this", @@ -4706,7 +4706,7 @@ "type": "Identifier", "span": { "start": 2294, - "end": 2303, + "end": 2295, "ctxt": 0 }, "value": "m", @@ -5221,7 +5221,7 @@ "type": "Identifier", "span": { "start": 2653, - "end": 2672, + "end": 2657, "ctxt": 0 }, "value": "this", @@ -5290,7 +5290,7 @@ "type": "Identifier", "span": { "start": 2674, - "end": 2683, + "end": 2675, "ctxt": 0 }, "value": "x", @@ -5454,7 +5454,7 @@ "type": "Identifier", "span": { "start": 2757, - "end": 2774, + "end": 2761, "ctxt": 0 }, "value": "this", @@ -5523,7 +5523,7 @@ "type": "Identifier", "span": { "start": 2776, - "end": 2785, + "end": 2777, "ctxt": 0 }, "value": "x", @@ -5627,7 +5627,7 @@ "type": "Identifier", "span": { "start": 2840, - "end": 2859, + "end": 2844, "ctxt": 0 }, "value": "this", @@ -5696,7 +5696,7 @@ "type": "Identifier", "span": { "start": 2861, - "end": 2870, + "end": 2862, "ctxt": 0 }, "value": "x", @@ -5757,7 +5757,7 @@ "type": "Identifier", "span": { "start": 2893, - "end": 2902, + "end": 2894, "ctxt": 0 }, "value": "x", @@ -5905,7 +5905,7 @@ "type": "Identifier", "span": { "start": 2957, - "end": 2966, + "end": 2958, "ctxt": 0 }, "value": "x", @@ -6053,7 +6053,7 @@ "type": "Identifier", "span": { "start": 3015, - "end": 3025, + "end": 3019, "ctxt": 0 }, "value": "this", @@ -6080,7 +6080,7 @@ "type": "Identifier", "span": { "start": 3027, - "end": 3036, + "end": 3028, "ctxt": 0 }, "value": "x", @@ -6228,7 +6228,7 @@ "type": "Identifier", "span": { "start": 3098, - "end": 3115, + "end": 3102, "ctxt": 0 }, "value": "this", @@ -6297,7 +6297,7 @@ "type": "Identifier", "span": { "start": 3117, - "end": 3126, + "end": 3118, "ctxt": 0 }, "value": "x", @@ -6401,7 +6401,7 @@ "type": "Identifier", "span": { "start": 3192, - "end": 3209, + "end": 3196, "ctxt": 0 }, "value": "this", @@ -6470,7 +6470,7 @@ "type": "Identifier", "span": { "start": 3211, - "end": 3220, + "end": 3212, "ctxt": 0 }, "value": "x", @@ -6574,7 +6574,7 @@ "type": "Identifier", "span": { "start": 3277, - "end": 3284, + "end": 3281, "ctxt": 0 }, "value": "this", @@ -6611,7 +6611,7 @@ "type": "Identifier", "span": { "start": 3286, - "end": 3295, + "end": 3287, "ctxt": 0 }, "value": "m", @@ -6706,7 +6706,7 @@ "type": "Identifier", "span": { "start": 3339, - "end": 3356, + "end": 3343, "ctxt": 0 }, "value": "this", @@ -6775,7 +6775,7 @@ "type": "Identifier", "span": { "start": 3358, - "end": 3367, + "end": 3359, "ctxt": 0 }, "value": "m", @@ -6939,7 +6939,7 @@ "type": "Identifier", "span": { "start": 3436, - "end": 3443, + "end": 3440, "ctxt": 0 }, "value": "this", @@ -6985,7 +6985,7 @@ "type": "Identifier", "span": { "start": 3445, - "end": 3454, + "end": 3446, "ctxt": 0 }, "value": "m", @@ -7200,7 +7200,7 @@ "type": "Identifier", "span": { "start": 3556, - "end": 3573, + "end": 3560, "ctxt": 0 }, "value": "this", @@ -7278,7 +7278,7 @@ "type": "Identifier", "span": { "start": 3575, - "end": 3584, + "end": 3576, "ctxt": 0 }, "value": "m", @@ -8151,7 +8151,7 @@ "type": "Identifier", "span": { "start": 4078, - "end": 4085, + "end": 4082, "ctxt": 0 }, "value": "this", @@ -8197,7 +8197,7 @@ "type": "Identifier", "span": { "start": 4087, - "end": 4096, + "end": 4088, "ctxt": 0 }, "value": "m", @@ -8953,7 +8953,7 @@ "type": "Identifier", "span": { "start": 4449, - "end": 4456, + "end": 4453, "ctxt": 0 }, "value": "this", @@ -8999,7 +8999,7 @@ "type": "Identifier", "span": { "start": 4458, - "end": 4467, + "end": 4459, "ctxt": 0 }, "value": "m", @@ -9276,7 +9276,7 @@ "type": "Identifier", "span": { "start": 4627, - "end": 4637, + "end": 4631, "ctxt": 0 }, "value": "this", @@ -9409,7 +9409,7 @@ "type": "Identifier", "span": { "start": 4679, - "end": 4690, + "end": 4683, "ctxt": 0 }, "value": "this", @@ -9553,7 +9553,7 @@ "type": "Identifier", "span": { "start": 4745, - "end": 4763, + "end": 4749, "ctxt": 0 }, "value": "this", @@ -9895,7 +9895,7 @@ "type": "Identifier", "span": { "start": 4907, - "end": 4917, + "end": 4911, "ctxt": 0 }, "value": "this", @@ -10028,7 +10028,7 @@ "type": "Identifier", "span": { "start": 4959, - "end": 4970, + "end": 4963, "ctxt": 0 }, "value": "this", @@ -10901,7 +10901,7 @@ "type": "Identifier", "span": { "start": 5622, - "end": 5629, + "end": 5626, "ctxt": 0 }, "value": "this", @@ -11036,7 +11036,7 @@ "type": "Identifier", "span": { "start": 5677, - "end": 5694, + "end": 5681, "ctxt": 0 }, "value": "this", @@ -11203,7 +11203,7 @@ "type": "Identifier", "span": { "start": 5736, - "end": 5745, + "end": 5740, "ctxt": 0 }, "value": "this", @@ -11511,7 +11511,7 @@ "type": "Identifier", "span": { "start": 5944, - "end": 5954, + "end": 5948, "ctxt": 0 }, "value": "this", @@ -11538,7 +11538,7 @@ "type": "Identifier", "span": { "start": 5956, - "end": 5965, + "end": 5957, "ctxt": 0 }, "value": "x", @@ -11606,7 +11606,7 @@ "type": "Identifier", "span": { "start": 5989, - "end": 6020, + "end": 5993, "ctxt": 0 }, "value": "this", @@ -11973,7 +11973,7 @@ "type": "Identifier", "span": { "start": 6118, - "end": 6127, + "end": 6119, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions2.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions2.json index 02065afa53d5..6ca48beb68f6 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions2.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions2.json @@ -75,7 +75,7 @@ "type": "Identifier", "span": { "start": 129, - "end": 139, + "end": 133, "ctxt": 0 }, "value": "this", @@ -161,7 +161,7 @@ "type": "Identifier", "span": { "start": 169, - "end": 178, + "end": 173, "ctxt": 0 }, "value": "this", @@ -335,7 +335,7 @@ "type": "Identifier", "span": { "start": 276, - "end": 285, + "end": 280, "ctxt": 0 }, "value": "this", @@ -700,7 +700,7 @@ "type": "Identifier", "span": { "start": 538, - "end": 547, + "end": 539, "ctxt": 0 }, "value": "n", @@ -796,7 +796,7 @@ "type": "Identifier", "span": { "start": 596, - "end": 617, + "end": 600, "ctxt": 0 }, "value": "args", @@ -885,7 +885,7 @@ "type": "Identifier", "span": { "start": 651, - "end": 675, + "end": 655, "ctxt": 0 }, "value": "args", @@ -974,7 +974,7 @@ "type": "Identifier", "span": { "start": 708, - "end": 728, + "end": 711, "ctxt": 0 }, "value": "arg", diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions3.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions3.json index ee853a83891e..afa00ae755b8 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions3.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions3.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 52, - "end": 63, + "end": 56, "ctxt": 0 }, "value": "prop", diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions4.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions4.json index d4a059baee12..d6e26acc96a4 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions4.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions4.json @@ -174,7 +174,7 @@ "type": "Identifier", "span": { "start": 102, - "end": 110, + "end": 105, "ctxt": 0 }, "value": "obj", @@ -290,7 +290,7 @@ "type": "Identifier", "span": { "start": 166, - "end": 190, + "end": 168, "ctxt": 0 }, "value": "cb", @@ -314,7 +314,7 @@ "type": "Identifier", "span": { "start": 171, - "end": 183, + "end": 175, "ctxt": 0 }, "value": "name", @@ -399,7 +399,7 @@ "type": "Identifier", "span": { "start": 218, - "end": 251, + "end": 222, "ctxt": 0 }, "value": "this", diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInInterfaces.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInInterfaces.json index 796ab48886fa..6feb6de13ef9 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInInterfaces.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInInterfaces.json @@ -99,7 +99,7 @@ "type": "Identifier", "span": { "start": 35, - "end": 42, + "end": 36, "ctxt": 0 }, "value": "x", @@ -183,7 +183,7 @@ "type": "Identifier", "span": { "start": 74, - "end": 81, + "end": 75, "ctxt": 0 }, "value": "x", @@ -236,7 +236,7 @@ "type": "Identifier", "span": { "start": 99, - "end": 106, + "end": 100, "ctxt": 0 }, "value": "x", @@ -884,7 +884,7 @@ "type": "Identifier", "span": { "start": 304, - "end": 311, + "end": 305, "ctxt": 0 }, "value": "x", @@ -969,7 +969,7 @@ "type": "Identifier", "span": { "start": 334, - "end": 341, + "end": 335, "ctxt": 0 }, "value": "x", @@ -1235,7 +1235,7 @@ "type": "Identifier", "span": { "start": 411, - "end": 417, + "end": 412, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInObjectLiterals.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInObjectLiterals.json index d43f7de11dae..097da36aa520 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInObjectLiterals.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInObjectLiterals.json @@ -439,7 +439,7 @@ "type": "Identifier", "span": { "start": 297, - "end": 306, + "end": 298, "ctxt": 0 }, "value": "n", @@ -568,7 +568,7 @@ "type": "Identifier", "span": { "start": 355, - "end": 364, + "end": 356, "ctxt": 0 }, "value": "n", @@ -999,7 +999,7 @@ "type": "Identifier", "span": { "start": 586, - "end": 595, + "end": 587, "ctxt": 0 }, "value": "n", @@ -1067,7 +1067,7 @@ "type": "Identifier", "span": { "start": 615, - "end": 624, + "end": 616, "ctxt": 0 }, "value": "n", diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInObjectLiterals2.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInObjectLiterals2.json index e272c85e220e..d883922e68a0 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInObjectLiterals2.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInObjectLiterals2.json @@ -657,7 +657,7 @@ "type": "Identifier", "span": { "start": 613, - "end": 623, + "end": 615, "ctxt": 0 }, "value": "dx", @@ -684,7 +684,7 @@ "type": "Identifier", "span": { "start": 625, - "end": 635, + "end": 627, "ctxt": 0 }, "value": "dy", @@ -711,7 +711,7 @@ "type": "Identifier", "span": { "start": 637, - "end": 648, + "end": 639, "ctxt": 0 }, "value": "dz", @@ -2577,7 +2577,7 @@ "type": "Identifier", "span": { "start": 1450, - "end": 1458, + "end": 1451, "ctxt": 0 }, "value": "p", @@ -3072,7 +3072,7 @@ "type": "Identifier", "span": { "start": 1659, - "end": 1686, + "end": 1660, "ctxt": 0 }, "value": "p", @@ -3868,7 +3868,7 @@ "type": "Identifier", "span": { "start": 2139, - "end": 2167, + "end": 2143, "ctxt": 0 }, "value": "desc", @@ -4242,7 +4242,7 @@ "type": "Identifier", "span": { "start": 2256, - "end": 2266, + "end": 2258, "ctxt": 0 }, "value": "dx", @@ -4278,7 +4278,7 @@ "type": "Identifier", "span": { "start": 2268, - "end": 2278, + "end": 2270, "ctxt": 0 }, "value": "dy", @@ -4742,7 +4742,7 @@ "type": "Identifier", "span": { "start": 2648, - "end": 2676, + "end": 2652, "ctxt": 0 }, "value": "desc", @@ -5116,7 +5116,7 @@ "type": "Identifier", "span": { "start": 2766, - "end": 2776, + "end": 2768, "ctxt": 0 }, "value": "dx", @@ -5152,7 +5152,7 @@ "type": "Identifier", "span": { "start": 2778, - "end": 2788, + "end": 2780, "ctxt": 0 }, "value": "dy", @@ -5502,7 +5502,7 @@ "type": "Identifier", "span": { "start": 3052, - "end": 3060, + "end": 3057, "ctxt": 0 }, "value": "value", @@ -5772,7 +5772,7 @@ "type": "Identifier", "span": { "start": 3187, - "end": 3193, + "end": 3190, "ctxt": 0 }, "value": "obj", @@ -5818,7 +5818,7 @@ "type": "Identifier", "span": { "start": 3195, - "end": 3202, + "end": 3199, "ctxt": 0 }, "value": "name", @@ -5864,7 +5864,7 @@ "type": "Identifier", "span": { "start": 3204, - "end": 3235, + "end": 3208, "ctxt": 0 }, "value": "desc", @@ -6210,7 +6210,7 @@ "type": "Identifier", "span": { "start": 3292, - "end": 3298, + "end": 3295, "ctxt": 0 }, "value": "obj", @@ -6256,7 +6256,7 @@ "type": "Identifier", "span": { "start": 3300, - "end": 3335, + "end": 3305, "ctxt": 0 }, "value": "descs", @@ -6880,7 +6880,7 @@ "type": "Identifier", "span": { "start": 3502, - "end": 3515, + "end": 3507, "ctxt": 0 }, "value": "value", @@ -7325,7 +7325,7 @@ "type": "Identifier", "span": { "start": 3726, - "end": 3739, + "end": 3731, "ctxt": 0 }, "value": "value", @@ -8154,7 +8154,7 @@ "type": "Identifier", "span": { "start": 4038, - "end": 4046, + "end": 4043, "ctxt": 0 }, "value": "value", @@ -8704,7 +8704,7 @@ "type": "Identifier", "span": { "start": 4217, - "end": 4245, + "end": 4224, "ctxt": 0 }, "value": "options", @@ -9158,7 +9158,7 @@ "type": "Identifier", "span": { "start": 4341, - "end": 4350, + "end": 4342, "ctxt": 0 }, "value": "x", @@ -9442,7 +9442,7 @@ "type": "Identifier", "span": { "start": 4574, - "end": 4587, + "end": 4579, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInTaggedTemplateCall.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInTaggedTemplateCall.json index b23381798581..7ec7977572a9 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInTaggedTemplateCall.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInTaggedTemplateCall.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 49, - "end": 66, + "end": 53, "ctxt": 0 }, "value": "this", @@ -122,7 +122,7 @@ "type": "Identifier", "span": { "start": 68, - "end": 106, + "end": 75, "ctxt": 0 }, "value": "strings", diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInTypePredicate.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInTypePredicate.json index 0abca052a110..9b62f1df54c2 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInTypePredicate.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInTypePredicate.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 28, - "end": 61, + "end": 29, "ctxt": 0 }, "value": "f", @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 32, - "end": 42, + "end": 36, "ctxt": 0 }, "value": "this", @@ -83,7 +83,7 @@ "type": "Identifier", "span": { "start": 44, - "end": 50, + "end": 45, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeOptionalCall.json b/crates/swc_ecma_parser/tests/tsc/thisTypeOptionalCall.json index a134c07ed53f..4c7c7f2e1f54 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeOptionalCall.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeOptionalCall.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 151, - "end": 157, + "end": 154, "ctxt": 0 }, "value": "obj", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 159, - "end": 203, + "end": 161, "ctxt": 0 }, "value": "fn", @@ -117,7 +117,7 @@ "type": "Identifier", "span": { "start": 165, - "end": 172, + "end": 169, "ctxt": 0 }, "value": "this", diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeSyntacticContext.json b/crates/swc_ecma_parser/tests/tsc/thisTypeSyntacticContext.json index 9cdbabf23648..58cefffbd6cf 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeSyntacticContext.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeSyntacticContext.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 12, - "end": 31, + "end": 16, "ctxt": 0 }, "value": "this", @@ -242,7 +242,7 @@ "type": "Identifier", "span": { "start": 68, - "end": 87, + "end": 72, "ctxt": 0 }, "value": "this", diff --git a/crates/swc_ecma_parser/tests/tsc/throwStatements.json b/crates/swc_ecma_parser/tests/tsc/throwStatements.json index 17dac1f4b338..a362a603bda3 100644 --- a/crates/swc_ecma_parser/tests/tsc/throwStatements.json +++ b/crates/swc_ecma_parser/tests/tsc/throwStatements.json @@ -504,7 +504,7 @@ "type": "Identifier", "span": { "start": 203, - "end": 212, + "end": 204, "ctxt": 0 }, "value": "x", @@ -724,7 +724,7 @@ "type": "Identifier", "span": { "start": 322, - "end": 331, + "end": 323, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/twoMergedInterfacesWithDifferingOverloads.json b/crates/swc_ecma_parser/tests/tsc/twoMergedInterfacesWithDifferingOverloads.json index 202b063cde03..6ef67e030014 100644 --- a/crates/swc_ecma_parser/tests/tsc/twoMergedInterfacesWithDifferingOverloads.json +++ b/crates/swc_ecma_parser/tests/tsc/twoMergedInterfacesWithDifferingOverloads.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 85, - "end": 94, + "end": 86, "ctxt": 0 }, "value": "x", @@ -127,7 +127,7 @@ "type": "Identifier", "span": { "start": 113, - "end": 122, + "end": 114, "ctxt": 0 }, "value": "x", @@ -226,7 +226,7 @@ "type": "Identifier", "span": { "start": 158, - "end": 165, + "end": 159, "ctxt": 0 }, "value": "x", @@ -377,7 +377,7 @@ "type": "Identifier", "span": { "start": 202, - "end": 206, + "end": 203, "ctxt": 0 }, "value": "x", @@ -455,7 +455,7 @@ "type": "Identifier", "span": { "start": 225, - "end": 234, + "end": 226, "ctxt": 0 }, "value": "x", @@ -586,7 +586,7 @@ "type": "Identifier", "span": { "start": 273, - "end": 277, + "end": 274, "ctxt": 0 }, "value": "x", @@ -674,7 +674,7 @@ "type": "Identifier", "span": { "start": 294, - "end": 301, + "end": 295, "ctxt": 0 }, "value": "x", @@ -998,7 +998,7 @@ "type": "Identifier", "span": { "start": 424, - "end": 428, + "end": 425, "ctxt": 0 }, "value": "x", @@ -1035,7 +1035,7 @@ "type": "Identifier", "span": { "start": 430, - "end": 434, + "end": 431, "ctxt": 0 }, "value": "y", @@ -1113,7 +1113,7 @@ "type": "Identifier", "span": { "start": 453, - "end": 462, + "end": 454, "ctxt": 0 }, "value": "x", @@ -1140,7 +1140,7 @@ "type": "Identifier", "span": { "start": 464, - "end": 473, + "end": 465, "ctxt": 0 }, "value": "y", @@ -1294,7 +1294,7 @@ "type": "Identifier", "span": { "start": 518, - "end": 522, + "end": 519, "ctxt": 0 }, "value": "x", @@ -1331,7 +1331,7 @@ "type": "Identifier", "span": { "start": 524, - "end": 528, + "end": 525, "ctxt": 0 }, "value": "y", @@ -1832,7 +1832,7 @@ "type": "Identifier", "span": { "start": 694, - "end": 698, + "end": 695, "ctxt": 0 }, "value": "x", @@ -1869,7 +1869,7 @@ "type": "Identifier", "span": { "start": 700, - "end": 704, + "end": 701, "ctxt": 0 }, "value": "y", @@ -2075,7 +2075,7 @@ "type": "Identifier", "span": { "start": 744, - "end": 748, + "end": 745, "ctxt": 0 }, "value": "x", @@ -2112,7 +2112,7 @@ "type": "Identifier", "span": { "start": 750, - "end": 754, + "end": 751, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/twoMergedInterfacesWithDifferingOverloads2.json b/crates/swc_ecma_parser/tests/tsc/twoMergedInterfacesWithDifferingOverloads2.json index 355473cbbe6d..b48277383204 100644 --- a/crates/swc_ecma_parser/tests/tsc/twoMergedInterfacesWithDifferingOverloads2.json +++ b/crates/swc_ecma_parser/tests/tsc/twoMergedInterfacesWithDifferingOverloads2.json @@ -73,7 +73,7 @@ "type": "Identifier", "span": { "start": 36, - "end": 45, + "end": 37, "ctxt": 0 }, "value": "x", @@ -159,7 +159,7 @@ "type": "Identifier", "span": { "start": 78, - "end": 87, + "end": 79, "ctxt": 0 }, "value": "x", @@ -186,7 +186,7 @@ "type": "Identifier", "span": { "start": 89, - "end": 98, + "end": 90, "ctxt": 0 }, "value": "y", @@ -614,7 +614,7 @@ "type": "Identifier", "span": { "start": 231, - "end": 235, + "end": 232, "ctxt": 0 }, "value": "x", @@ -752,7 +752,7 @@ "type": "Identifier", "span": { "start": 278, - "end": 282, + "end": 279, "ctxt": 0 }, "value": "x", @@ -789,7 +789,7 @@ "type": "Identifier", "span": { "start": 284, - "end": 293, + "end": 285, "ctxt": 0 }, "value": "y", @@ -854,7 +854,7 @@ "type": "Identifier", "span": { "start": 311, - "end": 315, + "end": 312, "ctxt": 0 }, "value": "x", @@ -891,7 +891,7 @@ "type": "Identifier", "span": { "start": 317, - "end": 321, + "end": 318, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/typeAliases.json b/crates/swc_ecma_parser/tests/tsc/typeAliases.json index 9fe0e13c980a..a07f029a6092 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeAliases.json +++ b/crates/swc_ecma_parser/tests/tsc/typeAliases.json @@ -2174,7 +2174,7 @@ "type": "Identifier", "span": { "start": 860, - "end": 866, + "end": 862, "ctxt": 0 }, "value": "t1", @@ -2220,7 +2220,7 @@ "type": "Identifier", "span": { "start": 868, - "end": 875, + "end": 870, "ctxt": 0 }, "value": "t2", @@ -2598,7 +2598,7 @@ "type": "Identifier", "span": { "start": 986, - "end": 992, + "end": 987, "ctxt": 0 }, "value": "x", @@ -2687,7 +2687,7 @@ "type": "Identifier", "span": { "start": 1027, - "end": 1037, + "end": 1028, "ctxt": 0 }, "value": "x", @@ -2775,7 +2775,7 @@ "type": "Identifier", "span": { "start": 1071, - "end": 1077, + "end": 1072, "ctxt": 0 }, "value": "x", @@ -2943,7 +2943,7 @@ "type": "Identifier", "span": { "start": 1149, - "end": 1158, + "end": 1150, "ctxt": 0 }, "value": "a", @@ -3022,7 +3022,7 @@ "type": "Identifier", "span": { "start": 1191, - "end": 1200, + "end": 1192, "ctxt": 0 }, "value": "a", @@ -3265,7 +3265,7 @@ "type": "Identifier", "span": { "start": 1299, - "end": 1318, + "end": 1300, "ctxt": 0 }, "value": "s", diff --git a/crates/swc_ecma_parser/tests/tsc/typeArgumentInference.json b/crates/swc_ecma_parser/tests/tsc/typeArgumentInference.json index e4b1182b0c90..0e0d0512558b 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeArgumentInference.json +++ b/crates/swc_ecma_parser/tests/tsc/typeArgumentInference.json @@ -218,7 +218,7 @@ "type": "Identifier", "span": { "start": 205, - "end": 214, + "end": 206, "ctxt": 0 }, "value": "n", @@ -483,7 +483,7 @@ "type": "Identifier", "span": { "start": 418, - "end": 422, + "end": 419, "ctxt": 0 }, "value": "n", @@ -529,7 +529,7 @@ "type": "Identifier", "span": { "start": 424, - "end": 433, + "end": 425, "ctxt": 0 }, "value": "m", @@ -792,7 +792,7 @@ "type": "Identifier", "span": { "start": 610, - "end": 627, + "end": 611, "ctxt": 0 }, "value": "n", @@ -816,7 +816,7 @@ "type": "Identifier", "span": { "start": 614, - "end": 618, + "end": 615, "ctxt": 0 }, "value": "x", @@ -1262,7 +1262,7 @@ "type": "Identifier", "span": { "start": 784, - "end": 807, + "end": 785, "ctxt": 0 }, "value": "n", @@ -1286,7 +1286,7 @@ "type": "Identifier", "span": { "start": 788, - "end": 792, + "end": 789, "ctxt": 0 }, "value": "x", @@ -1323,7 +1323,7 @@ "type": "Identifier", "span": { "start": 794, - "end": 798, + "end": 795, "ctxt": 0 }, "value": "y", @@ -1894,7 +1894,7 @@ "type": "Identifier", "span": { "start": 1139, - "end": 1156, + "end": 1147, "ctxt": 0 }, "value": "producer", @@ -2236,7 +2236,7 @@ "type": "Identifier", "span": { "start": 1428, - "end": 1432, + "end": 1429, "ctxt": 0 }, "value": "n", @@ -2282,7 +2282,7 @@ "type": "Identifier", "span": { "start": 1434, - "end": 1451, + "end": 1435, "ctxt": 0 }, "value": "f", @@ -2306,7 +2306,7 @@ "type": "Identifier", "span": { "start": 1438, - "end": 1442, + "end": 1439, "ctxt": 0 }, "value": "x", @@ -2703,7 +2703,7 @@ "type": "Identifier", "span": { "start": 1745, - "end": 1749, + "end": 1746, "ctxt": 0 }, "value": "n", @@ -2749,7 +2749,7 @@ "type": "Identifier", "span": { "start": 1751, - "end": 1768, + "end": 1752, "ctxt": 0 }, "value": "f", @@ -2773,7 +2773,7 @@ "type": "Identifier", "span": { "start": 1755, - "end": 1759, + "end": 1756, "ctxt": 0 }, "value": "x", @@ -3170,7 +3170,7 @@ "type": "Identifier", "span": { "start": 2027, - "end": 2041, + "end": 2028, "ctxt": 0 }, "value": "a", @@ -3194,7 +3194,7 @@ "type": "Identifier", "span": { "start": 2031, - "end": 2035, + "end": 2032, "ctxt": 0 }, "value": "a", @@ -3272,7 +3272,7 @@ "type": "Identifier", "span": { "start": 2043, - "end": 2057, + "end": 2044, "ctxt": 0 }, "value": "b", @@ -3296,7 +3296,7 @@ "type": "Identifier", "span": { "start": 2047, - "end": 2051, + "end": 2048, "ctxt": 0 }, "value": "b", @@ -3374,7 +3374,7 @@ "type": "Identifier", "span": { "start": 2059, - "end": 2073, + "end": 2060, "ctxt": 0 }, "value": "c", @@ -3398,7 +3398,7 @@ "type": "Identifier", "span": { "start": 2063, - "end": 2067, + "end": 2064, "ctxt": 0 }, "value": "c", @@ -4056,7 +4056,7 @@ "type": "Identifier", "span": { "start": 2385, - "end": 2399, + "end": 2386, "ctxt": 0 }, "value": "a", @@ -4080,7 +4080,7 @@ "type": "Identifier", "span": { "start": 2389, - "end": 2393, + "end": 2390, "ctxt": 0 }, "value": "a", @@ -4158,7 +4158,7 @@ "type": "Identifier", "span": { "start": 2401, - "end": 2415, + "end": 2402, "ctxt": 0 }, "value": "b", @@ -4182,7 +4182,7 @@ "type": "Identifier", "span": { "start": 2405, - "end": 2409, + "end": 2406, "ctxt": 0 }, "value": "b", @@ -4260,7 +4260,7 @@ "type": "Identifier", "span": { "start": 2417, - "end": 2431, + "end": 2418, "ctxt": 0 }, "value": "c", @@ -4284,7 +4284,7 @@ "type": "Identifier", "span": { "start": 2421, - "end": 2425, + "end": 2422, "ctxt": 0 }, "value": "c", @@ -5024,7 +5024,7 @@ "type": "Identifier", "span": { "start": 2714, - "end": 2718, + "end": 2715, "ctxt": 0 }, "value": "n", @@ -5346,7 +5346,7 @@ "type": "Identifier", "span": { "start": 2946, - "end": 2950, + "end": 2947, "ctxt": 0 }, "value": "a", @@ -5392,7 +5392,7 @@ "type": "Identifier", "span": { "start": 2952, - "end": 2956, + "end": 2953, "ctxt": 0 }, "value": "b", @@ -5438,7 +5438,7 @@ "type": "Identifier", "span": { "start": 2958, - "end": 2962, + "end": 2959, "ctxt": 0 }, "value": "c", diff --git a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceConstructSignatures.json b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceConstructSignatures.json index ba1f89d2fa49..899cc1566bc9 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceConstructSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceConstructSignatures.json @@ -299,7 +299,7 @@ "type": "Identifier", "span": { "start": 264, - "end": 273, + "end": 265, "ctxt": 0 }, "value": "n", @@ -622,7 +622,7 @@ "type": "Identifier", "span": { "start": 538, - "end": 542, + "end": 539, "ctxt": 0 }, "value": "n", @@ -659,7 +659,7 @@ "type": "Identifier", "span": { "start": 544, - "end": 553, + "end": 545, "ctxt": 0 }, "value": "m", @@ -1062,7 +1062,7 @@ "type": "Identifier", "span": { "start": 833, - "end": 850, + "end": 834, "ctxt": 0 }, "value": "n", @@ -1086,7 +1086,7 @@ "type": "Identifier", "span": { "start": 837, - "end": 841, + "end": 838, "ctxt": 0 }, "value": "x", @@ -1590,7 +1590,7 @@ "type": "Identifier", "span": { "start": 1066, - "end": 1089, + "end": 1067, "ctxt": 0 }, "value": "n", @@ -1614,7 +1614,7 @@ "type": "Identifier", "span": { "start": 1070, - "end": 1074, + "end": 1071, "ctxt": 0 }, "value": "x", @@ -1651,7 +1651,7 @@ "type": "Identifier", "span": { "start": 1076, - "end": 1080, + "end": 1077, "ctxt": 0 }, "value": "y", @@ -2280,7 +2280,7 @@ "type": "Identifier", "span": { "start": 1480, - "end": 1497, + "end": 1488, "ctxt": 0 }, "value": "producer", @@ -2680,7 +2680,7 @@ "type": "Identifier", "span": { "start": 1828, - "end": 1832, + "end": 1829, "ctxt": 0 }, "value": "n", @@ -2717,7 +2717,7 @@ "type": "Identifier", "span": { "start": 1834, - "end": 1851, + "end": 1835, "ctxt": 0 }, "value": "f", @@ -2741,7 +2741,7 @@ "type": "Identifier", "span": { "start": 1838, - "end": 1842, + "end": 1839, "ctxt": 0 }, "value": "x", @@ -3319,7 +3319,7 @@ "type": "Identifier", "span": { "start": 2269, - "end": 2273, + "end": 2270, "ctxt": 0 }, "value": "n", @@ -3356,7 +3356,7 @@ "type": "Identifier", "span": { "start": 2275, - "end": 2292, + "end": 2276, "ctxt": 0 }, "value": "f", @@ -3380,7 +3380,7 @@ "type": "Identifier", "span": { "start": 2279, - "end": 2283, + "end": 2280, "ctxt": 0 }, "value": "x", @@ -3958,7 +3958,7 @@ "type": "Identifier", "span": { "start": 2675, - "end": 2689, + "end": 2676, "ctxt": 0 }, "value": "a", @@ -3982,7 +3982,7 @@ "type": "Identifier", "span": { "start": 2679, - "end": 2683, + "end": 2680, "ctxt": 0 }, "value": "a", @@ -4051,7 +4051,7 @@ "type": "Identifier", "span": { "start": 2691, - "end": 2705, + "end": 2692, "ctxt": 0 }, "value": "b", @@ -4075,7 +4075,7 @@ "type": "Identifier", "span": { "start": 2695, - "end": 2699, + "end": 2696, "ctxt": 0 }, "value": "b", @@ -4144,7 +4144,7 @@ "type": "Identifier", "span": { "start": 2707, - "end": 2721, + "end": 2708, "ctxt": 0 }, "value": "c", @@ -4168,7 +4168,7 @@ "type": "Identifier", "span": { "start": 2711, - "end": 2715, + "end": 2712, "ctxt": 0 }, "value": "c", @@ -5093,7 +5093,7 @@ "type": "Identifier", "span": { "start": 3180, - "end": 3194, + "end": 3181, "ctxt": 0 }, "value": "a", @@ -5117,7 +5117,7 @@ "type": "Identifier", "span": { "start": 3184, - "end": 3188, + "end": 3185, "ctxt": 0 }, "value": "a", @@ -5186,7 +5186,7 @@ "type": "Identifier", "span": { "start": 3196, - "end": 3210, + "end": 3197, "ctxt": 0 }, "value": "b", @@ -5210,7 +5210,7 @@ "type": "Identifier", "span": { "start": 3200, - "end": 3204, + "end": 3201, "ctxt": 0 }, "value": "b", @@ -5279,7 +5279,7 @@ "type": "Identifier", "span": { "start": 3212, - "end": 3226, + "end": 3213, "ctxt": 0 }, "value": "c", @@ -5303,7 +5303,7 @@ "type": "Identifier", "span": { "start": 3216, - "end": 3220, + "end": 3217, "ctxt": 0 }, "value": "c", @@ -6101,7 +6101,7 @@ "type": "Identifier", "span": { "start": 3566, - "end": 3570, + "end": 3567, "ctxt": 0 }, "value": "n", @@ -6462,7 +6462,7 @@ "type": "Identifier", "span": { "start": 3841, - "end": 3845, + "end": 3842, "ctxt": 0 }, "value": "a", @@ -6499,7 +6499,7 @@ "type": "Identifier", "span": { "start": 3847, - "end": 3851, + "end": 3848, "ctxt": 0 }, "value": "b", @@ -6536,7 +6536,7 @@ "type": "Identifier", "span": { "start": 3853, - "end": 3857, + "end": 3854, "ctxt": 0 }, "value": "c", diff --git a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceErrors.json b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceErrors.json index f35739ac6316..55f39ab895d7 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceErrors.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 123, - "end": 127, + "end": 124, "ctxt": 0 }, "value": "n", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 129, - "end": 138, + "end": 130, "ctxt": 0 }, "value": "m", @@ -286,7 +286,7 @@ "type": "Identifier", "span": { "start": 361, - "end": 365, + "end": 362, "ctxt": 0 }, "value": "n", @@ -332,7 +332,7 @@ "type": "Identifier", "span": { "start": 367, - "end": 384, + "end": 368, "ctxt": 0 }, "value": "f", @@ -356,7 +356,7 @@ "type": "Identifier", "span": { "start": 371, - "end": 375, + "end": 372, "ctxt": 0 }, "value": "x", @@ -637,7 +637,7 @@ "type": "Identifier", "span": { "start": 624, - "end": 628, + "end": 625, "ctxt": 0 }, "value": "n", @@ -683,7 +683,7 @@ "type": "Identifier", "span": { "start": 630, - "end": 647, + "end": 631, "ctxt": 0 }, "value": "f", @@ -707,7 +707,7 @@ "type": "Identifier", "span": { "start": 634, - "end": 638, + "end": 635, "ctxt": 0 }, "value": "x", @@ -988,7 +988,7 @@ "type": "Identifier", "span": { "start": 852, - "end": 866, + "end": 853, "ctxt": 0 }, "value": "a", @@ -1012,7 +1012,7 @@ "type": "Identifier", "span": { "start": 856, - "end": 860, + "end": 857, "ctxt": 0 }, "value": "a", @@ -1090,7 +1090,7 @@ "type": "Identifier", "span": { "start": 868, - "end": 882, + "end": 869, "ctxt": 0 }, "value": "b", @@ -1114,7 +1114,7 @@ "type": "Identifier", "span": { "start": 872, - "end": 876, + "end": 873, "ctxt": 0 }, "value": "b", @@ -1192,7 +1192,7 @@ "type": "Identifier", "span": { "start": 884, - "end": 898, + "end": 885, "ctxt": 0 }, "value": "c", @@ -1216,7 +1216,7 @@ "type": "Identifier", "span": { "start": 888, - "end": 892, + "end": 889, "ctxt": 0 }, "value": "c", diff --git a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceTransitiveConstraints.json b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceTransitiveConstraints.json index 38c16736cc25..d32172d5423a 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceTransitiveConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceTransitiveConstraints.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 56, - "end": 60, + "end": 57, "ctxt": 0 }, "value": "a", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 62, - "end": 66, + "end": 63, "ctxt": 0 }, "value": "b", @@ -124,7 +124,7 @@ "type": "Identifier", "span": { "start": 68, - "end": 72, + "end": 69, "ctxt": 0 }, "value": "c", diff --git a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithConstraints.json b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithConstraints.json index ffa129553a52..d2b11e059a49 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithConstraints.json @@ -226,7 +226,7 @@ "type": "Identifier", "span": { "start": 231, - "end": 240, + "end": 232, "ctxt": 0 }, "value": "n", @@ -499,7 +499,7 @@ "type": "Identifier", "span": { "start": 472, - "end": 476, + "end": 473, "ctxt": 0 }, "value": "n", @@ -545,7 +545,7 @@ "type": "Identifier", "span": { "start": 478, - "end": 487, + "end": 479, "ctxt": 0 }, "value": "m", @@ -990,7 +990,7 @@ "type": "Identifier", "span": { "start": 780, - "end": 797, + "end": 781, "ctxt": 0 }, "value": "n", @@ -1014,7 +1014,7 @@ "type": "Identifier", "span": { "start": 784, - "end": 788, + "end": 785, "ctxt": 0 }, "value": "x", @@ -1468,7 +1468,7 @@ "type": "Identifier", "span": { "start": 984, - "end": 1007, + "end": 985, "ctxt": 0 }, "value": "n", @@ -1492,7 +1492,7 @@ "type": "Identifier", "span": { "start": 988, - "end": 992, + "end": 989, "ctxt": 0 }, "value": "x", @@ -1529,7 +1529,7 @@ "type": "Identifier", "span": { "start": 994, - "end": 998, + "end": 995, "ctxt": 0 }, "value": "y", @@ -2116,7 +2116,7 @@ "type": "Identifier", "span": { "start": 1354, - "end": 1371, + "end": 1362, "ctxt": 0 }, "value": "producer", @@ -2476,7 +2476,7 @@ "type": "Identifier", "span": { "start": 1678, - "end": 1682, + "end": 1679, "ctxt": 0 }, "value": "n", @@ -2522,7 +2522,7 @@ "type": "Identifier", "span": { "start": 1684, - "end": 1701, + "end": 1685, "ctxt": 0 }, "value": "f", @@ -2546,7 +2546,7 @@ "type": "Identifier", "span": { "start": 1688, - "end": 1692, + "end": 1689, "ctxt": 0 }, "value": "x", @@ -3074,7 +3074,7 @@ "type": "Identifier", "span": { "start": 2082, - "end": 2086, + "end": 2083, "ctxt": 0 }, "value": "n", @@ -3120,7 +3120,7 @@ "type": "Identifier", "span": { "start": 2088, - "end": 2105, + "end": 2089, "ctxt": 0 }, "value": "f", @@ -3144,7 +3144,7 @@ "type": "Identifier", "span": { "start": 2092, - "end": 2096, + "end": 2093, "ctxt": 0 }, "value": "x", @@ -3672,7 +3672,7 @@ "type": "Identifier", "span": { "start": 2460, - "end": 2474, + "end": 2461, "ctxt": 0 }, "value": "a", @@ -3696,7 +3696,7 @@ "type": "Identifier", "span": { "start": 2464, - "end": 2468, + "end": 2465, "ctxt": 0 }, "value": "a", @@ -3774,7 +3774,7 @@ "type": "Identifier", "span": { "start": 2476, - "end": 2490, + "end": 2477, "ctxt": 0 }, "value": "b", @@ -3798,7 +3798,7 @@ "type": "Identifier", "span": { "start": 2480, - "end": 2484, + "end": 2481, "ctxt": 0 }, "value": "b", @@ -3876,7 +3876,7 @@ "type": "Identifier", "span": { "start": 2492, - "end": 2506, + "end": 2493, "ctxt": 0 }, "value": "c", @@ -3900,7 +3900,7 @@ "type": "Identifier", "span": { "start": 2496, - "end": 2500, + "end": 2497, "ctxt": 0 }, "value": "c", @@ -4775,7 +4775,7 @@ "type": "Identifier", "span": { "start": 2928, - "end": 2942, + "end": 2929, "ctxt": 0 }, "value": "a", @@ -4799,7 +4799,7 @@ "type": "Identifier", "span": { "start": 2932, - "end": 2936, + "end": 2933, "ctxt": 0 }, "value": "a", @@ -4877,7 +4877,7 @@ "type": "Identifier", "span": { "start": 2944, - "end": 2958, + "end": 2945, "ctxt": 0 }, "value": "b", @@ -4901,7 +4901,7 @@ "type": "Identifier", "span": { "start": 2948, - "end": 2952, + "end": 2949, "ctxt": 0 }, "value": "b", @@ -4979,7 +4979,7 @@ "type": "Identifier", "span": { "start": 2960, - "end": 2974, + "end": 2961, "ctxt": 0 }, "value": "c", @@ -5003,7 +5003,7 @@ "type": "Identifier", "span": { "start": 2964, - "end": 2968, + "end": 2965, "ctxt": 0 }, "value": "c", @@ -5751,7 +5751,7 @@ "type": "Identifier", "span": { "start": 3329, - "end": 3333, + "end": 3330, "ctxt": 0 }, "value": "n", @@ -6099,7 +6099,7 @@ "type": "Identifier", "span": { "start": 3599, - "end": 3603, + "end": 3600, "ctxt": 0 }, "value": "a", @@ -6145,7 +6145,7 @@ "type": "Identifier", "span": { "start": 3605, - "end": 3609, + "end": 3606, "ctxt": 0 }, "value": "b", @@ -6191,7 +6191,7 @@ "type": "Identifier", "span": { "start": 3611, - "end": 3615, + "end": 3612, "ctxt": 0 }, "value": "c", diff --git a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithObjectLiteral.json b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithObjectLiteral.json index 44d74cb830cf..f2cd6dd20551 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithObjectLiteral.json +++ b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithObjectLiteral.json @@ -141,7 +141,7 @@ "type": "Identifier", "span": { "start": 50, - "end": 58, + "end": 55, "ctxt": 0 }, "value": "value", @@ -207,7 +207,7 @@ "type": "Identifier", "span": { "start": 80, - "end": 94, + "end": 81, "ctxt": 0 }, "value": "x", @@ -771,7 +771,7 @@ "type": "Identifier", "span": { "start": 448, - "end": 482, + "end": 449, "ctxt": 0 }, "value": "a", @@ -832,7 +832,7 @@ "type": "Identifier", "span": { "start": 457, - "end": 461, + "end": 458, "ctxt": 0 }, "value": "x", @@ -984,7 +984,7 @@ "type": "Identifier", "span": { "start": 484, - "end": 488, + "end": 485, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/tsc/typeArgumentsWithStringLiteralTypes01.json b/crates/swc_ecma_parser/tests/tsc/typeArgumentsWithStringLiteralTypes01.json index 65cd41f2054c..78f133e54382 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeArgumentsWithStringLiteralTypes01.json +++ b/crates/swc_ecma_parser/tests/tsc/typeArgumentsWithStringLiteralTypes01.json @@ -74,7 +74,7 @@ "type": "Identifier", "span": { "start": 96, - "end": 107, + "end": 99, "ctxt": 0 }, "value": "str", @@ -153,7 +153,7 @@ "type": "Identifier", "span": { "start": 151, - "end": 163, + "end": 154, "ctxt": 0 }, "value": "str", @@ -250,7 +250,7 @@ "type": "Identifier", "span": { "start": 213, - "end": 235, + "end": 216, "ctxt": 0 }, "value": "str", @@ -403,7 +403,7 @@ "type": "Identifier", "span": { "start": 275, - "end": 279, + "end": 276, "ctxt": 0 }, "value": "x", @@ -449,7 +449,7 @@ "type": "Identifier", "span": { "start": 281, - "end": 285, + "end": 282, "ctxt": 0 }, "value": "y", @@ -619,7 +619,7 @@ "type": "Identifier", "span": { "start": 343, - "end": 347, + "end": 344, "ctxt": 0 }, "value": "x", @@ -665,7 +665,7 @@ "type": "Identifier", "span": { "start": 349, - "end": 353, + "end": 350, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/typeFromParamTagForFunction.json b/crates/swc_ecma_parser/tests/tsc/typeFromParamTagForFunction.json index 22d8965581a0..e9a904e61949 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeFromParamTagForFunction.json +++ b/crates/swc_ecma_parser/tests/tsc/typeFromParamTagForFunction.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 124, - "end": 134, + "end": 126, "ctxt": 0 }, "value": "id", diff --git a/crates/swc_ecma_parser/tests/tsc/typeFromPropertyAssignment29.json b/crates/swc_ecma_parser/tests/tsc/typeFromPropertyAssignment29.json index b189ab157626..8f5458e3ff85 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeFromPropertyAssignment29.json +++ b/crates/swc_ecma_parser/tests/tsc/typeFromPropertyAssignment29.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 44, - "end": 53, + "end": 45, "ctxt": 0 }, "value": "n", @@ -238,7 +238,7 @@ "type": "Identifier", "span": { "start": 130, - "end": 139, + "end": 131, "ctxt": 0 }, "value": "n", @@ -549,7 +549,7 @@ "type": "Identifier", "span": { "start": 265, - "end": 274, + "end": 266, "ctxt": 0 }, "value": "n", @@ -860,7 +860,7 @@ "type": "Identifier", "span": { "start": 387, - "end": 396, + "end": 388, "ctxt": 0 }, "value": "n", @@ -1397,7 +1397,7 @@ "type": "Identifier", "span": { "start": 599, - "end": 608, + "end": 600, "ctxt": 0 }, "value": "n", @@ -1508,7 +1508,7 @@ "type": "Identifier", "span": { "start": 657, - "end": 666, + "end": 658, "ctxt": 0 }, "value": "n", @@ -1591,7 +1591,7 @@ "type": "Identifier", "span": { "start": 699, - "end": 708, + "end": 700, "ctxt": 0 }, "value": "m", @@ -1867,7 +1867,7 @@ "type": "Identifier", "span": { "start": 844, - "end": 853, + "end": 845, "ctxt": 0 }, "value": "n", @@ -2582,7 +2582,7 @@ "type": "Identifier", "span": { "start": 1320, - "end": 1329, + "end": 1321, "ctxt": 0 }, "value": "n", @@ -2792,7 +2792,7 @@ "type": "Identifier", "span": { "start": 1408, - "end": 1417, + "end": 1409, "ctxt": 0 }, "value": "n", @@ -3238,7 +3238,7 @@ "type": "Identifier", "span": { "start": 1666, - "end": 1675, + "end": 1667, "ctxt": 0 }, "value": "n", @@ -3692,7 +3692,7 @@ "type": "Identifier", "span": { "start": 1919, - "end": 1928, + "end": 1920, "ctxt": 0 }, "value": "n", diff --git a/crates/swc_ecma_parser/tests/tsc/typeFromPropertyAssignment31.json b/crates/swc_ecma_parser/tests/tsc/typeFromPropertyAssignment31.json index 696634d3e668..bf8b812e9581 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeFromPropertyAssignment31.json +++ b/crates/swc_ecma_parser/tests/tsc/typeFromPropertyAssignment31.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 23, - "end": 32, + "end": 24, "ctxt": 0 }, "value": "n", @@ -210,7 +210,7 @@ "type": "Identifier", "span": { "start": 100, - "end": 109, + "end": 101, "ctxt": 0 }, "value": "n", diff --git a/crates/swc_ecma_parser/tests/tsc/typeFromPropertyAssignment32.json b/crates/swc_ecma_parser/tests/tsc/typeFromPropertyAssignment32.json index 93c0c990f80f..056b3f0d1855 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeFromPropertyAssignment32.json +++ b/crates/swc_ecma_parser/tests/tsc/typeFromPropertyAssignment32.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 48, - "end": 57, + "end": 49, "ctxt": 0 }, "value": "n", @@ -210,7 +210,7 @@ "type": "Identifier", "span": { "start": 125, - "end": 134, + "end": 126, "ctxt": 0 }, "value": "n", diff --git a/crates/swc_ecma_parser/tests/tsc/typeFromPropertyAssignment33.json b/crates/swc_ecma_parser/tests/tsc/typeFromPropertyAssignment33.json index c7130a3294de..62a45e185ecb 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeFromPropertyAssignment33.json +++ b/crates/swc_ecma_parser/tests/tsc/typeFromPropertyAssignment33.json @@ -492,7 +492,7 @@ "type": "Identifier", "span": { "start": 312, - "end": 321, + "end": 313, "ctxt": 0 }, "value": "n", @@ -670,7 +670,7 @@ "type": "Identifier", "span": { "start": 389, - "end": 398, + "end": 390, "ctxt": 0 }, "value": "n", diff --git a/crates/swc_ecma_parser/tests/tsc/typeFromPropertyAssignment36.json b/crates/swc_ecma_parser/tests/tsc/typeFromPropertyAssignment36.json index 9bc6b9df9c76..0c897873ca59 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeFromPropertyAssignment36.json +++ b/crates/swc_ecma_parser/tests/tsc/typeFromPropertyAssignment36.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 29, - "end": 39, + "end": 30, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardFunction.json b/crates/swc_ecma_parser/tests/tsc/typeGuardFunction.json index 224e9f05a5ac..c05a031cb9c0 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardFunction.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardFunction.json @@ -257,7 +257,7 @@ "type": "Identifier", "span": { "start": 129, - "end": 136, + "end": 131, "ctxt": 0 }, "value": "p1", @@ -373,7 +373,7 @@ "type": "Identifier", "span": { "start": 169, - "end": 176, + "end": 171, "ctxt": 0 }, "value": "p1", @@ -489,7 +489,7 @@ "type": "Identifier", "span": { "start": 209, - "end": 216, + "end": 211, "ctxt": 0 }, "value": "p1", @@ -1203,7 +1203,7 @@ "type": "Identifier", "span": { "start": 494, - "end": 499, + "end": 496, "ctxt": 0 }, "value": "p1", @@ -1584,7 +1584,7 @@ "type": "Identifier", "span": { "start": 793, - "end": 798, + "end": 795, "ctxt": 0 }, "value": "p1", @@ -1734,7 +1734,7 @@ "type": "Identifier", "span": { "start": 834, - "end": 839, + "end": 836, "ctxt": 0 }, "value": "p1", @@ -2045,7 +2045,7 @@ "type": "Identifier", "span": { "start": 974, - "end": 996, + "end": 976, "ctxt": 0 }, "value": "p1", @@ -2069,7 +2069,7 @@ "type": "Identifier", "span": { "start": 979, - "end": 984, + "end": 981, "ctxt": 0 }, "value": "p1", @@ -2218,7 +2218,7 @@ "type": "Identifier", "span": { "start": 1036, - "end": 1041, + "end": 1038, "ctxt": 0 }, "value": "p1", @@ -2375,7 +2375,7 @@ "type": "Identifier", "span": { "start": 1153, - "end": 1163, + "end": 1154, "ctxt": 0 }, "value": "a", @@ -2504,7 +2504,7 @@ "type": "Identifier", "span": { "start": 1287, - "end": 1310, + "end": 1289, "ctxt": 0 }, "value": "p1", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardFunctionGenerics.json b/crates/swc_ecma_parser/tests/tsc/typeGuardFunctionGenerics.json index 7b6f47b80193..6b86127c521c 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardFunctionGenerics.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardFunctionGenerics.json @@ -530,7 +530,7 @@ "type": "Identifier", "span": { "start": 234, - "end": 247, + "end": 236, "ctxt": 0 }, "value": "p1", @@ -691,7 +691,7 @@ "type": "Identifier", "span": { "start": 278, - "end": 291, + "end": 280, "ctxt": 0 }, "value": "p1", @@ -767,7 +767,7 @@ "type": "Identifier", "span": { "start": 293, - "end": 300, + "end": 295, "ctxt": 0 }, "value": "p2", @@ -915,7 +915,7 @@ "type": "Identifier", "span": { "start": 337, - "end": 356, + "end": 339, "ctxt": 0 }, "value": "p1", @@ -1103,7 +1103,7 @@ "type": "Identifier", "span": { "start": 387, - "end": 406, + "end": 389, "ctxt": 0 }, "value": "p1", @@ -1206,7 +1206,7 @@ "type": "Identifier", "span": { "start": 408, - "end": 415, + "end": 410, "ctxt": 0 }, "value": "p2", @@ -1354,7 +1354,7 @@ "type": "Identifier", "span": { "start": 455, - "end": 474, + "end": 457, "ctxt": 0 }, "value": "p1", @@ -1457,7 +1457,7 @@ "type": "Identifier", "span": { "start": 476, - "end": 481, + "end": 478, "ctxt": 0 }, "value": "p2", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardFunctionOfFormThisErrors.json b/crates/swc_ecma_parser/tests/tsc/typeGuardFunctionOfFormThisErrors.json index b0bf1f5b32f4..a22481a46ea6 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardFunctionOfFormThisErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardFunctionOfFormThisErrors.json @@ -1035,7 +1035,7 @@ "type": "Identifier", "span": { "start": 658, - "end": 664, + "end": 659, "ctxt": 0 }, "value": "c", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardIntersectionTypes.json b/crates/swc_ecma_parser/tests/tsc/typeGuardIntersectionTypes.json index d3d78344ebbd..882867478295 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardIntersectionTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardIntersectionTypes.json @@ -248,7 +248,7 @@ "type": "Identifier", "span": { "start": 146, - "end": 154, + "end": 149, "ctxt": 0 }, "value": "obj", @@ -364,7 +364,7 @@ "type": "Identifier", "span": { "start": 188, - "end": 196, + "end": 191, "ctxt": 0 }, "value": "obj", @@ -480,7 +480,7 @@ "type": "Identifier", "span": { "start": 230, - "end": 238, + "end": 233, "ctxt": 0 }, "value": "obj", @@ -596,7 +596,7 @@ "type": "Identifier", "span": { "start": 264, - "end": 275, + "end": 267, "ctxt": 0 }, "value": "obj", @@ -1136,7 +1136,7 @@ "type": "Identifier", "span": { "start": 542, - "end": 553, + "end": 548, "ctxt": 0 }, "value": "toTest", @@ -1316,7 +1316,7 @@ "type": "Identifier", "span": { "start": 661, - "end": 665, + "end": 662, "ctxt": 0 }, "value": "a", @@ -1568,7 +1568,7 @@ "type": "Identifier", "span": { "start": 790, - "end": 799, + "end": 791, "ctxt": 0 }, "value": "s", @@ -1904,7 +1904,7 @@ "type": "Identifier", "span": { "start": 1044, - "end": 1052, + "end": 1045, "ctxt": 0 }, "value": "x", @@ -2122,7 +2122,7 @@ "type": "Identifier", "span": { "start": 1129, - "end": 1137, + "end": 1130, "ctxt": 0 }, "value": "x", @@ -2330,7 +2330,7 @@ "type": "Identifier", "span": { "start": 1267, - "end": 1279, + "end": 1272, "ctxt": 0 }, "value": "beast", @@ -3142,7 +3142,7 @@ "type": "Identifier", "span": { "start": 2081, - "end": 2094, + "end": 2086, "ctxt": 0 }, "value": "beast", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardNarrowsPrimitiveIntersection.json b/crates/swc_ecma_parser/tests/tsc/typeGuardNarrowsPrimitiveIntersection.json index 32fe3bd0c6b6..b5e515dd28e6 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardNarrowsPrimitiveIntersection.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardNarrowsPrimitiveIntersection.json @@ -103,7 +103,7 @@ "type": "Identifier", "span": { "start": 54, - "end": 67, + "end": 59, "ctxt": 0 }, "value": "value", @@ -246,7 +246,7 @@ "type": "Identifier", "span": { "start": 120, - "end": 139, + "end": 125, "ctxt": 0 }, "value": "value", @@ -354,7 +354,7 @@ "type": "Identifier", "span": { "start": 172, - "end": 185, + "end": 177, "ctxt": 0 }, "value": "value", @@ -649,7 +649,7 @@ "type": "Identifier", "span": { "start": 338, - "end": 351, + "end": 343, "ctxt": 0 }, "value": "value", @@ -792,7 +792,7 @@ "type": "Identifier", "span": { "start": 406, - "end": 426, + "end": 411, "ctxt": 0 }, "value": "value", @@ -900,7 +900,7 @@ "type": "Identifier", "span": { "start": 460, - "end": 473, + "end": 465, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardNarrowsToLiteralType.json b/crates/swc_ecma_parser/tests/tsc/typeGuardNarrowsToLiteralType.json index 15c0802a565b..617f69c2dc0a 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardNarrowsToLiteralType.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardNarrowsToLiteralType.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 24, - "end": 37, + "end": 29, "ctxt": 0 }, "value": "value", @@ -147,7 +147,7 @@ "type": "Identifier", "span": { "start": 81, - "end": 93, + "end": 86, "ctxt": 0 }, "value": "value", @@ -235,7 +235,7 @@ "type": "Identifier", "span": { "start": 126, - "end": 139, + "end": 131, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardNarrowsToLiteralTypeUnion.json b/crates/swc_ecma_parser/tests/tsc/typeGuardNarrowsToLiteralTypeUnion.json index 3b05bd307c3d..2e053ba8122d 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardNarrowsToLiteralTypeUnion.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardNarrowsToLiteralTypeUnion.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 24, - "end": 37, + "end": 29, "ctxt": 0 }, "value": "value", @@ -183,7 +183,7 @@ "type": "Identifier", "span": { "start": 91, - "end": 111, + "end": 96, "ctxt": 0 }, "value": "value", @@ -299,7 +299,7 @@ "type": "Identifier", "span": { "start": 144, - "end": 157, + "end": 149, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormFunctionEquality.json b/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormFunctionEquality.json index cfa6393274b5..c7f2ac0d5b3a 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormFunctionEquality.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormFunctionEquality.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 28, - "end": 37, + "end": 29, "ctxt": 0 }, "value": "a", @@ -68,7 +68,7 @@ "type": "Identifier", "span": { "start": 39, - "end": 48, + "end": 40, "ctxt": 0 }, "value": "b", @@ -184,7 +184,7 @@ "type": "Identifier", "span": { "start": 92, - "end": 101, + "end": 93, "ctxt": 0 }, "value": "a", @@ -532,7 +532,7 @@ "type": "Identifier", "span": { "start": 250, - "end": 259, + "end": 251, "ctxt": 0 }, "value": "a", @@ -568,7 +568,7 @@ "type": "Identifier", "span": { "start": 261, - "end": 270, + "end": 262, "ctxt": 0 }, "value": "b", @@ -604,7 +604,7 @@ "type": "Identifier", "span": { "start": 272, - "end": 281, + "end": 273, "ctxt": 0 }, "value": "c", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormIsType.json b/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormIsType.json index 24ce0b107987..117ac118c048 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormIsType.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormIsType.json @@ -423,7 +423,7 @@ "type": "Identifier", "span": { "start": 180, - "end": 186, + "end": 181, "ctxt": 0 }, "value": "x", @@ -565,7 +565,7 @@ "type": "Identifier", "span": { "start": 233, - "end": 239, + "end": 234, "ctxt": 0 }, "value": "x", @@ -707,7 +707,7 @@ "type": "Identifier", "span": { "start": 286, - "end": 292, + "end": 287, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormIsTypeOnInterfaces.json b/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormIsTypeOnInterfaces.json index 944f43118ab8..e7c54939f580 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormIsTypeOnInterfaces.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormIsTypeOnInterfaces.json @@ -661,7 +661,7 @@ "type": "Identifier", "span": { "start": 274, - "end": 280, + "end": 275, "ctxt": 0 }, "value": "x", @@ -803,7 +803,7 @@ "type": "Identifier", "span": { "start": 327, - "end": 333, + "end": 328, "ctxt": 0 }, "value": "x", @@ -945,7 +945,7 @@ "type": "Identifier", "span": { "start": 380, - "end": 386, + "end": 381, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormTypeOfFunction.json b/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormTypeOfFunction.json index 1283dbf9d964..cb9492d7a8ca 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormTypeOfFunction.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormTypeOfFunction.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 14, - "end": 20, + "end": 15, "ctxt": 0 }, "value": "x", @@ -179,7 +179,7 @@ "type": "Identifier", "span": { "start": 99, - "end": 109, + "end": 100, "ctxt": 0 }, "value": "x", @@ -326,7 +326,7 @@ "type": "Identifier", "span": { "start": 193, - "end": 198, + "end": 194, "ctxt": 0 }, "value": "x", @@ -473,7 +473,7 @@ "type": "Identifier", "span": { "start": 285, - "end": 289, + "end": 286, "ctxt": 0 }, "value": "x", @@ -662,7 +662,7 @@ "type": "Identifier", "span": { "start": 377, - "end": 393, + "end": 378, "ctxt": 0 }, "value": "x", @@ -851,7 +851,7 @@ "type": "Identifier", "span": { "start": 474, - "end": 489, + "end": 475, "ctxt": 0 }, "value": "x", @@ -1016,7 +1016,7 @@ "type": "Identifier", "span": { "start": 578, - "end": 604, + "end": 579, "ctxt": 0 }, "value": "x", @@ -1235,7 +1235,7 @@ "type": "Identifier", "span": { "start": 732, - "end": 765, + "end": 733, "ctxt": 0 }, "value": "x", @@ -1496,7 +1496,7 @@ "type": "Identifier", "span": { "start": 900, - "end": 932, + "end": 901, "ctxt": 0 }, "value": "x", @@ -1773,7 +1773,7 @@ "type": "Identifier", "span": { "start": 1121, - "end": 1127, + "end": 1124, "ctxt": 0 }, "value": "obj", @@ -1819,7 +1819,7 @@ "type": "Identifier", "span": { "start": 1129, - "end": 1138, + "end": 1133, "ctxt": 0 }, "value": "keys", @@ -2244,7 +2244,7 @@ "type": "Identifier", "span": { "start": 1346, - "end": 1397, + "end": 1353, "ctxt": 0 }, "value": "reducer", @@ -2637,7 +2637,7 @@ "type": "Identifier", "span": { "start": 1529, - "end": 1560, + "end": 1530, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardOfFromPropNameInUnionType.json b/crates/swc_ecma_parser/tests/tsc/typeGuardOfFromPropNameInUnionType.json index 2cc3a6dad293..feb06f111358 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardOfFromPropNameInUnionType.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardOfFromPropNameInUnionType.json @@ -340,7 +340,7 @@ "type": "Identifier", "span": { "start": 114, - "end": 122, + "end": 115, "ctxt": 0 }, "value": "x", @@ -618,7 +618,7 @@ "type": "Identifier", "span": { "start": 229, - "end": 245, + "end": 230, "ctxt": 0 }, "value": "x", @@ -1034,7 +1034,7 @@ "type": "Identifier", "span": { "start": 391, - "end": 425, + "end": 392, "ctxt": 0 }, "value": "x", @@ -1562,7 +1562,7 @@ "type": "Identifier", "span": { "start": 661, - "end": 701, + "end": 662, "ctxt": 0 }, "value": "x", @@ -1926,7 +1926,7 @@ "type": "Identifier", "span": { "start": 894, - "end": 902, + "end": 895, "ctxt": 0 }, "value": "x", @@ -2365,7 +2365,7 @@ "type": "Identifier", "span": { "start": 1071, - "end": 1092, + "end": 1072, "ctxt": 0 }, "value": "x", @@ -2792,7 +2792,7 @@ "type": "Identifier", "span": { "start": 1295, - "end": 1317, + "end": 1296, "ctxt": 0 }, "value": "x", @@ -3940,7 +3940,7 @@ "type": "Identifier", "span": { "start": 1900, - "end": 1910, + "end": 1901, "ctxt": 0 }, "value": "i", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardTypeOfUndefined.json b/crates/swc_ecma_parser/tests/tsc/typeGuardTypeOfUndefined.json index ac6d95f75fc2..d20bfc05b52a 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardTypeOfUndefined.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardTypeOfUndefined.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 69, - "end": 75, + "end": 70, "ctxt": 0 }, "value": "a", @@ -290,7 +290,7 @@ "type": "Identifier", "span": { "start": 270, - "end": 276, + "end": 271, "ctxt": 0 }, "value": "a", @@ -548,7 +548,7 @@ "type": "Identifier", "span": { "start": 471, - "end": 477, + "end": 472, "ctxt": 0 }, "value": "a", @@ -769,7 +769,7 @@ "type": "Identifier", "span": { "start": 600, - "end": 606, + "end": 601, "ctxt": 0 }, "value": "a", @@ -990,7 +990,7 @@ "type": "Identifier", "span": { "start": 729, - "end": 746, + "end": 730, "ctxt": 0 }, "value": "a", @@ -1267,7 +1267,7 @@ "type": "Identifier", "span": { "start": 941, - "end": 958, + "end": 942, "ctxt": 0 }, "value": "a", @@ -1544,7 +1544,7 @@ "type": "Identifier", "span": { "start": 1153, - "end": 1170, + "end": 1154, "ctxt": 0 }, "value": "a", @@ -1784,7 +1784,7 @@ "type": "Identifier", "span": { "start": 1293, - "end": 1310, + "end": 1294, "ctxt": 0 }, "value": "a", @@ -2024,7 +2024,7 @@ "type": "Identifier", "span": { "start": 1433, - "end": 1452, + "end": 1434, "ctxt": 0 }, "value": "a", @@ -2301,7 +2301,7 @@ "type": "Identifier", "span": { "start": 1648, - "end": 1667, + "end": 1649, "ctxt": 0 }, "value": "a", @@ -2578,7 +2578,7 @@ "type": "Identifier", "span": { "start": 1863, - "end": 1882, + "end": 1864, "ctxt": 0 }, "value": "a", @@ -2818,7 +2818,7 @@ "type": "Identifier", "span": { "start": 2006, - "end": 2025, + "end": 2007, "ctxt": 0 }, "value": "a", @@ -3058,7 +3058,7 @@ "type": "Identifier", "span": { "start": 2149, - "end": 2175, + "end": 2150, "ctxt": 0 }, "value": "a", @@ -3344,7 +3344,7 @@ "type": "Identifier", "span": { "start": 2371, - "end": 2397, + "end": 2372, "ctxt": 0 }, "value": "a", @@ -3630,7 +3630,7 @@ "type": "Identifier", "span": { "start": 2593, - "end": 2619, + "end": 2594, "ctxt": 0 }, "value": "a", @@ -3879,7 +3879,7 @@ "type": "Identifier", "span": { "start": 2743, - "end": 2769, + "end": 2744, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardsAsAssertions.json b/crates/swc_ecma_parser/tests/tsc/typeGuardsAsAssertions.json index 085f006af111..828e6498c67f 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardsAsAssertions.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardsAsAssertions.json @@ -525,7 +525,7 @@ "type": "Identifier", "span": { "start": 278, - "end": 296, + "end": 283, "ctxt": 0 }, "value": "value", @@ -786,7 +786,7 @@ "type": "Identifier", "span": { "start": 370, - "end": 377, + "end": 374, "ctxt": 0 }, "value": "some", @@ -935,7 +935,7 @@ "type": "Identifier", "span": { "start": 427, - "end": 444, + "end": 435, "ctxt": 0 }, "value": "makeSome", @@ -3010,7 +3010,7 @@ "type": "Identifier", "span": { "start": 2038, - "end": 2056, + "end": 2039, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardsDefeat.json b/crates/swc_ecma_parser/tests/tsc/typeGuardsDefeat.json index f29b50e01e6d..d315cf7c2eff 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardsDefeat.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardsDefeat.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 143, - "end": 161, + "end": 144, "ctxt": 0 }, "value": "x", @@ -354,7 +354,7 @@ "type": "Identifier", "span": { "start": 356, - "end": 374, + "end": 357, "ctxt": 0 }, "value": "x", @@ -707,7 +707,7 @@ "type": "Identifier", "span": { "start": 578, - "end": 596, + "end": 579, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardsInClassAccessors.json b/crates/swc_ecma_parser/tests/tsc/typeGuardsInClassAccessors.json index 250f4b172043..83f0e4673700 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardsInClassAccessors.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardsInClassAccessors.json @@ -581,7 +581,7 @@ "type": "Identifier", "span": { "start": 670, - "end": 692, + "end": 675, "ctxt": 0 }, "value": "param", @@ -1400,7 +1400,7 @@ "type": "Identifier", "span": { "start": 1483, - "end": 1505, + "end": 1488, "ctxt": 0 }, "value": "param", @@ -2219,7 +2219,7 @@ "type": "Identifier", "span": { "start": 2290, - "end": 2312, + "end": 2295, "ctxt": 0 }, "value": "param", @@ -3038,7 +3038,7 @@ "type": "Identifier", "span": { "start": 3131, - "end": 3153, + "end": 3136, "ctxt": 0 }, "value": "param", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardsInClassMethods.json b/crates/swc_ecma_parser/tests/tsc/typeGuardsInClassMethods.json index 98393d1dcb10..66f5a640904b 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardsInClassMethods.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardsInClassMethods.json @@ -173,7 +173,7 @@ "type": "Identifier", "span": { "start": 233, - "end": 255, + "end": 238, "ctxt": 0 }, "value": "param", @@ -638,7 +638,7 @@ "type": "Identifier", "span": { "start": 687, - "end": 709, + "end": 692, "ctxt": 0 }, "value": "param", @@ -1118,7 +1118,7 @@ "type": "Identifier", "span": { "start": 1133, - "end": 1155, + "end": 1138, "ctxt": 0 }, "value": "param", @@ -1598,7 +1598,7 @@ "type": "Identifier", "span": { "start": 1594, - "end": 1616, + "end": 1599, "ctxt": 0 }, "value": "param", @@ -2078,7 +2078,7 @@ "type": "Identifier", "span": { "start": 2047, - "end": 2069, + "end": 2052, "ctxt": 0 }, "value": "param", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardsInConditionalExpression.json b/crates/swc_ecma_parser/tests/tsc/typeGuardsInConditionalExpression.json index d5303424ad1f..cce20fbdf48a 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardsInConditionalExpression.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardsInConditionalExpression.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 498, - "end": 516, + "end": 499, "ctxt": 0 }, "value": "x", @@ -225,7 +225,7 @@ "type": "Identifier", "span": { "start": 623, - "end": 641, + "end": 624, "ctxt": 0 }, "value": "x", @@ -445,7 +445,7 @@ "type": "Identifier", "span": { "start": 758, - "end": 776, + "end": 759, "ctxt": 0 }, "value": "x", @@ -665,7 +665,7 @@ "type": "Identifier", "span": { "start": 888, - "end": 906, + "end": 889, "ctxt": 0 }, "value": "x", @@ -885,7 +885,7 @@ "type": "Identifier", "span": { "start": 1018, - "end": 1036, + "end": 1019, "ctxt": 0 }, "value": "x", @@ -1105,7 +1105,7 @@ "type": "Identifier", "span": { "start": 1153, - "end": 1171, + "end": 1154, "ctxt": 0 }, "value": "x", @@ -1380,7 +1380,7 @@ "type": "Identifier", "span": { "start": 1333, - "end": 1361, + "end": 1334, "ctxt": 0 }, "value": "x", @@ -1648,7 +1648,7 @@ "type": "Identifier", "span": { "start": 1535, - "end": 1563, + "end": 1536, "ctxt": 0 }, "value": "x", @@ -2047,7 +2047,7 @@ "type": "Identifier", "span": { "start": 1799, - "end": 1817, + "end": 1800, "ctxt": 0 }, "value": "x", @@ -2365,7 +2365,7 @@ "type": "Identifier", "span": { "start": 2068, - "end": 2096, + "end": 2069, "ctxt": 0 }, "value": "x", @@ -2737,7 +2737,7 @@ "type": "Identifier", "span": { "start": 2344, - "end": 2372, + "end": 2345, "ctxt": 0 }, "value": "x", @@ -3137,7 +3137,7 @@ "type": "Identifier", "span": { "start": 2657, - "end": 2685, + "end": 2658, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardsInDoStatement.json b/crates/swc_ecma_parser/tests/tsc/typeGuardsInDoStatement.json index fd393572e0e1..e3ae961b2c48 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardsInDoStatement.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardsInDoStatement.json @@ -81,7 +81,7 @@ "type": "Identifier", "span": { "start": 31, - "end": 59, + "end": 32, "ctxt": 0 }, "value": "x", @@ -348,7 +348,7 @@ "type": "Identifier", "span": { "start": 216, - "end": 244, + "end": 217, "ctxt": 0 }, "value": "x", @@ -643,7 +643,7 @@ "type": "Identifier", "span": { "start": 429, - "end": 447, + "end": 430, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardsInForStatement.json b/crates/swc_ecma_parser/tests/tsc/typeGuardsInForStatement.json index fb47aca572d3..034688ceac1f 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardsInForStatement.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardsInForStatement.json @@ -81,7 +81,7 @@ "type": "Identifier", "span": { "start": 31, - "end": 49, + "end": 32, "ctxt": 0 }, "value": "x", @@ -324,7 +324,7 @@ "type": "Identifier", "span": { "start": 174, - "end": 192, + "end": 175, "ctxt": 0 }, "value": "x", @@ -595,7 +595,7 @@ "type": "Identifier", "span": { "start": 345, - "end": 363, + "end": 346, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardsInFunction.json b/crates/swc_ecma_parser/tests/tsc/typeGuardsInFunction.json index 433f9cf71d54..6cb65bf89736 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardsInFunction.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardsInFunction.json @@ -149,7 +149,7 @@ "type": "Identifier", "span": { "start": 248, - "end": 270, + "end": 253, "ctxt": 0 }, "value": "param", @@ -617,7 +617,7 @@ "type": "Identifier", "span": { "start": 663, - "end": 685, + "end": 668, "ctxt": 0 }, "value": "param", @@ -769,7 +769,7 @@ "type": "Identifier", "span": { "start": 736, - "end": 759, + "end": 742, "ctxt": 0 }, "value": "param1", @@ -1450,7 +1450,7 @@ "type": "Identifier", "span": { "start": 1335, - "end": 1357, + "end": 1340, "ctxt": 0 }, "value": "param", @@ -1627,7 +1627,7 @@ "type": "Identifier", "span": { "start": 1496, - "end": 1519, + "end": 1502, "ctxt": 0 }, "value": "param1", @@ -2329,7 +2329,7 @@ "type": "Identifier", "span": { "start": 2101, - "end": 2123, + "end": 2106, "ctxt": 0 }, "value": "param", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardsInFunctionAndModuleBlock.json b/crates/swc_ecma_parser/tests/tsc/typeGuardsInFunctionAndModuleBlock.json index 06c9fa2116be..14d0d8a10dfa 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardsInFunctionAndModuleBlock.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardsInFunctionAndModuleBlock.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 65, - "end": 93, + "end": 66, "ctxt": 0 }, "value": "x", @@ -412,7 +412,7 @@ "type": "Identifier", "span": { "start": 366, - "end": 394, + "end": 367, "ctxt": 0 }, "value": "x", @@ -573,7 +573,7 @@ "type": "Identifier", "span": { "start": 464, - "end": 483, + "end": 465, "ctxt": 0 }, "value": "a", @@ -862,7 +862,7 @@ "type": "Identifier", "span": { "start": 741, - "end": 769, + "end": 742, "ctxt": 0 }, "value": "x", @@ -1239,7 +1239,7 @@ "type": "Identifier", "span": { "start": 1048, - "end": 1076, + "end": 1049, "ctxt": 0 }, "value": "x", @@ -1677,7 +1677,7 @@ "type": "Identifier", "span": { "start": 1475, - "end": 1503, + "end": 1476, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardsInIfStatement.json b/crates/swc_ecma_parser/tests/tsc/typeGuardsInIfStatement.json index 0868cd0c17ba..4a9ac291fa4c 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardsInIfStatement.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardsInIfStatement.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 330, - "end": 348, + "end": 331, "ctxt": 0 }, "value": "x", @@ -253,7 +253,7 @@ "type": "Identifier", "span": { "start": 489, - "end": 507, + "end": 490, "ctxt": 0 }, "value": "x", @@ -484,7 +484,7 @@ "type": "Identifier", "span": { "start": 655, - "end": 673, + "end": 656, "ctxt": 0 }, "value": "x", @@ -715,7 +715,7 @@ "type": "Identifier", "span": { "start": 826, - "end": 844, + "end": 827, "ctxt": 0 }, "value": "x", @@ -946,7 +946,7 @@ "type": "Identifier", "span": { "start": 992, - "end": 1010, + "end": 993, "ctxt": 0 }, "value": "x", @@ -1177,7 +1177,7 @@ "type": "Identifier", "span": { "start": 1163, - "end": 1181, + "end": 1164, "ctxt": 0 }, "value": "x", @@ -1446,7 +1446,7 @@ "type": "Identifier", "span": { "start": 1350, - "end": 1378, + "end": 1351, "ctxt": 0 }, "value": "x", @@ -1760,7 +1760,7 @@ "type": "Identifier", "span": { "start": 1602, - "end": 1630, + "end": 1603, "ctxt": 0 }, "value": "x", @@ -2161,7 +2161,7 @@ "type": "Identifier", "span": { "start": 1948, - "end": 1966, + "end": 1949, "ctxt": 0 }, "value": "x", @@ -2490,7 +2490,7 @@ "type": "Identifier", "span": { "start": 2255, - "end": 2283, + "end": 2256, "ctxt": 0 }, "value": "x", @@ -2896,7 +2896,7 @@ "type": "Identifier", "span": { "start": 2670, - "end": 2698, + "end": 2671, "ctxt": 0 }, "value": "x", @@ -3423,7 +3423,7 @@ "type": "Identifier", "span": { "start": 3460, - "end": 3488, + "end": 3461, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardsInRightOperandOfAndAndOperator.json b/crates/swc_ecma_parser/tests/tsc/typeGuardsInRightOperandOfAndAndOperator.json index 0e3581066d53..d7fade7ecdbd 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardsInRightOperandOfAndAndOperator.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardsInRightOperandOfAndAndOperator.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 158, - "end": 176, + "end": 159, "ctxt": 0 }, "value": "x", @@ -225,7 +225,7 @@ "type": "Identifier", "span": { "start": 259, - "end": 277, + "end": 260, "ctxt": 0 }, "value": "x", @@ -436,7 +436,7 @@ "type": "Identifier", "span": { "start": 407, - "end": 425, + "end": 408, "ctxt": 0 }, "value": "x", @@ -647,7 +647,7 @@ "type": "Identifier", "span": { "start": 584, - "end": 612, + "end": 585, "ctxt": 0 }, "value": "x", @@ -859,7 +859,7 @@ "type": "Identifier", "span": { "start": 775, - "end": 803, + "end": 776, "ctxt": 0 }, "value": "x", @@ -1202,7 +1202,7 @@ "type": "Identifier", "span": { "start": 1105, - "end": 1133, + "end": 1106, "ctxt": 0 }, "value": "x", @@ -1450,7 +1450,7 @@ "type": "Identifier", "span": { "start": 1411, - "end": 1439, + "end": 1412, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardsInRightOperandOfOrOrOperator.json b/crates/swc_ecma_parser/tests/tsc/typeGuardsInRightOperandOfOrOrOperator.json index df551516e74e..7e70a27aadc1 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardsInRightOperandOfOrOrOperator.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardsInRightOperandOfOrOrOperator.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 244, - "end": 262, + "end": 245, "ctxt": 0 }, "value": "x", @@ -225,7 +225,7 @@ "type": "Identifier", "span": { "start": 345, - "end": 363, + "end": 346, "ctxt": 0 }, "value": "x", @@ -436,7 +436,7 @@ "type": "Identifier", "span": { "start": 493, - "end": 511, + "end": 494, "ctxt": 0 }, "value": "x", @@ -647,7 +647,7 @@ "type": "Identifier", "span": { "start": 670, - "end": 698, + "end": 671, "ctxt": 0 }, "value": "x", @@ -859,7 +859,7 @@ "type": "Identifier", "span": { "start": 861, - "end": 889, + "end": 862, "ctxt": 0 }, "value": "x", @@ -1202,7 +1202,7 @@ "type": "Identifier", "span": { "start": 1191, - "end": 1219, + "end": 1192, "ctxt": 0 }, "value": "x", @@ -1450,7 +1450,7 @@ "type": "Identifier", "span": { "start": 1433, - "end": 1461, + "end": 1434, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardsInWhileStatement.json b/crates/swc_ecma_parser/tests/tsc/typeGuardsInWhileStatement.json index 4844e1d41803..a5d7950c7cf8 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardsInWhileStatement.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardsInWhileStatement.json @@ -81,7 +81,7 @@ "type": "Identifier", "span": { "start": 31, - "end": 49, + "end": 32, "ctxt": 0 }, "value": "x", @@ -302,7 +302,7 @@ "type": "Identifier", "span": { "start": 169, - "end": 187, + "end": 170, "ctxt": 0 }, "value": "x", @@ -551,7 +551,7 @@ "type": "Identifier", "span": { "start": 335, - "end": 353, + "end": 336, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardsObjectMethods.json b/crates/swc_ecma_parser/tests/tsc/typeGuardsObjectMethods.json index 45b8885110fd..cacba2032f37 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardsObjectMethods.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardsObjectMethods.json @@ -252,7 +252,7 @@ "type": "Identifier", "span": { "start": 298, - "end": 320, + "end": 303, "ctxt": 0 }, "value": "param", @@ -1055,7 +1055,7 @@ "type": "Identifier", "span": { "start": 1050, - "end": 1072, + "end": 1055, "ctxt": 0 }, "value": "param", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardsTypeParameters.json b/crates/swc_ecma_parser/tests/tsc/typeGuardsTypeParameters.json index fd21d377c84e..eb48d70f6b69 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardsTypeParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardsTypeParameters.json @@ -104,7 +104,7 @@ "type": "Identifier", "span": { "start": 144, - "end": 148, + "end": 145, "ctxt": 0 }, "value": "x", @@ -438,7 +438,7 @@ "type": "Identifier", "span": { "start": 264, - "end": 268, + "end": 265, "ctxt": 0 }, "value": "x", @@ -771,7 +771,7 @@ "type": "Identifier", "span": { "start": 421, - "end": 451, + "end": 425, "ctxt": 0 }, "value": "item", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardsWithInstanceOf.json b/crates/swc_ecma_parser/tests/tsc/typeGuardsWithInstanceOf.json index 916935fd013d..588c61ae51ec 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardsWithInstanceOf.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardsWithInstanceOf.json @@ -406,7 +406,7 @@ "type": "Identifier", "span": { "start": 242, - "end": 274, + "end": 249, "ctxt": 0 }, "value": "changes", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardsWithInstanceOfByConstructorSignature.json b/crates/swc_ecma_parser/tests/tsc/typeGuardsWithInstanceOfByConstructorSignature.json index 44fa238540fa..cb1ec64a8d2b 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardsWithInstanceOfByConstructorSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardsWithInstanceOfByConstructorSignature.json @@ -1484,7 +1484,7 @@ "type": "Identifier", "span": { "start": 742, - "end": 755, + "end": 747, "ctxt": 0 }, "value": "value", @@ -1549,7 +1549,7 @@ "type": "Identifier", "span": { "start": 771, - "end": 784, + "end": 776, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardsWithInstanceOfBySymbolHasInstance.json b/crates/swc_ecma_parser/tests/tsc/typeGuardsWithInstanceOfBySymbolHasInstance.json index cfec43105d90..dcef04854c04 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardsWithInstanceOfBySymbolHasInstance.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardsWithInstanceOfBySymbolHasInstance.json @@ -114,7 +114,7 @@ "type": "Identifier", "span": { "start": 83, - "end": 97, + "end": 88, "ctxt": 0 }, "value": "value", @@ -863,7 +863,7 @@ "type": "Identifier", "span": { "start": 454, - "end": 468, + "end": 459, "ctxt": 0 }, "value": "value", @@ -1748,7 +1748,7 @@ "type": "Identifier", "span": { "start": 872, - "end": 885, + "end": 877, "ctxt": 0 }, "value": "value", @@ -1813,7 +1813,7 @@ "type": "Identifier", "span": { "start": 901, - "end": 914, + "end": 906, "ctxt": 0 }, "value": "value", @@ -1909,7 +1909,7 @@ "type": "Identifier", "span": { "start": 946, - "end": 960, + "end": 951, "ctxt": 0 }, "value": "value", @@ -3066,7 +3066,7 @@ "type": "Identifier", "span": { "start": 1473, - "end": 1487, + "end": 1478, "ctxt": 0 }, "value": "value", @@ -3659,7 +3659,7 @@ "type": "Identifier", "span": { "start": 1795, - "end": 1809, + "end": 1800, "ctxt": 0 }, "value": "value", @@ -4603,7 +4603,7 @@ "type": "Identifier", "span": { "start": 2275, - "end": 2289, + "end": 2280, "ctxt": 0 }, "value": "value", @@ -5374,7 +5374,7 @@ "type": "Identifier", "span": { "start": 2789, - "end": 2803, + "end": 2794, "ctxt": 0 }, "value": "value", @@ -6186,7 +6186,7 @@ "type": "Identifier", "span": { "start": 3397, - "end": 3411, + "end": 3402, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/typeInferenceWithTupleType.json b/crates/swc_ecma_parser/tests/tsc/typeInferenceWithTupleType.json index 2501ad042e2a..f4852c5afe99 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeInferenceWithTupleType.json +++ b/crates/swc_ecma_parser/tests/tsc/typeInferenceWithTupleType.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 24, - "end": 28, + "end": 25, "ctxt": 0 }, "value": "x", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 30, - "end": 34, + "end": 31, "ctxt": 0 }, "value": "y", @@ -547,7 +547,7 @@ "type": "Identifier", "span": { "start": 223, - "end": 234, + "end": 229, "ctxt": 0 }, "value": "array1", @@ -601,7 +601,7 @@ "type": "Identifier", "span": { "start": 236, - "end": 247, + "end": 242, "ctxt": 0 }, "value": "array2", @@ -1722,7 +1722,7 @@ "type": "Identifier", "span": { "start": 727, - "end": 747, + "end": 733, "ctxt": 0 }, "value": "values", @@ -1939,7 +1939,7 @@ "type": "Identifier", "span": { "start": 782, - "end": 811, + "end": 788, "ctxt": 0 }, "value": "values", diff --git a/crates/swc_ecma_parser/tests/tsc/typeOfThisGeneral.json b/crates/swc_ecma_parser/tests/tsc/typeOfThisGeneral.json index f8f2c004e396..238763a752a4 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeOfThisGeneral.json +++ b/crates/swc_ecma_parser/tests/tsc/typeOfThisGeneral.json @@ -1773,7 +1773,7 @@ "type": "Identifier", "span": { "start": 1695, - "end": 1716, + "end": 1696, "ctxt": 0 }, "value": "v", @@ -4022,7 +4022,7 @@ "type": "Identifier", "span": { "start": 3677, - "end": 3705, + "end": 3678, "ctxt": 0 }, "value": "v", diff --git a/crates/swc_ecma_parser/tests/tsc/typeOfThisInInstanceMember.json b/crates/swc_ecma_parser/tests/tsc/typeOfThisInInstanceMember.json index f7d2a52e08ef..bc9e744d7757 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeOfThisInInstanceMember.json +++ b/crates/swc_ecma_parser/tests/tsc/typeOfThisInInstanceMember.json @@ -155,7 +155,7 @@ "type": "Identifier", "span": { "start": 80, - "end": 89, + "end": 81, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/typeOfThisInInstanceMember2.json b/crates/swc_ecma_parser/tests/tsc/typeOfThisInInstanceMember2.json index e465e94d0770..a253d109d6ea 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeOfThisInInstanceMember2.json +++ b/crates/swc_ecma_parser/tests/tsc/typeOfThisInInstanceMember2.json @@ -155,7 +155,7 @@ "type": "Identifier", "span": { "start": 83, - "end": 87, + "end": 84, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/typeOfThisInStaticMembers.json b/crates/swc_ecma_parser/tests/tsc/typeOfThisInStaticMembers.json index ba6c6844eaca..efcc0ca60f61 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeOfThisInStaticMembers.json +++ b/crates/swc_ecma_parser/tests/tsc/typeOfThisInStaticMembers.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 27, - "end": 36, + "end": 28, "ctxt": 0 }, "value": "x", @@ -628,7 +628,7 @@ "type": "Identifier", "span": { "start": 334, - "end": 343, + "end": 335, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/typeOfThisInStaticMembers10.json b/crates/swc_ecma_parser/tests/tsc/typeOfThisInStaticMembers10.json index 26b8fc8de179..a9eac931be0f 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeOfThisInStaticMembers10.json +++ b/crates/swc_ecma_parser/tests/tsc/typeOfThisInStaticMembers10.json @@ -893,7 +893,7 @@ "type": "Identifier", "span": { "start": 506, - "end": 515, + "end": 507, "ctxt": 0 }, "value": "v", @@ -1834,7 +1834,7 @@ "type": "Identifier", "span": { "start": 919, - "end": 928, + "end": 920, "ctxt": 0 }, "value": "v", diff --git a/crates/swc_ecma_parser/tests/tsc/typeOfThisInStaticMembers11.json b/crates/swc_ecma_parser/tests/tsc/typeOfThisInStaticMembers11.json index 60cb5086db5c..c64e4e234136 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeOfThisInStaticMembers11.json +++ b/crates/swc_ecma_parser/tests/tsc/typeOfThisInStaticMembers11.json @@ -893,7 +893,7 @@ "type": "Identifier", "span": { "start": 505, - "end": 514, + "end": 506, "ctxt": 0 }, "value": "v", @@ -1834,7 +1834,7 @@ "type": "Identifier", "span": { "start": 918, - "end": 927, + "end": 919, "ctxt": 0 }, "value": "v", diff --git a/crates/swc_ecma_parser/tests/tsc/typeOfThisInStaticMembers5.json b/crates/swc_ecma_parser/tests/tsc/typeOfThisInStaticMembers5.json index f0601edadf7b..c8337f66a210 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeOfThisInStaticMembers5.json +++ b/crates/swc_ecma_parser/tests/tsc/typeOfThisInStaticMembers5.json @@ -132,7 +132,7 @@ "type": "Identifier", "span": { "start": 117, - "end": 128, + "end": 120, "ctxt": 0 }, "value": "foo", diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeArgument.json b/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeArgument.json index a55e223a8db2..303efca4b23a 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeArgument.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeArgument.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 127, - "end": 131, + "end": 128, "ctxt": 0 }, "value": "x", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 133, - "end": 137, + "end": 134, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraint.json b/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraint.json index 336e980abe34..3e759208a6a1 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraint.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraint.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 152, - "end": 156, + "end": 153, "ctxt": 0 }, "value": "x", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 158, - "end": 162, + "end": 159, "ctxt": 0 }, "value": "y", @@ -943,7 +943,7 @@ "type": "Identifier", "span": { "start": 422, - "end": 426, + "end": 423, "ctxt": 0 }, "value": "x", @@ -989,7 +989,7 @@ "type": "Identifier", "span": { "start": 428, - "end": 432, + "end": 429, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraint2.json b/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraint2.json index 4badaea77f78..560f792600c3 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraint2.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraint2.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 154, - "end": 158, + "end": 155, "ctxt": 0 }, "value": "x", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 160, - "end": 164, + "end": 161, "ctxt": 0 }, "value": "y", @@ -616,7 +616,7 @@ "type": "Identifier", "span": { "start": 376, - "end": 380, + "end": 377, "ctxt": 0 }, "value": "x", @@ -662,7 +662,7 @@ "type": "Identifier", "span": { "start": 382, - "end": 386, + "end": 383, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraintTransitively.json b/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraintTransitively.json index ecd6109536ab..81b9fe403400 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraintTransitively.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraintTransitively.json @@ -465,7 +465,7 @@ "type": "Identifier", "span": { "start": 256, - "end": 260, + "end": 257, "ctxt": 0 }, "value": "x", @@ -511,7 +511,7 @@ "type": "Identifier", "span": { "start": 262, - "end": 266, + "end": 263, "ctxt": 0 }, "value": "y", @@ -557,7 +557,7 @@ "type": "Identifier", "span": { "start": 268, - "end": 272, + "end": 269, "ctxt": 0 }, "value": "z", @@ -1393,7 +1393,7 @@ "type": "Identifier", "span": { "start": 584, - "end": 588, + "end": 585, "ctxt": 0 }, "value": "x", @@ -1439,7 +1439,7 @@ "type": "Identifier", "span": { "start": 590, - "end": 594, + "end": 591, "ctxt": 0 }, "value": "y", @@ -1485,7 +1485,7 @@ "type": "Identifier", "span": { "start": 596, - "end": 600, + "end": 597, "ctxt": 0 }, "value": "z", diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraintTransitively2.json b/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraintTransitively2.json index ef1a72b45291..0a92179db9a0 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraintTransitively2.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraintTransitively2.json @@ -465,7 +465,7 @@ "type": "Identifier", "span": { "start": 339, - "end": 343, + "end": 340, "ctxt": 0 }, "value": "x", @@ -511,7 +511,7 @@ "type": "Identifier", "span": { "start": 345, - "end": 349, + "end": 346, "ctxt": 0 }, "value": "y", @@ -557,7 +557,7 @@ "type": "Identifier", "span": { "start": 351, - "end": 355, + "end": 352, "ctxt": 0 }, "value": "z", @@ -1436,7 +1436,7 @@ "type": "Identifier", "span": { "start": 707, - "end": 711, + "end": 708, "ctxt": 0 }, "value": "x", @@ -1482,7 +1482,7 @@ "type": "Identifier", "span": { "start": 713, - "end": 717, + "end": 714, "ctxt": 0 }, "value": "y", @@ -1528,7 +1528,7 @@ "type": "Identifier", "span": { "start": 719, - "end": 723, + "end": 720, "ctxt": 0 }, "value": "z", diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterAssignability.json b/crates/swc_ecma_parser/tests/tsc/typeParameterAssignability.json index 44688f20a0e4..d9a3b8ccbb76 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterAssignability.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterAssignability.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 131, - "end": 135, + "end": 132, "ctxt": 0 }, "value": "t", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 137, - "end": 141, + "end": 138, "ctxt": 0 }, "value": "u", diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterAssignability2.json b/crates/swc_ecma_parser/tests/tsc/typeParameterAssignability2.json index d30055428695..dd54abb5f3d0 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterAssignability2.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterAssignability2.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 141, - "end": 145, + "end": 142, "ctxt": 0 }, "value": "t", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 147, - "end": 151, + "end": 148, "ctxt": 0 }, "value": "u", @@ -309,7 +309,7 @@ "type": "Identifier", "span": { "start": 225, - "end": 229, + "end": 226, "ctxt": 0 }, "value": "t", @@ -355,7 +355,7 @@ "type": "Identifier", "span": { "start": 231, - "end": 235, + "end": 232, "ctxt": 0 }, "value": "u", @@ -586,7 +586,7 @@ "type": "Identifier", "span": { "start": 322, - "end": 326, + "end": 323, "ctxt": 0 }, "value": "t", @@ -632,7 +632,7 @@ "type": "Identifier", "span": { "start": 328, - "end": 332, + "end": 329, "ctxt": 0 }, "value": "u", @@ -678,7 +678,7 @@ "type": "Identifier", "span": { "start": 334, - "end": 338, + "end": 335, "ctxt": 0 }, "value": "v", @@ -1102,7 +1102,7 @@ "type": "Identifier", "span": { "start": 508, - "end": 512, + "end": 509, "ctxt": 0 }, "value": "t", @@ -1148,7 +1148,7 @@ "type": "Identifier", "span": { "start": 514, - "end": 518, + "end": 515, "ctxt": 0 }, "value": "u", @@ -1194,7 +1194,7 @@ "type": "Identifier", "span": { "start": 520, - "end": 524, + "end": 521, "ctxt": 0 }, "value": "v", @@ -1953,7 +1953,7 @@ "type": "Identifier", "span": { "start": 890, - "end": 894, + "end": 891, "ctxt": 0 }, "value": "t", @@ -1999,7 +1999,7 @@ "type": "Identifier", "span": { "start": 896, - "end": 900, + "end": 897, "ctxt": 0 }, "value": "u", @@ -2045,7 +2045,7 @@ "type": "Identifier", "span": { "start": 902, - "end": 906, + "end": 903, "ctxt": 0 }, "value": "v", @@ -2804,7 +2804,7 @@ "type": "Identifier", "span": { "start": 1194, - "end": 1198, + "end": 1195, "ctxt": 0 }, "value": "t", @@ -2850,7 +2850,7 @@ "type": "Identifier", "span": { "start": 1200, - "end": 1204, + "end": 1201, "ctxt": 0 }, "value": "u", @@ -2896,7 +2896,7 @@ "type": "Identifier", "span": { "start": 1206, - "end": 1210, + "end": 1207, "ctxt": 0 }, "value": "v", diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterAssignability3.json b/crates/swc_ecma_parser/tests/tsc/typeParameterAssignability3.json index 4680a4948f92..1123654bc7ac 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterAssignability3.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterAssignability3.json @@ -104,7 +104,7 @@ "type": "Identifier", "span": { "start": 183, - "end": 187, + "end": 184, "ctxt": 0 }, "value": "t", @@ -150,7 +150,7 @@ "type": "Identifier", "span": { "start": 189, - "end": 193, + "end": 190, "ctxt": 0 }, "value": "u", diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterConstModifiersReverseMappedTypes.json b/crates/swc_ecma_parser/tests/tsc/typeParameterConstModifiersReverseMappedTypes.json index c69ba49fe22c..9ac15e240f8a 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterConstModifiersReverseMappedTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterConstModifiersReverseMappedTypes.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 68, - "end": 100, + "end": 71, "ctxt": 0 }, "value": "obj", @@ -434,7 +434,7 @@ "type": "Identifier", "span": { "start": 237, - "end": 278, + "end": 240, "ctxt": 0 }, "value": "obj", @@ -836,7 +836,7 @@ "type": "Identifier", "span": { "start": 415, - "end": 457, + "end": 418, "ctxt": 0 }, "value": "obj", @@ -1238,7 +1238,7 @@ "type": "Identifier", "span": { "start": 621, - "end": 653, + "end": 624, "ctxt": 0 }, "value": "arr", diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterConstModifiersWithIntersection.json b/crates/swc_ecma_parser/tests/tsc/typeParameterConstModifiersWithIntersection.json index 52227183b8fa..23540aa2013b 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterConstModifiersWithIntersection.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterConstModifiersWithIntersection.json @@ -196,7 +196,7 @@ "type": "Identifier", "span": { "start": 249, - "end": 287, + "end": 255, "ctxt": 0 }, "value": "config", diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterExtendsUnionConstraintDistributed.json b/crates/swc_ecma_parser/tests/tsc/typeParameterExtendsUnionConstraintDistributed.json index b15ac8b6e51d..71a608c34a57 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterExtendsUnionConstraintDistributed.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterExtendsUnionConstraintDistributed.json @@ -98,7 +98,7 @@ "type": "Identifier", "span": { "start": 41, - "end": 45, + "end": 42, "ctxt": 0 }, "value": "a", @@ -369,7 +369,7 @@ "type": "Identifier", "span": { "start": 142, - "end": 151, + "end": 144, "ctxt": 0 }, "value": "ab", diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint.json b/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint.json index f288f8fa2118..7986c38585e9 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 107, - "end": 111, + "end": 108, "ctxt": 0 }, "value": "x", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 113, - "end": 117, + "end": 114, "ctxt": 0 }, "value": "y", @@ -315,7 +315,7 @@ "type": "Identifier", "span": { "start": 182, - "end": 186, + "end": 183, "ctxt": 0 }, "value": "x", @@ -361,7 +361,7 @@ "type": "Identifier", "span": { "start": 188, - "end": 192, + "end": 189, "ctxt": 0 }, "value": "y", @@ -616,7 +616,7 @@ "type": "Identifier", "span": { "start": 261, - "end": 265, + "end": 262, "ctxt": 0 }, "value": "x", @@ -662,7 +662,7 @@ "type": "Identifier", "span": { "start": 267, - "end": 271, + "end": 268, "ctxt": 0 }, "value": "y", @@ -921,7 +921,7 @@ "type": "Identifier", "span": { "start": 341, - "end": 345, + "end": 342, "ctxt": 0 }, "value": "x", @@ -967,7 +967,7 @@ "type": "Identifier", "span": { "start": 347, - "end": 351, + "end": 348, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint2.json b/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint2.json index 798d3924a956..6ac1f8c5b740 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint2.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint2.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 133, - "end": 137, + "end": 134, "ctxt": 0 }, "value": "x", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 139, - "end": 143, + "end": 140, "ctxt": 0 }, "value": "y", @@ -181,7 +181,7 @@ "type": "Identifier", "span": { "start": 241, - "end": 245, + "end": 242, "ctxt": 0 }, "value": "a", @@ -227,7 +227,7 @@ "type": "Identifier", "span": { "start": 247, - "end": 251, + "end": 248, "ctxt": 0 }, "value": "b", @@ -660,7 +660,7 @@ "type": "Identifier", "span": { "start": 348, - "end": 352, + "end": 349, "ctxt": 0 }, "value": "x", @@ -706,7 +706,7 @@ "type": "Identifier", "span": { "start": 354, - "end": 358, + "end": 355, "ctxt": 0 }, "value": "y", @@ -809,7 +809,7 @@ "type": "Identifier", "span": { "start": 456, - "end": 460, + "end": 457, "ctxt": 0 }, "value": "a", @@ -855,7 +855,7 @@ "type": "Identifier", "span": { "start": 462, - "end": 466, + "end": 463, "ctxt": 0 }, "value": "b", @@ -1306,7 +1306,7 @@ "type": "Identifier", "span": { "start": 567, - "end": 571, + "end": 568, "ctxt": 0 }, "value": "x", @@ -1352,7 +1352,7 @@ "type": "Identifier", "span": { "start": 573, - "end": 577, + "end": 574, "ctxt": 0 }, "value": "y", @@ -1473,7 +1473,7 @@ "type": "Identifier", "span": { "start": 680, - "end": 684, + "end": 681, "ctxt": 0 }, "value": "a", @@ -1519,7 +1519,7 @@ "type": "Identifier", "span": { "start": 686, - "end": 690, + "end": 687, "ctxt": 0 }, "value": "b", @@ -1978,7 +1978,7 @@ "type": "Identifier", "span": { "start": 792, - "end": 796, + "end": 793, "ctxt": 0 }, "value": "x", @@ -2024,7 +2024,7 @@ "type": "Identifier", "span": { "start": 798, - "end": 802, + "end": 799, "ctxt": 0 }, "value": "y", @@ -2154,7 +2154,7 @@ "type": "Identifier", "span": { "start": 908, - "end": 912, + "end": 909, "ctxt": 0 }, "value": "a", @@ -2200,7 +2200,7 @@ "type": "Identifier", "span": { "start": 914, - "end": 918, + "end": 915, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint3.json b/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint3.json index 0eb8cedea580..a25f93a97a10 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint3.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint3.json @@ -290,7 +290,7 @@ "type": "Identifier", "span": { "start": 497, - "end": 501, + "end": 498, "ctxt": 0 }, "value": "x", @@ -690,7 +690,7 @@ "type": "Identifier", "span": { "start": 585, - "end": 589, + "end": 586, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint4.json b/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint4.json index d84cf9b0b136..ca74fe97caf7 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint4.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint4.json @@ -112,7 +112,7 @@ "type": "Identifier", "span": { "start": 180, - "end": 184, + "end": 181, "ctxt": 0 }, "value": "x", @@ -769,7 +769,7 @@ "type": "Identifier", "span": { "start": 339, - "end": 343, + "end": 340, "ctxt": 0 }, "value": "x", @@ -911,7 +911,7 @@ "type": "Identifier", "span": { "start": 381, - "end": 385, + "end": 382, "ctxt": 0 }, "value": "x", @@ -957,7 +957,7 @@ "type": "Identifier", "span": { "start": 387, - "end": 391, + "end": 388, "ctxt": 0 }, "value": "y", @@ -1060,7 +1060,7 @@ "type": "Identifier", "span": { "start": 513, - "end": 517, + "end": 514, "ctxt": 0 }, "value": "a", @@ -1106,7 +1106,7 @@ "type": "Identifier", "span": { "start": 519, - "end": 523, + "end": 520, "ctxt": 0 }, "value": "b", @@ -1591,7 +1591,7 @@ "type": "Identifier", "span": { "start": 620, - "end": 624, + "end": 621, "ctxt": 0 }, "value": "x", @@ -1637,7 +1637,7 @@ "type": "Identifier", "span": { "start": 626, - "end": 630, + "end": 627, "ctxt": 0 }, "value": "y", @@ -1740,7 +1740,7 @@ "type": "Identifier", "span": { "start": 752, - "end": 756, + "end": 753, "ctxt": 0 }, "value": "a", @@ -1786,7 +1786,7 @@ "type": "Identifier", "span": { "start": 758, - "end": 762, + "end": 759, "ctxt": 0 }, "value": "b", @@ -2390,7 +2390,7 @@ "type": "Identifier", "span": { "start": 915, - "end": 919, + "end": 916, "ctxt": 0 }, "value": "r", @@ -2436,7 +2436,7 @@ "type": "Identifier", "span": { "start": 921, - "end": 925, + "end": 922, "ctxt": 0 }, "value": "s", diff --git a/crates/swc_ecma_parser/tests/tsc/typeParametersAreIdenticalToThemselves.json b/crates/swc_ecma_parser/tests/tsc/typeParametersAreIdenticalToThemselves.json index 33371eabcb8a..63ee5e7d6bee 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParametersAreIdenticalToThemselves.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParametersAreIdenticalToThemselves.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 90, - "end": 94, + "end": 91, "ctxt": 0 }, "value": "x", @@ -137,7 +137,7 @@ "type": "Identifier", "span": { "start": 114, - "end": 118, + "end": 115, "ctxt": 0 }, "value": "x", @@ -242,7 +242,7 @@ "type": "Identifier", "span": { "start": 184, - "end": 188, + "end": 185, "ctxt": 0 }, "value": "x", @@ -355,7 +355,7 @@ "type": "Identifier", "span": { "start": 215, - "end": 219, + "end": 216, "ctxt": 0 }, "value": "x", @@ -483,7 +483,7 @@ "type": "Identifier", "span": { "start": 242, - "end": 246, + "end": 243, "ctxt": 0 }, "value": "x", @@ -611,7 +611,7 @@ "type": "Identifier", "span": { "start": 315, - "end": 319, + "end": 316, "ctxt": 0 }, "value": "x", @@ -747,7 +747,7 @@ "type": "Identifier", "span": { "start": 346, - "end": 350, + "end": 347, "ctxt": 0 }, "value": "x", @@ -793,7 +793,7 @@ "type": "Identifier", "span": { "start": 352, - "end": 356, + "end": 353, "ctxt": 0 }, "value": "y", @@ -868,7 +868,7 @@ "type": "Identifier", "span": { "start": 379, - "end": 383, + "end": 380, "ctxt": 0 }, "value": "x", @@ -941,7 +941,7 @@ "type": "Identifier", "span": { "start": 405, - "end": 409, + "end": 406, "ctxt": 0 }, "value": "x", @@ -1014,7 +1014,7 @@ "type": "Identifier", "span": { "start": 448, - "end": 452, + "end": 449, "ctxt": 0 }, "value": "x", @@ -1095,7 +1095,7 @@ "type": "Identifier", "span": { "start": 479, - "end": 483, + "end": 480, "ctxt": 0 }, "value": "x", @@ -1168,7 +1168,7 @@ "type": "Identifier", "span": { "start": 509, - "end": 513, + "end": 510, "ctxt": 0 }, "value": "x", @@ -1273,7 +1273,7 @@ "type": "Identifier", "span": { "start": 561, - "end": 567, + "end": 562, "ctxt": 0 }, "value": "x", @@ -1431,7 +1431,7 @@ "type": "Identifier", "span": { "start": 598, - "end": 602, + "end": 599, "ctxt": 0 }, "value": "x", @@ -1516,7 +1516,7 @@ "type": "Identifier", "span": { "start": 614, - "end": 618, + "end": 615, "ctxt": 0 }, "value": "x", @@ -1601,7 +1601,7 @@ "type": "Identifier", "span": { "start": 647, - "end": 651, + "end": 648, "ctxt": 0 }, "value": "x", @@ -1694,7 +1694,7 @@ "type": "Identifier", "span": { "start": 670, - "end": 674, + "end": 671, "ctxt": 0 }, "value": "a", @@ -1740,7 +1740,7 @@ "type": "Identifier", "span": { "start": 676, - "end": 680, + "end": 677, "ctxt": 0 }, "value": "x", @@ -1857,7 +1857,7 @@ "type": "Identifier", "span": { "start": 695, - "end": 699, + "end": 696, "ctxt": 0 }, "value": "a", @@ -1903,7 +1903,7 @@ "type": "Identifier", "span": { "start": 701, - "end": 705, + "end": 702, "ctxt": 0 }, "value": "x", @@ -2020,7 +2020,7 @@ "type": "Identifier", "span": { "start": 766, - "end": 770, + "end": 767, "ctxt": 0 }, "value": "a", @@ -2066,7 +2066,7 @@ "type": "Identifier", "span": { "start": 772, - "end": 776, + "end": 773, "ctxt": 0 }, "value": "x", @@ -2191,7 +2191,7 @@ "type": "Identifier", "span": { "start": 795, - "end": 799, + "end": 796, "ctxt": 0 }, "value": "x", @@ -2308,7 +2308,7 @@ "type": "Identifier", "span": { "start": 814, - "end": 818, + "end": 815, "ctxt": 0 }, "value": "x", @@ -2425,7 +2425,7 @@ "type": "Identifier", "span": { "start": 879, - "end": 883, + "end": 880, "ctxt": 0 }, "value": "x", @@ -2550,7 +2550,7 @@ "type": "Identifier", "span": { "start": 915, - "end": 919, + "end": 916, "ctxt": 0 }, "value": "x", @@ -2685,7 +2685,7 @@ "type": "Identifier", "span": { "start": 947, - "end": 951, + "end": 948, "ctxt": 0 }, "value": "x", @@ -2820,7 +2820,7 @@ "type": "Identifier", "span": { "start": 1025, - "end": 1029, + "end": 1026, "ctxt": 0 }, "value": "x", @@ -3022,7 +3022,7 @@ "type": "Identifier", "span": { "start": 1074, - "end": 1078, + "end": 1075, "ctxt": 0 }, "value": "x", @@ -3107,7 +3107,7 @@ "type": "Identifier", "span": { "start": 1090, - "end": 1094, + "end": 1091, "ctxt": 0 }, "value": "x", @@ -3192,7 +3192,7 @@ "type": "Identifier", "span": { "start": 1123, - "end": 1127, + "end": 1124, "ctxt": 0 }, "value": "x", @@ -3285,7 +3285,7 @@ "type": "Identifier", "span": { "start": 1146, - "end": 1150, + "end": 1147, "ctxt": 0 }, "value": "a", @@ -3331,7 +3331,7 @@ "type": "Identifier", "span": { "start": 1152, - "end": 1156, + "end": 1153, "ctxt": 0 }, "value": "x", @@ -3448,7 +3448,7 @@ "type": "Identifier", "span": { "start": 1171, - "end": 1175, + "end": 1172, "ctxt": 0 }, "value": "a", @@ -3494,7 +3494,7 @@ "type": "Identifier", "span": { "start": 1177, - "end": 1181, + "end": 1178, "ctxt": 0 }, "value": "x", @@ -3611,7 +3611,7 @@ "type": "Identifier", "span": { "start": 1242, - "end": 1246, + "end": 1243, "ctxt": 0 }, "value": "a", @@ -3657,7 +3657,7 @@ "type": "Identifier", "span": { "start": 1248, - "end": 1252, + "end": 1249, "ctxt": 0 }, "value": "x", @@ -3782,7 +3782,7 @@ "type": "Identifier", "span": { "start": 1271, - "end": 1275, + "end": 1272, "ctxt": 0 }, "value": "x", @@ -3899,7 +3899,7 @@ "type": "Identifier", "span": { "start": 1290, - "end": 1294, + "end": 1291, "ctxt": 0 }, "value": "x", @@ -4016,7 +4016,7 @@ "type": "Identifier", "span": { "start": 1355, - "end": 1359, + "end": 1356, "ctxt": 0 }, "value": "x", @@ -4252,7 +4252,7 @@ "type": "Identifier", "span": { "start": 1394, - "end": 1398, + "end": 1395, "ctxt": 0 }, "value": "x", @@ -4314,7 +4314,7 @@ "type": "Identifier", "span": { "start": 1410, - "end": 1414, + "end": 1411, "ctxt": 0 }, "value": "x", @@ -4376,7 +4376,7 @@ "type": "Identifier", "span": { "start": 1447, - "end": 1451, + "end": 1448, "ctxt": 0 }, "value": "a", @@ -4413,7 +4413,7 @@ "type": "Identifier", "span": { "start": 1453, - "end": 1457, + "end": 1454, "ctxt": 0 }, "value": "x", @@ -4507,7 +4507,7 @@ "type": "Identifier", "span": { "start": 1472, - "end": 1476, + "end": 1473, "ctxt": 0 }, "value": "a", @@ -4544,7 +4544,7 @@ "type": "Identifier", "span": { "start": 1478, - "end": 1482, + "end": 1479, "ctxt": 0 }, "value": "x", @@ -4638,7 +4638,7 @@ "type": "Identifier", "span": { "start": 1544, - "end": 1548, + "end": 1545, "ctxt": 0 }, "value": "x", @@ -4732,7 +4732,7 @@ "type": "Identifier", "span": { "start": 1563, - "end": 1567, + "end": 1564, "ctxt": 0 }, "value": "x", @@ -4826,7 +4826,7 @@ "type": "Identifier", "span": { "start": 1642, - "end": 1646, + "end": 1643, "ctxt": 0 }, "value": "x", @@ -4938,7 +4938,7 @@ "type": "Identifier", "span": { "start": 1674, - "end": 1678, + "end": 1675, "ctxt": 0 }, "value": "x", @@ -5131,7 +5131,7 @@ "type": "Identifier", "span": { "start": 1770, - "end": 1774, + "end": 1771, "ctxt": 0 }, "value": "x", @@ -5193,7 +5193,7 @@ "type": "Identifier", "span": { "start": 1786, - "end": 1790, + "end": 1787, "ctxt": 0 }, "value": "x", @@ -5255,7 +5255,7 @@ "type": "Identifier", "span": { "start": 1823, - "end": 1827, + "end": 1824, "ctxt": 0 }, "value": "a", @@ -5292,7 +5292,7 @@ "type": "Identifier", "span": { "start": 1829, - "end": 1833, + "end": 1830, "ctxt": 0 }, "value": "x", @@ -5386,7 +5386,7 @@ "type": "Identifier", "span": { "start": 1848, - "end": 1852, + "end": 1849, "ctxt": 0 }, "value": "a", @@ -5423,7 +5423,7 @@ "type": "Identifier", "span": { "start": 1854, - "end": 1858, + "end": 1855, "ctxt": 0 }, "value": "x", @@ -5517,7 +5517,7 @@ "type": "Identifier", "span": { "start": 1920, - "end": 1924, + "end": 1921, "ctxt": 0 }, "value": "x", @@ -5611,7 +5611,7 @@ "type": "Identifier", "span": { "start": 1939, - "end": 1943, + "end": 1940, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/typeParametersAvailableInNestedScope.json b/crates/swc_ecma_parser/tests/tsc/typeParametersAvailableInNestedScope.json index b144cfac7495..c6bd9fe00f7d 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParametersAvailableInNestedScope.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParametersAvailableInNestedScope.json @@ -338,7 +338,7 @@ "type": "Identifier", "span": { "start": 131, - "end": 135, + "end": 132, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/typeParametersAvailableInNestedScope2.json b/crates/swc_ecma_parser/tests/tsc/typeParametersAvailableInNestedScope2.json index e1a0cd870d8a..635e6d22bfdd 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParametersAvailableInNestedScope2.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParametersAvailableInNestedScope2.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 20, - "end": 24, + "end": 21, "ctxt": 0 }, "value": "x", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 26, - "end": 30, + "end": 27, "ctxt": 0 }, "value": "y", @@ -153,7 +153,7 @@ "type": "Identifier", "span": { "start": 54, - "end": 58, + "end": 55, "ctxt": 0 }, "value": "z", @@ -228,7 +228,7 @@ "type": "Identifier", "span": { "start": 86, - "end": 90, + "end": 87, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/typeParametersAvailableInNestedScope3.json b/crates/swc_ecma_parser/tests/tsc/typeParametersAvailableInNestedScope3.json index 984d3741205f..f51127f20eb8 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParametersAvailableInNestedScope3.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParametersAvailableInNestedScope3.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 40, - "end": 44, + "end": 41, "ctxt": 0 }, "value": "v", @@ -107,7 +107,7 @@ "type": "Identifier", "span": { "start": 66, - "end": 70, + "end": 67, "ctxt": 0 }, "value": "a", @@ -318,7 +318,7 @@ "type": "Identifier", "span": { "start": 139, - "end": 143, + "end": 140, "ctxt": 0 }, "value": "v", @@ -393,7 +393,7 @@ "type": "Identifier", "span": { "start": 169, - "end": 173, + "end": 170, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/typePredicateASI.json b/crates/swc_ecma_parser/tests/tsc/typePredicateASI.json index f95609cf78cf..debfcdaa4724 100644 --- a/crates/swc_ecma_parser/tests/tsc/typePredicateASI.json +++ b/crates/swc_ecma_parser/tests/tsc/typePredicateASI.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 23, - "end": 57, + "end": 31, "ctxt": 0 }, "value": "callback", @@ -83,7 +83,7 @@ "type": "Identifier", "span": { "start": 34, - "end": 40, + "end": 35, "ctxt": 0 }, "value": "a", @@ -110,7 +110,7 @@ "type": "Identifier", "span": { "start": 42, - "end": 48, + "end": 43, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/tsc/typeQueryOnClass.json b/crates/swc_ecma_parser/tests/tsc/typeQueryOnClass.json index f177d1ad8104..0b174637372b 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeQueryOnClass.json +++ b/crates/swc_ecma_parser/tests/tsc/typeQueryOnClass.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 30, - "end": 39, + "end": 31, "ctxt": 0 }, "value": "x", @@ -115,7 +115,7 @@ "type": "Identifier", "span": { "start": 58, - "end": 67, + "end": 59, "ctxt": 0 }, "value": "x", @@ -229,7 +229,7 @@ "type": "Identifier", "span": { "start": 116, - "end": 125, + "end": 117, "ctxt": 0 }, "value": "x", @@ -304,7 +304,7 @@ "type": "Identifier", "span": { "start": 143, - "end": 148, + "end": 144, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/typeRelationships.json b/crates/swc_ecma_parser/tests/tsc/typeRelationships.json index fbe676c04c8d..6a2b7b56094a 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeRelationships.json +++ b/crates/swc_ecma_parser/tests/tsc/typeRelationships.json @@ -747,7 +747,7 @@ "type": "Identifier", "span": { "start": 353, - "end": 363, + "end": 354, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_contextualTyping1.json b/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_contextualTyping1.json index 2abc0b0efd1e..7a299492a111 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_contextualTyping1.json +++ b/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_contextualTyping1.json @@ -83,7 +83,7 @@ "type": "Identifier", "span": { "start": 35, - "end": 44, + "end": 36, "ctxt": 0 }, "value": "n", diff --git a/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_contextualTyping2.json b/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_contextualTyping2.json index 932dbaf1beed..dbe4e4fba00b 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_contextualTyping2.json +++ b/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_contextualTyping2.json @@ -80,7 +80,7 @@ "type": "Identifier", "span": { "start": 32, - "end": 41, + "end": 33, "ctxt": 0 }, "value": "s", @@ -341,7 +341,7 @@ "type": "Identifier", "span": { "start": 159, - "end": 168, + "end": 160, "ctxt": 0 }, "value": "s", @@ -558,7 +558,7 @@ "type": "Identifier", "span": { "start": 293, - "end": 302, + "end": 294, "ctxt": 0 }, "value": "s", diff --git a/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_contextualTyping3.json b/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_contextualTyping3.json index 7d1f2dd2a2ab..417cc728154b 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_contextualTyping3.json +++ b/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_contextualTyping3.json @@ -471,7 +471,7 @@ "type": "Identifier", "span": { "start": 360, - "end": 378, + "end": 361, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_ensureInterfaceImpl.json b/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_ensureInterfaceImpl.json index c302d07b2f6a..bdb4c438f302 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_ensureInterfaceImpl.json +++ b/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_ensureInterfaceImpl.json @@ -58,7 +58,7 @@ "type": "Identifier", "span": { "start": 27, - "end": 43, + "end": 35, "ctxt": 0 }, "value": "distance", diff --git a/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_propertyValueConformance1.json b/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_propertyValueConformance1.json index c8e11d600dc7..24d6123f22e9 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_propertyValueConformance1.json +++ b/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_propertyValueConformance1.json @@ -118,7 +118,7 @@ "type": "Identifier", "span": { "start": 124, - "end": 132, + "end": 125, "ctxt": 0 }, "value": "x", @@ -207,7 +207,7 @@ "type": "Identifier", "span": { "start": 165, - "end": 182, + "end": 166, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_propertyValueConformance2.json b/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_propertyValueConformance2.json index 3989c1beaa45..8231daf91140 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_propertyValueConformance2.json +++ b/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_propertyValueConformance2.json @@ -118,7 +118,7 @@ "type": "Identifier", "span": { "start": 114, - "end": 122, + "end": 115, "ctxt": 0 }, "value": "x", @@ -207,7 +207,7 @@ "type": "Identifier", "span": { "start": 155, - "end": 172, + "end": 156, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/typeofClass2.json b/crates/swc_ecma_parser/tests/tsc/typeofClass2.json index 59e0c5887189..09a9f36e995b 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeofClass2.json +++ b/crates/swc_ecma_parser/tests/tsc/typeofClass2.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 27, - "end": 36, + "end": 28, "ctxt": 0 }, "value": "x", @@ -115,7 +115,7 @@ "type": "Identifier", "span": { "start": 55, - "end": 64, + "end": 56, "ctxt": 0 }, "value": "x", @@ -226,7 +226,7 @@ "type": "Identifier", "span": { "start": 106, - "end": 115, + "end": 107, "ctxt": 0 }, "value": "x", @@ -301,7 +301,7 @@ "type": "Identifier", "span": { "start": 133, - "end": 137, + "end": 134, "ctxt": 0 }, "value": "x", @@ -547,7 +547,7 @@ "type": "Identifier", "span": { "start": 223, - "end": 232, + "end": 224, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/typeofThis.json b/crates/swc_ecma_parser/tests/tsc/typeofThis.json index 18829e3e7a9f..091e605f6ce3 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeofThis.json +++ b/crates/swc_ecma_parser/tests/tsc/typeofThis.json @@ -869,7 +869,7 @@ "type": "Identifier", "span": { "start": 490, - "end": 510, + "end": 494, "ctxt": 0 }, "value": "this", @@ -1064,7 +1064,7 @@ "type": "Identifier", "span": { "start": 563, - "end": 595, + "end": 567, "ctxt": 0 }, "value": "this", diff --git a/crates/swc_ecma_parser/tests/tsc/typeofTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/typeofTypeParameter.json index 3f66deff3af4..9f2ed586c91f 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeofTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/typeofTypeParameter.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 15, - "end": 19, + "end": 16, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/typesWithPrivateConstructor.json b/crates/swc_ecma_parser/tests/tsc/typesWithPrivateConstructor.json index 75e2cfa4a47f..70b4509c06a1 100644 --- a/crates/swc_ecma_parser/tests/tsc/typesWithPrivateConstructor.json +++ b/crates/swc_ecma_parser/tests/tsc/typesWithPrivateConstructor.json @@ -259,7 +259,7 @@ "type": "Identifier", "span": { "start": 177, - "end": 186, + "end": 178, "ctxt": 0 }, "value": "x", @@ -318,7 +318,7 @@ "type": "Identifier", "span": { "start": 213, - "end": 219, + "end": 214, "ctxt": 0 }, "value": "x", @@ -459,7 +459,7 @@ "type": "Identifier", "span": { "start": 279, - "end": 288, + "end": 280, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/typesWithProtectedConstructor.json b/crates/swc_ecma_parser/tests/tsc/typesWithProtectedConstructor.json index 8b85f830c35f..b15fd400a09e 100644 --- a/crates/swc_ecma_parser/tests/tsc/typesWithProtectedConstructor.json +++ b/crates/swc_ecma_parser/tests/tsc/typesWithProtectedConstructor.json @@ -259,7 +259,7 @@ "type": "Identifier", "span": { "start": 183, - "end": 192, + "end": 184, "ctxt": 0 }, "value": "x", @@ -318,7 +318,7 @@ "type": "Identifier", "span": { "start": 221, - "end": 227, + "end": 222, "ctxt": 0 }, "value": "x", @@ -459,7 +459,7 @@ "type": "Identifier", "span": { "start": 289, - "end": 298, + "end": 290, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/typesWithPublicConstructor.json b/crates/swc_ecma_parser/tests/tsc/typesWithPublicConstructor.json index a9b4e8d2dd28..0cb5705b0f9f 100644 --- a/crates/swc_ecma_parser/tests/tsc/typesWithPublicConstructor.json +++ b/crates/swc_ecma_parser/tests/tsc/typesWithPublicConstructor.json @@ -259,7 +259,7 @@ "type": "Identifier", "span": { "start": 191, - "end": 200, + "end": 192, "ctxt": 0 }, "value": "x", @@ -318,7 +318,7 @@ "type": "Identifier", "span": { "start": 226, - "end": 232, + "end": 227, "ctxt": 0 }, "value": "x", @@ -459,7 +459,7 @@ "type": "Identifier", "span": { "start": 269, - "end": 278, + "end": 270, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/typesWithSpecializedCallSignatures.json b/crates/swc_ecma_parser/tests/tsc/typesWithSpecializedCallSignatures.json index 5f853565d627..d356a3f06771 100644 --- a/crates/swc_ecma_parser/tests/tsc/typesWithSpecializedCallSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/typesWithSpecializedCallSignatures.json @@ -291,7 +291,7 @@ "type": "Identifier", "span": { "start": 191, - "end": 198, + "end": 192, "ctxt": 0 }, "value": "x", @@ -401,7 +401,7 @@ "type": "Identifier", "span": { "start": 219, - "end": 227, + "end": 220, "ctxt": 0 }, "value": "x", @@ -511,7 +511,7 @@ "type": "Identifier", "span": { "start": 248, - "end": 257, + "end": 249, "ctxt": 0 }, "value": "x", @@ -779,7 +779,7 @@ "type": "Identifier", "span": { "start": 345, - "end": 352, + "end": 346, "ctxt": 0 }, "value": "x", @@ -866,7 +866,7 @@ "type": "Identifier", "span": { "start": 373, - "end": 381, + "end": 374, "ctxt": 0 }, "value": "x", @@ -953,7 +953,7 @@ "type": "Identifier", "span": { "start": 402, - "end": 411, + "end": 403, "ctxt": 0 }, "value": "x", @@ -1134,7 +1134,7 @@ "type": "Identifier", "span": { "start": 450, - "end": 457, + "end": 451, "ctxt": 0 }, "value": "x", @@ -1221,7 +1221,7 @@ "type": "Identifier", "span": { "start": 478, - "end": 486, + "end": 479, "ctxt": 0 }, "value": "x", @@ -1308,7 +1308,7 @@ "type": "Identifier", "span": { "start": 507, - "end": 516, + "end": 508, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/typesWithSpecializedConstructSignatures.json b/crates/swc_ecma_parser/tests/tsc/typesWithSpecializedConstructSignatures.json index dcf3bf048924..f2dd20603345 100644 --- a/crates/swc_ecma_parser/tests/tsc/typesWithSpecializedConstructSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/typesWithSpecializedConstructSignatures.json @@ -290,7 +290,7 @@ "type": "Identifier", "span": { "start": 199, - "end": 206, + "end": 200, "ctxt": 0 }, "value": "x", @@ -358,7 +358,7 @@ "type": "Identifier", "span": { "start": 225, - "end": 233, + "end": 226, "ctxt": 0 }, "value": "x", @@ -426,7 +426,7 @@ "type": "Identifier", "span": { "start": 252, - "end": 261, + "end": 253, "ctxt": 0 }, "value": "x", @@ -638,7 +638,7 @@ "type": "Identifier", "span": { "start": 354, - "end": 361, + "end": 355, "ctxt": 0 }, "value": "x", @@ -712,7 +712,7 @@ "type": "Identifier", "span": { "start": 382, - "end": 390, + "end": 383, "ctxt": 0 }, "value": "x", @@ -786,7 +786,7 @@ "type": "Identifier", "span": { "start": 411, - "end": 420, + "end": 412, "ctxt": 0 }, "value": "x", @@ -954,7 +954,7 @@ "type": "Identifier", "span": { "start": 459, - "end": 466, + "end": 460, "ctxt": 0 }, "value": "x", @@ -1028,7 +1028,7 @@ "type": "Identifier", "span": { "start": 487, - "end": 495, + "end": 488, "ctxt": 0 }, "value": "x", @@ -1102,7 +1102,7 @@ "type": "Identifier", "span": { "start": 516, - "end": 525, + "end": 517, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/undefinedAssignableToEveryType.json b/crates/swc_ecma_parser/tests/tsc/undefinedAssignableToEveryType.json index 0dbf7364af63..286165b04e51 100644 --- a/crates/swc_ecma_parser/tests/tsc/undefinedAssignableToEveryType.json +++ b/crates/swc_ecma_parser/tests/tsc/undefinedAssignableToEveryType.json @@ -1041,7 +1041,7 @@ "type": "Identifier", "span": { "start": 383, - "end": 392, + "end": 384, "ctxt": 0 }, "value": "x", @@ -1425,7 +1425,7 @@ "type": "Identifier", "span": { "start": 541, - "end": 545, + "end": 542, "ctxt": 0 }, "value": "x", @@ -1698,7 +1698,7 @@ "type": "Identifier", "span": { "start": 655, - "end": 659, + "end": 656, "ctxt": 0 }, "value": "x", @@ -1744,7 +1744,7 @@ "type": "Identifier", "span": { "start": 661, - "end": 665, + "end": 662, "ctxt": 0 }, "value": "y", @@ -1790,7 +1790,7 @@ "type": "Identifier", "span": { "start": 667, - "end": 671, + "end": 668, "ctxt": 0 }, "value": "z", diff --git a/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference1.json b/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference1.json index 7b39f68b50b1..25da0d71564b 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference1.json +++ b/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference1.json @@ -209,7 +209,7 @@ "type": "Identifier", "span": { "start": 145, - "end": 161, + "end": 154, "ctxt": 0 }, "value": "something", @@ -284,7 +284,7 @@ "type": "Identifier", "span": { "start": 167, - "end": 193, + "end": 176, "ctxt": 0 }, "value": "haveValue", @@ -308,7 +308,7 @@ "type": "Identifier", "span": { "start": 179, - "end": 187, + "end": 184, "ctxt": 0 }, "value": "value", @@ -386,7 +386,7 @@ "type": "Identifier", "span": { "start": 199, - "end": 221, + "end": 204, "ctxt": 0 }, "value": "haveY", @@ -410,7 +410,7 @@ "type": "Identifier", "span": { "start": 207, - "end": 215, + "end": 212, "ctxt": 0 }, "value": "value", @@ -1031,7 +1031,7 @@ "type": "Identifier", "span": { "start": 487, - "end": 502, + "end": 492, "ctxt": 0 }, "value": "value", @@ -1225,7 +1225,7 @@ "type": "Identifier", "span": { "start": 568, - "end": 583, + "end": 573, "ctxt": 0 }, "value": "value", @@ -1429,7 +1429,7 @@ "type": "Identifier", "span": { "start": 642, - "end": 655, + "end": 647, "ctxt": 0 }, "value": "value", @@ -1676,7 +1676,7 @@ "type": "Identifier", "span": { "start": 790, - "end": 803, + "end": 795, "ctxt": 0 }, "value": "value", @@ -2013,7 +2013,7 @@ "type": "Identifier", "span": { "start": 998, - "end": 1009, + "end": 999, "ctxt": 0 }, "value": "x", @@ -2551,7 +2551,7 @@ "type": "Identifier", "span": { "start": 1275, - "end": 1286, + "end": 1276, "ctxt": 0 }, "value": "y", @@ -3374,7 +3374,7 @@ "type": "Identifier", "span": { "start": 1669, - "end": 1677, + "end": 1670, "ctxt": 0 }, "value": "x", @@ -3586,7 +3586,7 @@ "type": "Identifier", "span": { "start": 1713, - "end": 1717, + "end": 1714, "ctxt": 0 }, "value": "x", @@ -3632,7 +3632,7 @@ "type": "Identifier", "span": { "start": 1719, - "end": 1723, + "end": 1720, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference2.json b/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference2.json index 9af964b922f4..a2be218ac1d8 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference2.json +++ b/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference2.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 24, - "end": 37, + "end": 25, "ctxt": 0 }, "value": "x", @@ -780,7 +780,7 @@ "type": "Identifier", "span": { "start": 322, - "end": 345, + "end": 323, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference3.json b/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference3.json index 37c36206a9cd..b31fd09f1689 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference3.json +++ b/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference3.json @@ -497,7 +497,7 @@ "type": "Identifier", "span": { "start": 235, - "end": 288, + "end": 238, "ctxt": 0 }, "value": "com", @@ -859,7 +859,7 @@ "type": "Identifier", "span": { "start": 322, - "end": 375, + "end": 325, "ctxt": 0 }, "value": "com", @@ -1326,7 +1326,7 @@ "type": "Identifier", "span": { "start": 440, - "end": 448, + "end": 445, "ctxt": 0 }, "value": "value", @@ -1467,7 +1467,7 @@ "type": "Identifier", "span": { "start": 489, - "end": 514, + "end": 494, "ctxt": 0 }, "value": "value", @@ -1625,7 +1625,7 @@ "type": "Identifier", "span": { "start": 546, - "end": 566, + "end": 547, "ctxt": 0 }, "value": "x", @@ -1885,7 +1885,7 @@ "type": "Identifier", "span": { "start": 603, - "end": 623, + "end": 604, "ctxt": 0 }, "value": "x", @@ -2260,7 +2260,7 @@ "type": "Identifier", "span": { "start": 686, - "end": 694, + "end": 691, "ctxt": 0 }, "value": "value", @@ -2400,7 +2400,7 @@ "type": "Identifier", "span": { "start": 732, - "end": 757, + "end": 737, "ctxt": 0 }, "value": "value", @@ -2558,7 +2558,7 @@ "type": "Identifier", "span": { "start": 789, - "end": 809, + "end": 790, "ctxt": 0 }, "value": "x", @@ -2818,7 +2818,7 @@ "type": "Identifier", "span": { "start": 846, - "end": 866, + "end": 847, "ctxt": 0 }, "value": "x", @@ -3135,7 +3135,7 @@ "type": "Identifier", "span": { "start": 950, - "end": 977, + "end": 953, "ctxt": 0 }, "value": "obj", @@ -3321,7 +3321,7 @@ "type": "Identifier", "span": { "start": 1008, - "end": 1025, + "end": 1011, "ctxt": 0 }, "value": "obj", @@ -4076,7 +4076,7 @@ "type": "Identifier", "span": { "start": 1339, - "end": 1347, + "end": 1344, "ctxt": 0 }, "value": "props", @@ -4240,7 +4240,7 @@ "type": "Identifier", "span": { "start": 1402, - "end": 1410, + "end": 1407, "ctxt": 0 }, "value": "props", @@ -4565,7 +4565,7 @@ "type": "Identifier", "span": { "start": 1648, - "end": 1679, + "end": 1657, "ctxt": 0 }, "value": "component", @@ -5329,7 +5329,7 @@ "type": "Identifier", "span": { "start": 2023, - "end": 2037, + "end": 2026, "ctxt": 0 }, "value": "obj", diff --git a/crates/swc_ecma_parser/tests/tsc/unionSubtypeIfEveryConstituentTypeIsSubtype.json b/crates/swc_ecma_parser/tests/tsc/unionSubtypeIfEveryConstituentTypeIsSubtype.json index 902939cdd2d7..3e8e972b98a8 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionSubtypeIfEveryConstituentTypeIsSubtype.json +++ b/crates/swc_ecma_parser/tests/tsc/unionSubtypeIfEveryConstituentTypeIsSubtype.json @@ -3082,7 +3082,7 @@ "type": "Identifier", "span": { "start": 1573, - "end": 1577, + "end": 1574, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/unionThisTypeInFunctions.json b/crates/swc_ecma_parser/tests/tsc/unionThisTypeInFunctions.json index 5132b5e0e8dc..a551f3085460 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionThisTypeInFunctions.json +++ b/crates/swc_ecma_parser/tests/tsc/unionThisTypeInFunctions.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 29, - "end": 39, + "end": 33, "ctxt": 0 }, "value": "this", @@ -85,7 +85,7 @@ "type": "Identifier", "span": { "start": 41, - "end": 50, + "end": 42, "ctxt": 0 }, "value": "n", @@ -225,7 +225,7 @@ "type": "Identifier", "span": { "start": 107, - "end": 117, + "end": 111, "ctxt": 0 }, "value": "this", @@ -251,7 +251,7 @@ "type": "Identifier", "span": { "start": 119, - "end": 128, + "end": 120, "ctxt": 0 }, "value": "n", @@ -364,7 +364,7 @@ "type": "Identifier", "span": { "start": 171, - "end": 185, + "end": 172, "ctxt": 0 }, "value": "r", diff --git a/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures.json b/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures.json index fda526267839..0a6d85f4f92e 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures.json @@ -281,7 +281,7 @@ "type": "Identifier", "span": { "start": 400, - "end": 409, + "end": 401, "ctxt": 0 }, "value": "a", @@ -346,7 +346,7 @@ "type": "Identifier", "span": { "start": 427, - "end": 436, + "end": 428, "ctxt": 0 }, "value": "a", @@ -636,7 +636,7 @@ "type": "Identifier", "span": { "start": 656, - "end": 665, + "end": 657, "ctxt": 0 }, "value": "a", @@ -691,7 +691,7 @@ "type": "Identifier", "span": { "start": 677, - "end": 686, + "end": 678, "ctxt": 0 }, "value": "a", @@ -756,7 +756,7 @@ "type": "Identifier", "span": { "start": 704, - "end": 713, + "end": 705, "ctxt": 0 }, "value": "a", @@ -821,7 +821,7 @@ "type": "Identifier", "span": { "start": 723, - "end": 732, + "end": 724, "ctxt": 0 }, "value": "a", @@ -1129,7 +1129,7 @@ "type": "Identifier", "span": { "start": 1008, - "end": 1017, + "end": 1009, "ctxt": 0 }, "value": "a", @@ -1194,7 +1194,7 @@ "type": "Identifier", "span": { "start": 1035, - "end": 1044, + "end": 1036, "ctxt": 0 }, "value": "a", @@ -1431,7 +1431,7 @@ "type": "Identifier", "span": { "start": 1298, - "end": 1307, + "end": 1299, "ctxt": 0 }, "value": "a", @@ -1496,7 +1496,7 @@ "type": "Identifier", "span": { "start": 1325, - "end": 1334, + "end": 1326, "ctxt": 0 }, "value": "a", @@ -1561,7 +1561,7 @@ "type": "Identifier", "span": { "start": 1344, - "end": 1353, + "end": 1345, "ctxt": 0 }, "value": "a", @@ -1788,7 +1788,7 @@ "type": "Identifier", "span": { "start": 1623, - "end": 1632, + "end": 1624, "ctxt": 0 }, "value": "a", @@ -1853,7 +1853,7 @@ "type": "Identifier", "span": { "start": 1650, - "end": 1659, + "end": 1651, "ctxt": 0 }, "value": "a", @@ -1880,7 +1880,7 @@ "type": "Identifier", "span": { "start": 1661, - "end": 1670, + "end": 1662, "ctxt": 0 }, "value": "b", @@ -2120,7 +2120,7 @@ "type": "Identifier", "span": { "start": 1889, - "end": 1898, + "end": 1890, "ctxt": 0 }, "value": "a", @@ -2147,7 +2147,7 @@ "type": "Identifier", "span": { "start": 1900, - "end": 1910, + "end": 1901, "ctxt": 0 }, "value": "b", @@ -2212,7 +2212,7 @@ "type": "Identifier", "span": { "start": 1928, - "end": 1937, + "end": 1929, "ctxt": 0 }, "value": "a", @@ -2239,7 +2239,7 @@ "type": "Identifier", "span": { "start": 1939, - "end": 1949, + "end": 1940, "ctxt": 0 }, "value": "b", @@ -2614,7 +2614,7 @@ "type": "Identifier", "span": { "start": 2238, - "end": 2247, + "end": 2239, "ctxt": 0 }, "value": "a", @@ -2641,7 +2641,7 @@ "type": "Identifier", "span": { "start": 2249, - "end": 2259, + "end": 2250, "ctxt": 0 }, "value": "b", @@ -2706,7 +2706,7 @@ "type": "Identifier", "span": { "start": 2277, - "end": 2286, + "end": 2278, "ctxt": 0 }, "value": "a", @@ -2733,7 +2733,7 @@ "type": "Identifier", "span": { "start": 2288, - "end": 2297, + "end": 2289, "ctxt": 0 }, "value": "b", @@ -3108,7 +3108,7 @@ "type": "Identifier", "span": { "start": 2657, - "end": 2666, + "end": 2658, "ctxt": 0 }, "value": "a", @@ -3135,7 +3135,7 @@ "type": "Identifier", "span": { "start": 2668, - "end": 2678, + "end": 2669, "ctxt": 0 }, "value": "b", @@ -3200,7 +3200,7 @@ "type": "Identifier", "span": { "start": 2696, - "end": 2705, + "end": 2697, "ctxt": 0 }, "value": "a", @@ -3575,7 +3575,7 @@ "type": "Identifier", "span": { "start": 3002, - "end": 3011, + "end": 3003, "ctxt": 0 }, "value": "a", @@ -3689,7 +3689,7 @@ "type": "Identifier", "span": { "start": 3045, - "end": 3054, + "end": 3046, "ctxt": 0 }, "value": "a", @@ -4201,7 +4201,7 @@ "type": "Identifier", "span": { "start": 3391, - "end": 3400, + "end": 3392, "ctxt": 0 }, "value": "a", @@ -4315,7 +4315,7 @@ "type": "Identifier", "span": { "start": 3434, - "end": 3443, + "end": 3435, "ctxt": 0 }, "value": "a", @@ -4342,7 +4342,7 @@ "type": "Identifier", "span": { "start": 3445, - "end": 3454, + "end": 3446, "ctxt": 0 }, "value": "b", @@ -4805,7 +4805,7 @@ "type": "Identifier", "span": { "start": 3874, - "end": 3883, + "end": 3875, "ctxt": 0 }, "value": "a", @@ -4919,7 +4919,7 @@ "type": "Identifier", "span": { "start": 3917, - "end": 3926, + "end": 3918, "ctxt": 0 }, "value": "a", @@ -5469,7 +5469,7 @@ "type": "Identifier", "span": { "start": 4347, - "end": 4356, + "end": 4348, "ctxt": 0 }, "value": "a", @@ -5496,7 +5496,7 @@ "type": "Identifier", "span": { "start": 4358, - "end": 4367, + "end": 4359, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures2.json b/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures2.json index 7d2f3edee55d..e3092ca12a3b 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures2.json +++ b/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures2.json @@ -46,7 +46,7 @@ "type": "Identifier", "span": { "start": 20, - "end": 29, + "end": 21, "ctxt": 0 }, "value": "x", @@ -101,7 +101,7 @@ "type": "Identifier", "span": { "start": 45, - "end": 54, + "end": 46, "ctxt": 0 }, "value": "x", @@ -128,7 +128,7 @@ "type": "Identifier", "span": { "start": 56, - "end": 66, + "end": 57, "ctxt": 0 }, "value": "y", @@ -183,7 +183,7 @@ "type": "Identifier", "span": { "start": 83, - "end": 90, + "end": 84, "ctxt": 0 }, "value": "x", @@ -248,7 +248,7 @@ "type": "Identifier", "span": { "start": 107, - "end": 113, + "end": 108, "ctxt": 0 }, "value": "x", @@ -402,7 +402,7 @@ "type": "Identifier", "span": { "start": 143, - "end": 152, + "end": 144, "ctxt": 0 }, "value": "x", @@ -457,7 +457,7 @@ "type": "Identifier", "span": { "start": 168, - "end": 177, + "end": 169, "ctxt": 0 }, "value": "x", @@ -512,7 +512,7 @@ "type": "Identifier", "span": { "start": 193, - "end": 200, + "end": 194, "ctxt": 0 }, "value": "x", @@ -577,7 +577,7 @@ "type": "Identifier", "span": { "start": 217, - "end": 223, + "end": 218, "ctxt": 0 }, "value": "x", @@ -731,7 +731,7 @@ "type": "Identifier", "span": { "start": 253, - "end": 262, + "end": 254, "ctxt": 0 }, "value": "x", @@ -835,7 +835,7 @@ "type": "Identifier", "span": { "start": 294, - "end": 303, + "end": 295, "ctxt": 0 }, "value": "x", @@ -862,7 +862,7 @@ "type": "Identifier", "span": { "start": 305, - "end": 315, + "end": 306, "ctxt": 0 }, "value": "s", @@ -917,7 +917,7 @@ "type": "Identifier", "span": { "start": 334, - "end": 340, + "end": 335, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures3.json b/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures3.json index a3ce3dc59bc7..f3fda50ced8a 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures3.json +++ b/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures3.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 13, - "end": 22, + "end": 14, "ctxt": 0 }, "value": "s", @@ -103,7 +103,7 @@ "type": "Identifier", "span": { "start": 40, - "end": 50, + "end": 41, "ctxt": 0 }, "value": "s", @@ -267,7 +267,7 @@ "type": "Identifier", "span": { "start": 100, - "end": 109, + "end": 101, "ctxt": 0 }, "value": "s", @@ -303,7 +303,7 @@ "type": "Identifier", "span": { "start": 111, - "end": 122, + "end": 113, "ctxt": 0 }, "value": "s2", @@ -374,7 +374,7 @@ "type": "Identifier", "span": { "start": 140, - "end": 150, + "end": 141, "ctxt": 0 }, "value": "s", @@ -410,7 +410,7 @@ "type": "Identifier", "span": { "start": 152, - "end": 162, + "end": 153, "ctxt": 0 }, "value": "n", @@ -481,7 +481,7 @@ "type": "Identifier", "span": { "start": 180, - "end": 190, + "end": 181, "ctxt": 0 }, "value": "s", @@ -610,7 +610,7 @@ "type": "Identifier", "span": { "start": 224, - "end": 233, + "end": 225, "ctxt": 0 }, "value": "s", diff --git a/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures4.json b/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures4.json index 47d20140cef4..18c7a8479b9c 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures4.json +++ b/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures4.json @@ -37,7 +37,7 @@ "type": "Identifier", "span": { "start": 12, - "end": 21, + "end": 13, "ctxt": 0 }, "value": "a", @@ -64,7 +64,7 @@ "type": "Identifier", "span": { "start": 23, - "end": 33, + "end": 24, "ctxt": 0 }, "value": "b", @@ -139,7 +139,7 @@ "type": "Identifier", "span": { "start": 55, - "end": 64, + "end": 56, "ctxt": 0 }, "value": "a", @@ -166,7 +166,7 @@ "type": "Identifier", "span": { "start": 66, - "end": 76, + "end": 67, "ctxt": 0 }, "value": "b", @@ -193,7 +193,7 @@ "type": "Identifier", "span": { "start": 78, - "end": 88, + "end": 79, "ctxt": 0 }, "value": "c", @@ -268,7 +268,7 @@ "type": "Identifier", "span": { "start": 110, - "end": 119, + "end": 111, "ctxt": 0 }, "value": "a", @@ -392,7 +392,7 @@ "type": "Identifier", "span": { "start": 160, - "end": 169, + "end": 161, "ctxt": 0 }, "value": "a", @@ -419,7 +419,7 @@ "type": "Identifier", "span": { "start": 171, - "end": 181, + "end": 172, "ctxt": 0 }, "value": "b", @@ -543,7 +543,7 @@ "type": "Identifier", "span": { "start": 222, - "end": 231, + "end": 223, "ctxt": 0 }, "value": "a", @@ -570,7 +570,7 @@ "type": "Identifier", "span": { "start": 233, - "end": 242, + "end": 234, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures5.json b/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures5.json index 76cdb723c8db..db5e9255a08f 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures5.json +++ b/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures5.json @@ -46,7 +46,7 @@ "type": "Identifier", "span": { "start": 28, - "end": 38, + "end": 32, "ctxt": 0 }, "value": "this", @@ -73,7 +73,7 @@ "type": "Identifier", "span": { "start": 40, - "end": 50, + "end": 41, "ctxt": 0 }, "value": "b", @@ -159,7 +159,7 @@ "type": "Identifier", "span": { "start": 78, - "end": 90, + "end": 82, "ctxt": 0 }, "value": "this", @@ -186,7 +186,7 @@ "type": "Identifier", "span": { "start": 92, - "end": 102, + "end": 93, "ctxt": 0 }, "value": "b", @@ -272,7 +272,7 @@ "type": "Identifier", "span": { "start": 130, - "end": 139, + "end": 131, "ctxt": 0 }, "value": "i", diff --git a/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures6.json b/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures6.json index 60b0eb9e2222..c3a29893f786 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures6.json +++ b/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures6.json @@ -368,7 +368,7 @@ "type": "Identifier", "span": { "start": 141, - "end": 148, + "end": 145, "ctxt": 0 }, "value": "this", @@ -453,7 +453,7 @@ "type": "Identifier", "span": { "start": 170, - "end": 177, + "end": 174, "ctxt": 0 }, "value": "this", @@ -779,7 +779,7 @@ "type": "Identifier", "span": { "start": 287, - "end": 294, + "end": 291, "ctxt": 0 }, "value": "this", @@ -844,7 +844,7 @@ "type": "Identifier", "span": { "start": 306, - "end": 313, + "end": 310, "ctxt": 0 }, "value": "this", @@ -940,7 +940,7 @@ "type": "Identifier", "span": { "start": 342, - "end": 349, + "end": 346, "ctxt": 0 }, "value": "this", @@ -1005,7 +1005,7 @@ "type": "Identifier", "span": { "start": 361, - "end": 368, + "end": 365, "ctxt": 0 }, "value": "this", @@ -1101,7 +1101,7 @@ "type": "Identifier", "span": { "start": 397, - "end": 404, + "end": 401, "ctxt": 0 }, "value": "this", @@ -1166,7 +1166,7 @@ "type": "Identifier", "span": { "start": 416, - "end": 423, + "end": 420, "ctxt": 0 }, "value": "this", @@ -2205,7 +2205,7 @@ "type": "Identifier", "span": { "start": 666, - "end": 677, + "end": 670, "ctxt": 0 }, "value": "this", @@ -2444,7 +2444,7 @@ "type": "Identifier", "span": { "start": 747, - "end": 762, + "end": 751, "ctxt": 0 }, "value": "this", @@ -2557,7 +2557,7 @@ "type": "Identifier", "span": { "start": 774, - "end": 785, + "end": 778, "ctxt": 0 }, "value": "this", diff --git a/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures7.json b/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures7.json index 64129a963878..1c678da3dd5c 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures7.json +++ b/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures7.json @@ -165,7 +165,7 @@ "type": "Identifier", "span": { "start": 166, - "end": 176, + "end": 168, "ctxt": 0 }, "value": "id", diff --git a/crates/swc_ecma_parser/tests/tsc/unionTypeConstructSignatures.json b/crates/swc_ecma_parser/tests/tsc/unionTypeConstructSignatures.json index fde74c6a4b7f..b441c8e7c0b3 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionTypeConstructSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/unionTypeConstructSignatures.json @@ -281,7 +281,7 @@ "type": "Identifier", "span": { "start": 423, - "end": 432, + "end": 424, "ctxt": 0 }, "value": "a", @@ -346,7 +346,7 @@ "type": "Identifier", "span": { "start": 454, - "end": 463, + "end": 455, "ctxt": 0 }, "value": "a", @@ -636,7 +636,7 @@ "type": "Identifier", "span": { "start": 698, - "end": 707, + "end": 699, "ctxt": 0 }, "value": "a", @@ -691,7 +691,7 @@ "type": "Identifier", "span": { "start": 723, - "end": 732, + "end": 724, "ctxt": 0 }, "value": "a", @@ -756,7 +756,7 @@ "type": "Identifier", "span": { "start": 754, - "end": 763, + "end": 755, "ctxt": 0 }, "value": "a", @@ -821,7 +821,7 @@ "type": "Identifier", "span": { "start": 777, - "end": 786, + "end": 778, "ctxt": 0 }, "value": "a", @@ -1129,7 +1129,7 @@ "type": "Identifier", "span": { "start": 1082, - "end": 1091, + "end": 1083, "ctxt": 0 }, "value": "a", @@ -1194,7 +1194,7 @@ "type": "Identifier", "span": { "start": 1113, - "end": 1122, + "end": 1114, "ctxt": 0 }, "value": "a", @@ -1431,7 +1431,7 @@ "type": "Identifier", "span": { "start": 1392, - "end": 1401, + "end": 1393, "ctxt": 0 }, "value": "a", @@ -1496,7 +1496,7 @@ "type": "Identifier", "span": { "start": 1423, - "end": 1432, + "end": 1424, "ctxt": 0 }, "value": "a", @@ -1561,7 +1561,7 @@ "type": "Identifier", "span": { "start": 1446, - "end": 1455, + "end": 1447, "ctxt": 0 }, "value": "a", @@ -1788,7 +1788,7 @@ "type": "Identifier", "span": { "start": 1741, - "end": 1750, + "end": 1742, "ctxt": 0 }, "value": "a", @@ -1853,7 +1853,7 @@ "type": "Identifier", "span": { "start": 1772, - "end": 1781, + "end": 1773, "ctxt": 0 }, "value": "a", @@ -1880,7 +1880,7 @@ "type": "Identifier", "span": { "start": 1783, - "end": 1792, + "end": 1784, "ctxt": 0 }, "value": "b", @@ -2120,7 +2120,7 @@ "type": "Identifier", "span": { "start": 2026, - "end": 2035, + "end": 2027, "ctxt": 0 }, "value": "a", @@ -2147,7 +2147,7 @@ "type": "Identifier", "span": { "start": 2037, - "end": 2047, + "end": 2038, "ctxt": 0 }, "value": "b", @@ -2212,7 +2212,7 @@ "type": "Identifier", "span": { "start": 2069, - "end": 2078, + "end": 2070, "ctxt": 0 }, "value": "a", @@ -2239,7 +2239,7 @@ "type": "Identifier", "span": { "start": 2080, - "end": 2090, + "end": 2081, "ctxt": 0 }, "value": "b", @@ -2614,7 +2614,7 @@ "type": "Identifier", "span": { "start": 2399, - "end": 2408, + "end": 2400, "ctxt": 0 }, "value": "a", @@ -2641,7 +2641,7 @@ "type": "Identifier", "span": { "start": 2410, - "end": 2420, + "end": 2411, "ctxt": 0 }, "value": "b", @@ -2706,7 +2706,7 @@ "type": "Identifier", "span": { "start": 2442, - "end": 2451, + "end": 2443, "ctxt": 0 }, "value": "a", @@ -2733,7 +2733,7 @@ "type": "Identifier", "span": { "start": 2453, - "end": 2462, + "end": 2454, "ctxt": 0 }, "value": "b", @@ -3108,7 +3108,7 @@ "type": "Identifier", "span": { "start": 2842, - "end": 2851, + "end": 2843, "ctxt": 0 }, "value": "a", @@ -3135,7 +3135,7 @@ "type": "Identifier", "span": { "start": 2853, - "end": 2863, + "end": 2854, "ctxt": 0 }, "value": "b", @@ -3200,7 +3200,7 @@ "type": "Identifier", "span": { "start": 2885, - "end": 2894, + "end": 2886, "ctxt": 0 }, "value": "a", @@ -3575,7 +3575,7 @@ "type": "Identifier", "span": { "start": 3237, - "end": 3246, + "end": 3238, "ctxt": 0 }, "value": "a", @@ -3689,7 +3689,7 @@ "type": "Identifier", "span": { "start": 3284, - "end": 3293, + "end": 3285, "ctxt": 0 }, "value": "a", @@ -4201,7 +4201,7 @@ "type": "Identifier", "span": { "start": 3654, - "end": 3663, + "end": 3655, "ctxt": 0 }, "value": "a", @@ -4315,7 +4315,7 @@ "type": "Identifier", "span": { "start": 3701, - "end": 3710, + "end": 3702, "ctxt": 0 }, "value": "a", @@ -4342,7 +4342,7 @@ "type": "Identifier", "span": { "start": 3712, - "end": 3721, + "end": 3713, "ctxt": 0 }, "value": "b", @@ -4805,7 +4805,7 @@ "type": "Identifier", "span": { "start": 4165, - "end": 4174, + "end": 4166, "ctxt": 0 }, "value": "a", @@ -4919,7 +4919,7 @@ "type": "Identifier", "span": { "start": 4212, - "end": 4221, + "end": 4213, "ctxt": 0 }, "value": "a", @@ -5381,7 +5381,7 @@ "type": "Identifier", "span": { "start": 4621, - "end": 4630, + "end": 4622, "ctxt": 0 }, "value": "a", @@ -5445,7 +5445,7 @@ "type": "Identifier", "span": { "start": 4651, - "end": 4660, + "end": 4652, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/unionTypeInference.json b/crates/swc_ecma_parser/tests/tsc/unionTypeInference.json index 730911a7bd81..c7d2a0c298b1 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionTypeInference.json +++ b/crates/swc_ecma_parser/tests/tsc/unionTypeInference.json @@ -198,7 +198,7 @@ "type": "Identifier", "span": { "start": 148, - "end": 152, + "end": 149, "ctxt": 0 }, "value": "x", @@ -244,7 +244,7 @@ "type": "Identifier", "span": { "start": 154, - "end": 167, + "end": 155, "ctxt": 0 }, "value": "y", @@ -945,7 +945,7 @@ "type": "Identifier", "span": { "start": 458, - "end": 476, + "end": 463, "ctxt": 0 }, "value": "value", @@ -1204,7 +1204,7 @@ "type": "Identifier", "span": { "start": 550, - "end": 571, + "end": 551, "ctxt": 0 }, "value": "x", @@ -1700,7 +1700,7 @@ "type": "Identifier", "span": { "start": 745, - "end": 758, + "end": 746, "ctxt": 0 }, "value": "x", @@ -2114,7 +2114,7 @@ "type": "Identifier", "span": { "start": 873, - "end": 896, + "end": 874, "ctxt": 0 }, "value": "f", @@ -2138,7 +2138,7 @@ "type": "Identifier", "span": { "start": 877, - "end": 881, + "end": 878, "ctxt": 0 }, "value": "x", @@ -2264,7 +2264,7 @@ "type": "Identifier", "span": { "start": 898, - "end": 902, + "end": 899, "ctxt": 0 }, "value": "g", @@ -2483,7 +2483,7 @@ "type": "Identifier", "span": { "start": 953, - "end": 976, + "end": 954, "ctxt": 0 }, "value": "f", @@ -2507,7 +2507,7 @@ "type": "Identifier", "span": { "start": 957, - "end": 961, + "end": 958, "ctxt": 0 }, "value": "x", @@ -2633,7 +2633,7 @@ "type": "Identifier", "span": { "start": 978, - "end": 982, + "end": 979, "ctxt": 0 }, "value": "g", @@ -2786,7 +2786,7 @@ "type": "Identifier", "span": { "start": 1009, - "end": 1022, + "end": 1011, "ctxt": 0 }, "value": "p1", @@ -2850,7 +2850,7 @@ "type": "Identifier", "span": { "start": 1024, - "end": 1037, + "end": 1026, "ctxt": 0 }, "value": "p2", @@ -2988,7 +2988,7 @@ "type": "Identifier", "span": { "start": 1104, - "end": 1121, + "end": 1105, "ctxt": 0 }, "value": "x", @@ -3320,7 +3320,7 @@ "type": "Identifier", "span": { "start": 1201, - "end": 1205, + "end": 1202, "ctxt": 0 }, "value": "x", @@ -3366,7 +3366,7 @@ "type": "Identifier", "span": { "start": 1207, - "end": 1220, + "end": 1208, "ctxt": 0 }, "value": "y", @@ -4089,7 +4089,7 @@ "type": "Identifier", "span": { "start": 1496, - "end": 1525, + "end": 1508, "ctxt": 0 }, "value": "deepPromised", @@ -4870,7 +4870,7 @@ "type": "Identifier", "span": { "start": 1917, - "end": 1928, + "end": 1919, "ctxt": 0 }, "value": "dp", diff --git a/crates/swc_ecma_parser/tests/tsc/unionTypeMembers.json b/crates/swc_ecma_parser/tests/tsc/unionTypeMembers.json index 3ecdb05b62b5..de713ab3ca7f 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionTypeMembers.json +++ b/crates/swc_ecma_parser/tests/tsc/unionTypeMembers.json @@ -91,7 +91,7 @@ "type": "Identifier", "span": { "start": 40, - "end": 49, + "end": 41, "ctxt": 0 }, "value": "a", @@ -200,7 +200,7 @@ "type": "Identifier", "span": { "start": 132, - "end": 141, + "end": 133, "ctxt": 0 }, "value": "a", @@ -268,7 +268,7 @@ "type": "Identifier", "span": { "start": 188, - "end": 197, + "end": 189, "ctxt": 0 }, "value": "a", @@ -377,7 +377,7 @@ "type": "Identifier", "span": { "start": 283, - "end": 287, + "end": 284, "ctxt": 0 }, "value": "a", @@ -465,7 +465,7 @@ "type": "Identifier", "span": { "start": 333, - "end": 337, + "end": 334, "ctxt": 0 }, "value": "a", @@ -585,7 +585,7 @@ "type": "Identifier", "span": { "start": 363, - "end": 372, + "end": 364, "ctxt": 0 }, "value": "a", @@ -757,7 +757,7 @@ "type": "Identifier", "span": { "start": 455, - "end": 464, + "end": 456, "ctxt": 0 }, "value": "a", @@ -866,7 +866,7 @@ "type": "Identifier", "span": { "start": 547, - "end": 556, + "end": 548, "ctxt": 0 }, "value": "a", @@ -934,7 +934,7 @@ "type": "Identifier", "span": { "start": 603, - "end": 612, + "end": 604, "ctxt": 0 }, "value": "a", @@ -1043,7 +1043,7 @@ "type": "Identifier", "span": { "start": 698, - "end": 702, + "end": 699, "ctxt": 0 }, "value": "a", @@ -1131,7 +1131,7 @@ "type": "Identifier", "span": { "start": 748, - "end": 752, + "end": 749, "ctxt": 0 }, "value": "a", @@ -1251,7 +1251,7 @@ "type": "Identifier", "span": { "start": 778, - "end": 787, + "end": 779, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/unionTypeReduction2.json b/crates/swc_ecma_parser/tests/tsc/unionTypeReduction2.json index 2b958bc6122c..1582d5007ffc 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionTypeReduction2.json +++ b/crates/swc_ecma_parser/tests/tsc/unionTypeReduction2.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 31, - "end": 47, + "end": 32, "ctxt": 0 }, "value": "x", @@ -109,7 +109,7 @@ "type": "Identifier", "span": { "start": 49, - "end": 75, + "end": 50, "ctxt": 0 }, "value": "y", @@ -154,7 +154,7 @@ "type": "Identifier", "span": { "start": 56, - "end": 66, + "end": 57, "ctxt": 0 }, "value": "x", @@ -443,7 +443,7 @@ "type": "Identifier", "span": { "start": 179, - "end": 216, + "end": 180, "ctxt": 0 }, "value": "x", @@ -488,7 +488,7 @@ "type": "Identifier", "span": { "start": 186, - "end": 207, + "end": 187, "ctxt": 0 }, "value": "x", @@ -567,7 +567,7 @@ "type": "Identifier", "span": { "start": 218, - "end": 244, + "end": 219, "ctxt": 0 }, "value": "y", @@ -612,7 +612,7 @@ "type": "Identifier", "span": { "start": 225, - "end": 235, + "end": 226, "ctxt": 0 }, "value": "x", @@ -901,7 +901,7 @@ "type": "Identifier", "span": { "start": 348, - "end": 361, + "end": 349, "ctxt": 0 }, "value": "x", @@ -955,7 +955,7 @@ "type": "Identifier", "span": { "start": 363, - "end": 386, + "end": 364, "ctxt": 0 }, "value": "y", @@ -979,7 +979,7 @@ "type": "Identifier", "span": { "start": 367, - "end": 377, + "end": 368, "ctxt": 0 }, "value": "x", @@ -1230,7 +1230,7 @@ "type": "Identifier", "span": { "start": 483, - "end": 517, + "end": 484, "ctxt": 0 }, "value": "x", @@ -1254,7 +1254,7 @@ "type": "Identifier", "span": { "start": 487, - "end": 508, + "end": 488, "ctxt": 0 }, "value": "x", @@ -1331,7 +1331,7 @@ "type": "Identifier", "span": { "start": 519, - "end": 542, + "end": 520, "ctxt": 0 }, "value": "y", @@ -1355,7 +1355,7 @@ "type": "Identifier", "span": { "start": 523, - "end": 533, + "end": 524, "ctxt": 0 }, "value": "x", @@ -1606,7 +1606,7 @@ "type": "Identifier", "span": { "start": 639, - "end": 673, + "end": 640, "ctxt": 0 }, "value": "x", @@ -1630,7 +1630,7 @@ "type": "Identifier", "span": { "start": 643, - "end": 664, + "end": 644, "ctxt": 0 }, "value": "x", @@ -1707,7 +1707,7 @@ "type": "Identifier", "span": { "start": 675, - "end": 699, + "end": 676, "ctxt": 0 }, "value": "y", @@ -1731,7 +1731,7 @@ "type": "Identifier", "span": { "start": 679, - "end": 690, + "end": 680, "ctxt": 0 }, "value": "x", @@ -1991,7 +1991,7 @@ "type": "Identifier", "span": { "start": 797, - "end": 832, + "end": 798, "ctxt": 0 }, "value": "x", @@ -2015,7 +2015,7 @@ "type": "Identifier", "span": { "start": 801, - "end": 823, + "end": 802, "ctxt": 0 }, "value": "x", @@ -2101,7 +2101,7 @@ "type": "Identifier", "span": { "start": 834, - "end": 857, + "end": 835, "ctxt": 0 }, "value": "y", @@ -2125,7 +2125,7 @@ "type": "Identifier", "span": { "start": 838, - "end": 848, + "end": 839, "ctxt": 0 }, "value": "x", @@ -2472,7 +2472,7 @@ "type": "Identifier", "span": { "start": 1010, - "end": 1020, + "end": 1011, "ctxt": 0 }, "value": "x", @@ -2584,7 +2584,7 @@ "type": "Identifier", "span": { "start": 1060, - "end": 1064, + "end": 1061, "ctxt": 0 }, "value": "a", @@ -2630,7 +2630,7 @@ "type": "Identifier", "span": { "start": 1066, - "end": 1070, + "end": 1067, "ctxt": 0 }, "value": "b", @@ -3136,7 +3136,7 @@ "type": "Identifier", "span": { "start": 1299, - "end": 1340, + "end": 1306, "ctxt": 0 }, "value": "options", @@ -3181,7 +3181,7 @@ "type": "Identifier", "span": { "start": 1321, - "end": 1331, + "end": 1322, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/tsc/unionTypesAssignability.json b/crates/swc_ecma_parser/tests/tsc/unionTypesAssignability.json index 47b8badcebad..9f78cb4e3d98 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionTypesAssignability.json +++ b/crates/swc_ecma_parser/tests/tsc/unionTypesAssignability.json @@ -2142,7 +2142,7 @@ "type": "Identifier", "span": { "start": 1234, - "end": 1238, + "end": 1235, "ctxt": 0 }, "value": "t", @@ -2188,7 +2188,7 @@ "type": "Identifier", "span": { "start": 1240, - "end": 1244, + "end": 1241, "ctxt": 0 }, "value": "u", diff --git a/crates/swc_ecma_parser/tests/tsc/unionsOfTupleTypes1.json b/crates/swc_ecma_parser/tests/tsc/unionsOfTupleTypes1.json index 1340e0167758..188c40efd150 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionsOfTupleTypes1.json +++ b/crates/swc_ecma_parser/tests/tsc/unionsOfTupleTypes1.json @@ -1424,7 +1424,7 @@ "type": "Identifier", "span": { "start": 784, - "end": 790, + "end": 786, "ctxt": 0 }, "value": "t1", @@ -1470,7 +1470,7 @@ "type": "Identifier", "span": { "start": 792, - "end": 798, + "end": 794, "ctxt": 0 }, "value": "t2", @@ -1516,7 +1516,7 @@ "type": "Identifier", "span": { "start": 800, - "end": 806, + "end": 802, "ctxt": 0 }, "value": "t3", @@ -1562,7 +1562,7 @@ "type": "Identifier", "span": { "start": 808, - "end": 814, + "end": 810, "ctxt": 0 }, "value": "t4", @@ -1608,7 +1608,7 @@ "type": "Identifier", "span": { "start": 816, - "end": 825, + "end": 817, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/uniqueSymbols.json b/crates/swc_ecma_parser/tests/tsc/uniqueSymbols.json index 3e7a6e6b29f7..b08ab97e00c6 100644 --- a/crates/swc_ecma_parser/tests/tsc/uniqueSymbols.json +++ b/crates/swc_ecma_parser/tests/tsc/uniqueSymbols.json @@ -5250,7 +5250,7 @@ "type": "Identifier", "span": { "start": 5085, - "end": 5089, + "end": 5086, "ctxt": 0 }, "value": "x", @@ -5381,7 +5381,7 @@ "type": "Identifier", "span": { "start": 5114, - "end": 5125, + "end": 5115, "ctxt": 0 }, "value": "x", @@ -5470,7 +5470,7 @@ "type": "Identifier", "span": { "start": 5153, - "end": 5166, + "end": 5154, "ctxt": 0 }, "value": "x", @@ -9224,7 +9224,7 @@ "type": "Identifier", "span": { "start": 6713, - "end": 6725, + "end": 6714, "ctxt": 0 }, "value": "p", @@ -9736,7 +9736,7 @@ "type": "Identifier", "span": { "start": 7330, - "end": 7341, + "end": 7331, "ctxt": 0 }, "value": "p", @@ -9861,7 +9861,7 @@ "type": "Identifier", "span": { "start": 7392, - "end": 7412, + "end": 7393, "ctxt": 0 }, "value": "p", @@ -10090,7 +10090,7 @@ "type": "Identifier", "span": { "start": 7495, - "end": 7506, + "end": 7496, "ctxt": 0 }, "value": "p", @@ -10228,7 +10228,7 @@ "type": "Identifier", "span": { "start": 7556, - "end": 7576, + "end": 7557, "ctxt": 0 }, "value": "p", @@ -10426,7 +10426,7 @@ "type": "Identifier", "span": { "start": 7659, - "end": 7693, + "end": 7662, "ctxt": 0 }, "value": "obj", @@ -10471,7 +10471,7 @@ "type": "Identifier", "span": { "start": 7673, - "end": 7684, + "end": 7674, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarations.json b/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarations.json index 25641574ccf3..162f51039588 100644 --- a/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarations.json +++ b/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarations.json @@ -5167,7 +5167,7 @@ "type": "Identifier", "span": { "start": 4962, - "end": 4966, + "end": 4963, "ctxt": 0 }, "value": "x", @@ -5298,7 +5298,7 @@ "type": "Identifier", "span": { "start": 4991, - "end": 5002, + "end": 4992, "ctxt": 0 }, "value": "x", @@ -5387,7 +5387,7 @@ "type": "Identifier", "span": { "start": 5030, - "end": 5043, + "end": 5031, "ctxt": 0 }, "value": "x", @@ -9141,7 +9141,7 @@ "type": "Identifier", "span": { "start": 6589, - "end": 6601, + "end": 6590, "ctxt": 0 }, "value": "p", diff --git a/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarationsErrors.json b/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarationsErrors.json index 6f72f0c62166..8a9cc088386d 100644 --- a/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarationsErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarationsErrors.json @@ -213,7 +213,7 @@ "type": "Identifier", "span": { "start": 278, - "end": 289, + "end": 279, "ctxt": 0 }, "value": "p", @@ -338,7 +338,7 @@ "type": "Identifier", "span": { "start": 340, - "end": 360, + "end": 341, "ctxt": 0 }, "value": "p", @@ -575,7 +575,7 @@ "type": "Identifier", "span": { "start": 462, - "end": 473, + "end": 463, "ctxt": 0 }, "value": "p", @@ -713,7 +713,7 @@ "type": "Identifier", "span": { "start": 523, - "end": 543, + "end": 524, "ctxt": 0 }, "value": "p", @@ -919,7 +919,7 @@ "type": "Identifier", "span": { "start": 633, - "end": 667, + "end": 636, "ctxt": 0 }, "value": "obj", @@ -964,7 +964,7 @@ "type": "Identifier", "span": { "start": 647, - "end": 658, + "end": 648, "ctxt": 0 }, "value": "p", @@ -1818,7 +1818,7 @@ "type": "Identifier", "span": { "start": 1238, - "end": 1244, + "end": 1239, "ctxt": 0 }, "value": "v", @@ -1998,7 +1998,7 @@ "type": "Identifier", "span": { "start": 1317, - "end": 1323, + "end": 1318, "ctxt": 0 }, "value": "v", diff --git a/crates/swc_ecma_parser/tests/tsc/unknownControlFlow.json b/crates/swc_ecma_parser/tests/tsc/unknownControlFlow.json index 8845926db985..87617b3e8498 100644 --- a/crates/swc_ecma_parser/tests/tsc/unknownControlFlow.json +++ b/crates/swc_ecma_parser/tests/tsc/unknownControlFlow.json @@ -689,7 +689,7 @@ "type": "Identifier", "span": { "start": 549, - "end": 559, + "end": 550, "ctxt": 0 }, "value": "u", @@ -1138,7 +1138,7 @@ "type": "Identifier", "span": { "start": 754, - "end": 764, + "end": 755, "ctxt": 0 }, "value": "x", @@ -1367,7 +1367,7 @@ "type": "Identifier", "span": { "start": 942, - "end": 946, + "end": 943, "ctxt": 0 }, "value": "x", @@ -1638,7 +1638,7 @@ "type": "Identifier", "span": { "start": 1131, - "end": 1135, + "end": 1132, "ctxt": 0 }, "value": "x", @@ -1834,7 +1834,7 @@ "type": "Identifier", "span": { "start": 1225, - "end": 1235, + "end": 1226, "ctxt": 0 }, "value": "x", @@ -2403,7 +2403,7 @@ "type": "Identifier", "span": { "start": 1760, - "end": 1764, + "end": 1761, "ctxt": 0 }, "value": "x", @@ -3014,7 +3014,7 @@ "type": "Identifier", "span": { "start": 2280, - "end": 2284, + "end": 2281, "ctxt": 0 }, "value": "x", @@ -3652,7 +3652,7 @@ "type": "Identifier", "span": { "start": 2749, - "end": 2772, + "end": 2750, "ctxt": 0 }, "value": "x", @@ -4054,7 +4054,7 @@ "type": "Identifier", "span": { "start": 3019, - "end": 3024, + "end": 3020, "ctxt": 0 }, "value": "x", @@ -4201,7 +4201,7 @@ "type": "Identifier", "span": { "start": 3108, - "end": 3112, + "end": 3109, "ctxt": 0 }, "value": "x", @@ -4578,7 +4578,7 @@ "type": "Identifier", "span": { "start": 3374, - "end": 3378, + "end": 3375, "ctxt": 0 }, "value": "x", @@ -4794,7 +4794,7 @@ "type": "Identifier", "span": { "start": 3475, - "end": 3479, + "end": 3476, "ctxt": 0 }, "value": "x", @@ -4969,7 +4969,7 @@ "type": "Identifier", "span": { "start": 3559, - "end": 3563, + "end": 3560, "ctxt": 0 }, "value": "x", @@ -5146,7 +5146,7 @@ "type": "Identifier", "span": { "start": 3659, - "end": 3663, + "end": 3660, "ctxt": 0 }, "value": "x", @@ -5326,7 +5326,7 @@ "type": "Identifier", "span": { "start": 3768, - "end": 3772, + "end": 3769, "ctxt": 0 }, "value": "x", @@ -5522,7 +5522,7 @@ "type": "Identifier", "span": { "start": 3884, - "end": 3888, + "end": 3885, "ctxt": 0 }, "value": "x", @@ -5720,7 +5720,7 @@ "type": "Identifier", "span": { "start": 4006, - "end": 4010, + "end": 4007, "ctxt": 0 }, "value": "x", @@ -5900,7 +5900,7 @@ "type": "Identifier", "span": { "start": 4090, - "end": 4111, + "end": 4091, "ctxt": 0 }, "value": "a", @@ -5955,7 +5955,7 @@ "type": "Identifier", "span": { "start": 4113, - "end": 4141, + "end": 4114, "ctxt": 0 }, "value": "b", @@ -6342,7 +6342,7 @@ "type": "Identifier", "span": { "start": 4326, - "end": 4330, + "end": 4327, "ctxt": 0 }, "value": "a", @@ -7266,7 +7266,7 @@ "type": "Identifier", "span": { "start": 5035, - "end": 5039, + "end": 5036, "ctxt": 0 }, "value": "a", @@ -7312,7 +7312,7 @@ "type": "Identifier", "span": { "start": 5041, - "end": 5045, + "end": 5042, "ctxt": 0 }, "value": "b", @@ -7970,7 +7970,7 @@ "type": "Identifier", "span": { "start": 5391, - "end": 5402, + "end": 5392, "ctxt": 0 }, "value": "x", @@ -8209,7 +8209,7 @@ "type": "Identifier", "span": { "start": 5766, - "end": 5770, + "end": 5767, "ctxt": 0 }, "value": "t", @@ -8255,7 +8255,7 @@ "type": "Identifier", "span": { "start": 5772, - "end": 5782, + "end": 5773, "ctxt": 0 }, "value": "k", @@ -8422,7 +8422,7 @@ "type": "Identifier", "span": { "start": 5815, - "end": 5824, + "end": 5816, "ctxt": 0 }, "value": "t", @@ -8487,7 +8487,7 @@ "type": "Identifier", "span": { "start": 5826, - "end": 5836, + "end": 5827, "ctxt": 0 }, "value": "k", @@ -8654,7 +8654,7 @@ "type": "Identifier", "span": { "start": 5869, - "end": 5873, + "end": 5870, "ctxt": 0 }, "value": "t", @@ -8700,7 +8700,7 @@ "type": "Identifier", "span": { "start": 5875, - "end": 5892, + "end": 5876, "ctxt": 0 }, "value": "k", @@ -8894,7 +8894,7 @@ "type": "Identifier", "span": { "start": 5935, - "end": 5944, + "end": 5936, "ctxt": 0 }, "value": "t", @@ -8959,7 +8959,7 @@ "type": "Identifier", "span": { "start": 5946, - "end": 5963, + "end": 5947, "ctxt": 0 }, "value": "k", @@ -9644,7 +9644,7 @@ "type": "Identifier", "span": { "start": 6295, - "end": 6317, + "end": 6300, "ctxt": 0 }, "value": "value", @@ -9897,7 +9897,7 @@ "type": "Identifier", "span": { "start": 6464, - "end": 6486, + "end": 6469, "ctxt": 0 }, "value": "value", @@ -10158,7 +10158,7 @@ "type": "Identifier", "span": { "start": 6628, - "end": 6650, + "end": 6633, "ctxt": 0 }, "value": "value", @@ -10419,7 +10419,7 @@ "type": "Identifier", "span": { "start": 6804, - "end": 6826, + "end": 6809, "ctxt": 0 }, "value": "value", @@ -10699,7 +10699,7 @@ "type": "Identifier", "span": { "start": 6975, - "end": 6997, + "end": 6980, "ctxt": 0 }, "value": "value", @@ -10979,7 +10979,7 @@ "type": "Identifier", "span": { "start": 7158, - "end": 7180, + "end": 7163, "ctxt": 0 }, "value": "value", @@ -11268,7 +11268,7 @@ "type": "Identifier", "span": { "start": 7337, - "end": 7355, + "end": 7338, "ctxt": 0 }, "value": "x", @@ -11323,7 +11323,7 @@ "type": "Identifier", "span": { "start": 7357, - "end": 7366, + "end": 7358, "ctxt": 0 }, "value": "y", @@ -11581,7 +11581,7 @@ "type": "Identifier", "span": { "start": 7620, - "end": 7637, + "end": 7628, "ctxt": 0 }, "value": "encoding", @@ -11807,7 +11807,7 @@ "type": "Identifier", "span": { "start": 7800, - "end": 7808, + "end": 7805, "ctxt": 0 }, "value": "value", @@ -12129,7 +12129,7 @@ "type": "Identifier", "span": { "start": 7993, - "end": 8007, + "end": 7998, "ctxt": 0 }, "value": "value", @@ -13301,7 +13301,7 @@ "type": "Identifier", "span": { "start": 8523, - "end": 8542, + "end": 8524, "ctxt": 0 }, "value": "x", @@ -13366,7 +13366,7 @@ "type": "Identifier", "span": { "start": 8544, - "end": 8550, + "end": 8545, "ctxt": 0 }, "value": "y", @@ -13806,7 +13806,7 @@ "type": "Identifier", "span": { "start": 8736, - "end": 8744, + "end": 8737, "ctxt": 0 }, "value": "v", @@ -13936,7 +13936,7 @@ "type": "Identifier", "span": { "start": 8802, - "end": 8815, + "end": 8807, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/unknownType1.json b/crates/swc_ecma_parser/tests/tsc/unknownType1.json index 8b8a023d84e5..5932e70703be 100644 --- a/crates/swc_ecma_parser/tests/tsc/unknownType1.json +++ b/crates/swc_ecma_parser/tests/tsc/unknownType1.json @@ -2018,7 +2018,7 @@ "type": "Identifier", "span": { "start": 1558, - "end": 1568, + "end": 1559, "ctxt": 0 }, "value": "x", @@ -2437,7 +2437,7 @@ "type": "Identifier", "span": { "start": 1837, - "end": 1847, + "end": 1838, "ctxt": 0 }, "value": "x", @@ -2645,7 +2645,7 @@ "type": "Identifier", "span": { "start": 2022, - "end": 2032, + "end": 2023, "ctxt": 0 }, "value": "x", @@ -2761,7 +2761,7 @@ "type": "Identifier", "span": { "start": 2064, - "end": 2074, + "end": 2065, "ctxt": 0 }, "value": "x", @@ -3328,7 +3328,7 @@ "type": "Identifier", "span": { "start": 2507, - "end": 2516, + "end": 2511, "ctxt": 0 }, "value": "pAny", @@ -3364,7 +3364,7 @@ "type": "Identifier", "span": { "start": 2518, - "end": 2531, + "end": 2524, "ctxt": 0 }, "value": "pNever", @@ -3400,7 +3400,7 @@ "type": "Identifier", "span": { "start": 2533, - "end": 2538, + "end": 2535, "ctxt": 0 }, "value": "pT", @@ -3916,7 +3916,7 @@ "type": "Identifier", "span": { "start": 2747, - "end": 2757, + "end": 2748, "ctxt": 0 }, "value": "x", @@ -4430,7 +4430,7 @@ "type": "Identifier", "span": { "start": 3086, - "end": 3090, + "end": 3087, "ctxt": 0 }, "value": "x", @@ -4610,7 +4610,7 @@ "type": "Identifier", "span": { "start": 3215, - "end": 3242, + "end": 3216, "ctxt": 0 }, "value": "x", @@ -5078,7 +5078,7 @@ "type": "Identifier", "span": { "start": 3505, - "end": 3510, + "end": 3506, "ctxt": 0 }, "value": "x", @@ -5114,7 +5114,7 @@ "type": "Identifier", "span": { "start": 3512, - "end": 3522, + "end": 3513, "ctxt": 0 }, "value": "y", @@ -5150,7 +5150,7 @@ "type": "Identifier", "span": { "start": 3524, - "end": 3530, + "end": 3525, "ctxt": 0 }, "value": "z", @@ -5658,7 +5658,7 @@ "type": "Identifier", "span": { "start": 3876, - "end": 3886, + "end": 3877, "ctxt": 0 }, "value": "x", @@ -5960,7 +5960,7 @@ "type": "Identifier", "span": { "start": 4172, - "end": 4176, + "end": 4173, "ctxt": 0 }, "value": "t", @@ -6006,7 +6006,7 @@ "type": "Identifier", "span": { "start": 4178, - "end": 4182, + "end": 4179, "ctxt": 0 }, "value": "u", @@ -6610,7 +6610,7 @@ "type": "Identifier", "span": { "start": 4477, - "end": 4483, + "end": 4480, "ctxt": 0 }, "value": "arg", diff --git a/crates/swc_ecma_parser/tests/tsc/unknownType2.json b/crates/swc_ecma_parser/tests/tsc/unknownType2.json index 43dae9279f65..601c2956f66d 100644 --- a/crates/swc_ecma_parser/tests/tsc/unknownType2.json +++ b/crates/swc_ecma_parser/tests/tsc/unknownType2.json @@ -344,7 +344,7 @@ "type": "Identifier", "span": { "start": 164, - "end": 174, + "end": 165, "ctxt": 0 }, "value": "x", @@ -4256,7 +4256,7 @@ "type": "Identifier", "span": { "start": 2108, - "end": 2118, + "end": 2109, "ctxt": 0 }, "value": "x", @@ -4827,7 +4827,7 @@ "type": "Identifier", "span": { "start": 2477, - "end": 2487, + "end": 2478, "ctxt": 0 }, "value": "x", @@ -5564,7 +5564,7 @@ "type": "Identifier", "span": { "start": 2890, - "end": 2900, + "end": 2891, "ctxt": 0 }, "value": "x", @@ -6679,7 +6679,7 @@ "type": "Identifier", "span": { "start": 3741, - "end": 3751, + "end": 3742, "ctxt": 0 }, "value": "x", @@ -6715,7 +6715,7 @@ "type": "Identifier", "span": { "start": 3753, - "end": 3766, + "end": 3754, "ctxt": 0 }, "value": "y", @@ -6769,7 +6769,7 @@ "type": "Identifier", "span": { "start": 3768, - "end": 3787, + "end": 3769, "ctxt": 0 }, "value": "z", @@ -7276,7 +7276,7 @@ "type": "Identifier", "span": { "start": 4121, - "end": 4131, + "end": 4122, "ctxt": 0 }, "value": "x", @@ -7618,7 +7618,7 @@ "type": "Identifier", "span": { "start": 4432, - "end": 4442, + "end": 4433, "ctxt": 0 }, "value": "x", @@ -7960,7 +7960,7 @@ "type": "Identifier", "span": { "start": 4771, - "end": 4781, + "end": 4772, "ctxt": 0 }, "value": "x", @@ -8208,7 +8208,7 @@ "type": "Identifier", "span": { "start": 4919, - "end": 4929, + "end": 4920, "ctxt": 0 }, "value": "u", diff --git a/crates/swc_ecma_parser/tests/tsc/usingDeclarations.11.json b/crates/swc_ecma_parser/tests/tsc/usingDeclarations.11.json index ca22c590452c..00ad5bd7ac08 100644 --- a/crates/swc_ecma_parser/tests/tsc/usingDeclarations.11.json +++ b/crates/swc_ecma_parser/tests/tsc/usingDeclarations.11.json @@ -543,7 +543,7 @@ "type": "Identifier", "span": { "start": 417, - "end": 426, + "end": 418, "ctxt": 0 }, "value": "y", @@ -761,7 +761,7 @@ "type": "Identifier", "span": { "start": 534, - "end": 543, + "end": 535, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/tsc/validMultipleVariableDeclarations.json b/crates/swc_ecma_parser/tests/tsc/validMultipleVariableDeclarations.json index c1bc50e52a65..f8de61e63eaf 100644 --- a/crates/swc_ecma_parser/tests/tsc/validMultipleVariableDeclarations.json +++ b/crates/swc_ecma_parser/tests/tsc/validMultipleVariableDeclarations.json @@ -1321,7 +1321,7 @@ "type": "Identifier", "span": { "start": 570, - "end": 579, + "end": 571, "ctxt": 0 }, "value": "s", @@ -1517,7 +1517,7 @@ "type": "Identifier", "span": { "start": 632, - "end": 641, + "end": 633, "ctxt": 0 }, "value": "s", @@ -1620,7 +1620,7 @@ "type": "Identifier", "span": { "start": 665, - "end": 674, + "end": 666, "ctxt": 0 }, "value": "s", @@ -1727,7 +1727,7 @@ "type": "Identifier", "span": { "start": 698, - "end": 707, + "end": 699, "ctxt": 0 }, "value": "s", diff --git a/crates/swc_ecma_parser/tests/tsc/validNullAssignments.json b/crates/swc_ecma_parser/tests/tsc/validNullAssignments.json index 5b66cd731a74..1e056421574c 100644 --- a/crates/swc_ecma_parser/tests/tsc/validNullAssignments.json +++ b/crates/swc_ecma_parser/tests/tsc/validNullAssignments.json @@ -1071,7 +1071,7 @@ "type": "Identifier", "span": { "start": 412, - "end": 416, + "end": 413, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/validUndefinedAssignments.json b/crates/swc_ecma_parser/tests/tsc/validUndefinedAssignments.json index 0b98975dd8d7..1798b1f9caa5 100644 --- a/crates/swc_ecma_parser/tests/tsc/validUndefinedAssignments.json +++ b/crates/swc_ecma_parser/tests/tsc/validUndefinedAssignments.json @@ -866,7 +866,7 @@ "type": "Identifier", "span": { "start": 284, - "end": 288, + "end": 285, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/tsc/varRequireFromTypescript.json b/crates/swc_ecma_parser/tests/tsc/varRequireFromTypescript.json index be7f43e24195..3361204d263a 100644 --- a/crates/swc_ecma_parser/tests/tsc/varRequireFromTypescript.json +++ b/crates/swc_ecma_parser/tests/tsc/varRequireFromTypescript.json @@ -250,7 +250,7 @@ "type": "Identifier", "span": { "start": 195, - "end": 204, + "end": 196, "ctxt": 0 }, "value": "n", diff --git a/crates/swc_ecma_parser/tests/tsc/variadicTuples1.json b/crates/swc_ecma_parser/tests/tsc/variadicTuples1.json index bb71a47bcd17..e90321789c55 100644 --- a/crates/swc_ecma_parser/tests/tsc/variadicTuples1.json +++ b/crates/swc_ecma_parser/tests/tsc/variadicTuples1.json @@ -1248,7 +1248,7 @@ "type": "Identifier", "span": { "start": 610, - "end": 619, + "end": 611, "ctxt": 0 }, "value": "t", @@ -1321,7 +1321,7 @@ "type": "Identifier", "span": { "start": 621, - "end": 630, + "end": 622, "ctxt": 0 }, "value": "u", @@ -1733,7 +1733,7 @@ "type": "Identifier", "span": { "start": 779, - "end": 788, + "end": 780, "ctxt": 0 }, "value": "t", @@ -1806,7 +1806,7 @@ "type": "Identifier", "span": { "start": 790, - "end": 799, + "end": 791, "ctxt": 0 }, "value": "u", @@ -2618,7 +2618,7 @@ "type": "Identifier", "span": { "start": 1146, - "end": 1150, + "end": 1147, "ctxt": 0 }, "value": "t", @@ -2664,7 +2664,7 @@ "type": "Identifier", "span": { "start": 1152, - "end": 1156, + "end": 1153, "ctxt": 0 }, "value": "u", @@ -3076,7 +3076,7 @@ "type": "Identifier", "span": { "start": 1353, - "end": 1362, + "end": 1354, "ctxt": 0 }, "value": "a", @@ -3112,7 +3112,7 @@ "type": "Identifier", "span": { "start": 1364, - "end": 1373, + "end": 1365, "ctxt": 0 }, "value": "b", @@ -3148,7 +3148,7 @@ "type": "Identifier", "span": { "start": 1375, - "end": 1385, + "end": 1376, "ctxt": 0 }, "value": "c", @@ -3285,7 +3285,7 @@ "type": "Identifier", "span": { "start": 1425, - "end": 1445, + "end": 1427, "ctxt": 0 }, "value": "t1", @@ -3358,7 +3358,7 @@ "type": "Identifier", "span": { "start": 1447, - "end": 1460, + "end": 1449, "ctxt": 0 }, "value": "t2", @@ -3413,7 +3413,7 @@ "type": "Identifier", "span": { "start": 1462, - "end": 1474, + "end": 1464, "ctxt": 0 }, "value": "a1", @@ -3983,7 +3983,7 @@ "type": "Identifier", "span": { "start": 1722, - "end": 1731, + "end": 1723, "ctxt": 0 }, "value": "x", @@ -4225,7 +4225,7 @@ "type": "Identifier", "span": { "start": 1798, - "end": 1802, + "end": 1799, "ctxt": 0 }, "value": "u", @@ -4617,7 +4617,7 @@ "type": "Identifier", "span": { "start": 1979, - "end": 1983, + "end": 1980, "ctxt": 0 }, "value": "t", @@ -4764,7 +4764,7 @@ "type": "Identifier", "span": { "start": 2031, - "end": 2035, + "end": 2032, "ctxt": 0 }, "value": "t", @@ -4947,7 +4947,7 @@ "type": "Identifier", "span": { "start": 2097, - "end": 2106, + "end": 2098, "ctxt": 0 }, "value": "t", @@ -5121,7 +5121,7 @@ "type": "Identifier", "span": { "start": 2154, - "end": 2163, + "end": 2155, "ctxt": 0 }, "value": "t", @@ -5603,7 +5603,7 @@ "type": "Identifier", "span": { "start": 2440, - "end": 2457, + "end": 2441, "ctxt": 0 }, "value": "t", @@ -5694,7 +5694,7 @@ "type": "Identifier", "span": { "start": 2459, - "end": 2468, + "end": 2460, "ctxt": 0 }, "value": "n", @@ -6086,7 +6086,7 @@ "type": "Identifier", "span": { "start": 2670, - "end": 2695, + "end": 2671, "ctxt": 0 }, "value": "t", @@ -6195,7 +6195,7 @@ "type": "Identifier", "span": { "start": 2697, - "end": 2706, + "end": 2698, "ctxt": 0 }, "value": "n", @@ -6587,7 +6587,7 @@ "type": "Identifier", "span": { "start": 2964, - "end": 2981, + "end": 2965, "ctxt": 0 }, "value": "t", @@ -6999,7 +6999,7 @@ "type": "Identifier", "span": { "start": 3177, - "end": 3202, + "end": 3178, "ctxt": 0 }, "value": "t", @@ -8198,7 +8198,7 @@ "type": "Identifier", "span": { "start": 3987, - "end": 4022, + "end": 3988, "ctxt": 0 }, "value": "t", @@ -8605,7 +8605,7 @@ "type": "Identifier", "span": { "start": 4203, - "end": 4212, + "end": 4204, "ctxt": 0 }, "value": "a", @@ -8802,7 +8802,7 @@ "type": "Identifier", "span": { "start": 4295, - "end": 4299, + "end": 4296, "ctxt": 0 }, "value": "u", @@ -8848,7 +8848,7 @@ "type": "Identifier", "span": { "start": 4301, - "end": 4305, + "end": 4302, "ctxt": 0 }, "value": "v", @@ -9360,7 +9360,7 @@ "type": "Identifier", "span": { "start": 4513, - "end": 4522, + "end": 4514, "ctxt": 0 }, "value": "a", @@ -9566,7 +9566,7 @@ "type": "Identifier", "span": { "start": 4605, - "end": 4609, + "end": 4606, "ctxt": 0 }, "value": "u", @@ -9612,7 +9612,7 @@ "type": "Identifier", "span": { "start": 4611, - "end": 4615, + "end": 4612, "ctxt": 0 }, "value": "v", @@ -10124,7 +10124,7 @@ "type": "Identifier", "span": { "start": 4859, - "end": 4884, + "end": 4860, "ctxt": 0 }, "value": "x", @@ -10213,7 +10213,7 @@ "type": "Identifier", "span": { "start": 4886, - "end": 4903, + "end": 4887, "ctxt": 0 }, "value": "y", @@ -10304,7 +10304,7 @@ "type": "Identifier", "span": { "start": 4905, - "end": 4922, + "end": 4906, "ctxt": 0 }, "value": "z", @@ -10748,7 +10748,7 @@ "type": "Identifier", "span": { "start": 5237, - "end": 5241, + "end": 5238, "ctxt": 0 }, "value": "t", @@ -10794,7 +10794,7 @@ "type": "Identifier", "span": { "start": 5243, - "end": 5252, + "end": 5244, "ctxt": 0 }, "value": "m", @@ -10867,7 +10867,7 @@ "type": "Identifier", "span": { "start": 5254, - "end": 5272, + "end": 5255, "ctxt": 0 }, "value": "r", @@ -11261,7 +11261,7 @@ "type": "Identifier", "span": { "start": 5408, - "end": 5412, + "end": 5409, "ctxt": 0 }, "value": "t", @@ -11307,7 +11307,7 @@ "type": "Identifier", "span": { "start": 5414, - "end": 5423, + "end": 5415, "ctxt": 0 }, "value": "m", @@ -11380,7 +11380,7 @@ "type": "Identifier", "span": { "start": 5425, - "end": 5443, + "end": 5426, "ctxt": 0 }, "value": "r", @@ -11783,7 +11783,7 @@ "type": "Identifier", "span": { "start": 5592, - "end": 5597, + "end": 5594, "ctxt": 0 }, "value": "t0", @@ -11829,7 +11829,7 @@ "type": "Identifier", "span": { "start": 5599, - "end": 5609, + "end": 5601, "ctxt": 0 }, "value": "t1", @@ -11902,7 +11902,7 @@ "type": "Identifier", "span": { "start": 5611, - "end": 5621, + "end": 5613, "ctxt": 0 }, "value": "t2", @@ -12328,7 +12328,7 @@ "type": "Identifier", "span": { "start": 5781, - "end": 5786, + "end": 5783, "ctxt": 0 }, "value": "t0", @@ -12374,7 +12374,7 @@ "type": "Identifier", "span": { "start": 5788, - "end": 5798, + "end": 5790, "ctxt": 0 }, "value": "t1", @@ -12447,7 +12447,7 @@ "type": "Identifier", "span": { "start": 5800, - "end": 5810, + "end": 5802, "ctxt": 0 }, "value": "t2", @@ -12882,7 +12882,7 @@ "type": "Identifier", "span": { "start": 5971, - "end": 5982, + "end": 5973, "ctxt": 0 }, "value": "k0", @@ -12937,7 +12937,7 @@ "type": "Identifier", "span": { "start": 5984, - "end": 6000, + "end": 5986, "ctxt": 0 }, "value": "k1", @@ -13019,7 +13019,7 @@ "type": "Identifier", "span": { "start": 6002, - "end": 6018, + "end": 6004, "ctxt": 0 }, "value": "k2", @@ -13101,7 +13101,7 @@ "type": "Identifier", "span": { "start": 6020, - "end": 6042, + "end": 6022, "ctxt": 0 }, "value": "k3", @@ -13704,7 +13704,7 @@ "type": "Identifier", "span": { "start": 6287, - "end": 6308, + "end": 6288, "ctxt": 0 }, "value": "x", @@ -13777,7 +13777,7 @@ "type": "Identifier", "span": { "start": 6310, - "end": 6325, + "end": 6311, "ctxt": 0 }, "value": "y", @@ -14019,7 +14019,7 @@ "type": "Identifier", "span": { "start": 6383, - "end": 6404, + "end": 6384, "ctxt": 0 }, "value": "x", @@ -14092,7 +14092,7 @@ "type": "Identifier", "span": { "start": 6406, - "end": 6421, + "end": 6407, "ctxt": 0 }, "value": "y", @@ -14353,7 +14353,7 @@ "type": "Identifier", "span": { "start": 6474, - "end": 6495, + "end": 6475, "ctxt": 0 }, "value": "x", @@ -14426,7 +14426,7 @@ "type": "Identifier", "span": { "start": 6497, - "end": 6512, + "end": 6498, "ctxt": 0 }, "value": "y", @@ -22046,7 +22046,7 @@ "type": "Identifier", "span": { "start": 9888, - "end": 9919, + "end": 9889, "ctxt": 0 }, "value": "f", @@ -24073,7 +24073,7 @@ "type": "Identifier", "span": { "start": 11137, - "end": 11168, + "end": 11138, "ctxt": 0 }, "value": "f", @@ -24252,7 +24252,7 @@ "type": "Identifier", "span": { "start": 11170, - "end": 11179, + "end": 11171, "ctxt": 0 }, "value": "t", @@ -24325,7 +24325,7 @@ "type": "Identifier", "span": { "start": 11181, - "end": 11190, + "end": 11182, "ctxt": 0 }, "value": "u", @@ -24607,7 +24607,7 @@ "type": "Identifier", "span": { "start": 11245, - "end": 11254, + "end": 11246, "ctxt": 0 }, "value": "a", @@ -24643,7 +24643,7 @@ "type": "Identifier", "span": { "start": 11256, - "end": 11265, + "end": 11257, "ctxt": 0 }, "value": "b", @@ -24679,7 +24679,7 @@ "type": "Identifier", "span": { "start": 11267, - "end": 11277, + "end": 11268, "ctxt": 0 }, "value": "c", @@ -24978,7 +24978,7 @@ "type": "Identifier", "span": { "start": 11485, - "end": 11495, + "end": 11487, "ctxt": 0 }, "value": "t1", @@ -25051,7 +25051,7 @@ "type": "Identifier", "span": { "start": 11497, - "end": 11516, + "end": 11499, "ctxt": 0 }, "value": "t2", @@ -26289,7 +26289,7 @@ "type": "Identifier", "span": { "start": 11950, - "end": 11971, + "end": 11954, "ctxt": 0 }, "value": "args", @@ -26497,7 +26497,7 @@ "type": "Identifier", "span": { "start": 12011, - "end": 12032, + "end": 12015, "ctxt": 0 }, "value": "args", @@ -26930,7 +26930,7 @@ "type": "Identifier", "span": { "start": 12207, - "end": 12227, + "end": 12211, "ctxt": 0 }, "value": "args", @@ -27130,7 +27130,7 @@ "type": "Identifier", "span": { "start": 12280, - "end": 12292, + "end": 12284, "ctxt": 0 }, "value": "args", @@ -27312,7 +27312,7 @@ "type": "Identifier", "span": { "start": 12332, - "end": 12352, + "end": 12336, "ctxt": 0 }, "value": "args", @@ -27956,7 +27956,7 @@ "type": "Identifier", "span": { "start": 12640, - "end": 12667, + "end": 12644, "ctxt": 0 }, "value": "this", @@ -28631,7 +28631,7 @@ "type": "Identifier", "span": { "start": 12861, - "end": 12871, + "end": 12863, "ctxt": 0 }, "value": "id", @@ -28667,7 +28667,7 @@ "type": "Identifier", "span": { "start": 12873, - "end": 12897, + "end": 12880, "ctxt": 0 }, "value": "options", @@ -28788,7 +28788,7 @@ "type": "Identifier", "span": { "start": 12937, - "end": 12947, + "end": 12939, "ctxt": 0 }, "value": "id", @@ -28824,7 +28824,7 @@ "type": "Identifier", "span": { "start": 12949, - "end": 12962, + "end": 12954, "ctxt": 0 }, "value": "orgId", @@ -28860,7 +28860,7 @@ "type": "Identifier", "span": { "start": 12964, - "end": 13001, + "end": 12971, "ctxt": 0 }, "value": "options", @@ -29022,7 +29022,7 @@ "type": "Identifier", "span": { "start": 13064, - "end": 13102, + "end": 13070, "ctxt": 0 }, "value": "method", diff --git a/crates/swc_ecma_parser/tests/tsc/variance.json b/crates/swc_ecma_parser/tests/tsc/variance.json index 1859dc8490ed..89d9669a33f4 100644 --- a/crates/swc_ecma_parser/tests/tsc/variance.json +++ b/crates/swc_ecma_parser/tests/tsc/variance.json @@ -650,7 +650,7 @@ "type": "Identifier", "span": { "start": 398, - "end": 445, + "end": 403, "ctxt": 0 }, "value": "_name", diff --git a/crates/swc_ecma_parser/tests/tsc/voidParamAssignmentCompatibility.json b/crates/swc_ecma_parser/tests/tsc/voidParamAssignmentCompatibility.json index 0936fad5ca43..259a296a0113 100644 --- a/crates/swc_ecma_parser/tests/tsc/voidParamAssignmentCompatibility.json +++ b/crates/swc_ecma_parser/tests/tsc/voidParamAssignmentCompatibility.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 37, - "end": 44, + "end": 38, "ctxt": 0 }, "value": "a", @@ -246,7 +246,7 @@ "type": "Identifier", "span": { "start": 108, - "end": 116, + "end": 113, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/tsc/wideningTuples1.json b/crates/swc_ecma_parser/tests/tsc/wideningTuples1.json index ab6ed63a9edc..15700e1a9a69 100644 --- a/crates/swc_ecma_parser/tests/tsc/wideningTuples1.json +++ b/crates/swc_ecma_parser/tests/tsc/wideningTuples1.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 62, - "end": 66, + "end": 63, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/witness.json b/crates/swc_ecma_parser/tests/tsc/witness.json index 01ae1e88d5b6..1fda3b0310db 100644 --- a/crates/swc_ecma_parser/tests/tsc/witness.json +++ b/crates/swc_ecma_parser/tests/tsc/witness.json @@ -2519,7 +2519,7 @@ "type": "Identifier", "span": { "start": 1140, - "end": 1156, + "end": 1141, "ctxt": 0 }, "value": "x", @@ -2565,7 +2565,7 @@ "type": "Identifier", "span": { "start": 1158, - "end": 1167, + "end": 1159, "ctxt": 0 }, "value": "y", @@ -2649,7 +2649,7 @@ "type": "Identifier", "span": { "start": 1183, - "end": 1199, + "end": 1184, "ctxt": 0 }, "value": "n", @@ -2686,7 +2686,7 @@ "type": "Identifier", "span": { "start": 1201, - "end": 1210, + "end": 1202, "ctxt": 0 }, "value": "m", @@ -2824,7 +2824,7 @@ "type": "Identifier", "span": { "start": 1266, - "end": 1290, + "end": 1267, "ctxt": 0 }, "value": "x", @@ -2848,7 +2848,7 @@ "type": "Identifier", "span": { "start": 1270, - "end": 1279, + "end": 1271, "ctxt": 0 }, "value": "n", @@ -2949,7 +2949,7 @@ "type": "Identifier", "span": { "start": 1320, - "end": 1344, + "end": 1321, "ctxt": 0 }, "value": "x", @@ -2973,7 +2973,7 @@ "type": "Identifier", "span": { "start": 1324, - "end": 1333, + "end": 1325, "ctxt": 0 }, "value": "n", @@ -3074,7 +3074,7 @@ "type": "Identifier", "span": { "start": 1374, - "end": 1392, + "end": 1375, "ctxt": 0 }, "value": "x", @@ -3098,7 +3098,7 @@ "type": "Identifier", "span": { "start": 1378, - "end": 1384, + "end": 1379, "ctxt": 0 }, "value": "n", diff --git a/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints.json b/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints.json index f42d1ecead4b..d49f337c1b56 100644 --- a/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 73, - "end": 80, + "end": 77, "ctxt": 0 }, "value": "data", @@ -137,7 +137,7 @@ "type": "Identifier", "span": { "start": 107, - "end": 111, + "end": 108, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints2.json b/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints2.json index 1aa67f9bcf22..54d883596627 100644 --- a/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints2.json +++ b/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints2.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 52, - "end": 56, + "end": 53, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints3.json b/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints3.json index 74bbd47b0dfa..b8e02bfb2185 100644 --- a/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints3.json +++ b/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints3.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 80, - "end": 84, + "end": 81, "ctxt": 0 }, "value": "x", @@ -134,7 +134,7 @@ "type": "Identifier", "span": { "start": 111, - "end": 115, + "end": 112, "ctxt": 0 }, "value": "x", @@ -209,7 +209,7 @@ "type": "Identifier", "span": { "start": 153, - "end": 157, + "end": 154, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints4.json b/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints4.json index f5a0ce4c6427..cfa393a8da79 100644 --- a/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints4.json +++ b/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints4.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 57, - "end": 61, + "end": 58, "ctxt": 0 }, "value": "x", @@ -134,7 +134,7 @@ "type": "Identifier", "span": { "start": 88, - "end": 92, + "end": 89, "ctxt": 0 }, "value": "x", @@ -209,7 +209,7 @@ "type": "Identifier", "span": { "start": 130, - "end": 134, + "end": 131, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/typescript-errors/class/parameter-properties/input.ts.swc-stderr b/crates/swc_ecma_parser/tests/typescript-errors/class/parameter-properties/input.ts.swc-stderr index 9964a55b8896..88f50c82f302 100644 --- a/crates/swc_ecma_parser/tests/typescript-errors/class/parameter-properties/input.ts.swc-stderr +++ b/crates/swc_ecma_parser/tests/typescript-errors/class/parameter-properties/input.ts.swc-stderr @@ -3,6 +3,6 @@ ,-[$DIR/tests/typescript-errors/class/parameter-properties/input.ts:9:1] 9 | readonly x = 0, 10 | public y?: number = 0) {} - : ^^^^^^^^^^ + : ^ 11 | } `---- diff --git a/crates/swc_ecma_parser/tests/typescript/arrow-function/async-generic/input.ts.json b/crates/swc_ecma_parser/tests/typescript/arrow-function/async-generic/input.ts.json index bfd735501e74..519994448a46 100644 --- a/crates/swc_ecma_parser/tests/typescript/arrow-function/async-generic/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/arrow-function/async-generic/input.ts.json @@ -25,7 +25,7 @@ "type": "Identifier", "span": { "start": 11, - "end": 15, + "end": 12, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/typescript/class/constructor-with-modifier-names/input.ts.json b/crates/swc_ecma_parser/tests/typescript/class/constructor-with-modifier-names/input.ts.json index daacce4cf81a..01d02232ee01 100644 --- a/crates/swc_ecma_parser/tests/typescript/class/constructor-with-modifier-names/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/class/constructor-with-modifier-names/input.ts.json @@ -127,7 +127,7 @@ "type": "Identifier", "span": { "start": 59, - "end": 67, + "end": 62, "ctxt": 0 }, "value": "set", @@ -163,7 +163,7 @@ "type": "Identifier", "span": { "start": 69, - "end": 86, + "end": 77, "ctxt": 0 }, "value": "readonly", diff --git a/crates/swc_ecma_parser/tests/typescript/class/constructor/input.ts.json b/crates/swc_ecma_parser/tests/typescript/class/constructor/input.ts.json index d507d0150f36..b9595ac6ca0a 100644 --- a/crates/swc_ecma_parser/tests/typescript/class/constructor/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/class/constructor/input.ts.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 27, - "end": 36, + "end": 28, "ctxt": 0 }, "value": "x", @@ -92,7 +92,7 @@ "type": "Identifier", "span": { "start": 38, - "end": 47, + "end": 39, "ctxt": 0 }, "value": "y", @@ -151,7 +151,7 @@ "type": "Identifier", "span": { "start": 66, - "end": 75, + "end": 67, "ctxt": 0 }, "value": "x", @@ -187,7 +187,7 @@ "type": "Identifier", "span": { "start": 77, - "end": 86, + "end": 78, "ctxt": 0 }, "value": "y", @@ -246,7 +246,7 @@ "type": "Identifier", "span": { "start": 105, - "end": 111, + "end": 106, "ctxt": 0 }, "value": "x", @@ -282,7 +282,7 @@ "type": "Identifier", "span": { "start": 113, - "end": 119, + "end": 114, "ctxt": 0 }, "value": "y", diff --git a/crates/swc_ecma_parser/tests/typescript/class/decorators/input.ts.json b/crates/swc_ecma_parser/tests/typescript/class/decorators/input.ts.json index 35a99a200e80..21b225333155 100644 --- a/crates/swc_ecma_parser/tests/typescript/class/decorators/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/class/decorators/input.ts.json @@ -97,7 +97,7 @@ "type": "Identifier", "span": { "start": 44, - "end": 57, + "end": 49, "ctxt": 0 }, "value": "param", diff --git a/crates/swc_ecma_parser/tests/typescript/class/method-generic/input.ts.json b/crates/swc_ecma_parser/tests/typescript/class/method-generic/input.ts.json index cd17609015f0..c60066bc1c33 100644 --- a/crates/swc_ecma_parser/tests/typescript/class/method-generic/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/class/method-generic/input.ts.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 20, - "end": 24, + "end": 21, "ctxt": 0 }, "value": "a", @@ -103,7 +103,7 @@ "type": "Identifier", "span": { "start": 26, - "end": 31, + "end": 27, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/typescript/class/override-parameter-property/input.ts.json b/crates/swc_ecma_parser/tests/typescript/class/override-parameter-property/input.ts.json index 3c0609cdf122..155f4393e6f6 100644 --- a/crates/swc_ecma_parser/tests/typescript/class/override-parameter-property/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/class/override-parameter-property/input.ts.json @@ -56,7 +56,7 @@ "type": "Identifier", "span": { "start": 35, - "end": 49, + "end": 43, "ctxt": 0 }, "value": "override", @@ -128,7 +128,7 @@ "type": "Identifier", "span": { "start": 74, - "end": 83, + "end": 75, "ctxt": 0 }, "value": "v", @@ -190,7 +190,7 @@ "type": "Identifier", "span": { "start": 115, - "end": 124, + "end": 116, "ctxt": 0 }, "value": "v", @@ -252,7 +252,7 @@ "type": "Identifier", "span": { "start": 158, - "end": 168, + "end": 159, "ctxt": 0 }, "value": "v", @@ -311,7 +311,7 @@ "type": "Identifier", "span": { "start": 184, - "end": 192, + "end": 187, "ctxt": 0 }, "value": "arg", diff --git a/crates/swc_ecma_parser/tests/typescript/custom/arrow/complex-tsc/input.ts.json b/crates/swc_ecma_parser/tests/typescript/custom/arrow/complex-tsc/input.ts.json index d3e2ada60cc9..ac554742ecda 100644 --- a/crates/swc_ecma_parser/tests/typescript/custom/arrow/complex-tsc/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/custom/arrow/complex-tsc/input.ts.json @@ -181,7 +181,7 @@ "type": "Identifier", "span": { "start": 104, - "end": 114, + "end": 108, "ctxt": 0 }, "value": "node", diff --git a/crates/swc_ecma_parser/tests/typescript/custom/arrow/complex/input.ts.json b/crates/swc_ecma_parser/tests/typescript/custom/arrow/complex/input.ts.json index bed0c04f7d7a..0dcd78b843d9 100644 --- a/crates/swc_ecma_parser/tests/typescript/custom/arrow/complex/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/custom/arrow/complex/input.ts.json @@ -39,7 +39,7 @@ "type": "Identifier", "span": { "start": 50, - "end": 100, + "end": 68, "ctxt": 0 }, "value": "tsConfigSourceFile", @@ -104,7 +104,7 @@ "type": "Identifier", "span": { "start": 102, - "end": 117, + "end": 109, "ctxt": 0 }, "value": "propKey", @@ -140,7 +140,7 @@ "type": "Identifier", "span": { "start": 119, - "end": 139, + "end": 131, "ctxt": 0 }, "value": "elementValue", diff --git a/crates/swc_ecma_parser/tests/typescript/custom/default-followed-by-type/function/input.ts.json b/crates/swc_ecma_parser/tests/typescript/custom/default-followed-by-type/function/input.ts.json index 000cdf9a53e7..d29133dc8dcb 100644 --- a/crates/swc_ecma_parser/tests/typescript/custom/default-followed-by-type/function/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/custom/default-followed-by-type/function/input.ts.json @@ -39,7 +39,7 @@ "type": "Identifier", "span": { "start": 15, - "end": 31, + "end": 23, "ctxt": 0 }, "value": "greeting", @@ -86,7 +86,7 @@ "type": "Identifier", "span": { "start": 43, - "end": 57, + "end": 49, "ctxt": 0 }, "value": "target", diff --git a/crates/swc_ecma_parser/tests/typescript/custom/issue-236/input.ts.json b/crates/swc_ecma_parser/tests/typescript/custom/issue-236/input.ts.json index db17f8ec5ccc..3a63e8ae1e4a 100644 --- a/crates/swc_ecma_parser/tests/typescript/custom/issue-236/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/custom/issue-236/input.ts.json @@ -39,7 +39,7 @@ "type": "Identifier", "span": { "start": 53, - "end": 62, + "end": 57, "ctxt": 0 }, "value": "this", @@ -75,7 +75,7 @@ "type": "Identifier", "span": { "start": 64, - "end": 86, + "end": 70, "ctxt": 0 }, "value": "$scope", @@ -134,7 +134,7 @@ "type": "Identifier", "span": { "start": 88, - "end": 115, + "end": 94, "ctxt": 0 }, "value": "$attrs", diff --git a/crates/swc_ecma_parser/tests/typescript/custom/issue-496/input.ts.json b/crates/swc_ecma_parser/tests/typescript/custom/issue-496/input.ts.json index d37b2ac1750a..0799b3c36872 100644 --- a/crates/swc_ecma_parser/tests/typescript/custom/issue-496/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/custom/issue-496/input.ts.json @@ -108,7 +108,7 @@ "type": "Identifier", "span": { "start": 63, - "end": 75, + "end": 70, "ctxt": 0 }, "value": "variant", diff --git a/crates/swc_ecma_parser/tests/typescript/custom/issue-717/input.ts.json b/crates/swc_ecma_parser/tests/typescript/custom/issue-717/input.ts.json index 72efedd2f6b1..1e231042b7b1 100644 --- a/crates/swc_ecma_parser/tests/typescript/custom/issue-717/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/custom/issue-717/input.ts.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 24, - "end": 38, + "end": 29, "ctxt": 0 }, "value": "async", diff --git a/crates/swc_ecma_parser/tests/typescript/deno-discord/2021-02-17/case1/input.tsx.json b/crates/swc_ecma_parser/tests/typescript/deno-discord/2021-02-17/case1/input.tsx.json index 7d44a0786b40..5c9b99298aa1 100644 --- a/crates/swc_ecma_parser/tests/typescript/deno-discord/2021-02-17/case1/input.tsx.json +++ b/crates/swc_ecma_parser/tests/typescript/deno-discord/2021-02-17/case1/input.tsx.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 69, - "end": 81, + "end": 73, "ctxt": 0 }, "value": "name", @@ -68,7 +68,7 @@ "type": "Identifier", "span": { "start": 87, - "end": 99, + "end": 91, "ctxt": 0 }, "value": "path", diff --git a/crates/swc_ecma_parser/tests/typescript/deno-discord/2021-02-17/case2/input.tsx.json b/crates/swc_ecma_parser/tests/typescript/deno-discord/2021-02-17/case2/input.tsx.json index fa4cdbd2837b..c294f6e12f9b 100644 --- a/crates/swc_ecma_parser/tests/typescript/deno-discord/2021-02-17/case2/input.tsx.json +++ b/crates/swc_ecma_parser/tests/typescript/deno-discord/2021-02-17/case2/input.tsx.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 83, - "end": 95, + "end": 87, "ctxt": 0 }, "value": "name", @@ -93,7 +93,7 @@ "type": "Identifier", "span": { "start": 105, - "end": 117, + "end": 109, "ctxt": 0 }, "value": "path", diff --git a/crates/swc_ecma_parser/tests/typescript/deno/dso/reflect/input.ts.json b/crates/swc_ecma_parser/tests/typescript/deno/dso/reflect/input.ts.json index 5b6571ea7ce2..cd84e57d2020 100644 --- a/crates/swc_ecma_parser/tests/typescript/deno/dso/reflect/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/deno/dso/reflect/input.ts.json @@ -626,7 +626,7 @@ "type": "Identifier", "span": { "start": 1192, - "end": 1203, + "end": 1197, "ctxt": 0 }, "value": "value", @@ -732,7 +732,7 @@ "type": "Identifier", "span": { "start": 1240, - "end": 1250, + "end": 1245, "ctxt": 0 }, "value": "value", @@ -838,7 +838,7 @@ "type": "Identifier", "span": { "start": 1288, - "end": 1297, + "end": 1293, "ctxt": 0 }, "value": "value", @@ -1506,7 +1506,7 @@ "type": "Identifier", "span": { "start": 1591, - "end": 1597, + "end": 1594, "ctxt": 0 }, "value": "key", @@ -1584,7 +1584,7 @@ "type": "Identifier", "span": { "start": 1621, - "end": 1627, + "end": 1624, "ctxt": 0 }, "value": "key", @@ -1672,7 +1672,7 @@ "type": "Identifier", "span": { "start": 1645, - "end": 1651, + "end": 1648, "ctxt": 0 }, "value": "key", @@ -1709,7 +1709,7 @@ "type": "Identifier", "span": { "start": 1653, - "end": 1662, + "end": 1658, "ctxt": 0 }, "value": "value", @@ -1786,7 +1786,7 @@ "type": "Identifier", "span": { "start": 1686, - "end": 1692, + "end": 1689, "ctxt": 0 }, "value": "key", @@ -2649,7 +2649,7 @@ "type": "Identifier", "span": { "start": 2067, - "end": 2075, + "end": 2072, "ctxt": 0 }, "value": "value", @@ -2727,7 +2727,7 @@ "type": "Identifier", "span": { "start": 2099, - "end": 2107, + "end": 2104, "ctxt": 0 }, "value": "value", @@ -2804,7 +2804,7 @@ "type": "Identifier", "span": { "start": 2131, - "end": 2139, + "end": 2136, "ctxt": 0 }, "value": "value", @@ -3581,7 +3581,7 @@ "type": "Identifier", "span": { "start": 2489, - "end": 2495, + "end": 2492, "ctxt": 0 }, "value": "key", @@ -3659,7 +3659,7 @@ "type": "Identifier", "span": { "start": 2519, - "end": 2525, + "end": 2522, "ctxt": 0 }, "value": "key", @@ -3747,7 +3747,7 @@ "type": "Identifier", "span": { "start": 2543, - "end": 2549, + "end": 2546, "ctxt": 0 }, "value": "key", @@ -3825,7 +3825,7 @@ "type": "Identifier", "span": { "start": 2573, - "end": 2579, + "end": 2576, "ctxt": 0 }, "value": "key", @@ -3862,7 +3862,7 @@ "type": "Identifier", "span": { "start": 2581, - "end": 2590, + "end": 2586, "ctxt": 0 }, "value": "value", @@ -4318,7 +4318,7 @@ "type": "Identifier", "span": { "start": 2806, - "end": 2820, + "end": 2812, "ctxt": 0 }, "value": "target", @@ -4355,7 +4355,7 @@ "type": "Identifier", "span": { "start": 2830, - "end": 2858, + "end": 2841, "ctxt": 0 }, "value": "propertyKey", @@ -4401,7 +4401,7 @@ "type": "Identifier", "span": { "start": 2868, - "end": 2907, + "end": 2878, "ctxt": 0 }, "value": "descriptor", @@ -5130,7 +5130,7 @@ "type": "Identifier", "span": { "start": 3835, - "end": 3863, + "end": 3845, "ctxt": 0 }, "value": "decorators", @@ -5184,7 +5184,7 @@ "type": "Identifier", "span": { "start": 3873, - "end": 3889, + "end": 3879, "ctxt": 0 }, "value": "target", @@ -5291,7 +5291,7 @@ "type": "Identifier", "span": { "start": 5367, - "end": 5418, + "end": 5377, "ctxt": 0 }, "value": "decorators", @@ -5382,7 +5382,7 @@ "type": "Identifier", "span": { "start": 5428, - "end": 5439, + "end": 5434, "ctxt": 0 }, "value": "target", @@ -5418,7 +5418,7 @@ "type": "Identifier", "span": { "start": 5449, - "end": 5477, + "end": 5460, "ctxt": 0 }, "value": "propertyKey", @@ -5473,7 +5473,7 @@ "type": "Identifier", "span": { "start": 5487, - "end": 5525, + "end": 5497, "ctxt": 0 }, "value": "attributes", @@ -5618,7 +5618,7 @@ "type": "Identifier", "span": { "start": 7025, - "end": 7076, + "end": 7035, "ctxt": 0 }, "value": "decorators", @@ -5709,7 +5709,7 @@ "type": "Identifier", "span": { "start": 7086, - "end": 7097, + "end": 7092, "ctxt": 0 }, "value": "target", @@ -5745,7 +5745,7 @@ "type": "Identifier", "span": { "start": 7107, - "end": 7135, + "end": 7118, "ctxt": 0 }, "value": "propertyKey", @@ -5800,7 +5800,7 @@ "type": "Identifier", "span": { "start": 7145, - "end": 7175, + "end": 7155, "ctxt": 0 }, "value": "attributes", @@ -5907,7 +5907,7 @@ "type": "Identifier", "span": { "start": 8498, - "end": 8514, + "end": 8509, "ctxt": 0 }, "value": "metadataKey", @@ -5943,7 +5943,7 @@ "type": "Identifier", "span": { "start": 8524, - "end": 8542, + "end": 8537, "ctxt": 0 }, "value": "metadataValue", @@ -6005,7 +6005,7 @@ "type": "Identifier", "span": { "start": 8562, - "end": 8578, + "end": 8568, "ctxt": 0 }, "value": "target", @@ -6070,7 +6070,7 @@ "type": "Identifier", "span": { "start": 8596, - "end": 8607, + "end": 8602, "ctxt": 0 }, "value": "target", @@ -6097,7 +6097,7 @@ "type": "Identifier", "span": { "start": 8609, - "end": 8637, + "end": 8620, "ctxt": 0 }, "value": "propertyKey", @@ -6197,7 +6197,7 @@ "type": "Identifier", "span": { "start": 9398, - "end": 9414, + "end": 9409, "ctxt": 0 }, "value": "metadataKey", @@ -6233,7 +6233,7 @@ "type": "Identifier", "span": { "start": 9424, - "end": 9442, + "end": 9437, "ctxt": 0 }, "value": "metadataValue", @@ -6269,7 +6269,7 @@ "type": "Identifier", "span": { "start": 9452, - "end": 9463, + "end": 9458, "ctxt": 0 }, "value": "target", @@ -6356,7 +6356,7 @@ "type": "Identifier", "span": { "start": 10983, - "end": 10999, + "end": 10994, "ctxt": 0 }, "value": "metadataKey", @@ -6392,7 +6392,7 @@ "type": "Identifier", "span": { "start": 11009, - "end": 11027, + "end": 11022, "ctxt": 0 }, "value": "metadataValue", @@ -6428,7 +6428,7 @@ "type": "Identifier", "span": { "start": 11037, - "end": 11048, + "end": 11043, "ctxt": 0 }, "value": "target", @@ -6464,7 +6464,7 @@ "type": "Identifier", "span": { "start": 11058, - "end": 11086, + "end": 11069, "ctxt": 0 }, "value": "propertyKey", @@ -6570,7 +6570,7 @@ "type": "Identifier", "span": { "start": 11713, - "end": 11729, + "end": 11724, "ctxt": 0 }, "value": "metadataKey", @@ -6606,7 +6606,7 @@ "type": "Identifier", "span": { "start": 11731, - "end": 11742, + "end": 11737, "ctxt": 0 }, "value": "target", @@ -6693,7 +6693,7 @@ "type": "Identifier", "span": { "start": 13115, - "end": 13131, + "end": 13126, "ctxt": 0 }, "value": "metadataKey", @@ -6729,7 +6729,7 @@ "type": "Identifier", "span": { "start": 13141, - "end": 13152, + "end": 13147, "ctxt": 0 }, "value": "target", @@ -6765,7 +6765,7 @@ "type": "Identifier", "span": { "start": 13162, - "end": 13190, + "end": 13173, "ctxt": 0 }, "value": "propertyKey", @@ -6871,7 +6871,7 @@ "type": "Identifier", "span": { "start": 13789, - "end": 13805, + "end": 13800, "ctxt": 0 }, "value": "metadataKey", @@ -6907,7 +6907,7 @@ "type": "Identifier", "span": { "start": 13815, - "end": 13826, + "end": 13821, "ctxt": 0 }, "value": "target", @@ -6994,7 +6994,7 @@ "type": "Identifier", "span": { "start": 15174, - "end": 15190, + "end": 15185, "ctxt": 0 }, "value": "metadataKey", @@ -7030,7 +7030,7 @@ "type": "Identifier", "span": { "start": 15200, - "end": 15211, + "end": 15206, "ctxt": 0 }, "value": "target", @@ -7066,7 +7066,7 @@ "type": "Identifier", "span": { "start": 15221, - "end": 15249, + "end": 15232, "ctxt": 0 }, "value": "propertyKey", @@ -7172,7 +7172,7 @@ "type": "Identifier", "span": { "start": 15836, - "end": 15852, + "end": 15847, "ctxt": 0 }, "value": "metadataKey", @@ -7208,7 +7208,7 @@ "type": "Identifier", "span": { "start": 15854, - "end": 15865, + "end": 15860, "ctxt": 0 }, "value": "target", @@ -7295,7 +7295,7 @@ "type": "Identifier", "span": { "start": 17191, - "end": 17207, + "end": 17202, "ctxt": 0 }, "value": "metadataKey", @@ -7331,7 +7331,7 @@ "type": "Identifier", "span": { "start": 17217, - "end": 17228, + "end": 17223, "ctxt": 0 }, "value": "target", @@ -7367,7 +7367,7 @@ "type": "Identifier", "span": { "start": 17238, - "end": 17266, + "end": 17249, "ctxt": 0 }, "value": "propertyKey", @@ -7473,7 +7473,7 @@ "type": "Identifier", "span": { "start": 17832, - "end": 17848, + "end": 17843, "ctxt": 0 }, "value": "metadataKey", @@ -7509,7 +7509,7 @@ "type": "Identifier", "span": { "start": 17850, - "end": 17861, + "end": 17856, "ctxt": 0 }, "value": "target", @@ -7596,7 +7596,7 @@ "type": "Identifier", "span": { "start": 19179, - "end": 19195, + "end": 19190, "ctxt": 0 }, "value": "metadataKey", @@ -7632,7 +7632,7 @@ "type": "Identifier", "span": { "start": 19205, - "end": 19216, + "end": 19211, "ctxt": 0 }, "value": "target", @@ -7668,7 +7668,7 @@ "type": "Identifier", "span": { "start": 19226, - "end": 19254, + "end": 19237, "ctxt": 0 }, "value": "propertyKey", @@ -7774,7 +7774,7 @@ "type": "Identifier", "span": { "start": 19692, - "end": 19703, + "end": 19698, "ctxt": 0 }, "value": "target", @@ -7869,7 +7869,7 @@ "type": "Identifier", "span": { "start": 20835, - "end": 20846, + "end": 20841, "ctxt": 0 }, "value": "target", @@ -7905,7 +7905,7 @@ "type": "Identifier", "span": { "start": 20856, - "end": 20884, + "end": 20867, "ctxt": 0 }, "value": "propertyKey", @@ -8019,7 +8019,7 @@ "type": "Identifier", "span": { "start": 21314, - "end": 21325, + "end": 21320, "ctxt": 0 }, "value": "target", @@ -8114,7 +8114,7 @@ "type": "Identifier", "span": { "start": 22456, - "end": 22467, + "end": 22462, "ctxt": 0 }, "value": "target", @@ -8150,7 +8150,7 @@ "type": "Identifier", "span": { "start": 22477, - "end": 22505, + "end": 22488, "ctxt": 0 }, "value": "propertyKey", @@ -8264,7 +8264,7 @@ "type": "Identifier", "span": { "start": 23075, - "end": 23091, + "end": 23086, "ctxt": 0 }, "value": "metadataKey", @@ -8300,7 +8300,7 @@ "type": "Identifier", "span": { "start": 23101, - "end": 23112, + "end": 23107, "ctxt": 0 }, "value": "target", @@ -8387,7 +8387,7 @@ "type": "Identifier", "span": { "start": 24433, - "end": 24449, + "end": 24444, "ctxt": 0 }, "value": "metadataKey", @@ -8423,7 +8423,7 @@ "type": "Identifier", "span": { "start": 24459, - "end": 24470, + "end": 24465, "ctxt": 0 }, "value": "target", @@ -8459,7 +8459,7 @@ "type": "Identifier", "span": { "start": 24480, - "end": 24508, + "end": 24491, "ctxt": 0 }, "value": "propertyKey", @@ -8569,7 +8569,7 @@ "type": "Identifier", "span": { "start": 24551, - "end": 24560, + "end": 24555, "ctxt": 0 }, "value": "this", @@ -8605,7 +8605,7 @@ "type": "Identifier", "span": { "start": 24570, - "end": 24743, + "end": 24577, "ctxt": 0 }, "value": "factory", @@ -8629,7 +8629,7 @@ "type": "Identifier", "span": { "start": 24593, - "end": 24724, + "end": 24601, "ctxt": 0 }, "value": "exporter", @@ -8653,7 +8653,7 @@ "type": "Identifier", "span": { "start": 24653, - "end": 24659, + "end": 24656, "ctxt": 0 }, "value": "key", @@ -8690,7 +8690,7 @@ "type": "Identifier", "span": { "start": 24677, - "end": 24701, + "end": 24682, "ctxt": 0 }, "value": "value", @@ -9509,7 +9509,7 @@ "type": "Identifier", "span": { "start": 25316, - "end": 25338, + "end": 25322, "ctxt": 0 }, "value": "target", @@ -9555,7 +9555,7 @@ "type": "Identifier", "span": { "start": 25352, - "end": 25484, + "end": 25360, "ctxt": 0 }, "value": "previous", @@ -9579,7 +9579,7 @@ "type": "Identifier", "span": { "start": 25413, - "end": 25419, + "end": 25416, "ctxt": 0 }, "value": "key", @@ -9616,7 +9616,7 @@ "type": "Identifier", "span": { "start": 25437, - "end": 25461, + "end": 25442, "ctxt": 0 }, "value": "value", @@ -13864,7 +13864,7 @@ "type": "Identifier", "span": { "start": 28932, - "end": 28960, + "end": 28942, "ctxt": 0 }, "value": "decorators", @@ -13918,7 +13918,7 @@ "type": "Identifier", "span": { "start": 28962, - "end": 28978, + "end": 28968, "ctxt": 0 }, "value": "target", @@ -14017,7 +14017,7 @@ "type": "Identifier", "span": { "start": 29030, - "end": 29081, + "end": 29040, "ctxt": 0 }, "value": "decorators", @@ -14108,7 +14108,7 @@ "type": "Identifier", "span": { "start": 29095, - "end": 29106, + "end": 29101, "ctxt": 0 }, "value": "target", @@ -14144,7 +14144,7 @@ "type": "Identifier", "span": { "start": 29120, - "end": 29148, + "end": 29131, "ctxt": 0 }, "value": "propertyKey", @@ -14199,7 +14199,7 @@ "type": "Identifier", "span": { "start": 29162, - "end": 29200, + "end": 29172, "ctxt": 0 }, "value": "attributes", @@ -14336,7 +14336,7 @@ "type": "Identifier", "span": { "start": 29284, - "end": 29335, + "end": 29294, "ctxt": 0 }, "value": "decorators", @@ -14427,7 +14427,7 @@ "type": "Identifier", "span": { "start": 29349, - "end": 29360, + "end": 29355, "ctxt": 0 }, "value": "target", @@ -14463,7 +14463,7 @@ "type": "Identifier", "span": { "start": 29374, - "end": 29402, + "end": 29385, "ctxt": 0 }, "value": "propertyKey", @@ -14518,7 +14518,7 @@ "type": "Identifier", "span": { "start": 29416, - "end": 29446, + "end": 29426, "ctxt": 0 }, "value": "attributes", @@ -14617,7 +14617,7 @@ "type": "Identifier", "span": { "start": 31264, - "end": 31312, + "end": 31274, "ctxt": 0 }, "value": "decorators", @@ -14708,7 +14708,7 @@ "type": "Identifier", "span": { "start": 31326, - "end": 31337, + "end": 31332, "ctxt": 0 }, "value": "target", @@ -14744,7 +14744,7 @@ "type": "Identifier", "span": { "start": 31351, - "end": 31380, + "end": 31362, "ctxt": 0 }, "value": "propertyKey", @@ -14799,7 +14799,7 @@ "type": "Identifier", "span": { "start": 31394, - "end": 31432, + "end": 31404, "ctxt": 0 }, "value": "attributes", @@ -15980,7 +15980,7 @@ "type": "Identifier", "span": { "start": 34161, - "end": 34177, + "end": 34172, "ctxt": 0 }, "value": "metadataKey", @@ -16016,7 +16016,7 @@ "type": "Identifier", "span": { "start": 34179, - "end": 34197, + "end": 34192, "ctxt": 0 }, "value": "metadataValue", @@ -16081,7 +16081,7 @@ "type": "Identifier", "span": { "start": 34232, - "end": 34248, + "end": 34238, "ctxt": 0 }, "value": "target", @@ -16170,7 +16170,7 @@ "type": "Identifier", "span": { "start": 34288, - "end": 34299, + "end": 34294, "ctxt": 0 }, "value": "target", @@ -16206,7 +16206,7 @@ "type": "Identifier", "span": { "start": 34301, - "end": 34329, + "end": 34312, "ctxt": 0 }, "value": "propertyKey", @@ -16304,7 +16304,7 @@ "type": "Identifier", "span": { "start": 34369, - "end": 34380, + "end": 34375, "ctxt": 0 }, "value": "target", @@ -16340,7 +16340,7 @@ "type": "Identifier", "span": { "start": 34382, - "end": 34411, + "end": 34393, "ctxt": 0 }, "value": "propertyKey", @@ -16830,7 +16830,7 @@ "type": "Identifier", "span": { "start": 35128, - "end": 35144, + "end": 35139, "ctxt": 0 }, "value": "metadataKey", @@ -16866,7 +16866,7 @@ "type": "Identifier", "span": { "start": 35158, - "end": 35176, + "end": 35171, "ctxt": 0 }, "value": "metadataValue", @@ -16902,7 +16902,7 @@ "type": "Identifier", "span": { "start": 35190, - "end": 35201, + "end": 35196, "ctxt": 0 }, "value": "target", @@ -16981,7 +16981,7 @@ "type": "Identifier", "span": { "start": 35265, - "end": 35281, + "end": 35276, "ctxt": 0 }, "value": "metadataKey", @@ -17017,7 +17017,7 @@ "type": "Identifier", "span": { "start": 35295, - "end": 35313, + "end": 35308, "ctxt": 0 }, "value": "metadataValue", @@ -17053,7 +17053,7 @@ "type": "Identifier", "span": { "start": 35327, - "end": 35338, + "end": 35333, "ctxt": 0 }, "value": "target", @@ -17089,7 +17089,7 @@ "type": "Identifier", "span": { "start": 35352, - "end": 35380, + "end": 35363, "ctxt": 0 }, "value": "propertyKey", @@ -17187,7 +17187,7 @@ "type": "Identifier", "span": { "start": 37202, - "end": 37218, + "end": 37213, "ctxt": 0 }, "value": "metadataKey", @@ -17223,7 +17223,7 @@ "type": "Identifier", "span": { "start": 37232, - "end": 37250, + "end": 37245, "ctxt": 0 }, "value": "metadataValue", @@ -17259,7 +17259,7 @@ "type": "Identifier", "span": { "start": 37264, - "end": 37275, + "end": 37270, "ctxt": 0 }, "value": "target", @@ -17295,7 +17295,7 @@ "type": "Identifier", "span": { "start": 37289, - "end": 37318, + "end": 37300, "ctxt": 0 }, "value": "propertyKey", @@ -17732,7 +17732,7 @@ "type": "Identifier", "span": { "start": 37899, - "end": 37915, + "end": 37910, "ctxt": 0 }, "value": "metadataKey", @@ -17768,7 +17768,7 @@ "type": "Identifier", "span": { "start": 37917, - "end": 37928, + "end": 37923, "ctxt": 0 }, "value": "target", @@ -17847,7 +17847,7 @@ "type": "Identifier", "span": { "start": 37982, - "end": 37998, + "end": 37993, "ctxt": 0 }, "value": "metadataKey", @@ -17883,7 +17883,7 @@ "type": "Identifier", "span": { "start": 38012, - "end": 38023, + "end": 38018, "ctxt": 0 }, "value": "target", @@ -17919,7 +17919,7 @@ "type": "Identifier", "span": { "start": 38037, - "end": 38065, + "end": 38048, "ctxt": 0 }, "value": "propertyKey", @@ -18017,7 +18017,7 @@ "type": "Identifier", "span": { "start": 39726, - "end": 39742, + "end": 39737, "ctxt": 0 }, "value": "metadataKey", @@ -18053,7 +18053,7 @@ "type": "Identifier", "span": { "start": 39756, - "end": 39767, + "end": 39762, "ctxt": 0 }, "value": "target", @@ -18089,7 +18089,7 @@ "type": "Identifier", "span": { "start": 39781, - "end": 39810, + "end": 39792, "ctxt": 0 }, "value": "propertyKey", @@ -18513,7 +18513,7 @@ "type": "Identifier", "span": { "start": 40297, - "end": 40313, + "end": 40308, "ctxt": 0 }, "value": "metadataKey", @@ -18549,7 +18549,7 @@ "type": "Identifier", "span": { "start": 40315, - "end": 40326, + "end": 40321, "ctxt": 0 }, "value": "target", @@ -18628,7 +18628,7 @@ "type": "Identifier", "span": { "start": 40383, - "end": 40399, + "end": 40394, "ctxt": 0 }, "value": "metadataKey", @@ -18664,7 +18664,7 @@ "type": "Identifier", "span": { "start": 40413, - "end": 40424, + "end": 40419, "ctxt": 0 }, "value": "target", @@ -18700,7 +18700,7 @@ "type": "Identifier", "span": { "start": 40438, - "end": 40466, + "end": 40449, "ctxt": 0 }, "value": "propertyKey", @@ -18798,7 +18798,7 @@ "type": "Identifier", "span": { "start": 42099, - "end": 42115, + "end": 42110, "ctxt": 0 }, "value": "metadataKey", @@ -18834,7 +18834,7 @@ "type": "Identifier", "span": { "start": 42129, - "end": 42140, + "end": 42135, "ctxt": 0 }, "value": "target", @@ -18870,7 +18870,7 @@ "type": "Identifier", "span": { "start": 42154, - "end": 42183, + "end": 42165, "ctxt": 0 }, "value": "propertyKey", @@ -19294,7 +19294,7 @@ "type": "Identifier", "span": { "start": 42670, - "end": 42686, + "end": 42681, "ctxt": 0 }, "value": "metadataKey", @@ -19330,7 +19330,7 @@ "type": "Identifier", "span": { "start": 42688, - "end": 42699, + "end": 42694, "ctxt": 0 }, "value": "target", @@ -19409,7 +19409,7 @@ "type": "Identifier", "span": { "start": 42749, - "end": 42765, + "end": 42760, "ctxt": 0 }, "value": "metadataKey", @@ -19445,7 +19445,7 @@ "type": "Identifier", "span": { "start": 42779, - "end": 42790, + "end": 42785, "ctxt": 0 }, "value": "target", @@ -19481,7 +19481,7 @@ "type": "Identifier", "span": { "start": 42804, - "end": 42832, + "end": 42815, "ctxt": 0 }, "value": "propertyKey", @@ -19579,7 +19579,7 @@ "type": "Identifier", "span": { "start": 44446, - "end": 44462, + "end": 44457, "ctxt": 0 }, "value": "metadataKey", @@ -19615,7 +19615,7 @@ "type": "Identifier", "span": { "start": 44476, - "end": 44487, + "end": 44482, "ctxt": 0 }, "value": "target", @@ -19651,7 +19651,7 @@ "type": "Identifier", "span": { "start": 44501, - "end": 44530, + "end": 44512, "ctxt": 0 }, "value": "propertyKey", @@ -20075,7 +20075,7 @@ "type": "Identifier", "span": { "start": 45013, - "end": 45029, + "end": 45024, "ctxt": 0 }, "value": "metadataKey", @@ -20111,7 +20111,7 @@ "type": "Identifier", "span": { "start": 45031, - "end": 45042, + "end": 45037, "ctxt": 0 }, "value": "target", @@ -20190,7 +20190,7 @@ "type": "Identifier", "span": { "start": 45095, - "end": 45111, + "end": 45106, "ctxt": 0 }, "value": "metadataKey", @@ -20226,7 +20226,7 @@ "type": "Identifier", "span": { "start": 45125, - "end": 45136, + "end": 45131, "ctxt": 0 }, "value": "target", @@ -20262,7 +20262,7 @@ "type": "Identifier", "span": { "start": 45150, - "end": 45178, + "end": 45161, "ctxt": 0 }, "value": "propertyKey", @@ -20360,7 +20360,7 @@ "type": "Identifier", "span": { "start": 46787, - "end": 46803, + "end": 46798, "ctxt": 0 }, "value": "metadataKey", @@ -20396,7 +20396,7 @@ "type": "Identifier", "span": { "start": 46817, - "end": 46828, + "end": 46823, "ctxt": 0 }, "value": "target", @@ -20432,7 +20432,7 @@ "type": "Identifier", "span": { "start": 46842, - "end": 46871, + "end": 46853, "ctxt": 0 }, "value": "propertyKey", @@ -20856,7 +20856,7 @@ "type": "Identifier", "span": { "start": 47353, - "end": 47364, + "end": 47359, "ctxt": 0 }, "value": "target", @@ -20943,7 +20943,7 @@ "type": "Identifier", "span": { "start": 47407, - "end": 47418, + "end": 47413, "ctxt": 0 }, "value": "target", @@ -20979,7 +20979,7 @@ "type": "Identifier", "span": { "start": 47420, - "end": 47448, + "end": 47431, "ctxt": 0 }, "value": "propertyKey", @@ -21085,7 +21085,7 @@ "type": "Identifier", "span": { "start": 48837, - "end": 48848, + "end": 48843, "ctxt": 0 }, "value": "target", @@ -21121,7 +21121,7 @@ "type": "Identifier", "span": { "start": 48862, - "end": 48891, + "end": 48873, "ctxt": 0 }, "value": "propertyKey", @@ -21540,7 +21540,7 @@ "type": "Identifier", "span": { "start": 49367, - "end": 49378, + "end": 49373, "ctxt": 0 }, "value": "target", @@ -21627,7 +21627,7 @@ "type": "Identifier", "span": { "start": 49437, - "end": 49448, + "end": 49443, "ctxt": 0 }, "value": "target", @@ -21663,7 +21663,7 @@ "type": "Identifier", "span": { "start": 49462, - "end": 49490, + "end": 49473, "ctxt": 0 }, "value": "propertyKey", @@ -21769,7 +21769,7 @@ "type": "Identifier", "span": { "start": 50891, - "end": 50902, + "end": 50897, "ctxt": 0 }, "value": "target", @@ -21805,7 +21805,7 @@ "type": "Identifier", "span": { "start": 50916, - "end": 50945, + "end": 50927, "ctxt": 0 }, "value": "propertyKey", @@ -22224,7 +22224,7 @@ "type": "Identifier", "span": { "start": 51436, - "end": 51452, + "end": 51447, "ctxt": 0 }, "value": "metadataKey", @@ -22260,7 +22260,7 @@ "type": "Identifier", "span": { "start": 51454, - "end": 51465, + "end": 51460, "ctxt": 0 }, "value": "target", @@ -22339,7 +22339,7 @@ "type": "Identifier", "span": { "start": 51522, - "end": 51538, + "end": 51533, "ctxt": 0 }, "value": "metadataKey", @@ -22375,7 +22375,7 @@ "type": "Identifier", "span": { "start": 51552, - "end": 51563, + "end": 51558, "ctxt": 0 }, "value": "target", @@ -22411,7 +22411,7 @@ "type": "Identifier", "span": { "start": 51577, - "end": 51605, + "end": 51588, "ctxt": 0 }, "value": "propertyKey", @@ -22509,7 +22509,7 @@ "type": "Identifier", "span": { "start": 53211, - "end": 53227, + "end": 53222, "ctxt": 0 }, "value": "metadataKey", @@ -22545,7 +22545,7 @@ "type": "Identifier", "span": { "start": 53241, - "end": 53252, + "end": 53247, "ctxt": 0 }, "value": "target", @@ -22581,7 +22581,7 @@ "type": "Identifier", "span": { "start": 53266, - "end": 53295, + "end": 53277, "ctxt": 0 }, "value": "propertyKey", @@ -23542,7 +23542,7 @@ "type": "Identifier", "span": { "start": 54119, - "end": 54147, + "end": 54129, "ctxt": 0 }, "value": "decorators", @@ -23596,7 +23596,7 @@ "type": "Identifier", "span": { "start": 54161, - "end": 54177, + "end": 54167, "ctxt": 0 }, "value": "target", @@ -24261,7 +24261,7 @@ "type": "Identifier", "span": { "start": 54676, - "end": 54705, + "end": 54686, "ctxt": 0 }, "value": "decorators", @@ -24315,7 +24315,7 @@ "type": "Identifier", "span": { "start": 54719, - "end": 54730, + "end": 54725, "ctxt": 0 }, "value": "target", @@ -24351,7 +24351,7 @@ "type": "Identifier", "span": { "start": 54744, - "end": 54772, + "end": 54755, "ctxt": 0 }, "value": "propertyKey", @@ -24406,7 +24406,7 @@ "type": "Identifier", "span": { "start": 54786, - "end": 54828, + "end": 54796, "ctxt": 0 }, "value": "descriptor", @@ -25135,7 +25135,7 @@ "type": "Identifier", "span": { "start": 55526, - "end": 55532, + "end": 55527, "ctxt": 0 }, "value": "O", @@ -25171,7 +25171,7 @@ "type": "Identifier", "span": { "start": 55546, - "end": 55576, + "end": 55547, "ctxt": 0 }, "value": "P", @@ -25235,7 +25235,7 @@ "type": "Identifier", "span": { "start": 55590, - "end": 55602, + "end": 55596, "ctxt": 0 }, "value": "Create", @@ -25359,7 +25359,7 @@ "type": "Identifier", "span": { "start": 55683, - "end": 55689, + "end": 55684, "ctxt": 0 }, "value": "O", @@ -25395,7 +25395,7 @@ "type": "Identifier", "span": { "start": 55703, - "end": 55733, + "end": 55704, "ctxt": 0 }, "value": "P", @@ -25459,7 +25459,7 @@ "type": "Identifier", "span": { "start": 55747, - "end": 55760, + "end": 55753, "ctxt": 0 }, "value": "Create", @@ -25602,7 +25602,7 @@ "type": "Identifier", "span": { "start": 55853, - "end": 55859, + "end": 55854, "ctxt": 0 }, "value": "O", @@ -25638,7 +25638,7 @@ "type": "Identifier", "span": { "start": 55873, - "end": 55903, + "end": 55874, "ctxt": 0 }, "value": "P", @@ -25702,7 +25702,7 @@ "type": "Identifier", "span": { "start": 55917, - "end": 55932, + "end": 55923, "ctxt": 0 }, "value": "Create", @@ -26591,7 +26591,7 @@ "type": "Identifier", "span": { "start": 56758, - "end": 56774, + "end": 56769, "ctxt": 0 }, "value": "MetadataKey", @@ -26627,7 +26627,7 @@ "type": "Identifier", "span": { "start": 56788, - "end": 56794, + "end": 56789, "ctxt": 0 }, "value": "O", @@ -26663,7 +26663,7 @@ "type": "Identifier", "span": { "start": 56808, - "end": 56838, + "end": 56809, "ctxt": 0 }, "value": "P", @@ -27110,7 +27110,7 @@ "type": "Identifier", "span": { "start": 57337, - "end": 57353, + "end": 57348, "ctxt": 0 }, "value": "MetadataKey", @@ -27146,7 +27146,7 @@ "type": "Identifier", "span": { "start": 57367, - "end": 57373, + "end": 57368, "ctxt": 0 }, "value": "O", @@ -27182,7 +27182,7 @@ "type": "Identifier", "span": { "start": 57387, - "end": 57417, + "end": 57388, "ctxt": 0 }, "value": "P", @@ -27533,7 +27533,7 @@ "type": "Identifier", "span": { "start": 57831, - "end": 57847, + "end": 57842, "ctxt": 0 }, "value": "MetadataKey", @@ -27569,7 +27569,7 @@ "type": "Identifier", "span": { "start": 57861, - "end": 57867, + "end": 57862, "ctxt": 0 }, "value": "O", @@ -27605,7 +27605,7 @@ "type": "Identifier", "span": { "start": 57881, - "end": 57911, + "end": 57882, "ctxt": 0 }, "value": "P", @@ -28104,7 +28104,7 @@ "type": "Identifier", "span": { "start": 58447, - "end": 58463, + "end": 58458, "ctxt": 0 }, "value": "MetadataKey", @@ -28140,7 +28140,7 @@ "type": "Identifier", "span": { "start": 58477, - "end": 58483, + "end": 58478, "ctxt": 0 }, "value": "O", @@ -28176,7 +28176,7 @@ "type": "Identifier", "span": { "start": 58497, - "end": 58527, + "end": 58498, "ctxt": 0 }, "value": "P", @@ -28504,7 +28504,7 @@ "type": "Identifier", "span": { "start": 58963, - "end": 58979, + "end": 58974, "ctxt": 0 }, "value": "MetadataKey", @@ -28540,7 +28540,7 @@ "type": "Identifier", "span": { "start": 58993, - "end": 59011, + "end": 59006, "ctxt": 0 }, "value": "MetadataValue", @@ -28576,7 +28576,7 @@ "type": "Identifier", "span": { "start": 59025, - "end": 59031, + "end": 59026, "ctxt": 0 }, "value": "O", @@ -28612,7 +28612,7 @@ "type": "Identifier", "span": { "start": 59045, - "end": 59075, + "end": 59046, "ctxt": 0 }, "value": "P", @@ -28892,7 +28892,7 @@ "type": "Identifier", "span": { "start": 59416, - "end": 59422, + "end": 59417, "ctxt": 0 }, "value": "O", @@ -28928,7 +28928,7 @@ "type": "Identifier", "span": { "start": 59436, - "end": 59466, + "end": 59437, "ctxt": 0 }, "value": "P", @@ -30239,7 +30239,7 @@ "type": "Identifier", "span": { "start": 60562, - "end": 60568, + "end": 60563, "ctxt": 0 }, "value": "O", @@ -30275,7 +30275,7 @@ "type": "Identifier", "span": { "start": 60582, - "end": 60612, + "end": 60583, "ctxt": 0 }, "value": "P", @@ -31292,7 +31292,7 @@ "type": "Identifier", "span": { "start": 61646, - "end": 61652, + "end": 61647, "ctxt": 0 }, "value": "x", @@ -32092,7 +32092,7 @@ "type": "Identifier", "span": { "start": 62724, - "end": 62730, + "end": 62725, "ctxt": 0 }, "value": "x", @@ -32244,7 +32244,7 @@ "type": "Identifier", "span": { "start": 62935, - "end": 62941, + "end": 62936, "ctxt": 0 }, "value": "x", @@ -32394,7 +32394,7 @@ "type": "Identifier", "span": { "start": 63142, - "end": 63148, + "end": 63143, "ctxt": 0 }, "value": "x", @@ -32555,7 +32555,7 @@ "type": "Identifier", "span": { "start": 63366, - "end": 63426, + "end": 63367, "ctxt": 0 }, "value": "x", @@ -32905,7 +32905,7 @@ "type": "Identifier", "span": { "start": 63780, - "end": 63790, + "end": 63785, "ctxt": 0 }, "value": "input", @@ -32941,7 +32941,7 @@ "type": "Identifier", "span": { "start": 63804, - "end": 63823, + "end": 63817, "ctxt": 0 }, "value": "PreferredType", @@ -34132,7 +34132,7 @@ "type": "Identifier", "span": { "start": 65116, - "end": 65122, + "end": 65117, "ctxt": 0 }, "value": "O", @@ -34168,7 +34168,7 @@ "type": "Identifier", "span": { "start": 65136, - "end": 65161, + "end": 65140, "ctxt": 0 }, "value": "hint", @@ -35501,7 +35501,7 @@ "type": "Identifier", "span": { "start": 66338, - "end": 66351, + "end": 66346, "ctxt": 0 }, "value": "argument", @@ -35625,7 +35625,7 @@ "type": "Identifier", "span": { "start": 66525, - "end": 66538, + "end": 66533, "ctxt": 0 }, "value": "argument", @@ -35750,7 +35750,7 @@ "type": "Identifier", "span": { "start": 66729, - "end": 66742, + "end": 66737, "ctxt": 0 }, "value": "argument", @@ -36057,7 +36057,7 @@ "type": "Identifier", "span": { "start": 67156, - "end": 67169, + "end": 67164, "ctxt": 0 }, "value": "argument", @@ -36449,7 +36449,7 @@ "type": "Identifier", "span": { "start": 67580, - "end": 67593, + "end": 67588, "ctxt": 0 }, "value": "argument", @@ -36620,7 +36620,7 @@ "type": "Identifier", "span": { "start": 67909, - "end": 67922, + "end": 67917, "ctxt": 0 }, "value": "argument", @@ -36791,7 +36791,7 @@ "type": "Identifier", "span": { "start": 68243, - "end": 68256, + "end": 68251, "ctxt": 0 }, "value": "argument", @@ -37107,7 +37107,7 @@ "type": "Identifier", "span": { "start": 68767, - "end": 68773, + "end": 68768, "ctxt": 0 }, "value": "V", @@ -37143,7 +37143,7 @@ "type": "Identifier", "span": { "start": 68775, - "end": 68781, + "end": 68776, "ctxt": 0 }, "value": "P", @@ -37518,7 +37518,7 @@ "type": "Identifier", "span": { "start": 69160, - "end": 69176, + "end": 69163, "ctxt": 0 }, "value": "obj", @@ -38055,7 +38055,7 @@ "type": "Identifier", "span": { "start": 69615, - "end": 69644, + "end": 69625, "ctxt": 0 }, "value": "iterResult", @@ -38259,7 +38259,7 @@ "type": "Identifier", "span": { "start": 69832, - "end": 69853, + "end": 69840, "ctxt": 0 }, "value": "iterator", @@ -38615,7 +38615,7 @@ "type": "Identifier", "span": { "start": 70136, - "end": 70157, + "end": 70144, "ctxt": 0 }, "value": "iterator", @@ -38904,7 +38904,7 @@ "type": "Identifier", "span": { "start": 70573, - "end": 70579, + "end": 70574, "ctxt": 0 }, "value": "O", @@ -40046,7 +40046,7 @@ "type": "Identifier", "span": { "start": 72689, - "end": 72695, + "end": 72692, "ctxt": 0 }, "value": "key", @@ -40083,7 +40083,7 @@ "type": "Identifier", "span": { "start": 72697, - "end": 72705, + "end": 72702, "ctxt": 0 }, "value": "value", @@ -40187,7 +40187,7 @@ "type": "Identifier", "span": { "start": 72741, - "end": 72750, + "end": 72745, "ctxt": 0 }, "value": "keys", @@ -40241,7 +40241,7 @@ "type": "Identifier", "span": { "start": 72752, - "end": 72763, + "end": 72758, "ctxt": 0 }, "value": "values", @@ -40295,7 +40295,7 @@ "type": "Identifier", "span": { "start": 72765, - "end": 72798, + "end": 72773, "ctxt": 0 }, "value": "selector", @@ -40319,7 +40319,7 @@ "type": "Identifier", "span": { "start": 72776, - "end": 72782, + "end": 72779, "ctxt": 0 }, "value": "key", @@ -40356,7 +40356,7 @@ "type": "Identifier", "span": { "start": 72784, - "end": 72792, + "end": 72789, "ctxt": 0 }, "value": "value", @@ -41683,7 +41683,7 @@ "type": "Identifier", "span": { "start": 73974, - "end": 73984, + "end": 73979, "ctxt": 0 }, "value": "error", @@ -42071,7 +42071,7 @@ "type": "Identifier", "span": { "start": 74295, - "end": 74304, + "end": 74300, "ctxt": 0 }, "value": "value", @@ -43156,7 +43156,7 @@ "type": "Identifier", "span": { "start": 74979, - "end": 74985, + "end": 74982, "ctxt": 0 }, "value": "key", @@ -43355,7 +43355,7 @@ "type": "Identifier", "span": { "start": 75103, - "end": 75109, + "end": 75106, "ctxt": 0 }, "value": "key", @@ -43695,7 +43695,7 @@ "type": "Identifier", "span": { "start": 75308, - "end": 75314, + "end": 75311, "ctxt": 0 }, "value": "key", @@ -43741,7 +43741,7 @@ "type": "Identifier", "span": { "start": 75316, - "end": 75324, + "end": 75321, "ctxt": 0 }, "value": "value", @@ -44039,7 +44039,7 @@ "type": "Identifier", "span": { "start": 75525, - "end": 75531, + "end": 75528, "ctxt": 0 }, "value": "key", @@ -46063,7 +46063,7 @@ "type": "Identifier", "span": { "start": 77149, - "end": 77155, + "end": 77152, "ctxt": 0 }, "value": "key", @@ -46109,7 +46109,7 @@ "type": "Identifier", "span": { "start": 77157, - "end": 77173, + "end": 77163, "ctxt": 0 }, "value": "insert", @@ -46841,7 +46841,7 @@ "type": "Identifier", "span": { "start": 77699, - "end": 77705, + "end": 77702, "ctxt": 0 }, "value": "key", @@ -46887,7 +46887,7 @@ "type": "Identifier", "span": { "start": 77707, - "end": 77711, + "end": 77708, "ctxt": 0 }, "value": "_", @@ -47042,7 +47042,7 @@ "type": "Identifier", "span": { "start": 77794, - "end": 77798, + "end": 77795, "ctxt": 0 }, "value": "_", @@ -47088,7 +47088,7 @@ "type": "Identifier", "span": { "start": 77800, - "end": 77808, + "end": 77805, "ctxt": 0 }, "value": "value", @@ -47243,7 +47243,7 @@ "type": "Identifier", "span": { "start": 77893, - "end": 77899, + "end": 77896, "ctxt": 0 }, "value": "key", @@ -47289,7 +47289,7 @@ "type": "Identifier", "span": { "start": 77901, - "end": 77909, + "end": 77906, "ctxt": 0 }, "value": "value", @@ -47810,7 +47810,7 @@ "type": "Identifier", "span": { "start": 78263, - "end": 78271, + "end": 78268, "ctxt": 0 }, "value": "value", @@ -47996,7 +47996,7 @@ "type": "Identifier", "span": { "start": 78371, - "end": 78379, + "end": 78376, "ctxt": 0 }, "value": "value", @@ -48251,7 +48251,7 @@ "type": "Identifier", "span": { "start": 78494, - "end": 78502, + "end": 78499, "ctxt": 0 }, "value": "value", @@ -49436,7 +49436,7 @@ "type": "Identifier", "span": { "start": 79497, - "end": 79506, + "end": 79503, "ctxt": 0 }, "value": "target", @@ -49787,7 +49787,7 @@ "type": "Identifier", "span": { "start": 79733, - "end": 79742, + "end": 79739, "ctxt": 0 }, "value": "target", @@ -50149,7 +50149,7 @@ "type": "Identifier", "span": { "start": 80015, - "end": 80024, + "end": 80021, "ctxt": 0 }, "value": "target", @@ -50195,7 +50195,7 @@ "type": "Identifier", "span": { "start": 80026, - "end": 80034, + "end": 80031, "ctxt": 0 }, "value": "value", @@ -50563,7 +50563,7 @@ "type": "Identifier", "span": { "start": 80260, - "end": 80269, + "end": 80266, "ctxt": 0 }, "value": "target", @@ -51398,7 +51398,7 @@ "type": "Identifier", "span": { "start": 81004, - "end": 81013, + "end": 81010, "ctxt": 0 }, "value": "target", @@ -51444,7 +51444,7 @@ "type": "Identifier", "span": { "start": 81015, - "end": 81027, + "end": 81021, "ctxt": 0 }, "value": "create", @@ -51591,7 +51591,7 @@ "type": "Identifier", "span": { "start": 81127, - "end": 81136, + "end": 81133, "ctxt": 0 }, "value": "target", @@ -51637,7 +51637,7 @@ "type": "Identifier", "span": { "start": 81138, - "end": 81151, + "end": 81144, "ctxt": 0 }, "value": "create", @@ -51803,7 +51803,7 @@ "type": "Identifier", "span": { "start": 81263, - "end": 81272, + "end": 81269, "ctxt": 0 }, "value": "target", @@ -51849,7 +51849,7 @@ "type": "Identifier", "span": { "start": 81274, - "end": 81289, + "end": 81280, "ctxt": 0 }, "value": "create", @@ -52379,7 +52379,7 @@ "type": "Identifier", "span": { "start": 81679, - "end": 81697, + "end": 81685, "ctxt": 0 }, "value": "buffer", @@ -52425,7 +52425,7 @@ "type": "Identifier", "span": { "start": 81699, - "end": 81711, + "end": 81703, "ctxt": 0 }, "value": "size", @@ -52777,7 +52777,7 @@ "type": "Identifier", "span": { "start": 81896, - "end": 81908, + "end": 81900, "ctxt": 0 }, "value": "size", @@ -54403,7 +54403,7 @@ "type": "Identifier", "span": { "start": 83285, - "end": 83291, + "end": 83288, "ctxt": 0 }, "value": "obj", diff --git a/crates/swc_ecma_parser/tests/typescript/es2019/from-entries/input.ts.json b/crates/swc_ecma_parser/tests/typescript/es2019/from-entries/input.ts.json index e55c4b1a0f59..d041acd7ade3 100644 --- a/crates/swc_ecma_parser/tests/typescript/es2019/from-entries/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/es2019/from-entries/input.ts.json @@ -59,7 +59,7 @@ "type": "Identifier", "span": { "start": 57, - "end": 101, + "end": 64, "ctxt": 0 }, "value": "entries", @@ -323,7 +323,7 @@ "type": "Identifier", "span": { "start": 147, - "end": 180, + "end": 154, "ctxt": 0 }, "value": "entries", diff --git a/crates/swc_ecma_parser/tests/typescript/function/annotated/input.ts.json b/crates/swc_ecma_parser/tests/typescript/function/annotated/input.ts.json index b46d5b51ec0a..df0495d43888 100644 --- a/crates/swc_ecma_parser/tests/typescript/function/annotated/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/function/annotated/input.ts.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 15, - "end": 20, + "end": 16, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/typescript/function/anonymous/input.ts.json b/crates/swc_ecma_parser/tests/typescript/function/anonymous/input.ts.json index 8c47d5feebb3..a75103822b19 100644 --- a/crates/swc_ecma_parser/tests/typescript/function/anonymous/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/function/anonymous/input.ts.json @@ -50,7 +50,7 @@ "type": "Identifier", "span": { "start": 23, - "end": 28, + "end": 24, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/typescript/function/export-default/input.ts.json b/crates/swc_ecma_parser/tests/typescript/function/export-default/input.ts.json index e7df1fd6b1ac..46000928415c 100644 --- a/crates/swc_ecma_parser/tests/typescript/function/export-default/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/function/export-default/input.ts.json @@ -29,7 +29,7 @@ "type": "Identifier", "span": { "start": 25, - "end": 35, + "end": 26, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/typescript/function/overloads/input.ts.json b/crates/swc_ecma_parser/tests/typescript/function/overloads/input.ts.json index 7ff1410a6260..e4d1ec30d038 100644 --- a/crates/swc_ecma_parser/tests/typescript/function/overloads/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/function/overloads/input.ts.json @@ -39,7 +39,7 @@ "type": "Identifier", "span": { "start": 19, - "end": 28, + "end": 20, "ctxt": 0 }, "value": "x", @@ -126,7 +126,7 @@ "type": "Identifier", "span": { "start": 57, - "end": 66, + "end": 58, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/typescript/function/predicate-types/input.ts.json b/crates/swc_ecma_parser/tests/typescript/function/predicate-types/input.ts.json index eb242dfdbf20..7984b2eee7b3 100644 --- a/crates/swc_ecma_parser/tests/typescript/function/predicate-types/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/function/predicate-types/input.ts.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 12, - "end": 18, + "end": 13, "ctxt": 0 }, "value": "x", @@ -150,7 +150,7 @@ "type": "Identifier", "span": { "start": 47, - "end": 53, + "end": 48, "ctxt": 0 }, "value": "x", @@ -266,7 +266,7 @@ "type": "Identifier", "span": { "start": 84, - "end": 90, + "end": 85, "ctxt": 0 }, "value": "x", @@ -380,7 +380,7 @@ "type": "Identifier", "span": { "start": 128, - "end": 134, + "end": 129, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/typescript/interface/call-signature/input.ts.json b/crates/swc_ecma_parser/tests/typescript/interface/call-signature/input.ts.json index f704580f3ced..2207529f9a34 100644 --- a/crates/swc_ecma_parser/tests/typescript/interface/call-signature/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/interface/call-signature/input.ts.json @@ -46,7 +46,7 @@ "type": "Identifier", "span": { "start": 20, - "end": 29, + "end": 21, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/typescript/interface/construct-signature/input.ts.json b/crates/swc_ecma_parser/tests/typescript/interface/construct-signature/input.ts.json index 2574defcd3ed..437fa78c5240 100644 --- a/crates/swc_ecma_parser/tests/typescript/interface/construct-signature/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/interface/construct-signature/input.ts.json @@ -46,7 +46,7 @@ "type": "Identifier", "span": { "start": 24, - "end": 33, + "end": 25, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/typescript/interface/method-plain/input.ts.json b/crates/swc_ecma_parser/tests/typescript/interface/method-plain/input.ts.json index 7de90770af82..0d8967986e40 100644 --- a/crates/swc_ecma_parser/tests/typescript/interface/method-plain/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/interface/method-plain/input.ts.json @@ -83,7 +83,7 @@ "type": "Identifier", "span": { "start": 30, - "end": 40, + "end": 31, "ctxt": 0 }, "value": "x", diff --git a/crates/swc_ecma_parser/tests/typescript/issue-1299/ts/input.ts.json b/crates/swc_ecma_parser/tests/typescript/issue-1299/ts/input.ts.json index 1a275b00cdbb..f155f6100f57 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-1299/ts/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-1299/ts/input.ts.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 58, - "end": 85, + "end": 64, "ctxt": 0 }, "value": "values", @@ -131,7 +131,7 @@ "type": "Identifier", "span": { "start": 91, - "end": 123, + "end": 98, "ctxt": 0 }, "value": "execute", diff --git a/crates/swc_ecma_parser/tests/typescript/issue-1299/tsx/input.tsx.json b/crates/swc_ecma_parser/tests/typescript/issue-1299/tsx/input.tsx.json index 1a275b00cdbb..f155f6100f57 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-1299/tsx/input.tsx.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-1299/tsx/input.tsx.json @@ -57,7 +57,7 @@ "type": "Identifier", "span": { "start": 58, - "end": 85, + "end": 64, "ctxt": 0 }, "value": "values", @@ -131,7 +131,7 @@ "type": "Identifier", "span": { "start": 91, - "end": 123, + "end": 98, "ctxt": 0 }, "value": "execute", diff --git a/crates/swc_ecma_parser/tests/typescript/issue-1505/case2/input.tsx.json b/crates/swc_ecma_parser/tests/typescript/issue-1505/case2/input.tsx.json index 9595c03342c2..17e637a80d22 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-1505/case2/input.tsx.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-1505/case2/input.tsx.json @@ -1402,7 +1402,7 @@ "type": "Identifier", "span": { "start": 1441, - "end": 1454, + "end": 1446, "ctxt": 0 }, "value": "teams", @@ -1456,7 +1456,7 @@ "type": "Identifier", "span": { "start": 1456, - "end": 1475, + "end": 1464, "ctxt": 0 }, "value": "projects", diff --git a/crates/swc_ecma_parser/tests/typescript/issue-1517/case1/input.ts.json b/crates/swc_ecma_parser/tests/typescript/issue-1517/case1/input.ts.json index dcbb57b50aae..752a4df7d28c 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-1517/case1/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-1517/case1/input.ts.json @@ -96,7 +96,7 @@ "type": "Identifier", "span": { "start": 46, - "end": 64, + "end": 47, "ctxt": 0 }, "value": "v", diff --git a/crates/swc_ecma_parser/tests/typescript/issue-1517/case2/input.ts.json b/crates/swc_ecma_parser/tests/typescript/issue-1517/case2/input.ts.json index 40bc79726ac7..bbd7fae31e49 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-1517/case2/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-1517/case2/input.ts.json @@ -95,7 +95,7 @@ "type": "Identifier", "span": { "start": 43, - "end": 61, + "end": 44, "ctxt": 0 }, "value": "v", diff --git a/crates/swc_ecma_parser/tests/typescript/issue-2343/1/input.ts.json b/crates/swc_ecma_parser/tests/typescript/issue-2343/1/input.ts.json index b47215ff20bb..d2031fd9da5f 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-2343/1/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-2343/1/input.ts.json @@ -39,7 +39,7 @@ "type": "Identifier", "span": { "start": 32, - "end": 44, + "end": 36, "ctxt": 0 }, "value": "some", diff --git a/crates/swc_ecma_parser/tests/typescript/issue-3241/1/input.tsx.json b/crates/swc_ecma_parser/tests/typescript/issue-3241/1/input.tsx.json index 19d457ea3e4f..c6d2dad2cfdf 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-3241/1/input.tsx.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-3241/1/input.tsx.json @@ -283,7 +283,7 @@ "type": "Identifier", "span": { "start": 228, - "end": 237, + "end": 229, "ctxt": 0 }, "value": "a", @@ -319,7 +319,7 @@ "type": "Identifier", "span": { "start": 239, - "end": 248, + "end": 240, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/typescript/issue-6430/index.ts.json b/crates/swc_ecma_parser/tests/typescript/issue-6430/index.ts.json index 9b759039c8a7..64e0f83558d9 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-6430/index.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-6430/index.ts.json @@ -86,7 +86,7 @@ "type": "Identifier", "span": { "start": 124, - "end": 130, + "end": 127, "ctxt": 0 }, "value": "num", @@ -201,7 +201,7 @@ "type": "Identifier", "span": { "start": 163, - "end": 169, + "end": 166, "ctxt": 0 }, "value": "str", @@ -346,7 +346,7 @@ "type": "Identifier", "span": { "start": 218, - "end": 224, + "end": 221, "ctxt": 0 }, "value": "num", @@ -461,7 +461,7 @@ "type": "Identifier", "span": { "start": 261, - "end": 267, + "end": 264, "ctxt": 0 }, "value": "str", @@ -885,7 +885,7 @@ "type": "Identifier", "span": { "start": 404, - "end": 410, + "end": 407, "ctxt": 0 }, "value": "str", @@ -1030,7 +1030,7 @@ "type": "Identifier", "span": { "start": 446, - "end": 457, + "end": 449, "ctxt": 0 }, "value": "num", @@ -1085,7 +1085,7 @@ "type": "Identifier", "span": { "start": 472, - "end": 483, + "end": 475, "ctxt": 0 }, "value": "str", @@ -1170,7 +1170,7 @@ "type": "Identifier", "span": { "start": 533, - "end": 539, + "end": 536, "ctxt": 0 }, "value": "num", @@ -1275,7 +1275,7 @@ "type": "Identifier", "span": { "start": 572, - "end": 578, + "end": 575, "ctxt": 0 }, "value": "str", diff --git a/crates/swc_ecma_parser/tests/typescript/issue-7186/1/input.ts.json b/crates/swc_ecma_parser/tests/typescript/issue-7186/1/input.ts.json index 3054d88283dc..e544b4915a8c 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-7186/1/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-7186/1/input.ts.json @@ -66,7 +66,7 @@ "type": "Identifier", "span": { "start": 58, - "end": 94, + "end": 66, "ctxt": 0 }, "value": "callback", @@ -90,7 +90,7 @@ "type": "Identifier", "span": { "start": 69, - "end": 85, + "end": 76, "ctxt": 0 }, "value": "package", diff --git a/crates/swc_ecma_parser/tests/typescript/issue-7186/2/input.tsx.json b/crates/swc_ecma_parser/tests/typescript/issue-7186/2/input.tsx.json index 3054d88283dc..e544b4915a8c 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-7186/2/input.tsx.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-7186/2/input.tsx.json @@ -66,7 +66,7 @@ "type": "Identifier", "span": { "start": 58, - "end": 94, + "end": 66, "ctxt": 0 }, "value": "callback", @@ -90,7 +90,7 @@ "type": "Identifier", "span": { "start": 69, - "end": 85, + "end": 76, "ctxt": 0 }, "value": "package", diff --git a/crates/swc_ecma_parser/tests/typescript/issue-7187/input.ts.json b/crates/swc_ecma_parser/tests/typescript/issue-7187/input.ts.json index ae027a7231d5..1e3a088a88db 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-7187/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-7187/input.ts.json @@ -65,7 +65,7 @@ "type": "Identifier", "span": { "start": 16, - "end": 22, + "end": 19, "ctxt": 0 }, "value": "key", diff --git a/crates/swc_ecma_parser/tests/typescript/issue-7305/input.ts.json b/crates/swc_ecma_parser/tests/typescript/issue-7305/input.ts.json index fd2fa053ce19..a5b89a6f15e0 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-7305/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-7305/input.ts.json @@ -110,7 +110,7 @@ "type": "Identifier", "span": { "start": 45, - "end": 54, + "end": 51, "ctxt": 0 }, "value": "object", diff --git a/crates/swc_ecma_parser/tests/typescript/issue-8209/input.ts.json b/crates/swc_ecma_parser/tests/typescript/issue-8209/input.ts.json index 4058c2a7d1d0..4f16e4323a83 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-8209/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-8209/input.ts.json @@ -164,7 +164,7 @@ "type": "Identifier", "span": { "start": 58, - "end": 66, + "end": 61, "ctxt": 0 }, "value": "key", diff --git a/crates/swc_ecma_parser/tests/typescript/issue-8581/input.ts.json b/crates/swc_ecma_parser/tests/typescript/issue-8581/input.ts.json index d4839c7153db..9926404063e6 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-8581/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-8581/input.ts.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 17, - "end": 24, + "end": 21, "ctxt": 0 }, "value": "func", @@ -280,7 +280,7 @@ "type": "Identifier", "span": { "start": 56, - "end": 62, + "end": 59, "ctxt": 0 }, "value": "key", @@ -521,7 +521,7 @@ "type": "Identifier", "span": { "start": 100, - "end": 107, + "end": 104, "ctxt": 0 }, "value": "key2", diff --git a/crates/swc_ecma_parser/tests/typescript/issue-8735/1/input.ts.json b/crates/swc_ecma_parser/tests/typescript/issue-8735/1/input.ts.json index 44d43e2a9f2f..f6ffa02e2a3c 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-8735/1/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-8735/1/input.ts.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 29, - "end": 39, + "end": 34, "ctxt": 0 }, "value": "array", diff --git a/crates/swc_ecma_parser/tests/typescript/issue-8735/2/input.tsx.json b/crates/swc_ecma_parser/tests/typescript/issue-8735/2/input.tsx.json index 44d43e2a9f2f..f6ffa02e2a3c 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-8735/2/input.tsx.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-8735/2/input.tsx.json @@ -32,7 +32,7 @@ "type": "Identifier", "span": { "start": 29, - "end": 39, + "end": 34, "ctxt": 0 }, "value": "array", diff --git a/crates/swc_ecma_parser/tests/typescript/issue-913/input.ts.json b/crates/swc_ecma_parser/tests/typescript/issue-913/input.ts.json index 2ad73c00ba28..e51115c972e2 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-913/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-913/input.ts.json @@ -7857,7 +7857,7 @@ "type": "Identifier", "span": { "start": 7153, - "end": 7180, + "end": 7160, "ctxt": 0 }, "value": "request", @@ -7929,7 +7929,7 @@ "type": "Identifier", "span": { "start": 7186, - "end": 7215, + "end": 7194, "ctxt": 0 }, "value": "response", @@ -8216,7 +8216,7 @@ "type": "Identifier", "span": { "start": 7445, - "end": 7472, + "end": 7452, "ctxt": 0 }, "value": "request", @@ -8288,7 +8288,7 @@ "type": "Identifier", "span": { "start": 7478, - "end": 7507, + "end": 7486, "ctxt": 0 }, "value": "response", @@ -8542,7 +8542,7 @@ "type": "Identifier", "span": { "start": 7646, - "end": 7673, + "end": 7653, "ctxt": 0 }, "value": "request", @@ -8614,7 +8614,7 @@ "type": "Identifier", "span": { "start": 7679, - "end": 7708, + "end": 7687, "ctxt": 0 }, "value": "response", diff --git a/crates/swc_ecma_parser/tests/typescript/regression/tsx-issue-7742/input.ts.json b/crates/swc_ecma_parser/tests/typescript/regression/tsx-issue-7742/input.ts.json index 84d9c9ce7f94..457593c98975 100644 --- a/crates/swc_ecma_parser/tests/typescript/regression/tsx-issue-7742/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/regression/tsx-issue-7742/input.ts.json @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 28, - "end": 34, + "end": 31, "ctxt": 0 }, "value": "bar", diff --git a/crates/swc_ecma_parser/tests/typescript/types/conditional-infer-extends/basic/input.ts.json b/crates/swc_ecma_parser/tests/typescript/types/conditional-infer-extends/basic/input.ts.json index 514961436a4f..d464c3160833 100644 --- a/crates/swc_ecma_parser/tests/typescript/types/conditional-infer-extends/basic/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/types/conditional-infer-extends/basic/input.ts.json @@ -548,7 +548,7 @@ "type": "Identifier", "span": { "start": 215, - "end": 240, + "end": 216, "ctxt": 0 }, "value": "a", @@ -724,7 +724,7 @@ "type": "Identifier", "span": { "start": 283, - "end": 308, + "end": 284, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/typescript/types/function-generic/input.ts.json b/crates/swc_ecma_parser/tests/typescript/types/function-generic/input.ts.json index 2a0832fec1f0..7c56eec7bf08 100644 --- a/crates/swc_ecma_parser/tests/typescript/types/function-generic/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/types/function-generic/input.ts.json @@ -51,7 +51,7 @@ "type": "Identifier", "span": { "start": 12, - "end": 16, + "end": 13, "ctxt": 0 }, "value": "a", diff --git a/crates/swc_ecma_parser/tests/typescript/types/function-with-this/input.ts.json b/crates/swc_ecma_parser/tests/typescript/types/function-with-this/input.ts.json index 085bed8f4e03..78bd81d93cb3 100644 --- a/crates/swc_ecma_parser/tests/typescript/types/function-with-this/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/types/function-with-this/input.ts.json @@ -51,7 +51,7 @@ "type": "Identifier", "span": { "start": 9, - "end": 21, + "end": 13, "ctxt": 0 }, "value": "this", diff --git a/crates/swc_ecma_parser/tests/typescript/types/function/input.ts.json b/crates/swc_ecma_parser/tests/typescript/types/function/input.ts.json index 622e431f5427..17ea684edab1 100644 --- a/crates/swc_ecma_parser/tests/typescript/types/function/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/types/function/input.ts.json @@ -51,7 +51,7 @@ "type": "Identifier", "span": { "start": 9, - "end": 18, + "end": 10, "ctxt": 0 }, "value": "a", @@ -78,7 +78,7 @@ "type": "Identifier", "span": { "start": 20, - "end": 30, + "end": 21, "ctxt": 0 }, "value": "b", diff --git a/crates/swc_ecma_parser/tests/typescript/types/object-shorthand/input.ts.json b/crates/swc_ecma_parser/tests/typescript/types/object-shorthand/input.ts.json index 40ca56ebce31..102f8560963d 100644 --- a/crates/swc_ecma_parser/tests/typescript/types/object-shorthand/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/types/object-shorthand/input.ts.json @@ -67,7 +67,7 @@ "type": "Identifier", "span": { "start": 49, - "end": 57, + "end": 54, "ctxt": 0 }, "value": "value", diff --git a/crates/swc_ecma_parser/tests/typescript/variance-annotations/1/input.ts.json b/crates/swc_ecma_parser/tests/typescript/variance-annotations/1/input.ts.json index 11898fd8c1aa..6f653dbde743 100644 --- a/crates/swc_ecma_parser/tests/typescript/variance-annotations/1/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/variance-annotations/1/input.ts.json @@ -449,7 +449,7 @@ "type": "Identifier", "span": { "start": 250, - "end": 254, + "end": 251, "ctxt": 0 }, "value": "x", @@ -838,7 +838,7 @@ "type": "Identifier", "span": { "start": 510, - "end": 514, + "end": 511, "ctxt": 0 }, "value": "x", @@ -1838,7 +1838,7 @@ "type": "Identifier", "span": { "start": 1056, - "end": 1060, + "end": 1057, "ctxt": 0 }, "value": "x", @@ -1997,7 +1997,7 @@ "type": "Identifier", "span": { "start": 1118, - "end": 1122, + "end": 1119, "ctxt": 0 }, "value": "x", @@ -2166,7 +2166,7 @@ "type": "Identifier", "span": { "start": 1178, - "end": 1182, + "end": 1179, "ctxt": 0 }, "value": "x", @@ -2490,7 +2490,7 @@ "type": "Identifier", "span": { "start": 1303, - "end": 1317, + "end": 1306, "ctxt": 0 }, "value": "foo", @@ -2984,7 +2984,7 @@ "type": "Identifier", "span": { "start": 1451, - "end": 1465, + "end": 1454, "ctxt": 0 }, "value": "foo", @@ -3478,7 +3478,7 @@ "type": "Identifier", "span": { "start": 1592, - "end": 1606, + "end": 1595, "ctxt": 0 }, "value": "foo", @@ -4027,7 +4027,7 @@ "type": "Identifier", "span": { "start": 1855, - "end": 1859, + "end": 1856, "ctxt": 0 }, "value": "x", @@ -5192,7 +5192,7 @@ "type": "Identifier", "span": { "start": 2382, - "end": 2395, + "end": 2385, "ctxt": 0 }, "value": "inp", @@ -6211,7 +6211,7 @@ "type": "Identifier", "span": { "start": 2862, - "end": 2890, + "end": 2866, "ctxt": 0 }, "value": "meta", @@ -6333,7 +6333,7 @@ "type": "Identifier", "span": { "start": 2968, - "end": 2996, + "end": 2974, "ctxt": 0 }, "value": "action", @@ -6569,7 +6569,7 @@ "type": "Identifier", "span": { "start": 3058, - "end": 3091, + "end": 3065, "ctxt": 0 }, "value": "machine", diff --git a/crates/swc_ecma_parser/tests/typescript/variance-annotations/with_jsx/input.tsx.json b/crates/swc_ecma_parser/tests/typescript/variance-annotations/with_jsx/input.tsx.json index 11898fd8c1aa..6f653dbde743 100644 --- a/crates/swc_ecma_parser/tests/typescript/variance-annotations/with_jsx/input.tsx.json +++ b/crates/swc_ecma_parser/tests/typescript/variance-annotations/with_jsx/input.tsx.json @@ -449,7 +449,7 @@ "type": "Identifier", "span": { "start": 250, - "end": 254, + "end": 251, "ctxt": 0 }, "value": "x", @@ -838,7 +838,7 @@ "type": "Identifier", "span": { "start": 510, - "end": 514, + "end": 511, "ctxt": 0 }, "value": "x", @@ -1838,7 +1838,7 @@ "type": "Identifier", "span": { "start": 1056, - "end": 1060, + "end": 1057, "ctxt": 0 }, "value": "x", @@ -1997,7 +1997,7 @@ "type": "Identifier", "span": { "start": 1118, - "end": 1122, + "end": 1119, "ctxt": 0 }, "value": "x", @@ -2166,7 +2166,7 @@ "type": "Identifier", "span": { "start": 1178, - "end": 1182, + "end": 1179, "ctxt": 0 }, "value": "x", @@ -2490,7 +2490,7 @@ "type": "Identifier", "span": { "start": 1303, - "end": 1317, + "end": 1306, "ctxt": 0 }, "value": "foo", @@ -2984,7 +2984,7 @@ "type": "Identifier", "span": { "start": 1451, - "end": 1465, + "end": 1454, "ctxt": 0 }, "value": "foo", @@ -3478,7 +3478,7 @@ "type": "Identifier", "span": { "start": 1592, - "end": 1606, + "end": 1595, "ctxt": 0 }, "value": "foo", @@ -4027,7 +4027,7 @@ "type": "Identifier", "span": { "start": 1855, - "end": 1859, + "end": 1856, "ctxt": 0 }, "value": "x", @@ -5192,7 +5192,7 @@ "type": "Identifier", "span": { "start": 2382, - "end": 2395, + "end": 2385, "ctxt": 0 }, "value": "inp", @@ -6211,7 +6211,7 @@ "type": "Identifier", "span": { "start": 2862, - "end": 2890, + "end": 2866, "ctxt": 0 }, "value": "meta", @@ -6333,7 +6333,7 @@ "type": "Identifier", "span": { "start": 2968, - "end": 2996, + "end": 2974, "ctxt": 0 }, "value": "action", @@ -6569,7 +6569,7 @@ "type": "Identifier", "span": { "start": 3058, - "end": 3091, + "end": 3065, "ctxt": 0 }, "value": "machine", From 3de82531b2cf215002d64eb662943d7739164215 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Mon, 15 Apr 2024 05:03:24 +0000 Subject: [PATCH 121/172] chore: Bump crates --- CHANGELOG.md | 11 ++++++++--- Cargo.lock | 4 ++-- crates/swc_core/Cargo.toml | 2 +- crates/swc_ecma_parser/Cargo.toml | 2 +- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99e86f0a24ef..26528b3763bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,12 @@ # Changelog +## [unreleased] + +### Bug Fixes + + + +- **(es/parser)** Fix span of `BindingIdent` ([#8859](https://github.com/swc-project/swc/issues/8859)) ([fbd32fb](https://github.com/swc-project/swc/commit/fbd32fbff323ff4116e82d2dd1d763f7f3844de2)) + ## [1.4.14] - 2024-04-15 ### Bug Fixes @@ -1365,7 +1373,4 @@ - **(es/compat)** Handle nullish in fn expr scope ([#7980](https://github.com/swc-project/swc/issues/7980)) ([5050f58](https://github.com/swc-project/swc/commit/5050f5820a43b8de7a87511070405e189eaafb5f)) - -- **(es/minifier)** Do not inline into a template literal with sequential inliner ([#7971](https://github.com/swc-project/swc/issues/7971)) ([b3d3a7b](https://github.com/swc-project/swc/commit/b3d3a7bc7339776e57ca402e77cf3fb22c774784)) - diff --git a/Cargo.lock b/Cargo.lock index f52c702a07ca..24ba55c36b74 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3935,7 +3935,7 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.90.31" +version = "0.90.32" dependencies = [ "anyhow", "binding_macros", @@ -4509,7 +4509,7 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "0.143.13" +version = "0.143.14" dependencies = [ "criterion", "either", diff --git a/crates/swc_core/Cargo.toml b/crates/swc_core/Cargo.toml index 90963c914062..bbf1a1434df6 100644 --- a/crates/swc_core/Cargo.toml +++ b/crates/swc_core/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_core" repository = "https://github.com/swc-project/swc.git" -version = "0.90.31" +version = "0.90.32" [package.metadata.docs.rs] features = [ "allocator_node", diff --git a/crates/swc_ecma_parser/Cargo.toml b/crates/swc_ecma_parser/Cargo.toml index 1069ea835ad2..1dc24a53c868 100644 --- a/crates/swc_ecma_parser/Cargo.toml +++ b/crates/swc_ecma_parser/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "examples/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_parser" repository = "https://github.com/swc-project/swc.git" -version = "0.143.13" +version = "0.143.14" [package.metadata.docs.rs] all-features = true From 6d240768b11cd6cabd347a54c135cb8937df2240 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Mon, 15 Apr 2024 15:28:11 +0900 Subject: [PATCH 122/172] fix(es/proposal): Update explicit resource management to match spec (#8860) **Related issue:** - Closes #8853 --- .../src/helpers/_using_ctx.js | 76 +++++++++++++++ .../src/helpers/mod.rs | 1 + .../src/explicit_resource_management.rs | 96 ++++++++----------- .../exec-async/issue-8853.js | 40 ++++++++ .../transform-await/issue-8853/input.mjs | 32 +++++++ .../transform-await/issue-8853/output.mjs | 49 ++++++++++ .../transform-await/mixed/output.mjs | 13 ++- .../only-using-await/output.mjs | 11 +-- .../transform-sync/bare-block/output.js | 9 +- .../transform-sync/for-await-head/output.mjs | 7 +- .../transform-sync/for-head/output.js | 7 +- .../transform-sync/function-body/output.js | 9 +- .../transform-sync/if-body/output.js | 9 +- .../transform-sync/issue-8629/output.js | 9 +- .../transform-sync/multiple-nested/output.js | 27 +++--- .../multiple-same-level/output.js | 13 ++- .../transform-sync/static-block/output.js | 9 +- .../await-or-not-preserved/output.mjs | 11 +-- .../hoisting-default-clas-anon/output.mjs | 9 +- .../hoisting-default-class/output.mjs | 9 +- .../hoisting-default-expr/output.mjs | 9 +- .../hoisting-default-fn-anon/output.mjs | 9 +- .../hoisting-default-fn/output.mjs | 9 +- .../transform-top-level/hoisting/output.mjs | 11 +-- packages/helpers/esm/_using_ctx.js | 78 +++++++++++++++ packages/helpers/package.json | 2 +- 26 files changed, 404 insertions(+), 160 deletions(-) create mode 100644 crates/swc_ecma_transforms_base/src/helpers/_using_ctx.js create mode 100644 crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/exec-async/issue-8853.js create mode 100644 crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-await/issue-8853/input.mjs create mode 100644 crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-await/issue-8853/output.mjs create mode 100644 packages/helpers/esm/_using_ctx.js diff --git a/crates/swc_ecma_transforms_base/src/helpers/_using_ctx.js b/crates/swc_ecma_transforms_base/src/helpers/_using_ctx.js new file mode 100644 index 000000000000..5076a16cd877 --- /dev/null +++ b/crates/swc_ecma_transforms_base/src/helpers/_using_ctx.js @@ -0,0 +1,76 @@ +function _using_ctx() { + var _disposeSuppressedError = + typeof SuppressedError === "function" + ? // eslint-disable-next-line no-undef + SuppressedError + : (function (error, suppressed) { + var err = new Error(); + err.name = "SuppressedError"; + err.suppressed = suppressed; + err.error = error; + return err; + }), + empty = {}, + stack = []; + function using(isAwait, value) { + if (value != null) { + if (Object(value) !== value) { + throw new TypeError( + "using declarations can only be used with objects, functions, null, or undefined.", + ); + } + // core-js-pure uses Symbol.for for polyfilling well-known symbols + if (isAwait) { + var dispose = + value[Symbol.asyncDispose || Symbol.for("Symbol.asyncDispose")]; + } + if (dispose == null) { + dispose = value[Symbol.dispose || Symbol.for("Symbol.dispose")]; + } + if (typeof dispose !== "function") { + throw new TypeError(`Property [Symbol.dispose] is not a function.`); + } + stack.push({ v: value, d: dispose, a: isAwait }); + } else if (isAwait) { + // provide the nullish `value` as `d` for minification gain + stack.push({ d: value, a: isAwait }); + } + return value; + } + return { + // error + e: empty, + // using + u: using.bind(null, false), + // await using + a: using.bind(null, true), + // dispose + d: function () { + var error = this.e; + + function next() { + // eslint-disable-next-line @typescript-eslint/no-use-before-define + while ((resource = stack.pop())) { + try { + var resource, + disposalResult = resource.d && resource.d.call(resource.v); + if (resource.a) { + return Promise.resolve(disposalResult).then(next, err); + } + } catch (e) { + return err(e); + } + } + if (error !== empty) throw error; + } + + function err(e) { + error = error !== empty ? new _disposeSuppressedError(error, e) : e; + + return next(); + } + + return next(); + }, + }; +} \ No newline at end of file diff --git a/crates/swc_ecma_transforms_base/src/helpers/mod.rs b/crates/swc_ecma_transforms_base/src/helpers/mod.rs index ed966b27e2d9..691fddef79ce 100644 --- a/crates/swc_ecma_transforms_base/src/helpers/mod.rs +++ b/crates/swc_ecma_transforms_base/src/helpers/mod.rs @@ -384,6 +384,7 @@ define_helpers!(Helpers { identity: (), dispose: (), using: (), + using_ctx: (), }); pub fn inject_helpers(global_mark: Mark) -> impl Fold + VisitMut { diff --git a/crates/swc_ecma_transforms_proposal/src/explicit_resource_management.rs b/crates/swc_ecma_transforms_proposal/src/explicit_resource_management.rs index 625c03b91cf4..5dbc11d28f70 100644 --- a/crates/swc_ecma_transforms_proposal/src/explicit_resource_management.rs +++ b/crates/swc_ecma_transforms_proposal/src/explicit_resource_management.rs @@ -1,9 +1,9 @@ -use std::iter::once; - use swc_common::{util::take::Take, DUMMY_SP}; use swc_ecma_ast::*; use swc_ecma_transforms_base::helper; -use swc_ecma_utils::{find_pat_ids, private_ident, ExprFactory, ModuleItemLike, StmtLike}; +use swc_ecma_utils::{ + find_pat_ids, private_ident, quote_ident, ExprFactory, ModuleItemLike, StmtLike, +}; use swc_ecma_visit::{as_folder, noop_visit_mut_type, Fold, VisitMut, VisitMutWith}; pub fn explicit_resource_management() -> impl Fold + VisitMut { @@ -18,9 +18,7 @@ struct ExplicitResourceManagement { } struct State { - stack: Ident, - has_error: Ident, - error_var: Ident, + using_ctx: Ident, catch_var: Ident, has_await: bool, @@ -29,9 +27,7 @@ struct State { impl Default for State { fn default() -> Self { Self { - stack: private_ident!("_stack"), - has_error: private_ident!("_hasError"), - error_var: private_ident!("_error"), + using_ctx: private_ident!("_usingCtx"), catch_var: private_ident!("_"), has_await: false, } @@ -63,13 +59,15 @@ impl ExplicitResourceManagement { let mut extras = vec![]; let mut try_body = vec![]; - let stack_var_decl = VarDeclarator { + let using_ctx_var = VarDeclarator { span: DUMMY_SP, - name: state.stack.clone().into(), + name: state.using_ctx.clone().into(), init: Some( - ArrayLit { + CallExpr { + callee: helper!(using_ctx), span: DUMMY_SP, - elems: vec![], + args: Default::default(), + type_args: Default::default(), } .into(), ), @@ -80,7 +78,7 @@ impl ExplicitResourceManagement { span: DUMMY_SP, kind: VarDeclKind::Var, declare: false, - decls: vec![stack_var_decl], + decls: vec![using_ctx_var], })))); for stmt in stmts.take() { @@ -88,8 +86,8 @@ impl ExplicitResourceManagement { Ok(stmt @ Stmt::Decl(Decl::Fn(..))) => { new.push(T::from_stmt(stmt)); } - Ok(Stmt::Decl(Decl::Var(mut var))) => { - var.kind = VarDeclKind::Var; + Ok(Stmt::Decl(Decl::Var(var))) => { + // var.kind = VarDeclKind::Var; try_body.push(Stmt::Decl(Decl::Var(var))); } Ok(stmt) => try_body.push(stmt), @@ -310,39 +308,28 @@ impl ExplicitResourceManagement { // Drop `;` try_body.retain(|stmt| !matches!(stmt, Stmt::Empty(..))); - // var error = $catch_var - let error_catch_var = Stmt::Decl(Decl::Var(Box::new(VarDecl { - span: DUMMY_SP, - kind: VarDeclKind::Var, - declare: false, - decls: vec![VarDeclarator { - span: DUMMY_SP, - name: state.error_var.clone().into(), - init: Some(state.catch_var.clone().into()), - definite: false, - }], - }))); - - // var has_error = true - let has_error_true = Stmt::Decl(Decl::Var(Box::new(VarDecl { + // usingCtx.e = $catch_var + let assign_error = AssignExpr { span: DUMMY_SP, - kind: VarDeclKind::Var, - declare: false, - decls: vec![VarDeclarator { - span: DUMMY_SP, - name: state.has_error.clone().into(), - init: Some(true.into()), - definite: false, - }], - }))); + op: op!("="), + left: state + .using_ctx + .clone() + .make_member(quote_ident!("e")) + .into(), + right: state.catch_var.clone().into(), + } + .into_stmt(); + + // _usingCtx.d() let dispose_expr = CallExpr { span: DUMMY_SP, - callee: helper!(dispose), - args: vec![ - state.stack.as_arg(), - state.error_var.as_arg(), - state.has_error.as_arg(), - ], + callee: state + .using_ctx + .clone() + .make_member(quote_ident!("d")) + .as_callee(), + args: vec![], type_args: Default::default(), }; let dispose_stmt = if state.has_await { @@ -366,7 +353,7 @@ impl ExplicitResourceManagement { param: Some(state.catch_var.into()), body: BlockStmt { span: DUMMY_SP, - stmts: vec![error_catch_var, has_error_true], + stmts: vec![assign_error], }, }), finalizer: Some(BlockStmt { @@ -434,15 +421,16 @@ impl VisitMut for ExplicitResourceManagement { .map(|d| { let init = CallExpr { span: decl.span, - callee: helper!(using), - args: once(state.stack.clone().as_arg()) - .chain(once(d.init.unwrap().as_arg())) - .chain(if decl.is_await { - Some(true.as_arg()) + callee: state + .using_ctx + .clone() + .make_member(if decl.is_await { + quote_ident!("a") } else { - None + quote_ident!("u") }) - .collect(), + .as_callee(), + args: vec![d.init.unwrap().as_arg()], type_args: Default::default(), }; diff --git a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/exec-async/issue-8853.js b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/exec-async/issue-8853.js new file mode 100644 index 000000000000..5876957eb2f1 --- /dev/null +++ b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/exec-async/issue-8853.js @@ -0,0 +1,40 @@ +const { deepStrictEqual } = require('node:assert') + +let i = 0 +let err +try { + await using _x1 = { + async [Symbol.asyncDispose || Symbol.for("Symbol.asyncDispose")]() { + throw [1, ++i] + } + } + + await using _x2 = { + async [Symbol.asyncDispose || Symbol.for("Symbol.asyncDispose")]() { + throw [2, ++i] + } + } + + await using _x3 = { + async [Symbol.asyncDispose || Symbol.for("Symbol.asyncDispose")]() { + throw [3, ++i] + } + } + + await using _x4 = { + async [Symbol.asyncDispose || Symbol.for("Symbol.asyncDispose")]() { + throw [4, ++i] + } + } + + throw [5, ++i] +} catch (e) { + err = e +} + +console.log(err) +deepStrictEqual(err.suppressed, [1, 5]) +deepStrictEqual(err.error.suppressed, [2, 4]) +deepStrictEqual(err.error.error.suppressed, [3, 3]) +deepStrictEqual(err.error.error.error.suppressed, [4, 2]) +deepStrictEqual(err.error.error.error.error, [5, 1]) \ No newline at end of file diff --git a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-await/issue-8853/input.mjs b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-await/issue-8853/input.mjs new file mode 100644 index 000000000000..88d6474578a1 --- /dev/null +++ b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-await/issue-8853/input.mjs @@ -0,0 +1,32 @@ + +let i = 0 +let err +try { + await using _x1 = { + async [Symbol.asyncDispose]() { + throw [1, ++i] + } + } + + await using _x2 = { + async [Symbol.asyncDispose]() { + throw [2, ++i] + } + } + + await using _x3 = { + async [Symbol.asyncDispose]() { + throw [3, ++i] + } + } + + await using _x4 = { + async [Symbol.asyncDispose]() { + throw [4, ++i] + } + } + + throw [5, ++i] +} catch (e) { + err = e +} \ No newline at end of file diff --git a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-await/issue-8853/output.mjs b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-await/issue-8853/output.mjs new file mode 100644 index 000000000000..7d8080129a94 --- /dev/null +++ b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-await/issue-8853/output.mjs @@ -0,0 +1,49 @@ +let i = 0; +let err; +try { + try { + var _usingCtx = _using_ctx(); + const _x1 = _usingCtx.a({ + async [Symbol.asyncDispose] () { + throw [ + 1, + ++i + ]; + } + }); + const _x2 = _usingCtx.a({ + async [Symbol.asyncDispose] () { + throw [ + 2, + ++i + ]; + } + }); + const _x3 = _usingCtx.a({ + async [Symbol.asyncDispose] () { + throw [ + 3, + ++i + ]; + } + }); + const _x4 = _usingCtx.a({ + async [Symbol.asyncDispose] () { + throw [ + 4, + ++i + ]; + } + }); + throw [ + 5, + ++i + ]; + } catch (_) { + _usingCtx.e = _; + } finally{ + await _usingCtx.d(); + } +} catch (e) { + err = e; +} diff --git a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-await/mixed/output.mjs b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-await/mixed/output.mjs index 6f2b7f937492..bc88967b14d5 100644 --- a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-await/mixed/output.mjs +++ b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-await/mixed/output.mjs @@ -1,13 +1,12 @@ { try { - var _stack = []; - var a = _using(_stack, 1); - var b = _using(_stack, 2, true); - var c = _using(_stack, 3); + var _usingCtx = _using_ctx(); + const a = _usingCtx.u(1); + const b = _usingCtx.a(2); + const c = _usingCtx.u(3); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } } diff --git a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-await/only-using-await/output.mjs b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-await/only-using-await/output.mjs index 5d4390b9ffbe..ab8caf7f5d1e 100644 --- a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-await/only-using-await/output.mjs +++ b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-await/only-using-await/output.mjs @@ -1,14 +1,13 @@ { try { - var _stack = []; - var x = _using(_stack, obj, true); + var _usingCtx = _using_ctx(); + const x = _usingCtx.a(obj); stmt; - var y = _using(_stack, obj, true), z = _using(_stack, obj, true); + const y = _usingCtx.a(obj), z = _usingCtx.a(obj); doSomethingWith(x, y); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } } diff --git a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/bare-block/output.js b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/bare-block/output.js index 6982b489b611..ae57c226afa8 100644 --- a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/bare-block/output.js +++ b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/bare-block/output.js @@ -1,12 +1,11 @@ { try { - var _stack = []; - var x = _using(_stack, obj); + var _usingCtx = _using_ctx(); + const x = _usingCtx.u(obj); doSomethingWith(x); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } diff --git a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/for-await-head/output.mjs b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/for-await-head/output.mjs index 64e1f0205047..69d1662c66a6 100644 --- a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/for-await-head/output.mjs +++ b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/for-await-head/output.mjs @@ -1,13 +1,12 @@ for await (const x of y){ try { - var _stack = []; + var _usingCtx = _using_ctx(); { doSomethingWith(x); } } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } diff --git a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/for-head/output.js b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/for-head/output.js index 11e7a96f20a0..664ad9129e5e 100644 --- a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/for-head/output.js +++ b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/for-head/output.js @@ -1,13 +1,12 @@ for (const x of y){ try { - var _stack = []; + var _usingCtx = _using_ctx(); { doSomethingWith(x); } } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } diff --git a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/function-body/output.js b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/function-body/output.js index 4330fb187b30..73a4f9acebd4 100644 --- a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/function-body/output.js +++ b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/function-body/output.js @@ -1,12 +1,11 @@ function fn() { try { - var _stack = []; - var x = _using(_stack, obj); + var _usingCtx = _using_ctx(); + const x = _usingCtx.u(obj); return doSomethingWith(x); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } diff --git a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/if-body/output.js b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/if-body/output.js index 41666e989ff9..37a67bf08873 100644 --- a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/if-body/output.js +++ b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/if-body/output.js @@ -1,12 +1,11 @@ if (test) { try { - var _stack = []; - var x = _using(_stack, obj); + var _usingCtx = _using_ctx(); + const x = _usingCtx.u(obj); doSomethingWith(x); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } diff --git a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/issue-8629/output.js b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/issue-8629/output.js index 71f3493adabe..f4bf134efc46 100644 --- a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/issue-8629/output.js +++ b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/issue-8629/output.js @@ -1,19 +1,18 @@ // main.ts var _Disposable; try { - var _stack = []; + var _usingCtx = _using_ctx(); class Disposable { [Symbol.dispose]() { console.log('dispose'); } } _Disposable = Disposable; - var _disposable = _using(_stack, new Disposable()); + var _disposable = _usingCtx.u(new Disposable()); console.log('ok'); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { _Disposable as Disposable }; diff --git a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/multiple-nested/output.js b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/multiple-nested/output.js index 84cc09b386a1..a43a642ea82b 100644 --- a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/multiple-nested/output.js +++ b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/multiple-nested/output.js @@ -1,35 +1,32 @@ { try { - var _stack = []; - var x = _using(_stack, obj); + var _usingCtx = _using_ctx(); + const x = _usingCtx.u(obj); { try { - var _stack1 = []; - var y = _using(_stack1, call(()=>{ + var _usingCtx1 = _using_ctx(); + const y = _usingCtx1.u(call(()=>{ try { - var _stack = []; - var z = _using(_stack, obj); + var _usingCtx = _using_ctx(); + const z = _usingCtx.u(obj); return z; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } })); stmt; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx1.e = _; } finally{ - _dispose(_stack1, _error, _hasError); + _usingCtx1.d(); } } stmt; } catch (_) { - var _error1 = _; - var _hasError1 = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error1, _hasError1); + _usingCtx.d(); } } diff --git a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/multiple-same-level/output.js b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/multiple-same-level/output.js index 8ac894590485..74d1135cdc3f 100644 --- a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/multiple-same-level/output.js +++ b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/multiple-same-level/output.js @@ -1,17 +1,16 @@ { try { - var _stack = []; + var _usingCtx = _using_ctx(); stmt; - var x = _using(_stack, obj); + const x = _usingCtx.u(obj); stmt; - var y = _using(_stack, obj), z = _using(_stack, obj); + const y = _usingCtx.u(obj), z = _usingCtx.u(obj); stmt; - var w = _using(_stack, obj); + const w = _usingCtx.u(obj); doSomethingWith(x, z); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } diff --git a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/static-block/output.js b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/static-block/output.js index cec9c08fbe4e..40822b4ddd8f 100644 --- a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/static-block/output.js +++ b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-sync/static-block/output.js @@ -1,14 +1,13 @@ class A { static{ try { - var _stack = []; - var x = _using(_stack, y); + var _usingCtx = _using_ctx(); + const x = _usingCtx.u(y); doSomethingWith(x); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } } diff --git a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-top-level/await-or-not-preserved/output.mjs b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-top-level/await-or-not-preserved/output.mjs index 1e0a43605140..95ff79d27880 100644 --- a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-top-level/await-or-not-preserved/output.mjs +++ b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-top-level/await-or-not-preserved/output.mjs @@ -1,11 +1,10 @@ export { x, y }; try { - var _stack = []; - var x = _using(_stack, A); - var y = _using(_stack, B, true); + var _usingCtx = _using_ctx(); + var x = _usingCtx.u(A); + var y = _usingCtx.a(B); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } diff --git a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-top-level/hoisting-default-clas-anon/output.mjs b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-top-level/hoisting-default-clas-anon/output.mjs index ece84ba9eeb6..92818dd6f95f 100644 --- a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-top-level/hoisting-default-clas-anon/output.mjs +++ b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-top-level/hoisting-default-clas-anon/output.mjs @@ -1,12 +1,11 @@ export { _default as default }; try { - var _stack = []; - var x = _using(_stack, null); + var _usingCtx = _using_ctx(); + var x = _usingCtx.u(null); var _default = class { }; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-top-level/hoisting-default-class/output.mjs b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-top-level/hoisting-default-class/output.mjs index c71d8b9c7953..34ad7a56f1df 100644 --- a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-top-level/hoisting-default-class/output.mjs +++ b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-top-level/hoisting-default-class/output.mjs @@ -1,12 +1,11 @@ export { C as default }; try { - var _stack = []; - var x = _using(_stack, null); + var _usingCtx = _using_ctx(); + var x = _usingCtx.u(null); var C = class C { }; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-top-level/hoisting-default-expr/output.mjs b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-top-level/hoisting-default-expr/output.mjs index 8a2ecaa8ac0d..682561df4403 100644 --- a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-top-level/hoisting-default-expr/output.mjs +++ b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-top-level/hoisting-default-expr/output.mjs @@ -1,11 +1,10 @@ export { _default as default }; try { - var _stack = []; - var x = _using(_stack, null); + var _usingCtx = _using_ctx(); + var x = _usingCtx.u(null); var _default = doSomething(); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-top-level/hoisting-default-fn-anon/output.mjs b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-top-level/hoisting-default-fn-anon/output.mjs index ebbc6014dd8c..7357daba7ddf 100644 --- a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-top-level/hoisting-default-fn-anon/output.mjs +++ b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-top-level/hoisting-default-fn-anon/output.mjs @@ -1,11 +1,10 @@ export { fn as default }; try { - var _stack = []; - var x = _using(_stack, null); + var _usingCtx = _using_ctx(); + var x = _usingCtx.u(null); var fn = function fn() {}; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-top-level/hoisting-default-fn/output.mjs b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-top-level/hoisting-default-fn/output.mjs index ebbc6014dd8c..7357daba7ddf 100644 --- a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-top-level/hoisting-default-fn/output.mjs +++ b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-top-level/hoisting-default-fn/output.mjs @@ -1,11 +1,10 @@ export { fn as default }; try { - var _stack = []; - var x = _using(_stack, null); + var _usingCtx = _using_ctx(); + var x = _usingCtx.u(null); var fn = function fn() {}; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-top-level/hoisting/output.mjs b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-top-level/hoisting/output.mjs index c4b66aaf50b7..022a0f510e9d 100644 --- a/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-top-level/hoisting/output.mjs +++ b/crates/swc_ecma_transforms_proposal/tests/explicit-resource-management/transform-top-level/hoisting/output.mjs @@ -14,7 +14,7 @@ export { f }; var _b; var _B; try { - var _stack = []; + var _usingCtx = _using_ctx(); function g() { c; } @@ -22,18 +22,17 @@ try { doSomething(); let { b } = {}; _b = b; - var c = 2; + let c = 2; class A { } class B { } _B = B; - var x = _using(_stack, null); + var x = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { _g as g }; export { _b as b }; diff --git a/packages/helpers/esm/_using_ctx.js b/packages/helpers/esm/_using_ctx.js new file mode 100644 index 000000000000..76e6d86e83b9 --- /dev/null +++ b/packages/helpers/esm/_using_ctx.js @@ -0,0 +1,78 @@ +export function _usingCtx() { + var _disposeSuppressedError = + typeof SuppressedError === "function" + ? // eslint-disable-next-line no-undef + SuppressedError + : (function (error, suppressed) { + var err = new Error(); + err.name = "SuppressedError"; + err.suppressed = suppressed; + err.error = error; + return err; + }), + empty = {}, + stack = []; + function using(isAwait, value) { + if (value != null) { + if (Object(value) !== value) { + throw new TypeError( + "using declarations can only be used with objects, functions, null, or undefined.", + ); + } + // core-js-pure uses Symbol.for for polyfilling well-known symbols + if (isAwait) { + var dispose = + value[Symbol.asyncDispose || Symbol.for("Symbol.asyncDispose")]; + } + if (dispose == null) { + dispose = value[Symbol.dispose || Symbol.for("Symbol.dispose")]; + } + if (typeof dispose !== "function") { + throw new TypeError(`Property [Symbol.dispose] is not a function.`); + } + stack.push({ v: value, d: dispose, a: isAwait }); + } else if (isAwait) { + // provide the nullish `value` as `d` for minification gain + stack.push({ d: value, a: isAwait }); + } + return value; + } + return { + // error + e: empty, + // using + u: using.bind(null, false), + // await using + a: using.bind(null, true), + // dispose + d: function () { + var error = this.e; + + function next() { + // eslint-disable-next-line @typescript-eslint/no-use-before-define + while ((resource = stack.pop())) { + try { + var resource, + disposalResult = resource.d && resource.d.call(resource.v); + if (resource.a) { + return Promise.resolve(disposalResult).then(next, err); + } + } catch (e) { + return err(e); + } + } + if (error !== empty) throw error; + } + + function err(e) { + error = error !== empty ? new _disposeSuppressedError(error, e) : e; + + return next(); + } + + return next(); + }, + }; +} + +export { _usingCtx as _ } \ No newline at end of file diff --git a/packages/helpers/package.json b/packages/helpers/package.json index c637a26d182a..986f160c433c 100644 --- a/packages/helpers/package.json +++ b/packages/helpers/package.json @@ -1,7 +1,7 @@ { "name": "@swc/helpers", "packageManager": "yarn@4.0.2", - "version": "0.5.9", + "version": "0.5.10", "description": "External helpers for the swc project.", "module": "esm/index.js", "main": "cjs/index.cjs", From 5f75019683a2f1dc03dda68d6832632ee5d8699c Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Mon, 15 Apr 2024 06:29:53 +0000 Subject: [PATCH 123/172] chore: Bump crates --- CHANGELOG.md | 11 +++-------- Cargo.lock | 4 ++-- crates/swc_ecma_transforms_base/Cargo.toml | 2 +- crates/swc_ecma_transforms_proposal/Cargo.toml | 2 +- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26528b3763bc..f94de998e0f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ - **(es/parser)** Fix span of `BindingIdent` ([#8859](https://github.com/swc-project/swc/issues/8859)) ([fbd32fb](https://github.com/swc-project/swc/commit/fbd32fbff323ff4116e82d2dd1d763f7f3844de2)) + +- **(es/proposal)** Update explicit resource management to match spec ([#8860](https://github.com/swc-project/swc/issues/8860)) ([6d24076](https://github.com/swc-project/swc/commit/6d240768b11cd6cabd347a54c135cb8937df2240)) + ## [1.4.14] - 2024-04-15 ### Bug Fixes @@ -1365,12 +1368,4 @@ - **(bindingins)** Create `@swc/counter` ([#7991](https://github.com/swc-project/swc/issues/7991)) ([0acbb5f](https://github.com/swc-project/swc/commit/0acbb5f78daa52cf505e077993a694eb966368af)) -## [1.3.87] - 2023-09-22 - -### Bug Fixes - - - -- **(es/compat)** Handle nullish in fn expr scope ([#7980](https://github.com/swc-project/swc/issues/7980)) ([5050f58](https://github.com/swc-project/swc/commit/5050f5820a43b8de7a87511070405e189eaafb5f)) - diff --git a/Cargo.lock b/Cargo.lock index 24ba55c36b74..cb46037ac744 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4626,7 +4626,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_base" -version = "0.137.18" +version = "0.137.19" dependencies = [ "better_scoped_tls", "bitflags 2.5.0", @@ -4773,7 +4773,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_proposal" -version = "0.171.21" +version = "0.171.22" dependencies = [ "either", "rustc-hash", diff --git a/crates/swc_ecma_transforms_base/Cargo.toml b/crates/swc_ecma_transforms_base/Cargo.toml index 4694669fbe1d..93083e42c6da 100644 --- a/crates/swc_ecma_transforms_base/Cargo.toml +++ b/crates/swc_ecma_transforms_base/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/**/*.js"] license = "Apache-2.0" name = "swc_ecma_transforms_base" repository = "https://github.com/swc-project/swc.git" -version = "0.137.18" +version = "0.137.19" [lib] bench = false diff --git a/crates/swc_ecma_transforms_proposal/Cargo.toml b/crates/swc_ecma_transforms_proposal/Cargo.toml index c87b91e5fb55..2895e40b4cae 100644 --- a/crates/swc_ecma_transforms_proposal/Cargo.toml +++ b/crates/swc_ecma_transforms_proposal/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_proposal" repository = "https://github.com/swc-project/swc.git" -version = "0.171.21" +version = "0.171.22" [lib] bench = false From 1af84832907619a51f1576836cb14f91c5de5698 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Mon, 15 Apr 2024 22:03:04 +0900 Subject: [PATCH 124/172] chore: Publish `@swc/helpers@v0.5.10` --- packages/helpers/esm/_using_ctx.js | 2 +- packages/helpers/esm/index.js | 1 + packages/helpers/package.json | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/helpers/esm/_using_ctx.js b/packages/helpers/esm/_using_ctx.js index 76e6d86e83b9..5eb4922017e7 100644 --- a/packages/helpers/esm/_using_ctx.js +++ b/packages/helpers/esm/_using_ctx.js @@ -1,4 +1,4 @@ -export function _usingCtx() { +export function _using_ctx() { var _disposeSuppressedError = typeof SuppressedError === "function" ? // eslint-disable-next-line no-undef diff --git a/packages/helpers/esm/index.js b/packages/helpers/esm/index.js index 377b09b19af6..2496bd148657 100644 --- a/packages/helpers/esm/index.js +++ b/packages/helpers/esm/index.js @@ -97,6 +97,7 @@ export { _type_of } from "./_type_of.js"; export { _unsupported_iterable_to_array } from "./_unsupported_iterable_to_array.js"; export { _update } from "./_update.js"; export { _using } from "./_using.js"; +export { _using_ctx } from "./_using_ctx.js"; export { _wrap_async_generator } from "./_wrap_async_generator.js"; export { _wrap_native_super } from "./_wrap_native_super.js"; export { _write_only_error } from "./_write_only_error.js"; diff --git a/packages/helpers/package.json b/packages/helpers/package.json index 986f160c433c..ae4799d7553d 100644 --- a/packages/helpers/package.json +++ b/packages/helpers/package.json @@ -435,6 +435,10 @@ "import": "./esm/_using.js", "default": "./cjs/_using.cjs" }, + "./_/_using_ctx": { + "import": "./esm/_using_ctx.js", + "default": "./cjs/_using_ctx.cjs" + }, "./_/_wrap_async_generator": { "import": "./esm/_wrap_async_generator.js", "default": "./cjs/_wrap_async_generator.cjs" From b9758f3cc1c11e41c5b6756a7987b9449b38aa97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Mon, 15 Apr 2024 22:03:13 +0900 Subject: [PATCH 125/172] chore: Format helpers --- packages/helpers/esm/_using_ctx.js | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/packages/helpers/esm/_using_ctx.js b/packages/helpers/esm/_using_ctx.js index 5eb4922017e7..953b2b152053 100644 --- a/packages/helpers/esm/_using_ctx.js +++ b/packages/helpers/esm/_using_ctx.js @@ -1,9 +1,8 @@ export function _using_ctx() { - var _disposeSuppressedError = - typeof SuppressedError === "function" - ? // eslint-disable-next-line no-undef - SuppressedError - : (function (error, suppressed) { + var _disposeSuppressedError = typeof SuppressedError === "function" + // eslint-disable-next-line no-undef + ? SuppressedError + : (function(error, suppressed) { var err = new Error(); err.name = "SuppressedError"; err.suppressed = suppressed; @@ -15,14 +14,11 @@ export function _using_ctx() { function using(isAwait, value) { if (value != null) { if (Object(value) !== value) { - throw new TypeError( - "using declarations can only be used with objects, functions, null, or undefined.", - ); + throw new TypeError("using declarations can only be used with objects, functions, null, or undefined."); } // core-js-pure uses Symbol.for for polyfilling well-known symbols if (isAwait) { - var dispose = - value[Symbol.asyncDispose || Symbol.for("Symbol.asyncDispose")]; + var dispose = value[Symbol.asyncDispose || Symbol.for("Symbol.asyncDispose")]; } if (dispose == null) { dispose = value[Symbol.dispose || Symbol.for("Symbol.dispose")]; @@ -45,15 +41,14 @@ export function _using_ctx() { // await using a: using.bind(null, true), // dispose - d: function () { + d: function() { var error = this.e; function next() { // eslint-disable-next-line @typescript-eslint/no-use-before-define while ((resource = stack.pop())) { try { - var resource, - disposalResult = resource.d && resource.d.call(resource.v); + var resource, disposalResult = resource.d && resource.d.call(resource.v); if (resource.a) { return Promise.resolve(disposalResult).then(next, err); } @@ -71,8 +66,9 @@ export function _using_ctx() { } return next(); - }, + } }; } -export { _usingCtx as _ } \ No newline at end of file +export { _usingCtx as _ }; +export { _using_ctx as _ }; From 997063d0fc41bb4186651b5dffb8868a05d3c49c Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 16 Apr 2024 00:08:37 +0000 Subject: [PATCH 126/172] chore: Publish 1.4.15-nightly-20240416.1 --- bindings/Cargo.lock | 10 +++++----- bindings/binding_core_node/Cargo.toml | 2 +- bindings/binding_core_wasm/Cargo.toml | 4 ++-- bindings/binding_minifier_node/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 4 ++-- bindings/swc_cli/Cargo.toml | 2 +- package.json | 2 +- packages/minifier/package.json | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 5f956133b004..51baea534c05 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -231,7 +231,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.4.14" +version = "1.4.15-nightly-20240416.1" dependencies = [ "anyhow", "getrandom", @@ -291,7 +291,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.4.14" +version = "1.4.15-nightly-20240416.1" dependencies = [ "anyhow", "getrandom", @@ -3074,7 +3074,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.216" +version = "0.91.217" dependencies = [ "anyhow", "swc_cli_impl", @@ -3189,9 +3189,9 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.90.31" +version = "0.90.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abbb96671d9fb89f051609242b6acb9ddde9e6ff6325f49fce453d96a4c533" +checksum = "bd37cd7a50ba4e5303e41be8e640f3983f88629ffcac166ed4b996825a383717" dependencies = [ "binding_macros", "swc", diff --git a/bindings/binding_core_node/Cargo.toml b/bindings/binding_core_node/Cargo.toml index bf6435c60b58..2a5a47196478 100644 --- a/bindings/binding_core_node/Cargo.toml +++ b/bindings/binding_core_node/Cargo.toml @@ -51,7 +51,7 @@ tracing-chrome = "0.5.0" tracing-futures = "0.2.5" tracing-subscriber = { version = "0.3.9", features = ["env-filter"] } -swc_core = { version = "0.90.31", features = [ +swc_core = { version = "0.90.32", features = [ "allocator_node", "ecma_ast", "ecma_codegen", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 22425d856190..775e7d03832e 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.14" +version = "1.4.15-nightly-20240416.1" [lib] bench = false @@ -35,7 +35,7 @@ anyhow = "1.0.66" getrandom = { version = "0.2.10", features = ["js"] } serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" -swc_core = { version = "0.90.31", features = [ +swc_core = { version = "0.90.32", features = [ "ecma_ast_serde", "ecma_codegen", "binding_macro_wasm", diff --git a/bindings/binding_minifier_node/Cargo.toml b/bindings/binding_minifier_node/Cargo.toml index 445f932c840d..f73ef0fc2c6d 100644 --- a/bindings/binding_minifier_node/Cargo.toml +++ b/bindings/binding_minifier_node/Cargo.toml @@ -37,7 +37,7 @@ tracing-subscriber = { version = "0.3.9", features = ["env-filter"] } swc_compiler_base = { version = "0.7.20", features = ["node"] } swc_config = "0.1.12" -swc_core = { version = "0.90.31", features = [ +swc_core = { version = "0.90.32", features = [ "allocator_node", "common_concurrent", "common_sourcemap", diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 63759a685de7..206641f77bd0 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.14" +version = "1.4.15-nightly-20240416.1" [lib] bench = false @@ -35,7 +35,7 @@ anyhow = "1.0.66" getrandom = { version = "0.2.10", features = ["js"] } serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" -swc_core = { version = "0.90.31", features = [ +swc_core = { version = "0.90.32", features = [ "ecma_ast_serde", "ecma_codegen", "binding_macro_wasm", diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index c77820e7c65f..b5f651078569 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.216" +version = "0.91.217" [[bin]] bench = false diff --git a/package.json b/package.json index 03e6ae02e052..f86715f2458b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.4.14", + "version": "1.4.15-nightly-20240416.1", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 0f222e64aebc..697b191e1d2f 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.4.14", + "version": "1.4.15-nightly-20240416.1", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", From ca9c76b46f26f0aaf6b7f18cb7b4c6fdb7ebd512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Tue, 16 Apr 2024 11:20:47 +0900 Subject: [PATCH 127/172] build(cargo): Update rustc to `nightly-2024-04-03` (#8821) --- Cargo.lock | 9 +- README.md | 2 +- clippy.toml | 2 +- crates/ast_node/src/ast_node_macro.rs | 1 - crates/ast_node/src/enum_deserialize.rs | 1 - crates/ast_node/src/lib.rs | 2 +- crates/string_enum/src/lib.rs | 2 +- crates/swc/examples/minify.rs | 2 +- crates/swc/examples/transform.rs | 2 +- crates/swc/examples/transform_error.rs | 2 +- crates/swc/src/config/mod.rs | 17 +- crates/swc/src/lib.rs | 2 +- .../fixture/issues-8xxx/8020/output/1.js | 14 +- .../fixture/issues-8xxx/8629/output/1.js | 12 +- .../fixture/issues-8xxx/8629/output/2.js | 12 +- .../fixture/issues-8xxx/8774/output/index.js | 28 +- crates/swc/tests/projects.rs | 2 +- ...gDeclarations.1(target=es2015).1.normal.js | 236 ++-- ...eclarations.1(target=es2015).2.minified.js | 153 ++- ...gDeclarations.1(target=es2017).1.normal.js | 236 ++-- ...eclarations.1(target=es2017).2.minified.js | 143 ++- ...gDeclarations.1(target=es2022).1.normal.js | 236 ++-- ...eclarations.1(target=es2022).2.minified.js | 143 ++- ...singDeclarations.1(target=es5).1.normal.js | 246 ++-- ...ngDeclarations.1(target=es5).2.minified.js | 153 ++- ...gDeclarations.1(target=esnext).1.normal.js | 236 ++-- ...eclarations.1(target=esnext).2.minified.js | 143 ++- .../awaitUsingDeclarations.12.1.normal.js | 12 +- .../awaitUsingDeclarations.12.2.minified.js | 3 +- .../awaitUsingDeclarations.13.1.normal.js | 21 +- .../awaitUsingDeclarations.13.2.minified.js | 11 +- .../awaitUsingDeclarations.15.1.normal.js | 14 +- .../awaitUsingDeclarations.15.2.minified.js | 3 +- ...gDeclarations.2(target=es2015).1.normal.js | 16 +- ...eclarations.2(target=es2015).2.minified.js | 15 +- ...gDeclarations.2(target=es2017).1.normal.js | 16 +- ...eclarations.2(target=es2017).2.minified.js | 15 +- ...gDeclarations.2(target=es2022).1.normal.js | 16 +- ...eclarations.2(target=es2022).2.minified.js | 15 +- ...singDeclarations.2(target=es5).1.normal.js | 16 +- ...ngDeclarations.2(target=es5).2.minified.js | 15 +- ...gDeclarations.2(target=esnext).1.normal.js | 16 +- ...eclarations.2(target=esnext).2.minified.js | 15 +- ...gDeclarations.3(target=es2015).1.normal.js | 16 +- ...eclarations.3(target=es2015).2.minified.js | 15 +- ...gDeclarations.3(target=es2017).1.normal.js | 16 +- ...eclarations.3(target=es2017).2.minified.js | 15 +- ...gDeclarations.3(target=es2022).1.normal.js | 16 +- ...eclarations.3(target=es2022).2.minified.js | 15 +- ...singDeclarations.3(target=es5).1.normal.js | 14 +- ...ngDeclarations.3(target=es5).2.minified.js | 13 +- ...gDeclarations.3(target=esnext).1.normal.js | 16 +- ...eclarations.3(target=esnext).2.minified.js | 15 +- .../awaitUsingDeclarations.9.1.normal.js | 12 +- .../awaitUsingDeclarations.9.2.minified.js | 11 +- ...onsInForAwaitOf(target=es2015).1.normal.js | 9 +- ...sInForAwaitOf(target=es2015).2.minified.js | 2 +- ...onsInForAwaitOf(target=es2017).1.normal.js | 9 +- ...sInForAwaitOf(target=es2017).2.minified.js | 2 +- ...onsInForAwaitOf(target=es2022).1.normal.js | 9 +- ...sInForAwaitOf(target=es2022).2.minified.js | 2 +- ...ationsInForAwaitOf(target=es5).1.normal.js | 11 +- ...ionsInForAwaitOf(target=es5).2.minified.js | 2 +- ...onsInForAwaitOf(target=esnext).1.normal.js | 9 +- ...sInForAwaitOf(target=esnext).2.minified.js | 2 +- ...ationsInForOf.1(target=es2015).1.normal.js | 9 +- ...ionsInForOf.1(target=es2015).2.minified.js | 2 +- ...ationsInForOf.1(target=es2017).1.normal.js | 9 +- ...ionsInForOf.1(target=es2017).2.minified.js | 2 +- ...ationsInForOf.1(target=es2022).1.normal.js | 9 +- ...ionsInForOf.1(target=es2022).2.minified.js | 2 +- ...larationsInForOf.1(target=es5).1.normal.js | 11 +- ...rationsInForOf.1(target=es5).2.minified.js | 2 +- ...ationsInForOf.1(target=esnext).1.normal.js | 9 +- ...ionsInForOf.1(target=esnext).2.minified.js | 2 +- ...TopLevelOfModule.1(module=es6).1.normal.js | 16 +- ...pLevelOfModule.1(module=es6).2.minified.js | 15 +- ...LevelOfModule.1(module=system).1.normal.js | 25 +- ...velOfModule.1(module=system).2.minified.js | 22 +- ...gDeclarationsWithImportHelpers.1.normal.js | 12 +- ...eclarationsWithImportHelpers.2.minified.js | 3 +- ...gDeclarations.1(target=es2015).1.normal.js | 293 +++-- ...eclarations.1(target=es2015).2.minified.js | 131 ++- ...gDeclarations.1(target=es2017).1.normal.js | 293 +++-- ...eclarations.1(target=es2017).2.minified.js | 131 ++- ...gDeclarations.1(target=es2022).1.normal.js | 293 +++-- ...eclarations.1(target=es2022).2.minified.js | 195 ++-- ...singDeclarations.1(target=es5).1.normal.js | 303 +++-- ...ngDeclarations.1(target=es5).2.minified.js | 131 ++- ...gDeclarations.1(target=esnext).1.normal.js | 293 +++-- ...eclarations.1(target=esnext).2.minified.js | 195 ++-- .../usingDeclarations.11.1.normal.js | 48 +- .../usingDeclarations.11.2.minified.js | 3 +- .../usingDeclarations.12.1.normal.js | 12 +- .../usingDeclarations.12.2.minified.js | 3 +- .../usingDeclarations.14.1.normal.js | 12 +- .../usingDeclarations.14.2.minified.js | 11 +- .../usingDeclarations.15.1.normal.js | 12 +- .../usingDeclarations.15.2.minified.js | 11 +- ...gDeclarations.2(target=es2015).1.normal.js | 14 +- ...eclarations.2(target=es2015).2.minified.js | 13 +- ...gDeclarations.2(target=es2017).1.normal.js | 14 +- ...eclarations.2(target=es2017).2.minified.js | 13 +- ...gDeclarations.2(target=es2022).1.normal.js | 14 +- ...eclarations.2(target=es2022).2.minified.js | 13 +- ...singDeclarations.2(target=es5).1.normal.js | 12 +- ...ngDeclarations.2(target=es5).2.minified.js | 11 +- ...gDeclarations.2(target=esnext).1.normal.js | 14 +- ...eclarations.2(target=esnext).2.minified.js | 13 +- ...gDeclarations.3(target=es2015).1.normal.js | 14 +- ...eclarations.3(target=es2015).2.minified.js | 13 +- ...gDeclarations.3(target=es2017).1.normal.js | 14 +- ...eclarations.3(target=es2017).2.minified.js | 13 +- ...gDeclarations.3(target=es2022).1.normal.js | 14 +- ...eclarations.3(target=es2022).2.minified.js | 13 +- ...singDeclarations.3(target=es5).1.normal.js | 12 +- ...ngDeclarations.3(target=es5).2.minified.js | 11 +- ...gDeclarations.3(target=esnext).1.normal.js | 14 +- ...eclarations.3(target=esnext).2.minified.js | 13 +- .../usingDeclarations.9.1.normal.js | 12 +- .../usingDeclarations.9.2.minified.js | 11 +- ...gDeclarationsDeclarationEmit.1.1.normal.js | 16 +- ...eclarationsDeclarationEmit.1.2.minified.js | 13 +- ...gDeclarationsDeclarationEmit.2.1.normal.js | 16 +- ...eclarationsDeclarationEmit.2.2.minified.js | 15 +- ...onsInForAwaitOf(target=es2015).1.normal.js | 9 +- ...sInForAwaitOf(target=es2015).2.minified.js | 2 +- ...onsInForAwaitOf(target=es2017).1.normal.js | 9 +- ...sInForAwaitOf(target=es2017).2.minified.js | 2 +- ...onsInForAwaitOf(target=es2022).1.normal.js | 9 +- ...sInForAwaitOf(target=es2022).2.minified.js | 2 +- ...ationsInForAwaitOf(target=es5).1.normal.js | 11 +- ...ionsInForAwaitOf(target=es5).2.minified.js | 2 +- ...onsInForAwaitOf(target=esnext).1.normal.js | 9 +- ...sInForAwaitOf(target=esnext).2.minified.js | 2 +- ...ationsInForOf.1(target=es2015).1.normal.js | 9 +- ...ionsInForOf.1(target=es2015).2.minified.js | 8 +- ...ationsInForOf.1(target=es2017).1.normal.js | 9 +- ...ionsInForOf.1(target=es2017).2.minified.js | 8 +- ...ationsInForOf.1(target=es2022).1.normal.js | 9 +- ...ionsInForOf.1(target=es2022).2.minified.js | 8 +- ...larationsInForOf.1(target=es5).1.normal.js | 9 +- ...rationsInForOf.1(target=es5).2.minified.js | 8 +- ...ationsInForOf.1(target=esnext).1.normal.js | 9 +- ...ionsInForOf.1(target=esnext).2.minified.js | 8 +- ...TopLevelOfModule.1(module=amd).1.normal.js | 16 +- ...pLevelOfModule.1(module=amd).2.minified.js | 17 +- ...velOfModule.1(module=commonjs).1.normal.js | 14 +- ...lOfModule.1(module=commonjs).2.minified.js | 14 +- ...TopLevelOfModule.1(module=es6).1.normal.js | 14 +- ...pLevelOfModule.1(module=es6).2.minified.js | 15 +- ...LevelOfModule.1(module=system).1.normal.js | 23 +- ...velOfModule.1(module=system).2.minified.js | 20 +- ...TopLevelOfModule.2(module=amd).1.normal.js | 16 +- ...pLevelOfModule.2(module=amd).2.minified.js | 11 +- ...velOfModule.2(module=commonjs).1.normal.js | 14 +- ...lOfModule.2(module=commonjs).2.minified.js | 8 +- ...TopLevelOfModule.3(module=amd).1.normal.js | 14 +- ...pLevelOfModule.3(module=amd).2.minified.js | 13 +- ...velOfModule.3(module=commonjs).1.normal.js | 12 +- ...lOfModule.3(module=commonjs).2.minified.js | 10 +- ...TopLevelOfModule.3(module=es6).1.normal.js | 12 +- ...pLevelOfModule.3(module=es6).2.minified.js | 11 +- ...LevelOfModule.3(module=system).1.normal.js | 21 +- ...velOfModule.3(module=system).2.minified.js | 20 +- ...gDeclarationsWithImportHelpers.1.normal.js | 12 +- ...eclarationsWithImportHelpers.2.minified.js | 11 +- ...module=commonjs,target=es2015).1.normal.js | 12 +- ...dule=commonjs,target=es2015).2.minified.js | 10 +- ....1(module=commonjs,target=es5).1.normal.js | 12 +- ...(module=commonjs,target=es5).2.minified.js | 10 +- ...module=commonjs,target=esnext).1.normal.js | 12 +- ...dule=commonjs,target=esnext).2.minified.js | 10 +- ...rs.1(module=es6,target=es2015).1.normal.js | 12 +- ....1(module=es6,target=es2015).2.minified.js | 11 +- ...ators.1(module=es6,target=es5).1.normal.js | 12 +- ...ors.1(module=es6,target=es5).2.minified.js | 11 +- ...rs.1(module=es6,target=esnext).1.normal.js | 12 +- ....1(module=es6,target=esnext).2.minified.js | 11 +- ...1(module=system,target=es2015).1.normal.js | 21 +- ...module=system,target=es2015).2.minified.js | 20 +- ...rs.1(module=system,target=es5).1.normal.js | 21 +- ....1(module=system,target=es5).2.minified.js | 20 +- ...1(module=system,target=esnext).1.normal.js | 21 +- ...module=system,target=esnext).2.minified.js | 20 +- ...module=commonjs,target=es2015).1.normal.js | 12 +- ...dule=commonjs,target=es2015).2.minified.js | 10 +- ...10(module=commonjs,target=es5).1.normal.js | 12 +- ...(module=commonjs,target=es5).2.minified.js | 10 +- ...module=commonjs,target=esnext).1.normal.js | 12 +- ...dule=commonjs,target=esnext).2.minified.js | 10 +- ...s.10(module=es6,target=es2015).1.normal.js | 12 +- ...10(module=es6,target=es2015).2.minified.js | 11 +- ...tors.10(module=es6,target=es5).1.normal.js | 12 +- ...rs.10(module=es6,target=es5).2.minified.js | 11 +- ...s.10(module=es6,target=esnext).1.normal.js | 12 +- ...10(module=es6,target=esnext).2.minified.js | 11 +- ...0(module=system,target=es2015).1.normal.js | 21 +- ...module=system,target=es2015).2.minified.js | 20 +- ...s.10(module=system,target=es5).1.normal.js | 21 +- ...10(module=system,target=es5).2.minified.js | 20 +- ...0(module=system,target=esnext).1.normal.js | 21 +- ...module=system,target=esnext).2.minified.js | 20 +- ...module=commonjs,target=es2015).1.normal.js | 12 +- ...dule=commonjs,target=es2015).2.minified.js | 10 +- ...11(module=commonjs,target=es5).1.normal.js | 12 +- ...(module=commonjs,target=es5).2.minified.js | 10 +- ...module=commonjs,target=esnext).1.normal.js | 12 +- ...dule=commonjs,target=esnext).2.minified.js | 10 +- ...s.11(module=es6,target=es2015).1.normal.js | 12 +- ...11(module=es6,target=es2015).2.minified.js | 11 +- ...tors.11(module=es6,target=es5).1.normal.js | 12 +- ...rs.11(module=es6,target=es5).2.minified.js | 11 +- ...s.11(module=es6,target=esnext).1.normal.js | 12 +- ...11(module=es6,target=esnext).2.minified.js | 11 +- ...1(module=system,target=es2015).1.normal.js | 21 +- ...module=system,target=es2015).2.minified.js | 20 +- ...s.11(module=system,target=es5).1.normal.js | 21 +- ...11(module=system,target=es5).2.minified.js | 20 +- ...1(module=system,target=esnext).1.normal.js | 21 +- ...module=system,target=esnext).2.minified.js | 20 +- ...module=commonjs,target=es2015).1.normal.js | 12 +- ...dule=commonjs,target=es2015).2.minified.js | 10 +- ...12(module=commonjs,target=es5).1.normal.js | 12 +- ...(module=commonjs,target=es5).2.minified.js | 10 +- ...module=commonjs,target=esnext).1.normal.js | 12 +- ...dule=commonjs,target=esnext).2.minified.js | 10 +- ...s.12(module=es6,target=es2015).1.normal.js | 12 +- ...12(module=es6,target=es2015).2.minified.js | 11 +- ...tors.12(module=es6,target=es5).1.normal.js | 12 +- ...rs.12(module=es6,target=es5).2.minified.js | 11 +- ...s.12(module=es6,target=esnext).1.normal.js | 12 +- ...12(module=es6,target=esnext).2.minified.js | 11 +- ...2(module=system,target=es2015).1.normal.js | 21 +- ...module=system,target=es2015).2.minified.js | 20 +- ...s.12(module=system,target=es5).1.normal.js | 21 +- ...12(module=system,target=es5).2.minified.js | 20 +- ...2(module=system,target=esnext).1.normal.js | 21 +- ...module=system,target=esnext).2.minified.js | 20 +- ...module=commonjs,target=es2015).1.normal.js | 12 +- ...dule=commonjs,target=es2015).2.minified.js | 10 +- ....2(module=commonjs,target=es5).1.normal.js | 12 +- ...(module=commonjs,target=es5).2.minified.js | 10 +- ...module=commonjs,target=esnext).1.normal.js | 12 +- ...dule=commonjs,target=esnext).2.minified.js | 10 +- ...rs.2(module=es6,target=es2015).1.normal.js | 12 +- ....2(module=es6,target=es2015).2.minified.js | 11 +- ...ators.2(module=es6,target=es5).1.normal.js | 12 +- ...ors.2(module=es6,target=es5).2.minified.js | 11 +- ...rs.2(module=es6,target=esnext).1.normal.js | 12 +- ....2(module=es6,target=esnext).2.minified.js | 11 +- ...2(module=system,target=es2015).1.normal.js | 21 +- ...module=system,target=es2015).2.minified.js | 20 +- ...rs.2(module=system,target=es5).1.normal.js | 21 +- ....2(module=system,target=es5).2.minified.js | 20 +- ...2(module=system,target=esnext).1.normal.js | 21 +- ...module=system,target=esnext).2.minified.js | 20 +- ...module=commonjs,target=es2015).1.normal.js | 12 +- ...dule=commonjs,target=es2015).2.minified.js | 10 +- ....3(module=commonjs,target=es5).1.normal.js | 12 +- ...(module=commonjs,target=es5).2.minified.js | 10 +- ...module=commonjs,target=esnext).1.normal.js | 12 +- ...dule=commonjs,target=esnext).2.minified.js | 10 +- ...rs.3(module=es6,target=es2015).1.normal.js | 12 +- ....3(module=es6,target=es2015).2.minified.js | 11 +- ...ators.3(module=es6,target=es5).1.normal.js | 12 +- ...ors.3(module=es6,target=es5).2.minified.js | 11 +- ...rs.3(module=es6,target=esnext).1.normal.js | 12 +- ....3(module=es6,target=esnext).2.minified.js | 11 +- ...3(module=system,target=es2015).1.normal.js | 21 +- ...module=system,target=es2015).2.minified.js | 20 +- ...rs.3(module=system,target=es5).1.normal.js | 21 +- ....3(module=system,target=es5).2.minified.js | 20 +- ...3(module=system,target=esnext).1.normal.js | 21 +- ...module=system,target=esnext).2.minified.js | 20 +- ...module=commonjs,target=es2015).1.normal.js | 12 +- ...dule=commonjs,target=es2015).2.minified.js | 10 +- ....4(module=commonjs,target=es5).1.normal.js | 12 +- ...(module=commonjs,target=es5).2.minified.js | 10 +- ...module=commonjs,target=esnext).1.normal.js | 12 +- ...dule=commonjs,target=esnext).2.minified.js | 10 +- ...rs.4(module=es6,target=es2015).1.normal.js | 12 +- ....4(module=es6,target=es2015).2.minified.js | 11 +- ...ators.4(module=es6,target=es5).1.normal.js | 12 +- ...ors.4(module=es6,target=es5).2.minified.js | 11 +- ...rs.4(module=es6,target=esnext).1.normal.js | 12 +- ....4(module=es6,target=esnext).2.minified.js | 11 +- ...4(module=system,target=es2015).1.normal.js | 21 +- ...module=system,target=es2015).2.minified.js | 20 +- ...rs.4(module=system,target=es5).1.normal.js | 21 +- ....4(module=system,target=es5).2.minified.js | 20 +- ...4(module=system,target=esnext).1.normal.js | 21 +- ...module=system,target=esnext).2.minified.js | 20 +- ...module=commonjs,target=es2015).1.normal.js | 12 +- ...dule=commonjs,target=es2015).2.minified.js | 10 +- ....5(module=commonjs,target=es5).1.normal.js | 12 +- ...(module=commonjs,target=es5).2.minified.js | 10 +- ...module=commonjs,target=esnext).1.normal.js | 12 +- ...dule=commonjs,target=esnext).2.minified.js | 10 +- ...rs.5(module=es6,target=es2015).1.normal.js | 12 +- ....5(module=es6,target=es2015).2.minified.js | 11 +- ...ators.5(module=es6,target=es5).1.normal.js | 12 +- ...ors.5(module=es6,target=es5).2.minified.js | 11 +- ...rs.5(module=es6,target=esnext).1.normal.js | 12 +- ....5(module=es6,target=esnext).2.minified.js | 11 +- ...5(module=system,target=es2015).1.normal.js | 21 +- ...module=system,target=es2015).2.minified.js | 20 +- ...rs.5(module=system,target=es5).1.normal.js | 21 +- ....5(module=system,target=es5).2.minified.js | 20 +- ...5(module=system,target=esnext).1.normal.js | 21 +- ...module=system,target=esnext).2.minified.js | 20 +- ...module=commonjs,target=es2015).1.normal.js | 12 +- ...dule=commonjs,target=es2015).2.minified.js | 10 +- ....6(module=commonjs,target=es5).1.normal.js | 12 +- ...(module=commonjs,target=es5).2.minified.js | 10 +- ...module=commonjs,target=esnext).1.normal.js | 12 +- ...dule=commonjs,target=esnext).2.minified.js | 10 +- ...rs.6(module=es6,target=es2015).1.normal.js | 12 +- ....6(module=es6,target=es2015).2.minified.js | 11 +- ...ators.6(module=es6,target=es5).1.normal.js | 12 +- ...ors.6(module=es6,target=es5).2.minified.js | 11 +- ...rs.6(module=es6,target=esnext).1.normal.js | 12 +- ....6(module=es6,target=esnext).2.minified.js | 11 +- ...6(module=system,target=es2015).1.normal.js | 21 +- ...module=system,target=es2015).2.minified.js | 20 +- ...rs.6(module=system,target=es5).1.normal.js | 21 +- ....6(module=system,target=es5).2.minified.js | 20 +- ...6(module=system,target=esnext).1.normal.js | 21 +- ...module=system,target=esnext).2.minified.js | 20 +- ...module=commonjs,target=es2015).1.normal.js | 12 +- ...dule=commonjs,target=es2015).2.minified.js | 10 +- ....7(module=commonjs,target=es5).1.normal.js | 12 +- ...(module=commonjs,target=es5).2.minified.js | 10 +- ...module=commonjs,target=esnext).1.normal.js | 12 +- ...dule=commonjs,target=esnext).2.minified.js | 10 +- ...rs.7(module=es6,target=es2015).1.normal.js | 12 +- ....7(module=es6,target=es2015).2.minified.js | 11 +- ...ators.7(module=es6,target=es5).1.normal.js | 12 +- ...ors.7(module=es6,target=es5).2.minified.js | 11 +- ...rs.7(module=es6,target=esnext).1.normal.js | 12 +- ....7(module=es6,target=esnext).2.minified.js | 11 +- ...7(module=system,target=es2015).1.normal.js | 21 +- ...module=system,target=es2015).2.minified.js | 20 +- ...rs.7(module=system,target=es5).1.normal.js | 21 +- ....7(module=system,target=es5).2.minified.js | 20 +- ...7(module=system,target=esnext).1.normal.js | 21 +- ...module=system,target=esnext).2.minified.js | 20 +- ...module=commonjs,target=es2015).1.normal.js | 12 +- ...dule=commonjs,target=es2015).2.minified.js | 10 +- ....8(module=commonjs,target=es5).1.normal.js | 12 +- ...(module=commonjs,target=es5).2.minified.js | 10 +- ...module=commonjs,target=esnext).1.normal.js | 12 +- ...dule=commonjs,target=esnext).2.minified.js | 10 +- ...rs.8(module=es6,target=es2015).1.normal.js | 12 +- ....8(module=es6,target=es2015).2.minified.js | 11 +- ...ators.8(module=es6,target=es5).1.normal.js | 12 +- ...ors.8(module=es6,target=es5).2.minified.js | 11 +- ...rs.8(module=es6,target=esnext).1.normal.js | 12 +- ....8(module=es6,target=esnext).2.minified.js | 11 +- ...8(module=system,target=es2015).1.normal.js | 21 +- ...module=system,target=es2015).2.minified.js | 20 +- ...rs.8(module=system,target=es5).1.normal.js | 21 +- ....8(module=system,target=es5).2.minified.js | 20 +- ...8(module=system,target=esnext).1.normal.js | 21 +- ...module=system,target=esnext).2.minified.js | 20 +- ...module=commonjs,target=es2015).1.normal.js | 12 +- ...dule=commonjs,target=es2015).2.minified.js | 10 +- ....9(module=commonjs,target=es5).1.normal.js | 12 +- ...(module=commonjs,target=es5).2.minified.js | 10 +- ...module=commonjs,target=esnext).1.normal.js | 12 +- ...dule=commonjs,target=esnext).2.minified.js | 10 +- ...rs.9(module=es6,target=es2015).1.normal.js | 12 +- ....9(module=es6,target=es2015).2.minified.js | 11 +- ...ators.9(module=es6,target=es5).1.normal.js | 12 +- ...ors.9(module=es6,target=es5).2.minified.js | 11 +- ...rs.9(module=es6,target=esnext).1.normal.js | 12 +- ....9(module=es6,target=esnext).2.minified.js | 11 +- ...9(module=system,target=es2015).1.normal.js | 21 +- ...module=system,target=es2015).2.minified.js | 20 +- ...rs.9(module=system,target=es5).1.normal.js | 21 +- ....9(module=system,target=es5).2.minified.js | 20 +- ...9(module=system,target=esnext).1.normal.js | 21 +- ...module=system,target=esnext).2.minified.js | 20 +- crates/swc_atoms/Cargo.toml | 2 +- crates/swc_bundler/src/bundler/chunk/cjs.rs | 2 +- crates/swc_bundler/src/bundler/chunk/merge.rs | 85 +- crates/swc_bundler/src/bundler/chunk/mod.rs | 3 - crates/swc_bundler/src/bundler/mod.rs | 9 +- crates/swc_bundler/src/util.rs | 2 +- crates/swc_bundler/tests/fixture.rs | 1 - crates/swc_cli_impl/src/commands/compile.rs | 10 +- crates/swc_common/Cargo.toml | 2 +- crates/swc_common/src/errors/diagnostic.rs | 2 +- crates/swc_common/src/errors/emitter.rs | 5 +- crates/swc_common/src/source_map.rs | 47 - crates/swc_common/src/syntax_pos/hygiene.rs | 4 +- crates/swc_common/tests/attr_interop.rs | 4 +- .../tests/fixture/stub_napi/Cargo.toml | 1 + .../tests/fixture/stub_wasm/Cargo.toml | 1 + crates/swc_css_ast/Cargo.toml | 2 +- crates/swc_css_codegen/src/writer/basic.rs | 18 +- crates/swc_css_compat/src/compiler/nesting.rs | 2 +- crates/swc_css_parser/src/parser/input.rs | 6 +- crates/swc_css_parser/src/parser/mod.rs | 9 +- .../src/parser/values_and_units/mod.rs | 5 +- crates/swc_ecma_ast/Cargo.toml | 2 +- crates/swc_ecma_ast/src/lib.rs | 9 +- crates/swc_ecma_codegen/benches/bench.rs | 2 +- crates/swc_ecma_codegen/benches/with_parse.rs | 2 +- crates/swc_ecma_codegen/src/lib.rs | 16 +- crates/swc_ecma_codegen/src/tests.rs | 21 +- crates/swc_ecma_codegen/tests/sourcemap.rs | 2 +- crates/swc_ecma_codegen/tests/test262.rs | 2 +- crates/swc_ecma_codegen_macros/src/lib.rs | 2 +- .../src/block_scoping/mod.rs | 2 +- .../src/classes/constructor.rs | 40 - .../swc_ecma_compat_es2015/src/generator.rs | 1 + crates/swc_ecma_compat_es2015/src/lib.rs | 1 - crates/swc_ecma_compat_es2015/src/spread.rs | 6 +- .../src/class_properties/mod.rs | 2 +- .../src/private_in_object.rs | 2 +- crates/swc_ecma_lints/src/lib.rs | 1 + .../src/rules/constructor_super.rs | 9 +- crates/swc_ecma_loader/src/lib.rs | 9 +- crates/swc_ecma_loader/src/resolve.rs | 1 + crates/swc_ecma_minifier/src/compress/mod.rs | 11 +- .../src/compress/optimize/inline.rs | 2 +- crates/swc_ecma_minifier/src/js.rs | 9 +- crates/swc_ecma_minifier/src/option/terser.rs | 9 +- .../src/pass/mangle_names/mod.rs | 2 +- crates/swc_ecma_minifier/src/util/mod.rs | 3 +- crates/swc_ecma_minifier/src/util/unit.rs | 2 + crates/swc_ecma_minifier/tests/compress.rs | 1031 +---------------- crates/swc_ecma_parser/examples/lexer.rs | 1 - crates/swc_ecma_parser/examples/perf.rs | 2 +- crates/swc_ecma_parser/examples/typescript.rs | 1 - .../src/parser/class_and_fn.rs | 2 +- .../swc_ecma_parser/src/parser/expr/tests.rs | 3 - .../src/parser/expr/verifier.rs | 4 +- .../swc_ecma_parser/src/parser/jsx/tests.rs | 1 - crates/swc_ecma_parser/src/parser/pat.rs | 1 - crates/swc_ecma_parser/src/parser/tests.rs | 4 +- .../swc_ecma_parser/src/parser/typescript.rs | 2 +- crates/swc_ecma_parser/src/token.rs | 2 - crates/swc_ecma_transforms_base/src/fixer.rs | 11 +- .../src/helpers/mod.rs | 2 +- .../src/hygiene/tests.rs | 2 +- .../src/rename/mod.rs | 2 + .../src/resolver/tests.rs | 3 +- crates/swc_ecma_transforms_base/src/scope.rs | 9 +- .../tests/fixer_test262.rs | 2 +- .../src/const_modules.rs | 4 +- .../src/inline_globals.rs | 1 - .../src/json_parse.rs | 4 - .../src/simplify/inlining/scope.rs | 4 +- .../src/jsx/tests.rs | 2 +- .../src/jsx_src/tests.rs | 2 +- .../src/refresh/tests.rs | 2 +- .../examples/ts_to_js.rs | 1 - .../tests/strip_correctness.rs | 59 +- .../src/analyzer/mod.rs | 2 +- crates/swc_ecma_utils/src/lib.rs | 5 +- crates/swc_estree_ast/src/flavor.rs | 13 +- crates/swc_fast_graph/src/digraph.rs | 2 +- crates/swc_html_ast/Cargo.toml | 2 +- crates/swc_html_codegen/src/writer/basic.rs | 18 +- crates/swc_html_codegen/tests/fixture.rs | 60 +- crates/swc_html_minifier/src/option.rs | 18 +- crates/swc_html_parser/src/parser/mod.rs | 9 +- crates/swc_macros_common/src/binder.rs | 1 - .../swc_macros_common/src/derive/generics.rs | 2 +- crates/swc_node_bundler/src/loaders/json.rs | 2 +- crates/swc_node_bundler/src/v1/mod.rs | 9 +- crates/swc_plugin_proxy/Cargo.toml | 2 +- .../read_returned_result_from_host.rs | 4 +- .../src/imported_fn/source_map.rs | 2 + .../src/transform_executor.rs | 3 +- .../css-plugins/swc_noop_plugin/Cargo.toml | 1 + .../tests/ecma_integration.rs | 86 +- .../tests/fixture/issue_6404/Cargo.toml | 1 + .../tests/fixture/issue_6404/src/lib.rs | 4 +- .../fixture/swc_internal_plugin/Cargo.toml | 7 +- .../fixture/swc_internal_plugin/src/lib.rs | 22 + .../tests/fixture/swc_noop_plugin/Cargo.toml | 1 + crates/swc_plugin_runner/tests/issues.rs | 24 +- crates/swc_xml_codegen/src/writer/basic.rs | 18 +- crates/swc_xml_codegen/tests/fixture.rs | 30 +- crates/swc_xml_parser/src/parser/mod.rs | 8 +- crates/swc_xml_parser/src/parser/node.rs | 2 + crates/testing/src/output.rs | 1 - .../plugin_transform_schema_v1/rust-toolchain | 2 +- .../rust-toolchain | 2 +- rust-toolchain | 2 +- 493 files changed, 4170 insertions(+), 6659 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cb46037ac744..05f989e49e00 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3110,12 +3110,13 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.42" +version = "0.7.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0200c8230b013893c0b2d6213d6ec64ed2b9be2e0e016682b7224ff82cff5c58" +checksum = "5cba464629b3394fc4dbc6f940ff8f5b4ff5c7aef40f29166fd4ad12acbc99c0" dependencies = [ "bitvec", "bytecheck", + "bytes", "hashbrown 0.12.3", "indexmap 1.9.3", "ptr_meta", @@ -3128,9 +3129,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.43" +version = "0.7.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5c462a1328c8e67e4d6dbad1eb0355dd43e8ab432c6e227a43657f16ade5033" +checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65" dependencies = [ "proc-macro2", "quote", diff --git a/README.md b/README.md index b432b1058b10..c35c9149d475 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Also, SWC tries to ensure that for rust users. -MSRV of crates is currently nightly, but we will support stable rustc again in the future. +MSRV of crates is currently `1.71`. To update all SWC crates you use, you can run `curl https://github.com/raw/swc-project/swc/main/scripts/update-all-swc-crates.sh | bash -s`. This script will update all dependencies to the latest version and run `cargo build` to ensure that everything works. Note that you need diff --git a/clippy.toml b/clippy.toml index 30bf79298597..d3673c818d2f 100644 --- a/clippy.toml +++ b/clippy.toml @@ -22,5 +22,5 @@ ignore-interior-mutability = [ "swc_atoms::JsWord", "swc_ecma_ast::Id", ] -msrv = "1.58" +msrv = "1.71" type-complexity-threshold = 25000 diff --git a/crates/ast_node/src/ast_node_macro.rs b/crates/ast_node/src/ast_node_macro.rs index a6eff03434e5..e67e08926ede 100644 --- a/crates/ast_node/src/ast_node_macro.rs +++ b/crates/ast_node/src/ast_node_macro.rs @@ -1,6 +1,5 @@ use swc_macros_common::prelude::*; use syn::{ - self, parse::{Parse, ParseStream}, *, }; diff --git a/crates/ast_node/src/enum_deserialize.rs b/crates/ast_node/src/enum_deserialize.rs index b6294a50886f..a6ea5e61ba5d 100644 --- a/crates/ast_node/src/enum_deserialize.rs +++ b/crates/ast_node/src/enum_deserialize.rs @@ -1,6 +1,5 @@ use swc_macros_common::prelude::*; use syn::{ - self, parse::{Parse, ParseStream}, *, }; diff --git a/crates/ast_node/src/lib.rs b/crates/ast_node/src/lib.rs index 010cc70f614b..46cf23733c85 100644 --- a/crates/ast_node/src/lib.rs +++ b/crates/ast_node/src/lib.rs @@ -5,7 +5,7 @@ extern crate proc_macro; use quote::quote; use swc_macros_common::prelude::*; -use syn::{self, visit_mut::VisitMut, *}; +use syn::{visit_mut::VisitMut, *}; mod ast_node_macro; mod enum_deserialize; diff --git a/crates/string_enum/src/lib.rs b/crates/string_enum/src/lib.rs index 67dcb46163a8..121f13a52f1f 100644 --- a/crates/string_enum/src/lib.rs +++ b/crates/string_enum/src/lib.rs @@ -4,7 +4,7 @@ extern crate proc_macro; use quote::quote_spanned; use swc_macros_common::prelude::*; -use syn::{self, parse::Parse, *}; +use syn::{parse::Parse, *}; /// Creates `.as_str()` and then implements `Debug` and `Display` using it. /// diff --git a/crates/swc/examples/minify.rs b/crates/swc/examples/minify.rs index 038a930d7180..8596ab43b8dc 100644 --- a/crates/swc/examples/minify.rs +++ b/crates/swc/examples/minify.rs @@ -1,7 +1,7 @@ use std::{path::Path, sync::Arc}; use anyhow::Context; -use swc::{self, config::JsMinifyOptions, try_with_handler, BoolOrDataConfig}; +use swc::{config::JsMinifyOptions, try_with_handler, BoolOrDataConfig}; use swc_common::{SourceMap, GLOBALS}; fn main() { diff --git a/crates/swc/examples/transform.rs b/crates/swc/examples/transform.rs index 70b98044e182..07655dd536b7 100644 --- a/crates/swc/examples/transform.rs +++ b/crates/swc/examples/transform.rs @@ -1,7 +1,7 @@ use std::{path::Path, sync::Arc}; use anyhow::Context; -use swc::{self, try_with_handler}; +use swc::try_with_handler; use swc_common::{SourceMap, GLOBALS}; fn main() { diff --git a/crates/swc/examples/transform_error.rs b/crates/swc/examples/transform_error.rs index aba51622ac6d..d5e1b4217640 100644 --- a/crates/swc/examples/transform_error.rs +++ b/crates/swc/examples/transform_error.rs @@ -1,7 +1,7 @@ use std::sync::Arc; use anyhow::Context; -use swc::{self, try_with_handler}; +use swc::try_with_handler; use swc_common::{errors::ColorConfig, FileName, SourceMap, GLOBALS}; fn main() { diff --git a/crates/swc/src/config/mod.rs b/crates/swc/src/config/mod.rs index 02cc37dee70e..3364eec44459 100644 --- a/crates/swc/src/config/mod.rs +++ b/crates/swc/src/config/mod.rs @@ -783,8 +783,9 @@ impl Options { } } -#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Default)] pub enum RootMode { + #[default] #[serde(rename = "root")] Root, #[serde(rename = "upward")] @@ -793,11 +794,6 @@ pub enum RootMode { UpwardOptional, } -impl Default for RootMode { - fn default() -> Self { - RootMode::Root - } -} const fn default_swcrc() -> bool { true } @@ -1179,21 +1175,16 @@ pub struct JscOutputConfig { pub preamble: String, } -#[derive(Debug, Clone, Serialize, Deserialize)] +#[derive(Debug, Clone, Serialize, Deserialize, Default)] #[serde(deny_unknown_fields, rename_all = "camelCase")] pub enum OutputCharset { + #[default] #[serde(rename = "utf8")] Utf8, #[serde(rename = "ascii")] Ascii, } -impl Default for OutputCharset { - fn default() -> Self { - OutputCharset::Utf8 - } -} - /// `jsc.experimental` in `.swcrc` #[derive(Debug, Default, Clone, Serialize, Deserialize, Merge)] #[serde(deny_unknown_fields, rename_all = "camelCase")] diff --git a/crates/swc/src/lib.rs b/crates/swc/src/lib.rs index c8a108a8b1ca..880b295f8f22 100644 --- a/crates/swc/src/lib.rs +++ b/crates/swc/src/lib.rs @@ -132,7 +132,7 @@ use swc_common::{ pub use swc_compiler_base::{PrintArgs, TransformOutput}; pub use swc_config::config_types::{BoolConfig, BoolOr, BoolOrDataConfig}; use swc_ecma_ast::{EsVersion, Program}; -use swc_ecma_codegen::{self, Node}; +use swc_ecma_codegen::Node; use swc_ecma_loader::resolvers::{ lru::CachingResolver, node::NodeModulesResolver, tsc::TsConfigResolver, }; diff --git a/crates/swc/tests/fixture/issues-8xxx/8020/output/1.js b/crates/swc/tests/fixture/issues-8xxx/8020/output/1.js index acc0c8214eaf..f460cbf43846 100644 --- a/crates/swc/tests/fixture/issues-8xxx/8020/output/1.js +++ b/crates/swc/tests/fixture/issues-8xxx/8020/output/1.js @@ -1,16 +1,14 @@ -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; function baz() { return bar; } try { - var _stack = []; - var foo = _using(_stack, null); - var bar = 1; + var _usingCtx = _using_ctx(); + var foo = _usingCtx.u(null); + const bar = 1; console.log(baz()); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/fixture/issues-8xxx/8629/output/1.js b/crates/swc/tests/fixture/issues-8xxx/8629/output/1.js index a7febe103cd6..65041b92b814 100644 --- a/crates/swc/tests/fixture/issues-8xxx/8629/output/1.js +++ b/crates/swc/tests/fixture/issues-8xxx/8629/output/1.js @@ -1,8 +1,7 @@ -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; var _Disposable; try { - var _stack = []; + var _usingCtx = _using_ctx(); var _computedKey; _computedKey = Symbol.dispose; class Disposable { @@ -11,12 +10,11 @@ try { } } _Disposable = Disposable; - var _disposable = _using(_stack, new Disposable()); + var _disposable = _usingCtx.u(new Disposable()); console.log('ok'); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { _Disposable as Disposable }; diff --git a/crates/swc/tests/fixture/issues-8xxx/8629/output/2.js b/crates/swc/tests/fixture/issues-8xxx/8629/output/2.js index 2b4522372a39..3eb77110e5a1 100644 --- a/crates/swc/tests/fixture/issues-8xxx/8629/output/2.js +++ b/crates/swc/tests/fixture/issues-8xxx/8629/output/2.js @@ -1,16 +1,14 @@ -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; var _Disposable; try { - var _stack = []; + var _usingCtx = _using_ctx(); var Disposable = 1334; _Disposable = Disposable; - var _disposable = _using(_stack, new Disposable()); + var _disposable = _usingCtx.u(new Disposable()); console.log('ok'); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { _Disposable as Disposable }; diff --git a/crates/swc/tests/fixture/issues-8xxx/8774/output/index.js b/crates/swc/tests/fixture/issues-8xxx/8774/output/index.js index 15e70fb63153..60bbb7e882b6 100644 --- a/crates/swc/tests/fixture/issues-8xxx/8774/output/index.js +++ b/crates/swc/tests/fixture/issues-8xxx/8774/output/index.js @@ -1,5 +1,4 @@ -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; const logClean = function() { return { [Symbol.dispose] () { @@ -12,21 +11,20 @@ const logClean = function() { }; async function foo() { try { - var _stack = []; - var a = _using(_stack, logClean()); - var b = _using(_stack, logClean(), true); + var _usingCtx = _using_ctx(); + const a = _usingCtx.u(logClean()); + const b = _usingCtx.a(logClean()); for (const a of [ logClean(), logClean() ]){ try { - var _stack1 = []; + var _usingCtx1 = _using_ctx(); {} } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx1.e = _; } finally{ - _dispose(_stack1, _error, _hasError); + _usingCtx1.d(); } } for (const a of [ @@ -34,20 +32,18 @@ async function foo() { logClean() ]){ try { - var _stack2 = []; + var _usingCtx2 = _using_ctx(); {} } catch (_) { - var _error1 = _; - var _hasError1 = true; + _usingCtx2.e = _; } finally{ - _dispose(_stack2, _error1, _hasError1); + _usingCtx2.d(); } } } catch (_) { - var _error2 = _; - var _hasError2 = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error2, _hasError2); + await _usingCtx.d(); } } foo(); diff --git a/crates/swc/tests/projects.rs b/crates/swc/tests/projects.rs index 10e2da2da6ab..36e9d86cd9c8 100644 --- a/crates/swc/tests/projects.rs +++ b/crates/swc/tests/projects.rs @@ -21,7 +21,7 @@ use swc_common::{ BytePos, FileName, Globals, SourceMap, GLOBALS, }; use swc_compiler_base::PrintArgs; -use swc_ecma_ast::{EsVersion, *}; +use swc_ecma_ast::*; use swc_ecma_minifier::option::MangleOptions; use swc_ecma_parser::{EsConfig, Syntax, TsConfig}; use swc_ecma_transforms::{ diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es2015).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es2015).1.normal.js index 3dc88224bf72..7ced32f4f868 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es2015).1.normal.js @@ -2,26 +2,24 @@ import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator"; import { _ as _await_async_generator } from "@swc/helpers/_/_await_async_generator"; import { _ as _wrap_async_generator } from "@swc/helpers/_/_wrap_async_generator"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; function af() { return _af.apply(this, arguments); } function _af() { _af = _async_to_generator(function*() { try { - var _stack = []; - var d3 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d3 = _usingCtx.a({ [Symbol.asyncDispose] () { return _async_to_generator(function*() {})(); } - }, true); + }); yield null; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - yield _dispose(_stack, _error, _hasError); + yield _usingCtx.d(); } }); return _af.apply(this, arguments); @@ -32,44 +30,42 @@ function ag() { function _ag() { _ag = _wrap_async_generator(function*() { try { - var _stack = []; - var d5 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d5 = _usingCtx.a({ [Symbol.asyncDispose] () { return _async_to_generator(function*() {})(); } - }, true); + }); yield; yield _await_async_generator(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - yield _await_async_generator(_dispose(_stack, _error, _hasError)); + yield _await_async_generator(_usingCtx.d()); } }); return _ag.apply(this, arguments); } try { - var _stack = []; - var d1 = _using(_stack, { + var _usingCtx = _using_ctx(); + var d1 = _usingCtx.a({ [Symbol.asyncDispose] () { return _async_to_generator(function*() {})(); } - }, true); - var a = function() { + }); + const a = function() { var _ref = _async_to_generator(function*() { try { - var _stack = []; - var d6 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d6 = _usingCtx.a({ [Symbol.asyncDispose] () { return _async_to_generator(function*() {})(); } - }, true); + }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - yield _dispose(_stack, _error, _hasError); + yield _usingCtx.d(); } }); return function a() { @@ -80,276 +76,258 @@ try { am() { return _async_to_generator(function*() { try { - var _stack = []; - var d13 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d13 = _usingCtx.a({ [Symbol.asyncDispose] () { return _async_to_generator(function*() {})(); } - }, true); + }); yield null; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - yield _dispose(_stack, _error, _hasError); + yield _usingCtx.d(); } })(); } ag() { return _wrap_async_generator(function*() { try { - var _stack = []; - var d15 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d15 = _usingCtx.a({ [Symbol.asyncDispose] () { return _async_to_generator(function*() {})(); } - }, true); + }); yield; yield _await_async_generator(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - yield _await_async_generator(_dispose(_stack, _error, _hasError)); + yield _await_async_generator(_usingCtx.d()); } })(); } constructor(){ this.a = /*#__PURE__*/ _async_to_generator(function*() { try { - var _stack = []; - var d7 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d7 = _usingCtx.a({ [Symbol.asyncDispose] () { return _async_to_generator(function*() {})(); } - }, true); + }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - yield _dispose(_stack, _error, _hasError); + yield _usingCtx.d(); } }); } } { try { - var _stack1 = []; - var d19 = _using(_stack1, { + var _usingCtx1 = _using_ctx(); + const d19 = _usingCtx1.a({ [Symbol.asyncDispose] () { return _async_to_generator(function*() {})(); } - }, true); + }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx1.e = _; } finally{ - await _dispose(_stack1, _error, _hasError); + await _usingCtx1.d(); } } switch(Math.random()){ case 0: try { - var _stack2 = []; - var d20 = _using(_stack2, { + var _usingCtx2 = _using_ctx(); + const d20 = _usingCtx2.a({ [Symbol.asyncDispose] () { return _async_to_generator(function*() {})(); } - }, true); + }); break; } catch (_) { - var _error1 = _; - var _hasError1 = true; + _usingCtx2.e = _; } finally{ - await _dispose(_stack2, _error1, _hasError1); + await _usingCtx2.d(); } case 1: try { - var _stack3 = []; - var d21 = _using(_stack3, { + var _usingCtx3 = _using_ctx(); + const d21 = _usingCtx3.a({ [Symbol.asyncDispose] () { return _async_to_generator(function*() {})(); } - }, true); + }); break; } catch (_) { - var _error2 = _; - var _hasError2 = true; + _usingCtx3.e = _; } finally{ - await _dispose(_stack3, _error2, _hasError2); + await _usingCtx3.d(); } } if (true) switch(0){ case 0: try { - var _stack4 = []; - var d22 = _using(_stack4, { + var _usingCtx4 = _using_ctx(); + const d22 = _usingCtx4.a({ [Symbol.asyncDispose] () { return _async_to_generator(function*() {})(); } - }, true); + }); break; } catch (_) { - var _error3 = _; - var _hasError3 = true; + _usingCtx4.e = _; } finally{ - await _dispose(_stack4, _error3, _hasError3); + await _usingCtx4.d(); } } try { try { - var _stack5 = []; - var d23 = _using(_stack5, { + var _usingCtx5 = _using_ctx(); + const d23 = _usingCtx5.a({ [Symbol.asyncDispose] () { return _async_to_generator(function*() {})(); } - }, true); + }); } catch (_) { - var _error4 = _; - var _hasError4 = true; + _usingCtx5.e = _; } finally{ - await _dispose(_stack5, _error4, _hasError4); + await _usingCtx5.d(); } } catch (e) { try { - var _stack6 = []; - var d24 = _using(_stack6, { + var _usingCtx6 = _using_ctx(); + const d24 = _usingCtx6.a({ [Symbol.asyncDispose] () { return _async_to_generator(function*() {})(); } - }, true); + }); } catch (_) { - var _error5 = _; - var _hasError5 = true; + _usingCtx6.e = _; } finally{ - await _dispose(_stack6, _error5, _hasError5); + await _usingCtx6.d(); } } finally{ try { - var _stack7 = []; - var d25 = _using(_stack7, { + var _usingCtx7 = _using_ctx(); + const d25 = _usingCtx7.a({ [Symbol.asyncDispose] () { return _async_to_generator(function*() {})(); } - }, true); + }); } catch (_) { - var _error6 = _; - var _hasError6 = true; + _usingCtx7.e = _; } finally{ - await _dispose(_stack7, _error6, _hasError6); + await _usingCtx7.d(); } } if (true) { try { - var _stack8 = []; - var d26 = _using(_stack8, { + var _usingCtx8 = _using_ctx(); + const d26 = _usingCtx8.a({ [Symbol.asyncDispose] () { return _async_to_generator(function*() {})(); } - }, true); + }); } catch (_) { - var _error7 = _; - var _hasError7 = true; + _usingCtx8.e = _; } finally{ - await _dispose(_stack8, _error7, _hasError7); + await _usingCtx8.d(); } } else { try { - var _stack9 = []; - var d27 = _using(_stack9, { + var _usingCtx9 = _using_ctx(); + const d27 = _usingCtx9.a({ [Symbol.asyncDispose] () { return _async_to_generator(function*() {})(); } - }, true); + }); } catch (_) { - var _error8 = _; - var _hasError8 = true; + _usingCtx9.e = _; } finally{ - await _dispose(_stack9, _error8, _hasError8); + await _usingCtx9.d(); } } while(true){ try { - var _stack10 = []; - var d28 = _using(_stack10, { + var _usingCtx10 = _using_ctx(); + const d28 = _usingCtx10.a({ [Symbol.asyncDispose] () { return _async_to_generator(function*() {})(); } - }, true); + }); break; } catch (_) { - var _error9 = _; - var _hasError9 = true; + _usingCtx10.e = _; } finally{ - await _dispose(_stack10, _error9, _hasError9); + await _usingCtx10.d(); } } do { try { - var _stack11 = []; - var d29 = _using(_stack11, { + var _usingCtx11 = _using_ctx(); + const d29 = _usingCtx11.a({ [Symbol.asyncDispose] () { return _async_to_generator(function*() {})(); } - }, true); + }); break; } catch (_) { - var _error10 = _; - var _hasError10 = true; + _usingCtx11.e = _; } finally{ - await _dispose(_stack11, _error10, _hasError10); + await _usingCtx11.d(); } }while (true) for(;;){ try { - var _stack12 = []; - var d30 = _using(_stack12, { + var _usingCtx12 = _using_ctx(); + const d30 = _usingCtx12.a({ [Symbol.asyncDispose] () { return _async_to_generator(function*() {})(); } - }, true); + }); break; } catch (_) { - var _error11 = _; - var _hasError11 = true; + _usingCtx12.e = _; } finally{ - await _dispose(_stack12, _error11, _hasError11); + await _usingCtx12.d(); } } for(const x in {}){ try { - var _stack13 = []; - var d31 = _using(_stack13, { + var _usingCtx13 = _using_ctx(); + const d31 = _usingCtx13.a({ [Symbol.asyncDispose] () { return _async_to_generator(function*() {})(); } - }, true); + }); } catch (_) { - var _error12 = _; - var _hasError12 = true; + _usingCtx13.e = _; } finally{ - await _dispose(_stack13, _error12, _hasError12); + await _usingCtx13.d(); } } for (const x of []){ try { - var _stack14 = []; - var d32 = _using(_stack14, { + var _usingCtx14 = _using_ctx(); + const d32 = _usingCtx14.a({ [Symbol.asyncDispose] () { return _async_to_generator(function*() {})(); } - }, true); + }); } catch (_) { - var _error13 = _; - var _hasError13 = true; + _usingCtx14.e = _; } finally{ - await _dispose(_stack14, _error13, _hasError13); + await _usingCtx14.d(); } } } catch (_) { - var _error14 = _; - var _hasError14 = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error14, _hasError14); + await _usingCtx.d(); } export { }; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es2015).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es2015).2.minified.js index 45fc960e6ad6..1e23f22187e2 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es2015).2.minified.js @@ -2,168 +2,167 @@ import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator"; import "@swc/helpers/_/_await_async_generator"; import "@swc/helpers/_/_wrap_async_generator"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.a({ [Symbol.asyncDispose]: ()=>_async_to_generator(function*() {})() - }, !0), _async_to_generator(function*() { + }), _async_to_generator(function*() { try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.a({ [Symbol.asyncDispose]: ()=>_async_to_generator(function*() {})() - }, !0); + }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - yield _dispose(_stack, _error, _hasError); + yield _usingCtx.d(); } }); try { - var _stack1 = []; - _using(_stack1, { + var _usingCtx1 = _using_ctx(); + _usingCtx1.a({ [Symbol.asyncDispose]: ()=>_async_to_generator(function*() {})() - }, !0); + }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx1.e = _; } finally{ - await _dispose(_stack1, _error, _hasError); + await _usingCtx1.d(); } switch(Math.random()){ case 0: try { - var _stack2 = []; - _using(_stack2, { + var _usingCtx2 = _using_ctx(); + _usingCtx2.a({ [Symbol.asyncDispose]: ()=>_async_to_generator(function*() {})() - }, !0); + }); break; } catch (_) { - var _error1 = _, _hasError1 = !0; + _usingCtx2.e = _; } finally{ - await _dispose(_stack2, _error1, _hasError1); + await _usingCtx2.d(); } case 1: try { - var _stack3 = []; - _using(_stack3, { + var _usingCtx3 = _using_ctx(); + _usingCtx3.a({ [Symbol.asyncDispose]: ()=>_async_to_generator(function*() {})() - }, !0); + }); } catch (_) { - var _error2 = _, _hasError2 = !0; + _usingCtx3.e = _; } finally{ - await _dispose(_stack3, _error2, _hasError2); + await _usingCtx3.d(); } } try { - var _stack4 = []; - _using(_stack4, { + var _usingCtx4 = _using_ctx(); + _usingCtx4.a({ [Symbol.asyncDispose]: ()=>_async_to_generator(function*() {})() - }, !0); + }); } catch (_) { - var _error3 = _, _hasError3 = !0; + _usingCtx4.e = _; } finally{ - await _dispose(_stack4, _error3, _hasError3); + await _usingCtx4.d(); } try { try { - var _stack5 = []; - _using(_stack5, { + var _usingCtx5 = _using_ctx(); + _usingCtx5.a({ [Symbol.asyncDispose]: ()=>_async_to_generator(function*() {})() - }, !0); + }); } catch (_) { - var _error4 = _, _hasError4 = !0; + _usingCtx5.e = _; } finally{ - await _dispose(_stack5, _error4, _hasError4); + await _usingCtx5.d(); } } catch (e) { try { - var _stack6 = []; - _using(_stack6, { + var _usingCtx6 = _using_ctx(); + _usingCtx6.a({ [Symbol.asyncDispose]: ()=>_async_to_generator(function*() {})() - }, !0); + }); } catch (_) { - var _error5 = _, _hasError5 = !0; + _usingCtx6.e = _; } finally{ - await _dispose(_stack6, _error5, _hasError5); + await _usingCtx6.d(); } } finally{ try { - var _stack7 = []; - _using(_stack7, { + var _usingCtx7 = _using_ctx(); + _usingCtx7.a({ [Symbol.asyncDispose]: ()=>_async_to_generator(function*() {})() - }, !0); + }); } catch (_) { - var _error6 = _, _hasError6 = !0; + _usingCtx7.e = _; } finally{ - await _dispose(_stack7, _error6, _hasError6); + await _usingCtx7.d(); } } try { - var _stack8 = []; - _using(_stack8, { + var _usingCtx8 = _using_ctx(); + _usingCtx8.a({ [Symbol.asyncDispose]: ()=>_async_to_generator(function*() {})() - }, !0); + }); } catch (_) { - var _error7 = _, _hasError7 = !0; + _usingCtx8.e = _; } finally{ - await _dispose(_stack8, _error7, _hasError7); + await _usingCtx8.d(); } for(;;)try { - var _stack10 = []; - _using(_stack10, { + var _usingCtx10 = _using_ctx(); + _usingCtx10.a({ [Symbol.asyncDispose]: ()=>_async_to_generator(function*() {})() - }, !0); + }); break; } catch (_) { - var _error9 = _, _hasError9 = !0; + _usingCtx10.e = _; } finally{ - await _dispose(_stack10, _error9, _hasError9); + await _usingCtx10.d(); } for(;;)try { - var _stack11 = []; - _using(_stack11, { + var _usingCtx11 = _using_ctx(); + _usingCtx11.a({ [Symbol.asyncDispose]: ()=>_async_to_generator(function*() {})() - }, !0); + }); break; } catch (_) { - var _error10 = _, _hasError10 = !0; + _usingCtx11.e = _; } finally{ - await _dispose(_stack11, _error10, _hasError10); + await _usingCtx11.d(); } for(;;)try { - var _stack12 = []; - _using(_stack12, { + var _usingCtx12 = _using_ctx(); + _usingCtx12.a({ [Symbol.asyncDispose]: ()=>_async_to_generator(function*() {})() - }, !0); + }); break; } catch (_) { - var _error11 = _, _hasError11 = !0; + _usingCtx12.e = _; } finally{ - await _dispose(_stack12, _error11, _hasError11); + await _usingCtx12.d(); } for(let x in {})try { - var _stack13 = []; - _using(_stack13, { + var _usingCtx13 = _using_ctx(); + _usingCtx13.a({ [Symbol.asyncDispose]: ()=>_async_to_generator(function*() {})() - }, !0); + }); } catch (_) { - var _error12 = _, _hasError12 = !0; + _usingCtx13.e = _; } finally{ - await _dispose(_stack13, _error12, _hasError12); + await _usingCtx13.d(); } for (let x of [])try { - var _stack14 = []; - _using(_stack14, { + var _usingCtx14 = _using_ctx(); + _usingCtx14.a({ [Symbol.asyncDispose]: ()=>_async_to_generator(function*() {})() - }, !0); + }); } catch (_) { - var _error13 = _, _hasError13 = !0; + _usingCtx14.e = _; } finally{ - await _dispose(_stack14, _error13, _hasError13); + await _usingCtx14.d(); } } catch (_) { - var _error14 = _, _hasError14 = !0; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error14, _hasError14); + await _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es2017).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es2017).1.normal.js index af414257e5f3..5cb90efe0440 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es2017).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es2017).1.normal.js @@ -1,289 +1,267 @@ //// [awaitUsingDeclarations.1.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; async function af() { try { - var _stack = []; - var d3 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d3 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true); + }); await null; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } } async function* ag() { try { - var _stack = []; - var d5 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d5 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true); + }); yield; await null; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } } try { - var _stack = []; - var d1 = _using(_stack, { + var _usingCtx = _using_ctx(); + var d1 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true); - var a = async ()=>{ + }); + const a = async ()=>{ try { - var _stack = []; - var d6 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d6 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } }; class C1 { async am() { try { - var _stack = []; - var d13 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d13 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true); + }); await null; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } } async *ag() { try { - var _stack = []; - var d15 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d15 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true); + }); yield; await null; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } } constructor(){ this.a = async ()=>{ try { - var _stack = []; - var d7 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d7 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } }; } } { try { - var _stack1 = []; - var d19 = _using(_stack1, { + var _usingCtx1 = _using_ctx(); + const d19 = _usingCtx1.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx1.e = _; } finally{ - await _dispose(_stack1, _error, _hasError); + await _usingCtx1.d(); } } switch(Math.random()){ case 0: try { - var _stack2 = []; - var d20 = _using(_stack2, { + var _usingCtx2 = _using_ctx(); + const d20 = _usingCtx2.a({ async [Symbol.asyncDispose] () {} - }, true); + }); break; } catch (_) { - var _error1 = _; - var _hasError1 = true; + _usingCtx2.e = _; } finally{ - await _dispose(_stack2, _error1, _hasError1); + await _usingCtx2.d(); } case 1: try { - var _stack3 = []; - var d21 = _using(_stack3, { + var _usingCtx3 = _using_ctx(); + const d21 = _usingCtx3.a({ async [Symbol.asyncDispose] () {} - }, true); + }); break; } catch (_) { - var _error2 = _; - var _hasError2 = true; + _usingCtx3.e = _; } finally{ - await _dispose(_stack3, _error2, _hasError2); + await _usingCtx3.d(); } } if (true) switch(0){ case 0: try { - var _stack4 = []; - var d22 = _using(_stack4, { + var _usingCtx4 = _using_ctx(); + const d22 = _usingCtx4.a({ async [Symbol.asyncDispose] () {} - }, true); + }); break; } catch (_) { - var _error3 = _; - var _hasError3 = true; + _usingCtx4.e = _; } finally{ - await _dispose(_stack4, _error3, _hasError3); + await _usingCtx4.d(); } } try { try { - var _stack5 = []; - var d23 = _using(_stack5, { + var _usingCtx5 = _using_ctx(); + const d23 = _usingCtx5.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error4 = _; - var _hasError4 = true; + _usingCtx5.e = _; } finally{ - await _dispose(_stack5, _error4, _hasError4); + await _usingCtx5.d(); } } catch (e) { try { - var _stack6 = []; - var d24 = _using(_stack6, { + var _usingCtx6 = _using_ctx(); + const d24 = _usingCtx6.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error5 = _; - var _hasError5 = true; + _usingCtx6.e = _; } finally{ - await _dispose(_stack6, _error5, _hasError5); + await _usingCtx6.d(); } } finally{ try { - var _stack7 = []; - var d25 = _using(_stack7, { + var _usingCtx7 = _using_ctx(); + const d25 = _usingCtx7.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error6 = _; - var _hasError6 = true; + _usingCtx7.e = _; } finally{ - await _dispose(_stack7, _error6, _hasError6); + await _usingCtx7.d(); } } if (true) { try { - var _stack8 = []; - var d26 = _using(_stack8, { + var _usingCtx8 = _using_ctx(); + const d26 = _usingCtx8.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error7 = _; - var _hasError7 = true; + _usingCtx8.e = _; } finally{ - await _dispose(_stack8, _error7, _hasError7); + await _usingCtx8.d(); } } else { try { - var _stack9 = []; - var d27 = _using(_stack9, { + var _usingCtx9 = _using_ctx(); + const d27 = _usingCtx9.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error8 = _; - var _hasError8 = true; + _usingCtx9.e = _; } finally{ - await _dispose(_stack9, _error8, _hasError8); + await _usingCtx9.d(); } } while(true){ try { - var _stack10 = []; - var d28 = _using(_stack10, { + var _usingCtx10 = _using_ctx(); + const d28 = _usingCtx10.a({ async [Symbol.asyncDispose] () {} - }, true); + }); break; } catch (_) { - var _error9 = _; - var _hasError9 = true; + _usingCtx10.e = _; } finally{ - await _dispose(_stack10, _error9, _hasError9); + await _usingCtx10.d(); } } do { try { - var _stack11 = []; - var d29 = _using(_stack11, { + var _usingCtx11 = _using_ctx(); + const d29 = _usingCtx11.a({ async [Symbol.asyncDispose] () {} - }, true); + }); break; } catch (_) { - var _error10 = _; - var _hasError10 = true; + _usingCtx11.e = _; } finally{ - await _dispose(_stack11, _error10, _hasError10); + await _usingCtx11.d(); } }while (true) for(;;){ try { - var _stack12 = []; - var d30 = _using(_stack12, { + var _usingCtx12 = _using_ctx(); + const d30 = _usingCtx12.a({ async [Symbol.asyncDispose] () {} - }, true); + }); break; } catch (_) { - var _error11 = _; - var _hasError11 = true; + _usingCtx12.e = _; } finally{ - await _dispose(_stack12, _error11, _hasError11); + await _usingCtx12.d(); } } for(const x in {}){ try { - var _stack13 = []; - var d31 = _using(_stack13, { + var _usingCtx13 = _using_ctx(); + const d31 = _usingCtx13.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error12 = _; - var _hasError12 = true; + _usingCtx13.e = _; } finally{ - await _dispose(_stack13, _error12, _hasError12); + await _usingCtx13.d(); } } for (const x of []){ try { - var _stack14 = []; - var d32 = _using(_stack14, { + var _usingCtx14 = _using_ctx(); + const d32 = _usingCtx14.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error13 = _; - var _hasError13 = true; + _usingCtx14.e = _; } finally{ - await _dispose(_stack14, _error13, _hasError13); + await _usingCtx14.d(); } } } catch (_) { - var _error14 = _; - var _hasError14 = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error14, _hasError14); + await _usingCtx.d(); } export { }; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es2017).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es2017).2.minified.js index f49688ce6ffd..6d3aad2315e7 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es2017).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es2017).2.minified.js @@ -1,155 +1,154 @@ //// [awaitUsingDeclarations.1.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); try { - var _stack1 = []; - _using(_stack1, { + var _usingCtx1 = _using_ctx(); + _usingCtx1.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx1.e = _; } finally{ - await _dispose(_stack1, _error, _hasError); + await _usingCtx1.d(); } switch(Math.random()){ case 0: try { - var _stack2 = []; - _using(_stack2, { + var _usingCtx2 = _using_ctx(); + _usingCtx2.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); break; } catch (_) { - var _error1 = _, _hasError1 = !0; + _usingCtx2.e = _; } finally{ - await _dispose(_stack2, _error1, _hasError1); + await _usingCtx2.d(); } case 1: try { - var _stack3 = []; - _using(_stack3, { + var _usingCtx3 = _using_ctx(); + _usingCtx3.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error2 = _, _hasError2 = !0; + _usingCtx3.e = _; } finally{ - await _dispose(_stack3, _error2, _hasError2); + await _usingCtx3.d(); } } try { - var _stack4 = []; - _using(_stack4, { + var _usingCtx4 = _using_ctx(); + _usingCtx4.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error3 = _, _hasError3 = !0; + _usingCtx4.e = _; } finally{ - await _dispose(_stack4, _error3, _hasError3); + await _usingCtx4.d(); } try { try { - var _stack5 = []; - _using(_stack5, { + var _usingCtx5 = _using_ctx(); + _usingCtx5.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error4 = _, _hasError4 = !0; + _usingCtx5.e = _; } finally{ - await _dispose(_stack5, _error4, _hasError4); + await _usingCtx5.d(); } } catch (e) { try { - var _stack6 = []; - _using(_stack6, { + var _usingCtx6 = _using_ctx(); + _usingCtx6.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error5 = _, _hasError5 = !0; + _usingCtx6.e = _; } finally{ - await _dispose(_stack6, _error5, _hasError5); + await _usingCtx6.d(); } } finally{ try { - var _stack7 = []; - _using(_stack7, { + var _usingCtx7 = _using_ctx(); + _usingCtx7.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error6 = _, _hasError6 = !0; + _usingCtx7.e = _; } finally{ - await _dispose(_stack7, _error6, _hasError6); + await _usingCtx7.d(); } } try { - var _stack8 = []; - _using(_stack8, { + var _usingCtx8 = _using_ctx(); + _usingCtx8.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error7 = _, _hasError7 = !0; + _usingCtx8.e = _; } finally{ - await _dispose(_stack8, _error7, _hasError7); + await _usingCtx8.d(); } for(;;)try { - var _stack10 = []; - _using(_stack10, { + var _usingCtx10 = _using_ctx(); + _usingCtx10.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); break; } catch (_) { - var _error9 = _, _hasError9 = !0; + _usingCtx10.e = _; } finally{ - await _dispose(_stack10, _error9, _hasError9); + await _usingCtx10.d(); } for(;;)try { - var _stack11 = []; - _using(_stack11, { + var _usingCtx11 = _using_ctx(); + _usingCtx11.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); break; } catch (_) { - var _error10 = _, _hasError10 = !0; + _usingCtx11.e = _; } finally{ - await _dispose(_stack11, _error10, _hasError10); + await _usingCtx11.d(); } for(;;)try { - var _stack12 = []; - _using(_stack12, { + var _usingCtx12 = _using_ctx(); + _usingCtx12.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); break; } catch (_) { - var _error11 = _, _hasError11 = !0; + _usingCtx12.e = _; } finally{ - await _dispose(_stack12, _error11, _hasError11); + await _usingCtx12.d(); } for(let x in {})try { - var _stack13 = []; - _using(_stack13, { + var _usingCtx13 = _using_ctx(); + _usingCtx13.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error12 = _, _hasError12 = !0; + _usingCtx13.e = _; } finally{ - await _dispose(_stack13, _error12, _hasError12); + await _usingCtx13.d(); } for (let x of [])try { - var _stack14 = []; - _using(_stack14, { + var _usingCtx14 = _using_ctx(); + _usingCtx14.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error13 = _, _hasError13 = !0; + _usingCtx14.e = _; } finally{ - await _dispose(_stack14, _error13, _hasError13); + await _usingCtx14.d(); } } catch (_) { - var _error14 = _, _hasError14 = !0; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error14, _hasError14); + await _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es2022).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es2022).1.normal.js index cd8f6d01da90..5f28d335d27f 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es2022).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es2022).1.normal.js @@ -1,289 +1,267 @@ //// [awaitUsingDeclarations.1.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; async function af() { try { - var _stack = []; - var d3 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d3 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true); + }); await null; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } } async function* ag() { try { - var _stack = []; - var d5 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d5 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true); + }); yield; await null; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } } try { - var _stack = []; - var d1 = _using(_stack, { + var _usingCtx = _using_ctx(); + var d1 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true); - var a = async ()=>{ + }); + const a = async ()=>{ try { - var _stack = []; - var d6 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d6 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } }; class C1 { async am() { try { - var _stack = []; - var d13 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d13 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true); + }); await null; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } } async *ag() { try { - var _stack = []; - var d15 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d15 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true); + }); yield; await null; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } } constructor(){ this.a = async ()=>{ try { - var _stack = []; - var d7 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d7 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } }; } } { try { - var _stack1 = []; - var d19 = _using(_stack1, { + var _usingCtx1 = _using_ctx(); + const d19 = _usingCtx1.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx1.e = _; } finally{ - await _dispose(_stack1, _error, _hasError); + await _usingCtx1.d(); } } switch(Math.random()){ case 0: try { - var _stack2 = []; - var d20 = _using(_stack2, { + var _usingCtx2 = _using_ctx(); + const d20 = _usingCtx2.a({ async [Symbol.asyncDispose] () {} - }, true); + }); break; } catch (_) { - var _error1 = _; - var _hasError1 = true; + _usingCtx2.e = _; } finally{ - await _dispose(_stack2, _error1, _hasError1); + await _usingCtx2.d(); } case 1: try { - var _stack3 = []; - var d21 = _using(_stack3, { + var _usingCtx3 = _using_ctx(); + const d21 = _usingCtx3.a({ async [Symbol.asyncDispose] () {} - }, true); + }); break; } catch (_) { - var _error2 = _; - var _hasError2 = true; + _usingCtx3.e = _; } finally{ - await _dispose(_stack3, _error2, _hasError2); + await _usingCtx3.d(); } } if (true) switch(0){ case 0: try { - var _stack4 = []; - var d22 = _using(_stack4, { + var _usingCtx4 = _using_ctx(); + const d22 = _usingCtx4.a({ async [Symbol.asyncDispose] () {} - }, true); + }); break; } catch (_) { - var _error3 = _; - var _hasError3 = true; + _usingCtx4.e = _; } finally{ - await _dispose(_stack4, _error3, _hasError3); + await _usingCtx4.d(); } } try { try { - var _stack5 = []; - var d23 = _using(_stack5, { + var _usingCtx5 = _using_ctx(); + const d23 = _usingCtx5.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error4 = _; - var _hasError4 = true; + _usingCtx5.e = _; } finally{ - await _dispose(_stack5, _error4, _hasError4); + await _usingCtx5.d(); } } catch { try { - var _stack6 = []; - var d24 = _using(_stack6, { + var _usingCtx6 = _using_ctx(); + const d24 = _usingCtx6.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error5 = _; - var _hasError5 = true; + _usingCtx6.e = _; } finally{ - await _dispose(_stack6, _error5, _hasError5); + await _usingCtx6.d(); } } finally{ try { - var _stack7 = []; - var d25 = _using(_stack7, { + var _usingCtx7 = _using_ctx(); + const d25 = _usingCtx7.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error6 = _; - var _hasError6 = true; + _usingCtx7.e = _; } finally{ - await _dispose(_stack7, _error6, _hasError6); + await _usingCtx7.d(); } } if (true) { try { - var _stack8 = []; - var d26 = _using(_stack8, { + var _usingCtx8 = _using_ctx(); + const d26 = _usingCtx8.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error7 = _; - var _hasError7 = true; + _usingCtx8.e = _; } finally{ - await _dispose(_stack8, _error7, _hasError7); + await _usingCtx8.d(); } } else { try { - var _stack9 = []; - var d27 = _using(_stack9, { + var _usingCtx9 = _using_ctx(); + const d27 = _usingCtx9.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error8 = _; - var _hasError8 = true; + _usingCtx9.e = _; } finally{ - await _dispose(_stack9, _error8, _hasError8); + await _usingCtx9.d(); } } while(true){ try { - var _stack10 = []; - var d28 = _using(_stack10, { + var _usingCtx10 = _using_ctx(); + const d28 = _usingCtx10.a({ async [Symbol.asyncDispose] () {} - }, true); + }); break; } catch (_) { - var _error9 = _; - var _hasError9 = true; + _usingCtx10.e = _; } finally{ - await _dispose(_stack10, _error9, _hasError9); + await _usingCtx10.d(); } } do { try { - var _stack11 = []; - var d29 = _using(_stack11, { + var _usingCtx11 = _using_ctx(); + const d29 = _usingCtx11.a({ async [Symbol.asyncDispose] () {} - }, true); + }); break; } catch (_) { - var _error10 = _; - var _hasError10 = true; + _usingCtx11.e = _; } finally{ - await _dispose(_stack11, _error10, _hasError10); + await _usingCtx11.d(); } }while (true) for(;;){ try { - var _stack12 = []; - var d30 = _using(_stack12, { + var _usingCtx12 = _using_ctx(); + const d30 = _usingCtx12.a({ async [Symbol.asyncDispose] () {} - }, true); + }); break; } catch (_) { - var _error11 = _; - var _hasError11 = true; + _usingCtx12.e = _; } finally{ - await _dispose(_stack12, _error11, _hasError11); + await _usingCtx12.d(); } } for(const x in {}){ try { - var _stack13 = []; - var d31 = _using(_stack13, { + var _usingCtx13 = _using_ctx(); + const d31 = _usingCtx13.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error12 = _; - var _hasError12 = true; + _usingCtx13.e = _; } finally{ - await _dispose(_stack13, _error12, _hasError12); + await _usingCtx13.d(); } } for (const x of []){ try { - var _stack14 = []; - var d32 = _using(_stack14, { + var _usingCtx14 = _using_ctx(); + const d32 = _usingCtx14.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error13 = _; - var _hasError13 = true; + _usingCtx14.e = _; } finally{ - await _dispose(_stack14, _error13, _hasError13); + await _usingCtx14.d(); } } } catch (_) { - var _error14 = _; - var _hasError14 = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error14, _hasError14); + await _usingCtx.d(); } export { }; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es2022).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es2022).2.minified.js index 6f8a888b9f65..db8011a13132 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es2022).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es2022).2.minified.js @@ -1,155 +1,154 @@ //// [awaitUsingDeclarations.1.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); try { - var _stack1 = []; - _using(_stack1, { + var _usingCtx1 = _using_ctx(); + _usingCtx1.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx1.e = _; } finally{ - await _dispose(_stack1, _error, _hasError); + await _usingCtx1.d(); } switch(Math.random()){ case 0: try { - var _stack2 = []; - _using(_stack2, { + var _usingCtx2 = _using_ctx(); + _usingCtx2.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); break; } catch (_) { - var _error1 = _, _hasError1 = !0; + _usingCtx2.e = _; } finally{ - await _dispose(_stack2, _error1, _hasError1); + await _usingCtx2.d(); } case 1: try { - var _stack3 = []; - _using(_stack3, { + var _usingCtx3 = _using_ctx(); + _usingCtx3.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error2 = _, _hasError2 = !0; + _usingCtx3.e = _; } finally{ - await _dispose(_stack3, _error2, _hasError2); + await _usingCtx3.d(); } } try { - var _stack4 = []; - _using(_stack4, { + var _usingCtx4 = _using_ctx(); + _usingCtx4.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error3 = _, _hasError3 = !0; + _usingCtx4.e = _; } finally{ - await _dispose(_stack4, _error3, _hasError3); + await _usingCtx4.d(); } try { try { - var _stack5 = []; - _using(_stack5, { + var _usingCtx5 = _using_ctx(); + _usingCtx5.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error4 = _, _hasError4 = !0; + _usingCtx5.e = _; } finally{ - await _dispose(_stack5, _error4, _hasError4); + await _usingCtx5.d(); } } catch { try { - var _stack6 = []; - _using(_stack6, { + var _usingCtx6 = _using_ctx(); + _usingCtx6.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error5 = _, _hasError5 = !0; + _usingCtx6.e = _; } finally{ - await _dispose(_stack6, _error5, _hasError5); + await _usingCtx6.d(); } } finally{ try { - var _stack7 = []; - _using(_stack7, { + var _usingCtx7 = _using_ctx(); + _usingCtx7.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error6 = _, _hasError6 = !0; + _usingCtx7.e = _; } finally{ - await _dispose(_stack7, _error6, _hasError6); + await _usingCtx7.d(); } } try { - var _stack8 = []; - _using(_stack8, { + var _usingCtx8 = _using_ctx(); + _usingCtx8.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error7 = _, _hasError7 = !0; + _usingCtx8.e = _; } finally{ - await _dispose(_stack8, _error7, _hasError7); + await _usingCtx8.d(); } for(;;)try { - var _stack10 = []; - _using(_stack10, { + var _usingCtx10 = _using_ctx(); + _usingCtx10.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); break; } catch (_) { - var _error9 = _, _hasError9 = !0; + _usingCtx10.e = _; } finally{ - await _dispose(_stack10, _error9, _hasError9); + await _usingCtx10.d(); } for(;;)try { - var _stack11 = []; - _using(_stack11, { + var _usingCtx11 = _using_ctx(); + _usingCtx11.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); break; } catch (_) { - var _error10 = _, _hasError10 = !0; + _usingCtx11.e = _; } finally{ - await _dispose(_stack11, _error10, _hasError10); + await _usingCtx11.d(); } for(;;)try { - var _stack12 = []; - _using(_stack12, { + var _usingCtx12 = _using_ctx(); + _usingCtx12.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); break; } catch (_) { - var _error11 = _, _hasError11 = !0; + _usingCtx12.e = _; } finally{ - await _dispose(_stack12, _error11, _hasError11); + await _usingCtx12.d(); } for(let x in {})try { - var _stack13 = []; - _using(_stack13, { + var _usingCtx13 = _using_ctx(); + _usingCtx13.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error12 = _, _hasError12 = !0; + _usingCtx13.e = _; } finally{ - await _dispose(_stack13, _error12, _hasError12); + await _usingCtx13.d(); } for (let x of [])try { - var _stack14 = []; - _using(_stack14, { + var _usingCtx14 = _using_ctx(); + _usingCtx14.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error13 = _, _hasError13 = !0; + _usingCtx14.e = _; } finally{ - await _dispose(_stack14, _error13, _hasError13); + await _usingCtx14.d(); } } catch (_) { - var _error14 = _, _hasError14 = !0; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error14, _hasError14); + await _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es5).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es5).1.normal.js index 1a5f1f5396b8..d00226235d98 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es5).1.normal.js @@ -5,14 +5,13 @@ import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; import { _ as _define_property } from "@swc/helpers/_/_define_property"; import { _ as _wrap_async_generator } from "@swc/helpers/_/_wrap_async_generator"; import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; function af() { return _af.apply(this, arguments); } function _af() { _af = _async_to_generator(function() { - var _stack, d3, _, _error, _hasError; + var _usingCtx, d3, _; return _ts_generator(this, function(_state) { switch(_state.label){ case 0: @@ -22,8 +21,8 @@ function _af() { 3, 5 ]); - _stack = []; - d3 = _using(_stack, _define_property({}, Symbol.asyncDispose, function() { + _usingCtx = _using_ctx(); + d3 = _usingCtx.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -31,7 +30,7 @@ function _af() { ]; }); })(); - }), true); + })); return [ 4, null @@ -44,8 +43,7 @@ function _af() { ]; case 2: _ = _state.sent(); - _error = _; - _hasError = true; + _usingCtx.e = _; return [ 3, 5 @@ -53,7 +51,7 @@ function _af() { case 3: return [ 4, - _dispose(_stack, _error, _hasError) + _usingCtx.d() ]; case 4: _state.sent(); @@ -74,7 +72,7 @@ function ag() { } function _ag() { _ag = _wrap_async_generator(function() { - var _stack, d5, _, _error, _hasError; + var _usingCtx, d5, _; return _ts_generator(this, function(_state) { switch(_state.label){ case 0: @@ -84,8 +82,8 @@ function _ag() { 4, 6 ]); - _stack = []; - d5 = _using(_stack, _define_property({}, Symbol.asyncDispose, function() { + _usingCtx = _using_ctx(); + d5 = _usingCtx.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -93,7 +91,7 @@ function _ag() { ]; }); })(); - }), true); + })); return [ 4 ]; @@ -111,8 +109,7 @@ function _ag() { ]; case 3: _ = _state.sent(); - _error = _; - _hasError = true; + _usingCtx.e = _; return [ 3, 6 @@ -120,7 +117,7 @@ function _ag() { case 4: return [ 4, - _await_async_generator(_dispose(_stack, _error, _hasError)) + _await_async_generator(_usingCtx.d()) ]; case 5: _state.sent(); @@ -137,8 +134,8 @@ function _ag() { return _ag.apply(this, arguments); } try { - var _stack = []; - var d1 = _using(_stack, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx = _using_ctx(); + var d1 = _usingCtx.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -146,10 +143,10 @@ try { ]; }); })(); - }), true); + })); var a = function() { var _ref = _async_to_generator(function() { - var _stack, d6, _, _error, _hasError; + var _usingCtx, d6, _; return _ts_generator(this, function(_state) { switch(_state.label){ case 0: @@ -159,8 +156,8 @@ try { 2, 4 ]); - _stack = []; - d6 = _using(_stack, _define_property({}, Symbol.asyncDispose, function() { + _usingCtx = _using_ctx(); + d6 = _usingCtx.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -168,15 +165,14 @@ try { ]; }); })(); - }), true); + })); return [ 3, 4 ]; case 1: _ = _state.sent(); - _error = _; - _hasError = true; + _usingCtx.e = _; return [ 3, 4 @@ -184,7 +180,7 @@ try { case 2: return [ 4, - _dispose(_stack, _error, _hasError) + _usingCtx.d() ]; case 3: _state.sent(); @@ -207,7 +203,7 @@ try { function C1() { _class_call_check(this, C1); this.a = /*#__PURE__*/ _async_to_generator(function() { - var _stack, d7, _, _error, _hasError; + var _usingCtx, d7, _; return _ts_generator(this, function(_state) { switch(_state.label){ case 0: @@ -217,8 +213,8 @@ try { 2, 4 ]); - _stack = []; - d7 = _using(_stack, _define_property({}, Symbol.asyncDispose, function() { + _usingCtx = _using_ctx(); + d7 = _usingCtx.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -226,15 +222,14 @@ try { ]; }); })(); - }), true); + })); return [ 3, 4 ]; case 1: _ = _state.sent(); - _error = _; - _hasError = true; + _usingCtx.e = _; return [ 3, 4 @@ -242,7 +237,7 @@ try { case 2: return [ 4, - _dispose(_stack, _error, _hasError) + _usingCtx.d() ]; case 3: _state.sent(); @@ -260,7 +255,7 @@ try { var _proto = C1.prototype; _proto.am = function am() { return _async_to_generator(function() { - var _stack, d13, _, _error, _hasError; + var _usingCtx, d13, _; return _ts_generator(this, function(_state) { switch(_state.label){ case 0: @@ -270,8 +265,8 @@ try { 3, 5 ]); - _stack = []; - d13 = _using(_stack, _define_property({}, Symbol.asyncDispose, function() { + _usingCtx = _using_ctx(); + d13 = _usingCtx.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -279,7 +274,7 @@ try { ]; }); })(); - }), true); + })); return [ 4, null @@ -292,8 +287,7 @@ try { ]; case 2: _ = _state.sent(); - _error = _; - _hasError = true; + _usingCtx.e = _; return [ 3, 5 @@ -301,7 +295,7 @@ try { case 3: return [ 4, - _dispose(_stack, _error, _hasError) + _usingCtx.d() ]; case 4: _state.sent(); @@ -318,7 +312,7 @@ try { }; _proto.ag = function ag() { return _wrap_async_generator(function() { - var _stack, d15, _, _error, _hasError; + var _usingCtx, d15, _; return _ts_generator(this, function(_state) { switch(_state.label){ case 0: @@ -328,8 +322,8 @@ try { 4, 6 ]); - _stack = []; - d15 = _using(_stack, _define_property({}, Symbol.asyncDispose, function() { + _usingCtx = _using_ctx(); + d15 = _usingCtx.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -337,7 +331,7 @@ try { ]; }); })(); - }), true); + })); return [ 4 ]; @@ -355,8 +349,7 @@ try { ]; case 3: _ = _state.sent(); - _error = _; - _hasError = true; + _usingCtx.e = _; return [ 3, 6 @@ -364,7 +357,7 @@ try { case 4: return [ 4, - _await_async_generator(_dispose(_stack, _error, _hasError)) + _await_async_generator(_usingCtx.d()) ]; case 5: _state.sent(); @@ -383,8 +376,8 @@ try { }(); { try { - var _stack1 = []; - var d19 = _using(_stack1, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx1 = _using_ctx(); + var d19 = _usingCtx1.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -392,19 +385,18 @@ try { ]; }); })(); - }), true); + })); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx1.e = _; } finally{ - await _dispose(_stack1, _error, _hasError); + await _usingCtx1.d(); } } switch(Math.random()){ case 0: try { - var _stack2 = []; - var d20 = _using(_stack2, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx2 = _using_ctx(); + var d20 = _usingCtx2.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -412,18 +404,17 @@ try { ]; }); })(); - }), true); + })); break; } catch (_) { - var _error1 = _; - var _hasError1 = true; + _usingCtx2.e = _; } finally{ - await _dispose(_stack2, _error1, _hasError1); + await _usingCtx2.d(); } case 1: try { - var _stack3 = []; - var d21 = _using(_stack3, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx3 = _using_ctx(); + var d21 = _usingCtx3.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -431,20 +422,19 @@ try { ]; }); })(); - }), true); + })); break; } catch (_) { - var _error2 = _; - var _hasError2 = true; + _usingCtx3.e = _; } finally{ - await _dispose(_stack3, _error2, _hasError2); + await _usingCtx3.d(); } } if (true) switch(0){ case 0: try { - var _stack4 = []; - var d22 = _using(_stack4, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx4 = _using_ctx(); + var d22 = _usingCtx4.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -452,19 +442,18 @@ try { ]; }); })(); - }), true); + })); break; } catch (_) { - var _error3 = _; - var _hasError3 = true; + _usingCtx4.e = _; } finally{ - await _dispose(_stack4, _error3, _hasError3); + await _usingCtx4.d(); } } try { try { - var _stack5 = []; - var d23 = _using(_stack5, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx5 = _using_ctx(); + var d23 = _usingCtx5.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -472,17 +461,16 @@ try { ]; }); })(); - }), true); + })); } catch (_) { - var _error4 = _; - var _hasError4 = true; + _usingCtx5.e = _; } finally{ - await _dispose(_stack5, _error4, _hasError4); + await _usingCtx5.d(); } } catch (e) { try { - var _stack6 = []; - var d24 = _using(_stack6, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx6 = _using_ctx(); + var d24 = _usingCtx6.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -490,17 +478,16 @@ try { ]; }); })(); - }), true); + })); } catch (_) { - var _error5 = _; - var _hasError5 = true; + _usingCtx6.e = _; } finally{ - await _dispose(_stack6, _error5, _hasError5); + await _usingCtx6.d(); } } finally{ try { - var _stack7 = []; - var d25 = _using(_stack7, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx7 = _using_ctx(); + var d25 = _usingCtx7.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -508,18 +495,17 @@ try { ]; }); })(); - }), true); + })); } catch (_) { - var _error6 = _; - var _hasError6 = true; + _usingCtx7.e = _; } finally{ - await _dispose(_stack7, _error6, _hasError6); + await _usingCtx7.d(); } } if (true) { try { - var _stack8 = []; - var d26 = _using(_stack8, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx8 = _using_ctx(); + var d26 = _usingCtx8.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -527,17 +513,16 @@ try { ]; }); })(); - }), true); + })); } catch (_) { - var _error7 = _; - var _hasError7 = true; + _usingCtx8.e = _; } finally{ - await _dispose(_stack8, _error7, _hasError7); + await _usingCtx8.d(); } } else { try { - var _stack9 = []; - var d27 = _using(_stack9, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx9 = _using_ctx(); + var d27 = _usingCtx9.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -545,18 +530,17 @@ try { ]; }); })(); - }), true); + })); } catch (_) { - var _error8 = _; - var _hasError8 = true; + _usingCtx9.e = _; } finally{ - await _dispose(_stack9, _error8, _hasError8); + await _usingCtx9.d(); } } while(true){ try { - var _stack10 = []; - var d28 = _using(_stack10, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx10 = _using_ctx(); + var d28 = _usingCtx10.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -564,19 +548,18 @@ try { ]; }); })(); - }), true); + })); break; } catch (_) { - var _error9 = _; - var _hasError9 = true; + _usingCtx10.e = _; } finally{ - await _dispose(_stack10, _error9, _hasError9); + await _usingCtx10.d(); } } do { try { - var _stack11 = []; - var d29 = _using(_stack11, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx11 = _using_ctx(); + var d29 = _usingCtx11.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -584,19 +567,18 @@ try { ]; }); })(); - }), true); + })); break; } catch (_) { - var _error10 = _; - var _hasError10 = true; + _usingCtx11.e = _; } finally{ - await _dispose(_stack11, _error10, _hasError10); + await _usingCtx11.d(); } }while (true); for(;;){ try { - var _stack12 = []; - var d30 = _using(_stack12, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx12 = _using_ctx(); + var d30 = _usingCtx12.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -604,19 +586,18 @@ try { ]; }); })(); - }), true); + })); break; } catch (_) { - var _error11 = _; - var _hasError11 = true; + _usingCtx12.e = _; } finally{ - await _dispose(_stack12, _error11, _hasError11); + await _usingCtx12.d(); } } for(var x in {}){ try { - var _stack13 = []; - var d31 = _using(_stack13, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx13 = _using_ctx(); + var d31 = _usingCtx13.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -624,19 +605,18 @@ try { ]; }); })(); - }), true); + })); } catch (_) { - var _error12 = _; - var _hasError12 = true; + _usingCtx13.e = _; } finally{ - await _dispose(_stack13, _error12, _hasError12); + await _usingCtx13.d(); } } for(var _i = 0, _iter = []; _i < _iter.length; _i++){ var x1 = _iter[_i]; try { - var _stack14 = []; - var d32 = _using(_stack14, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx14 = _using_ctx(); + var d32 = _usingCtx14.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -644,18 +624,16 @@ try { ]; }); })(); - }), true); + })); } catch (_) { - var _error13 = _; - var _hasError13 = true; + _usingCtx14.e = _; } finally{ - await _dispose(_stack14, _error13, _hasError13); + await _usingCtx14.d(); } } } catch (_) { - var _error14 = _; - var _hasError14 = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error14, _hasError14); + await _usingCtx.d(); } export { }; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es5).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es5).2.minified.js index a33555a6c280..f7e7ed4ef76b 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=es5).2.minified.js @@ -5,11 +5,10 @@ import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; import { _ as _define_property } from "@swc/helpers/_/_define_property"; import { _ as _wrap_async_generator } from "@swc/helpers/_/_wrap_async_generator"; import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx = _using_ctx(); + _usingCtx.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -17,8 +16,8 @@ try { ]; }); })(); - }), !0), _async_to_generator(function() { - var _stack, _error, _hasError; + })), _async_to_generator(function() { + var _usingCtx, _; return _ts_generator(this, function(_state) { switch(_state.label){ case 0: @@ -27,7 +26,7 @@ try { 1, 2, 4 - ]), _stack = [], _using(_stack, _define_property({}, Symbol.asyncDispose, function() { + ]), (_usingCtx = _using_ctx()).a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -35,19 +34,19 @@ try { ]; }); })(); - }), !0), [ + })), [ 3, 4 ]; case 1: - return _error = _state.sent(), _hasError = !0, [ + return _ = _state.sent(), _usingCtx.e = _, [ 3, 4 ]; case 2: return [ 4, - _dispose(_stack, _error, _hasError) + _usingCtx.d() ]; case 3: return _state.sent(), [ @@ -61,8 +60,8 @@ try { }); }); try { - var _stack1 = []; - _using(_stack1, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx1 = _using_ctx(); + _usingCtx1.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -70,17 +69,17 @@ try { ]; }); })(); - }), !0); + })); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx1.e = _; } finally{ - await _dispose(_stack1, _error, _hasError); + await _usingCtx1.d(); } switch(Math.random()){ case 0: try { - var _stack2 = []; - _using(_stack2, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx2 = _using_ctx(); + _usingCtx2.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -88,17 +87,17 @@ try { ]; }); })(); - }), !0); + })); break; } catch (_) { - var _error1 = _, _hasError1 = !0; + _usingCtx2.e = _; } finally{ - await _dispose(_stack2, _error1, _hasError1); + await _usingCtx2.d(); } case 1: try { - var _stack3 = []; - _using(_stack3, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx3 = _using_ctx(); + _usingCtx3.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -106,16 +105,16 @@ try { ]; }); })(); - }), !0); + })); } catch (_) { - var _error2 = _, _hasError2 = !0; + _usingCtx3.e = _; } finally{ - await _dispose(_stack3, _error2, _hasError2); + await _usingCtx3.d(); } } try { - var _stack4 = []; - _using(_stack4, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx4 = _using_ctx(); + _usingCtx4.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -123,16 +122,16 @@ try { ]; }); })(); - }), !0); + })); } catch (_) { - var _error3 = _, _hasError3 = !0; + _usingCtx4.e = _; } finally{ - await _dispose(_stack4, _error3, _hasError3); + await _usingCtx4.d(); } try { try { - var _stack5 = []; - _using(_stack5, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx5 = _using_ctx(); + _usingCtx5.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -140,16 +139,16 @@ try { ]; }); })(); - }), !0); + })); } catch (_) { - var _error4 = _, _hasError4 = !0; + _usingCtx5.e = _; } finally{ - await _dispose(_stack5, _error4, _hasError4); + await _usingCtx5.d(); } } catch (e) { try { - var _stack6 = []; - _using(_stack6, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx6 = _using_ctx(); + _usingCtx6.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -157,16 +156,16 @@ try { ]; }); })(); - }), !0); + })); } catch (_) { - var _error5 = _, _hasError5 = !0; + _usingCtx6.e = _; } finally{ - await _dispose(_stack6, _error5, _hasError5); + await _usingCtx6.d(); } } finally{ try { - var _stack7 = []; - _using(_stack7, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx7 = _using_ctx(); + _usingCtx7.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -174,16 +173,16 @@ try { ]; }); })(); - }), !0); + })); } catch (_) { - var _error6 = _, _hasError6 = !0; + _usingCtx7.e = _; } finally{ - await _dispose(_stack7, _error6, _hasError6); + await _usingCtx7.d(); } } try { - var _stack8 = []; - _using(_stack8, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx8 = _using_ctx(); + _usingCtx8.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -191,15 +190,15 @@ try { ]; }); })(); - }), !0); + })); } catch (_) { - var _error7 = _, _hasError7 = !0; + _usingCtx8.e = _; } finally{ - await _dispose(_stack8, _error7, _hasError7); + await _usingCtx8.d(); } for(;;)try { - var _stack10 = []; - _using(_stack10, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx10 = _using_ctx(); + _usingCtx10.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -207,16 +206,16 @@ try { ]; }); })(); - }), !0); + })); break; } catch (_) { - var _error9 = _, _hasError9 = !0; + _usingCtx10.e = _; } finally{ - await _dispose(_stack10, _error9, _hasError9); + await _usingCtx10.d(); } for(;;)try { - var _stack11 = []; - _using(_stack11, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx11 = _using_ctx(); + _usingCtx11.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -224,16 +223,16 @@ try { ]; }); })(); - }), !0); + })); break; } catch (_) { - var _error10 = _, _hasError10 = !0; + _usingCtx11.e = _; } finally{ - await _dispose(_stack11, _error10, _hasError10); + await _usingCtx11.d(); } for(;;)try { - var _stack12 = []; - _using(_stack12, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx12 = _using_ctx(); + _usingCtx12.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -241,16 +240,16 @@ try { ]; }); })(); - }), !0); + })); break; } catch (_) { - var _error11 = _, _hasError11 = !0; + _usingCtx12.e = _; } finally{ - await _dispose(_stack12, _error11, _hasError11); + await _usingCtx12.d(); } for(var x in {})try { - var _stack13 = []; - _using(_stack13, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx13 = _using_ctx(); + _usingCtx13.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -258,17 +257,17 @@ try { ]; }); })(); - }), !0); + })); } catch (_) { - var _error12 = _, _hasError12 = !0; + _usingCtx13.e = _; } finally{ - await _dispose(_stack13, _error12, _hasError12); + await _usingCtx13.d(); } for(var _i = 0, _iter = []; _i < _iter.length; _i++){ _iter[_i]; try { - var _stack14 = []; - _using(_stack14, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx14 = _using_ctx(); + _usingCtx14.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -276,15 +275,15 @@ try { ]; }); })(); - }), !0); + })); } catch (_) { - var _error13 = _, _hasError13 = !0; + _usingCtx14.e = _; } finally{ - await _dispose(_stack14, _error13, _hasError13); + await _usingCtx14.d(); } } } catch (_) { - var _error14 = _, _hasError14 = !0; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error14, _hasError14); + await _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=esnext).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=esnext).1.normal.js index cd8f6d01da90..5f28d335d27f 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=esnext).1.normal.js @@ -1,289 +1,267 @@ //// [awaitUsingDeclarations.1.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; async function af() { try { - var _stack = []; - var d3 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d3 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true); + }); await null; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } } async function* ag() { try { - var _stack = []; - var d5 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d5 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true); + }); yield; await null; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } } try { - var _stack = []; - var d1 = _using(_stack, { + var _usingCtx = _using_ctx(); + var d1 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true); - var a = async ()=>{ + }); + const a = async ()=>{ try { - var _stack = []; - var d6 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d6 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } }; class C1 { async am() { try { - var _stack = []; - var d13 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d13 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true); + }); await null; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } } async *ag() { try { - var _stack = []; - var d15 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d15 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true); + }); yield; await null; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } } constructor(){ this.a = async ()=>{ try { - var _stack = []; - var d7 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d7 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } }; } } { try { - var _stack1 = []; - var d19 = _using(_stack1, { + var _usingCtx1 = _using_ctx(); + const d19 = _usingCtx1.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx1.e = _; } finally{ - await _dispose(_stack1, _error, _hasError); + await _usingCtx1.d(); } } switch(Math.random()){ case 0: try { - var _stack2 = []; - var d20 = _using(_stack2, { + var _usingCtx2 = _using_ctx(); + const d20 = _usingCtx2.a({ async [Symbol.asyncDispose] () {} - }, true); + }); break; } catch (_) { - var _error1 = _; - var _hasError1 = true; + _usingCtx2.e = _; } finally{ - await _dispose(_stack2, _error1, _hasError1); + await _usingCtx2.d(); } case 1: try { - var _stack3 = []; - var d21 = _using(_stack3, { + var _usingCtx3 = _using_ctx(); + const d21 = _usingCtx3.a({ async [Symbol.asyncDispose] () {} - }, true); + }); break; } catch (_) { - var _error2 = _; - var _hasError2 = true; + _usingCtx3.e = _; } finally{ - await _dispose(_stack3, _error2, _hasError2); + await _usingCtx3.d(); } } if (true) switch(0){ case 0: try { - var _stack4 = []; - var d22 = _using(_stack4, { + var _usingCtx4 = _using_ctx(); + const d22 = _usingCtx4.a({ async [Symbol.asyncDispose] () {} - }, true); + }); break; } catch (_) { - var _error3 = _; - var _hasError3 = true; + _usingCtx4.e = _; } finally{ - await _dispose(_stack4, _error3, _hasError3); + await _usingCtx4.d(); } } try { try { - var _stack5 = []; - var d23 = _using(_stack5, { + var _usingCtx5 = _using_ctx(); + const d23 = _usingCtx5.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error4 = _; - var _hasError4 = true; + _usingCtx5.e = _; } finally{ - await _dispose(_stack5, _error4, _hasError4); + await _usingCtx5.d(); } } catch { try { - var _stack6 = []; - var d24 = _using(_stack6, { + var _usingCtx6 = _using_ctx(); + const d24 = _usingCtx6.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error5 = _; - var _hasError5 = true; + _usingCtx6.e = _; } finally{ - await _dispose(_stack6, _error5, _hasError5); + await _usingCtx6.d(); } } finally{ try { - var _stack7 = []; - var d25 = _using(_stack7, { + var _usingCtx7 = _using_ctx(); + const d25 = _usingCtx7.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error6 = _; - var _hasError6 = true; + _usingCtx7.e = _; } finally{ - await _dispose(_stack7, _error6, _hasError6); + await _usingCtx7.d(); } } if (true) { try { - var _stack8 = []; - var d26 = _using(_stack8, { + var _usingCtx8 = _using_ctx(); + const d26 = _usingCtx8.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error7 = _; - var _hasError7 = true; + _usingCtx8.e = _; } finally{ - await _dispose(_stack8, _error7, _hasError7); + await _usingCtx8.d(); } } else { try { - var _stack9 = []; - var d27 = _using(_stack9, { + var _usingCtx9 = _using_ctx(); + const d27 = _usingCtx9.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error8 = _; - var _hasError8 = true; + _usingCtx9.e = _; } finally{ - await _dispose(_stack9, _error8, _hasError8); + await _usingCtx9.d(); } } while(true){ try { - var _stack10 = []; - var d28 = _using(_stack10, { + var _usingCtx10 = _using_ctx(); + const d28 = _usingCtx10.a({ async [Symbol.asyncDispose] () {} - }, true); + }); break; } catch (_) { - var _error9 = _; - var _hasError9 = true; + _usingCtx10.e = _; } finally{ - await _dispose(_stack10, _error9, _hasError9); + await _usingCtx10.d(); } } do { try { - var _stack11 = []; - var d29 = _using(_stack11, { + var _usingCtx11 = _using_ctx(); + const d29 = _usingCtx11.a({ async [Symbol.asyncDispose] () {} - }, true); + }); break; } catch (_) { - var _error10 = _; - var _hasError10 = true; + _usingCtx11.e = _; } finally{ - await _dispose(_stack11, _error10, _hasError10); + await _usingCtx11.d(); } }while (true) for(;;){ try { - var _stack12 = []; - var d30 = _using(_stack12, { + var _usingCtx12 = _using_ctx(); + const d30 = _usingCtx12.a({ async [Symbol.asyncDispose] () {} - }, true); + }); break; } catch (_) { - var _error11 = _; - var _hasError11 = true; + _usingCtx12.e = _; } finally{ - await _dispose(_stack12, _error11, _hasError11); + await _usingCtx12.d(); } } for(const x in {}){ try { - var _stack13 = []; - var d31 = _using(_stack13, { + var _usingCtx13 = _using_ctx(); + const d31 = _usingCtx13.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error12 = _; - var _hasError12 = true; + _usingCtx13.e = _; } finally{ - await _dispose(_stack13, _error12, _hasError12); + await _usingCtx13.d(); } } for (const x of []){ try { - var _stack14 = []; - var d32 = _using(_stack14, { + var _usingCtx14 = _using_ctx(); + const d32 = _usingCtx14.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error13 = _; - var _hasError13 = true; + _usingCtx14.e = _; } finally{ - await _dispose(_stack14, _error13, _hasError13); + await _usingCtx14.d(); } } } catch (_) { - var _error14 = _; - var _hasError14 = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error14, _hasError14); + await _usingCtx.d(); } export { }; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=esnext).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=esnext).2.minified.js index 6f8a888b9f65..db8011a13132 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.1(target=esnext).2.minified.js @@ -1,155 +1,154 @@ //// [awaitUsingDeclarations.1.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); try { - var _stack1 = []; - _using(_stack1, { + var _usingCtx1 = _using_ctx(); + _usingCtx1.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx1.e = _; } finally{ - await _dispose(_stack1, _error, _hasError); + await _usingCtx1.d(); } switch(Math.random()){ case 0: try { - var _stack2 = []; - _using(_stack2, { + var _usingCtx2 = _using_ctx(); + _usingCtx2.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); break; } catch (_) { - var _error1 = _, _hasError1 = !0; + _usingCtx2.e = _; } finally{ - await _dispose(_stack2, _error1, _hasError1); + await _usingCtx2.d(); } case 1: try { - var _stack3 = []; - _using(_stack3, { + var _usingCtx3 = _using_ctx(); + _usingCtx3.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error2 = _, _hasError2 = !0; + _usingCtx3.e = _; } finally{ - await _dispose(_stack3, _error2, _hasError2); + await _usingCtx3.d(); } } try { - var _stack4 = []; - _using(_stack4, { + var _usingCtx4 = _using_ctx(); + _usingCtx4.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error3 = _, _hasError3 = !0; + _usingCtx4.e = _; } finally{ - await _dispose(_stack4, _error3, _hasError3); + await _usingCtx4.d(); } try { try { - var _stack5 = []; - _using(_stack5, { + var _usingCtx5 = _using_ctx(); + _usingCtx5.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error4 = _, _hasError4 = !0; + _usingCtx5.e = _; } finally{ - await _dispose(_stack5, _error4, _hasError4); + await _usingCtx5.d(); } } catch { try { - var _stack6 = []; - _using(_stack6, { + var _usingCtx6 = _using_ctx(); + _usingCtx6.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error5 = _, _hasError5 = !0; + _usingCtx6.e = _; } finally{ - await _dispose(_stack6, _error5, _hasError5); + await _usingCtx6.d(); } } finally{ try { - var _stack7 = []; - _using(_stack7, { + var _usingCtx7 = _using_ctx(); + _usingCtx7.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error6 = _, _hasError6 = !0; + _usingCtx7.e = _; } finally{ - await _dispose(_stack7, _error6, _hasError6); + await _usingCtx7.d(); } } try { - var _stack8 = []; - _using(_stack8, { + var _usingCtx8 = _using_ctx(); + _usingCtx8.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error7 = _, _hasError7 = !0; + _usingCtx8.e = _; } finally{ - await _dispose(_stack8, _error7, _hasError7); + await _usingCtx8.d(); } for(;;)try { - var _stack10 = []; - _using(_stack10, { + var _usingCtx10 = _using_ctx(); + _usingCtx10.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); break; } catch (_) { - var _error9 = _, _hasError9 = !0; + _usingCtx10.e = _; } finally{ - await _dispose(_stack10, _error9, _hasError9); + await _usingCtx10.d(); } for(;;)try { - var _stack11 = []; - _using(_stack11, { + var _usingCtx11 = _using_ctx(); + _usingCtx11.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); break; } catch (_) { - var _error10 = _, _hasError10 = !0; + _usingCtx11.e = _; } finally{ - await _dispose(_stack11, _error10, _hasError10); + await _usingCtx11.d(); } for(;;)try { - var _stack12 = []; - _using(_stack12, { + var _usingCtx12 = _using_ctx(); + _usingCtx12.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); break; } catch (_) { - var _error11 = _, _hasError11 = !0; + _usingCtx12.e = _; } finally{ - await _dispose(_stack12, _error11, _hasError11); + await _usingCtx12.d(); } for(let x in {})try { - var _stack13 = []; - _using(_stack13, { + var _usingCtx13 = _using_ctx(); + _usingCtx13.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error12 = _, _hasError12 = !0; + _usingCtx13.e = _; } finally{ - await _dispose(_stack13, _error12, _hasError12); + await _usingCtx13.d(); } for (let x of [])try { - var _stack14 = []; - _using(_stack14, { + var _usingCtx14 = _using_ctx(); + _usingCtx14.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error13 = _, _hasError13 = !0; + _usingCtx14.e = _; } finally{ - await _dispose(_stack14, _error13, _hasError13); + await _usingCtx14.d(); } } catch (_) { - var _error14 = _, _hasError14 = !0; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error14, _hasError14); + await _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.12.1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.12.1.normal.js index 272cb18dc26a..015814bfd05a 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.12.1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.12.1.normal.js @@ -1,14 +1,12 @@ //// [awaitUsingDeclarations.12.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; async function f() { try { - var _stack = []; - var x = _using(_stack, {}, true); + var _usingCtx = _using_ctx(); + const x = _usingCtx.a({}); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } } diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.12.2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.12.2.minified.js index b698e0821207..aab4b1d8155a 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.12.2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.12.2.minified.js @@ -1,3 +1,2 @@ //// [awaitUsingDeclarations.12.ts] -import "@swc/helpers/_/_dispose"; -import "@swc/helpers/_/_using"; +import "@swc/helpers/_/_using_ctx"; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.13.1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.13.1.normal.js index 773c5578135c..8c3319033d6b 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.13.1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.13.1.normal.js @@ -1,23 +1,20 @@ //// [awaitUsingDeclarations.13.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; function f() { try { - var _stack = []; - var x = _using(_stack, null, true); + var _usingCtx = _using_ctx(); + const x = _usingCtx.a(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } } try { - var _stack = []; - var x = _using(_stack, null, true); + var _usingCtx = _using_ctx(); + var x = _usingCtx.a(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.13.2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.13.2.minified.js index ba5ef2f091ba..5ae54041146f 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.13.2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.13.2.minified.js @@ -1,11 +1,10 @@ //// [awaitUsingDeclarations.13.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, null, !0); + var _usingCtx = _using_ctx(); + _usingCtx.a(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.15.1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.15.1.normal.js index 48032a164b13..9790c4791081 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.15.1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.15.1.normal.js @@ -1,16 +1,14 @@ //// [awaitUsingDeclarations.15.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; async function f() { try { - var _stack = []; - var _ = _using(_stack, { + var _usingCtx = _using_ctx(); + const _ = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } } diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.15.2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.15.2.minified.js index bed7bbabcb62..9ef0acd65b91 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.15.2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.15.2.minified.js @@ -1,3 +1,2 @@ //// [awaitUsingDeclarations.15.ts] -import "@swc/helpers/_/_dispose"; -import "@swc/helpers/_/_using"; +import "@swc/helpers/_/_using_ctx"; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es2015).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es2015).1.normal.js index ccb97f23c47e..7990b6670007 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es2015).1.normal.js @@ -1,23 +1,21 @@ //// [awaitUsingDeclarations.2.ts] import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; { try { - var _stack = []; - var d1 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d1 = _usingCtx.a({ [Symbol.asyncDispose] () { return _async_to_generator(function*() {})(); } - }, true), d2 = _using(_stack, { + }), d2 = _usingCtx.a({ [Symbol.asyncDispose] () { return _async_to_generator(function*() {})(); } - }, true); + }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } }export { }; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es2015).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es2015).2.minified.js index 3d891f39d23f..c1b77cca3149 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es2015).2.minified.js @@ -1,16 +1,15 @@ //// [awaitUsingDeclarations.2.ts] import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.a({ [Symbol.asyncDispose]: ()=>_async_to_generator(function*() {})() - }, !0), _using(_stack, { + }), _usingCtx.a({ [Symbol.asyncDispose]: ()=>_async_to_generator(function*() {})() - }, !0); + }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es2017).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es2017).1.normal.js index 86ec3758f7b0..5e64ce262f0e 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es2017).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es2017).1.normal.js @@ -1,18 +1,16 @@ //// [awaitUsingDeclarations.2.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; { try { - var _stack = []; - var d1 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d1 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true), d2 = _using(_stack, { + }), d2 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } }export { }; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es2017).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es2017).2.minified.js index fa24b4a3680c..b0930ba472dd 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es2017).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es2017).2.minified.js @@ -1,15 +1,14 @@ //// [awaitUsingDeclarations.2.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, !0), _using(_stack, { + }), _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es2022).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es2022).1.normal.js index 86ec3758f7b0..5e64ce262f0e 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es2022).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es2022).1.normal.js @@ -1,18 +1,16 @@ //// [awaitUsingDeclarations.2.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; { try { - var _stack = []; - var d1 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d1 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true), d2 = _using(_stack, { + }), d2 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } }export { }; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es2022).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es2022).2.minified.js index fa24b4a3680c..b0930ba472dd 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es2022).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es2022).2.minified.js @@ -1,15 +1,14 @@ //// [awaitUsingDeclarations.2.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, !0), _using(_stack, { + }), _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es5).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es5).1.normal.js index 6d39c6117086..0717b41aba09 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es5).1.normal.js @@ -2,12 +2,11 @@ import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator"; import { _ as _define_property } from "@swc/helpers/_/_define_property"; import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; { try { - var _stack = []; - var d1 = _using(_stack, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx = _using_ctx(); + var d1 = _usingCtx.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -15,7 +14,7 @@ import { _ as _using } from "@swc/helpers/_/_using"; ]; }); })(); - }), true), d2 = _using(_stack, _define_property({}, Symbol.asyncDispose, function() { + })), d2 = _usingCtx.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -23,11 +22,10 @@ import { _ as _using } from "@swc/helpers/_/_using"; ]; }); })(); - }), true); + })); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } }export { }; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es5).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es5).2.minified.js index a5f78986bb83..589b225128b5 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=es5).2.minified.js @@ -2,11 +2,10 @@ import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator"; import { _ as _define_property } from "@swc/helpers/_/_define_property"; import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx = _using_ctx(); + _usingCtx.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -14,7 +13,7 @@ try { ]; }); })(); - }), !0), _using(_stack, _define_property({}, Symbol.asyncDispose, function() { + })), _usingCtx.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -22,9 +21,9 @@ try { ]; }); })(); - }), !0); + })); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=esnext).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=esnext).1.normal.js index 86ec3758f7b0..5e64ce262f0e 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=esnext).1.normal.js @@ -1,18 +1,16 @@ //// [awaitUsingDeclarations.2.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; { try { - var _stack = []; - var d1 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d1 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true), d2 = _using(_stack, { + }), d2 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } }export { }; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=esnext).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=esnext).2.minified.js index fa24b4a3680c..b0930ba472dd 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.2(target=esnext).2.minified.js @@ -1,15 +1,14 @@ //// [awaitUsingDeclarations.2.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, !0), _using(_stack, { + }), _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es2015).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es2015).1.normal.js index b5167500ddca..46421b5f06bd 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es2015).1.normal.js @@ -1,21 +1,19 @@ //// [awaitUsingDeclarations.3.ts] import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; { try { - var _stack = []; - var d1 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d1 = _usingCtx.a({ [Symbol.asyncDispose] () { return _async_to_generator(function*() {})(); } - }, true), d2 = _using(_stack, null, true), d3 = _using(_stack, undefined, true), d4 = _using(_stack, { + }), d2 = _usingCtx.a(null), d3 = _usingCtx.a(undefined), d4 = _usingCtx.a({ [Symbol.dispose] () {} - }, true); + }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } }export { }; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es2015).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es2015).2.minified.js index 54752889b084..5122c7b8bfe5 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es2015).2.minified.js @@ -1,16 +1,15 @@ //// [awaitUsingDeclarations.3.ts] import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.a({ [Symbol.asyncDispose]: ()=>_async_to_generator(function*() {})() - }, !0), _using(_stack, null, !0), _using(_stack, void 0, !0), _using(_stack, { + }), _usingCtx.a(null), _usingCtx.a(void 0), _usingCtx.a({ [Symbol.dispose] () {} - }, !0); + }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es2017).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es2017).1.normal.js index 59a2e4d396e4..645f4b1c1805 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es2017).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es2017).1.normal.js @@ -1,18 +1,16 @@ //// [awaitUsingDeclarations.3.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; { try { - var _stack = []; - var d1 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d1 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true), d2 = _using(_stack, null, true), d3 = _using(_stack, undefined, true), d4 = _using(_stack, { + }), d2 = _usingCtx.a(null), d3 = _usingCtx.a(undefined), d4 = _usingCtx.a({ [Symbol.dispose] () {} - }, true); + }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } }export { }; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es2017).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es2017).2.minified.js index 69929682e705..f2f521bcbbcd 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es2017).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es2017).2.minified.js @@ -1,15 +1,14 @@ //// [awaitUsingDeclarations.3.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, !0), _using(_stack, null, !0), _using(_stack, void 0, !0), _using(_stack, { + }), _usingCtx.a(null), _usingCtx.a(void 0), _usingCtx.a({ [Symbol.dispose] () {} - }, !0); + }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es2022).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es2022).1.normal.js index 59a2e4d396e4..645f4b1c1805 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es2022).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es2022).1.normal.js @@ -1,18 +1,16 @@ //// [awaitUsingDeclarations.3.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; { try { - var _stack = []; - var d1 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d1 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true), d2 = _using(_stack, null, true), d3 = _using(_stack, undefined, true), d4 = _using(_stack, { + }), d2 = _usingCtx.a(null), d3 = _usingCtx.a(undefined), d4 = _usingCtx.a({ [Symbol.dispose] () {} - }, true); + }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } }export { }; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es2022).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es2022).2.minified.js index 69929682e705..f2f521bcbbcd 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es2022).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es2022).2.minified.js @@ -1,15 +1,14 @@ //// [awaitUsingDeclarations.3.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, !0), _using(_stack, null, !0), _using(_stack, void 0, !0), _using(_stack, { + }), _usingCtx.a(null), _usingCtx.a(void 0), _usingCtx.a({ [Symbol.dispose] () {} - }, !0); + }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es5).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es5).1.normal.js index 52cbc23abc63..09db876595f8 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es5).1.normal.js @@ -2,12 +2,11 @@ import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator"; import { _ as _define_property } from "@swc/helpers/_/_define_property"; import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; { try { - var _stack = []; - var d1 = _using(_stack, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx = _using_ctx(); + var d1 = _usingCtx.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -15,11 +14,10 @@ import { _ as _using } from "@swc/helpers/_/_using"; ]; }); })(); - }), true), d2 = _using(_stack, null, true), d3 = _using(_stack, undefined, true), d4 = _using(_stack, _define_property({}, Symbol.dispose, function() {}), true); + })), d2 = _usingCtx.a(null), d3 = _usingCtx.a(undefined), d4 = _usingCtx.a(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } }export { }; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es5).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es5).2.minified.js index e173ffda09ab..550f4e0d8ef7 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=es5).2.minified.js @@ -2,11 +2,10 @@ import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator"; import { _ as _define_property } from "@swc/helpers/_/_define_property"; import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, _define_property({}, Symbol.asyncDispose, function() { + var _usingCtx = _using_ctx(); + _usingCtx.a(_define_property({}, Symbol.asyncDispose, function() { return _async_to_generator(function() { return _ts_generator(this, function(_state) { return [ @@ -14,9 +13,9 @@ try { ]; }); })(); - }), !0), _using(_stack, null, !0), _using(_stack, void 0, !0), _using(_stack, _define_property({}, Symbol.dispose, function() {}), !0); + })), _usingCtx.a(null), _usingCtx.a(void 0), _usingCtx.a(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=esnext).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=esnext).1.normal.js index 59a2e4d396e4..645f4b1c1805 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=esnext).1.normal.js @@ -1,18 +1,16 @@ //// [awaitUsingDeclarations.3.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; { try { - var _stack = []; - var d1 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d1 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true), d2 = _using(_stack, null, true), d3 = _using(_stack, undefined, true), d4 = _using(_stack, { + }), d2 = _usingCtx.a(null), d3 = _usingCtx.a(undefined), d4 = _usingCtx.a({ [Symbol.dispose] () {} - }, true); + }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } }export { }; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=esnext).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=esnext).2.minified.js index 69929682e705..f2f521bcbbcd 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.3(target=esnext).2.minified.js @@ -1,15 +1,14 @@ //// [awaitUsingDeclarations.3.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, !0), _using(_stack, null, !0), _using(_stack, void 0, !0), _using(_stack, { + }), _usingCtx.a(null), _usingCtx.a(void 0), _usingCtx.a({ [Symbol.dispose] () {} - }, !0); + }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.9.1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.9.1.normal.js index 90f21603db42..e3f89b0810d8 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.9.1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.9.1.normal.js @@ -1,14 +1,12 @@ //// [awaitUsingDeclarations.9.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; { try { - var _stack = []; - var a = _using(_stack, null, true); + var _usingCtx = _using_ctx(); + const a = _usingCtx.a(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } }export { }; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarations.9.2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarations.9.2.minified.js index fdd35d1514b2..10b581c62b46 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarations.9.2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarations.9.2.minified.js @@ -1,11 +1,10 @@ //// [awaitUsingDeclarations.9.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, null, !0); + var _usingCtx = _using_ctx(); + _usingCtx.a(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2015).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2015).1.normal.js index 1566d75ea6f5..0f7daf3af093 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2015).1.normal.js @@ -1,7 +1,7 @@ //// [awaitUsingDeclarationsInForAwaitOf.ts] import { _ as _async_iterator } from "@swc/helpers/_/_async_iterator"; import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; function main() { return _main.apply(this, arguments); } @@ -25,13 +25,12 @@ function _main() { let _value = _step.value; const d1 = _value; try { - var _stack = []; + var _usingCtx = _using_ctx(); {} } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } } catch (err) { diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2015).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2015).2.minified.js index aecf0b6155f3..7d7e834be922 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2015).2.minified.js @@ -1,4 +1,4 @@ //// [awaitUsingDeclarationsInForAwaitOf.ts] import "@swc/helpers/_/_async_iterator"; import "@swc/helpers/_/_async_to_generator"; -import "@swc/helpers/_/_dispose"; +import "@swc/helpers/_/_using_ctx"; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2017).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2017).1.normal.js index 34268ec9e78b..51c6a9728631 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2017).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2017).1.normal.js @@ -1,5 +1,5 @@ //// [awaitUsingDeclarationsInForAwaitOf.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; async function main() { for await (const d1 of [ { @@ -12,13 +12,12 @@ async function main() { undefined ]){ try { - var _stack = []; + var _usingCtx = _using_ctx(); {} } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } } diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2017).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2017).2.minified.js index 0c372bedeea7..35eb661ced31 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2017).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2017).2.minified.js @@ -1,2 +1,2 @@ //// [awaitUsingDeclarationsInForAwaitOf.ts] -import "@swc/helpers/_/_dispose"; +import "@swc/helpers/_/_using_ctx"; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2022).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2022).1.normal.js index 34268ec9e78b..51c6a9728631 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2022).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2022).1.normal.js @@ -1,5 +1,5 @@ //// [awaitUsingDeclarationsInForAwaitOf.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; async function main() { for await (const d1 of [ { @@ -12,13 +12,12 @@ async function main() { undefined ]){ try { - var _stack = []; + var _usingCtx = _using_ctx(); {} } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } } diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2022).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2022).2.minified.js index 0c372bedeea7..35eb661ced31 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2022).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es2022).2.minified.js @@ -1,2 +1,2 @@ //// [awaitUsingDeclarationsInForAwaitOf.ts] -import "@swc/helpers/_/_dispose"; +import "@swc/helpers/_/_using_ctx"; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es5).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es5).1.normal.js index 9f4cd0d7b43a..39d65ce5006c 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es5).1.normal.js @@ -3,13 +3,13 @@ import { _ as _async_iterator } from "@swc/helpers/_/_async_iterator"; import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator"; import { _ as _define_property } from "@swc/helpers/_/_define_property"; import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; function main() { return _main.apply(this, arguments); } function _main() { _main = _async_to_generator(function() { - var _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, d1, _stack, _error, _hasError, err; + var _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, d1, _usingCtx, err; return _ts_generator(this, function(_state) { switch(_state.label){ case 0: @@ -50,13 +50,12 @@ function _main() { _value = _step.value; d1 = _value; try { - _stack = []; + _usingCtx = _using_ctx(); {} } catch (_) { - _error = _; - _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } _state.label = 4; case 4: diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es5).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es5).2.minified.js index 3bf70bce4f95..19e2c806ac5c 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=es5).2.minified.js @@ -3,4 +3,4 @@ import "@swc/helpers/_/_async_iterator"; import "@swc/helpers/_/_async_to_generator"; import "@swc/helpers/_/_define_property"; import "@swc/helpers/_/_ts_generator"; -import "@swc/helpers/_/_dispose"; +import "@swc/helpers/_/_using_ctx"; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=esnext).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=esnext).1.normal.js index 34268ec9e78b..51c6a9728631 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=esnext).1.normal.js @@ -1,5 +1,5 @@ //// [awaitUsingDeclarationsInForAwaitOf.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; async function main() { for await (const d1 of [ { @@ -12,13 +12,12 @@ async function main() { undefined ]){ try { - var _stack = []; + var _usingCtx = _using_ctx(); {} } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } } diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=esnext).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=esnext).2.minified.js index 0c372bedeea7..35eb661ced31 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForAwaitOf(target=esnext).2.minified.js @@ -1,2 +1,2 @@ //// [awaitUsingDeclarationsInForAwaitOf.ts] -import "@swc/helpers/_/_dispose"; +import "@swc/helpers/_/_using_ctx"; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2015).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2015).1.normal.js index 6f241e475a63..2c971032ffdc 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2015).1.normal.js @@ -1,6 +1,6 @@ //// [awaitUsingDeclarationsInForOf.1.ts] import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; function main() { return _main.apply(this, arguments); } @@ -19,13 +19,12 @@ function _main() { undefined ]){ try { - var _stack = []; + var _usingCtx = _using_ctx(); {} } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }); diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2015).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2015).2.minified.js index e56fa25f934b..d7eb364e989b 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2015).2.minified.js @@ -1,3 +1,3 @@ //// [awaitUsingDeclarationsInForOf.1.ts] import "@swc/helpers/_/_async_to_generator"; -import "@swc/helpers/_/_dispose"; +import "@swc/helpers/_/_using_ctx"; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2017).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2017).1.normal.js index a9415bf9b803..b539d27f7acb 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2017).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2017).1.normal.js @@ -1,5 +1,5 @@ //// [awaitUsingDeclarationsInForOf.1.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; async function main() { for (const d1 of [ { @@ -12,13 +12,12 @@ async function main() { undefined ]){ try { - var _stack = []; + var _usingCtx = _using_ctx(); {} } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } } diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2017).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2017).2.minified.js index 627c0b7e321e..7cfe7407750d 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2017).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2017).2.minified.js @@ -1,2 +1,2 @@ //// [awaitUsingDeclarationsInForOf.1.ts] -import "@swc/helpers/_/_dispose"; +import "@swc/helpers/_/_using_ctx"; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2022).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2022).1.normal.js index a9415bf9b803..b539d27f7acb 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2022).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2022).1.normal.js @@ -1,5 +1,5 @@ //// [awaitUsingDeclarationsInForOf.1.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; async function main() { for (const d1 of [ { @@ -12,13 +12,12 @@ async function main() { undefined ]){ try { - var _stack = []; + var _usingCtx = _using_ctx(); {} } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } } diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2022).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2022).2.minified.js index 627c0b7e321e..7cfe7407750d 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2022).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es2022).2.minified.js @@ -1,2 +1,2 @@ //// [awaitUsingDeclarationsInForOf.1.ts] -import "@swc/helpers/_/_dispose"; +import "@swc/helpers/_/_using_ctx"; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es5).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es5).1.normal.js index f23474fd18fd..a38b9bb9ee34 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es5).1.normal.js @@ -2,13 +2,13 @@ import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator"; import { _ as _define_property } from "@swc/helpers/_/_define_property"; import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; function main() { return _main.apply(this, arguments); } function _main() { _main = _async_to_generator(function() { - var _i, _iter, d1, _stack, _error, _hasError; + var _i, _iter, d1, _usingCtx; return _ts_generator(this, function(_state) { for(_i = 0, _iter = [ _define_property({}, Symbol.asyncDispose, function() { @@ -26,13 +26,12 @@ function _main() { ]; _i < _iter.length; _i++){ d1 = _iter[_i]; try { - _stack = []; + _usingCtx = _using_ctx(); {} } catch (_) { - _error = _; - _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } return [ diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es5).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es5).2.minified.js index abedd580b287..8057e88dc703 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=es5).2.minified.js @@ -2,4 +2,4 @@ import "@swc/helpers/_/_async_to_generator"; import "@swc/helpers/_/_define_property"; import "@swc/helpers/_/_ts_generator"; -import "@swc/helpers/_/_dispose"; +import "@swc/helpers/_/_using_ctx"; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=esnext).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=esnext).1.normal.js index a9415bf9b803..b539d27f7acb 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=esnext).1.normal.js @@ -1,5 +1,5 @@ //// [awaitUsingDeclarationsInForOf.1.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; async function main() { for (const d1 of [ { @@ -12,13 +12,12 @@ async function main() { undefined ]){ try { - var _stack = []; + var _usingCtx = _using_ctx(); {} } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } } diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=esnext).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=esnext).2.minified.js index 627c0b7e321e..7cfe7407750d 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsInForOf.1(target=esnext).2.minified.js @@ -1,2 +1,2 @@ //// [awaitUsingDeclarationsInForOf.1.ts] -import "@swc/helpers/_/_dispose"; +import "@swc/helpers/_/_using_ctx"; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsTopLevelOfModule.1(module=es6).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsTopLevelOfModule.1(module=es6).1.normal.js index a2c01fb7f763..4bd21fdc4282 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsTopLevelOfModule.1(module=es6).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsTopLevelOfModule.1(module=es6).1.normal.js @@ -1,27 +1,25 @@ //// [awaitUsingDeclarationsTopLevelOfModule.1.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; var _x; export { y }; var _w; export { _default as default }; try { - var _stack = []; + var _usingCtx = _using_ctx(); const x = 1; _x = x; - var z = _using(_stack, { + var z = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true); - var y = 2; + }); + const y = 2; const w = 3; _w = w; var _default = 4; console.log(w, x, y, z); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } export { _x as x }; export { _w as w }; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsTopLevelOfModule.1(module=es6).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsTopLevelOfModule.1(module=es6).2.minified.js index 458a880a042d..902428c27f5a 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsTopLevelOfModule.1(module=es6).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsTopLevelOfModule.1(module=es6).2.minified.js @@ -1,18 +1,17 @@ //// [awaitUsingDeclarationsTopLevelOfModule.1.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _x, _w, _stack = []; + var _x, _w, _usingCtx = _using_ctx(); _x = 1; - var z = _using(_stack, { + var z = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, !0), y = 2; + }); _w = 3; var _default = 4; - console.log(3, 1, y, z); + console.log(3, 1, 2, z); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } export { y, _default as default, _x as x, _w as w }; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsTopLevelOfModule.1(module=system).1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsTopLevelOfModule.1(module=system).1.normal.js index 59cebf112d56..c1d33bdda846 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsTopLevelOfModule.1(module=system).1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsTopLevelOfModule.1(module=system).1.normal.js @@ -1,41 +1,36 @@ //// [awaitUsingDeclarationsTopLevelOfModule.1.ts] System.register([ - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _dispose, _using, _x, _w; + var _using_ctx, _x, _w; _export({ x: void 0, w: void 0 }); return { setters: [ - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: async function() { try { - var _stack = []; + var _usingCtx = _using_ctx(); const x = 1; _export("x", _x = x); - var z = _using(_stack, { + var z = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true); - var y = 2; + }); + const y = 2; const w = 3; _export("w", _w = w); var _default = 4; console.log(w, x, y, z); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsTopLevelOfModule.1(module=system).2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsTopLevelOfModule.1(module=system).2.minified.js index 4630f1887b8e..288b89f0e665 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsTopLevelOfModule.1(module=system).2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsTopLevelOfModule.1(module=system).2.minified.js @@ -1,33 +1,29 @@ //// [awaitUsingDeclarationsTopLevelOfModule.1.ts] System.register([ - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _dispose, _using; + var _using_ctx; return _export({ x: void 0, w: void 0 }), { setters: [ - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: async function() { try { - var _stack = []; + var _usingCtx = _using_ctx(); _export("x", 1); - var z = _using(_stack, { + var z = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); _export("w", 3), console.log(3, 1, 2, z); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsWithImportHelpers.1.normal.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsWithImportHelpers.1.normal.js index 0622ebb5b8c5..9c252bc04e02 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsWithImportHelpers.1.normal.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsWithImportHelpers.1.normal.js @@ -1,15 +1,13 @@ //// [awaitUsingDeclarationsWithImportHelpers.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; async function f() { try { - var _stack = []; - var a = _using(_stack, null, true); + var _usingCtx = _using_ctx(); + const a = _usingCtx.a(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } } export { }; diff --git a/crates/swc/tests/tsc-references/awaitUsingDeclarationsWithImportHelpers.2.minified.js b/crates/swc/tests/tsc-references/awaitUsingDeclarationsWithImportHelpers.2.minified.js index d244a186e469..371b6dabb67b 100644 --- a/crates/swc/tests/tsc-references/awaitUsingDeclarationsWithImportHelpers.2.minified.js +++ b/crates/swc/tests/tsc-references/awaitUsingDeclarationsWithImportHelpers.2.minified.js @@ -1,3 +1,2 @@ //// [awaitUsingDeclarationsWithImportHelpers.ts] -import "@swc/helpers/_/_dispose"; -import "@swc/helpers/_/_using"; +import "@swc/helpers/_/_using_ctx"; diff --git a/crates/swc/tests/tsc-references/usingDeclarations.1(target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarations.1(target=es2015).1.normal.js index b56cbe5caee2..e62ebe0f866e 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.1(target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.1(target=es2015).1.normal.js @@ -2,19 +2,17 @@ import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator"; import { _ as _await_async_generator } from "@swc/helpers/_/_await_async_generator"; import { _ as _wrap_async_generator } from "@swc/helpers/_/_wrap_async_generator"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; function f() { try { - var _stack = []; - var d2 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d2 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } function af() { @@ -23,32 +21,30 @@ function af() { function _af() { _af = _async_to_generator(function*() { try { - var _stack = []; - var d3 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d3 = _usingCtx.u({ [Symbol.dispose] () {} }); yield null; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } }); return _af.apply(this, arguments); } function* g() { try { - var _stack = []; - var d4 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d4 = _usingCtx.u({ [Symbol.dispose] () {} }); yield; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } function ag() { @@ -57,404 +53,375 @@ function ag() { function _ag() { _ag = _wrap_async_generator(function*() { try { - var _stack = []; - var d5 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d5 = _usingCtx.u({ [Symbol.dispose] () {} }); yield; yield _await_async_generator(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } }); return _ag.apply(this, arguments); } try { - var _stack = []; - var d1 = _using(_stack, { + var _usingCtx = _using_ctx(); + var d1 = _usingCtx.u({ [Symbol.dispose] () {} }); - var a = ()=>{ + const a = ()=>{ try { - var _stack = []; - var d6 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d6 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } }; class C1 { m() { try { - var _stack = []; - var d10 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d10 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } get x() { try { - var _stack = []; - var d11 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d11 = _usingCtx.u({ [Symbol.dispose] () {} }); return 0; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } set x(v) { try { - var _stack = []; - var d12 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d12 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } am() { return _async_to_generator(function*() { try { - var _stack = []; - var d13 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d13 = _usingCtx.u({ [Symbol.dispose] () {} }); yield null; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } })(); } *g() { try { - var _stack = []; - var d14 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d14 = _usingCtx.u({ [Symbol.dispose] () {} }); yield; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } ag() { return _wrap_async_generator(function*() { try { - var _stack = []; - var d15 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d15 = _usingCtx.u({ [Symbol.dispose] () {} }); yield; yield _await_async_generator(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } })(); } constructor(){ this.a = ()=>{ try { - var _stack = []; - var d7 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d7 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } }; try { - var _stack = []; - var d8 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d8 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } } (()=>{ try { - var _stack = []; - var d9 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d9 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } })(); class C2 extends C1 { constructor(){ try { - var _stack = []; - var d16 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d16 = _usingCtx.u({ [Symbol.dispose] () {} }); super(); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } } class C3 extends C1 { constructor(){ try { - var _stack = []; - var d17 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d17 = _usingCtx.u({ [Symbol.dispose] () {} }); super(); this.y = 1; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } } var N; (function(N) { try { - var _stack = []; - var d18 = _using(_stack, { + var _usingCtx = _using_ctx(); + var d18 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } })(N || (N = {})); { try { - var _stack1 = []; - var d19 = _using(_stack1, { + var _usingCtx1 = _using_ctx(); + const d19 = _usingCtx1.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx1.e = _; } finally{ - _dispose(_stack1, _error, _hasError); + _usingCtx1.d(); } } switch(Math.random()){ case 0: try { - var _stack2 = []; - var d20 = _using(_stack2, { + var _usingCtx2 = _using_ctx(); + const d20 = _usingCtx2.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error1 = _; - var _hasError1 = true; + _usingCtx2.e = _; } finally{ - _dispose(_stack2, _error1, _hasError1); + _usingCtx2.d(); } case 1: try { - var _stack3 = []; - var d21 = _using(_stack3, { + var _usingCtx3 = _using_ctx(); + const d21 = _usingCtx3.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error2 = _; - var _hasError2 = true; + _usingCtx3.e = _; } finally{ - _dispose(_stack3, _error2, _hasError2); + _usingCtx3.d(); } } if (true) switch(0){ case 0: try { - var _stack4 = []; - var d22 = _using(_stack4, { + var _usingCtx4 = _using_ctx(); + const d22 = _usingCtx4.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error3 = _; - var _hasError3 = true; + _usingCtx4.e = _; } finally{ - _dispose(_stack4, _error3, _hasError3); + _usingCtx4.d(); } } try { try { - var _stack5 = []; - var d23 = _using(_stack5, { + var _usingCtx5 = _using_ctx(); + const d23 = _usingCtx5.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error4 = _; - var _hasError4 = true; + _usingCtx5.e = _; } finally{ - _dispose(_stack5, _error4, _hasError4); + _usingCtx5.d(); } } catch (e) { try { - var _stack6 = []; - var d24 = _using(_stack6, { + var _usingCtx6 = _using_ctx(); + const d24 = _usingCtx6.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error5 = _; - var _hasError5 = true; + _usingCtx6.e = _; } finally{ - _dispose(_stack6, _error5, _hasError5); + _usingCtx6.d(); } } finally{ try { - var _stack7 = []; - var d25 = _using(_stack7, { + var _usingCtx7 = _using_ctx(); + const d25 = _usingCtx7.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error6 = _; - var _hasError6 = true; + _usingCtx7.e = _; } finally{ - _dispose(_stack7, _error6, _hasError6); + _usingCtx7.d(); } } if (true) { try { - var _stack8 = []; - var d26 = _using(_stack8, { + var _usingCtx8 = _using_ctx(); + const d26 = _usingCtx8.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error7 = _; - var _hasError7 = true; + _usingCtx8.e = _; } finally{ - _dispose(_stack8, _error7, _hasError7); + _usingCtx8.d(); } } else { try { - var _stack9 = []; - var d27 = _using(_stack9, { + var _usingCtx9 = _using_ctx(); + const d27 = _usingCtx9.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error8 = _; - var _hasError8 = true; + _usingCtx9.e = _; } finally{ - _dispose(_stack9, _error8, _hasError8); + _usingCtx9.d(); } } while(true){ try { - var _stack10 = []; - var d28 = _using(_stack10, { + var _usingCtx10 = _using_ctx(); + const d28 = _usingCtx10.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error9 = _; - var _hasError9 = true; + _usingCtx10.e = _; } finally{ - _dispose(_stack10, _error9, _hasError9); + _usingCtx10.d(); } } do { try { - var _stack11 = []; - var d29 = _using(_stack11, { + var _usingCtx11 = _using_ctx(); + const d29 = _usingCtx11.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error10 = _; - var _hasError10 = true; + _usingCtx11.e = _; } finally{ - _dispose(_stack11, _error10, _hasError10); + _usingCtx11.d(); } }while (true) for(;;){ try { - var _stack12 = []; - var d30 = _using(_stack12, { + var _usingCtx12 = _using_ctx(); + const d30 = _usingCtx12.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error11 = _; - var _hasError11 = true; + _usingCtx12.e = _; } finally{ - _dispose(_stack12, _error11, _hasError11); + _usingCtx12.d(); } } for(const x in {}){ try { - var _stack13 = []; - var d31 = _using(_stack13, { + var _usingCtx13 = _using_ctx(); + const d31 = _usingCtx13.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error12 = _; - var _hasError12 = true; + _usingCtx13.e = _; } finally{ - _dispose(_stack13, _error12, _hasError12); + _usingCtx13.d(); } } for (const x of []){ try { - var _stack14 = []; - var d32 = _using(_stack14, { + var _usingCtx14 = _using_ctx(); + const d32 = _usingCtx14.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error13 = _; - var _hasError13 = true; + _usingCtx14.e = _; } finally{ - _dispose(_stack14, _error13, _hasError13); + _usingCtx14.d(); } } } catch (_) { - var _error14 = _; - var _hasError14 = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error14, _hasError14); + _usingCtx.d(); } export { }; diff --git a/crates/swc/tests/tsc-references/usingDeclarations.1(target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarations.1(target=es2015).2.minified.js index 941ef6b48e01..0935feef1992 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.1(target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.1(target=es2015).2.minified.js @@ -2,179 +2,178 @@ import "@swc/helpers/_/_async_to_generator"; import "@swc/helpers/_/_await_async_generator"; import "@swc/helpers/_/_wrap_async_generator"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var N, _stack = []; - _using(_stack, { + var N, _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} }), (()=>{ try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } })(), function(N) { try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } }(N || (N = {})); try { - var _stack1 = []; - _using(_stack1, { + var _usingCtx1 = _using_ctx(); + _usingCtx1.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx1.e = _; } finally{ - _dispose(_stack1, _error, _hasError); + _usingCtx1.d(); } switch(Math.random()){ case 0: try { - var _stack2 = []; - _using(_stack2, { + var _usingCtx2 = _using_ctx(); + _usingCtx2.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error1 = _, _hasError1 = !0; + _usingCtx2.e = _; } finally{ - _dispose(_stack2, _error1, _hasError1); + _usingCtx2.d(); } case 1: try { - var _stack3 = []; - _using(_stack3, { + var _usingCtx3 = _using_ctx(); + _usingCtx3.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error2 = _, _hasError2 = !0; + _usingCtx3.e = _; } finally{ - _dispose(_stack3, _error2, _hasError2); + _usingCtx3.d(); } } try { - var _stack4 = []; - _using(_stack4, { + var _usingCtx4 = _using_ctx(); + _usingCtx4.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error3 = _, _hasError3 = !0; + _usingCtx4.e = _; } finally{ - _dispose(_stack4, _error3, _hasError3); + _usingCtx4.d(); } try { try { - var _stack5 = []; - _using(_stack5, { + var _usingCtx5 = _using_ctx(); + _usingCtx5.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error4 = _, _hasError4 = !0; + _usingCtx5.e = _; } finally{ - _dispose(_stack5, _error4, _hasError4); + _usingCtx5.d(); } } catch (e) { try { - var _stack6 = []; - _using(_stack6, { + var _usingCtx6 = _using_ctx(); + _usingCtx6.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error5 = _, _hasError5 = !0; + _usingCtx6.e = _; } finally{ - _dispose(_stack6, _error5, _hasError5); + _usingCtx6.d(); } } finally{ try { - var _stack7 = []; - _using(_stack7, { + var _usingCtx7 = _using_ctx(); + _usingCtx7.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error6 = _, _hasError6 = !0; + _usingCtx7.e = _; } finally{ - _dispose(_stack7, _error6, _hasError6); + _usingCtx7.d(); } } try { - var _stack8 = []; - _using(_stack8, { + var _usingCtx8 = _using_ctx(); + _usingCtx8.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error7 = _, _hasError7 = !0; + _usingCtx8.e = _; } finally{ - _dispose(_stack8, _error7, _hasError7); + _usingCtx8.d(); } for(;;)try { - var _stack10 = []; - _using(_stack10, { + var _usingCtx10 = _using_ctx(); + _usingCtx10.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error9 = _, _hasError9 = !0; + _usingCtx10.e = _; } finally{ - _dispose(_stack10, _error9, _hasError9); + _usingCtx10.d(); } for(;;)try { - var _stack11 = []; - _using(_stack11, { + var _usingCtx11 = _using_ctx(); + _usingCtx11.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error10 = _, _hasError10 = !0; + _usingCtx11.e = _; } finally{ - _dispose(_stack11, _error10, _hasError10); + _usingCtx11.d(); } for(;;)try { - var _stack12 = []; - _using(_stack12, { + var _usingCtx12 = _using_ctx(); + _usingCtx12.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error11 = _, _hasError11 = !0; + _usingCtx12.e = _; } finally{ - _dispose(_stack12, _error11, _hasError11); + _usingCtx12.d(); } for(let x in {})try { - var _stack13 = []; - _using(_stack13, { + var _usingCtx13 = _using_ctx(); + _usingCtx13.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error12 = _, _hasError12 = !0; + _usingCtx13.e = _; } finally{ - _dispose(_stack13, _error12, _hasError12); + _usingCtx13.d(); } for (let x of [])try { - var _stack14 = []; - _using(_stack14, { + var _usingCtx14 = _using_ctx(); + _usingCtx14.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error13 = _, _hasError13 = !0; + _usingCtx14.e = _; } finally{ - _dispose(_stack14, _error13, _hasError13); + _usingCtx14.d(); } } catch (_) { - var _error14 = _, _hasError14 = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error14, _hasError14); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.1(target=es2017).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarations.1(target=es2017).1.normal.js index 56ce4e65991c..35dcd9bcd498 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.1(target=es2017).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.1(target=es2017).1.normal.js @@ -1,441 +1,408 @@ //// [usingDeclarations.1.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; function f() { try { - var _stack = []; - var d2 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d2 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } async function af() { try { - var _stack = []; - var d3 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d3 = _usingCtx.u({ [Symbol.dispose] () {} }); await null; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } function* g() { try { - var _stack = []; - var d4 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d4 = _usingCtx.u({ [Symbol.dispose] () {} }); yield; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } async function* ag() { try { - var _stack = []; - var d5 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d5 = _usingCtx.u({ [Symbol.dispose] () {} }); yield; await null; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } try { - var _stack = []; - var d1 = _using(_stack, { + var _usingCtx = _using_ctx(); + var d1 = _usingCtx.u({ [Symbol.dispose] () {} }); - var a = ()=>{ + const a = ()=>{ try { - var _stack = []; - var d6 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d6 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } }; class C1 { m() { try { - var _stack = []; - var d10 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d10 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } get x() { try { - var _stack = []; - var d11 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d11 = _usingCtx.u({ [Symbol.dispose] () {} }); return 0; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } set x(v) { try { - var _stack = []; - var d12 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d12 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } async am() { try { - var _stack = []; - var d13 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d13 = _usingCtx.u({ [Symbol.dispose] () {} }); await null; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } *g() { try { - var _stack = []; - var d14 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d14 = _usingCtx.u({ [Symbol.dispose] () {} }); yield; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } async *ag() { try { - var _stack = []; - var d15 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d15 = _usingCtx.u({ [Symbol.dispose] () {} }); yield; await null; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } constructor(){ this.a = ()=>{ try { - var _stack = []; - var d7 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d7 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } }; try { - var _stack = []; - var d8 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d8 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } } (()=>{ try { - var _stack = []; - var d9 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d9 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } })(); class C2 extends C1 { constructor(){ try { - var _stack = []; - var d16 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d16 = _usingCtx.u({ [Symbol.dispose] () {} }); super(); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } } class C3 extends C1 { constructor(){ try { - var _stack = []; - var d17 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d17 = _usingCtx.u({ [Symbol.dispose] () {} }); super(); this.y = 1; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } } var N; (function(N) { try { - var _stack = []; - var d18 = _using(_stack, { + var _usingCtx = _using_ctx(); + var d18 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } })(N || (N = {})); { try { - var _stack1 = []; - var d19 = _using(_stack1, { + var _usingCtx1 = _using_ctx(); + const d19 = _usingCtx1.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx1.e = _; } finally{ - _dispose(_stack1, _error, _hasError); + _usingCtx1.d(); } } switch(Math.random()){ case 0: try { - var _stack2 = []; - var d20 = _using(_stack2, { + var _usingCtx2 = _using_ctx(); + const d20 = _usingCtx2.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error1 = _; - var _hasError1 = true; + _usingCtx2.e = _; } finally{ - _dispose(_stack2, _error1, _hasError1); + _usingCtx2.d(); } case 1: try { - var _stack3 = []; - var d21 = _using(_stack3, { + var _usingCtx3 = _using_ctx(); + const d21 = _usingCtx3.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error2 = _; - var _hasError2 = true; + _usingCtx3.e = _; } finally{ - _dispose(_stack3, _error2, _hasError2); + _usingCtx3.d(); } } if (true) switch(0){ case 0: try { - var _stack4 = []; - var d22 = _using(_stack4, { + var _usingCtx4 = _using_ctx(); + const d22 = _usingCtx4.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error3 = _; - var _hasError3 = true; + _usingCtx4.e = _; } finally{ - _dispose(_stack4, _error3, _hasError3); + _usingCtx4.d(); } } try { try { - var _stack5 = []; - var d23 = _using(_stack5, { + var _usingCtx5 = _using_ctx(); + const d23 = _usingCtx5.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error4 = _; - var _hasError4 = true; + _usingCtx5.e = _; } finally{ - _dispose(_stack5, _error4, _hasError4); + _usingCtx5.d(); } } catch (e) { try { - var _stack6 = []; - var d24 = _using(_stack6, { + var _usingCtx6 = _using_ctx(); + const d24 = _usingCtx6.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error5 = _; - var _hasError5 = true; + _usingCtx6.e = _; } finally{ - _dispose(_stack6, _error5, _hasError5); + _usingCtx6.d(); } } finally{ try { - var _stack7 = []; - var d25 = _using(_stack7, { + var _usingCtx7 = _using_ctx(); + const d25 = _usingCtx7.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error6 = _; - var _hasError6 = true; + _usingCtx7.e = _; } finally{ - _dispose(_stack7, _error6, _hasError6); + _usingCtx7.d(); } } if (true) { try { - var _stack8 = []; - var d26 = _using(_stack8, { + var _usingCtx8 = _using_ctx(); + const d26 = _usingCtx8.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error7 = _; - var _hasError7 = true; + _usingCtx8.e = _; } finally{ - _dispose(_stack8, _error7, _hasError7); + _usingCtx8.d(); } } else { try { - var _stack9 = []; - var d27 = _using(_stack9, { + var _usingCtx9 = _using_ctx(); + const d27 = _usingCtx9.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error8 = _; - var _hasError8 = true; + _usingCtx9.e = _; } finally{ - _dispose(_stack9, _error8, _hasError8); + _usingCtx9.d(); } } while(true){ try { - var _stack10 = []; - var d28 = _using(_stack10, { + var _usingCtx10 = _using_ctx(); + const d28 = _usingCtx10.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error9 = _; - var _hasError9 = true; + _usingCtx10.e = _; } finally{ - _dispose(_stack10, _error9, _hasError9); + _usingCtx10.d(); } } do { try { - var _stack11 = []; - var d29 = _using(_stack11, { + var _usingCtx11 = _using_ctx(); + const d29 = _usingCtx11.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error10 = _; - var _hasError10 = true; + _usingCtx11.e = _; } finally{ - _dispose(_stack11, _error10, _hasError10); + _usingCtx11.d(); } }while (true) for(;;){ try { - var _stack12 = []; - var d30 = _using(_stack12, { + var _usingCtx12 = _using_ctx(); + const d30 = _usingCtx12.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error11 = _; - var _hasError11 = true; + _usingCtx12.e = _; } finally{ - _dispose(_stack12, _error11, _hasError11); + _usingCtx12.d(); } } for(const x in {}){ try { - var _stack13 = []; - var d31 = _using(_stack13, { + var _usingCtx13 = _using_ctx(); + const d31 = _usingCtx13.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error12 = _; - var _hasError12 = true; + _usingCtx13.e = _; } finally{ - _dispose(_stack13, _error12, _hasError12); + _usingCtx13.d(); } } for (const x of []){ try { - var _stack14 = []; - var d32 = _using(_stack14, { + var _usingCtx14 = _using_ctx(); + const d32 = _usingCtx14.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error13 = _; - var _hasError13 = true; + _usingCtx14.e = _; } finally{ - _dispose(_stack14, _error13, _hasError13); + _usingCtx14.d(); } } } catch (_) { - var _error14 = _; - var _hasError14 = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error14, _hasError14); + _usingCtx.d(); } export { }; diff --git a/crates/swc/tests/tsc-references/usingDeclarations.1(target=es2017).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarations.1(target=es2017).2.minified.js index cad15ef939ec..1a1a2e70b216 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.1(target=es2017).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.1(target=es2017).2.minified.js @@ -1,177 +1,176 @@ //// [usingDeclarations.1.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var N, _stack = []; - _using(_stack, { + var N, _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} }), (()=>{ try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } })(), function(N) { try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } }(N || (N = {})); try { - var _stack1 = []; - _using(_stack1, { + var _usingCtx1 = _using_ctx(); + _usingCtx1.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx1.e = _; } finally{ - _dispose(_stack1, _error, _hasError); + _usingCtx1.d(); } switch(Math.random()){ case 0: try { - var _stack2 = []; - _using(_stack2, { + var _usingCtx2 = _using_ctx(); + _usingCtx2.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error1 = _, _hasError1 = !0; + _usingCtx2.e = _; } finally{ - _dispose(_stack2, _error1, _hasError1); + _usingCtx2.d(); } case 1: try { - var _stack3 = []; - _using(_stack3, { + var _usingCtx3 = _using_ctx(); + _usingCtx3.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error2 = _, _hasError2 = !0; + _usingCtx3.e = _; } finally{ - _dispose(_stack3, _error2, _hasError2); + _usingCtx3.d(); } } try { - var _stack4 = []; - _using(_stack4, { + var _usingCtx4 = _using_ctx(); + _usingCtx4.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error3 = _, _hasError3 = !0; + _usingCtx4.e = _; } finally{ - _dispose(_stack4, _error3, _hasError3); + _usingCtx4.d(); } try { try { - var _stack5 = []; - _using(_stack5, { + var _usingCtx5 = _using_ctx(); + _usingCtx5.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error4 = _, _hasError4 = !0; + _usingCtx5.e = _; } finally{ - _dispose(_stack5, _error4, _hasError4); + _usingCtx5.d(); } } catch (e) { try { - var _stack6 = []; - _using(_stack6, { + var _usingCtx6 = _using_ctx(); + _usingCtx6.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error5 = _, _hasError5 = !0; + _usingCtx6.e = _; } finally{ - _dispose(_stack6, _error5, _hasError5); + _usingCtx6.d(); } } finally{ try { - var _stack7 = []; - _using(_stack7, { + var _usingCtx7 = _using_ctx(); + _usingCtx7.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error6 = _, _hasError6 = !0; + _usingCtx7.e = _; } finally{ - _dispose(_stack7, _error6, _hasError6); + _usingCtx7.d(); } } try { - var _stack8 = []; - _using(_stack8, { + var _usingCtx8 = _using_ctx(); + _usingCtx8.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error7 = _, _hasError7 = !0; + _usingCtx8.e = _; } finally{ - _dispose(_stack8, _error7, _hasError7); + _usingCtx8.d(); } for(;;)try { - var _stack10 = []; - _using(_stack10, { + var _usingCtx10 = _using_ctx(); + _usingCtx10.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error9 = _, _hasError9 = !0; + _usingCtx10.e = _; } finally{ - _dispose(_stack10, _error9, _hasError9); + _usingCtx10.d(); } for(;;)try { - var _stack11 = []; - _using(_stack11, { + var _usingCtx11 = _using_ctx(); + _usingCtx11.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error10 = _, _hasError10 = !0; + _usingCtx11.e = _; } finally{ - _dispose(_stack11, _error10, _hasError10); + _usingCtx11.d(); } for(;;)try { - var _stack12 = []; - _using(_stack12, { + var _usingCtx12 = _using_ctx(); + _usingCtx12.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error11 = _, _hasError11 = !0; + _usingCtx12.e = _; } finally{ - _dispose(_stack12, _error11, _hasError11); + _usingCtx12.d(); } for(let x in {})try { - var _stack13 = []; - _using(_stack13, { + var _usingCtx13 = _using_ctx(); + _usingCtx13.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error12 = _, _hasError12 = !0; + _usingCtx13.e = _; } finally{ - _dispose(_stack13, _error12, _hasError12); + _usingCtx13.d(); } for (let x of [])try { - var _stack14 = []; - _using(_stack14, { + var _usingCtx14 = _using_ctx(); + _usingCtx14.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error13 = _, _hasError13 = !0; + _usingCtx14.e = _; } finally{ - _dispose(_stack14, _error13, _hasError13); + _usingCtx14.d(); } } catch (_) { - var _error14 = _, _hasError14 = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error14, _hasError14); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.1(target=es2022).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarations.1(target=es2022).1.normal.js index 37785332587a..02cff72474a0 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.1(target=es2022).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.1(target=es2022).1.normal.js @@ -1,441 +1,408 @@ //// [usingDeclarations.1.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; function f() { try { - var _stack = []; - var d2 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d2 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } async function af() { try { - var _stack = []; - var d3 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d3 = _usingCtx.u({ [Symbol.dispose] () {} }); await null; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } function* g() { try { - var _stack = []; - var d4 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d4 = _usingCtx.u({ [Symbol.dispose] () {} }); yield; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } async function* ag() { try { - var _stack = []; - var d5 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d5 = _usingCtx.u({ [Symbol.dispose] () {} }); yield; await null; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } try { - var _stack = []; - var d1 = _using(_stack, { + var _usingCtx = _using_ctx(); + var d1 = _usingCtx.u({ [Symbol.dispose] () {} }); - var a = ()=>{ + const a = ()=>{ try { - var _stack = []; - var d6 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d6 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } }; class C1 { constructor(){ this.a = ()=>{ try { - var _stack = []; - var d7 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d7 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } }; try { - var _stack = []; - var d8 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d8 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } static{ try { - var _stack = []; - var d9 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d9 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } m() { try { - var _stack = []; - var d10 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d10 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } get x() { try { - var _stack = []; - var d11 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d11 = _usingCtx.u({ [Symbol.dispose] () {} }); return 0; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } set x(v) { try { - var _stack = []; - var d12 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d12 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } async am() { try { - var _stack = []; - var d13 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d13 = _usingCtx.u({ [Symbol.dispose] () {} }); await null; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } *g() { try { - var _stack = []; - var d14 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d14 = _usingCtx.u({ [Symbol.dispose] () {} }); yield; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } async *ag() { try { - var _stack = []; - var d15 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d15 = _usingCtx.u({ [Symbol.dispose] () {} }); yield; await null; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } } class C2 extends C1 { constructor(){ try { - var _stack = []; - var d16 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d16 = _usingCtx.u({ [Symbol.dispose] () {} }); super(); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } } class C3 extends C1 { constructor(){ try { - var _stack = []; - var d17 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d17 = _usingCtx.u({ [Symbol.dispose] () {} }); super(); this.y = 1; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } } var N; (function(N) { try { - var _stack = []; - var d18 = _using(_stack, { + var _usingCtx = _using_ctx(); + var d18 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } })(N || (N = {})); { try { - var _stack1 = []; - var d19 = _using(_stack1, { + var _usingCtx1 = _using_ctx(); + const d19 = _usingCtx1.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx1.e = _; } finally{ - _dispose(_stack1, _error, _hasError); + _usingCtx1.d(); } } switch(Math.random()){ case 0: try { - var _stack2 = []; - var d20 = _using(_stack2, { + var _usingCtx2 = _using_ctx(); + const d20 = _usingCtx2.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error1 = _; - var _hasError1 = true; + _usingCtx2.e = _; } finally{ - _dispose(_stack2, _error1, _hasError1); + _usingCtx2.d(); } case 1: try { - var _stack3 = []; - var d21 = _using(_stack3, { + var _usingCtx3 = _using_ctx(); + const d21 = _usingCtx3.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error2 = _; - var _hasError2 = true; + _usingCtx3.e = _; } finally{ - _dispose(_stack3, _error2, _hasError2); + _usingCtx3.d(); } } if (true) switch(0){ case 0: try { - var _stack4 = []; - var d22 = _using(_stack4, { + var _usingCtx4 = _using_ctx(); + const d22 = _usingCtx4.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error3 = _; - var _hasError3 = true; + _usingCtx4.e = _; } finally{ - _dispose(_stack4, _error3, _hasError3); + _usingCtx4.d(); } } try { try { - var _stack5 = []; - var d23 = _using(_stack5, { + var _usingCtx5 = _using_ctx(); + const d23 = _usingCtx5.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error4 = _; - var _hasError4 = true; + _usingCtx5.e = _; } finally{ - _dispose(_stack5, _error4, _hasError4); + _usingCtx5.d(); } } catch { try { - var _stack6 = []; - var d24 = _using(_stack6, { + var _usingCtx6 = _using_ctx(); + const d24 = _usingCtx6.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error5 = _; - var _hasError5 = true; + _usingCtx6.e = _; } finally{ - _dispose(_stack6, _error5, _hasError5); + _usingCtx6.d(); } } finally{ try { - var _stack7 = []; - var d25 = _using(_stack7, { + var _usingCtx7 = _using_ctx(); + const d25 = _usingCtx7.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error6 = _; - var _hasError6 = true; + _usingCtx7.e = _; } finally{ - _dispose(_stack7, _error6, _hasError6); + _usingCtx7.d(); } } if (true) { try { - var _stack8 = []; - var d26 = _using(_stack8, { + var _usingCtx8 = _using_ctx(); + const d26 = _usingCtx8.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error7 = _; - var _hasError7 = true; + _usingCtx8.e = _; } finally{ - _dispose(_stack8, _error7, _hasError7); + _usingCtx8.d(); } } else { try { - var _stack9 = []; - var d27 = _using(_stack9, { + var _usingCtx9 = _using_ctx(); + const d27 = _usingCtx9.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error8 = _; - var _hasError8 = true; + _usingCtx9.e = _; } finally{ - _dispose(_stack9, _error8, _hasError8); + _usingCtx9.d(); } } while(true){ try { - var _stack10 = []; - var d28 = _using(_stack10, { + var _usingCtx10 = _using_ctx(); + const d28 = _usingCtx10.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error9 = _; - var _hasError9 = true; + _usingCtx10.e = _; } finally{ - _dispose(_stack10, _error9, _hasError9); + _usingCtx10.d(); } } do { try { - var _stack11 = []; - var d29 = _using(_stack11, { + var _usingCtx11 = _using_ctx(); + const d29 = _usingCtx11.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error10 = _; - var _hasError10 = true; + _usingCtx11.e = _; } finally{ - _dispose(_stack11, _error10, _hasError10); + _usingCtx11.d(); } }while (true) for(;;){ try { - var _stack12 = []; - var d30 = _using(_stack12, { + var _usingCtx12 = _using_ctx(); + const d30 = _usingCtx12.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error11 = _; - var _hasError11 = true; + _usingCtx12.e = _; } finally{ - _dispose(_stack12, _error11, _hasError11); + _usingCtx12.d(); } } for(const x in {}){ try { - var _stack13 = []; - var d31 = _using(_stack13, { + var _usingCtx13 = _using_ctx(); + const d31 = _usingCtx13.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error12 = _; - var _hasError12 = true; + _usingCtx13.e = _; } finally{ - _dispose(_stack13, _error12, _hasError12); + _usingCtx13.d(); } } for (const x of []){ try { - var _stack14 = []; - var d32 = _using(_stack14, { + var _usingCtx14 = _using_ctx(); + const d32 = _usingCtx14.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error13 = _; - var _hasError13 = true; + _usingCtx14.e = _; } finally{ - _dispose(_stack14, _error13, _hasError13); + _usingCtx14.d(); } } } catch (_) { - var _error14 = _; - var _hasError14 = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error14, _hasError14); + _usingCtx.d(); } export { }; diff --git a/crates/swc/tests/tsc-references/usingDeclarations.1(target=es2022).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarations.1(target=es2022).2.minified.js index 5d654f5f2e97..c757c3f676a5 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.1(target=es2022).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.1(target=es2022).2.minified.js @@ -1,277 +1,276 @@ //// [usingDeclarations.1.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var N, _stack = []; - _using(_stack, { + var N, _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} }); class C1 { constructor(){ this.a = ()=>{ try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } }; try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } static{ try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } m() { try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } get x() { try { - var _stack = []; - return _using(_stack, { + var _usingCtx = _using_ctx(); + return _usingCtx.u({ [Symbol.dispose] () {} }), 0; } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } set x(v) { try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } async am() { try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} }), await null; } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } *g() { try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} }), yield; } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } async *ag() { try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} }), yield, await null; } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } } !function(N) { try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } }(N || (N = {})); try { - var _stack1 = []; - _using(_stack1, { + var _usingCtx1 = _using_ctx(); + _usingCtx1.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx1.e = _; } finally{ - _dispose(_stack1, _error, _hasError); + _usingCtx1.d(); } switch(Math.random()){ case 0: try { - var _stack2 = []; - _using(_stack2, { + var _usingCtx2 = _using_ctx(); + _usingCtx2.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error1 = _, _hasError1 = !0; + _usingCtx2.e = _; } finally{ - _dispose(_stack2, _error1, _hasError1); + _usingCtx2.d(); } case 1: try { - var _stack3 = []; - _using(_stack3, { + var _usingCtx3 = _using_ctx(); + _usingCtx3.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error2 = _, _hasError2 = !0; + _usingCtx3.e = _; } finally{ - _dispose(_stack3, _error2, _hasError2); + _usingCtx3.d(); } } try { - var _stack4 = []; - _using(_stack4, { + var _usingCtx4 = _using_ctx(); + _usingCtx4.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error3 = _, _hasError3 = !0; + _usingCtx4.e = _; } finally{ - _dispose(_stack4, _error3, _hasError3); + _usingCtx4.d(); } try { try { - var _stack5 = []; - _using(_stack5, { + var _usingCtx5 = _using_ctx(); + _usingCtx5.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error4 = _, _hasError4 = !0; + _usingCtx5.e = _; } finally{ - _dispose(_stack5, _error4, _hasError4); + _usingCtx5.d(); } } catch { try { - var _stack6 = []; - _using(_stack6, { + var _usingCtx6 = _using_ctx(); + _usingCtx6.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error5 = _, _hasError5 = !0; + _usingCtx6.e = _; } finally{ - _dispose(_stack6, _error5, _hasError5); + _usingCtx6.d(); } } finally{ try { - var _stack7 = []; - _using(_stack7, { + var _usingCtx7 = _using_ctx(); + _usingCtx7.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error6 = _, _hasError6 = !0; + _usingCtx7.e = _; } finally{ - _dispose(_stack7, _error6, _hasError6); + _usingCtx7.d(); } } try { - var _stack8 = []; - _using(_stack8, { + var _usingCtx8 = _using_ctx(); + _usingCtx8.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error7 = _, _hasError7 = !0; + _usingCtx8.e = _; } finally{ - _dispose(_stack8, _error7, _hasError7); + _usingCtx8.d(); } for(;;)try { - var _stack10 = []; - _using(_stack10, { + var _usingCtx10 = _using_ctx(); + _usingCtx10.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error9 = _, _hasError9 = !0; + _usingCtx10.e = _; } finally{ - _dispose(_stack10, _error9, _hasError9); + _usingCtx10.d(); } for(;;)try { - var _stack11 = []; - _using(_stack11, { + var _usingCtx11 = _using_ctx(); + _usingCtx11.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error10 = _, _hasError10 = !0; + _usingCtx11.e = _; } finally{ - _dispose(_stack11, _error10, _hasError10); + _usingCtx11.d(); } for(;;)try { - var _stack12 = []; - _using(_stack12, { + var _usingCtx12 = _using_ctx(); + _usingCtx12.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error11 = _, _hasError11 = !0; + _usingCtx12.e = _; } finally{ - _dispose(_stack12, _error11, _hasError11); + _usingCtx12.d(); } for(let x in {})try { - var _stack13 = []; - _using(_stack13, { + var _usingCtx13 = _using_ctx(); + _usingCtx13.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error12 = _, _hasError12 = !0; + _usingCtx13.e = _; } finally{ - _dispose(_stack13, _error12, _hasError12); + _usingCtx13.d(); } for (let x of [])try { - var _stack14 = []; - _using(_stack14, { + var _usingCtx14 = _using_ctx(); + _usingCtx14.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error13 = _, _hasError13 = !0; + _usingCtx14.e = _; } finally{ - _dispose(_stack14, _error13, _hasError13); + _usingCtx14.d(); } } catch (_) { - var _error14 = _, _hasError14 = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error14, _hasError14); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.1(target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarations.1(target=es5).1.normal.js index 1bdbb10ca3b9..bfd9eb040547 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.1(target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.1(target=es5).1.normal.js @@ -9,17 +9,15 @@ import { _ as _possible_constructor_return } from "@swc/helpers/_/_possible_cons import { _ as _wrap_async_generator } from "@swc/helpers/_/_wrap_async_generator"; import { _ as _create_super } from "@swc/helpers/_/_create_super"; import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; function f() { try { - var _stack = []; - var d2 = _using(_stack, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx = _using_ctx(); + var d2 = _usingCtx.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } function af() { @@ -27,7 +25,7 @@ function af() { } function _af() { _af = _async_to_generator(function() { - var _stack, d3, _, _error, _hasError; + var _usingCtx, d3, _; return _ts_generator(this, function(_state) { switch(_state.label){ case 0: @@ -37,8 +35,8 @@ function _af() { 3, 4 ]); - _stack = []; - d3 = _using(_stack, _define_property({}, Symbol.dispose, function() {})); + _usingCtx = _using_ctx(); + d3 = _usingCtx.u(_define_property({}, Symbol.dispose, function() {})); return [ 4, null @@ -51,14 +49,13 @@ function _af() { ]; case 2: _ = _state.sent(); - _error = _; - _hasError = true; + _usingCtx.e = _; return [ 3, 4 ]; case 3: - _dispose(_stack, _error, _hasError); + _usingCtx.d(); return [ 7 ]; @@ -72,7 +69,7 @@ function _af() { return _af.apply(this, arguments); } function g() { - var _stack, d4, _, _error, _hasError; + var _usingCtx, d4, _; return _ts_generator(this, function(_state) { switch(_state.label){ case 0: @@ -82,8 +79,8 @@ function g() { 3, 4 ]); - _stack = []; - d4 = _using(_stack, _define_property({}, Symbol.dispose, function() {})); + _usingCtx = _using_ctx(); + d4 = _usingCtx.u(_define_property({}, Symbol.dispose, function() {})); return [ 4 ]; @@ -95,14 +92,13 @@ function g() { ]; case 2: _ = _state.sent(); - _error = _; - _hasError = true; + _usingCtx.e = _; return [ 3, 4 ]; case 3: - _dispose(_stack, _error, _hasError); + _usingCtx.d(); return [ 7 ]; @@ -118,7 +114,7 @@ function ag() { } function _ag() { _ag = _wrap_async_generator(function() { - var _stack, d5, _, _error, _hasError; + var _usingCtx, d5, _; return _ts_generator(this, function(_state) { switch(_state.label){ case 0: @@ -128,8 +124,8 @@ function _ag() { 4, 5 ]); - _stack = []; - d5 = _using(_stack, _define_property({}, Symbol.dispose, function() {})); + _usingCtx = _using_ctx(); + d5 = _usingCtx.u(_define_property({}, Symbol.dispose, function() {})); return [ 4 ]; @@ -147,14 +143,13 @@ function _ag() { ]; case 3: _ = _state.sent(); - _error = _; - _hasError = true; + _usingCtx.e = _; return [ 3, 5 ]; case 4: - _dispose(_stack, _error, _hasError); + _usingCtx.d(); return [ 7 ]; @@ -168,17 +163,16 @@ function _ag() { return _ag.apply(this, arguments); } try { - var _stack = []; - var d1 = _using(_stack, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx = _using_ctx(); + var d1 = _usingCtx.u(_define_property({}, Symbol.dispose, function() {})); var a = function() { try { - var _stack = []; - var d6 = _using(_stack, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx = _using_ctx(); + var d6 = _usingCtx.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } }; var C1 = /*#__PURE__*/ function() { @@ -187,40 +181,37 @@ try { _class_call_check(this, C1); this.a = function() { try { - var _stack = []; - var d7 = _using(_stack, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx = _using_ctx(); + var d7 = _usingCtx.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } }; try { - var _stack = []; - var d8 = _using(_stack, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx = _using_ctx(); + var d8 = _usingCtx.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } var _proto = C1.prototype; _proto.m = function m() { try { - var _stack = []; - var d10 = _using(_stack, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx = _using_ctx(); + var d10 = _usingCtx.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } }; _proto.am = function am() { return _async_to_generator(function() { - var _stack, d13, _, _error, _hasError; + var _usingCtx, d13, _; return _ts_generator(this, function(_state) { switch(_state.label){ case 0: @@ -230,8 +221,8 @@ try { 3, 4 ]); - _stack = []; - d13 = _using(_stack, _define_property({}, Symbol.dispose, function() {})); + _usingCtx = _using_ctx(); + d13 = _usingCtx.u(_define_property({}, Symbol.dispose, function() {})); return [ 4, null @@ -244,14 +235,13 @@ try { ]; case 2: _ = _state.sent(); - _error = _; - _hasError = true; + _usingCtx.e = _; return [ 3, 4 ]; case 3: - _dispose(_stack, _error, _hasError); + _usingCtx.d(); return [ 7 ]; @@ -264,7 +254,7 @@ try { })(); }; _proto.g = function g() { - var _stack, d14, _, _error, _hasError; + var _usingCtx, d14, _; return _ts_generator(this, function(_state) { switch(_state.label){ case 0: @@ -274,8 +264,8 @@ try { 3, 4 ]); - _stack = []; - d14 = _using(_stack, _define_property({}, Symbol.dispose, function() {})); + _usingCtx = _using_ctx(); + d14 = _usingCtx.u(_define_property({}, Symbol.dispose, function() {})); return [ 4 ]; @@ -287,14 +277,13 @@ try { ]; case 2: _ = _state.sent(); - _error = _; - _hasError = true; + _usingCtx.e = _; return [ 3, 4 ]; case 3: - _dispose(_stack, _error, _hasError); + _usingCtx.d(); return [ 7 ]; @@ -307,7 +296,7 @@ try { }; _proto.ag = function ag() { return _wrap_async_generator(function() { - var _stack, d15, _, _error, _hasError; + var _usingCtx, d15, _; return _ts_generator(this, function(_state) { switch(_state.label){ case 0: @@ -317,8 +306,8 @@ try { 4, 5 ]); - _stack = []; - d15 = _using(_stack, _define_property({}, Symbol.dispose, function() {})); + _usingCtx = _using_ctx(); + d15 = _usingCtx.u(_define_property({}, Symbol.dispose, function() {})); return [ 4 ]; @@ -336,14 +325,13 @@ try { ]; case 3: _ = _state.sent(); - _error = _; - _hasError = true; + _usingCtx.e = _; return [ 3, 5 ]; case 4: - _dispose(_stack, _error, _hasError); + _usingCtx.d(); return [ 7 ]; @@ -360,25 +348,23 @@ try { key: "x", get: function get() { try { - var _stack = []; - var d11 = _using(_stack, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx = _using_ctx(); + var d11 = _usingCtx.u(_define_property({}, Symbol.dispose, function() {})); return 0; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } }, set: function set(v) { try { - var _stack = []; - var d12 = _using(_stack, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx = _using_ctx(); + var d12 = _usingCtx.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } } @@ -387,13 +373,12 @@ try { }(); (function() { try { - var _stack = []; - var d9 = _using(_stack, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx = _using_ctx(); + var d9 = _usingCtx.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } })(); var C2 = /*#__PURE__*/ function(C1) { @@ -404,14 +389,13 @@ try { _class_call_check(this, C2); var _this; try { - var _stack = []; - var d16 = _using(_stack, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx = _using_ctx(); + var d16 = _usingCtx.u(_define_property({}, Symbol.dispose, function() {})); _this = _super.call(this); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } return _possible_constructor_return(_this); } @@ -425,15 +409,14 @@ try { _class_call_check(this, C3); var _this; try { - var _stack = []; - var d17 = _using(_stack, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx = _using_ctx(); + var d17 = _usingCtx.u(_define_property({}, Symbol.dispose, function() {})); _this = _super.call(this); _this.y = 1; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } return _possible_constructor_return(_this); } @@ -442,178 +425,162 @@ try { var N; (function(N) { try { - var _stack = []; - var d18 = _using(_stack, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx = _using_ctx(); + var d18 = _usingCtx.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } })(N || (N = {})); { try { - var _stack1 = []; - var d19 = _using(_stack1, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx1 = _using_ctx(); + var d19 = _usingCtx1.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx1.e = _; } finally{ - _dispose(_stack1, _error, _hasError); + _usingCtx1.d(); } } switch(Math.random()){ case 0: try { - var _stack2 = []; - var d20 = _using(_stack2, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx2 = _using_ctx(); + var d20 = _usingCtx2.u(_define_property({}, Symbol.dispose, function() {})); break; } catch (_) { - var _error1 = _; - var _hasError1 = true; + _usingCtx2.e = _; } finally{ - _dispose(_stack2, _error1, _hasError1); + _usingCtx2.d(); } case 1: try { - var _stack3 = []; - var d21 = _using(_stack3, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx3 = _using_ctx(); + var d21 = _usingCtx3.u(_define_property({}, Symbol.dispose, function() {})); break; } catch (_) { - var _error2 = _; - var _hasError2 = true; + _usingCtx3.e = _; } finally{ - _dispose(_stack3, _error2, _hasError2); + _usingCtx3.d(); } } if (true) switch(0){ case 0: try { - var _stack4 = []; - var d22 = _using(_stack4, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx4 = _using_ctx(); + var d22 = _usingCtx4.u(_define_property({}, Symbol.dispose, function() {})); break; } catch (_) { - var _error3 = _; - var _hasError3 = true; + _usingCtx4.e = _; } finally{ - _dispose(_stack4, _error3, _hasError3); + _usingCtx4.d(); } } try { try { - var _stack5 = []; - var d23 = _using(_stack5, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx5 = _using_ctx(); + var d23 = _usingCtx5.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error4 = _; - var _hasError4 = true; + _usingCtx5.e = _; } finally{ - _dispose(_stack5, _error4, _hasError4); + _usingCtx5.d(); } } catch (e) { try { - var _stack6 = []; - var d24 = _using(_stack6, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx6 = _using_ctx(); + var d24 = _usingCtx6.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error5 = _; - var _hasError5 = true; + _usingCtx6.e = _; } finally{ - _dispose(_stack6, _error5, _hasError5); + _usingCtx6.d(); } } finally{ try { - var _stack7 = []; - var d25 = _using(_stack7, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx7 = _using_ctx(); + var d25 = _usingCtx7.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error6 = _; - var _hasError6 = true; + _usingCtx7.e = _; } finally{ - _dispose(_stack7, _error6, _hasError6); + _usingCtx7.d(); } } if (true) { try { - var _stack8 = []; - var d26 = _using(_stack8, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx8 = _using_ctx(); + var d26 = _usingCtx8.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error7 = _; - var _hasError7 = true; + _usingCtx8.e = _; } finally{ - _dispose(_stack8, _error7, _hasError7); + _usingCtx8.d(); } } else { try { - var _stack9 = []; - var d27 = _using(_stack9, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx9 = _using_ctx(); + var d27 = _usingCtx9.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error8 = _; - var _hasError8 = true; + _usingCtx9.e = _; } finally{ - _dispose(_stack9, _error8, _hasError8); + _usingCtx9.d(); } } while(true){ try { - var _stack10 = []; - var d28 = _using(_stack10, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx10 = _using_ctx(); + var d28 = _usingCtx10.u(_define_property({}, Symbol.dispose, function() {})); break; } catch (_) { - var _error9 = _; - var _hasError9 = true; + _usingCtx10.e = _; } finally{ - _dispose(_stack10, _error9, _hasError9); + _usingCtx10.d(); } } do { try { - var _stack11 = []; - var d29 = _using(_stack11, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx11 = _using_ctx(); + var d29 = _usingCtx11.u(_define_property({}, Symbol.dispose, function() {})); break; } catch (_) { - var _error10 = _; - var _hasError10 = true; + _usingCtx11.e = _; } finally{ - _dispose(_stack11, _error10, _hasError10); + _usingCtx11.d(); } }while (true); for(;;){ try { - var _stack12 = []; - var d30 = _using(_stack12, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx12 = _using_ctx(); + var d30 = _usingCtx12.u(_define_property({}, Symbol.dispose, function() {})); break; } catch (_) { - var _error11 = _; - var _hasError11 = true; + _usingCtx12.e = _; } finally{ - _dispose(_stack12, _error11, _hasError11); + _usingCtx12.d(); } } for(var x in {}){ try { - var _stack13 = []; - var d31 = _using(_stack13, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx13 = _using_ctx(); + var d31 = _usingCtx13.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error12 = _; - var _hasError12 = true; + _usingCtx13.e = _; } finally{ - _dispose(_stack13, _error12, _hasError12); + _usingCtx13.d(); } } for(var _i = 0, _iter = []; _i < _iter.length; _i++){ var x1 = _iter[_i]; try { - var _stack14 = []; - var d32 = _using(_stack14, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx14 = _using_ctx(); + var d32 = _usingCtx14.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error13 = _; - var _hasError13 = true; + _usingCtx14.e = _; } finally{ - _dispose(_stack14, _error13, _hasError13); + _usingCtx14.d(); } } } catch (_) { - var _error14 = _; - var _hasError14 = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error14, _hasError14); + _usingCtx.d(); } export { }; diff --git a/crates/swc/tests/tsc-references/usingDeclarations.1(target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarations.1(target=es5).2.minified.js index 04a146832079..445a366d3e2c 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.1(target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.1(target=es5).2.minified.js @@ -9,150 +9,149 @@ import { _ as _possible_constructor_return } from "@swc/helpers/_/_possible_cons import { _ as _wrap_async_generator } from "@swc/helpers/_/_wrap_async_generator"; import { _ as _create_super } from "@swc/helpers/_/_create_super"; import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var N, _stack = []; - _using(_stack, _define_property({}, Symbol.dispose, function() {})), function() { + var N, _usingCtx = _using_ctx(); + _usingCtx.u(_define_property({}, Symbol.dispose, function() {})), function() { try { - var _stack = []; - _using(_stack, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx = _using_ctx(); + _usingCtx.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } }(), function(N) { try { - var _stack = []; - _using(_stack, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx = _using_ctx(); + _usingCtx.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } }(N || (N = {})); try { - var _stack1 = []; - _using(_stack1, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx1 = _using_ctx(); + _usingCtx1.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx1.e = _; } finally{ - _dispose(_stack1, _error, _hasError); + _usingCtx1.d(); } switch(Math.random()){ case 0: try { - var _stack2 = []; - _using(_stack2, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx2 = _using_ctx(); + _usingCtx2.u(_define_property({}, Symbol.dispose, function() {})); break; } catch (_) { - var _error1 = _, _hasError1 = !0; + _usingCtx2.e = _; } finally{ - _dispose(_stack2, _error1, _hasError1); + _usingCtx2.d(); } case 1: try { - var _stack3 = []; - _using(_stack3, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx3 = _using_ctx(); + _usingCtx3.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error2 = _, _hasError2 = !0; + _usingCtx3.e = _; } finally{ - _dispose(_stack3, _error2, _hasError2); + _usingCtx3.d(); } } try { - var _stack4 = []; - _using(_stack4, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx4 = _using_ctx(); + _usingCtx4.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error3 = _, _hasError3 = !0; + _usingCtx4.e = _; } finally{ - _dispose(_stack4, _error3, _hasError3); + _usingCtx4.d(); } try { try { - var _stack5 = []; - _using(_stack5, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx5 = _using_ctx(); + _usingCtx5.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error4 = _, _hasError4 = !0; + _usingCtx5.e = _; } finally{ - _dispose(_stack5, _error4, _hasError4); + _usingCtx5.d(); } } catch (e) { try { - var _stack6 = []; - _using(_stack6, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx6 = _using_ctx(); + _usingCtx6.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error5 = _, _hasError5 = !0; + _usingCtx6.e = _; } finally{ - _dispose(_stack6, _error5, _hasError5); + _usingCtx6.d(); } } finally{ try { - var _stack7 = []; - _using(_stack7, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx7 = _using_ctx(); + _usingCtx7.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error6 = _, _hasError6 = !0; + _usingCtx7.e = _; } finally{ - _dispose(_stack7, _error6, _hasError6); + _usingCtx7.d(); } } try { - var _stack8 = []; - _using(_stack8, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx8 = _using_ctx(); + _usingCtx8.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error7 = _, _hasError7 = !0; + _usingCtx8.e = _; } finally{ - _dispose(_stack8, _error7, _hasError7); + _usingCtx8.d(); } for(;;)try { - var _stack10 = []; - _using(_stack10, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx10 = _using_ctx(); + _usingCtx10.u(_define_property({}, Symbol.dispose, function() {})); break; } catch (_) { - var _error9 = _, _hasError9 = !0; + _usingCtx10.e = _; } finally{ - _dispose(_stack10, _error9, _hasError9); + _usingCtx10.d(); } for(;;)try { - var _stack11 = []; - _using(_stack11, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx11 = _using_ctx(); + _usingCtx11.u(_define_property({}, Symbol.dispose, function() {})); break; } catch (_) { - var _error10 = _, _hasError10 = !0; + _usingCtx11.e = _; } finally{ - _dispose(_stack11, _error10, _hasError10); + _usingCtx11.d(); } for(;;)try { - var _stack12 = []; - _using(_stack12, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx12 = _using_ctx(); + _usingCtx12.u(_define_property({}, Symbol.dispose, function() {})); break; } catch (_) { - var _error11 = _, _hasError11 = !0; + _usingCtx12.e = _; } finally{ - _dispose(_stack12, _error11, _hasError11); + _usingCtx12.d(); } for(var x in {})try { - var _stack13 = []; - _using(_stack13, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx13 = _using_ctx(); + _usingCtx13.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error12 = _, _hasError12 = !0; + _usingCtx13.e = _; } finally{ - _dispose(_stack13, _error12, _hasError12); + _usingCtx13.d(); } for(var _i = 0, _iter = []; _i < _iter.length; _i++){ _iter[_i]; try { - var _stack14 = []; - _using(_stack14, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx14 = _using_ctx(); + _usingCtx14.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error13 = _, _hasError13 = !0; + _usingCtx14.e = _; } finally{ - _dispose(_stack14, _error13, _hasError13); + _usingCtx14.d(); } } } catch (_) { - var _error14 = _, _hasError14 = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error14, _hasError14); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.1(target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarations.1(target=esnext).1.normal.js index 37785332587a..02cff72474a0 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.1(target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.1(target=esnext).1.normal.js @@ -1,441 +1,408 @@ //// [usingDeclarations.1.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; function f() { try { - var _stack = []; - var d2 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d2 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } async function af() { try { - var _stack = []; - var d3 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d3 = _usingCtx.u({ [Symbol.dispose] () {} }); await null; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } function* g() { try { - var _stack = []; - var d4 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d4 = _usingCtx.u({ [Symbol.dispose] () {} }); yield; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } async function* ag() { try { - var _stack = []; - var d5 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d5 = _usingCtx.u({ [Symbol.dispose] () {} }); yield; await null; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } try { - var _stack = []; - var d1 = _using(_stack, { + var _usingCtx = _using_ctx(); + var d1 = _usingCtx.u({ [Symbol.dispose] () {} }); - var a = ()=>{ + const a = ()=>{ try { - var _stack = []; - var d6 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d6 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } }; class C1 { constructor(){ this.a = ()=>{ try { - var _stack = []; - var d7 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d7 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } }; try { - var _stack = []; - var d8 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d8 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } static{ try { - var _stack = []; - var d9 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d9 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } m() { try { - var _stack = []; - var d10 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d10 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } get x() { try { - var _stack = []; - var d11 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d11 = _usingCtx.u({ [Symbol.dispose] () {} }); return 0; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } set x(v) { try { - var _stack = []; - var d12 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d12 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } async am() { try { - var _stack = []; - var d13 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d13 = _usingCtx.u({ [Symbol.dispose] () {} }); await null; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } *g() { try { - var _stack = []; - var d14 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d14 = _usingCtx.u({ [Symbol.dispose] () {} }); yield; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } async *ag() { try { - var _stack = []; - var d15 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d15 = _usingCtx.u({ [Symbol.dispose] () {} }); yield; await null; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } } class C2 extends C1 { constructor(){ try { - var _stack = []; - var d16 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d16 = _usingCtx.u({ [Symbol.dispose] () {} }); super(); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } } class C3 extends C1 { constructor(){ try { - var _stack = []; - var d17 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d17 = _usingCtx.u({ [Symbol.dispose] () {} }); super(); this.y = 1; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } } var N; (function(N) { try { - var _stack = []; - var d18 = _using(_stack, { + var _usingCtx = _using_ctx(); + var d18 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } })(N || (N = {})); { try { - var _stack1 = []; - var d19 = _using(_stack1, { + var _usingCtx1 = _using_ctx(); + const d19 = _usingCtx1.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx1.e = _; } finally{ - _dispose(_stack1, _error, _hasError); + _usingCtx1.d(); } } switch(Math.random()){ case 0: try { - var _stack2 = []; - var d20 = _using(_stack2, { + var _usingCtx2 = _using_ctx(); + const d20 = _usingCtx2.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error1 = _; - var _hasError1 = true; + _usingCtx2.e = _; } finally{ - _dispose(_stack2, _error1, _hasError1); + _usingCtx2.d(); } case 1: try { - var _stack3 = []; - var d21 = _using(_stack3, { + var _usingCtx3 = _using_ctx(); + const d21 = _usingCtx3.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error2 = _; - var _hasError2 = true; + _usingCtx3.e = _; } finally{ - _dispose(_stack3, _error2, _hasError2); + _usingCtx3.d(); } } if (true) switch(0){ case 0: try { - var _stack4 = []; - var d22 = _using(_stack4, { + var _usingCtx4 = _using_ctx(); + const d22 = _usingCtx4.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error3 = _; - var _hasError3 = true; + _usingCtx4.e = _; } finally{ - _dispose(_stack4, _error3, _hasError3); + _usingCtx4.d(); } } try { try { - var _stack5 = []; - var d23 = _using(_stack5, { + var _usingCtx5 = _using_ctx(); + const d23 = _usingCtx5.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error4 = _; - var _hasError4 = true; + _usingCtx5.e = _; } finally{ - _dispose(_stack5, _error4, _hasError4); + _usingCtx5.d(); } } catch { try { - var _stack6 = []; - var d24 = _using(_stack6, { + var _usingCtx6 = _using_ctx(); + const d24 = _usingCtx6.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error5 = _; - var _hasError5 = true; + _usingCtx6.e = _; } finally{ - _dispose(_stack6, _error5, _hasError5); + _usingCtx6.d(); } } finally{ try { - var _stack7 = []; - var d25 = _using(_stack7, { + var _usingCtx7 = _using_ctx(); + const d25 = _usingCtx7.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error6 = _; - var _hasError6 = true; + _usingCtx7.e = _; } finally{ - _dispose(_stack7, _error6, _hasError6); + _usingCtx7.d(); } } if (true) { try { - var _stack8 = []; - var d26 = _using(_stack8, { + var _usingCtx8 = _using_ctx(); + const d26 = _usingCtx8.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error7 = _; - var _hasError7 = true; + _usingCtx8.e = _; } finally{ - _dispose(_stack8, _error7, _hasError7); + _usingCtx8.d(); } } else { try { - var _stack9 = []; - var d27 = _using(_stack9, { + var _usingCtx9 = _using_ctx(); + const d27 = _usingCtx9.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error8 = _; - var _hasError8 = true; + _usingCtx9.e = _; } finally{ - _dispose(_stack9, _error8, _hasError8); + _usingCtx9.d(); } } while(true){ try { - var _stack10 = []; - var d28 = _using(_stack10, { + var _usingCtx10 = _using_ctx(); + const d28 = _usingCtx10.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error9 = _; - var _hasError9 = true; + _usingCtx10.e = _; } finally{ - _dispose(_stack10, _error9, _hasError9); + _usingCtx10.d(); } } do { try { - var _stack11 = []; - var d29 = _using(_stack11, { + var _usingCtx11 = _using_ctx(); + const d29 = _usingCtx11.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error10 = _; - var _hasError10 = true; + _usingCtx11.e = _; } finally{ - _dispose(_stack11, _error10, _hasError10); + _usingCtx11.d(); } }while (true) for(;;){ try { - var _stack12 = []; - var d30 = _using(_stack12, { + var _usingCtx12 = _using_ctx(); + const d30 = _usingCtx12.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error11 = _; - var _hasError11 = true; + _usingCtx12.e = _; } finally{ - _dispose(_stack12, _error11, _hasError11); + _usingCtx12.d(); } } for(const x in {}){ try { - var _stack13 = []; - var d31 = _using(_stack13, { + var _usingCtx13 = _using_ctx(); + const d31 = _usingCtx13.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error12 = _; - var _hasError12 = true; + _usingCtx13.e = _; } finally{ - _dispose(_stack13, _error12, _hasError12); + _usingCtx13.d(); } } for (const x of []){ try { - var _stack14 = []; - var d32 = _using(_stack14, { + var _usingCtx14 = _using_ctx(); + const d32 = _usingCtx14.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error13 = _; - var _hasError13 = true; + _usingCtx14.e = _; } finally{ - _dispose(_stack14, _error13, _hasError13); + _usingCtx14.d(); } } } catch (_) { - var _error14 = _; - var _hasError14 = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error14, _hasError14); + _usingCtx.d(); } export { }; diff --git a/crates/swc/tests/tsc-references/usingDeclarations.1(target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarations.1(target=esnext).2.minified.js index 5d654f5f2e97..c757c3f676a5 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.1(target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.1(target=esnext).2.minified.js @@ -1,277 +1,276 @@ //// [usingDeclarations.1.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var N, _stack = []; - _using(_stack, { + var N, _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} }); class C1 { constructor(){ this.a = ()=>{ try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } }; try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } static{ try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } m() { try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } get x() { try { - var _stack = []; - return _using(_stack, { + var _usingCtx = _using_ctx(); + return _usingCtx.u({ [Symbol.dispose] () {} }), 0; } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } set x(v) { try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } async am() { try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} }), await null; } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } *g() { try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} }), yield; } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } async *ag() { try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} }), yield, await null; } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } } !function(N) { try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } }(N || (N = {})); try { - var _stack1 = []; - _using(_stack1, { + var _usingCtx1 = _using_ctx(); + _usingCtx1.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx1.e = _; } finally{ - _dispose(_stack1, _error, _hasError); + _usingCtx1.d(); } switch(Math.random()){ case 0: try { - var _stack2 = []; - _using(_stack2, { + var _usingCtx2 = _using_ctx(); + _usingCtx2.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error1 = _, _hasError1 = !0; + _usingCtx2.e = _; } finally{ - _dispose(_stack2, _error1, _hasError1); + _usingCtx2.d(); } case 1: try { - var _stack3 = []; - _using(_stack3, { + var _usingCtx3 = _using_ctx(); + _usingCtx3.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error2 = _, _hasError2 = !0; + _usingCtx3.e = _; } finally{ - _dispose(_stack3, _error2, _hasError2); + _usingCtx3.d(); } } try { - var _stack4 = []; - _using(_stack4, { + var _usingCtx4 = _using_ctx(); + _usingCtx4.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error3 = _, _hasError3 = !0; + _usingCtx4.e = _; } finally{ - _dispose(_stack4, _error3, _hasError3); + _usingCtx4.d(); } try { try { - var _stack5 = []; - _using(_stack5, { + var _usingCtx5 = _using_ctx(); + _usingCtx5.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error4 = _, _hasError4 = !0; + _usingCtx5.e = _; } finally{ - _dispose(_stack5, _error4, _hasError4); + _usingCtx5.d(); } } catch { try { - var _stack6 = []; - _using(_stack6, { + var _usingCtx6 = _using_ctx(); + _usingCtx6.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error5 = _, _hasError5 = !0; + _usingCtx6.e = _; } finally{ - _dispose(_stack6, _error5, _hasError5); + _usingCtx6.d(); } } finally{ try { - var _stack7 = []; - _using(_stack7, { + var _usingCtx7 = _using_ctx(); + _usingCtx7.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error6 = _, _hasError6 = !0; + _usingCtx7.e = _; } finally{ - _dispose(_stack7, _error6, _hasError6); + _usingCtx7.d(); } } try { - var _stack8 = []; - _using(_stack8, { + var _usingCtx8 = _using_ctx(); + _usingCtx8.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error7 = _, _hasError7 = !0; + _usingCtx8.e = _; } finally{ - _dispose(_stack8, _error7, _hasError7); + _usingCtx8.d(); } for(;;)try { - var _stack10 = []; - _using(_stack10, { + var _usingCtx10 = _using_ctx(); + _usingCtx10.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error9 = _, _hasError9 = !0; + _usingCtx10.e = _; } finally{ - _dispose(_stack10, _error9, _hasError9); + _usingCtx10.d(); } for(;;)try { - var _stack11 = []; - _using(_stack11, { + var _usingCtx11 = _using_ctx(); + _usingCtx11.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error10 = _, _hasError10 = !0; + _usingCtx11.e = _; } finally{ - _dispose(_stack11, _error10, _hasError10); + _usingCtx11.d(); } for(;;)try { - var _stack12 = []; - _using(_stack12, { + var _usingCtx12 = _using_ctx(); + _usingCtx12.u({ [Symbol.dispose] () {} }); break; } catch (_) { - var _error11 = _, _hasError11 = !0; + _usingCtx12.e = _; } finally{ - _dispose(_stack12, _error11, _hasError11); + _usingCtx12.d(); } for(let x in {})try { - var _stack13 = []; - _using(_stack13, { + var _usingCtx13 = _using_ctx(); + _usingCtx13.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error12 = _, _hasError12 = !0; + _usingCtx13.e = _; } finally{ - _dispose(_stack13, _error12, _hasError12); + _usingCtx13.d(); } for (let x of [])try { - var _stack14 = []; - _using(_stack14, { + var _usingCtx14 = _using_ctx(); + _usingCtx14.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error13 = _, _hasError13 = !0; + _usingCtx14.e = _; } finally{ - _dispose(_stack14, _error13, _hasError13); + _usingCtx14.d(); } } catch (_) { - var _error14 = _, _hasError14 = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error14, _hasError14); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.11.1.normal.js b/crates/swc/tests/tsc-references/usingDeclarations.11.1.normal.js index c6f398ae2026..8dde64a1e4b2 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.11.1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.11.1.normal.js @@ -3,8 +3,7 @@ import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; import { _ as _inherits } from "@swc/helpers/_/_inherits"; import { _ as _possible_constructor_return } from "@swc/helpers/_/_possible_constructor_return"; import { _ as _create_super } from "@swc/helpers/_/_create_super"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; var A = function A() { "use strict"; _class_call_check(this, A); @@ -17,14 +16,13 @@ var C1 = /*#__PURE__*/ function(A) { _class_call_check(this, C1); var _this; try { - var _stack = []; - var x = _using(_stack, null); + var _usingCtx = _using_ctx(); + var x = _usingCtx.u(null); _this = _super.call(this); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } return _possible_constructor_return(_this); } @@ -38,14 +36,13 @@ var C2 = /*#__PURE__*/ function(A) { _class_call_check(this, C2); var _this; try { - var _stack = []; + var _usingCtx = _using_ctx(); _this = _super.call(this); - var x = _using(_stack, null); + var x = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } return _possible_constructor_return(_this); } @@ -59,15 +56,14 @@ var C3 = /*#__PURE__*/ function(A) { _class_call_check(this, C3); var _this; try { - var _stack = []; - var x = _using(_stack, null); + var _usingCtx = _using_ctx(); + var x = _usingCtx.u(null); _this = _super.call(this); _this.y = 1; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } return _possible_constructor_return(_this); } @@ -81,15 +77,14 @@ var C4 = /*#__PURE__*/ function(A) { _class_call_check(this, C4); var _this; try { - var _stack = []; - var x = _using(_stack, null); + var _usingCtx = _using_ctx(); + var x = _usingCtx.u(null); _this = _super.call(this); _this.y = y; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } return _possible_constructor_return(_this); } @@ -103,16 +98,15 @@ var C5 = /*#__PURE__*/ function(A) { _class_call_check(this, C5); var _this; try { - var _stack = []; - var x = _using(_stack, null); + var _usingCtx = _using_ctx(); + var x = _usingCtx.u(null); _this = _super.call(this); _this.y = y; _this.z = 1; } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } return _possible_constructor_return(_this); } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.11.2.minified.js b/crates/swc/tests/tsc-references/usingDeclarations.11.2.minified.js index c1bf705a749f..09e7774421b8 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.11.2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.11.2.minified.js @@ -3,5 +3,4 @@ import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; import { _ as _inherits } from "@swc/helpers/_/_inherits"; import { _ as _possible_constructor_return } from "@swc/helpers/_/_possible_constructor_return"; import { _ as _create_super } from "@swc/helpers/_/_create_super"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; diff --git a/crates/swc/tests/tsc-references/usingDeclarations.12.1.normal.js b/crates/swc/tests/tsc-references/usingDeclarations.12.1.normal.js index 579131f0a6ad..0955629f5b0f 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.12.1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.12.1.normal.js @@ -1,23 +1,21 @@ //// [usingDeclarations.12.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; class C1 { constructor(){} } class C2 extends C1 { constructor(){ try { - var _stack = []; + var _usingCtx = _using_ctx(); super(); this.y = 1; - var d17 = _using(_stack, { + const d17 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.12.2.minified.js b/crates/swc/tests/tsc-references/usingDeclarations.12.2.minified.js index eafaab673fe0..542f787c77be 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.12.2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.12.2.minified.js @@ -1,3 +1,2 @@ //// [usingDeclarations.12.ts] -import "@swc/helpers/_/_dispose"; -import "@swc/helpers/_/_using"; +import "@swc/helpers/_/_using_ctx"; diff --git a/crates/swc/tests/tsc-references/usingDeclarations.14.1.normal.js b/crates/swc/tests/tsc-references/usingDeclarations.14.1.normal.js index e1310bf57adb..cfbfba2ad869 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.14.1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.14.1.normal.js @@ -1,12 +1,10 @@ //// [usingDeclarations.14.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - var x = _using(_stack, {}); + var _usingCtx = _using_ctx(); + var x = _usingCtx.u({}); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.14.2.minified.js b/crates/swc/tests/tsc-references/usingDeclarations.14.2.minified.js index 4fa7dc998fcb..e50f2dc1dea4 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.14.2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.14.2.minified.js @@ -1,11 +1,10 @@ //// [usingDeclarations.14.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, {}); + var _usingCtx = _using_ctx(); + _usingCtx.u({}); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.15.1.normal.js b/crates/swc/tests/tsc-references/usingDeclarations.15.1.normal.js index 27e0f48f8f79..bea8776ea040 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.15.1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.15.1.normal.js @@ -1,15 +1,13 @@ //// [usingDeclarations.15.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - var _ = _using(_stack, { + var _usingCtx = _using_ctx(); + var _ = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { }; diff --git a/crates/swc/tests/tsc-references/usingDeclarations.15.2.minified.js b/crates/swc/tests/tsc-references/usingDeclarations.15.2.minified.js index a131d9fca3d6..a1f9133d0799 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.15.2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.15.2.minified.js @@ -1,13 +1,12 @@ //// [usingDeclarations.15.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.2(target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarations.2(target=es2015).1.normal.js index 72957d777f17..ebd9d72663f3 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.2(target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.2(target=es2015).1.normal.js @@ -1,18 +1,16 @@ //// [usingDeclarations.2.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; { try { - var _stack = []; - var d1 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d1 = _usingCtx.u({ [Symbol.dispose] () {} - }), d2 = _using(_stack, { + }), d2 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.2(target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarations.2(target=es2015).2.minified.js index bea0f731245e..45ef9b4d6f41 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.2(target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.2(target=es2015).2.minified.js @@ -1,15 +1,14 @@ //// [usingDeclarations.2.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} - }), _using(_stack, { + }), _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.2(target=es2017).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarations.2(target=es2017).1.normal.js index 72957d777f17..ebd9d72663f3 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.2(target=es2017).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.2(target=es2017).1.normal.js @@ -1,18 +1,16 @@ //// [usingDeclarations.2.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; { try { - var _stack = []; - var d1 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d1 = _usingCtx.u({ [Symbol.dispose] () {} - }), d2 = _using(_stack, { + }), d2 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.2(target=es2017).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarations.2(target=es2017).2.minified.js index bea0f731245e..45ef9b4d6f41 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.2(target=es2017).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.2(target=es2017).2.minified.js @@ -1,15 +1,14 @@ //// [usingDeclarations.2.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} - }), _using(_stack, { + }), _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.2(target=es2022).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarations.2(target=es2022).1.normal.js index 72957d777f17..ebd9d72663f3 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.2(target=es2022).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.2(target=es2022).1.normal.js @@ -1,18 +1,16 @@ //// [usingDeclarations.2.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; { try { - var _stack = []; - var d1 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d1 = _usingCtx.u({ [Symbol.dispose] () {} - }), d2 = _using(_stack, { + }), d2 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.2(target=es2022).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarations.2(target=es2022).2.minified.js index bea0f731245e..45ef9b4d6f41 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.2(target=es2022).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.2(target=es2022).2.minified.js @@ -1,15 +1,14 @@ //// [usingDeclarations.2.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} - }), _using(_stack, { + }), _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.2(target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarations.2(target=es5).1.normal.js index 2efd2cf92993..c146a8e5399a 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.2(target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.2(target=es5).1.normal.js @@ -1,15 +1,13 @@ //// [usingDeclarations.2.ts] import { _ as _define_property } from "@swc/helpers/_/_define_property"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; { try { - var _stack = []; - var d1 = _using(_stack, _define_property({}, Symbol.dispose, function() {})), d2 = _using(_stack, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx = _using_ctx(); + var d1 = _usingCtx.u(_define_property({}, Symbol.dispose, function() {})), d2 = _usingCtx.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.2(target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarations.2(target=es5).2.minified.js index 2c49f1134a3a..c33fc5e1fcdb 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.2(target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.2(target=es5).2.minified.js @@ -1,12 +1,11 @@ //// [usingDeclarations.2.ts] import { _ as _define_property } from "@swc/helpers/_/_define_property"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, _define_property({}, Symbol.dispose, function() {})), _using(_stack, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx = _using_ctx(); + _usingCtx.u(_define_property({}, Symbol.dispose, function() {})), _usingCtx.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.2(target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarations.2(target=esnext).1.normal.js index 72957d777f17..ebd9d72663f3 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.2(target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.2(target=esnext).1.normal.js @@ -1,18 +1,16 @@ //// [usingDeclarations.2.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; { try { - var _stack = []; - var d1 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d1 = _usingCtx.u({ [Symbol.dispose] () {} - }), d2 = _using(_stack, { + }), d2 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.2(target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarations.2(target=esnext).2.minified.js index bea0f731245e..45ef9b4d6f41 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.2(target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.2(target=esnext).2.minified.js @@ -1,15 +1,14 @@ //// [usingDeclarations.2.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} - }), _using(_stack, { + }), _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.3(target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarations.3(target=es2015).1.normal.js index 774e56f6bc0d..6f27d83c73a8 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.3(target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.3(target=es2015).1.normal.js @@ -1,18 +1,16 @@ //// [usingDeclarations.3.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; { try { - var _stack = []; - var d1 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d1 = _usingCtx.u({ [Symbol.dispose] () {} - }), d2 = _using(_stack, null), d3 = _using(_stack, undefined), d4 = _using(_stack, { + }), d2 = _usingCtx.u(null), d3 = _usingCtx.u(undefined), d4 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.3(target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarations.3(target=es2015).2.minified.js index 7f1c4a10bf9e..d9daab6fa430 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.3(target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.3(target=es2015).2.minified.js @@ -1,15 +1,14 @@ //// [usingDeclarations.3.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} - }), _using(_stack, null), _using(_stack, void 0), _using(_stack, { + }), _usingCtx.u(null), _usingCtx.u(void 0), _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.3(target=es2017).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarations.3(target=es2017).1.normal.js index 774e56f6bc0d..6f27d83c73a8 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.3(target=es2017).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.3(target=es2017).1.normal.js @@ -1,18 +1,16 @@ //// [usingDeclarations.3.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; { try { - var _stack = []; - var d1 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d1 = _usingCtx.u({ [Symbol.dispose] () {} - }), d2 = _using(_stack, null), d3 = _using(_stack, undefined), d4 = _using(_stack, { + }), d2 = _usingCtx.u(null), d3 = _usingCtx.u(undefined), d4 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.3(target=es2017).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarations.3(target=es2017).2.minified.js index 7f1c4a10bf9e..d9daab6fa430 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.3(target=es2017).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.3(target=es2017).2.minified.js @@ -1,15 +1,14 @@ //// [usingDeclarations.3.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} - }), _using(_stack, null), _using(_stack, void 0), _using(_stack, { + }), _usingCtx.u(null), _usingCtx.u(void 0), _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.3(target=es2022).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarations.3(target=es2022).1.normal.js index 774e56f6bc0d..6f27d83c73a8 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.3(target=es2022).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.3(target=es2022).1.normal.js @@ -1,18 +1,16 @@ //// [usingDeclarations.3.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; { try { - var _stack = []; - var d1 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d1 = _usingCtx.u({ [Symbol.dispose] () {} - }), d2 = _using(_stack, null), d3 = _using(_stack, undefined), d4 = _using(_stack, { + }), d2 = _usingCtx.u(null), d3 = _usingCtx.u(undefined), d4 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.3(target=es2022).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarations.3(target=es2022).2.minified.js index 7f1c4a10bf9e..d9daab6fa430 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.3(target=es2022).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.3(target=es2022).2.minified.js @@ -1,15 +1,14 @@ //// [usingDeclarations.3.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} - }), _using(_stack, null), _using(_stack, void 0), _using(_stack, { + }), _usingCtx.u(null), _usingCtx.u(void 0), _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.3(target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarations.3(target=es5).1.normal.js index e1f8c64aa5a6..b6791667ddbc 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.3(target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.3(target=es5).1.normal.js @@ -1,15 +1,13 @@ //// [usingDeclarations.3.ts] import { _ as _define_property } from "@swc/helpers/_/_define_property"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; { try { - var _stack = []; - var d1 = _using(_stack, _define_property({}, Symbol.dispose, function() {})), d2 = _using(_stack, null), d3 = _using(_stack, undefined), d4 = _using(_stack, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx = _using_ctx(); + var d1 = _usingCtx.u(_define_property({}, Symbol.dispose, function() {})), d2 = _usingCtx.u(null), d3 = _usingCtx.u(undefined), d4 = _usingCtx.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.3(target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarations.3(target=es5).2.minified.js index c7370d2d3792..1b0448496e75 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.3(target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.3(target=es5).2.minified.js @@ -1,12 +1,11 @@ //// [usingDeclarations.3.ts] import { _ as _define_property } from "@swc/helpers/_/_define_property"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, _define_property({}, Symbol.dispose, function() {})), _using(_stack, null), _using(_stack, void 0), _using(_stack, _define_property({}, Symbol.dispose, function() {})); + var _usingCtx = _using_ctx(); + _usingCtx.u(_define_property({}, Symbol.dispose, function() {})), _usingCtx.u(null), _usingCtx.u(void 0), _usingCtx.u(_define_property({}, Symbol.dispose, function() {})); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.3(target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarations.3(target=esnext).1.normal.js index 774e56f6bc0d..6f27d83c73a8 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.3(target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.3(target=esnext).1.normal.js @@ -1,18 +1,16 @@ //// [usingDeclarations.3.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; { try { - var _stack = []; - var d1 = _using(_stack, { + var _usingCtx = _using_ctx(); + const d1 = _usingCtx.u({ [Symbol.dispose] () {} - }), d2 = _using(_stack, null), d3 = _using(_stack, undefined), d4 = _using(_stack, { + }), d2 = _usingCtx.u(null), d3 = _usingCtx.u(undefined), d4 = _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.3(target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarations.3(target=esnext).2.minified.js index 7f1c4a10bf9e..d9daab6fa430 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.3(target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.3(target=esnext).2.minified.js @@ -1,15 +1,14 @@ //// [usingDeclarations.3.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} - }), _using(_stack, null), _using(_stack, void 0), _using(_stack, { + }), _usingCtx.u(null), _usingCtx.u(void 0), _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.9.1.normal.js b/crates/swc/tests/tsc-references/usingDeclarations.9.1.normal.js index 14bbdae302bf..970efa4e9e24 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.9.1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.9.1.normal.js @@ -1,14 +1,12 @@ //// [usingDeclarations.9.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; { try { - var _stack = []; - var a = _using(_stack, null); + var _usingCtx = _using_ctx(); + const a = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } diff --git a/crates/swc/tests/tsc-references/usingDeclarations.9.2.minified.js b/crates/swc/tests/tsc-references/usingDeclarations.9.2.minified.js index f4aafb6612b2..838a1525bee2 100644 --- a/crates/swc/tests/tsc-references/usingDeclarations.9.2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarations.9.2.minified.js @@ -1,11 +1,10 @@ //// [usingDeclarations.9.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsDeclarationEmit.1.1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsDeclarationEmit.1.1.normal.js index 3265f5c0e8a1..fb0905592aa1 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsDeclarationEmit.1.1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsDeclarationEmit.1.1.normal.js @@ -1,19 +1,17 @@ //// [usingDeclarationsDeclarationEmit.1.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; export { r1 }; export { r2 }; try { - var _stack = []; - var r1 = _using(_stack, { + var _usingCtx = _using_ctx(); + var r1 = _usingCtx.u({ [Symbol.dispose] () {} }); - var r2 = _using(_stack, { + var r2 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsDeclarationEmit.1.2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsDeclarationEmit.1.2.minified.js index 63c273a1c4c0..4222545f0b31 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsDeclarationEmit.1.2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsDeclarationEmit.1.2.minified.js @@ -1,15 +1,14 @@ //// [usingDeclarationsDeclarationEmit.1.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = [], r1 = _using(_stack, { + var _usingCtx = _using_ctx(), r1 = _usingCtx.u({ [Symbol.dispose] () {} - }), r2 = _using(_stack, { + }), r2 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } export { r1, r2 }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsDeclarationEmit.2.1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsDeclarationEmit.2.1.normal.js index 27561c7e5b8e..5c38eddf239d 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsDeclarationEmit.2.1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsDeclarationEmit.2.1.normal.js @@ -1,18 +1,16 @@ //// [usingDeclarationsDeclarationEmit.2.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - var r1 = _using(_stack, { + var _usingCtx = _using_ctx(); + var r1 = _usingCtx.u({ [Symbol.dispose] () {} }); - var r2 = _using(_stack, { + var r2 = _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, true); + }); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } export { }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsDeclarationEmit.2.2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsDeclarationEmit.2.2.minified.js index 04280bcd0e01..58dec52a1ed4 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsDeclarationEmit.2.2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsDeclarationEmit.2.2.minified.js @@ -1,15 +1,14 @@ //// [usingDeclarationsDeclarationEmit.2.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} - }), _using(_stack, { + }), _usingCtx.a({ async [Symbol.asyncDispose] () {} - }, !0); + }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - await _dispose(_stack, _error, _hasError); + await _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es2015).1.normal.js index 4aa6df5540c6..048c1a1b02e1 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es2015).1.normal.js @@ -1,7 +1,7 @@ //// [usingDeclarationsInForAwaitOf.ts] import { _ as _async_iterator } from "@swc/helpers/_/_async_iterator"; import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; function main() { return _main.apply(this, arguments); } @@ -20,13 +20,12 @@ function _main() { let _value = _step.value; const d1 = _value; try { - var _stack = []; + var _usingCtx = _using_ctx(); {} } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } } catch (err) { diff --git a/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es2015).2.minified.js index 0c06f8a89017..25676163c058 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es2015).2.minified.js @@ -1,4 +1,4 @@ //// [usingDeclarationsInForAwaitOf.ts] import "@swc/helpers/_/_async_iterator"; import "@swc/helpers/_/_async_to_generator"; -import "@swc/helpers/_/_dispose"; +import "@swc/helpers/_/_using_ctx"; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es2017).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es2017).1.normal.js index f84db7340602..c7af45306326 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es2017).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es2017).1.normal.js @@ -1,5 +1,5 @@ //// [usingDeclarationsInForAwaitOf.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; async function main() { for await (const d1 of [ { @@ -9,13 +9,12 @@ async function main() { undefined ]){ try { - var _stack = []; + var _usingCtx = _using_ctx(); {} } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es2017).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es2017).2.minified.js index ec22de7422b7..d4aece823eb8 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es2017).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es2017).2.minified.js @@ -1,2 +1,2 @@ //// [usingDeclarationsInForAwaitOf.ts] -import "@swc/helpers/_/_dispose"; +import "@swc/helpers/_/_using_ctx"; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es2022).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es2022).1.normal.js index f84db7340602..c7af45306326 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es2022).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es2022).1.normal.js @@ -1,5 +1,5 @@ //// [usingDeclarationsInForAwaitOf.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; async function main() { for await (const d1 of [ { @@ -9,13 +9,12 @@ async function main() { undefined ]){ try { - var _stack = []; + var _usingCtx = _using_ctx(); {} } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es2022).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es2022).2.minified.js index ec22de7422b7..d4aece823eb8 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es2022).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es2022).2.minified.js @@ -1,2 +1,2 @@ //// [usingDeclarationsInForAwaitOf.ts] -import "@swc/helpers/_/_dispose"; +import "@swc/helpers/_/_using_ctx"; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es5).1.normal.js index 7feacd63924a..4dc1b4513e28 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es5).1.normal.js @@ -3,13 +3,13 @@ import { _ as _async_iterator } from "@swc/helpers/_/_async_iterator"; import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator"; import { _ as _define_property } from "@swc/helpers/_/_define_property"; import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; function main() { return _main.apply(this, arguments); } function _main() { _main = _async_to_generator(function() { - var _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, d1, _stack, _error, _hasError, err; + var _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, d1, _usingCtx, err; return _ts_generator(this, function(_state) { switch(_state.label){ case 0: @@ -41,13 +41,12 @@ function _main() { _value = _step.value; d1 = _value; try { - _stack = []; + _usingCtx = _using_ctx(); {} } catch (_) { - _error = _; - _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } _state.label = 4; case 4: diff --git a/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es5).2.minified.js index ac42c2049ba8..1f36613b865b 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=es5).2.minified.js @@ -3,4 +3,4 @@ import "@swc/helpers/_/_async_iterator"; import "@swc/helpers/_/_async_to_generator"; import "@swc/helpers/_/_define_property"; import "@swc/helpers/_/_ts_generator"; -import "@swc/helpers/_/_dispose"; +import "@swc/helpers/_/_using_ctx"; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=esnext).1.normal.js index f84db7340602..c7af45306326 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=esnext).1.normal.js @@ -1,5 +1,5 @@ //// [usingDeclarationsInForAwaitOf.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; async function main() { for await (const d1 of [ { @@ -9,13 +9,12 @@ async function main() { undefined ]){ try { - var _stack = []; + var _usingCtx = _using_ctx(); {} } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=esnext).2.minified.js index ec22de7422b7..d4aece823eb8 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsInForAwaitOf(target=esnext).2.minified.js @@ -1,2 +1,2 @@ //// [usingDeclarationsInForAwaitOf.ts] -import "@swc/helpers/_/_dispose"; +import "@swc/helpers/_/_using_ctx"; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es2015).1.normal.js index 7cf6dff0cf89..800b83760a49 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es2015).1.normal.js @@ -1,5 +1,5 @@ //// [usingDeclarationsInForOf.1.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; for (const d1 of [ { [Symbol.dispose] () {} @@ -8,12 +8,11 @@ for (const d1 of [ undefined ]){ try { - var _stack = []; + var _usingCtx = _using_ctx(); {} } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es2015).2.minified.js index ba9595c1ab7b..834d99aa8f7b 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es2015).2.minified.js @@ -1,5 +1,5 @@ //// [usingDeclarationsInForOf.1.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; for (let d1 of [ { [Symbol.dispose] () {} @@ -7,9 +7,9 @@ for (let d1 of [ null, void 0 ])try { - var _stack = []; + var _usingCtx = _using_ctx(); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es2017).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es2017).1.normal.js index 7cf6dff0cf89..800b83760a49 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es2017).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es2017).1.normal.js @@ -1,5 +1,5 @@ //// [usingDeclarationsInForOf.1.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; for (const d1 of [ { [Symbol.dispose] () {} @@ -8,12 +8,11 @@ for (const d1 of [ undefined ]){ try { - var _stack = []; + var _usingCtx = _using_ctx(); {} } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es2017).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es2017).2.minified.js index ba9595c1ab7b..834d99aa8f7b 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es2017).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es2017).2.minified.js @@ -1,5 +1,5 @@ //// [usingDeclarationsInForOf.1.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; for (let d1 of [ { [Symbol.dispose] () {} @@ -7,9 +7,9 @@ for (let d1 of [ null, void 0 ])try { - var _stack = []; + var _usingCtx = _using_ctx(); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es2022).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es2022).1.normal.js index 7cf6dff0cf89..800b83760a49 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es2022).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es2022).1.normal.js @@ -1,5 +1,5 @@ //// [usingDeclarationsInForOf.1.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; for (const d1 of [ { [Symbol.dispose] () {} @@ -8,12 +8,11 @@ for (const d1 of [ undefined ]){ try { - var _stack = []; + var _usingCtx = _using_ctx(); {} } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es2022).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es2022).2.minified.js index ba9595c1ab7b..834d99aa8f7b 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es2022).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es2022).2.minified.js @@ -1,5 +1,5 @@ //// [usingDeclarationsInForOf.1.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; for (let d1 of [ { [Symbol.dispose] () {} @@ -7,9 +7,9 @@ for (let d1 of [ null, void 0 ])try { - var _stack = []; + var _usingCtx = _using_ctx(); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es5).1.normal.js index 95a0cfbd6b5b..d2a1121d17b1 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es5).1.normal.js @@ -1,6 +1,6 @@ //// [usingDeclarationsInForOf.1.ts] import { _ as _define_property } from "@swc/helpers/_/_define_property"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; for(var _i = 0, _iter = [ _define_property({}, Symbol.dispose, function() {}), null, @@ -8,12 +8,11 @@ for(var _i = 0, _iter = [ ]; _i < _iter.length; _i++){ var d1 = _iter[_i]; try { - var _stack = []; + var _usingCtx = _using_ctx(); {} } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es5).2.minified.js index 050b382f9034..ffd46258d0e9 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=es5).2.minified.js @@ -1,6 +1,6 @@ //// [usingDeclarationsInForOf.1.ts] import { _ as _define_property } from "@swc/helpers/_/_define_property"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; for(var _i = 0, _iter = [ _define_property({}, Symbol.dispose, function() {}), null, @@ -8,10 +8,10 @@ for(var _i = 0, _iter = [ ]; _i < _iter.length; _i++){ _iter[_i]; try { - var _stack = []; + var _usingCtx = _using_ctx(); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=esnext).1.normal.js index 7cf6dff0cf89..800b83760a49 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=esnext).1.normal.js @@ -1,5 +1,5 @@ //// [usingDeclarationsInForOf.1.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; for (const d1 of [ { [Symbol.dispose] () {} @@ -8,12 +8,11 @@ for (const d1 of [ undefined ]){ try { - var _stack = []; + var _usingCtx = _using_ctx(); {} } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=esnext).2.minified.js index ba9595c1ab7b..834d99aa8f7b 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsInForOf.1(target=esnext).2.minified.js @@ -1,5 +1,5 @@ //// [usingDeclarationsInForOf.1.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; for (let d1 of [ { [Symbol.dispose] () {} @@ -7,9 +7,9 @@ for (let d1 of [ null, void 0 ])try { - var _stack = []; + var _usingCtx = _using_ctx(); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=amd).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=amd).1.normal.js index 5a7694ff8c14..40ce3e5e2018 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=amd).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=amd).1.normal.js @@ -2,9 +2,8 @@ define([ "require", "exports", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" -], function(require, exports, _dispose, _using) { + "@swc/helpers/_/_using_ctx" +], function(require, exports, _using_ctx) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true @@ -32,21 +31,20 @@ define([ var _x; var _w; try { - var _stack = []; + var _usingCtx = _using_ctx._(); const x = 1; _x = x; - var z = _using._(_stack, { + var z = _usingCtx.u({ [Symbol.dispose] () {} }); - var y = 2; + const y = 2; const w = 3; _w = w; var _default = 4; console.log(w, x, y, z); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } }); diff --git a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=amd).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=amd).2.minified.js index 235a9ad3569c..0d11f96f11ba 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=amd).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=amd).2.minified.js @@ -2,9 +2,8 @@ define([ "require", "exports", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" -], function(require, exports, _dispose, _using) { + "@swc/helpers/_/_using_ctx" +], function(require, exports, _using_ctx) { Object.defineProperty(exports, "__esModule", { value: !0 }), function(target, all) { @@ -27,17 +26,17 @@ define([ } }); try { - var _x, _w, _stack = []; + var _x, _w, _usingCtx = _using_ctx._(); _x = 1; - var z = _using._(_stack, { + var z = _usingCtx.u({ [Symbol.dispose] () {} - }), y = 2; + }); _w = 3; var _default = 4; - console.log(3, 1, y, z); + console.log(3, 1, 2, z); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } }); diff --git a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=commonjs).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=commonjs).1.normal.js index c40880af7c2e..148c08be13dc 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=commonjs).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=commonjs).1.normal.js @@ -23,25 +23,23 @@ _export(exports, { return y; } }); -const _dispose = require("@swc/helpers/_/_dispose"); -const _using = require("@swc/helpers/_/_using"); +const _using_ctx = require("@swc/helpers/_/_using_ctx"); var _x; var _w; try { - var _stack = []; + var _usingCtx = _using_ctx._(); const x = 1; _x = x; - var z = _using._(_stack, { + var z = _usingCtx.u({ [Symbol.dispose] () {} }); - var y = 2; + const y = 2; const w = 3; _w = w; var _default = 4; console.log(w, x, y, z); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=commonjs).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=commonjs).2.minified.js index 0b85b546bbc0..518a0b1c01e1 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=commonjs).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=commonjs).2.minified.js @@ -20,18 +20,18 @@ Object.defineProperty(exports, "__esModule", { return y; } }); -const _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +const _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _x, _w, _stack = []; + var _x, _w, _usingCtx = _using_ctx._(); _x = 1; - var z = _using._(_stack, { + var z = _usingCtx.u({ [Symbol.dispose] () {} - }), y = 2; + }); _w = 3; var _default = 4; - console.log(3, 1, y, z); + console.log(3, 1, 2, z); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=es6).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=es6).1.normal.js index 0604f3baa47c..e97ab951662c 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=es6).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=es6).1.normal.js @@ -1,27 +1,25 @@ //// [usingDeclarationsTopLevelOfModule.1.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; var _x; export { y }; var _w; export { _default as default }; try { - var _stack = []; + var _usingCtx = _using_ctx(); const x = 1; _x = x; - var z = _using(_stack, { + var z = _usingCtx.u({ [Symbol.dispose] () {} }); - var y = 2; + const y = 2; const w = 3; _w = w; var _default = 4; console.log(w, x, y, z); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { _x as x }; export { _w as w }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=es6).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=es6).2.minified.js index fa9e2f05fd83..21e3eb7e7903 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=es6).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=es6).2.minified.js @@ -1,18 +1,17 @@ //// [usingDeclarationsTopLevelOfModule.1.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _x, _w, _stack = []; + var _x, _w, _usingCtx = _using_ctx(); _x = 1; - var z = _using(_stack, { + var z = _usingCtx.u({ [Symbol.dispose] () {} - }), y = 2; + }); _w = 3; var _default = 4; - console.log(3, 1, y, z); + console.log(3, 1, 2, z); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { y, _default as default, _x as x, _w as w }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=system).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=system).1.normal.js index a8033a3a4d22..2ef834ca120a 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=system).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=system).1.normal.js @@ -1,41 +1,36 @@ //// [usingDeclarationsTopLevelOfModule.1.ts] System.register([ - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _dispose, _using, _x, _w; + var _using_ctx, _x, _w; _export({ x: void 0, w: void 0 }); return { setters: [ - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; + var _usingCtx = _using_ctx(); const x = 1; _export("x", _x = x); - var z = _using(_stack, { + var z = _usingCtx.u({ [Symbol.dispose] () {} }); - var y = 2; + const y = 2; const w = 3; _export("w", _w = w); var _default = 4; console.log(w, x, y, z); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=system).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=system).2.minified.js index 7f6b5dcbdf20..a39976e2ff26 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=system).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.1(module=system).2.minified.js @@ -1,33 +1,29 @@ //// [usingDeclarationsTopLevelOfModule.1.ts] System.register([ - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _dispose, _using; + var _using_ctx; return _export({ x: void 0, w: void 0 }), { setters: [ - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; + var _usingCtx = _using_ctx(); _export("x", 1); - var z = _using(_stack, { + var z = _usingCtx.u({ [Symbol.dispose] () {} }); _export("w", 3), console.log(3, 1, 2, z); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.2(module=amd).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.2(module=amd).1.normal.js index 6c5c72321363..c179a99ce919 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.2(module=amd).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.2(module=amd).1.normal.js @@ -1,22 +1,20 @@ //// [usingDeclarationsTopLevelOfModule.2.ts] define([ "require", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" -], function(require, _dispose, _using) { + "@swc/helpers/_/_using_ctx" +], function(require, _using_ctx) { "use strict"; try { - var _stack = []; - var z = _using._(_stack, { + var _usingCtx = _using_ctx._(); + var z = _usingCtx.u({ [Symbol.dispose] () {} }); - var y = 2; + const y = 2; console.log(y, z); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } return 4; }); diff --git a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.2(module=amd).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.2(module=amd).2.minified.js index 8fc0f4c62610..89b5b04b6252 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.2(module=amd).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.2(module=amd).2.minified.js @@ -1,18 +1,17 @@ //// [usingDeclarationsTopLevelOfModule.2.ts] define([ "require", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" -], function(require, _dispose, _using) { + "@swc/helpers/_/_using_ctx" +], function(require, _using_ctx) { try { - var _stack = [], z = _using._(_stack, { + var _usingCtx = _using_ctx._(), z = _usingCtx.u({ [Symbol.dispose] () {} }); console.log(2, z); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } return 4; }); diff --git a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.2(module=commonjs).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.2(module=commonjs).1.normal.js index ac7d77356c01..ae3cb448f448 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.2(module=commonjs).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.2(module=commonjs).1.normal.js @@ -1,18 +1,16 @@ //// [usingDeclarationsTopLevelOfModule.2.ts] "use strict"; -const _dispose = require("@swc/helpers/_/_dispose"); -const _using = require("@swc/helpers/_/_using"); +const _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - var z = _using._(_stack, { + var _usingCtx = _using_ctx._(); + var z = _usingCtx.u({ [Symbol.dispose] () {} }); - var y = 2; + const y = 2; console.log(y, z); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } module.exports = 4; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.2(module=commonjs).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.2(module=commonjs).2.minified.js index 0d780e751f10..21d7176e8f0f 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.2(module=commonjs).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.2(module=commonjs).2.minified.js @@ -1,13 +1,13 @@ //// [usingDeclarationsTopLevelOfModule.2.ts] -const _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +const _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = [], z = _using._(_stack, { + var _usingCtx = _using_ctx._(), z = _usingCtx.u({ [Symbol.dispose] () {} }); console.log(2, z); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } module.exports = 4; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=amd).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=amd).1.normal.js index bd7fb156189a..29254e094e4b 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=amd).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=amd).1.normal.js @@ -2,9 +2,8 @@ define([ "require", "exports", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" -], function(require, exports, _dispose, _using) { + "@swc/helpers/_/_using_ctx" +], function(require, exports, _using_ctx) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true @@ -19,17 +18,16 @@ define([ console.log(y, z); } try { - var _stack = []; - var z = _using._(_stack, { + var _usingCtx = _using_ctx._(); + var z = _usingCtx.u({ [Symbol.dispose] () {} }); if (false) { var y = 1; } } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } }); diff --git a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=amd).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=amd).2.minified.js index 4de8524df2b3..773ec14e9b2c 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=amd).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=amd).2.minified.js @@ -2,9 +2,8 @@ define([ "require", "exports", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" -], function(require, exports, _dispose, _using) { + "@swc/helpers/_/_using_ctx" +], function(require, exports, _using_ctx) { Object.defineProperty(exports, "__esModule", { value: !0 }), Object.defineProperty(exports, "y", { @@ -14,13 +13,13 @@ define([ } }); try { - var y, _stack = []; - _using._(_stack, { + var y, _usingCtx = _using_ctx._(); + _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } }); diff --git a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=commonjs).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=commonjs).1.normal.js index 2dd8b5782eb3..e0c7677ce190 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=commonjs).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=commonjs).1.normal.js @@ -9,22 +9,20 @@ Object.defineProperty(exports, "y", { return y; } }); -const _dispose = require("@swc/helpers/_/_dispose"); -const _using = require("@swc/helpers/_/_using"); +const _using_ctx = require("@swc/helpers/_/_using_ctx"); function f() { console.log(y, z); } try { - var _stack = []; - var z = _using._(_stack, { + var _usingCtx = _using_ctx._(); + var z = _usingCtx.u({ [Symbol.dispose] () {} }); if (false) { var y = 1; } } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=commonjs).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=commonjs).2.minified.js index cba65395d88b..8ce33f9e3e3c 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=commonjs).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=commonjs).2.minified.js @@ -7,14 +7,14 @@ Object.defineProperty(exports, "__esModule", { return y; } }); -const _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +const _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var y, _stack = []; - _using._(_stack, { + var y, _usingCtx = _using_ctx._(); + _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=es6).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=es6).1.normal.js index 97fc475ed13c..f89557661729 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=es6).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=es6).1.normal.js @@ -1,21 +1,19 @@ //// [usingDeclarationsTopLevelOfModule.3.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; export { y }; function f() { console.log(y, z); } try { - var _stack = []; - var z = _using(_stack, { + var _usingCtx = _using_ctx(); + var z = _usingCtx.u({ [Symbol.dispose] () {} }); if (false) { var y = 1; } } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=es6).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=es6).2.minified.js index ae84ccce678e..9589e9d10f9a 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=es6).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=es6).2.minified.js @@ -1,14 +1,13 @@ //// [usingDeclarationsTopLevelOfModule.3.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var y, _stack = []; - _using(_stack, { + var y, _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { y }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=system).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=system).1.normal.js index 6a21991c75c8..e0d29f964924 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=system).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=system).1.normal.js @@ -1,36 +1,31 @@ //// [usingDeclarationsTopLevelOfModule.3.ts] System.register([ - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _dispose, _using; + var _using_ctx; function f() { console.log(y, z); } return { setters: [ - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - var z = _using(_stack, { + var _usingCtx = _using_ctx(); + var z = _usingCtx.u({ [Symbol.dispose] () {} }); if (false) { var y = 1; } } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=system).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=system).2.minified.js index 712c9430eab4..5684a13c1acc 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=system).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsTopLevelOfModule.3(module=system).2.minified.js @@ -1,28 +1,24 @@ //// [usingDeclarationsTopLevelOfModule.3.ts] System.register([ - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _dispose, _using; + var _using_ctx; return { setters: [ - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - _using(_stack, { + var _usingCtx = _using_ctx(); + _usingCtx.u({ [Symbol.dispose] () {} }); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithImportHelpers.1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithImportHelpers.1.normal.js index 1ff249944171..8263f40ba35b 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithImportHelpers.1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithImportHelpers.1.normal.js @@ -1,14 +1,12 @@ //// [usingDeclarationsWithImportHelpers.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; { try { - var _stack = []; - var a = _using(_stack, null); + var _usingCtx = _using_ctx(); + const a = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } }export { }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithImportHelpers.2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithImportHelpers.2.minified.js index 4a018730d716..253ed876295c 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithImportHelpers.2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithImportHelpers.2.minified.js @@ -1,11 +1,10 @@ //// [usingDeclarationsWithImportHelpers.ts] -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=commonjs,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=commonjs,target=es2015).1.normal.js index 71858adb8861..b29dc452d1fe 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=commonjs,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=commonjs,target=es2015).1.normal.js @@ -4,19 +4,17 @@ Object.defineProperty(exports, "__esModule", { value: true }); const _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -const _dispose = require("@swc/helpers/_/_dispose"); -const _using = require("@swc/helpers/_/_using"); +const _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - var before = _using._(_stack, null); + var _usingCtx = _using_ctx._(); + var before = _usingCtx.u(null); class C { } C = _ts_decorate._([ dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=commonjs,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=commonjs,target=es2015).2.minified.js index 5347912f58a5..c4a2f9568a0f 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=commonjs,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=commonjs,target=es2015).2.minified.js @@ -2,17 +2,17 @@ Object.defineProperty(exports, "__esModule", { value: !0 }); -const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - _using._(_stack, null); + var _usingCtx = _using_ctx._(); + _usingCtx.u(null); class C { } C = _ts_decorate._([ dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=commonjs,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=commonjs,target=es5).1.normal.js index 3b88e544e4b3..70dc22dd5dda 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=commonjs,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=commonjs,target=es5).1.normal.js @@ -5,11 +5,10 @@ Object.defineProperty(exports, "__esModule", { }); var _class_call_check = require("@swc/helpers/_/_class_call_check"); var _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -var _dispose = require("@swc/helpers/_/_dispose"); -var _using = require("@swc/helpers/_/_using"); +var _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - var before = _using._(_stack, null); + var _usingCtx = _using_ctx._(); + var before = _usingCtx.u(null); var C = function C() { "use strict"; _class_call_check._(this, C); @@ -18,8 +17,7 @@ try { dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=commonjs,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=commonjs,target=es5).2.minified.js index f8df351945e0..80fe04afdaae 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=commonjs,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=commonjs,target=es5).2.minified.js @@ -2,10 +2,10 @@ Object.defineProperty(exports, "__esModule", { value: !0 }); -var _class_call_check = require("@swc/helpers/_/_class_call_check"), _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +var _class_call_check = require("@swc/helpers/_/_class_call_check"), _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - _using._(_stack, null); + var _usingCtx = _using_ctx._(); + _usingCtx.u(null); var C = function C() { _class_call_check._(this, C); }; @@ -13,7 +13,7 @@ try { dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=commonjs,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=commonjs,target=esnext).1.normal.js index 71858adb8861..b29dc452d1fe 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=commonjs,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=commonjs,target=esnext).1.normal.js @@ -4,19 +4,17 @@ Object.defineProperty(exports, "__esModule", { value: true }); const _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -const _dispose = require("@swc/helpers/_/_dispose"); -const _using = require("@swc/helpers/_/_using"); +const _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - var before = _using._(_stack, null); + var _usingCtx = _using_ctx._(); + var before = _usingCtx.u(null); class C { } C = _ts_decorate._([ dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=commonjs,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=commonjs,target=esnext).2.minified.js index 5347912f58a5..c4a2f9568a0f 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=commonjs,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=commonjs,target=esnext).2.minified.js @@ -2,17 +2,17 @@ Object.defineProperty(exports, "__esModule", { value: !0 }); -const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - _using._(_stack, null); + var _usingCtx = _using_ctx._(); + _usingCtx.u(null); class C { } C = _ts_decorate._([ dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=es6,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=es6,target=es2015).1.normal.js index f50c324a8527..036b36e82eb7 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=es6,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=es6,target=es2015).1.normal.js @@ -1,19 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.1.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); class C { } C = _ts_decorate([ dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=es6,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=es6,target=es2015).2.minified.js index 9cbb6cc4f685..89afdaf62485 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=es6,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=es6,target=es2015).2.minified.js @@ -1,17 +1,16 @@ //// [usingDeclarationsWithLegacyClassDecorators.1.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); class C { } C = _ts_decorate([ dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=es6,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=es6,target=es5).1.normal.js index 3772cb89cb1f..1f8c924c6150 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=es6,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=es6,target=es5).1.normal.js @@ -1,11 +1,10 @@ //// [usingDeclarationsWithLegacyClassDecorators.1.ts] import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); var C = function C() { "use strict"; _class_call_check(this, C); @@ -14,9 +13,8 @@ try { dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=es6,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=es6,target=es5).2.minified.js index e60f53b1998a..1df3155cec14 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=es6,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=es6,target=es5).2.minified.js @@ -1,11 +1,10 @@ //// [usingDeclarationsWithLegacyClassDecorators.1.ts] import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); var C = function C() { _class_call_check(this, C); }; @@ -13,7 +12,7 @@ try { dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=es6,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=es6,target=esnext).1.normal.js index f50c324a8527..036b36e82eb7 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=es6,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=es6,target=esnext).1.normal.js @@ -1,19 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.1.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); class C { } C = _ts_decorate([ dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=es6,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=es6,target=esnext).2.minified.js index 9cbb6cc4f685..89afdaf62485 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=es6,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=es6,target=esnext).2.minified.js @@ -1,17 +1,16 @@ //// [usingDeclarationsWithLegacyClassDecorators.1.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); class C { } C = _ts_decorate([ dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=system,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=system,target=es2015).1.normal.js index 292bace8b988..bf6171222432 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=system,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=system,target=es2015).1.normal.js @@ -1,37 +1,32 @@ //// [usingDeclarationsWithLegacyClassDecorators.1.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); class C { } C = _ts_decorate([ dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=system,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=system,target=es2015).2.minified.js index 1bf45619cf1c..eb06e75805f5 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=system,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=system,target=es2015).2.minified.js @@ -1,35 +1,31 @@ //// [usingDeclarationsWithLegacyClassDecorators.1.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); class C { } C = _ts_decorate([ dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=system,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=system,target=es5).1.normal.js index c3d1656b6dba..10ae37db19a1 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=system,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=system,target=es5).1.normal.js @@ -2,11 +2,10 @@ System.register([ "@swc/helpers/_/_class_call_check", "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _class_call_check, _ts_decorate, _dispose, _using; + var _class_call_check, _ts_decorate, _using_ctx; return { setters: [ function(_class_call_check1) { @@ -15,17 +14,14 @@ System.register([ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); var C = function C() { "use strict"; _class_call_check(this, C); @@ -34,10 +30,9 @@ System.register([ dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=system,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=system,target=es5).2.minified.js index 09cdc5617de8..425273eedcc5 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=system,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=system,target=es5).2.minified.js @@ -2,10 +2,9 @@ System.register([ "@swc/helpers/_/_class_call_check", "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _class_call_check, _ts_decorate, _dispose, _using; + var _class_call_check, _ts_decorate, _using_ctx; return { setters: [ function(_class_call_check1) { @@ -14,17 +13,14 @@ System.register([ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); var C = function C() { _class_call_check(this, C); }; @@ -32,9 +28,9 @@ System.register([ dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=system,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=system,target=esnext).1.normal.js index 292bace8b988..bf6171222432 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=system,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=system,target=esnext).1.normal.js @@ -1,37 +1,32 @@ //// [usingDeclarationsWithLegacyClassDecorators.1.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); class C { } C = _ts_decorate([ dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=system,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=system,target=esnext).2.minified.js index 1bf45619cf1c..eb06e75805f5 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=system,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.1(module=system,target=esnext).2.minified.js @@ -1,35 +1,31 @@ //// [usingDeclarationsWithLegacyClassDecorators.1.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); class C { } C = _ts_decorate([ dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=commonjs,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=commonjs,target=es2015).1.normal.js index 79fc6942532b..abdfcde66ed6 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=commonjs,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=commonjs,target=es2015).1.normal.js @@ -10,19 +10,17 @@ Object.defineProperty(exports, "default", { } }); const _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -const _dispose = require("@swc/helpers/_/_dispose"); -const _using = require("@swc/helpers/_/_using"); +const _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; + var _usingCtx = _using_ctx._(); var _class = class _class { }; _class = _ts_decorate._([ dec ], _class); - var after = _using._(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=commonjs,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=commonjs,target=es2015).2.minified.js index cf4b69303668..025220975440 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=commonjs,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=commonjs,target=es2015).2.minified.js @@ -7,15 +7,15 @@ Object.defineProperty(exports, "__esModule", { return _class; } }); -const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = [], _class = class { + var _usingCtx = _using_ctx._(), _class = class { }; _class = _ts_decorate._([ dec - ], _class), _using._(_stack, null); + ], _class), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=commonjs,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=commonjs,target=es5).1.normal.js index c57a552fa146..865696319f96 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=commonjs,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=commonjs,target=es5).1.normal.js @@ -11,10 +11,9 @@ Object.defineProperty(exports, "default", { }); var _class_call_check = require("@swc/helpers/_/_class_call_check"); var _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -var _dispose = require("@swc/helpers/_/_dispose"); -var _using = require("@swc/helpers/_/_using"); +var _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; + var _usingCtx = _using_ctx._(); var _class = function _class() { "use strict"; _class_call_check._(this, _class); @@ -22,10 +21,9 @@ try { _class = _ts_decorate._([ dec ], _class); - var after = _using._(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=commonjs,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=commonjs,target=es5).2.minified.js index af534cf7f332..123ab2d2f173 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=commonjs,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=commonjs,target=es5).2.minified.js @@ -7,16 +7,16 @@ Object.defineProperty(exports, "__esModule", { return _class; } }); -var _class_call_check = require("@swc/helpers/_/_class_call_check"), _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +var _class_call_check = require("@swc/helpers/_/_class_call_check"), _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = [], _class = function _class() { + var _usingCtx = _using_ctx._(), _class = function _class() { _class_call_check._(this, _class); }; _class = _ts_decorate._([ dec - ], _class), _using._(_stack, null); + ], _class), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=commonjs,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=commonjs,target=esnext).1.normal.js index 79fc6942532b..abdfcde66ed6 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=commonjs,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=commonjs,target=esnext).1.normal.js @@ -10,19 +10,17 @@ Object.defineProperty(exports, "default", { } }); const _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -const _dispose = require("@swc/helpers/_/_dispose"); -const _using = require("@swc/helpers/_/_using"); +const _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; + var _usingCtx = _using_ctx._(); var _class = class _class { }; _class = _ts_decorate._([ dec ], _class); - var after = _using._(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=commonjs,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=commonjs,target=esnext).2.minified.js index cf4b69303668..025220975440 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=commonjs,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=commonjs,target=esnext).2.minified.js @@ -7,15 +7,15 @@ Object.defineProperty(exports, "__esModule", { return _class; } }); -const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = [], _class = class { + var _usingCtx = _using_ctx._(), _class = class { }; _class = _ts_decorate._([ dec - ], _class), _using._(_stack, null); + ], _class), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=es6,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=es6,target=es2015).1.normal.js index 6823bf320d59..ffed1694dcb1 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=es6,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=es6,target=es2015).1.normal.js @@ -1,19 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.10.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; export { _class as default }; try { - var _stack = []; + var _usingCtx = _using_ctx(); var _class = class _class { }; _class = _ts_decorate([ dec ], _class); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=es6,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=es6,target=es2015).2.minified.js index 1b759cf5937a..8b1e6147911a 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=es6,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=es6,target=es2015).2.minified.js @@ -1,16 +1,15 @@ //// [usingDeclarationsWithLegacyClassDecorators.10.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = [], _class = class { + var _usingCtx = _using_ctx(), _class = class { }; _class = _ts_decorate([ dec - ], _class), _using(_stack, null); + ], _class), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { _class as default }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=es6,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=es6,target=es5).1.normal.js index 28ac007ccf85..9c71428b2c81 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=es6,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=es6,target=es5).1.normal.js @@ -1,11 +1,10 @@ //// [usingDeclarationsWithLegacyClassDecorators.10.ts] import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; export { _class as default }; try { - var _stack = []; + var _usingCtx = _using_ctx(); var _class = function _class() { "use strict"; _class_call_check(this, _class); @@ -13,10 +12,9 @@ try { _class = _ts_decorate([ dec ], _class); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=es6,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=es6,target=es5).2.minified.js index 266989eeefa2..309d1a77bebb 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=es6,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=es6,target=es5).2.minified.js @@ -1,18 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.10.ts] import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = [], _class = function _class() { + var _usingCtx = _using_ctx(), _class = function _class() { _class_call_check(this, _class); }; _class = _ts_decorate([ dec - ], _class), _using(_stack, null); + ], _class), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { _class as default }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=es6,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=es6,target=esnext).1.normal.js index 6823bf320d59..ffed1694dcb1 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=es6,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=es6,target=esnext).1.normal.js @@ -1,19 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.10.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; export { _class as default }; try { - var _stack = []; + var _usingCtx = _using_ctx(); var _class = class _class { }; _class = _ts_decorate([ dec ], _class); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=es6,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=es6,target=esnext).2.minified.js index 1b759cf5937a..8b1e6147911a 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=es6,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=es6,target=esnext).2.minified.js @@ -1,16 +1,15 @@ //// [usingDeclarationsWithLegacyClassDecorators.10.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = [], _class = class { + var _usingCtx = _using_ctx(), _class = class { }; _class = _ts_decorate([ dec - ], _class), _using(_stack, null); + ], _class), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { _class as default }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=system,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=system,target=es2015).1.normal.js index b840ec30cb32..881ecb69908c 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=system,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=system,target=es2015).1.normal.js @@ -1,37 +1,32 @@ //// [usingDeclarationsWithLegacyClassDecorators.10.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; + var _usingCtx = _using_ctx(); var _class = class _class { }; _export("default", _class = _ts_decorate([ dec ], _class)); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=system,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=system,target=es2015).2.minified.js index 79281b2bafc5..118dd094ae31 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=system,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=system,target=es2015).2.minified.js @@ -1,33 +1,29 @@ //// [usingDeclarationsWithLegacyClassDecorators.10.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = [], _class = class { + var _usingCtx = _using_ctx(), _class = class { }; _export("default", _class = _ts_decorate([ dec - ], _class)), _using(_stack, null); + ], _class)), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=system,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=system,target=es5).1.normal.js index 0b9efbbe8522..cb38103c539a 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=system,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=system,target=es5).1.normal.js @@ -2,11 +2,10 @@ System.register([ "@swc/helpers/_/_class_call_check", "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _class_call_check, _ts_decorate, _dispose, _using; + var _class_call_check, _ts_decorate, _using_ctx; return { setters: [ function(_class_call_check1) { @@ -15,16 +14,13 @@ System.register([ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; + var _usingCtx = _using_ctx(); var _class = function _class() { "use strict"; _class_call_check(this, _class); @@ -32,12 +28,11 @@ System.register([ _export("default", _class = _ts_decorate([ dec ], _class)); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=system,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=system,target=es5).2.minified.js index 0c53bfc5da64..1430703415a7 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=system,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=system,target=es5).2.minified.js @@ -2,10 +2,9 @@ System.register([ "@swc/helpers/_/_class_call_check", "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _class_call_check, _ts_decorate, _dispose, _using; + var _class_call_check, _ts_decorate, _using_ctx; return { setters: [ function(_class_call_check1) { @@ -14,25 +13,22 @@ System.register([ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = [], _class = function _class() { + var _usingCtx = _using_ctx(), _class = function _class() { _class_call_check(this, _class); }; _export("default", _class = _ts_decorate([ dec - ], _class)), _using(_stack, null); + ], _class)), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=system,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=system,target=esnext).1.normal.js index b840ec30cb32..881ecb69908c 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=system,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=system,target=esnext).1.normal.js @@ -1,37 +1,32 @@ //// [usingDeclarationsWithLegacyClassDecorators.10.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; + var _usingCtx = _using_ctx(); var _class = class _class { }; _export("default", _class = _ts_decorate([ dec ], _class)); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=system,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=system,target=esnext).2.minified.js index 79281b2bafc5..118dd094ae31 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=system,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.10(module=system,target=esnext).2.minified.js @@ -1,33 +1,29 @@ //// [usingDeclarationsWithLegacyClassDecorators.10.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = [], _class = class { + var _usingCtx = _using_ctx(), _class = class { }; _export("default", _class = _ts_decorate([ dec - ], _class)), _using(_stack, null); + ], _class)), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=commonjs,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=commonjs,target=es2015).1.normal.js index 2060f3f17abd..5cbd98dbc701 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=commonjs,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=commonjs,target=es2015).1.normal.js @@ -10,19 +10,17 @@ Object.defineProperty(exports, "C", { } }); const _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -const _dispose = require("@swc/helpers/_/_dispose"); -const _using = require("@swc/helpers/_/_using"); +const _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; + var _usingCtx = _using_ctx._(); class C { } C = _ts_decorate._([ dec ], C); - var after = _using._(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=commonjs,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=commonjs,target=es2015).2.minified.js index 712eac0bbbc3..892d8ceeb02b 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=commonjs,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=commonjs,target=es2015).2.minified.js @@ -7,16 +7,16 @@ Object.defineProperty(exports, "__esModule", { return C; } }); -const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; + var _usingCtx = _using_ctx._(); class C1 { } C1 = _ts_decorate._([ dec - ], C1), _using._(_stack, null); + ], C1), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=commonjs,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=commonjs,target=es5).1.normal.js index 62f2647d57ea..8b84463d0a1a 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=commonjs,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=commonjs,target=es5).1.normal.js @@ -11,10 +11,9 @@ Object.defineProperty(exports, "C", { }); var _class_call_check = require("@swc/helpers/_/_class_call_check"); var _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -var _dispose = require("@swc/helpers/_/_dispose"); -var _using = require("@swc/helpers/_/_using"); +var _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; + var _usingCtx = _using_ctx._(); var C = function C() { "use strict"; _class_call_check._(this, C); @@ -22,10 +21,9 @@ try { C = _ts_decorate._([ dec ], C); - var after = _using._(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=commonjs,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=commonjs,target=es5).2.minified.js index d0d9048335cc..2b7c106f9f2b 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=commonjs,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=commonjs,target=es5).2.minified.js @@ -7,16 +7,16 @@ Object.defineProperty(exports, "__esModule", { return C; } }); -var _class_call_check = require("@swc/helpers/_/_class_call_check"), _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +var _class_call_check = require("@swc/helpers/_/_class_call_check"), _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = [], C = function C() { + var _usingCtx = _using_ctx._(), C = function C() { _class_call_check._(this, C); }; C = _ts_decorate._([ dec - ], C), _using._(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=commonjs,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=commonjs,target=esnext).1.normal.js index 2060f3f17abd..5cbd98dbc701 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=commonjs,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=commonjs,target=esnext).1.normal.js @@ -10,19 +10,17 @@ Object.defineProperty(exports, "C", { } }); const _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -const _dispose = require("@swc/helpers/_/_dispose"); -const _using = require("@swc/helpers/_/_using"); +const _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; + var _usingCtx = _using_ctx._(); class C { } C = _ts_decorate._([ dec ], C); - var after = _using._(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=commonjs,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=commonjs,target=esnext).2.minified.js index 712eac0bbbc3..892d8ceeb02b 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=commonjs,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=commonjs,target=esnext).2.minified.js @@ -7,16 +7,16 @@ Object.defineProperty(exports, "__esModule", { return C; } }); -const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; + var _usingCtx = _using_ctx._(); class C1 { } C1 = _ts_decorate._([ dec - ], C1), _using._(_stack, null); + ], C1), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=es6,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=es6,target=es2015).1.normal.js index f2936a1d2007..2daa7fe9636f 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=es6,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=es6,target=es2015).1.normal.js @@ -1,19 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.11.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; export { C }; try { - var _stack = []; + var _usingCtx = _using_ctx(); class C { } C = _ts_decorate([ dec ], C); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=es6,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=es6,target=es2015).2.minified.js index bfc41e688265..74007d040bac 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=es6,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=es6,target=es2015).2.minified.js @@ -1,17 +1,16 @@ //// [usingDeclarationsWithLegacyClassDecorators.11.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; + var _usingCtx = _using_ctx(); class C { } C = _ts_decorate([ dec - ], C), _using(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { C }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=es6,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=es6,target=es5).1.normal.js index 10b8e7222029..b3e990cd56ad 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=es6,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=es6,target=es5).1.normal.js @@ -1,11 +1,10 @@ //// [usingDeclarationsWithLegacyClassDecorators.11.ts] import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; export { C }; try { - var _stack = []; + var _usingCtx = _using_ctx(); var C = function C() { "use strict"; _class_call_check(this, C); @@ -13,10 +12,9 @@ try { C = _ts_decorate([ dec ], C); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=es6,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=es6,target=es5).2.minified.js index 8ce197772e6b..35f3137e9e11 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=es6,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=es6,target=es5).2.minified.js @@ -1,18 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.11.ts] import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = [], C = function C() { + var _usingCtx = _using_ctx(), C = function C() { _class_call_check(this, C); }; C = _ts_decorate([ dec - ], C), _using(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { C }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=es6,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=es6,target=esnext).1.normal.js index f2936a1d2007..2daa7fe9636f 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=es6,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=es6,target=esnext).1.normal.js @@ -1,19 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.11.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; export { C }; try { - var _stack = []; + var _usingCtx = _using_ctx(); class C { } C = _ts_decorate([ dec ], C); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=es6,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=es6,target=esnext).2.minified.js index bfc41e688265..74007d040bac 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=es6,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=es6,target=esnext).2.minified.js @@ -1,17 +1,16 @@ //// [usingDeclarationsWithLegacyClassDecorators.11.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; + var _usingCtx = _using_ctx(); class C { } C = _ts_decorate([ dec - ], C), _using(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { C }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=system,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=system,target=es2015).1.normal.js index 68ed418475fd..7d98f05d9d82 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=system,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=system,target=es2015).1.normal.js @@ -1,37 +1,32 @@ //// [usingDeclarationsWithLegacyClassDecorators.11.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; + var _usingCtx = _using_ctx(); class C { } _export("C", C = _ts_decorate([ dec ], C)); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=system,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=system,target=es2015).2.minified.js index 4846050e419d..1f6e0fa7f09c 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=system,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=system,target=es2015).2.minified.js @@ -1,34 +1,30 @@ //// [usingDeclarationsWithLegacyClassDecorators.11.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; + var _usingCtx = _using_ctx(); class C { } _export("C", C = _ts_decorate([ dec - ], C)), _using(_stack, null); + ], C)), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=system,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=system,target=es5).1.normal.js index 4096021ba5a2..1221ef2e9cf0 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=system,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=system,target=es5).1.normal.js @@ -2,11 +2,10 @@ System.register([ "@swc/helpers/_/_class_call_check", "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _class_call_check, _ts_decorate, _dispose, _using; + var _class_call_check, _ts_decorate, _using_ctx; return { setters: [ function(_class_call_check1) { @@ -15,16 +14,13 @@ System.register([ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; + var _usingCtx = _using_ctx(); var C = function C() { "use strict"; _class_call_check(this, C); @@ -32,12 +28,11 @@ System.register([ _export("C", C = _ts_decorate([ dec ], C)); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=system,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=system,target=es5).2.minified.js index 1e7955da9826..ef43f70c7b46 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=system,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=system,target=es5).2.minified.js @@ -2,10 +2,9 @@ System.register([ "@swc/helpers/_/_class_call_check", "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _class_call_check, _ts_decorate, _dispose, _using; + var _class_call_check, _ts_decorate, _using_ctx; return { setters: [ function(_class_call_check1) { @@ -14,25 +13,22 @@ System.register([ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = [], C = function C() { + var _usingCtx = _using_ctx(), C = function C() { _class_call_check(this, C); }; _export("C", C = _ts_decorate([ dec - ], C)), _using(_stack, null); + ], C)), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=system,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=system,target=esnext).1.normal.js index 68ed418475fd..7d98f05d9d82 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=system,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=system,target=esnext).1.normal.js @@ -1,37 +1,32 @@ //// [usingDeclarationsWithLegacyClassDecorators.11.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; + var _usingCtx = _using_ctx(); class C { } _export("C", C = _ts_decorate([ dec ], C)); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=system,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=system,target=esnext).2.minified.js index 4846050e419d..1f6e0fa7f09c 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=system,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.11(module=system,target=esnext).2.minified.js @@ -1,34 +1,30 @@ //// [usingDeclarationsWithLegacyClassDecorators.11.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; + var _usingCtx = _using_ctx(); class C { } _export("C", C = _ts_decorate([ dec - ], C)), _using(_stack, null); + ], C)), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=commonjs,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=commonjs,target=es2015).1.normal.js index 977c78ee12bf..eaef720a233d 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=commonjs,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=commonjs,target=es2015).1.normal.js @@ -10,19 +10,17 @@ Object.defineProperty(exports, "D", { } }); const _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -const _dispose = require("@swc/helpers/_/_dispose"); -const _using = require("@swc/helpers/_/_using"); +const _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; + var _usingCtx = _using_ctx._(); class C { } C = _ts_decorate._([ dec ], C); - var after = _using._(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=commonjs,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=commonjs,target=es2015).2.minified.js index 7cf79fb251ce..e9dd78c1b36d 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=commonjs,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=commonjs,target=es2015).2.minified.js @@ -7,16 +7,16 @@ Object.defineProperty(exports, "__esModule", { return C; } }); -const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; + var _usingCtx = _using_ctx._(); class C1 { } C1 = _ts_decorate._([ dec - ], C1), _using._(_stack, null); + ], C1), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=commonjs,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=commonjs,target=es5).1.normal.js index 872cf7a4def8..ae267c344a62 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=commonjs,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=commonjs,target=es5).1.normal.js @@ -11,10 +11,9 @@ Object.defineProperty(exports, "D", { }); var _class_call_check = require("@swc/helpers/_/_class_call_check"); var _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -var _dispose = require("@swc/helpers/_/_dispose"); -var _using = require("@swc/helpers/_/_using"); +var _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; + var _usingCtx = _using_ctx._(); var C = function C() { "use strict"; _class_call_check._(this, C); @@ -22,10 +21,9 @@ try { C = _ts_decorate._([ dec ], C); - var after = _using._(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=commonjs,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=commonjs,target=es5).2.minified.js index 17a533f5293c..fd8bd2b2ef3c 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=commonjs,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=commonjs,target=es5).2.minified.js @@ -7,16 +7,16 @@ Object.defineProperty(exports, "__esModule", { return C; } }); -var _class_call_check = require("@swc/helpers/_/_class_call_check"), _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +var _class_call_check = require("@swc/helpers/_/_class_call_check"), _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = [], C = function C() { + var _usingCtx = _using_ctx._(), C = function C() { _class_call_check._(this, C); }; C = _ts_decorate._([ dec - ], C), _using._(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=commonjs,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=commonjs,target=esnext).1.normal.js index 977c78ee12bf..eaef720a233d 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=commonjs,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=commonjs,target=esnext).1.normal.js @@ -10,19 +10,17 @@ Object.defineProperty(exports, "D", { } }); const _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -const _dispose = require("@swc/helpers/_/_dispose"); -const _using = require("@swc/helpers/_/_using"); +const _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; + var _usingCtx = _using_ctx._(); class C { } C = _ts_decorate._([ dec ], C); - var after = _using._(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=commonjs,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=commonjs,target=esnext).2.minified.js index 7cf79fb251ce..e9dd78c1b36d 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=commonjs,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=commonjs,target=esnext).2.minified.js @@ -7,16 +7,16 @@ Object.defineProperty(exports, "__esModule", { return C; } }); -const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; + var _usingCtx = _using_ctx._(); class C1 { } C1 = _ts_decorate._([ dec - ], C1), _using._(_stack, null); + ], C1), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=es6,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=es6,target=es2015).1.normal.js index ab3578769112..a21418310128 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=es6,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=es6,target=es2015).1.normal.js @@ -1,19 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.12.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; export { C as D }; try { - var _stack = []; + var _usingCtx = _using_ctx(); class C { } C = _ts_decorate([ dec ], C); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=es6,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=es6,target=es2015).2.minified.js index 025b7687012a..96a12738b3e3 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=es6,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=es6,target=es2015).2.minified.js @@ -1,17 +1,16 @@ //// [usingDeclarationsWithLegacyClassDecorators.12.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; + var _usingCtx = _using_ctx(); class C { } C = _ts_decorate([ dec - ], C), _using(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { C as D }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=es6,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=es6,target=es5).1.normal.js index 53a8569a8754..2d2972eea9ce 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=es6,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=es6,target=es5).1.normal.js @@ -1,11 +1,10 @@ //// [usingDeclarationsWithLegacyClassDecorators.12.ts] import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; export { C as D }; try { - var _stack = []; + var _usingCtx = _using_ctx(); var C = function C() { "use strict"; _class_call_check(this, C); @@ -13,10 +12,9 @@ try { C = _ts_decorate([ dec ], C); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=es6,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=es6,target=es5).2.minified.js index d77693ddb361..2b67039e2d30 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=es6,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=es6,target=es5).2.minified.js @@ -1,18 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.12.ts] import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = [], C = function C() { + var _usingCtx = _using_ctx(), C = function C() { _class_call_check(this, C); }; C = _ts_decorate([ dec - ], C), _using(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { C as D }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=es6,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=es6,target=esnext).1.normal.js index ab3578769112..a21418310128 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=es6,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=es6,target=esnext).1.normal.js @@ -1,19 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.12.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; export { C as D }; try { - var _stack = []; + var _usingCtx = _using_ctx(); class C { } C = _ts_decorate([ dec ], C); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=es6,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=es6,target=esnext).2.minified.js index 025b7687012a..96a12738b3e3 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=es6,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=es6,target=esnext).2.minified.js @@ -1,17 +1,16 @@ //// [usingDeclarationsWithLegacyClassDecorators.12.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; + var _usingCtx = _using_ctx(); class C { } C = _ts_decorate([ dec - ], C), _using(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { C as D }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=system,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=system,target=es2015).1.normal.js index af4f0cb9a19b..8aae998a8767 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=system,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=system,target=es2015).1.normal.js @@ -1,37 +1,32 @@ //// [usingDeclarationsWithLegacyClassDecorators.12.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; + var _usingCtx = _using_ctx(); class C { } _export("D", C = _ts_decorate([ dec ], C)); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=system,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=system,target=es2015).2.minified.js index dd20b3a8fab6..0d8a2fe98456 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=system,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=system,target=es2015).2.minified.js @@ -1,34 +1,30 @@ //// [usingDeclarationsWithLegacyClassDecorators.12.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; + var _usingCtx = _using_ctx(); class C { } _export("D", C = _ts_decorate([ dec - ], C)), _using(_stack, null); + ], C)), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=system,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=system,target=es5).1.normal.js index 80d71d06fc81..90deef8402c2 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=system,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=system,target=es5).1.normal.js @@ -2,11 +2,10 @@ System.register([ "@swc/helpers/_/_class_call_check", "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _class_call_check, _ts_decorate, _dispose, _using; + var _class_call_check, _ts_decorate, _using_ctx; return { setters: [ function(_class_call_check1) { @@ -15,16 +14,13 @@ System.register([ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; + var _usingCtx = _using_ctx(); var C = function C() { "use strict"; _class_call_check(this, C); @@ -32,12 +28,11 @@ System.register([ _export("D", C = _ts_decorate([ dec ], C)); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=system,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=system,target=es5).2.minified.js index fa928d32b9b6..67e97e0a65fb 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=system,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=system,target=es5).2.minified.js @@ -2,10 +2,9 @@ System.register([ "@swc/helpers/_/_class_call_check", "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _class_call_check, _ts_decorate, _dispose, _using; + var _class_call_check, _ts_decorate, _using_ctx; return { setters: [ function(_class_call_check1) { @@ -14,25 +13,22 @@ System.register([ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = [], C = function C() { + var _usingCtx = _using_ctx(), C = function C() { _class_call_check(this, C); }; _export("D", C = _ts_decorate([ dec - ], C)), _using(_stack, null); + ], C)), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=system,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=system,target=esnext).1.normal.js index af4f0cb9a19b..8aae998a8767 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=system,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=system,target=esnext).1.normal.js @@ -1,37 +1,32 @@ //// [usingDeclarationsWithLegacyClassDecorators.12.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; + var _usingCtx = _using_ctx(); class C { } _export("D", C = _ts_decorate([ dec ], C)); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=system,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=system,target=esnext).2.minified.js index dd20b3a8fab6..0d8a2fe98456 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=system,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.12(module=system,target=esnext).2.minified.js @@ -1,34 +1,30 @@ //// [usingDeclarationsWithLegacyClassDecorators.12.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; + var _usingCtx = _using_ctx(); class C { } _export("D", C = _ts_decorate([ dec - ], C)), _using(_stack, null); + ], C)), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=commonjs,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=commonjs,target=es2015).1.normal.js index bf766002e453..0deba7a50d7f 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=commonjs,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=commonjs,target=es2015).1.normal.js @@ -10,12 +10,11 @@ Object.defineProperty(exports, "C", { } }); const _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -const _dispose = require("@swc/helpers/_/_dispose"); -const _using = require("@swc/helpers/_/_using"); +const _using_ctx = require("@swc/helpers/_/_using_ctx"); var _C; try { - var _stack = []; - var before = _using._(_stack, null); + var _usingCtx = _using_ctx._(); + var before = _usingCtx.u(null); class C { } _C = C; @@ -23,8 +22,7 @@ try { dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=commonjs,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=commonjs,target=es2015).2.minified.js index 3d5bf0f8fc73..f3849d640a99 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=commonjs,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=commonjs,target=es2015).2.minified.js @@ -7,17 +7,17 @@ Object.defineProperty(exports, "__esModule", { return _C; } }); -const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _C, _stack = []; - _using._(_stack, null); + var _C, _usingCtx = _using_ctx._(); + _usingCtx.u(null); class C { } _C = C, C = _ts_decorate._([ dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=commonjs,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=commonjs,target=es5).1.normal.js index 6dbef6773916..fb8f76404e59 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=commonjs,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=commonjs,target=es5).1.normal.js @@ -11,12 +11,11 @@ Object.defineProperty(exports, "C", { }); var _class_call_check = require("@swc/helpers/_/_class_call_check"); var _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -var _dispose = require("@swc/helpers/_/_dispose"); -var _using = require("@swc/helpers/_/_using"); +var _using_ctx = require("@swc/helpers/_/_using_ctx"); var _C; try { - var _stack = []; - var before = _using._(_stack, null); + var _usingCtx = _using_ctx._(); + var before = _usingCtx.u(null); var C = function C() { "use strict"; _class_call_check._(this, C); @@ -26,8 +25,7 @@ try { dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=commonjs,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=commonjs,target=es5).2.minified.js index 70226f357f9d..8c0db9b467c1 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=commonjs,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=commonjs,target=es5).2.minified.js @@ -7,10 +7,10 @@ Object.defineProperty(exports, "__esModule", { return _C; } }); -var _C, _class_call_check = require("@swc/helpers/_/_class_call_check"), _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +var _C, _class_call_check = require("@swc/helpers/_/_class_call_check"), _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - _using._(_stack, null); + var _usingCtx = _using_ctx._(); + _usingCtx.u(null); var C = function C() { _class_call_check._(this, C); }; @@ -18,7 +18,7 @@ try { dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=commonjs,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=commonjs,target=esnext).1.normal.js index bf766002e453..0deba7a50d7f 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=commonjs,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=commonjs,target=esnext).1.normal.js @@ -10,12 +10,11 @@ Object.defineProperty(exports, "C", { } }); const _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -const _dispose = require("@swc/helpers/_/_dispose"); -const _using = require("@swc/helpers/_/_using"); +const _using_ctx = require("@swc/helpers/_/_using_ctx"); var _C; try { - var _stack = []; - var before = _using._(_stack, null); + var _usingCtx = _using_ctx._(); + var before = _usingCtx.u(null); class C { } _C = C; @@ -23,8 +22,7 @@ try { dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=commonjs,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=commonjs,target=esnext).2.minified.js index 3d5bf0f8fc73..f3849d640a99 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=commonjs,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=commonjs,target=esnext).2.minified.js @@ -7,17 +7,17 @@ Object.defineProperty(exports, "__esModule", { return _C; } }); -const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _C, _stack = []; - _using._(_stack, null); + var _C, _usingCtx = _using_ctx._(); + _usingCtx.u(null); class C { } _C = C, C = _ts_decorate._([ dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=es6,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=es6,target=es2015).1.normal.js index d21a0d275137..27865d30b109 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=es6,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=es6,target=es2015).1.normal.js @@ -1,11 +1,10 @@ //// [usingDeclarationsWithLegacyClassDecorators.2.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; var _C; try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); class C { } _C = C; @@ -13,9 +12,8 @@ try { dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { _C as C }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=es6,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=es6,target=es2015).2.minified.js index 526153f667c2..7e5c750c71b3 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=es6,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=es6,target=es2015).2.minified.js @@ -1,18 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.2.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _C, _stack = []; - _using(_stack, null); + var _C, _usingCtx = _using_ctx(); + _usingCtx.u(null); class C { } _C = C, C = _ts_decorate([ dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { _C as C }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=es6,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=es6,target=es5).1.normal.js index 3caca2d874f5..0e8568e1559c 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=es6,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=es6,target=es5).1.normal.js @@ -1,12 +1,11 @@ //// [usingDeclarationsWithLegacyClassDecorators.2.ts] import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; var _C; try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); var C = function C() { "use strict"; _class_call_check(this, C); @@ -16,9 +15,8 @@ try { dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { _C as C }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=es6,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=es6,target=es5).2.minified.js index 05b69667369a..28c8b045f567 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=es6,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=es6,target=es5).2.minified.js @@ -1,11 +1,10 @@ //// [usingDeclarationsWithLegacyClassDecorators.2.ts] import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _C, _stack = []; - _using(_stack, null); + var _C, _usingCtx = _using_ctx(); + _usingCtx.u(null); var C = function C() { _class_call_check(this, C); }; @@ -13,8 +12,8 @@ try { dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { _C as C }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=es6,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=es6,target=esnext).1.normal.js index d21a0d275137..27865d30b109 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=es6,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=es6,target=esnext).1.normal.js @@ -1,11 +1,10 @@ //// [usingDeclarationsWithLegacyClassDecorators.2.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; var _C; try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); class C { } _C = C; @@ -13,9 +12,8 @@ try { dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { _C as C }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=es6,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=es6,target=esnext).2.minified.js index 526153f667c2..7e5c750c71b3 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=es6,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=es6,target=esnext).2.minified.js @@ -1,18 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.2.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _C, _stack = []; - _using(_stack, null); + var _C, _usingCtx = _using_ctx(); + _usingCtx.u(null); class C { } _C = C, C = _ts_decorate([ dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { _C as C }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=system,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=system,target=es2015).1.normal.js index cbbd98cadaa1..98691c8149e1 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=system,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=system,target=es2015).1.normal.js @@ -1,28 +1,24 @@ //// [usingDeclarationsWithLegacyClassDecorators.2.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _ts_decorate, _dispose, _using, _C; + var _ts_decorate, _using_ctx, _C; _export("C", void 0); return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); class C { } _export("C", _C = C); @@ -30,10 +26,9 @@ System.register([ dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=system,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=system,target=es2015).2.minified.js index b7e46c04b56d..f7a8aae41569 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=system,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=system,target=es2015).2.minified.js @@ -1,35 +1,31 @@ //// [usingDeclarationsWithLegacyClassDecorators.2.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return _export("C", void 0), { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); class C { } _export("C", C), C = _ts_decorate([ dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=system,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=system,target=es5).1.normal.js index fad5d2641ce2..d98e2b865441 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=system,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=system,target=es5).1.normal.js @@ -2,11 +2,10 @@ System.register([ "@swc/helpers/_/_class_call_check", "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _class_call_check, _ts_decorate, _dispose, _using, _C; + var _class_call_check, _ts_decorate, _using_ctx, _C; _export("C", void 0); return { setters: [ @@ -16,17 +15,14 @@ System.register([ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); var C = function C() { "use strict"; _class_call_check(this, C); @@ -36,10 +32,9 @@ System.register([ dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=system,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=system,target=es5).2.minified.js index c1deb230f753..6b81ece727b5 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=system,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=system,target=es5).2.minified.js @@ -2,10 +2,9 @@ System.register([ "@swc/helpers/_/_class_call_check", "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _class_call_check, _ts_decorate, _dispose, _using; + var _class_call_check, _ts_decorate, _using_ctx; return _export("C", void 0), { setters: [ function(_class_call_check1) { @@ -14,17 +13,14 @@ System.register([ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); var C = function C() { _class_call_check(this, C); }; @@ -32,9 +28,9 @@ System.register([ dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=system,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=system,target=esnext).1.normal.js index cbbd98cadaa1..98691c8149e1 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=system,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=system,target=esnext).1.normal.js @@ -1,28 +1,24 @@ //// [usingDeclarationsWithLegacyClassDecorators.2.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _ts_decorate, _dispose, _using, _C; + var _ts_decorate, _using_ctx, _C; _export("C", void 0); return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); class C { } _export("C", _C = C); @@ -30,10 +26,9 @@ System.register([ dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=system,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=system,target=esnext).2.minified.js index b7e46c04b56d..f7a8aae41569 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=system,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.2(module=system,target=esnext).2.minified.js @@ -1,35 +1,31 @@ //// [usingDeclarationsWithLegacyClassDecorators.2.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return _export("C", void 0), { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); class C { } _export("C", C), C = _ts_decorate([ dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=commonjs,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=commonjs,target=es2015).1.normal.js index 9735c1f95d4f..cdfae9e0bf96 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=commonjs,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=commonjs,target=es2015).1.normal.js @@ -10,19 +10,17 @@ Object.defineProperty(exports, "default", { } }); const _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -const _dispose = require("@swc/helpers/_/_dispose"); -const _using = require("@swc/helpers/_/_using"); +const _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - var before = _using._(_stack, null); + var _usingCtx = _using_ctx._(); + var before = _usingCtx.u(null); var C = class C { }; C = _ts_decorate._([ dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=commonjs,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=commonjs,target=es2015).2.minified.js index c31f8af43fb9..8a31f307ff05 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=commonjs,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=commonjs,target=es2015).2.minified.js @@ -7,17 +7,17 @@ Object.defineProperty(exports, "__esModule", { return C; } }); -const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - _using._(_stack, null); + var _usingCtx = _using_ctx._(); + _usingCtx.u(null); var C = class { }; C = _ts_decorate._([ dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=commonjs,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=commonjs,target=es5).1.normal.js index 7a2aeed22cb0..8f52201b81c1 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=commonjs,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=commonjs,target=es5).1.normal.js @@ -11,11 +11,10 @@ Object.defineProperty(exports, "default", { }); var _class_call_check = require("@swc/helpers/_/_class_call_check"); var _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -var _dispose = require("@swc/helpers/_/_dispose"); -var _using = require("@swc/helpers/_/_using"); +var _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - var before = _using._(_stack, null); + var _usingCtx = _using_ctx._(); + var before = _usingCtx.u(null); var C = function C() { "use strict"; _class_call_check._(this, C); @@ -24,8 +23,7 @@ try { dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=commonjs,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=commonjs,target=es5).2.minified.js index ec15ff12606b..fc6a89834b02 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=commonjs,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=commonjs,target=es5).2.minified.js @@ -7,10 +7,10 @@ Object.defineProperty(exports, "__esModule", { return C; } }); -var _class_call_check = require("@swc/helpers/_/_class_call_check"), _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +var _class_call_check = require("@swc/helpers/_/_class_call_check"), _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - _using._(_stack, null); + var _usingCtx = _using_ctx._(); + _usingCtx.u(null); var C = function C() { _class_call_check._(this, C); }; @@ -18,7 +18,7 @@ try { dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=commonjs,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=commonjs,target=esnext).1.normal.js index 9735c1f95d4f..cdfae9e0bf96 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=commonjs,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=commonjs,target=esnext).1.normal.js @@ -10,19 +10,17 @@ Object.defineProperty(exports, "default", { } }); const _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -const _dispose = require("@swc/helpers/_/_dispose"); -const _using = require("@swc/helpers/_/_using"); +const _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - var before = _using._(_stack, null); + var _usingCtx = _using_ctx._(); + var before = _usingCtx.u(null); var C = class C { }; C = _ts_decorate._([ dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=commonjs,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=commonjs,target=esnext).2.minified.js index c31f8af43fb9..8a31f307ff05 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=commonjs,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=commonjs,target=esnext).2.minified.js @@ -7,17 +7,17 @@ Object.defineProperty(exports, "__esModule", { return C; } }); -const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - _using._(_stack, null); + var _usingCtx = _using_ctx._(); + _usingCtx.u(null); var C = class { }; C = _ts_decorate._([ dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=es6,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=es6,target=es2015).1.normal.js index 8bdcb3119add..06cb6c24d36c 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=es6,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=es6,target=es2015).1.normal.js @@ -1,19 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.3.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; export { C as default }; try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); var C = class C { }; C = _ts_decorate([ dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=es6,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=es6,target=es2015).2.minified.js index ded12a82e6b9..904b8a4b8e8d 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=es6,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=es6,target=es2015).2.minified.js @@ -1,18 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.3.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); var C = class { }; C = _ts_decorate([ dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { C as default }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=es6,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=es6,target=es5).1.normal.js index 8748ef616d6e..cd4aa2b73926 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=es6,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=es6,target=es5).1.normal.js @@ -1,12 +1,11 @@ //// [usingDeclarationsWithLegacyClassDecorators.3.ts] import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; export { C as default }; try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); var C = function C() { "use strict"; _class_call_check(this, C); @@ -15,8 +14,7 @@ try { dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=es6,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=es6,target=es5).2.minified.js index 3e4ec8bc9d3b..fff9ac887e78 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=es6,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=es6,target=es5).2.minified.js @@ -1,11 +1,10 @@ //// [usingDeclarationsWithLegacyClassDecorators.3.ts] import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); var C = function C() { _class_call_check(this, C); }; @@ -13,8 +12,8 @@ try { dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { C as default }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=es6,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=es6,target=esnext).1.normal.js index 8bdcb3119add..06cb6c24d36c 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=es6,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=es6,target=esnext).1.normal.js @@ -1,19 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.3.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; export { C as default }; try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); var C = class C { }; C = _ts_decorate([ dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=es6,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=es6,target=esnext).2.minified.js index ded12a82e6b9..904b8a4b8e8d 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=es6,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=es6,target=esnext).2.minified.js @@ -1,18 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.3.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); var C = class { }; C = _ts_decorate([ dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { C as default }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=system,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=system,target=es2015).1.normal.js index b5cc17c4b511..728117336184 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=system,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=system,target=es2015).1.normal.js @@ -1,37 +1,32 @@ //// [usingDeclarationsWithLegacyClassDecorators.3.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); var C = class C { }; _export("default", C = _ts_decorate([ dec ], C)); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=system,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=system,target=es2015).2.minified.js index 5f2d6e813f72..068fe6225f59 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=system,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=system,target=es2015).2.minified.js @@ -1,35 +1,31 @@ //// [usingDeclarationsWithLegacyClassDecorators.3.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); var C = class { }; _export("default", C = _ts_decorate([ dec ], C)); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=system,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=system,target=es5).1.normal.js index bf550321395e..cbeb2031f31f 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=system,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=system,target=es5).1.normal.js @@ -2,11 +2,10 @@ System.register([ "@swc/helpers/_/_class_call_check", "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _class_call_check, _ts_decorate, _dispose, _using; + var _class_call_check, _ts_decorate, _using_ctx; return { setters: [ function(_class_call_check1) { @@ -15,17 +14,14 @@ System.register([ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); var C = function C() { "use strict"; _class_call_check(this, C); @@ -34,10 +30,9 @@ System.register([ dec ], C)); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=system,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=system,target=es5).2.minified.js index e8c0a25331be..55f32c104ee5 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=system,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=system,target=es5).2.minified.js @@ -2,10 +2,9 @@ System.register([ "@swc/helpers/_/_class_call_check", "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _class_call_check, _ts_decorate, _dispose, _using; + var _class_call_check, _ts_decorate, _using_ctx; return { setters: [ function(_class_call_check1) { @@ -14,17 +13,14 @@ System.register([ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); var C = function C() { _class_call_check(this, C); }; @@ -32,9 +28,9 @@ System.register([ dec ], C)); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=system,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=system,target=esnext).1.normal.js index b5cc17c4b511..728117336184 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=system,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=system,target=esnext).1.normal.js @@ -1,37 +1,32 @@ //// [usingDeclarationsWithLegacyClassDecorators.3.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); var C = class C { }; _export("default", C = _ts_decorate([ dec ], C)); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=system,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=system,target=esnext).2.minified.js index 5f2d6e813f72..068fe6225f59 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=system,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.3(module=system,target=esnext).2.minified.js @@ -1,35 +1,31 @@ //// [usingDeclarationsWithLegacyClassDecorators.3.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); var C = class { }; _export("default", C = _ts_decorate([ dec ], C)); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=commonjs,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=commonjs,target=es2015).1.normal.js index 95fad7db1859..40ccb45028ff 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=commonjs,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=commonjs,target=es2015).1.normal.js @@ -10,19 +10,17 @@ Object.defineProperty(exports, "default", { } }); const _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -const _dispose = require("@swc/helpers/_/_dispose"); -const _using = require("@swc/helpers/_/_using"); +const _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - var before = _using._(_stack, null); + var _usingCtx = _using_ctx._(); + var before = _usingCtx.u(null); var _class = class _class { }; _class = _ts_decorate._([ dec ], _class); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=commonjs,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=commonjs,target=es2015).2.minified.js index f210eadd3063..651b4dbc09d5 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=commonjs,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=commonjs,target=es2015).2.minified.js @@ -7,17 +7,17 @@ Object.defineProperty(exports, "__esModule", { return _class; } }); -const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - _using._(_stack, null); + var _usingCtx = _using_ctx._(); + _usingCtx.u(null); var _class = class { }; _class = _ts_decorate._([ dec ], _class); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=commonjs,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=commonjs,target=es5).1.normal.js index cb072e4e481f..b08de63aba0d 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=commonjs,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=commonjs,target=es5).1.normal.js @@ -11,11 +11,10 @@ Object.defineProperty(exports, "default", { }); var _class_call_check = require("@swc/helpers/_/_class_call_check"); var _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -var _dispose = require("@swc/helpers/_/_dispose"); -var _using = require("@swc/helpers/_/_using"); +var _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - var before = _using._(_stack, null); + var _usingCtx = _using_ctx._(); + var before = _usingCtx.u(null); var _class = function _class() { "use strict"; _class_call_check._(this, _class); @@ -24,8 +23,7 @@ try { dec ], _class); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=commonjs,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=commonjs,target=es5).2.minified.js index 37757050a372..a3c0f621c3d5 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=commonjs,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=commonjs,target=es5).2.minified.js @@ -7,10 +7,10 @@ Object.defineProperty(exports, "__esModule", { return _class; } }); -var _class_call_check = require("@swc/helpers/_/_class_call_check"), _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +var _class_call_check = require("@swc/helpers/_/_class_call_check"), _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - _using._(_stack, null); + var _usingCtx = _using_ctx._(); + _usingCtx.u(null); var _class = function _class() { _class_call_check._(this, _class); }; @@ -18,7 +18,7 @@ try { dec ], _class); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=commonjs,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=commonjs,target=esnext).1.normal.js index 95fad7db1859..40ccb45028ff 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=commonjs,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=commonjs,target=esnext).1.normal.js @@ -10,19 +10,17 @@ Object.defineProperty(exports, "default", { } }); const _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -const _dispose = require("@swc/helpers/_/_dispose"); -const _using = require("@swc/helpers/_/_using"); +const _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - var before = _using._(_stack, null); + var _usingCtx = _using_ctx._(); + var before = _usingCtx.u(null); var _class = class _class { }; _class = _ts_decorate._([ dec ], _class); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=commonjs,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=commonjs,target=esnext).2.minified.js index f210eadd3063..651b4dbc09d5 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=commonjs,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=commonjs,target=esnext).2.minified.js @@ -7,17 +7,17 @@ Object.defineProperty(exports, "__esModule", { return _class; } }); -const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - _using._(_stack, null); + var _usingCtx = _using_ctx._(); + _usingCtx.u(null); var _class = class { }; _class = _ts_decorate._([ dec ], _class); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=es6,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=es6,target=es2015).1.normal.js index 54bbc3405516..494956940d4a 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=es6,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=es6,target=es2015).1.normal.js @@ -1,19 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.4.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; export { _class as default }; try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); var _class = class _class { }; _class = _ts_decorate([ dec ], _class); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=es6,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=es6,target=es2015).2.minified.js index 0c6931f10edc..16fd923fd420 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=es6,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=es6,target=es2015).2.minified.js @@ -1,18 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.4.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); var _class = class { }; _class = _ts_decorate([ dec ], _class); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { _class as default }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=es6,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=es6,target=es5).1.normal.js index e2bfc69507c2..61c57de6872a 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=es6,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=es6,target=es5).1.normal.js @@ -1,12 +1,11 @@ //// [usingDeclarationsWithLegacyClassDecorators.4.ts] import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; export { _class as default }; try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); var _class = function _class() { "use strict"; _class_call_check(this, _class); @@ -15,8 +14,7 @@ try { dec ], _class); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=es6,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=es6,target=es5).2.minified.js index 5423bad1e46f..e45139543abc 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=es6,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=es6,target=es5).2.minified.js @@ -1,11 +1,10 @@ //// [usingDeclarationsWithLegacyClassDecorators.4.ts] import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); var _class = function _class() { _class_call_check(this, _class); }; @@ -13,8 +12,8 @@ try { dec ], _class); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { _class as default }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=es6,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=es6,target=esnext).1.normal.js index 54bbc3405516..494956940d4a 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=es6,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=es6,target=esnext).1.normal.js @@ -1,19 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.4.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; export { _class as default }; try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); var _class = class _class { }; _class = _ts_decorate([ dec ], _class); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=es6,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=es6,target=esnext).2.minified.js index 0c6931f10edc..16fd923fd420 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=es6,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=es6,target=esnext).2.minified.js @@ -1,18 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.4.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); var _class = class { }; _class = _ts_decorate([ dec ], _class); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { _class as default }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=system,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=system,target=es2015).1.normal.js index efb6402b75bc..d19071f6100c 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=system,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=system,target=es2015).1.normal.js @@ -1,37 +1,32 @@ //// [usingDeclarationsWithLegacyClassDecorators.4.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); var _class = class _class { }; _export("default", _class = _ts_decorate([ dec ], _class)); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=system,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=system,target=es2015).2.minified.js index c7a07b62be46..f2954e1f4b1b 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=system,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=system,target=es2015).2.minified.js @@ -1,35 +1,31 @@ //// [usingDeclarationsWithLegacyClassDecorators.4.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); var _class = class { }; _export("default", _class = _ts_decorate([ dec ], _class)); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=system,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=system,target=es5).1.normal.js index 5b8332865f86..beb4a5ec9b05 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=system,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=system,target=es5).1.normal.js @@ -2,11 +2,10 @@ System.register([ "@swc/helpers/_/_class_call_check", "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _class_call_check, _ts_decorate, _dispose, _using; + var _class_call_check, _ts_decorate, _using_ctx; return { setters: [ function(_class_call_check1) { @@ -15,17 +14,14 @@ System.register([ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); var _class = function _class() { "use strict"; _class_call_check(this, _class); @@ -34,10 +30,9 @@ System.register([ dec ], _class)); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=system,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=system,target=es5).2.minified.js index ea32bb438cd9..4ea3d1a4993d 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=system,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=system,target=es5).2.minified.js @@ -2,10 +2,9 @@ System.register([ "@swc/helpers/_/_class_call_check", "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _class_call_check, _ts_decorate, _dispose, _using; + var _class_call_check, _ts_decorate, _using_ctx; return { setters: [ function(_class_call_check1) { @@ -14,17 +13,14 @@ System.register([ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); var _class = function _class() { _class_call_check(this, _class); }; @@ -32,9 +28,9 @@ System.register([ dec ], _class)); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=system,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=system,target=esnext).1.normal.js index efb6402b75bc..d19071f6100c 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=system,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=system,target=esnext).1.normal.js @@ -1,37 +1,32 @@ //// [usingDeclarationsWithLegacyClassDecorators.4.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); var _class = class _class { }; _export("default", _class = _ts_decorate([ dec ], _class)); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=system,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=system,target=esnext).2.minified.js index c7a07b62be46..f2954e1f4b1b 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=system,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.4(module=system,target=esnext).2.minified.js @@ -1,35 +1,31 @@ //// [usingDeclarationsWithLegacyClassDecorators.4.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); var _class = class { }; _export("default", _class = _ts_decorate([ dec ], _class)); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=commonjs,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=commonjs,target=es2015).1.normal.js index 009466ea54f9..3ec36fd8d880 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=commonjs,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=commonjs,target=es2015).1.normal.js @@ -10,19 +10,17 @@ Object.defineProperty(exports, "C", { } }); const _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -const _dispose = require("@swc/helpers/_/_dispose"); -const _using = require("@swc/helpers/_/_using"); +const _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - var before = _using._(_stack, null); + var _usingCtx = _using_ctx._(); + var before = _usingCtx.u(null); class C { } C = _ts_decorate._([ dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=commonjs,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=commonjs,target=es2015).2.minified.js index 152d3812ef55..b6b98e01017c 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=commonjs,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=commonjs,target=es2015).2.minified.js @@ -7,17 +7,17 @@ Object.defineProperty(exports, "__esModule", { return C; } }); -const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - _using._(_stack, null); + var _usingCtx = _using_ctx._(); + _usingCtx.u(null); class C1 { } C1 = _ts_decorate._([ dec ], C1); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=commonjs,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=commonjs,target=es5).1.normal.js index 04de7e2d9a97..f23d67fc97d3 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=commonjs,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=commonjs,target=es5).1.normal.js @@ -11,11 +11,10 @@ Object.defineProperty(exports, "C", { }); var _class_call_check = require("@swc/helpers/_/_class_call_check"); var _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -var _dispose = require("@swc/helpers/_/_dispose"); -var _using = require("@swc/helpers/_/_using"); +var _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - var before = _using._(_stack, null); + var _usingCtx = _using_ctx._(); + var before = _usingCtx.u(null); var C = function C() { "use strict"; _class_call_check._(this, C); @@ -24,8 +23,7 @@ try { dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=commonjs,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=commonjs,target=es5).2.minified.js index c75d815c186d..0ece95382e4c 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=commonjs,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=commonjs,target=es5).2.minified.js @@ -7,10 +7,10 @@ Object.defineProperty(exports, "__esModule", { return C; } }); -var _class_call_check = require("@swc/helpers/_/_class_call_check"), _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +var _class_call_check = require("@swc/helpers/_/_class_call_check"), _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - _using._(_stack, null); + var _usingCtx = _using_ctx._(); + _usingCtx.u(null); var C = function C() { _class_call_check._(this, C); }; @@ -18,7 +18,7 @@ try { dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=commonjs,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=commonjs,target=esnext).1.normal.js index 009466ea54f9..3ec36fd8d880 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=commonjs,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=commonjs,target=esnext).1.normal.js @@ -10,19 +10,17 @@ Object.defineProperty(exports, "C", { } }); const _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -const _dispose = require("@swc/helpers/_/_dispose"); -const _using = require("@swc/helpers/_/_using"); +const _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - var before = _using._(_stack, null); + var _usingCtx = _using_ctx._(); + var before = _usingCtx.u(null); class C { } C = _ts_decorate._([ dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=commonjs,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=commonjs,target=esnext).2.minified.js index 152d3812ef55..b6b98e01017c 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=commonjs,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=commonjs,target=esnext).2.minified.js @@ -7,17 +7,17 @@ Object.defineProperty(exports, "__esModule", { return C; } }); -const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - _using._(_stack, null); + var _usingCtx = _using_ctx._(); + _usingCtx.u(null); class C1 { } C1 = _ts_decorate._([ dec ], C1); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=es6,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=es6,target=es2015).1.normal.js index f6c6f5053a9d..5ca6582ea6a7 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=es6,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=es6,target=es2015).1.normal.js @@ -1,19 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.5.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; export { C }; try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); class C { } C = _ts_decorate([ dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=es6,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=es6,target=es2015).2.minified.js index 96d6a1140a68..07486ef3ac46 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=es6,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=es6,target=es2015).2.minified.js @@ -1,18 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.5.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); class C { } C = _ts_decorate([ dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { C }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=es6,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=es6,target=es5).1.normal.js index f8d968f5a762..253e725123fa 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=es6,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=es6,target=es5).1.normal.js @@ -1,12 +1,11 @@ //// [usingDeclarationsWithLegacyClassDecorators.5.ts] import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; export { C }; try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); var C = function C() { "use strict"; _class_call_check(this, C); @@ -15,8 +14,7 @@ try { dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=es6,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=es6,target=es5).2.minified.js index be5d3e5efab8..b36fc3fe2288 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=es6,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=es6,target=es5).2.minified.js @@ -1,11 +1,10 @@ //// [usingDeclarationsWithLegacyClassDecorators.5.ts] import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); var C = function C() { _class_call_check(this, C); }; @@ -13,8 +12,8 @@ try { dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { C }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=es6,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=es6,target=esnext).1.normal.js index f6c6f5053a9d..5ca6582ea6a7 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=es6,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=es6,target=esnext).1.normal.js @@ -1,19 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.5.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; export { C }; try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); class C { } C = _ts_decorate([ dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=es6,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=es6,target=esnext).2.minified.js index 96d6a1140a68..07486ef3ac46 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=es6,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=es6,target=esnext).2.minified.js @@ -1,18 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.5.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); class C { } C = _ts_decorate([ dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { C }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=system,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=system,target=es2015).1.normal.js index b0eab7c811bd..3c77cb98fa4e 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=system,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=system,target=es2015).1.normal.js @@ -1,37 +1,32 @@ //// [usingDeclarationsWithLegacyClassDecorators.5.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); class C { } _export("C", C = _ts_decorate([ dec ], C)); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=system,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=system,target=es2015).2.minified.js index 018faf498774..93eeefd42634 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=system,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=system,target=es2015).2.minified.js @@ -1,35 +1,31 @@ //// [usingDeclarationsWithLegacyClassDecorators.5.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); class C { } _export("C", C = _ts_decorate([ dec ], C)); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=system,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=system,target=es5).1.normal.js index ecaa7ae8692b..878d18d69ebb 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=system,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=system,target=es5).1.normal.js @@ -2,11 +2,10 @@ System.register([ "@swc/helpers/_/_class_call_check", "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _class_call_check, _ts_decorate, _dispose, _using; + var _class_call_check, _ts_decorate, _using_ctx; return { setters: [ function(_class_call_check1) { @@ -15,17 +14,14 @@ System.register([ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); var C = function C() { "use strict"; _class_call_check(this, C); @@ -34,10 +30,9 @@ System.register([ dec ], C)); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=system,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=system,target=es5).2.minified.js index baf6c809b9ef..3e6cdfcd4378 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=system,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=system,target=es5).2.minified.js @@ -2,10 +2,9 @@ System.register([ "@swc/helpers/_/_class_call_check", "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _class_call_check, _ts_decorate, _dispose, _using; + var _class_call_check, _ts_decorate, _using_ctx; return { setters: [ function(_class_call_check1) { @@ -14,17 +13,14 @@ System.register([ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); var C = function C() { _class_call_check(this, C); }; @@ -32,9 +28,9 @@ System.register([ dec ], C)); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=system,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=system,target=esnext).1.normal.js index b0eab7c811bd..3c77cb98fa4e 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=system,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=system,target=esnext).1.normal.js @@ -1,37 +1,32 @@ //// [usingDeclarationsWithLegacyClassDecorators.5.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); class C { } _export("C", C = _ts_decorate([ dec ], C)); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=system,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=system,target=esnext).2.minified.js index 018faf498774..93eeefd42634 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=system,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.5(module=system,target=esnext).2.minified.js @@ -1,35 +1,31 @@ //// [usingDeclarationsWithLegacyClassDecorators.5.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); class C { } _export("C", C = _ts_decorate([ dec ], C)); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=commonjs,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=commonjs,target=es2015).1.normal.js index c7cb727c0511..68c7b549b012 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=commonjs,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=commonjs,target=es2015).1.normal.js @@ -10,19 +10,17 @@ Object.defineProperty(exports, "D", { } }); const _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -const _dispose = require("@swc/helpers/_/_dispose"); -const _using = require("@swc/helpers/_/_using"); +const _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - var before = _using._(_stack, null); + var _usingCtx = _using_ctx._(); + var before = _usingCtx.u(null); class C { } C = _ts_decorate._([ dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=commonjs,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=commonjs,target=es2015).2.minified.js index a1ea7d66bbb5..336700d32d3e 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=commonjs,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=commonjs,target=es2015).2.minified.js @@ -7,17 +7,17 @@ Object.defineProperty(exports, "__esModule", { return C; } }); -const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - _using._(_stack, null); + var _usingCtx = _using_ctx._(); + _usingCtx.u(null); class C1 { } C1 = _ts_decorate._([ dec ], C1); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=commonjs,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=commonjs,target=es5).1.normal.js index b68217d21735..94273ef9a875 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=commonjs,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=commonjs,target=es5).1.normal.js @@ -11,11 +11,10 @@ Object.defineProperty(exports, "D", { }); var _class_call_check = require("@swc/helpers/_/_class_call_check"); var _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -var _dispose = require("@swc/helpers/_/_dispose"); -var _using = require("@swc/helpers/_/_using"); +var _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - var before = _using._(_stack, null); + var _usingCtx = _using_ctx._(); + var before = _usingCtx.u(null); var C = function C() { "use strict"; _class_call_check._(this, C); @@ -24,8 +23,7 @@ try { dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=commonjs,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=commonjs,target=es5).2.minified.js index 3ce1b3173c26..598796f98807 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=commonjs,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=commonjs,target=es5).2.minified.js @@ -7,10 +7,10 @@ Object.defineProperty(exports, "__esModule", { return C; } }); -var _class_call_check = require("@swc/helpers/_/_class_call_check"), _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +var _class_call_check = require("@swc/helpers/_/_class_call_check"), _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - _using._(_stack, null); + var _usingCtx = _using_ctx._(); + _usingCtx.u(null); var C = function C() { _class_call_check._(this, C); }; @@ -18,7 +18,7 @@ try { dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=commonjs,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=commonjs,target=esnext).1.normal.js index c7cb727c0511..68c7b549b012 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=commonjs,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=commonjs,target=esnext).1.normal.js @@ -10,19 +10,17 @@ Object.defineProperty(exports, "D", { } }); const _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -const _dispose = require("@swc/helpers/_/_dispose"); -const _using = require("@swc/helpers/_/_using"); +const _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - var before = _using._(_stack, null); + var _usingCtx = _using_ctx._(); + var before = _usingCtx.u(null); class C { } C = _ts_decorate._([ dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=commonjs,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=commonjs,target=esnext).2.minified.js index a1ea7d66bbb5..336700d32d3e 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=commonjs,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=commonjs,target=esnext).2.minified.js @@ -7,17 +7,17 @@ Object.defineProperty(exports, "__esModule", { return C; } }); -const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; - _using._(_stack, null); + var _usingCtx = _using_ctx._(); + _usingCtx.u(null); class C1 { } C1 = _ts_decorate._([ dec ], C1); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=es6,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=es6,target=es2015).1.normal.js index c4fc86a5ce20..34a460c4368c 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=es6,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=es6,target=es2015).1.normal.js @@ -1,19 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.6.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; export { C as D }; try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); class C { } C = _ts_decorate([ dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=es6,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=es6,target=es2015).2.minified.js index 8ec90864b21d..0bcad536860c 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=es6,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=es6,target=es2015).2.minified.js @@ -1,18 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.6.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); class C { } C = _ts_decorate([ dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { C as D }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=es6,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=es6,target=es5).1.normal.js index 5558c33efb3f..8f8b72455193 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=es6,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=es6,target=es5).1.normal.js @@ -1,12 +1,11 @@ //// [usingDeclarationsWithLegacyClassDecorators.6.ts] import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; export { C as D }; try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); var C = function C() { "use strict"; _class_call_check(this, C); @@ -15,8 +14,7 @@ try { dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=es6,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=es6,target=es5).2.minified.js index 3a9b8d9ae4b1..f386f567fce9 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=es6,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=es6,target=es5).2.minified.js @@ -1,11 +1,10 @@ //// [usingDeclarationsWithLegacyClassDecorators.6.ts] import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); var C = function C() { _class_call_check(this, C); }; @@ -13,8 +12,8 @@ try { dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { C as D }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=es6,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=es6,target=esnext).1.normal.js index c4fc86a5ce20..34a460c4368c 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=es6,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=es6,target=esnext).1.normal.js @@ -1,19 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.6.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; export { C as D }; try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); class C { } C = _ts_decorate([ dec ], C); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=es6,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=es6,target=esnext).2.minified.js index 8ec90864b21d..0bcad536860c 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=es6,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=es6,target=esnext).2.minified.js @@ -1,18 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.6.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); class C { } C = _ts_decorate([ dec ], C); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { C as D }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=system,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=system,target=es2015).1.normal.js index bb30a21f28ce..ddf501115f38 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=system,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=system,target=es2015).1.normal.js @@ -1,37 +1,32 @@ //// [usingDeclarationsWithLegacyClassDecorators.6.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); class C { } _export("D", C = _ts_decorate([ dec ], C)); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=system,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=system,target=es2015).2.minified.js index 4996610bbc1f..8ed7bef15037 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=system,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=system,target=es2015).2.minified.js @@ -1,35 +1,31 @@ //// [usingDeclarationsWithLegacyClassDecorators.6.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); class C { } _export("D", C = _ts_decorate([ dec ], C)); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=system,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=system,target=es5).1.normal.js index 5a23e2142659..f21e5cbe8d3c 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=system,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=system,target=es5).1.normal.js @@ -2,11 +2,10 @@ System.register([ "@swc/helpers/_/_class_call_check", "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _class_call_check, _ts_decorate, _dispose, _using; + var _class_call_check, _ts_decorate, _using_ctx; return { setters: [ function(_class_call_check1) { @@ -15,17 +14,14 @@ System.register([ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); var C = function C() { "use strict"; _class_call_check(this, C); @@ -34,10 +30,9 @@ System.register([ dec ], C)); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=system,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=system,target=es5).2.minified.js index f2006a103704..7ab0eb31a202 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=system,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=system,target=es5).2.minified.js @@ -2,10 +2,9 @@ System.register([ "@swc/helpers/_/_class_call_check", "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _class_call_check, _ts_decorate, _dispose, _using; + var _class_call_check, _ts_decorate, _using_ctx; return { setters: [ function(_class_call_check1) { @@ -14,17 +13,14 @@ System.register([ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); var C = function C() { _class_call_check(this, C); }; @@ -32,9 +28,9 @@ System.register([ dec ], C)); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=system,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=system,target=esnext).1.normal.js index bb30a21f28ce..ddf501115f38 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=system,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=system,target=esnext).1.normal.js @@ -1,37 +1,32 @@ //// [usingDeclarationsWithLegacyClassDecorators.6.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - var before = _using(_stack, null); + var _usingCtx = _using_ctx(); + var before = _usingCtx.u(null); class C { } _export("D", C = _ts_decorate([ dec ], C)); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=system,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=system,target=esnext).2.minified.js index 4996610bbc1f..8ed7bef15037 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=system,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.6(module=system,target=esnext).2.minified.js @@ -1,35 +1,31 @@ //// [usingDeclarationsWithLegacyClassDecorators.6.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; - _using(_stack, null); + var _usingCtx = _using_ctx(); + _usingCtx.u(null); class C { } _export("D", C = _ts_decorate([ dec ], C)); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=commonjs,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=commonjs,target=es2015).1.normal.js index 9021d5532f74..9c2698aaab74 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=commonjs,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=commonjs,target=es2015).1.normal.js @@ -4,19 +4,17 @@ Object.defineProperty(exports, "__esModule", { value: true }); const _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -const _dispose = require("@swc/helpers/_/_dispose"); -const _using = require("@swc/helpers/_/_using"); +const _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; + var _usingCtx = _using_ctx._(); class C { } C = _ts_decorate._([ dec ], C); - var after = _using._(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=commonjs,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=commonjs,target=es2015).2.minified.js index bf84a5632b5a..dd66a6ff87ea 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=commonjs,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=commonjs,target=es2015).2.minified.js @@ -2,16 +2,16 @@ Object.defineProperty(exports, "__esModule", { value: !0 }); -const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; + var _usingCtx = _using_ctx._(); class C { } C = _ts_decorate._([ dec - ], C), _using._(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=commonjs,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=commonjs,target=es5).1.normal.js index 2fc760b0ba15..ea9b2d8c46e7 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=commonjs,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=commonjs,target=es5).1.normal.js @@ -5,10 +5,9 @@ Object.defineProperty(exports, "__esModule", { }); var _class_call_check = require("@swc/helpers/_/_class_call_check"); var _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -var _dispose = require("@swc/helpers/_/_dispose"); -var _using = require("@swc/helpers/_/_using"); +var _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; + var _usingCtx = _using_ctx._(); var C = function C() { "use strict"; _class_call_check._(this, C); @@ -16,10 +15,9 @@ try { C = _ts_decorate._([ dec ], C); - var after = _using._(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=commonjs,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=commonjs,target=es5).2.minified.js index 8a03c8bb2be6..98f1b834405e 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=commonjs,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=commonjs,target=es5).2.minified.js @@ -2,16 +2,16 @@ Object.defineProperty(exports, "__esModule", { value: !0 }); -var _class_call_check = require("@swc/helpers/_/_class_call_check"), _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +var _class_call_check = require("@swc/helpers/_/_class_call_check"), _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = [], C = function C() { + var _usingCtx = _using_ctx._(), C = function C() { _class_call_check._(this, C); }; C = _ts_decorate._([ dec - ], C), _using._(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=commonjs,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=commonjs,target=esnext).1.normal.js index 9021d5532f74..9c2698aaab74 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=commonjs,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=commonjs,target=esnext).1.normal.js @@ -4,19 +4,17 @@ Object.defineProperty(exports, "__esModule", { value: true }); const _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -const _dispose = require("@swc/helpers/_/_dispose"); -const _using = require("@swc/helpers/_/_using"); +const _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; + var _usingCtx = _using_ctx._(); class C { } C = _ts_decorate._([ dec ], C); - var after = _using._(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=commonjs,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=commonjs,target=esnext).2.minified.js index bf84a5632b5a..dd66a6ff87ea 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=commonjs,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=commonjs,target=esnext).2.minified.js @@ -2,16 +2,16 @@ Object.defineProperty(exports, "__esModule", { value: !0 }); -const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; + var _usingCtx = _using_ctx._(); class C { } C = _ts_decorate._([ dec - ], C), _using._(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=es6,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=es6,target=es2015).1.normal.js index 72a97e8c0f22..853a3b6b62e6 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=es6,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=es6,target=es2015).1.normal.js @@ -1,19 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.7.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; + var _usingCtx = _using_ctx(); class C { } C = _ts_decorate([ dec ], C); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=es6,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=es6,target=es2015).2.minified.js index 5d4519141cf5..86d340d23276 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=es6,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=es6,target=es2015).2.minified.js @@ -1,16 +1,15 @@ //// [usingDeclarationsWithLegacyClassDecorators.7.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; + var _usingCtx = _using_ctx(); class C { } C = _ts_decorate([ dec - ], C), _using(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=es6,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=es6,target=es5).1.normal.js index f8a00255779c..06de5faa4046 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=es6,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=es6,target=es5).1.normal.js @@ -1,10 +1,9 @@ //// [usingDeclarationsWithLegacyClassDecorators.7.ts] import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; + var _usingCtx = _using_ctx(); var C = function C() { "use strict"; _class_call_check(this, C); @@ -12,11 +11,10 @@ try { C = _ts_decorate([ dec ], C); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=es6,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=es6,target=es5).2.minified.js index 00c5a2c0dea8..0fbdd9b8ee3f 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=es6,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=es6,target=es5).2.minified.js @@ -1,17 +1,16 @@ //// [usingDeclarationsWithLegacyClassDecorators.7.ts] import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = [], C = function C() { + var _usingCtx = _using_ctx(), C = function C() { _class_call_check(this, C); }; C = _ts_decorate([ dec - ], C), _using(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=es6,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=es6,target=esnext).1.normal.js index 72a97e8c0f22..853a3b6b62e6 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=es6,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=es6,target=esnext).1.normal.js @@ -1,19 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.7.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; + var _usingCtx = _using_ctx(); class C { } C = _ts_decorate([ dec ], C); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=es6,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=es6,target=esnext).2.minified.js index 5d4519141cf5..86d340d23276 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=es6,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=es6,target=esnext).2.minified.js @@ -1,16 +1,15 @@ //// [usingDeclarationsWithLegacyClassDecorators.7.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = []; + var _usingCtx = _using_ctx(); class C { } C = _ts_decorate([ dec - ], C), _using(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=system,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=system,target=es2015).1.normal.js index bc8c9f021d29..2e8581f536ce 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=system,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=system,target=es2015).1.normal.js @@ -1,37 +1,32 @@ //// [usingDeclarationsWithLegacyClassDecorators.7.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; + var _usingCtx = _using_ctx(); class C { } C = _ts_decorate([ dec ], C); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=system,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=system,target=es2015).2.minified.js index a24f2db11bfe..59a9df2f1e1e 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=system,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=system,target=es2015).2.minified.js @@ -1,34 +1,30 @@ //// [usingDeclarationsWithLegacyClassDecorators.7.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; + var _usingCtx = _using_ctx(); class C { } C = _ts_decorate([ dec - ], C), _using(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=system,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=system,target=es5).1.normal.js index 4515dc11866c..02d1f7ea7e7c 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=system,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=system,target=es5).1.normal.js @@ -2,11 +2,10 @@ System.register([ "@swc/helpers/_/_class_call_check", "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _class_call_check, _ts_decorate, _dispose, _using; + var _class_call_check, _ts_decorate, _using_ctx; return { setters: [ function(_class_call_check1) { @@ -15,16 +14,13 @@ System.register([ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; + var _usingCtx = _using_ctx(); var C = function C() { "use strict"; _class_call_check(this, C); @@ -32,12 +28,11 @@ System.register([ C = _ts_decorate([ dec ], C); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=system,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=system,target=es5).2.minified.js index bf63b2099e12..1cc637894ae3 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=system,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=system,target=es5).2.minified.js @@ -2,10 +2,9 @@ System.register([ "@swc/helpers/_/_class_call_check", "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _class_call_check, _ts_decorate, _dispose, _using; + var _class_call_check, _ts_decorate, _using_ctx; return { setters: [ function(_class_call_check1) { @@ -14,25 +13,22 @@ System.register([ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = [], C = function C() { + var _usingCtx = _using_ctx(), C = function C() { _class_call_check(this, C); }; C = _ts_decorate([ dec - ], C), _using(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=system,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=system,target=esnext).1.normal.js index bc8c9f021d29..2e8581f536ce 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=system,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=system,target=esnext).1.normal.js @@ -1,37 +1,32 @@ //// [usingDeclarationsWithLegacyClassDecorators.7.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; + var _usingCtx = _using_ctx(); class C { } C = _ts_decorate([ dec ], C); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=system,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=system,target=esnext).2.minified.js index a24f2db11bfe..59a9df2f1e1e 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=system,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.7(module=system,target=esnext).2.minified.js @@ -1,34 +1,30 @@ //// [usingDeclarationsWithLegacyClassDecorators.7.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; + var _usingCtx = _using_ctx(); class C { } C = _ts_decorate([ dec - ], C), _using(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=commonjs,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=commonjs,target=es2015).1.normal.js index 8548e1c8cf4b..8ae1ece99a0f 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=commonjs,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=commonjs,target=es2015).1.normal.js @@ -10,21 +10,19 @@ Object.defineProperty(exports, "C", { } }); const _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -const _dispose = require("@swc/helpers/_/_dispose"); -const _using = require("@swc/helpers/_/_using"); +const _using_ctx = require("@swc/helpers/_/_using_ctx"); var _C; try { - var _stack = []; + var _usingCtx = _using_ctx._(); class C { } _C = C; C = _ts_decorate._([ dec ], C); - var after = _using._(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=commonjs,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=commonjs,target=es2015).2.minified.js index 857eb3e81424..6ba8203d51f1 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=commonjs,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=commonjs,target=es2015).2.minified.js @@ -7,16 +7,16 @@ Object.defineProperty(exports, "__esModule", { return _C; } }); -const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _C, _stack = []; + var _C, _usingCtx = _using_ctx._(); class C { } _C = C, C = _ts_decorate._([ dec - ], C), _using._(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=commonjs,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=commonjs,target=es5).1.normal.js index a3c0297321a8..3449d82df4ab 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=commonjs,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=commonjs,target=es5).1.normal.js @@ -11,11 +11,10 @@ Object.defineProperty(exports, "C", { }); var _class_call_check = require("@swc/helpers/_/_class_call_check"); var _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -var _dispose = require("@swc/helpers/_/_dispose"); -var _using = require("@swc/helpers/_/_using"); +var _using_ctx = require("@swc/helpers/_/_using_ctx"); var _C; try { - var _stack = []; + var _usingCtx = _using_ctx._(); var C = function C() { "use strict"; _class_call_check._(this, C); @@ -24,10 +23,9 @@ try { C = _ts_decorate._([ dec ], C); - var after = _using._(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=commonjs,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=commonjs,target=es5).2.minified.js index bc84c9fe84c9..8ac7c0bb5c95 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=commonjs,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=commonjs,target=es5).2.minified.js @@ -7,16 +7,16 @@ Object.defineProperty(exports, "__esModule", { return _C; } }); -var _C, _class_call_check = require("@swc/helpers/_/_class_call_check"), _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +var _C, _class_call_check = require("@swc/helpers/_/_class_call_check"), _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = [], C = function C() { + var _usingCtx = _using_ctx._(), C = function C() { _class_call_check._(this, C); }; _C = C, C = _ts_decorate._([ dec - ], C), _using._(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=commonjs,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=commonjs,target=esnext).1.normal.js index 8548e1c8cf4b..8ae1ece99a0f 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=commonjs,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=commonjs,target=esnext).1.normal.js @@ -10,21 +10,19 @@ Object.defineProperty(exports, "C", { } }); const _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -const _dispose = require("@swc/helpers/_/_dispose"); -const _using = require("@swc/helpers/_/_using"); +const _using_ctx = require("@swc/helpers/_/_using_ctx"); var _C; try { - var _stack = []; + var _usingCtx = _using_ctx._(); class C { } _C = C; C = _ts_decorate._([ dec ], C); - var after = _using._(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=commonjs,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=commonjs,target=esnext).2.minified.js index 857eb3e81424..6ba8203d51f1 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=commonjs,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=commonjs,target=esnext).2.minified.js @@ -7,16 +7,16 @@ Object.defineProperty(exports, "__esModule", { return _C; } }); -const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _C, _stack = []; + var _C, _usingCtx = _using_ctx._(); class C { } _C = C, C = _ts_decorate._([ dec - ], C), _using._(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=es6,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=es6,target=es2015).1.normal.js index 612fe5198fcb..aa6a7ceef736 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=es6,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=es6,target=es2015).1.normal.js @@ -1,21 +1,19 @@ //// [usingDeclarationsWithLegacyClassDecorators.8.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; var _C; try { - var _stack = []; + var _usingCtx = _using_ctx(); class C { } _C = C; C = _ts_decorate([ dec ], C); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { _C as C }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=es6,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=es6,target=es2015).2.minified.js index 0b335d56f288..10cbe3e0e41f 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=es6,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=es6,target=es2015).2.minified.js @@ -1,17 +1,16 @@ //// [usingDeclarationsWithLegacyClassDecorators.8.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _C, _stack = []; + var _C, _usingCtx = _using_ctx(); class C { } _C = C, C = _ts_decorate([ dec - ], C), _using(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { _C as C }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=es6,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=es6,target=es5).1.normal.js index 65b869691318..b9ad72b0c0e4 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=es6,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=es6,target=es5).1.normal.js @@ -1,11 +1,10 @@ //// [usingDeclarationsWithLegacyClassDecorators.8.ts] import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; var _C; try { - var _stack = []; + var _usingCtx = _using_ctx(); var C = function C() { "use strict"; _class_call_check(this, C); @@ -14,11 +13,10 @@ try { C = _ts_decorate([ dec ], C); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { _C as C }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=es6,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=es6,target=es5).2.minified.js index 0e2160687553..76f2e248d861 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=es6,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=es6,target=es5).2.minified.js @@ -1,18 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.8.ts] import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _C, _stack = [], C = function C() { + var _C, _usingCtx = _using_ctx(), C = function C() { _class_call_check(this, C); }; _C = C, C = _ts_decorate([ dec - ], C), _using(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { _C as C }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=es6,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=es6,target=esnext).1.normal.js index 612fe5198fcb..aa6a7ceef736 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=es6,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=es6,target=esnext).1.normal.js @@ -1,21 +1,19 @@ //// [usingDeclarationsWithLegacyClassDecorators.8.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; var _C; try { - var _stack = []; + var _usingCtx = _using_ctx(); class C { } _C = C; C = _ts_decorate([ dec ], C); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { _C as C }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=es6,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=es6,target=esnext).2.minified.js index 0b335d56f288..10cbe3e0e41f 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=es6,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=es6,target=esnext).2.minified.js @@ -1,17 +1,16 @@ //// [usingDeclarationsWithLegacyClassDecorators.8.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _C, _stack = []; + var _C, _usingCtx = _using_ctx(); class C { } _C = C, C = _ts_decorate([ dec - ], C), _using(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { _C as C }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=system,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=system,target=es2015).1.normal.js index dd520731f7c3..d1024d13d7db 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=system,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=system,target=es2015).1.normal.js @@ -1,39 +1,34 @@ //// [usingDeclarationsWithLegacyClassDecorators.8.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _ts_decorate, _dispose, _using, _C; + var _ts_decorate, _using_ctx, _C; _export("C", void 0); return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; + var _usingCtx = _using_ctx(); class C { } _export("C", _C = C); C = _ts_decorate([ dec ], C); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=system,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=system,target=es2015).2.minified.js index 1b7d491d59c1..b85e72b2b16e 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=system,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=system,target=es2015).2.minified.js @@ -1,34 +1,30 @@ //// [usingDeclarationsWithLegacyClassDecorators.8.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return _export("C", void 0), { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; + var _usingCtx = _using_ctx(); class C { } _export("C", C), C = _ts_decorate([ dec - ], C), _using(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=system,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=system,target=es5).1.normal.js index a6801e82cabf..d25512b1fd3e 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=system,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=system,target=es5).1.normal.js @@ -2,11 +2,10 @@ System.register([ "@swc/helpers/_/_class_call_check", "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _class_call_check, _ts_decorate, _dispose, _using, _C; + var _class_call_check, _ts_decorate, _using_ctx, _C; _export("C", void 0); return { setters: [ @@ -16,16 +15,13 @@ System.register([ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; + var _usingCtx = _using_ctx(); var C = function C() { "use strict"; _class_call_check(this, C); @@ -34,12 +30,11 @@ System.register([ C = _ts_decorate([ dec ], C); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=system,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=system,target=es5).2.minified.js index 3a1e329a924a..b20766568cb1 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=system,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=system,target=es5).2.minified.js @@ -2,10 +2,9 @@ System.register([ "@swc/helpers/_/_class_call_check", "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _class_call_check, _ts_decorate, _dispose, _using; + var _class_call_check, _ts_decorate, _using_ctx; return _export("C", void 0), { setters: [ function(_class_call_check1) { @@ -14,25 +13,22 @@ System.register([ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = [], C = function C() { + var _usingCtx = _using_ctx(), C = function C() { _class_call_check(this, C); }; _export("C", C), C = _ts_decorate([ dec - ], C), _using(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=system,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=system,target=esnext).1.normal.js index dd520731f7c3..d1024d13d7db 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=system,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=system,target=esnext).1.normal.js @@ -1,39 +1,34 @@ //// [usingDeclarationsWithLegacyClassDecorators.8.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _ts_decorate, _dispose, _using, _C; + var _ts_decorate, _using_ctx, _C; _export("C", void 0); return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; + var _usingCtx = _using_ctx(); class C { } _export("C", _C = C); C = _ts_decorate([ dec ], C); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=system,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=system,target=esnext).2.minified.js index 1b7d491d59c1..b85e72b2b16e 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=system,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.8(module=system,target=esnext).2.minified.js @@ -1,34 +1,30 @@ //// [usingDeclarationsWithLegacyClassDecorators.8.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return _export("C", void 0), { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; + var _usingCtx = _using_ctx(); class C { } _export("C", C), C = _ts_decorate([ dec - ], C), _using(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=commonjs,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=commonjs,target=es2015).1.normal.js index b23b8ccd8fc3..a4bd4accb1a7 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=commonjs,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=commonjs,target=es2015).1.normal.js @@ -10,19 +10,17 @@ Object.defineProperty(exports, "default", { } }); const _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -const _dispose = require("@swc/helpers/_/_dispose"); -const _using = require("@swc/helpers/_/_using"); +const _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; + var _usingCtx = _using_ctx._(); var C = class C { }; C = _ts_decorate._([ dec ], C); - var after = _using._(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=commonjs,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=commonjs,target=es2015).2.minified.js index 4374fcb711a7..6c68fbfb6168 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=commonjs,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=commonjs,target=es2015).2.minified.js @@ -7,15 +7,15 @@ Object.defineProperty(exports, "__esModule", { return C; } }); -const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = [], C = class { + var _usingCtx = _using_ctx._(), C = class { }; C = _ts_decorate._([ dec - ], C), _using._(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=commonjs,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=commonjs,target=es5).1.normal.js index 83ff7521a6f4..3e2b6a072242 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=commonjs,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=commonjs,target=es5).1.normal.js @@ -11,10 +11,9 @@ Object.defineProperty(exports, "default", { }); var _class_call_check = require("@swc/helpers/_/_class_call_check"); var _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -var _dispose = require("@swc/helpers/_/_dispose"); -var _using = require("@swc/helpers/_/_using"); +var _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; + var _usingCtx = _using_ctx._(); var C = function C() { "use strict"; _class_call_check._(this, C); @@ -22,10 +21,9 @@ try { C = _ts_decorate._([ dec ], C); - var after = _using._(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=commonjs,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=commonjs,target=es5).2.minified.js index be3020abd9ee..2e8e8391c8db 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=commonjs,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=commonjs,target=es5).2.minified.js @@ -7,16 +7,16 @@ Object.defineProperty(exports, "__esModule", { return C; } }); -var _class_call_check = require("@swc/helpers/_/_class_call_check"), _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +var _class_call_check = require("@swc/helpers/_/_class_call_check"), _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = [], C = function C() { + var _usingCtx = _using_ctx._(), C = function C() { _class_call_check._(this, C); }; C = _ts_decorate._([ dec - ], C), _using._(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=commonjs,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=commonjs,target=esnext).1.normal.js index b23b8ccd8fc3..a4bd4accb1a7 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=commonjs,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=commonjs,target=esnext).1.normal.js @@ -10,19 +10,17 @@ Object.defineProperty(exports, "default", { } }); const _ts_decorate = require("@swc/helpers/_/_ts_decorate"); -const _dispose = require("@swc/helpers/_/_dispose"); -const _using = require("@swc/helpers/_/_using"); +const _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = []; + var _usingCtx = _using_ctx._(); var C = class C { }; C = _ts_decorate._([ dec ], C); - var after = _using._(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=commonjs,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=commonjs,target=esnext).2.minified.js index 4374fcb711a7..6c68fbfb6168 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=commonjs,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=commonjs,target=esnext).2.minified.js @@ -7,15 +7,15 @@ Object.defineProperty(exports, "__esModule", { return C; } }); -const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _dispose = require("@swc/helpers/_/_dispose"), _using = require("@swc/helpers/_/_using"); +const _ts_decorate = require("@swc/helpers/_/_ts_decorate"), _using_ctx = require("@swc/helpers/_/_using_ctx"); try { - var _stack = [], C = class { + var _usingCtx = _using_ctx._(), C = class { }; C = _ts_decorate._([ dec - ], C), _using._(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose._(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=es6,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=es6,target=es2015).1.normal.js index 65b351dfa8e8..7084d7b2830d 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=es6,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=es6,target=es2015).1.normal.js @@ -1,19 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.9.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; export { C as default }; try { - var _stack = []; + var _usingCtx = _using_ctx(); var C = class C { }; C = _ts_decorate([ dec ], C); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=es6,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=es6,target=es2015).2.minified.js index 3a03f356c560..7110630aa11e 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=es6,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=es6,target=es2015).2.minified.js @@ -1,16 +1,15 @@ //// [usingDeclarationsWithLegacyClassDecorators.9.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = [], C = class { + var _usingCtx = _using_ctx(), C = class { }; C = _ts_decorate([ dec - ], C), _using(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { C as default }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=es6,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=es6,target=es5).1.normal.js index 604476f04612..8e93165a0f35 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=es6,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=es6,target=es5).1.normal.js @@ -1,11 +1,10 @@ //// [usingDeclarationsWithLegacyClassDecorators.9.ts] import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; export { C as default }; try { - var _stack = []; + var _usingCtx = _using_ctx(); var C = function C() { "use strict"; _class_call_check(this, C); @@ -13,10 +12,9 @@ try { C = _ts_decorate([ dec ], C); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=es6,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=es6,target=es5).2.minified.js index 2fafdf49bc3d..babb12144ca5 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=es6,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=es6,target=es5).2.minified.js @@ -1,18 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.9.ts] import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = [], C = function C() { + var _usingCtx = _using_ctx(), C = function C() { _class_call_check(this, C); }; C = _ts_decorate([ dec - ], C), _using(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { C as default }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=es6,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=es6,target=esnext).1.normal.js index 65b351dfa8e8..7084d7b2830d 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=es6,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=es6,target=esnext).1.normal.js @@ -1,19 +1,17 @@ //// [usingDeclarationsWithLegacyClassDecorators.9.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; export { C as default }; try { - var _stack = []; + var _usingCtx = _using_ctx(); var C = class C { }; C = _ts_decorate([ dec ], C); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=es6,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=es6,target=esnext).2.minified.js index 3a03f356c560..7110630aa11e 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=es6,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=es6,target=esnext).2.minified.js @@ -1,16 +1,15 @@ //// [usingDeclarationsWithLegacyClassDecorators.9.ts] import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; -import { _ as _dispose } from "@swc/helpers/_/_dispose"; -import { _ as _using } from "@swc/helpers/_/_using"; +import { _ as _using_ctx } from "@swc/helpers/_/_using_ctx"; try { - var _stack = [], C = class { + var _usingCtx = _using_ctx(), C = class { }; C = _ts_decorate([ dec - ], C), _using(_stack, null); + ], C), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } export { C as default }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=system,target=es2015).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=system,target=es2015).1.normal.js index c1a39246a4af..a9d1eccb0f2b 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=system,target=es2015).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=system,target=es2015).1.normal.js @@ -1,37 +1,32 @@ //// [usingDeclarationsWithLegacyClassDecorators.9.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; + var _usingCtx = _using_ctx(); var C = class C { }; _export("default", C = _ts_decorate([ dec ], C)); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=system,target=es2015).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=system,target=es2015).2.minified.js index 3832dfd790c9..b6ba6d8a9800 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=system,target=es2015).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=system,target=es2015).2.minified.js @@ -1,33 +1,29 @@ //// [usingDeclarationsWithLegacyClassDecorators.9.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = [], C = class { + var _usingCtx = _using_ctx(), C = class { }; _export("default", C = _ts_decorate([ dec - ], C)), _using(_stack, null); + ], C)), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=system,target=es5).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=system,target=es5).1.normal.js index a105cb91ebf6..c5eeb1dd3398 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=system,target=es5).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=system,target=es5).1.normal.js @@ -2,11 +2,10 @@ System.register([ "@swc/helpers/_/_class_call_check", "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _class_call_check, _ts_decorate, _dispose, _using; + var _class_call_check, _ts_decorate, _using_ctx; return { setters: [ function(_class_call_check1) { @@ -15,16 +14,13 @@ System.register([ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; + var _usingCtx = _using_ctx(); var C = function C() { "use strict"; _class_call_check(this, C); @@ -32,12 +28,11 @@ System.register([ _export("default", C = _ts_decorate([ dec ], C)); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=system,target=es5).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=system,target=es5).2.minified.js index b0ee7290e35b..dc0750bb89c2 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=system,target=es5).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=system,target=es5).2.minified.js @@ -2,10 +2,9 @@ System.register([ "@swc/helpers/_/_class_call_check", "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _class_call_check, _ts_decorate, _dispose, _using; + var _class_call_check, _ts_decorate, _using_ctx; return { setters: [ function(_class_call_check1) { @@ -14,25 +13,22 @@ System.register([ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = [], C = function C() { + var _usingCtx = _using_ctx(), C = function C() { _class_call_check(this, C); }; _export("default", C = _ts_decorate([ dec - ], C)), _using(_stack, null); + ], C)), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=system,target=esnext).1.normal.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=system,target=esnext).1.normal.js index c1a39246a4af..a9d1eccb0f2b 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=system,target=esnext).1.normal.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=system,target=esnext).1.normal.js @@ -1,37 +1,32 @@ //// [usingDeclarationsWithLegacyClassDecorators.9.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { "use strict"; - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = []; + var _usingCtx = _using_ctx(); var C = class C { }; _export("default", C = _ts_decorate([ dec ], C)); - var after = _using(_stack, null); + var after = _usingCtx.u(null); } catch (_) { - var _error = _; - var _hasError = true; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=system,target=esnext).2.minified.js b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=system,target=esnext).2.minified.js index 3832dfd790c9..b6ba6d8a9800 100644 --- a/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=system,target=esnext).2.minified.js +++ b/crates/swc/tests/tsc-references/usingDeclarationsWithLegacyClassDecorators.9(module=system,target=esnext).2.minified.js @@ -1,33 +1,29 @@ //// [usingDeclarationsWithLegacyClassDecorators.9.ts] System.register([ "@swc/helpers/_/_ts_decorate", - "@swc/helpers/_/_dispose", - "@swc/helpers/_/_using" + "@swc/helpers/_/_using_ctx" ], function(_export, _context) { - var _ts_decorate, _dispose, _using; + var _ts_decorate, _using_ctx; return { setters: [ function(_ts_decorate1) { _ts_decorate = _ts_decorate1._; }, - function(_dispose1) { - _dispose = _dispose1._; - }, - function(_using1) { - _using = _using1._; + function(_using_ctx1) { + _using_ctx = _using_ctx1._; } ], execute: function() { try { - var _stack = [], C = class { + var _usingCtx = _using_ctx(), C = class { }; _export("default", C = _ts_decorate([ dec - ], C)), _using(_stack, null); + ], C)), _usingCtx.u(null); } catch (_) { - var _error = _, _hasError = !0; + _usingCtx.e = _; } finally{ - _dispose(_stack, _error, _hasError); + _usingCtx.d(); } } }; diff --git a/crates/swc_atoms/Cargo.toml b/crates/swc_atoms/Cargo.toml index 6d9dd6e6722e..afc6077a2e47 100644 --- a/crates/swc_atoms/Cargo.toml +++ b/crates/swc_atoms/Cargo.toml @@ -20,7 +20,7 @@ rkyv-impl = ["__rkyv", "rkyv", "bytecheck"] bytecheck = { version = "0.6.10", optional = true } hstr = "0.2.8" once_cell = "1" -rkyv = { package = "rkyv", version = "=0.7.42", optional = true, features = [ +rkyv = { package = "rkyv", version = "=0.7.44", optional = true, features = [ "strict", "validation", ] } diff --git a/crates/swc_bundler/src/bundler/chunk/cjs.rs b/crates/swc_bundler/src/bundler/chunk/cjs.rs index 5c8befce6259..3277515f0857 100644 --- a/crates/swc_bundler/src/bundler/chunk/cjs.rs +++ b/crates/swc_bundler/src/bundler/chunk/cjs.rs @@ -2,7 +2,7 @@ use std::{collections::HashMap, sync::atomic::Ordering}; use anyhow::Error; use swc_common::{collections::AHashMap, Span, SyntaxContext, DUMMY_SP}; -use swc_ecma_ast::{ModuleItem, *}; +use swc_ecma_ast::*; use swc_ecma_utils::{quote_ident, undefined, ExprFactory}; use swc_ecma_visit::{noop_visit_mut_type, VisitMut, VisitMutWith}; diff --git a/crates/swc_bundler/src/bundler/chunk/merge.rs b/crates/swc_bundler/src/bundler/chunk/merge.rs index a431776c1db2..dff0b42b369e 100644 --- a/crates/swc_bundler/src/bundler/chunk/merge.rs +++ b/crates/swc_bundler/src/bundler/chunk/merge.rs @@ -10,14 +10,11 @@ use swc_common::{ }; use swc_ecma_ast::*; use swc_ecma_utils::{find_pat_ids, prepend_stmt, private_ident, quote_ident, ExprFactory}; -use swc_ecma_visit::{noop_fold_type, noop_visit_mut_type, Fold, VisitMut, VisitMutWith}; +use swc_ecma_visit::{VisitMut, VisitMutWith}; use EdgeDirection::Outgoing; use crate::{ - bundler::{ - keywords::KeywordRenamer, - load::{Imports, TransformedModule}, - }, + bundler::{keywords::KeywordRenamer, load::TransformedModule}, dep_graph::ModuleGraph, id::{Id, ModuleId}, inline::inline, @@ -1295,84 +1292,6 @@ where } } -pub(super) struct ImportDropper<'a> { - pub imports: &'a Imports, -} - -impl VisitMut for ImportDropper<'_> { - noop_visit_mut_type!(); - - fn visit_mut_module_item(&mut self, i: &mut ModuleItem) { - match i { - ModuleItem::ModuleDecl(ModuleDecl::Import(ImportDecl { src, .. })) - if self - .imports - .specifiers - .iter() - .any(|(s, _)| s.src.value == *src.value) => - { - *i = ModuleItem::Stmt(Stmt::Empty(EmptyStmt { span: DUMMY_SP })) - } - _ => {} - } - } -} - -/// `export var a = 1` => `var a = 1` -pub(super) struct Unexporter; - -impl Fold for Unexporter { - noop_fold_type!(); - - fn fold_module_item(&mut self, item: ModuleItem) -> ModuleItem { - match item { - ModuleItem::ModuleDecl(decl) => match decl { - ModuleDecl::ExportDecl(decl) => ModuleItem::Stmt(Stmt::Decl(decl.decl)), - - ModuleDecl::ExportDefaultDecl(export) => match export.decl { - DefaultDecl::Class(ClassExpr { ident: None, .. }) - | DefaultDecl::Fn(FnExpr { ident: None, .. }) => { - ModuleItem::Stmt(Stmt::Empty(EmptyStmt { span: DUMMY_SP })) - } - DefaultDecl::TsInterfaceDecl(decl) => { - ModuleItem::Stmt(Stmt::Decl(Decl::TsInterface(decl))) - } - - DefaultDecl::Class(ClassExpr { - ident: Some(ident), - class, - }) => ModuleItem::Stmt(Stmt::Decl(Decl::Class(ClassDecl { - declare: false, - ident, - class, - }))), - - DefaultDecl::Fn(FnExpr { - ident: Some(ident), - function, - }) => ModuleItem::Stmt(Stmt::Decl(Decl::Fn(FnDecl { - declare: false, - function, - ident, - }))), - }, - - // Empty statement - ModuleDecl::ExportAll(..) - | ModuleDecl::ExportDefaultExpr(..) - | ModuleDecl::ExportNamed(..) => { - ModuleItem::Stmt(Stmt::Empty(EmptyStmt { span: DUMMY_SP })) - } - ModuleDecl::Import(..) => ModuleItem::ModuleDecl(decl), - - _ => unimplemented!("Unexported: {:?}", decl), - }, - - _ => item, - } - } -} - struct ImportMetaHandler<'a, 'b> { file: &'a FileName, #[allow(clippy::borrowed_box)] diff --git a/crates/swc_bundler/src/bundler/chunk/mod.rs b/crates/swc_bundler/src/bundler/chunk/mod.rs index 8fef06d61d8a..5ca2296c2729 100644 --- a/crates/swc_bundler/src/bundler/chunk/mod.rs +++ b/crates/swc_bundler/src/bundler/chunk/mod.rs @@ -15,9 +15,6 @@ mod computed_key; mod merge; mod plan; -#[derive(Debug)] -struct InternalEntry {} - #[derive(Debug, Default)] struct State {} diff --git a/crates/swc_bundler/src/bundler/mod.rs b/crates/swc_bundler/src/bundler/mod.rs index 4d959c6efaff..c1432870fbf4 100644 --- a/crates/swc_bundler/src/bundler/mod.rs +++ b/crates/swc_bundler/src/bundler/mod.rs @@ -48,18 +48,13 @@ pub struct Config { pub module: ModuleType, } -#[derive(Debug, PartialEq, Eq, Hash)] +#[derive(Debug, PartialEq, Eq, Hash, Default)] pub enum ModuleType { + #[default] Es, Iife, } -impl Default for ModuleType { - fn default() -> Self { - ModuleType::Es - } -} - #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] pub enum BundleKind { /// User-provided entry diff --git a/crates/swc_bundler/src/util.rs b/crates/swc_bundler/src/util.rs index 9ff36025e309..752835a4c3e5 100644 --- a/crates/swc_bundler/src/util.rs +++ b/crates/swc_bundler/src/util.rs @@ -1,6 +1,6 @@ #![allow(dead_code)] -use std::{clone::Clone, cmp::Eq, hash::Hash}; +use std::hash::Hash; use swc_common::{Span, SyntaxContext, DUMMY_SP}; use swc_ecma_ast::*; diff --git a/crates/swc_bundler/tests/fixture.rs b/crates/swc_bundler/tests/fixture.rs index bd837a3cd060..6869b8d52426 100644 --- a/crates/swc_bundler/tests/fixture.rs +++ b/crates/swc_bundler/tests/fixture.rs @@ -1,5 +1,4 @@ use std::{ - self, collections::HashMap, fs::read_dir, io, diff --git a/crates/swc_cli_impl/src/commands/compile.rs b/crates/swc_cli_impl/src/commands/compile.rs index 96a9dc5cd3fd..3808e4ed4867 100644 --- a/crates/swc_cli_impl/src/commands/compile.rs +++ b/crates/swc_cli_impl/src/commands/compile.rs @@ -308,7 +308,10 @@ impl CompileOptions { }); if let Some(file_path) = *file_path { - options.filename = file_path.to_str().unwrap_or_default().to_owned(); + file_path + .to_str() + .unwrap_or_default() + .clone_into(&mut options.filename); } if let Some(env_name) = &self.env_name { @@ -322,8 +325,9 @@ impl CompileOptions { value => SourceMapsConfig::Str(value.to_string()), }); - options.source_file_name = self.source_file_name.to_owned(); - options.source_root = self.source_root.to_owned(); + self.source_file_name + .clone_into(&mut options.source_file_name); + self.source_root.clone_into(&mut options.source_root); } Ok(options) diff --git a/crates/swc_common/Cargo.toml b/crates/swc_common/Cargo.toml index a20c7b5e2ac7..44e865cbeadc 100644 --- a/crates/swc_common/Cargo.toml +++ b/crates/swc_common/Cargo.toml @@ -49,7 +49,7 @@ new_debug_unreachable = "1.0.4" num-bigint = "0.4" once_cell = "1.19.0" parking_lot = { version = "0.12.1", optional = true } -rkyv = { version = "=0.7.42", optional = true, features = [ +rkyv = { version = "=0.7.44", optional = true, features = [ "strict", "validation", ] } diff --git a/crates/swc_common/src/errors/diagnostic.rs b/crates/swc_common/src/errors/diagnostic.rs index be198a3f2c69..cb33fc6b88fd 100644 --- a/crates/swc_common/src/errors/diagnostic.rs +++ b/crates/swc_common/src/errors/diagnostic.rs @@ -455,7 +455,7 @@ impl Diagnostic { /// message". pub fn copy_details_not_message(&mut self, from: &Diagnostic) { self.span = from.span.clone(); - self.code = from.code.clone(); + self.code.clone_from(&from.code); self.children.extend(from.children.iter().cloned()) } diff --git a/crates/swc_common/src/errors/emitter.rs b/crates/swc_common/src/errors/emitter.rs index 767d8e2267f3..e9d102ce1071 100644 --- a/crates/swc_common/src/errors/emitter.rs +++ b/crates/swc_common/src/errors/emitter.rs @@ -15,11 +15,8 @@ use std::{ io::{self, prelude::*}, }; -#[cfg(feature = "tty-emitter")] -use atty; #[cfg(feature = "tty-emitter")] use termcolor::{Buffer, BufferWriter, Color, ColorChoice, ColorSpec, StandardStream, WriteColor}; -use unicode_width; use self::Destination::*; use super::{ @@ -1112,7 +1109,7 @@ impl EmitterWriter { let mut to_add = HashMap::<_, _>::default(); for (depth, style) in depths { - if multilines.get(&depth).is_some() { + if multilines.contains_key(&depth) { multilines.remove(&depth); } else { to_add.insert(depth, style); diff --git a/crates/swc_common/src/source_map.rs b/crates/swc_common/src/source_map.rs index d1a951dfae9b..5fc8967975ff 100644 --- a/crates/swc_common/src/source_map.rs +++ b/crates/swc_common/src/source_map.rs @@ -1191,7 +1191,6 @@ impl SourceMap { None } - /// #[cfg(feature = "sourcemap")] #[cfg_attr(docsrs, doc(cfg(feature = "sourcemap")))] pub fn build_source_map(&self, mappings: &[(BytePos, LineCol)]) -> sourcemap::SourceMap { @@ -1508,7 +1507,6 @@ pub struct ByteToCharPosState { #[cfg(test)] mod tests { use super::*; - use crate::sync::Lrc; fn init_source_map() -> SourceMap { let sm = SourceMap::new(FilePathMapping::empty()); @@ -1765,49 +1763,4 @@ mod tests { cpos = cpos + CharPos(c.len_utf16()); } } - - /// Returns the span corresponding to the `n`th occurrence of - /// `substring` in `source_text`. - trait SourceMapExtension { - fn span_substr( - &self, - file: &Lrc, - source_text: &str, - substring: &str, - n: usize, - ) -> Span; - } - - impl SourceMapExtension for SourceMap { - fn span_substr( - &self, - file: &Lrc, - source_text: &str, - substring: &str, - n: usize, - ) -> Span { - let mut i = 0; - let mut hi = 0; - loop { - let offset = source_text[hi..].find(substring).unwrap_or_else(|| { - panic!( - "source_text `{}` does not have {} occurrences of `{}`, only {}", - source_text, n, substring, i - ); - }); - let lo = hi + offset; - hi = lo + substring.len(); - if i == n { - let span = Span::new( - BytePos(lo as u32 + file.start_pos.0), - BytePos(hi as u32 + file.start_pos.0), - NO_EXPANSION, - ); - assert_eq!(&self.span_to_snippet(span).unwrap()[..], substring); - return span; - } - i += 1; - } - } - } } diff --git a/crates/swc_common/src/syntax_pos/hygiene.rs b/crates/swc_common/src/syntax_pos/hygiene.rs index 0d43b52ebd95..5ec6d36c71c5 100644 --- a/crates/swc_common/src/syntax_pos/hygiene.rs +++ b/crates/swc_common/src/syntax_pos/hygiene.rs @@ -315,7 +315,7 @@ impl HygieneData { return f(&mut globals.hygiene_data.lock()); #[cfg(not(feature = "parking_lot"))] - return f(&mut *globals.hygiene_data.lock().unwrap()); + return f(&mut globals.hygiene_data.lock().unwrap()); }) } } @@ -328,7 +328,7 @@ pub(crate) fn with_marks) -> T>(f: F) -> T { return f(&mut globals.marks.lock()); #[cfg(not(feature = "parking_lot"))] - return f(&mut *globals.marks.lock().unwrap()); + return f(&mut globals.marks.lock().unwrap()); }) } diff --git a/crates/swc_common/tests/attr_interop.rs b/crates/swc_common/tests/attr_interop.rs index 2db21d74314c..3be53899e45a 100644 --- a/crates/swc_common/tests/attr_interop.rs +++ b/crates/swc_common/tests/attr_interop.rs @@ -1,6 +1,6 @@ //! Test that `#[span]` and `#[fold]` can be used at same time. -use serde::{self, Deserialize, Serialize}; -use swc_common::{self, ast_node, Span, Spanned}; +use serde::{Deserialize, Serialize}; +use swc_common::{ast_node, Span, Spanned}; #[ast_node("Class")] // See https://github.com/rust-lang/rust/issues/44925 diff --git a/crates/swc_core/tests/fixture/stub_napi/Cargo.toml b/crates/swc_core/tests/fixture/stub_napi/Cargo.toml index 044a070f42d9..841394d5ad67 100644 --- a/crates/swc_core/tests/fixture/stub_napi/Cargo.toml +++ b/crates/swc_core/tests/fixture/stub_napi/Cargo.toml @@ -39,6 +39,7 @@ napi-derive = { version = "2", default-features = false, features = [ "type-def", ] } path-clean = "0.1" +proc-macro2 = "=1.0.79" serde = { version = "1", features = ["derive"] } serde_json = { version = "1", features = ["unbounded_depth"] } tracing = { version = "0.1.37", features = ["release_max_level_info"] } diff --git a/crates/swc_core/tests/fixture/stub_wasm/Cargo.toml b/crates/swc_core/tests/fixture/stub_wasm/Cargo.toml index d12d3403e245..e8b40c293bd7 100644 --- a/crates/swc_core/tests/fixture/stub_wasm/Cargo.toml +++ b/crates/swc_core/tests/fixture/stub_wasm/Cargo.toml @@ -17,6 +17,7 @@ swc_v1 = [] [dependencies] anyhow = "1.0.66" browserslist-rs = { version = "0.13.0", features = ["wasm_bindgen"] } +proc-macro2 = "=1.0.79" serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" swc_core = { path = "../../../../swc_core", features = [ diff --git a/crates/swc_css_ast/Cargo.toml b/crates/swc_css_ast/Cargo.toml index 88df62d23290..9d0b9f494247 100644 --- a/crates/swc_css_ast/Cargo.toml +++ b/crates/swc_css_ast/Cargo.toml @@ -19,7 +19,7 @@ serde-impl = ["serde"] [dependencies] is-macro = "0.3.5" -rkyv = { version = "=0.7.42", optional = true, features = [ +rkyv = { version = "=0.7.44", optional = true, features = [ "strict", "validation", ] } diff --git a/crates/swc_css_codegen/src/writer/basic.rs b/crates/swc_css_codegen/src/writer/basic.rs index 1983d1192949..c9a1a2277691 100644 --- a/crates/swc_css_codegen/src/writer/basic.rs +++ b/crates/swc_css_codegen/src/writer/basic.rs @@ -5,30 +5,20 @@ use swc_common::{BytePos, LineCol, Span}; use super::CssWriter; -#[derive(Clone, Copy, PartialEq, Eq, Debug)] +#[derive(Clone, Default, Copy, PartialEq, Eq, Debug)] pub enum IndentType { Tab, + #[default] Space, } -impl Default for IndentType { - fn default() -> Self { - IndentType::Space - } -} - -#[derive(Clone, Copy, PartialEq, Eq, Debug)] +#[derive(Clone, Default, Copy, PartialEq, Eq, Debug)] pub enum LineFeed { + #[default] LF, CRLF, } -impl Default for LineFeed { - fn default() -> Self { - LineFeed::LF - } -} - pub struct BasicCssWriterConfig { pub indent_type: IndentType, pub indent_width: i32, diff --git a/crates/swc_css_compat/src/compiler/nesting.rs b/crates/swc_css_compat/src/compiler/nesting.rs index f9661f41ea23..6b3e0153901a 100644 --- a/crates/swc_css_compat/src/compiler/nesting.rs +++ b/crates/swc_css_compat/src/compiler/nesting.rs @@ -117,7 +117,7 @@ impl Compiler { &mut children { if c.type_selector.is_some() { - compound.type_selector = c.type_selector.clone(); + compound.type_selector.clone_from(&c.type_selector); } let mut subclass = c.subclass_selectors.clone(); diff --git a/crates/swc_css_parser/src/parser/input.rs b/crates/swc_css_parser/src/parser/input.rs index 0c5fbd52b394..eef9c7958111 100644 --- a/crates/swc_css_parser/src/parser/input.rs +++ b/crates/swc_css_parser/src/parser/input.rs @@ -176,7 +176,7 @@ where } pub(super) fn reset(&mut self, state: &WrappedState) { - self.cur = state.cur.clone(); + self.cur.clone_from(&state.cur); self.input.reset(&state.inner); } } @@ -465,8 +465,8 @@ impl<'a> ParserInput for Input<'a> { } fn reset(&mut self, state: &Self::State) { - self.idx = state.idx.clone(); - self.balance_stack = state.balance_stack.clone(); + self.idx.clone_from(&state.idx); + self.balance_stack.clone_from(&state.balance_stack); } fn take_errors(&mut self) -> Vec { diff --git a/crates/swc_css_parser/src/parser/mod.rs b/crates/swc_css_parser/src/parser/mod.rs index 5a49c79ce28e..f9d06439cecc 100644 --- a/crates/swc_css_parser/src/parser/mod.rs +++ b/crates/swc_css_parser/src/parser/mod.rs @@ -53,20 +53,15 @@ pub struct ParserConfig { pub legacy_ie: bool, } -#[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] pub enum BlockContentsGrammar { StyleBlock, DeclarationList, RuleList, + #[default] Stylesheet, } -impl Default for BlockContentsGrammar { - fn default() -> Self { - BlockContentsGrammar::Stylesheet - } -} - #[derive(Debug, Clone, Copy)] struct Ctx { is_top_level: bool, diff --git a/crates/swc_css_parser/src/parser/values_and_units/mod.rs b/crates/swc_css_parser/src/parser/values_and_units/mod.rs index f29a8197c246..75dd8c6970b2 100644 --- a/crates/swc_css_parser/src/parser/values_and_units/mod.rs +++ b/crates/swc_css_parser/src/parser/values_and_units/mod.rs @@ -146,10 +146,7 @@ where } }; - let balance_close_type = match balance_stack.pop() { - Some(v) => v, - None => None, - }; + let balance_close_type = balance_stack.pop().unwrap_or_default(); if Some(value) != balance_close_type { break; diff --git a/crates/swc_ecma_ast/Cargo.toml b/crates/swc_ecma_ast/Cargo.toml index b797db447bfc..5a6c27ffe574 100644 --- a/crates/swc_ecma_ast/Cargo.toml +++ b/crates/swc_ecma_ast/Cargo.toml @@ -36,7 +36,7 @@ bytecheck = { version = "0.6.10", optional = true } is-macro = "0.3.5" num-bigint = { version = "0.4", features = ["serde"] } phf = { version = "0.11.2", features = ["macros"] } -rkyv = { package = "rkyv", version = "=0.7.42", optional = true, features = [ +rkyv = { package = "rkyv", version = "=0.7.44", optional = true, features = [ "strict", "validation", ] } diff --git a/crates/swc_ecma_ast/src/lib.rs b/crates/swc_ecma_ast/src/lib.rs index 75128632909d..933ce6dc343a 100644 --- a/crates/swc_ecma_ast/src/lib.rs +++ b/crates/swc_ecma_ast/src/lib.rs @@ -105,12 +105,13 @@ impl Take for Invalid { /// Note: This type implements `Serailize` and `Deserialize` if `serde` is /// enabled, instead of requiring `serde-impl` feature. -#[derive(Debug, Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Hash)] +#[derive(Debug, Default, Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub enum EsVersion { #[cfg_attr(feature = "serde", serde(rename = "es3", alias = "ES3"))] Es3, #[cfg_attr(feature = "serde", serde(rename = "es5", alias = "ES5"))] + #[default] Es5, #[cfg_attr( feature = "serde", @@ -141,12 +142,6 @@ impl EsVersion { } } -impl Default for EsVersion { - fn default() -> Self { - EsVersion::Es5 - } -} - /// Warning: The particular implementation of serialization and deserialization /// of the ast nodes may change in the future, and so these types would be /// removed. It's safe to say they will be serializable in some form or another, diff --git a/crates/swc_ecma_codegen/benches/bench.rs b/crates/swc_ecma_codegen/benches/bench.rs index b1501a580ecb..792777fab247 100644 --- a/crates/swc_ecma_codegen/benches/bench.rs +++ b/crates/swc_ecma_codegen/benches/bench.rs @@ -2,7 +2,7 @@ extern crate swc_malloc; use criterion::{black_box, criterion_group, criterion_main, Bencher, Criterion}; use swc_common::FileName; -use swc_ecma_codegen::{self, Emitter}; +use swc_ecma_codegen::Emitter; use swc_ecma_parser::{Parser, StringInput, Syntax}; const COLORS_JS: &str = r#" diff --git a/crates/swc_ecma_codegen/benches/with_parse.rs b/crates/swc_ecma_codegen/benches/with_parse.rs index deab9f740137..30b0b8791e99 100644 --- a/crates/swc_ecma_codegen/benches/with_parse.rs +++ b/crates/swc_ecma_codegen/benches/with_parse.rs @@ -2,7 +2,7 @@ extern crate swc_malloc; use criterion::{black_box, criterion_group, criterion_main, Bencher, Criterion}; use swc_common::FileName; -use swc_ecma_codegen::{self, Emitter}; +use swc_ecma_codegen::Emitter; use swc_ecma_parser::{Parser, StringInput, Syntax}; const COLORS_JS: &str = r#" diff --git a/crates/swc_ecma_codegen/src/lib.rs b/crates/swc_ecma_codegen/src/lib.rs index 24b162c32223..f2260dc2d73f 100644 --- a/crates/swc_ecma_codegen/src/lib.rs +++ b/crates/swc_ecma_codegen/src/lib.rs @@ -38,27 +38,27 @@ pub mod util; pub type Result = io::Result<()>; pub trait Node: Spanned { - fn emit_with(&self, e: &mut Emitter<'_, W, S>) -> Result + fn emit_with(&self, e: &mut Emitter<'_, W, S>) -> Result where W: WriteJs, - S: SourceMapperExt; + S: SourceMapper + SourceMapperExt; } impl Node for Box { #[inline] - fn emit_with(&self, e: &mut Emitter<'_, W, S>) -> Result + fn emit_with(&self, e: &mut Emitter<'_, W, S>) -> Result where W: WriteJs, - S: SourceMapperExt, + S: SourceMapper + SourceMapperExt, { (**self).emit_with(e) } } impl<'a, N: Node> Node for &'a N { #[inline] - fn emit_with(&self, e: &mut Emitter<'_, W, S>) -> Result + fn emit_with(&self, e: &mut Emitter<'_, W, S>) -> Result where W: WriteJs, - S: SourceMapperExt, + S: SourceMapper + SourceMapperExt, { (**self).emit_with(e) } @@ -3675,10 +3675,10 @@ impl Node for Option where N: Node, { - fn emit_with(&self, e: &mut Emitter<'_, W, S>) -> Result + fn emit_with(&self, e: &mut Emitter<'_, W, S>) -> Result where W: WriteJs, - S: SourceMapperExt, + S: SourceMapper + SourceMapperExt, { match *self { Some(ref n) => n.emit_with(e), diff --git a/crates/swc_ecma_codegen/src/tests.rs b/crates/swc_ecma_codegen/src/tests.rs index 0903d5df541e..1a66d887080c 100644 --- a/crates/swc_ecma_codegen/src/tests.rs +++ b/crates/swc_ecma_codegen/src/tests.rs @@ -1,9 +1,4 @@ -use std::{ - fmt::Debug, - io::Write, - path::PathBuf, - sync::{Arc, RwLock}, -}; +use std::path::PathBuf; use swc_common::{comments::SingleThreadedComments, FileName, SourceMap}; use swc_ecma_parser; @@ -12,7 +7,7 @@ use testing::DebugUsingDisplay; use self::swc_ecma_parser::{EsConfig, Parser, StringInput, Syntax}; use super::*; -use crate::{config::Config, text_writer::omit_trailing_semi}; +use crate::text_writer::omit_trailing_semi; struct Builder { cfg: Config, @@ -706,18 +701,6 @@ fn test_escape_with_source_str() { ); } -#[derive(Debug, Clone)] -struct Buf(Arc>>); -impl Write for Buf { - fn write(&mut self, data: &[u8]) -> io::Result { - self.0.write().unwrap().write(data) - } - - fn flush(&mut self) -> io::Result<()> { - self.0.write().unwrap().flush() - } -} - #[test] fn issue_2213() { assert_min("a - -b * c", "a- -b*c") diff --git a/crates/swc_ecma_codegen/tests/sourcemap.rs b/crates/swc_ecma_codegen/tests/sourcemap.rs index c55ede261912..fbbe43edb688 100644 --- a/crates/swc_ecma_codegen/tests/sourcemap.rs +++ b/crates/swc_ecma_codegen/tests/sourcemap.rs @@ -5,7 +5,7 @@ use rustc_hash::FxHashSet; use sourcemap::SourceMap; use swc_common::{comments::SingleThreadedComments, source_map::SourceMapGenConfig}; use swc_ecma_ast::EsVersion; -use swc_ecma_codegen::{self, text_writer::WriteJs, Emitter}; +use swc_ecma_codegen::{text_writer::WriteJs, Emitter}; use swc_ecma_parser::{lexer::Lexer, Parser, Syntax}; use swc_ecma_testing::{exec_node_js, JsExecOptions}; diff --git a/crates/swc_ecma_codegen/tests/test262.rs b/crates/swc_ecma_codegen/tests/test262.rs index f6437d69ce50..f12b0ce8ebcb 100644 --- a/crates/swc_ecma_codegen/tests/test262.rs +++ b/crates/swc_ecma_codegen/tests/test262.rs @@ -8,7 +8,7 @@ use std::{ use swc_common::comments::SingleThreadedComments; use swc_ecma_ast::EsVersion; -use swc_ecma_codegen::{self, text_writer::WriteJs, Emitter}; +use swc_ecma_codegen::{text_writer::WriteJs, Emitter}; use swc_ecma_parser::{lexer::Lexer, Parser, Syntax}; use testing::NormalizedOutput; diff --git a/crates/swc_ecma_codegen_macros/src/lib.rs b/crates/swc_ecma_codegen_macros/src/lib.rs index 93aa49c0fc6c..e592c5073e3b 100644 --- a/crates/swc_ecma_codegen_macros/src/lib.rs +++ b/crates/swc_ecma_codegen_macros/src/lib.rs @@ -2,7 +2,7 @@ extern crate proc_macro; use proc_macro::TokenStream; use swc_macros_common::prelude::*; -use syn::{self, fold::Fold, *}; +use syn::{fold::Fold, *}; mod fold; diff --git a/crates/swc_ecma_compat_es2015/src/block_scoping/mod.rs b/crates/swc_ecma_compat_es2015/src/block_scoping/mod.rs index 81cada815c31..3903abda4ce6 100644 --- a/crates/swc_ecma_compat_es2015/src/block_scoping/mod.rs +++ b/crates/swc_ecma_compat_es2015/src/block_scoping/mod.rs @@ -675,7 +675,7 @@ impl<'a> FlowHelper<'a> { fn has_outer_label(&self, label: &Option) -> bool { match label { - Some(l) => self.inner_label.get(&l.sym).is_none(), + Some(l) => !self.inner_label.contains(&l.sym), None => false, } } diff --git a/crates/swc_ecma_compat_es2015/src/classes/constructor.rs b/crates/swc_ecma_compat_es2015/src/classes/constructor.rs index 5b091143e5c1..354f6e6769d9 100644 --- a/crates/swc_ecma_compat_es2015/src/classes/constructor.rs +++ b/crates/swc_ecma_compat_es2015/src/classes/constructor.rs @@ -1,6 +1,5 @@ use std::iter; -use swc_atoms::JsWord; use swc_common::{util::take::Take, Mark, DUMMY_SP}; use swc_ecma_ast::*; use swc_ecma_transforms_base::helper; @@ -511,42 +510,3 @@ pub(super) fn replace_this_in_constructor(mark: Mark, c: &mut Constructor) -> bo v.found } - -/// # In -/// -/// ```js -/// -/// class Example { -/// constructor() { -/// var Example; -/// } -/// } -/// ``` -/// -/// # Out -/// -/// ```js -/// var Example = function Example() { -/// _class_call_check(this, Example); -/// var Example1; -/// }; -/// ``` -pub(super) struct VarRenamer<'a> { - pub mark: Mark, - pub class_name: &'a JsWord, -} - -impl<'a> VisitMut for VarRenamer<'a> { - noop_visit_mut_type!(); - - fn visit_mut_pat(&mut self, pat: &mut Pat) { - match pat { - Pat::Ident(ident) => { - if *self.class_name == ident.id.sym { - ident.id.span = ident.id.span.apply_mark(self.mark); - } - } - _ => pat.visit_mut_children_with(self), - } - } -} diff --git a/crates/swc_ecma_compat_es2015/src/generator.rs b/crates/swc_ecma_compat_es2015/src/generator.rs index 2f14ca583de5..1dc473a60096 100644 --- a/crates/swc_ecma_compat_es2015/src/generator.rs +++ b/crates/swc_ecma_compat_es2015/src/generator.rs @@ -2915,6 +2915,7 @@ impl Generator { self.clauses = Some(Default::default()); } + #[allow(clippy::manual_unwrap_or_default)] let stmts = if let Some(mut stmts) = self.stmts.take() { if self.with_block_stack.is_some() { // The previous label was nested inside one or more `with` diff --git a/crates/swc_ecma_compat_es2015/src/lib.rs b/crates/swc_ecma_compat_es2015/src/lib.rs index e536e0704b4a..7be2ba0b2440 100644 --- a/crates/swc_ecma_compat_es2015/src/lib.rs +++ b/crates/swc_ecma_compat_es2015/src/lib.rs @@ -124,7 +124,6 @@ pub struct Config { #[cfg(test)] mod tests { - use swc_common::Mark; use swc_ecma_transforms_base::resolver; use swc_ecma_transforms_testing::{test, test_exec}; diff --git a/crates/swc_ecma_compat_es2015/src/spread.rs b/crates/swc_ecma_compat_es2015/src/spread.rs index a4ab5b32ec82..7b49968ca1ff 100644 --- a/crates/swc_ecma_compat_es2015/src/spread.rs +++ b/crates/swc_ecma_compat_es2015/src/spread.rs @@ -222,7 +222,7 @@ impl Spread { fn concat_args( &self, span: Span, - args: impl ExactSizeIterator + Iterator>, + args: impl ExactSizeIterator>, need_array: bool, ) -> Expr { // @@ -447,11 +447,11 @@ impl Spread { #[tracing::instrument(level = "info", skip_all)] fn expand_literal_args( - args: impl ExactSizeIterator + Iterator>, + args: impl ExactSizeIterator>, ) -> Vec> { fn expand( buf: &mut Vec>, - args: impl ExactSizeIterator + Iterator>, + args: impl ExactSizeIterator>, ) { for mut arg in args { if let Some(ExprOrSpread { diff --git a/crates/swc_ecma_compat_es2022/src/class_properties/mod.rs b/crates/swc_ecma_compat_es2022/src/class_properties/mod.rs index 7a506aae3cf7..054745604a15 100644 --- a/crates/swc_ecma_compat_es2022/src/class_properties/mod.rs +++ b/crates/swc_ecma_compat_es2022/src/class_properties/mod.rs @@ -485,7 +485,7 @@ impl ClassProperties { } ClassMember::PrivateProp(prop) => { - if private_map.get(&prop.key.id.sym).is_some() { + if private_map.contains_key(&prop.key.id.sym) { let error = format!("duplicate private name #{}.", prop.key.id.sym); HANDLER.with(|handler| { handler.struct_span_err(prop.key.id.span, &error).emit() diff --git a/crates/swc_ecma_compat_es2022/src/private_in_object.rs b/crates/swc_ecma_compat_es2022/src/private_in_object.rs index 0b245bce12eb..4dcd8c744f28 100644 --- a/crates/swc_ecma_compat_es2022/src/private_in_object.rs +++ b/crates/swc_ecma_compat_es2022/src/private_in_object.rs @@ -216,7 +216,7 @@ impl VisitMut for PrivateInObject { let old_cls = take(&mut self.cls); self.cls.mark = Mark::fresh(Mark::root()); - self.cls.ident = n.ident.clone(); + self.cls.ident.clone_from(&n.ident); self.cls.vars = Mode::ClassExpr { vars: Default::default(), init_exprs: Default::default(), diff --git a/crates/swc_ecma_lints/src/lib.rs b/crates/swc_ecma_lints/src/lib.rs index 86f4713cf2c5..cf3b8b32497c 100644 --- a/crates/swc_ecma_lints/src/lib.rs +++ b/crates/swc_ecma_lints/src/lib.rs @@ -1,6 +1,7 @@ #![cfg_attr(feature = "non_critical_lints", deny(unused))] #![cfg_attr(feature = "non_critical_lints", deny(clippy::all))] #![allow(rustc::untranslatable_diagnostic_trivial)] +#![allow(dead_code)] pub mod config; pub mod rule; diff --git a/crates/swc_ecma_lints/src/rules/constructor_super.rs b/crates/swc_ecma_lints/src/rules/constructor_super.rs index 19b37c521b6b..16e44cdd3ec5 100644 --- a/crates/swc_ecma_lints/src/rules/constructor_super.rs +++ b/crates/swc_ecma_lints/src/rules/constructor_super.rs @@ -25,19 +25,14 @@ pub fn constructor_super(config: &RuleConfig<()>) -> Option> { } } -#[derive(Debug, Clone, Copy)] +#[derive(Debug, Clone, Copy, Default)] enum SuperClass { Valid, Invalid, + #[default] NotSetted, } -impl Default for SuperClass { - fn default() -> Self { - SuperClass::NotSetted - } -} - #[derive(Debug, Default)] struct ClassMeta { super_class: SuperClass, diff --git a/crates/swc_ecma_loader/src/lib.rs b/crates/swc_ecma_loader/src/lib.rs index 97b51f3fdc62..710e719d50fb 100644 --- a/crates/swc_ecma_loader/src/lib.rs +++ b/crates/swc_ecma_loader/src/lib.rs @@ -78,16 +78,11 @@ pub const NODE_BUILTINS: &[&str] = &[ ]; /// Target runtime environment. -#[derive(Debug, Copy, Clone, Serialize, Deserialize, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, Serialize, Deserialize, Eq, PartialEq, Hash, Default)] pub enum TargetEnv { #[serde(rename = "browser")] + #[default] Browser, #[serde(rename = "node")] Node, } - -impl Default for TargetEnv { - fn default() -> Self { - TargetEnv::Browser - } -} diff --git a/crates/swc_ecma_loader/src/resolve.rs b/crates/swc_ecma_loader/src/resolve.rs index 049baf2f1687..9baa5dce4a02 100644 --- a/crates/swc_ecma_loader/src/resolve.rs +++ b/crates/swc_ecma_loader/src/resolve.rs @@ -2,6 +2,7 @@ use std::sync::Arc; use anyhow::Error; use swc_atoms::Atom; +#[allow(unused_imports)] use swc_common::{ sync::{Send, Sync}, FileName, diff --git a/crates/swc_ecma_minifier/src/compress/mod.rs b/crates/swc_ecma_minifier/src/compress/mod.rs index 01eda3c681f9..834f8d51f067 100644 --- a/crates/swc_ecma_minifier/src/compress/mod.rs +++ b/crates/swc_ecma_minifier/src/compress/mod.rs @@ -1,11 +1,8 @@ #[cfg(feature = "debug")] +use std::fmt::{self, Debug, Display, Formatter}; +#[cfg(feature = "debug")] use std::thread; -use std::{ - borrow::Cow, - fmt, - fmt::{Debug, Display, Formatter, Write}, - time::Instant, -}; +use std::{borrow::Cow, fmt::Write, time::Instant}; #[cfg(feature = "pretty_assertions")] use pretty_assertions::assert_eq; @@ -357,9 +354,11 @@ impl VisitMut for Compressor<'_> { } } +#[cfg(feature = "debug")] #[derive(PartialEq, Eq)] struct DebugUsingDisplay<'a>(pub &'a str); +#[cfg(feature = "debug")] impl<'a> Debug for DebugUsingDisplay<'a> { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { Display::fmt(self.0, f) diff --git a/crates/swc_ecma_minifier/src/compress/optimize/inline.rs b/crates/swc_ecma_minifier/src/compress/optimize/inline.rs index 38a1657e51c2..d2aa38e509a0 100644 --- a/crates/swc_ecma_minifier/src/compress/optimize/inline.rs +++ b/crates/swc_ecma_minifier/src/compress/optimize/inline.rs @@ -797,7 +797,7 @@ impl Optimizer<'_> { report_change!("inline: Inlined array access"); self.changed = true; - me.obj = new.clone(); + me.obj.clone_from(new); // TODO(kdy1): Optimize performance by skipping visiting of children // nodes. e.visit_mut_with(&mut expr_simplifier( diff --git a/crates/swc_ecma_minifier/src/js.rs b/crates/swc_ecma_minifier/src/js.rs index cb49c72fb174..99dabbb1457c 100644 --- a/crates/swc_ecma_minifier/src/js.rs +++ b/crates/swc_ecma_minifier/src/js.rs @@ -202,16 +202,11 @@ fn default_comments() -> BoolOrDataConfig { BoolOrDataConfig::from_obj(JsMinifyCommentOption::PreserveSomeComments) } -#[derive(Debug, Clone, Serialize, Deserialize)] +#[derive(Debug, Clone, Serialize, Deserialize, Default)] pub enum JsMinifyCommentOption { #[serde(rename = "some")] + #[default] PreserveSomeComments, #[serde(rename = "all")] PreserveAllComments, } - -impl Default for JsMinifyCommentOption { - fn default() -> Self { - JsMinifyCommentOption::PreserveSomeComments - } -} diff --git a/crates/swc_ecma_minifier/src/option/terser.rs b/crates/swc_ecma_minifier/src/option/terser.rs index c82fdeb7c2e9..6f9dc513d759 100644 --- a/crates/swc_ecma_minifier/src/option/terser.rs +++ b/crates/swc_ecma_minifier/src/option/terser.rs @@ -25,22 +25,17 @@ impl Default for TerserEcmaVersion { } } -#[derive(Debug, Clone, Serialize, Deserialize)] +#[derive(Debug, Clone, Serialize, Deserialize, Default)] #[serde(deny_unknown_fields)] #[serde(untagged)] pub enum TerserPureGetterOption { Bool(bool), #[serde(rename = "strict")] + #[default] Strict, Str(String), } -impl Default for TerserPureGetterOption { - fn default() -> Self { - TerserPureGetterOption::Strict - } -} - #[derive(Debug, Clone, Copy, Serialize, Deserialize)] #[serde(deny_unknown_fields)] #[serde(untagged)] diff --git a/crates/swc_ecma_minifier/src/pass/mangle_names/mod.rs b/crates/swc_ecma_minifier/src/pass/mangle_names/mod.rs index 3ff75820f86a..3d9057e7aa65 100644 --- a/crates/swc_ecma_minifier/src/pass/mangle_names/mod.rs +++ b/crates/swc_ecma_minifier/src/pass/mangle_names/mod.rs @@ -1,7 +1,7 @@ use rustc_hash::{FxHashMap, FxHashSet}; use swc_atoms::JsWord; use swc_common::{chain, Mark}; -use swc_ecma_ast::{Module, *}; +use swc_ecma_ast::*; use swc_ecma_transforms_base::rename::{renamer, Renamer}; use swc_ecma_visit::{noop_visit_mut_type, VisitMut, VisitMutWith}; diff --git a/crates/swc_ecma_minifier/src/util/mod.rs b/crates/swc_ecma_minifier/src/util/mod.rs index 97bde2117bbb..96702000c4b8 100644 --- a/crates/swc_ecma_minifier/src/util/mod.rs +++ b/crates/swc_ecma_minifier/src/util/mod.rs @@ -1,3 +1,5 @@ +#![allow(dead_code)] + use std::time::Instant; use rustc_hash::FxHashSet; @@ -11,7 +13,6 @@ pub(crate) mod size; pub(crate) mod sort; pub(crate) mod unit; -/// pub(crate) fn make_number(span: Span, value: f64) -> Expr { trace_op!("Creating a numeric literal"); Expr::Lit(Lit::Num(Number { diff --git a/crates/swc_ecma_minifier/src/util/unit.rs b/crates/swc_ecma_minifier/src/util/unit.rs index 107b01ac1f56..5cef338f77a5 100644 --- a/crates/swc_ecma_minifier/src/util/unit.rs +++ b/crates/swc_ecma_minifier/src/util/unit.rs @@ -1,3 +1,5 @@ +#![allow(dead_code)] + use std::fmt::Debug; use swc_common::Mark; diff --git a/crates/swc_ecma_minifier/tests/compress.rs b/crates/swc_ecma_minifier/tests/compress.rs index 1ddc0cdcf8fe..950dd5933fd8 100644 --- a/crates/swc_ecma_minifier/tests/compress.rs +++ b/crates/swc_ecma_minifier/tests/compress.rs @@ -4,7 +4,7 @@ extern crate swc_malloc; use std::{ env, - fmt::{self, Debug}, + fmt::Debug, fs::read_to_string, panic::catch_unwind, path::{Path, PathBuf}, @@ -20,7 +20,7 @@ use swc_common::{ errors::{Handler, HANDLER}, sync::Lrc, util::take::Take, - EqIgnoreSpan, FileName, Mark, SourceMap, Spanned, + EqIgnoreSpan, FileName, Mark, SourceMap, }; use swc_ecma_ast::*; use swc_ecma_codegen::{ @@ -45,7 +45,7 @@ use swc_ecma_transforms_base::{ resolver, }; use swc_ecma_utils::drop_span; -use swc_ecma_visit::{FoldWith, Visit, VisitMut, VisitMutWith, VisitWith}; +use swc_ecma_visit::{FoldWith, VisitMut, VisitMutWith}; use testing::{assert_eq, unignore_fixture, DebugUsingDisplay, NormalizedOutput}; fn load_txt(filename: &str) -> Vec { @@ -669,1031 +669,6 @@ fn print( String::from_utf8(buf).unwrap() } -struct Shower<'a> { - cm: Lrc, - handler: &'a Handler, -} - -impl Shower<'_> { - fn show(&self, name: &str, node: &N) - where - N: Spanned + fmt::Debug + swc_ecma_codegen::Node, - { - let span = node.span(); - - if span.is_dummy() { - let src = print(self.cm.clone(), &[node], false, false); - self.handler - .struct_span_warn(span, &format!("{}: {}", name, src)) - .emit(); - } else { - self.handler.struct_span_warn(span, name).emit(); - } - } - - fn show_name(&self, name: &str, node: &N) - where - N: Spanned + fmt::Debug, - { - let span = node.span(); - - if span.is_dummy() { - self.handler - .struct_span_warn(span, &format!("{:?}", node)) - .emit(); - } else { - self.handler.struct_span_warn(span, name).emit(); - } - } -} - -impl Visit for Shower<'_> { - fn visit_array_lit(&mut self, n: &ArrayLit) { - self.show("ArrayLit", n); - n.visit_children_with(self) - } - - fn visit_array_pat(&mut self, n: &ArrayPat) { - self.show("ArrayPat", n); - n.visit_children_with(self) - } - - fn visit_arrow_expr(&mut self, n: &ArrowExpr) { - self.show("ArrowExpr", n); - n.visit_children_with(self) - } - - fn visit_assign_expr(&mut self, n: &AssignExpr) { - self.show("AssignExpr", n); - n.visit_children_with(self) - } - - fn visit_assign_pat(&mut self, n: &AssignPat) { - self.show("AssignPat", n); - n.visit_children_with(self) - } - - fn visit_assign_pat_prop(&mut self, n: &AssignPatProp) { - self.show("AssignPatProp", n); - n.visit_children_with(self) - } - - fn visit_assign_prop(&mut self, n: &AssignProp) { - self.show("AssignProp", n); - n.visit_children_with(self) - } - - fn visit_await_expr(&mut self, n: &AwaitExpr) { - self.show("AwaitExpr", n); - n.visit_children_with(self) - } - - fn visit_bin_expr(&mut self, n: &BinExpr) { - self.show("BinExpr", n); - n.visit_children_with(self) - } - - fn visit_block_stmt(&mut self, n: &BlockStmt) { - self.show("BlockStmt", n); - n.visit_children_with(self) - } - - fn visit_block_stmt_or_expr(&mut self, n: &BlockStmtOrExpr) { - self.show("BlockStmtOrExpr", n); - n.visit_children_with(self) - } - - fn visit_bool(&mut self, n: &Bool) { - self.show("Bool", n); - n.visit_children_with(self) - } - - fn visit_break_stmt(&mut self, n: &BreakStmt) { - self.show("BreakStmt", n); - n.visit_children_with(self) - } - - fn visit_call_expr(&mut self, n: &CallExpr) { - self.show("CallExpr", n); - n.visit_children_with(self) - } - - fn visit_catch_clause(&mut self, n: &CatchClause) { - self.show("CatchClause", n); - n.visit_children_with(self) - } - - fn visit_class(&mut self, n: &Class) { - self.show("Class", n); - n.visit_children_with(self) - } - - fn visit_class_decl(&mut self, n: &ClassDecl) { - self.show("ClassDecl", n); - n.visit_children_with(self) - } - - fn visit_class_expr(&mut self, n: &ClassExpr) { - self.show("ClassExpr", n); - n.visit_children_with(self) - } - - fn visit_class_member(&mut self, n: &ClassMember) { - self.show("ClassMember", n); - n.visit_children_with(self) - } - - fn visit_class_method(&mut self, n: &ClassMethod) { - self.show("ClassMethod", n); - n.visit_children_with(self) - } - - fn visit_class_prop(&mut self, n: &ClassProp) { - self.show("ClassProp", n); - n.visit_children_with(self) - } - - fn visit_computed_prop_name(&mut self, n: &ComputedPropName) { - self.show("ComputedPropName", n); - n.visit_children_with(self) - } - - fn visit_cond_expr(&mut self, n: &CondExpr) { - self.show("CondExpr", n); - n.visit_children_with(self) - } - - fn visit_constructor(&mut self, n: &Constructor) { - self.show("Constructor", n); - n.visit_children_with(self) - } - - fn visit_continue_stmt(&mut self, n: &ContinueStmt) { - self.show("ContinueStmt", n); - n.visit_children_with(self) - } - - fn visit_debugger_stmt(&mut self, n: &DebuggerStmt) { - self.show("DebuggerStmt", n); - n.visit_children_with(self) - } - - fn visit_decl(&mut self, n: &Decl) { - self.show("Decl", n); - n.visit_children_with(self) - } - - fn visit_decorator(&mut self, n: &Decorator) { - self.show("Decorator", n); - n.visit_children_with(self) - } - - fn visit_default_decl(&mut self, n: &DefaultDecl) { - self.show_name("DefaultDecl", n); - n.visit_children_with(self) - } - - fn visit_do_while_stmt(&mut self, n: &DoWhileStmt) { - self.show("DoWhileStmt", n); - n.visit_children_with(self) - } - - fn visit_empty_stmt(&mut self, n: &EmptyStmt) { - self.show("EmptyStmt", n); - n.visit_children_with(self) - } - - fn visit_export_all(&mut self, n: &ExportAll) { - self.show("ExportAll", n); - n.visit_children_with(self) - } - - fn visit_export_decl(&mut self, n: &ExportDecl) { - self.show("ExportDecl", n); - n.visit_children_with(self) - } - - fn visit_export_default_decl(&mut self, n: &ExportDefaultDecl) { - self.show("ExportDefaultDecl", n); - n.visit_children_with(self) - } - - fn visit_export_default_expr(&mut self, n: &ExportDefaultExpr) { - self.show("ExportDefaultExpr", n); - n.visit_children_with(self) - } - - fn visit_export_default_specifier(&mut self, n: &ExportDefaultSpecifier) { - self.show_name("ExportDefaultSpecifier", n); - n.visit_children_with(self) - } - - fn visit_export_named_specifier(&mut self, n: &ExportNamedSpecifier) { - self.show("ExportNamedSpecifier", n); - n.visit_children_with(self) - } - - fn visit_export_namespace_specifier(&mut self, n: &ExportNamespaceSpecifier) { - self.show("ExportNamespaceSpecifier", n); - n.visit_children_with(self) - } - - fn visit_export_specifier(&mut self, n: &ExportSpecifier) { - self.show("ExportSpecifier", n); - n.visit_children_with(self) - } - - fn visit_expr(&mut self, n: &Expr) { - self.show("Expr", n); - n.visit_children_with(self) - } - - fn visit_expr_or_spread(&mut self, n: &ExprOrSpread) { - self.show("ExprOrSpread", n); - n.visit_children_with(self) - } - - fn visit_callee(&mut self, n: &Callee) { - self.show("Callee", n); - n.visit_children_with(self) - } - - fn visit_fn_decl(&mut self, n: &FnDecl) { - self.show("FnDecl", n); - n.visit_children_with(self) - } - - fn visit_fn_expr(&mut self, n: &FnExpr) { - self.show("FnExpr", n); - n.visit_children_with(self) - } - - fn visit_for_in_stmt(&mut self, n: &ForInStmt) { - self.show("ForInStmt", n); - n.visit_children_with(self) - } - - fn visit_for_of_stmt(&mut self, n: &ForOfStmt) { - self.show("ForOfStmt", n); - n.visit_children_with(self) - } - - fn visit_for_stmt(&mut self, n: &ForStmt) { - self.show("ForStmt", n); - n.visit_children_with(self) - } - - fn visit_function(&mut self, n: &Function) { - self.show("Function", n); - n.visit_children_with(self) - } - - fn visit_getter_prop(&mut self, n: &GetterProp) { - self.show("GetterProp", n); - n.visit_children_with(self) - } - - fn visit_ident(&mut self, n: &Ident) { - self.show("Ident", n); - n.visit_children_with(self) - } - - fn visit_if_stmt(&mut self, n: &IfStmt) { - self.show("IfStmt", n); - n.visit_children_with(self) - } - - fn visit_import_decl(&mut self, n: &ImportDecl) { - self.show("ImportDecl", n); - n.visit_children_with(self) - } - - fn visit_import_default_specifier(&mut self, n: &ImportDefaultSpecifier) { - self.show_name("ImportDefaultSpecifier", n); - n.visit_children_with(self) - } - - fn visit_import_named_specifier(&mut self, n: &ImportNamedSpecifier) { - self.show("ImportNamedSpecifier", n); - n.visit_children_with(self) - } - - fn visit_import_specifier(&mut self, n: &ImportSpecifier) { - self.show_name("ImportSpecifier", n); - n.visit_children_with(self) - } - - fn visit_import_star_as_specifier(&mut self, n: &ImportStarAsSpecifier) { - self.show_name("ImportStarAsSpecifier", n); - n.visit_children_with(self) - } - - fn visit_invalid(&mut self, n: &Invalid) { - self.show("Invalid", n); - n.visit_children_with(self) - } - - fn visit_jsx_attr(&mut self, n: &JSXAttr) { - self.show("JSXAttr", n); - n.visit_children_with(self) - } - - fn visit_jsx_attr_name(&mut self, n: &JSXAttrName) { - self.show("JSXAttrName", n); - n.visit_children_with(self) - } - - fn visit_jsx_attr_or_spread(&mut self, n: &JSXAttrOrSpread) { - self.show("JSXAttrOrSpread", n); - n.visit_children_with(self) - } - - fn visit_jsx_attr_value(&mut self, n: &JSXAttrValue) { - self.show("JSXAttrValue", n); - n.visit_children_with(self) - } - - fn visit_jsx_closing_element(&mut self, n: &JSXClosingElement) { - self.show("JSXClosingElement", n); - n.visit_children_with(self) - } - - fn visit_jsx_closing_fragment(&mut self, n: &JSXClosingFragment) { - self.show("JSXClosingFragment", n); - n.visit_children_with(self) - } - - fn visit_jsx_element(&mut self, n: &JSXElement) { - self.show("JSXElement", n); - n.visit_children_with(self) - } - - fn visit_jsx_element_child(&mut self, n: &JSXElementChild) { - self.show("JSXElementChild", n); - n.visit_children_with(self) - } - - fn visit_jsx_element_name(&mut self, n: &JSXElementName) { - self.show("JSXElementName", n); - n.visit_children_with(self) - } - - fn visit_jsx_empty_expr(&mut self, n: &JSXEmptyExpr) { - self.show("JSXEmptyExpr", n); - n.visit_children_with(self) - } - - fn visit_jsx_expr(&mut self, n: &JSXExpr) { - self.show("JSXExpr", n); - n.visit_children_with(self) - } - - fn visit_jsx_expr_container(&mut self, n: &JSXExprContainer) { - self.show("JSXExprContainer", n); - n.visit_children_with(self) - } - - fn visit_jsx_fragment(&mut self, n: &JSXFragment) { - self.show("JSXFragment", n); - n.visit_children_with(self) - } - - fn visit_jsx_member_expr(&mut self, n: &JSXMemberExpr) { - self.show("JSXMemberExpr", n); - n.visit_children_with(self) - } - - fn visit_jsx_namespaced_name(&mut self, n: &JSXNamespacedName) { - self.show("JSXNamespacedName", n); - n.visit_children_with(self) - } - - fn visit_jsx_object(&mut self, n: &JSXObject) { - self.show("JSXObject", n); - n.visit_children_with(self) - } - - fn visit_jsx_opening_element(&mut self, n: &JSXOpeningElement) { - self.show("JSXOpeningElement", n); - n.visit_children_with(self) - } - - fn visit_jsx_opening_fragment(&mut self, n: &JSXOpeningFragment) { - self.show("JSXOpeningFragment", n); - n.visit_children_with(self) - } - - fn visit_jsx_spread_child(&mut self, n: &JSXSpreadChild) { - self.show("JSXSpreadChild", n); - n.visit_children_with(self) - } - - fn visit_jsx_text(&mut self, n: &JSXText) { - self.show("JSXText", n); - n.visit_children_with(self) - } - - fn visit_key_value_pat_prop(&mut self, n: &KeyValuePatProp) { - self.show("KeyValuePatProp", n); - n.visit_children_with(self) - } - - fn visit_key_value_prop(&mut self, n: &KeyValueProp) { - self.show("KeyValueProp", n); - n.visit_children_with(self) - } - - fn visit_labeled_stmt(&mut self, n: &LabeledStmt) { - self.show("LabeledStmt", n); - n.visit_children_with(self) - } - - fn visit_lit(&mut self, n: &Lit) { - self.show("Lit", n); - n.visit_children_with(self) - } - - fn visit_member_expr(&mut self, n: &MemberExpr) { - self.show("MemberExpr", n); - n.visit_children_with(self) - } - - fn visit_super_prop_expr(&mut self, n: &SuperPropExpr) { - self.show("SuperPropExpr", n); - n.visit_children_with(self) - } - - fn visit_meta_prop_expr(&mut self, n: &MetaPropExpr) { - self.show("MetaPropExpr", n); - n.visit_children_with(self) - } - - fn visit_method_prop(&mut self, n: &MethodProp) { - self.show("MethodProp", n); - n.visit_children_with(self) - } - - fn visit_module(&mut self, n: &Module) { - self.show("Module", n); - n.visit_children_with(self) - } - - fn visit_module_decl(&mut self, n: &ModuleDecl) { - self.show("ModuleDecl", n); - n.visit_children_with(self) - } - - fn visit_named_export(&mut self, n: &NamedExport) { - self.show("NamedExport", n); - n.visit_children_with(self) - } - - fn visit_new_expr(&mut self, n: &NewExpr) { - self.show("NewExpr", n); - n.visit_children_with(self) - } - - fn visit_null(&mut self, n: &Null) { - self.show_name("Null", n); - n.visit_children_with(self) - } - - fn visit_number(&mut self, n: &Number) { - self.show("Number", n); - n.visit_children_with(self) - } - - fn visit_object_lit(&mut self, n: &ObjectLit) { - self.show("ObjectLit", n); - n.visit_children_with(self) - } - - fn visit_object_pat(&mut self, n: &ObjectPat) { - self.show("ObjectPat", n); - n.visit_children_with(self) - } - - fn visit_object_pat_prop(&mut self, n: &ObjectPatProp) { - self.show("ObjectPatProp", n); - n.visit_children_with(self) - } - - fn visit_opt_chain_expr(&mut self, n: &OptChainExpr) { - self.show("OptChainExpr", n); - n.visit_children_with(self) - } - - fn visit_param(&mut self, n: &Param) { - self.show("Param", n); - n.visit_children_with(self) - } - - fn visit_param_or_ts_param_prop(&mut self, n: &ParamOrTsParamProp) { - self.show("ParamOrTsParamProp", n); - n.visit_children_with(self) - } - - fn visit_paren_expr(&mut self, n: &ParenExpr) { - self.show("ParenExpr", n); - n.visit_children_with(self) - } - - fn visit_pat(&mut self, n: &Pat) { - self.show("Pat", n); - n.visit_children_with(self) - } - - fn visit_private_method(&mut self, n: &PrivateMethod) { - self.show("PrivateMethod", n); - n.visit_children_with(self) - } - - fn visit_private_name(&mut self, n: &PrivateName) { - self.show("PrivateName", n); - n.visit_children_with(self) - } - - fn visit_private_prop(&mut self, n: &PrivateProp) { - self.show("PrivateProp", n); - n.visit_children_with(self) - } - - fn visit_program(&mut self, n: &Program) { - self.show("Program", n); - n.visit_children_with(self) - } - - fn visit_prop(&mut self, n: &Prop) { - self.show("Prop", n); - n.visit_children_with(self) - } - - fn visit_prop_name(&mut self, n: &PropName) { - self.show("PropName", n); - n.visit_children_with(self) - } - - fn visit_prop_or_spread(&mut self, n: &PropOrSpread) { - self.show("PropOrSpread", n); - n.visit_children_with(self) - } - - fn visit_regex(&mut self, n: &Regex) { - self.show_name("Regex", n); - n.visit_children_with(self) - } - - fn visit_rest_pat(&mut self, n: &RestPat) { - self.show("RestPat", n); - n.visit_children_with(self) - } - - fn visit_return_stmt(&mut self, n: &ReturnStmt) { - self.show("ReturnStmt", n); - n.visit_children_with(self) - } - - fn visit_script(&mut self, n: &Script) { - self.show("Script", n); - n.visit_children_with(self) - } - - fn visit_seq_expr(&mut self, n: &SeqExpr) { - self.show("SeqExpr", n); - n.visit_children_with(self) - } - - fn visit_setter_prop(&mut self, n: &SetterProp) { - self.show("SetterProp", n); - n.visit_children_with(self) - } - - fn visit_spread_element(&mut self, n: &SpreadElement) { - self.show("SpreadElement", n); - n.visit_children_with(self) - } - - fn visit_str(&mut self, n: &Str) { - self.show("Str", n); - n.visit_children_with(self) - } - - fn visit_super(&mut self, n: &Super) { - self.show("Super", n); - n.visit_children_with(self) - } - - fn visit_switch_case(&mut self, n: &SwitchCase) { - self.show("SwitchCase", n); - n.visit_children_with(self) - } - - fn visit_switch_stmt(&mut self, n: &SwitchStmt) { - self.show("SwitchStmt", n); - n.visit_children_with(self) - } - - fn visit_tagged_tpl(&mut self, n: &TaggedTpl) { - self.show("TaggedTpl", n); - n.visit_children_with(self) - } - - fn visit_this_expr(&mut self, n: &ThisExpr) { - self.show("ThisExpr", n); - n.visit_children_with(self) - } - - fn visit_throw_stmt(&mut self, n: &ThrowStmt) { - self.show("ThrowStmt", n); - n.visit_children_with(self) - } - - fn visit_tpl(&mut self, n: &Tpl) { - self.show("Tpl", n); - n.visit_children_with(self) - } - - fn visit_tpl_element(&mut self, n: &TplElement) { - self.show("TplElement", n); - n.visit_children_with(self) - } - - fn visit_try_stmt(&mut self, n: &TryStmt) { - self.show("TryStmt", n); - n.visit_children_with(self) - } - - fn visit_ts_array_type(&mut self, n: &TsArrayType) { - self.show("TsArrayType", n); - n.visit_children_with(self) - } - - fn visit_ts_as_expr(&mut self, n: &TsAsExpr) { - self.show("TsAsExpr", n); - n.visit_children_with(self) - } - - fn visit_ts_call_signature_decl(&mut self, n: &TsCallSignatureDecl) { - self.show("TsCallSignatureDecl", n); - n.visit_children_with(self) - } - - fn visit_ts_conditional_type(&mut self, n: &TsConditionalType) { - self.show("TsConditionalType", n); - n.visit_children_with(self) - } - - fn visit_ts_const_assertion(&mut self, n: &TsConstAssertion) { - self.show("TsConstAssertion", n); - n.visit_children_with(self) - } - - fn visit_ts_construct_signature_decl(&mut self, n: &TsConstructSignatureDecl) { - self.show("TsConstructSignatureDecl", n); - n.visit_children_with(self) - } - - fn visit_ts_constructor_type(&mut self, n: &TsConstructorType) { - self.show("TsConstructorType", n); - n.visit_children_with(self) - } - - fn visit_ts_entity_name(&mut self, n: &TsEntityName) { - self.show("TsEntityName", n); - n.visit_children_with(self) - } - - fn visit_ts_enum_decl(&mut self, n: &TsEnumDecl) { - self.show("TsEnumDecl", n); - n.visit_children_with(self) - } - - fn visit_ts_enum_member(&mut self, n: &TsEnumMember) { - self.show("TsEnumMember", n); - n.visit_children_with(self) - } - - fn visit_ts_enum_member_id(&mut self, n: &TsEnumMemberId) { - self.show("TsEnumMemberId", n); - n.visit_children_with(self) - } - - fn visit_ts_export_assignment(&mut self, n: &TsExportAssignment) { - self.show("TsExportAssignment", n); - n.visit_children_with(self) - } - - fn visit_ts_expr_with_type_args(&mut self, n: &TsExprWithTypeArgs) { - self.show("TsExprWithTypeArgs", n); - n.visit_children_with(self) - } - - fn visit_ts_external_module_ref(&mut self, n: &TsExternalModuleRef) { - self.show("TsExternalModuleRef", n); - n.visit_children_with(self) - } - - fn visit_ts_fn_or_constructor_type(&mut self, n: &TsFnOrConstructorType) { - self.show("TsFnOrConstructorType", n); - n.visit_children_with(self) - } - - fn visit_ts_fn_param(&mut self, n: &TsFnParam) { - self.show("TsFnParam", n); - n.visit_children_with(self) - } - - fn visit_ts_fn_type(&mut self, n: &TsFnType) { - self.show("TsFnType", n); - n.visit_children_with(self) - } - - fn visit_ts_import_equals_decl(&mut self, n: &TsImportEqualsDecl) { - self.show("TsImportEqualsDecl", n); - n.visit_children_with(self) - } - - fn visit_ts_import_type(&mut self, n: &TsImportType) { - self.show("TsImportType", n); - n.visit_children_with(self) - } - - fn visit_ts_index_signature(&mut self, n: &TsIndexSignature) { - self.show("TsIndexSignature", n); - n.visit_children_with(self) - } - - fn visit_ts_indexed_access_type(&mut self, n: &TsIndexedAccessType) { - self.show("TsIndexedAccessType", n); - n.visit_children_with(self) - } - - fn visit_ts_infer_type(&mut self, n: &TsInferType) { - self.show("TsInferType", n); - n.visit_children_with(self) - } - - fn visit_ts_interface_body(&mut self, n: &TsInterfaceBody) { - self.show("TsInterfaceBody", n); - n.visit_children_with(self) - } - - fn visit_ts_interface_decl(&mut self, n: &TsInterfaceDecl) { - self.show("TsInterfaceDecl", n); - n.visit_children_with(self) - } - - fn visit_ts_intersection_type(&mut self, n: &TsIntersectionType) { - self.show("TsIntersectionType", n); - n.visit_children_with(self) - } - - fn visit_ts_keyword_type(&mut self, n: &TsKeywordType) { - self.show("TsKeywordType", n); - n.visit_children_with(self) - } - - fn visit_ts_lit(&mut self, n: &TsLit) { - self.show("TsLit", n); - n.visit_children_with(self) - } - - fn visit_ts_lit_type(&mut self, n: &TsLitType) { - self.show("TsLitType", n); - n.visit_children_with(self) - } - - fn visit_ts_mapped_type(&mut self, n: &TsMappedType) { - self.show("TsMappedType", n); - n.visit_children_with(self) - } - - fn visit_ts_method_signature(&mut self, n: &TsMethodSignature) { - self.show("TsMethodSignature", n); - n.visit_children_with(self) - } - - fn visit_ts_module_block(&mut self, n: &TsModuleBlock) { - self.show("TsModuleBlock", n); - n.visit_children_with(self) - } - - fn visit_ts_module_decl(&mut self, n: &TsModuleDecl) { - self.show("TsModuleDecl", n); - n.visit_children_with(self) - } - - fn visit_ts_module_name(&mut self, n: &TsModuleName) { - self.show("TsModuleName", n); - n.visit_children_with(self) - } - - fn visit_ts_module_ref(&mut self, n: &TsModuleRef) { - self.show("TsModuleRef", n); - n.visit_children_with(self) - } - - fn visit_ts_namespace_body(&mut self, n: &TsNamespaceBody) { - self.show("TsNamespaceBody", n); - n.visit_children_with(self) - } - - fn visit_ts_namespace_decl(&mut self, n: &TsNamespaceDecl) { - self.show("TsNamespaceDecl", n); - n.visit_children_with(self) - } - - fn visit_ts_namespace_export_decl(&mut self, n: &TsNamespaceExportDecl) { - self.show("TsNamespaceExportDecl", n); - n.visit_children_with(self) - } - - fn visit_ts_non_null_expr(&mut self, n: &TsNonNullExpr) { - self.show("TsNonNullExpr", n); - n.visit_children_with(self) - } - - fn visit_ts_optional_type(&mut self, n: &TsOptionalType) { - self.show("TsOptionalType", n); - n.visit_children_with(self) - } - - fn visit_ts_param_prop(&mut self, n: &TsParamProp) { - self.show("TsParamProp", n); - n.visit_children_with(self) - } - - fn visit_ts_param_prop_param(&mut self, n: &TsParamPropParam) { - self.show("TsParamPropParam", n); - n.visit_children_with(self) - } - - fn visit_ts_parenthesized_type(&mut self, n: &TsParenthesizedType) { - self.show("TsParenthesizedType", n); - n.visit_children_with(self) - } - - fn visit_ts_property_signature(&mut self, n: &TsPropertySignature) { - self.show("TsPropertySignature", n); - n.visit_children_with(self) - } - - fn visit_ts_qualified_name(&mut self, n: &TsQualifiedName) { - self.show("TsQualifiedName", n); - n.visit_children_with(self) - } - - fn visit_ts_rest_type(&mut self, n: &TsRestType) { - self.show("TsRestType", n); - n.visit_children_with(self) - } - - fn visit_ts_this_type(&mut self, n: &TsThisType) { - self.show("TsThisType", n); - n.visit_children_with(self) - } - - fn visit_ts_this_type_or_ident(&mut self, n: &TsThisTypeOrIdent) { - self.show("TsThisTypeOrIdent", n); - n.visit_children_with(self) - } - - fn visit_ts_tuple_element(&mut self, n: &TsTupleElement) { - self.show("TsTupleElement", n); - n.visit_children_with(self) - } - - fn visit_ts_tuple_type(&mut self, n: &TsTupleType) { - self.show("TsTupleType", n); - n.visit_children_with(self) - } - - fn visit_ts_type(&mut self, n: &TsType) { - self.show("TsType", n); - n.visit_children_with(self) - } - - fn visit_ts_type_alias_decl(&mut self, n: &TsTypeAliasDecl) { - self.show("TsTypeAliasDecl", n); - n.visit_children_with(self) - } - - fn visit_ts_type_ann(&mut self, n: &TsTypeAnn) { - self.show("TsTypeAnn", n); - n.visit_children_with(self) - } - - fn visit_ts_type_assertion(&mut self, n: &TsTypeAssertion) { - self.show("TsTypeAssertion", n); - n.visit_children_with(self) - } - - fn visit_ts_type_element(&mut self, n: &TsTypeElement) { - self.show("TsTypeElement", n); - n.visit_children_with(self) - } - - fn visit_ts_type_lit(&mut self, n: &TsTypeLit) { - self.show("TsTypeLit", n); - n.visit_children_with(self) - } - - fn visit_ts_type_operator(&mut self, n: &TsTypeOperator) { - self.show("TsTypeOperator", n); - n.visit_children_with(self) - } - - fn visit_ts_type_param(&mut self, n: &TsTypeParam) { - self.show("TsTypeParam", n); - n.visit_children_with(self) - } - - fn visit_ts_type_param_decl(&mut self, n: &TsTypeParamDecl) { - self.show("TsTypeParamDecl", n); - n.visit_children_with(self) - } - - fn visit_ts_type_param_instantiation(&mut self, n: &TsTypeParamInstantiation) { - self.show("TsTypeParamInstantiation", n); - n.visit_children_with(self) - } - - fn visit_ts_type_predicate(&mut self, n: &TsTypePredicate) { - self.show("TsTypePredicate", n); - n.visit_children_with(self) - } - - fn visit_ts_type_query(&mut self, n: &TsTypeQuery) { - self.show("TsTypeQuery", n); - n.visit_children_with(self) - } - - fn visit_ts_type_query_expr(&mut self, n: &TsTypeQueryExpr) { - self.show("TsTypeQueryExpr", n); - n.visit_children_with(self) - } - - fn visit_ts_type_ref(&mut self, n: &TsTypeRef) { - self.show("TsTypeRef", n); - n.visit_children_with(self) - } - - fn visit_ts_union_or_intersection_type(&mut self, n: &TsUnionOrIntersectionType) { - self.show("TsUnionOrIntersectionType", n); - n.visit_children_with(self) - } - - fn visit_ts_union_type(&mut self, n: &TsUnionType) { - self.show("TsUnionType", n); - n.visit_children_with(self) - } - - fn visit_unary_expr(&mut self, n: &UnaryExpr) { - self.show("UnaryExpr", n); - n.visit_children_with(self) - } - - fn visit_update_expr(&mut self, n: &UpdateExpr) { - self.show("UpdateExpr", n); - n.visit_children_with(self) - } - - fn visit_var_decl(&mut self, n: &VarDecl) { - self.show("VarDecl", n); - n.visit_children_with(self) - } - - fn visit_var_decl_or_expr(&mut self, n: &VarDeclOrExpr) { - self.show("VarDeclOrExpr", n); - n.visit_children_with(self) - } - - fn visit_for_head(&mut self, n: &ForHead) { - self.show("ForHead", n); - n.visit_children_with(self) - } - - fn visit_var_declarator(&mut self, n: &VarDeclarator) { - self.show("VarDeclarator", n); - n.visit_children_with(self) - } - - fn visit_while_stmt(&mut self, n: &WhileStmt) { - self.show("WhileStmt", n); - n.visit_children_with(self) - } - - fn visit_with_stmt(&mut self, n: &WithStmt) { - self.show("WithStmt", n); - n.visit_children_with(self) - } - - fn visit_yield_expr(&mut self, n: &YieldExpr) { - self.show("YieldExpr", n); - n.visit_children_with(self) - } -} - #[testing::fixture("tests/full/**/input.js")] fn full(input: PathBuf) { let dir = input.parent().unwrap(); diff --git a/crates/swc_ecma_parser/examples/lexer.rs b/crates/swc_ecma_parser/examples/lexer.rs index 8c1f90796d62..1726d7861429 100644 --- a/crates/swc_ecma_parser/examples/lexer.rs +++ b/crates/swc_ecma_parser/examples/lexer.rs @@ -1,5 +1,4 @@ use swc_common::{ - self, errors::{ColorConfig, Handler}, sync::Lrc, FileName, SourceMap, diff --git a/crates/swc_ecma_parser/examples/perf.rs b/crates/swc_ecma_parser/examples/perf.rs index 5930039f72d8..556cda00c588 100644 --- a/crates/swc_ecma_parser/examples/perf.rs +++ b/crates/swc_ecma_parser/examples/perf.rs @@ -3,7 +3,7 @@ extern crate swc_malloc; use std::{collections::hash_map::DefaultHasher, hash::Hash}; use criterion::black_box; -use swc_common::{self, sync::Lrc, SourceMap}; +use swc_common::{sync::Lrc, SourceMap}; use swc_ecma_parser::{lexer::Lexer, Parser, StringInput, Syntax, TsConfig}; fn main() { diff --git a/crates/swc_ecma_parser/examples/typescript.rs b/crates/swc_ecma_parser/examples/typescript.rs index ad9c1e618997..781861ddcd13 100644 --- a/crates/swc_ecma_parser/examples/typescript.rs +++ b/crates/swc_ecma_parser/examples/typescript.rs @@ -1,5 +1,4 @@ use swc_common::{ - self, errors::{ColorConfig, Handler}, sync::Lrc, FileName, SourceMap, diff --git a/crates/swc_ecma_parser/src/parser/class_and_fn.rs b/crates/swc_ecma_parser/src/parser/class_and_fn.rs index c9d6161e3031..dd016afc2e08 100644 --- a/crates/swc_ecma_parser/src/parser/class_and_fn.rs +++ b/crates/swc_ecma_parser/src/parser/class_and_fn.rs @@ -1755,8 +1755,8 @@ struct MakeMethodArgs { } #[cfg(test)] +#[allow(unused)] mod tests { - #![allow(unused)] use swc_common::DUMMY_SP as span; use swc_ecma_visit::assert_eq_ignore_span; diff --git a/crates/swc_ecma_parser/src/parser/expr/tests.rs b/crates/swc_ecma_parser/src/parser/expr/tests.rs index b41aa9d136be..afa964e2dcf5 100644 --- a/crates/swc_ecma_parser/src/parser/expr/tests.rs +++ b/crates/swc_ecma_parser/src/parser/expr/tests.rs @@ -1,10 +1,7 @@ -extern crate test; - use std::hint::black_box; use swc_common::{FileName, SourceMap, DUMMY_SP as span}; use swc_ecma_visit::assert_eq_ignore_span; -use test::Bencher; use super::*; use crate::{parse_file_as_expr, EsConfig}; diff --git a/crates/swc_ecma_parser/src/parser/expr/verifier.rs b/crates/swc_ecma_parser/src/parser/expr/verifier.rs index 8e1907e7fc98..c38f41aee6fd 100644 --- a/crates/swc_ecma_parser/src/parser/expr/verifier.rs +++ b/crates/swc_ecma_parser/src/parser/expr/verifier.rs @@ -1,6 +1,4 @@ #[cfg(feature = "verify")] -use swc_common::{Span, Spanned}; -#[cfg(feature = "verify")] use swc_ecma_visit::{noop_visit_type, Visit, VisitWith}; use super::*; @@ -16,7 +14,7 @@ impl Parser { self.emit_err(span, error); } - return Ok(expr); + Ok(expr) } #[cfg(not(feature = "verify"))] diff --git a/crates/swc_ecma_parser/src/parser/jsx/tests.rs b/crates/swc_ecma_parser/src/parser/jsx/tests.rs index 092c84e70bb5..1e59e3a89126 100644 --- a/crates/swc_ecma_parser/src/parser/jsx/tests.rs +++ b/crates/swc_ecma_parser/src/parser/jsx/tests.rs @@ -2,7 +2,6 @@ use swc_common::DUMMY_SP as span; use swc_ecma_visit::assert_eq_ignore_span; use super::*; -use crate::parser::test_parser; fn jsx(src: &'static str) -> Box { test_parser( diff --git a/crates/swc_ecma_parser/src/parser/pat.rs b/crates/swc_ecma_parser/src/parser/pat.rs index 0878402b983a..0f351add6c52 100644 --- a/crates/swc_ecma_parser/src/parser/pat.rs +++ b/crates/swc_ecma_parser/src/parser/pat.rs @@ -470,7 +470,6 @@ impl Parser { } } -/// #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum PatType { BindingPat, diff --git a/crates/swc_ecma_parser/src/parser/tests.rs b/crates/swc_ecma_parser/src/parser/tests.rs index 312804a4d68e..d1d554c47aa9 100644 --- a/crates/swc_ecma_parser/src/parser/tests.rs +++ b/crates/swc_ecma_parser/src/parser/tests.rs @@ -1,7 +1,7 @@ -use swc_common::{comments::SingleThreadedComments, BytePos}; +use swc_common::comments::SingleThreadedComments; use super::*; -use crate::{test_parser, EsConfig, TsConfig}; +use crate::EsConfig; fn program(src: &'static str) -> Program { test_parser(src, Default::default(), |p| p.parse_program()) diff --git a/crates/swc_ecma_parser/src/parser/typescript.rs b/crates/swc_ecma_parser/src/parser/typescript.rs index c47091fa0d60..dc960d7c38be 100644 --- a/crates/swc_ecma_parser/src/parser/typescript.rs +++ b/crates/swc_ecma_parser/src/parser/typescript.rs @@ -2828,7 +2828,7 @@ mod tests { use swc_ecma_ast::*; use swc_ecma_visit::assert_eq_ignore_span; - use crate::{lexer::Lexer, test_parser, token::*, Capturing, EsVersion, Parser, Syntax}; + use crate::{lexer::Lexer, test_parser, token::*, Capturing, Parser, Syntax}; #[test] fn issue_708_1() { diff --git a/crates/swc_ecma_parser/src/token.rs b/crates/swc_ecma_parser/src/token.rs index 5a23967f9a8a..22f359d749c6 100644 --- a/crates/swc_ecma_parser/src/token.rs +++ b/crates/swc_ecma_parser/src/token.rs @@ -259,9 +259,7 @@ pub enum Token { }, /// ':' Colon, - /// BinOp(BinOpToken), - /// AssignOp(AssignOp), /// '${' diff --git a/crates/swc_ecma_transforms_base/src/fixer.rs b/crates/swc_ecma_transforms_base/src/fixer.rs index 3b2c26f48285..bbdd662a8c88 100644 --- a/crates/swc_ecma_transforms_base/src/fixer.rs +++ b/crates/swc_ecma_transforms_base/src/fixer.rs @@ -3,7 +3,7 @@ use std::{hash::BuildHasherDefault, mem, ops::RangeFull}; use indexmap::IndexMap; use rustc_hash::FxHasher; use swc_common::{comments::Comments, util::take::Take, Span, Spanned, DUMMY_SP}; -use swc_ecma_ast::{AssignTarget, *}; +use swc_ecma_ast::*; use swc_ecma_visit::{as_folder, noop_visit_mut_type, Fold, VisitMut, VisitMutWith}; /// Fixes ast nodes before printing so semantics are preserved. @@ -50,8 +50,9 @@ struct Fixer<'a> { } #[repr(u8)] -#[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] enum Context { + #[default] Default, Callee { @@ -69,12 +70,6 @@ enum Context { FreeExpr, } -impl Default for Context { - fn default() -> Self { - Context::Default - } -} - macro_rules! array { ($name:ident, $T:tt) => { fn $name(&mut self, e: &mut $T) { diff --git a/crates/swc_ecma_transforms_base/src/helpers/mod.rs b/crates/swc_ecma_transforms_base/src/helpers/mod.rs index 691fddef79ce..c313faa912f3 100644 --- a/crates/swc_ecma_transforms_base/src/helpers/mod.rs +++ b/crates/swc_ecma_transforms_base/src/helpers/mod.rs @@ -602,7 +602,7 @@ impl VisitMut for Marker { #[cfg(test)] mod tests { - use swc_ecma_visit::{as_folder, FoldWith}; + use swc_ecma_visit::FoldWith; use testing::DebugUsingDisplay; use super::*; diff --git a/crates/swc_ecma_transforms_base/src/hygiene/tests.rs b/crates/swc_ecma_transforms_base/src/hygiene/tests.rs index 2ad396b46de4..e921ee34e7b0 100644 --- a/crates/swc_ecma_transforms_base/src/hygiene/tests.rs +++ b/crates/swc_ecma_transforms_base/src/hygiene/tests.rs @@ -2,7 +2,7 @@ use swc_atoms::JsWord; use swc_common::{collections::AHashMap, hygiene::*, DUMMY_SP}; use swc_ecma_parser::Syntax; use swc_ecma_utils::quote_ident; -use swc_ecma_visit::{Fold, FoldWith}; +use swc_ecma_visit::FoldWith; use testing::{assert_eq, DebugUsingDisplay}; use super::*; diff --git a/crates/swc_ecma_transforms_base/src/rename/mod.rs b/crates/swc_ecma_transforms_base/src/rename/mod.rs index d9b484f131b7..858397584314 100644 --- a/crates/swc_ecma_transforms_base/src/rename/mod.rs +++ b/crates/swc_ecma_transforms_base/src/rename/mod.rs @@ -1,3 +1,5 @@ +#![allow(unused_imports)] + use std::borrow::Cow; use rustc_hash::FxHashSet; diff --git a/crates/swc_ecma_transforms_base/src/resolver/tests.rs b/crates/swc_ecma_transforms_base/src/resolver/tests.rs index 14a3b8ac573d..69a2c633adc9 100644 --- a/crates/swc_ecma_transforms_base/src/resolver/tests.rs +++ b/crates/swc_ecma_transforms_base/src/resolver/tests.rs @@ -1,7 +1,6 @@ use swc_ecma_parser::Syntax; -use swc_ecma_visit::Fold; -use super::{InnerConfig, *}; +use super::*; use crate::hygiene::Config; // struct TsHygiene { diff --git a/crates/swc_ecma_transforms_base/src/scope.rs b/crates/swc_ecma_transforms_base/src/scope.rs index 89454e60b942..0e8ea17fe0a0 100644 --- a/crates/swc_ecma_transforms_base/src/scope.rs +++ b/crates/swc_ecma_transforms_base/src/scope.rs @@ -1,17 +1,12 @@ use swc_ecma_ast::VarDeclKind; -#[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] pub enum ScopeKind { Block, + #[default] Fn, } -impl Default for ScopeKind { - fn default() -> Self { - ScopeKind::Fn - } -} - #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum IdentType { Binding, diff --git a/crates/swc_ecma_transforms_base/tests/fixer_test262.rs b/crates/swc_ecma_transforms_base/tests/fixer_test262.rs index 40615f6205f6..8ba6eba1d57e 100644 --- a/crates/swc_ecma_transforms_base/tests/fixer_test262.rs +++ b/crates/swc_ecma_transforms_base/tests/fixer_test262.rs @@ -10,7 +10,7 @@ use std::{ }; use swc_ecma_ast::*; -use swc_ecma_codegen::{self, Emitter}; +use swc_ecma_codegen::Emitter; use swc_ecma_parser::{lexer::Lexer, Parser, Syntax}; use swc_ecma_transforms_base::fixer::fixer; use swc_ecma_utils::DropSpan; diff --git a/crates/swc_ecma_transforms_optimization/src/const_modules.rs b/crates/swc_ecma_transforms_optimization/src/const_modules.rs index 5de11ae8d844..a6b39e95237a 100644 --- a/crates/swc_ecma_transforms_optimization/src/const_modules.rs +++ b/crates/swc_ecma_transforms_optimization/src/const_modules.rs @@ -162,7 +162,7 @@ impl VisitMut for ConstModules { return; } - if self.scope.namespace.get(&id.to_id()).is_some() { + if self.scope.namespace.contains(&id.to_id()) { panic!( "The const_module namespace `{}` cannot be used without member accessor", sym @@ -218,7 +218,7 @@ impl VisitMut for ConstModules { return; } - if self.scope.namespace.get(&id.to_id()).is_some() { + if self.scope.namespace.contains(&id.to_id()) { panic!( "The const_module namespace `{}` cannot be used without member accessor", id.sym diff --git a/crates/swc_ecma_transforms_optimization/src/inline_globals.rs b/crates/swc_ecma_transforms_optimization/src/inline_globals.rs index ab37e1230fca..4d56f737b428 100644 --- a/crates/swc_ecma_transforms_optimization/src/inline_globals.rs +++ b/crates/swc_ecma_transforms_optimization/src/inline_globals.rs @@ -202,7 +202,6 @@ impl VisitMut for InlineGlobals { mod tests { use swc_ecma_transforms_testing::{test, Tester}; use swc_ecma_utils::DropSpan; - use swc_ecma_visit::as_folder; use super::*; diff --git a/crates/swc_ecma_transforms_optimization/src/json_parse.rs b/crates/swc_ecma_transforms_optimization/src/json_parse.rs index df06b873961e..ae5b621e920d 100644 --- a/crates/swc_ecma_transforms_optimization/src/json_parse.rs +++ b/crates/swc_ecma_transforms_optimization/src/json_parse.rs @@ -142,10 +142,6 @@ mod tests { use super::*; - struct Normalizer; - - impl Fold for Normalizer {} - test!( ::swc_ecma_parser::Syntax::default(), |_| json_parse(0), diff --git a/crates/swc_ecma_transforms_optimization/src/simplify/inlining/scope.rs b/crates/swc_ecma_transforms_optimization/src/simplify/inlining/scope.rs index b4b5b97d6dd2..784ebb7ea239 100644 --- a/crates/swc_ecma_transforms_optimization/src/simplify/inlining/scope.rs +++ b/crates/swc_ecma_transforms_optimization/src/simplify/inlining/scope.rs @@ -290,7 +290,7 @@ impl<'a> Scope<'a> { /// True if the returned scope is self fn scope_for(&self, id: &Id) -> (&Scope, bool) { - if self.constants.get(id).is_some() { + if self.constants.contains_key(id) { return (self, true); } if self.find_binding_from_current(id).is_some() { @@ -508,7 +508,7 @@ impl<'a> Scope<'a> { } fn has_constant(&self, id: &Id) -> bool { - if self.constants.get(id).is_some() { + if self.constants.contains_key(id) { return true; } diff --git a/crates/swc_ecma_transforms_react/src/jsx/tests.rs b/crates/swc_ecma_transforms_react/src/jsx/tests.rs index eb6c94886082..e5856f6e6194 100644 --- a/crates/swc_ecma_transforms_react/src/jsx/tests.rs +++ b/crates/swc_ecma_transforms_react/src/jsx/tests.rs @@ -5,7 +5,7 @@ use std::{ path::{Path, PathBuf}, }; -use swc_common::{chain, Mark}; +use swc_common::chain; use swc_ecma_codegen::{Config, Emitter}; use swc_ecma_parser::{EsConfig, Parser, StringInput}; use swc_ecma_transforms_base::{fixer::fixer, hygiene, resolver}; diff --git a/crates/swc_ecma_transforms_react/src/jsx_src/tests.rs b/crates/swc_ecma_transforms_react/src/jsx_src/tests.rs index beaa7721603d..01dc0435c637 100644 --- a/crates/swc_ecma_transforms_react/src/jsx_src/tests.rs +++ b/crates/swc_ecma_transforms_react/src/jsx_src/tests.rs @@ -1,4 +1,4 @@ -use swc_common::{sync::Lrc, FilePathMapping}; +use swc_common::FilePathMapping; use swc_ecma_transforms_testing::{test, test_exec}; use super::*; diff --git a/crates/swc_ecma_transforms_react/src/refresh/tests.rs b/crates/swc_ecma_transforms_react/src/refresh/tests.rs index 0f1218b553d9..710c2db35263 100644 --- a/crates/swc_ecma_transforms_react/src/refresh/tests.rs +++ b/crates/swc_ecma_transforms_react/src/refresh/tests.rs @@ -1,4 +1,4 @@ -use swc_common::{chain, Mark}; +use swc_common::chain; use swc_ecma_transforms_base::resolver; use swc_ecma_transforms_module::common_js::common_js; use swc_ecma_transforms_testing::{test, Tester}; diff --git a/crates/swc_ecma_transforms_typescript/examples/ts_to_js.rs b/crates/swc_ecma_transforms_typescript/examples/ts_to_js.rs index 680d3ab0e04e..fd70e020fd72 100644 --- a/crates/swc_ecma_transforms_typescript/examples/ts_to_js.rs +++ b/crates/swc_ecma_transforms_typescript/examples/ts_to_js.rs @@ -5,7 +5,6 @@ use std::{env, path::Path}; use swc_common::{ - self, comments::SingleThreadedComments, errors::{ColorConfig, Handler}, sync::Lrc, diff --git a/crates/swc_ecma_transforms_typescript/tests/strip_correctness.rs b/crates/swc_ecma_transforms_typescript/tests/strip_correctness.rs index 8629fb871ad6..38debe9b86c7 100644 --- a/crates/swc_ecma_transforms_typescript/tests/strip_correctness.rs +++ b/crates/swc_ecma_transforms_typescript/tests/strip_correctness.rs @@ -6,11 +6,11 @@ use std::{ use swc_common::{FileName, Mark}; use swc_ecma_ast::*; -use swc_ecma_codegen::{self, Emitter}; +use swc_ecma_codegen::Emitter; use swc_ecma_parser::{lexer::Lexer, EsConfig, Parser, Syntax, TsConfig}; use swc_ecma_transforms_base::{fixer::fixer, hygiene::hygiene, resolver}; use swc_ecma_transforms_typescript::typescript; -use swc_ecma_visit::{Fold, FoldWith}; +use swc_ecma_visit::FoldWith; #[testing::fixture("../swc_ecma_parser/tests/tsc/**/*.ts")] #[testing::fixture("../swc_ecma_parser/tests/tsc/**/*.tsx")] @@ -194,58 +194,3 @@ impl Write for Buf { self.0.write().unwrap().flush() } } - -struct Normalizer; -impl Fold for Normalizer { - fn fold_new_expr(&mut self, expr: NewExpr) -> NewExpr { - let mut expr = expr.fold_children_with(self); - - expr.args = match expr.args { - Some(..) => expr.args, - None => Some(vec![]), - }; - - expr - } - - fn fold_prop_name(&mut self, name: PropName) -> PropName { - let name = name.fold_children_with(self); - - match name { - PropName::Ident(i) => PropName::Str(Str { - raw: None, - value: i.sym, - span: i.span, - }), - PropName::Num(n) => { - let s = if n.value.is_infinite() { - if n.value.is_sign_positive() { - "Infinity".into() - } else { - "-Infinity".into() - } - } else { - format!("{}", n.value) - }; - PropName::Str(Str { - raw: None, - value: s.into(), - span: n.span, - }) - } - _ => name, - } - } - - fn fold_stmt(&mut self, stmt: Stmt) -> Stmt { - let stmt = stmt.fold_children_with(self); - - match stmt { - Stmt::Expr(ExprStmt { span, expr }) => match *expr { - Expr::Paren(ParenExpr { expr, .. }) => Stmt::Expr(ExprStmt { span, expr }), - _ => Stmt::Expr(ExprStmt { span, expr }), - }, - _ => stmt, - } - } -} diff --git a/crates/swc_ecma_usage_analyzer/src/analyzer/mod.rs b/crates/swc_ecma_usage_analyzer/src/analyzer/mod.rs index 8547f10f7717..48b614f6f3c7 100644 --- a/crates/swc_ecma_usage_analyzer/src/analyzer/mod.rs +++ b/crates/swc_ecma_usage_analyzer/src/analyzer/mod.rs @@ -5,7 +5,7 @@ use swc_ecma_visit::{noop_visit_type, Visit, VisitWith}; use swc_timer::timer; pub use self::ctx::Ctx; -use self::storage::{Storage, *}; +use self::storage::*; use crate::{ alias::{collect_infects_from, AliasConfig}, marks::Marks, diff --git a/crates/swc_ecma_utils/src/lib.rs b/crates/swc_ecma_utils/src/lib.rs index 8d92575df9cb..83890a4c09c3 100644 --- a/crates/swc_ecma_utils/src/lib.rs +++ b/crates/swc_ecma_utils/src/lib.rs @@ -2272,10 +2272,7 @@ pub fn is_maybe_branch_directive(stmt: &Stmt) -> bool { } /// inject `stmts` after directives -pub fn prepend_stmts( - to: &mut Vec, - stmts: impl Iterator + ExactSizeIterator, -) { +pub fn prepend_stmts(to: &mut Vec, stmts: impl ExactSizeIterator) { let idx = to .iter() .position(|item| { diff --git a/crates/swc_estree_ast/src/flavor.rs b/crates/swc_estree_ast/src/flavor.rs index 8556bdf61b9c..6b670b887dc4 100644 --- a/crates/swc_estree_ast/src/flavor.rs +++ b/crates/swc_estree_ast/src/flavor.rs @@ -1,16 +1,13 @@ better_scoped_tls::scoped_tls!(static FLAVOR: Flavor); #[repr(u8)] -#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)] +#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash, Default)] pub enum Flavor { + #[default] Babel, - Acorn { extra_comments: bool }, -} - -impl Default for Flavor { - fn default() -> Self { - Flavor::Babel - } + Acorn { + extra_comments: bool, + }, } impl Flavor { diff --git a/crates/swc_fast_graph/src/digraph.rs b/crates/swc_fast_graph/src/digraph.rs index e6922e425b71..18b6852e8e81 100644 --- a/crates/swc_fast_graph/src/digraph.rs +++ b/crates/swc_fast_graph/src/digraph.rs @@ -7,7 +7,7 @@ use std::{ cmp::Ordering, fmt, hash::{self, BuildHasherDefault, Hash}, - iter::{Cloned, DoubleEndedIterator, FromIterator}, + iter::Cloned, marker::PhantomData, ops::Deref, slice::Iter, diff --git a/crates/swc_html_ast/Cargo.toml b/crates/swc_html_ast/Cargo.toml index d4d44ff477ad..1f98084e4ada 100644 --- a/crates/swc_html_ast/Cargo.toml +++ b/crates/swc_html_ast/Cargo.toml @@ -21,7 +21,7 @@ serde-impl = ["serde"] [dependencies] is-macro = "0.3.5" -rkyv = { version = "=0.7.42", optional = true, features = [ +rkyv = { version = "=0.7.44", optional = true, features = [ "strict", "validation", ] } diff --git a/crates/swc_html_codegen/src/writer/basic.rs b/crates/swc_html_codegen/src/writer/basic.rs index 9b7307910504..773ad224767a 100644 --- a/crates/swc_html_codegen/src/writer/basic.rs +++ b/crates/swc_html_codegen/src/writer/basic.rs @@ -5,30 +5,20 @@ use swc_common::{BytePos, LineCol, Span}; use super::HtmlWriter; -#[derive(Clone, Copy, PartialEq, Eq, Debug)] +#[derive(Clone, Copy, PartialEq, Eq, Debug, Default)] pub enum IndentType { Tab, + #[default] Space, } -impl Default for IndentType { - fn default() -> Self { - IndentType::Space - } -} - -#[derive(Clone, Copy, PartialEq, Eq, Debug)] +#[derive(Clone, Copy, PartialEq, Eq, Debug, Default)] pub enum LineFeed { + #[default] LF, CRLF, } -impl Default for LineFeed { - fn default() -> Self { - LineFeed::LF - } -} - pub struct BasicHtmlWriterConfig { pub indent_type: IndentType, pub indent_width: i32, diff --git a/crates/swc_html_codegen/tests/fixture.rs b/crates/swc_html_codegen/tests/fixture.rs index 7d07b912c9af..31d63c0fa45a 100644 --- a/crates/swc_html_codegen/tests/fixture.rs +++ b/crates/swc_html_codegen/tests/fixture.rs @@ -24,18 +24,9 @@ fn print_document( codegen_config: Option, ) { let dir = input.parent().unwrap(); - let parser_config = match parser_config { - Some(parser_config) => parser_config, - _ => ParserConfig::default(), - }; - let writer_config = match writer_config { - Some(writer_config) => writer_config, - _ => BasicHtmlWriterConfig::default(), - }; - let codegen_config = match codegen_config { - Some(codegen_config) => codegen_config, - _ => CodegenConfig::default(), - }; + let parser_config = parser_config.unwrap_or_default(); + let writer_config = writer_config.unwrap_or_default(); + let codegen_config = codegen_config.unwrap_or_default(); let output = if codegen_config.minify { dir.join(format!( "output.min.{}", @@ -98,18 +89,9 @@ fn print_document_fragment( codegen_config: Option, ) { let dir = input.parent().unwrap(); - let parser_config = match parser_config { - Some(parser_config) => parser_config, - _ => ParserConfig::default(), - }; - let writer_config = match writer_config { - Some(writer_config) => writer_config, - _ => BasicHtmlWriterConfig::default(), - }; - let codegen_config = match codegen_config { - Some(codegen_config) => codegen_config, - _ => CodegenConfig::default(), - }; + let parser_config = parser_config.unwrap_or_default(); + let writer_config = writer_config.unwrap_or_default(); + let codegen_config = codegen_config.unwrap_or_default(); let output = if codegen_config.minify { dir.join(format!( "output.min.{}", @@ -185,18 +167,9 @@ fn verify_document( codegen_config: Option, ignore_errors: bool, ) { - let parser_config = match parser_config { - Some(parser_config) => parser_config, - _ => ParserConfig::default(), - }; - let writer_config = match writer_config { - Some(writer_config) => writer_config, - _ => BasicHtmlWriterConfig::default(), - }; - let codegen_config = match codegen_config { - Some(codegen_config) => codegen_config, - _ => CodegenConfig::default(), - }; + let parser_config = parser_config.unwrap_or_default(); + let writer_config = writer_config.unwrap_or_default(); + let codegen_config = codegen_config.unwrap_or_default(); testing::run_test2(false, |cm, handler| { let fm = cm.load_file(input).unwrap(); @@ -250,18 +223,9 @@ fn verify_document_fragment( codegen_config: Option, ignore_errors: bool, ) { - let parser_config = match parser_config { - Some(parser_config) => parser_config, - _ => ParserConfig::default(), - }; - let writer_config = match writer_config { - Some(writer_config) => writer_config, - _ => BasicHtmlWriterConfig::default(), - }; - let mut codegen_config = match codegen_config { - Some(codegen_config) => codegen_config, - _ => CodegenConfig::default(), - }; + let parser_config = parser_config.unwrap_or_default(); + let writer_config = writer_config.unwrap_or_default(); + let mut codegen_config = codegen_config.unwrap_or_default(); codegen_config.context_element = Some(&context_element); diff --git a/crates/swc_html_minifier/src/option.rs b/crates/swc_html_minifier/src/option.rs index 7ce287bd8a59..6003e63ad035 100644 --- a/crates/swc_html_minifier/src/option.rs +++ b/crates/swc_html_minifier/src/option.rs @@ -19,7 +19,7 @@ pub enum MinifierType { Html, } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)] #[serde(deny_unknown_fields)] #[serde(rename_all = "kebab-case")] pub enum CollapseWhitespaces { @@ -41,16 +41,11 @@ pub enum CollapseWhitespaces { /// Remove all whitespace in the `head` element, trim whitespaces for the /// `body` element, remove spaces between `metadata` elements (i.e. /// `script`/`style`/etc, for elements that have `display: none`) + #[default] OnlyMetadata, } -impl Default for CollapseWhitespaces { - fn default() -> Self { - CollapseWhitespaces::OnlyMetadata - } -} - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)] #[serde(deny_unknown_fields)] #[serde(rename_all = "kebab-case")] pub enum RemoveRedundantAttributes { @@ -61,15 +56,10 @@ pub enum RemoveRedundantAttributes { /// Remove deprecated and svg redundant (they used for styling) and `xmlns` /// attributes (for example the `type` attribute for the `style` tag and /// `xmlns` for svg) + #[default] Smart, } -impl Default for RemoveRedundantAttributes { - fn default() -> Self { - RemoveRedundantAttributes::Smart - } -} - #[derive(Debug, Serialize, Deserialize, Clone)] #[serde(deny_unknown_fields)] #[serde(untagged)] diff --git a/crates/swc_html_parser/src/parser/mod.rs b/crates/swc_html_parser/src/parser/mod.rs index 19b327e16290..72df68a30af7 100644 --- a/crates/swc_html_parser/src/parser/mod.rs +++ b/crates/swc_html_parser/src/parser/mod.rs @@ -42,8 +42,9 @@ enum AdjustAttributes { Svg, } -#[derive(Debug, Clone)] +#[derive(Debug, Clone, Default)] enum InsertionMode { + #[default] Initial, BeforeHtml, BeforeHead, @@ -69,12 +70,6 @@ enum InsertionMode { AfterAfterFrameset, } -impl Default for InsertionMode { - fn default() -> Self { - InsertionMode::Initial - } -} - enum InsertionPosition { LastChild(RcNode), BeforeSibling(RcNode), diff --git a/crates/swc_macros_common/src/binder.rs b/crates/swc_macros_common/src/binder.rs index 14aa8f2608bc..921a019bc10d 100644 --- a/crates/swc_macros_common/src/binder.rs +++ b/crates/swc_macros_common/src/binder.rs @@ -61,7 +61,6 @@ impl<'a> Binder<'a> { Self::new(&input.ident, &input.data, &input.attrs) } - /// pub fn variants(&self) -> Vec> { match *self.body { Data::Enum(DataEnum { ref variants, .. }) => { diff --git a/crates/swc_macros_common/src/derive/generics.rs b/crates/swc_macros_common/src/derive/generics.rs index 7419c46bd1ec..855cb1485523 100644 --- a/crates/swc_macros_common/src/derive/generics.rs +++ b/crates/swc_macros_common/src/derive/generics.rs @@ -1,7 +1,7 @@ use std::collections::BTreeSet; use quote::quote; -use syn::visit::{self, Visit}; +use syn::visit::Visit; use super::*; diff --git a/crates/swc_node_bundler/src/loaders/json.rs b/crates/swc_node_bundler/src/loaders/json.rs index 63f4ed2cc0cb..76c2f2412de0 100644 --- a/crates/swc_node_bundler/src/loaders/json.rs +++ b/crates/swc_node_bundler/src/loaders/json.rs @@ -2,7 +2,7 @@ use std::sync::Arc; use anyhow::{anyhow, Error}; use swc_common::{SourceFile, DUMMY_SP}; -use swc_ecma_ast::{EsVersion, *}; +use swc_ecma_ast::*; use swc_ecma_parser::{parse_file_as_expr, Syntax}; pub(super) fn load_json_as_module(fm: &Arc) -> Result { diff --git a/crates/swc_node_bundler/src/v1/mod.rs b/crates/swc_node_bundler/src/v1/mod.rs index a7b43f7ede14..f30031686ff2 100644 --- a/crates/swc_node_bundler/src/v1/mod.rs +++ b/crates/swc_node_bundler/src/v1/mod.rs @@ -66,22 +66,17 @@ impl Config { } } -#[derive(StringEnum)] +#[derive(StringEnum, Default)] pub enum Mode { /// `production` Production, /// `debug` Debug, /// `none` + #[default] None, } -impl Default for Mode { - fn default() -> Self { - Mode::None - } -} - #[derive(Debug, Clone, Deserialize)] #[serde(untagged, rename = "Entry")] pub enum EntryConfig { diff --git a/crates/swc_plugin_proxy/Cargo.toml b/crates/swc_plugin_proxy/Cargo.toml index 0bada6078556..8010e315a685 100644 --- a/crates/swc_plugin_proxy/Cargo.toml +++ b/crates/swc_plugin_proxy/Cargo.toml @@ -22,7 +22,7 @@ plugin-rt = ["__plugin_rt", "swc_common/plugin-base", "rkyv-impl"] [dependencies] -rkyv = { package = "rkyv", version = "=0.7.42", optional = true, features = [ +rkyv = { package = "rkyv", version = "=0.7.44", optional = true, features = [ "strict", "validation", ] } diff --git a/crates/swc_plugin_proxy/src/memory_interop/read_returned_result_from_host.rs b/crates/swc_plugin_proxy/src/memory_interop/read_returned_result_from_host.rs index 9f4ed4ab8530..5285aae1bc40 100644 --- a/crates/swc_plugin_proxy/src/memory_interop/read_returned_result_from_host.rs +++ b/crates/swc_plugin_proxy/src/memory_interop/read_returned_result_from_host.rs @@ -51,6 +51,8 @@ where let (serialized_allocated_bytes_raw_ptr, serialized_allocated_bytes_raw_ptr_size) = serialized_allocated_bytes_ptr.as_ptr(); + std::mem::forget(allocated_bytes_ptr); // We should not drop AllocatedBytesPtr(0, 0) + let ret = f(serialized_allocated_bytes_raw_ptr as _); // Host fn call completes: by contract in host proxy, if return value is 0 @@ -95,7 +97,7 @@ where let allocated_returned_value_ptr = read_returned_result_from_host_inner(f); // Using AllocatedBytesPtr's value, reconstruct actual return value - allocated_returned_value_ptr.map(|allocated_returned_value_ptr| unsafe { + allocated_returned_value_ptr.map(|allocated_returned_value_ptr| { PluginSerializedBytes::from_raw_ptr( allocated_returned_value_ptr.0 as _, allocated_returned_value_ptr diff --git a/crates/swc_plugin_runner/src/imported_fn/source_map.rs b/crates/swc_plugin_runner/src/imported_fn/source_map.rs index 3b6daa11e350..3b9623a8dee2 100644 --- a/crates/swc_plugin_runner/src/imported_fn/source_map.rs +++ b/crates/swc_plugin_runner/src/imported_fn/source_map.rs @@ -1,3 +1,5 @@ +#![allow(dead_code)] + use std::sync::Arc; use parking_lot::Mutex; diff --git a/crates/swc_plugin_runner/src/transform_executor.rs b/crates/swc_plugin_runner/src/transform_executor.rs index ae8d3a5c9bc3..b79c9eb5ff2b 100644 --- a/crates/swc_plugin_runner/src/transform_executor.rs +++ b/crates/swc_plugin_runner/src/transform_executor.rs @@ -393,8 +393,7 @@ impl TransformExecutor { .run(program, self.unresolved_mark, should_enable_comments_proxy) .context( "failed to run Wasm plugin transform. Please ensure the version of `swc_core` \ - used by the plugin is compatible with the host runtime. See https://swc.rs/docs/plugin/selecting-swc-core\ - for compatibility information. If you are an author of the plugin, please update \ + used by the plugin is compatible with the host runtime. See https://swc.rs/docs/plugin/selecting-swc-core for compatibility information. If you are an author of the plugin, please update \ `swc_core` to the compatible version.", ) } diff --git a/crates/swc_plugin_runner/tests/css-plugins/swc_noop_plugin/Cargo.toml b/crates/swc_plugin_runner/tests/css-plugins/swc_noop_plugin/Cargo.toml index d03b359d9058..d46c7c433282 100644 --- a/crates/swc_plugin_runner/tests/css-plugins/swc_noop_plugin/Cargo.toml +++ b/crates/swc_plugin_runner/tests/css-plugins/swc_noop_plugin/Cargo.toml @@ -10,6 +10,7 @@ version = "0.1.0" crate-type = ["cdylib"] [dependencies] +proc-macro2 = "=1.0.79" serde = "1" swc_core = { path = "../../../../swc_core", features = [ "css_ast", diff --git a/crates/swc_plugin_runner/tests/ecma_integration.rs b/crates/swc_plugin_runner/tests/ecma_integration.rs index 0683c32535cf..b66d0763ad39 100644 --- a/crates/swc_plugin_runner/tests/ecma_integration.rs +++ b/crates/swc_plugin_runner/tests/ecma_integration.rs @@ -105,6 +105,8 @@ fn internal() { tokio::runtime::Runtime::new().unwrap().block_on(async { // run single plugin testing::run_test(false, |cm, _handler| { + eprint!("First run start"); + let fm = cm.new_source_file(FileName::Anon, "console.log(foo)".into()); let program = parse_file_as_program( @@ -157,6 +159,7 @@ fn internal() { .deserialize() .expect("Should able to deserialize") .into_inner(); + eprintln!("First run retured"); let mut visitor = TestVisitor { plugin_transform_found: false, }; @@ -164,13 +167,14 @@ fn internal() { visitor .plugin_transform_found - .then(|| visitor.plugin_transform_found) + .then_some(visitor.plugin_transform_found) .ok_or(()) }) .expect("Should able to run single plugin transform"); // run single plugin with handler testing::run_test2(false, |cm, handler| { + eprintln!("Second run start"); let fm = cm.new_source_file(FileName::Anon, "console.log(foo)".into()); let program = parse_file_as_program( @@ -215,86 +219,10 @@ fn internal() { .expect("Plugin should apply transform") }); + eprintln!("Second run retured"); + Ok(()) }) .expect("Should able to run single plugin transform with handler"); - - // Run multiple plugins. - testing::run_test(false, |cm, _handler| { - let fm = cm.new_source_file(FileName::Anon, "console.log(foo)".into()); - - let program = parse_file_as_program( - &fm, - Syntax::Es(Default::default()), - EsVersion::latest(), - None, - &mut vec![], - ) - .unwrap(); - - let mut serialized_program = - PluginSerializedBytes::try_serialize(&VersionedSerializable::new(program)) - .expect("Should serializable"); - - let experimental_metadata: AHashMap = [ - ( - "TestExperimental".to_string(), - "ExperimentalValue".to_string(), - ), - ("OtherTest".to_string(), "OtherVal".to_string()), - ] - .into_iter() - .collect(); - - let mut plugin_transform_executor = swc_plugin_runner::create_plugin_transform_executor( - &cm, - &Mark::new(), - &Arc::new(TransformPluginMetadataContext::new( - None, - "development".to_string(), - Some(experimental_metadata.clone()), - )), - Box::new(PLUGIN_BYTES.clone()), - Some(json!({ "pluginConfig": "testValue" })), - None, - ); - - serialized_program = plugin_transform_executor - .transform(&serialized_program, Some(false)) - .expect("Plugin should apply transform"); - - // TODO: we'll need to apply 2 different plugins - let mut plugin_transform_executor = swc_plugin_runner::create_plugin_transform_executor( - &cm, - &Mark::new(), - &Arc::new(TransformPluginMetadataContext::new( - None, - "development".to_string(), - Some(experimental_metadata), - )), - Box::new(PLUGIN_BYTES.clone()), - Some(json!({ "pluginConfig": "testValue" })), - None, - ); - - serialized_program = plugin_transform_executor - .transform(&serialized_program, Some(false)) - .expect("Plugin should apply transform"); - - let program: Program = serialized_program - .deserialize() - .expect("Should able to deserialize") - .into_inner(); - let mut visitor = TestVisitor { - plugin_transform_found: false, - }; - program.visit_with(&mut visitor); - - visitor - .plugin_transform_found - .then(|| visitor.plugin_transform_found) - .ok_or(()) - }) - .expect("Should able to run multiple plugins transform"); }); } diff --git a/crates/swc_plugin_runner/tests/fixture/issue_6404/Cargo.toml b/crates/swc_plugin_runner/tests/fixture/issue_6404/Cargo.toml index 77690a680939..ed9627fd027b 100644 --- a/crates/swc_plugin_runner/tests/fixture/issue_6404/Cargo.toml +++ b/crates/swc_plugin_runner/tests/fixture/issue_6404/Cargo.toml @@ -10,6 +10,7 @@ version = "0.1.0" crate-type = ["cdylib"] [dependencies] +proc-macro2 = "=1.0.79" serde = "1" swc_core = { path = "../../../../swc_core", features = [ "ecma_plugin_transform", diff --git a/crates/swc_plugin_runner/tests/fixture/issue_6404/src/lib.rs b/crates/swc_plugin_runner/tests/fixture/issue_6404/src/lib.rs index cb5afbd0b025..da544870bfd6 100644 --- a/crates/swc_plugin_runner/tests/fixture/issue_6404/src/lib.rs +++ b/crates/swc_plugin_runner/tests/fixture/issue_6404/src/lib.rs @@ -6,12 +6,12 @@ use swc_core::{ #[plugin_transform] pub fn process_transform(program: Program, metadata: TransformPluginProgramMetadata) -> Program { - for i in 1..50000 { + for i in 1..5 { let j: u32 = i; // println!("i {} j {}", i, j); let res = metadata.source_map.span_to_snippet(Span::new( BytePos(j), - BytePos(j + 1000), + BytePos(j + 10000000), SyntaxContext::empty(), )); // let _ = dbg!(res); diff --git a/crates/swc_plugin_runner/tests/fixture/swc_internal_plugin/Cargo.toml b/crates/swc_plugin_runner/tests/fixture/swc_internal_plugin/Cargo.toml index 78e28d0de3bc..51922415f44f 100644 --- a/crates/swc_plugin_runner/tests/fixture/swc_internal_plugin/Cargo.toml +++ b/crates/swc_plugin_runner/tests/fixture/swc_internal_plugin/Cargo.toml @@ -2,7 +2,7 @@ [package] edition = "2021" -name = "swc_internal_plugin" +name = "swc_internal_plugin" publish = false version = "0.1.0" @@ -10,8 +10,9 @@ version = "0.1.0" crate-type = ["cdylib"] [dependencies] +proc-macro2 = "=1.0.79" serde = "1" -swc_core = {path = "../../../../swc_core", features = [ +swc_core = { path = "../../../../swc_core", features = [ "ecma_plugin_transform", "ecma_quote", -]} +] } diff --git a/crates/swc_plugin_runner/tests/fixture/swc_internal_plugin/src/lib.rs b/crates/swc_plugin_runner/tests/fixture/swc_internal_plugin/src/lib.rs index e6a104dbe8cf..8234718e51f4 100644 --- a/crates/swc_plugin_runner/tests/fixture/swc_internal_plugin/src/lib.rs +++ b/crates/swc_plugin_runner/tests/fixture/swc_internal_plugin/src/lib.rs @@ -59,28 +59,38 @@ impl VisitMut for ConsoleOutputReplacer { /// results back to host. Refer swc_plugin_macro how does it work internally. #[plugin_transform] pub fn process(program: Program, metadata: TransformPluginProgramMetadata) -> Program { + dbg!(); HANDLER.with(|handler| { handler .struct_span_err(DUMMY_SP, "Test diagnostics from plugin") .emit(); }); + dbg!(); let _stmt = quote!( "const $name = 4;" as Stmt, name = Ident::new("ref".into(), DUMMY_SP) ); + dbg!(); + let filename = metadata .get_context(&TransformPluginMetadataContextKind::Filename) .expect("Filename should exists"); + dbg!(); + let env = metadata .get_context(&TransformPluginMetadataContextKind::Env) .expect("Metadata should exists"); + + dbg!(); + if env != "development" { panic!("Env should be development"); } + dbg!(); let experimental_value = metadata .get_experimental_context("TestExperimental") .expect("Experimental metadata should exist"); @@ -90,20 +100,30 @@ pub fn process(program: Program, metadata: TransformPluginProgramMetadata) -> Pr panic!("Experimental metadata should be `ExperimentalValue`"); } + dbg!(); + let experimental_value = metadata .get_experimental_context("OtherTest") .expect("Experimental metadata 'othertest' should exist"); + dbg!(); + if &experimental_value != "OtherVal" { panic!("Experimental metadata 'othertest' should be `OtherVal`"); } + dbg!(); + let nonexistent_value = metadata.get_experimental_context("Nonexistent"); + dbg!(); + if nonexistent_value.is_some() { panic!("Experimental metadata 'nonexistent' should not exist"); } + dbg!(); + let plugin_config = metadata .get_transform_plugin_config() .expect("Plugin config should exist"); @@ -111,5 +131,7 @@ pub fn process(program: Program, metadata: TransformPluginProgramMetadata) -> Pr panic!("Plugin config should be testValue"); } + dbg!(); + program.fold_with(&mut as_folder(ConsoleOutputReplacer { metadata })) } diff --git a/crates/swc_plugin_runner/tests/fixture/swc_noop_plugin/Cargo.toml b/crates/swc_plugin_runner/tests/fixture/swc_noop_plugin/Cargo.toml index 123d8ee93798..a878b20674aa 100644 --- a/crates/swc_plugin_runner/tests/fixture/swc_noop_plugin/Cargo.toml +++ b/crates/swc_plugin_runner/tests/fixture/swc_noop_plugin/Cargo.toml @@ -10,6 +10,7 @@ version = "0.1.0" crate-type = ["cdylib"] [dependencies] +proc-macro2 = "=1.0.79" serde = "1" swc_core = { path = "../../../../swc_core", features = [ "ecma_plugin_transform", diff --git a/crates/swc_plugin_runner/tests/issues.rs b/crates/swc_plugin_runner/tests/issues.rs index 754f9e8ec8f7..a4e9f9da51fb 100644 --- a/crates/swc_plugin_runner/tests/issues.rs +++ b/crates/swc_plugin_runner/tests/issues.rs @@ -12,9 +12,8 @@ use serde_json::json; #[cfg(feature = "__rkyv")] use swc_common::plugin::serialized::PluginSerializedBytes; use swc_common::{collections::AHashMap, plugin::metadata::TransformPluginMetadataContext, Mark}; -use swc_ecma_ast::{CallExpr, Callee, EsVersion, Expr, Lit, MemberExpr, Program, Str}; +use swc_ecma_ast::{EsVersion, Program}; use swc_ecma_parser::{parse_file_as_program, Syntax}; -use swc_ecma_visit::Visit; use testing::CARGO_TARGET_DIR; /// Returns the path to the built plugin @@ -48,27 +47,6 @@ fn build_plugin(dir: &Path, crate_name: &str) -> Result { Err(anyhow!("Could not find built plugin")) } -struct TestVisitor { - pub plugin_transform_found: bool, -} - -impl Visit for TestVisitor { - fn visit_call_expr(&mut self, call: &CallExpr) { - if let Callee::Expr(expr) = &call.callee { - if let Expr::Member(MemberExpr { obj, .. }) = &**expr { - if let Expr::Ident(ident) = &**obj { - if ident.sym == *"console" { - let args = &*(call.args[0].expr); - if let Expr::Lit(Lit::Str(Str { value, .. })) = args { - self.plugin_transform_found = value == "changed_via_plugin"; - } - } - } - } - } - } -} - #[cfg(feature = "__rkyv")] #[test] fn issue_6404() -> Result<(), Error> { diff --git a/crates/swc_xml_codegen/src/writer/basic.rs b/crates/swc_xml_codegen/src/writer/basic.rs index aa14e162782c..cc80a8d9dced 100644 --- a/crates/swc_xml_codegen/src/writer/basic.rs +++ b/crates/swc_xml_codegen/src/writer/basic.rs @@ -5,30 +5,20 @@ use swc_common::{BytePos, LineCol, Span}; use super::XmlWriter; -#[derive(Clone, Copy, PartialEq, Eq, Debug)] +#[derive(Clone, Copy, PartialEq, Eq, Debug, Default)] pub enum IndentType { Tab, + #[default] Space, } -impl Default for IndentType { - fn default() -> Self { - IndentType::Space - } -} - -#[derive(Clone, Copy, PartialEq, Eq, Debug)] +#[derive(Clone, Copy, PartialEq, Eq, Debug, Default)] pub enum LineFeed { + #[default] LF, CRLF, } -impl Default for LineFeed { - fn default() -> Self { - LineFeed::LF - } -} - pub struct BasicXmlWriterConfig { pub indent_type: IndentType, pub indent_width: i32, diff --git a/crates/swc_xml_codegen/tests/fixture.rs b/crates/swc_xml_codegen/tests/fixture.rs index 8690c76a840e..1b532cc79fd0 100644 --- a/crates/swc_xml_codegen/tests/fixture.rs +++ b/crates/swc_xml_codegen/tests/fixture.rs @@ -22,18 +22,9 @@ fn print_document( codegen_config: Option, ) { let dir = input.parent().unwrap(); - let parser_config = match parser_config { - Some(parser_config) => parser_config, - _ => ParserConfig::default(), - }; - let writer_config = match writer_config { - Some(writer_config) => writer_config, - _ => BasicXmlWriterConfig::default(), - }; - let codegen_config = match codegen_config { - Some(codegen_config) => codegen_config, - _ => CodegenConfig::default(), - }; + let parser_config = parser_config.unwrap_or_default(); + let writer_config = writer_config.unwrap_or_default(); + let codegen_config = codegen_config.unwrap_or_default(); let output = if codegen_config.minify { dir.join(format!( "output.min.{}", @@ -95,18 +86,9 @@ fn verify_document( codegen_config: Option, ignore_errors: bool, ) { - let parser_config = match parser_config { - Some(parser_config) => parser_config, - _ => ParserConfig::default(), - }; - let writer_config = match writer_config { - Some(writer_config) => writer_config, - _ => BasicXmlWriterConfig::default(), - }; - let codegen_config = match codegen_config { - Some(codegen_config) => codegen_config, - _ => CodegenConfig::default(), - }; + let parser_config = parser_config.unwrap_or_default(); + let writer_config = writer_config.unwrap_or_default(); + let codegen_config = codegen_config.unwrap_or_default(); testing::run_test2(false, |cm, handler| { let fm = cm.load_file(input).unwrap(); diff --git a/crates/swc_xml_parser/src/parser/mod.rs b/crates/swc_xml_parser/src/parser/mod.rs index abe540f52ba7..797149bd7adf 100644 --- a/crates/swc_xml_parser/src/parser/mod.rs +++ b/crates/swc_xml_parser/src/parser/mod.rs @@ -19,18 +19,14 @@ pub type PResult = Result; #[derive(Debug, Clone, Copy, Default, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct ParserConfig {} +#[derive(Debug, Default)] pub enum Phase { + #[default] StartPhase, MainPhase, EndPhase, } -impl Default for Phase { - fn default() -> Self { - Phase::StartPhase - } -} - pub struct Parser where I: ParserInput, diff --git a/crates/swc_xml_parser/src/parser/node.rs b/crates/swc_xml_parser/src/parser/node.rs index 05696bf7d714..2d343b481548 100644 --- a/crates/swc_xml_parser/src/parser/node.rs +++ b/crates/swc_xml_parser/src/parser/node.rs @@ -1,3 +1,5 @@ +#![allow(dead_code)] + use std::{ cell::{Cell, RefCell}, fmt, mem, diff --git a/crates/testing/src/output.rs b/crates/testing/src/output.rs index a95018358d85..930849fe1735 100644 --- a/crates/testing/src/output.rs +++ b/crates/testing/src/output.rs @@ -209,7 +209,6 @@ impl Deref for NormalizedOutput { } } -/// pub type StdOut = NormalizedOutput; impl TestOutput> { diff --git a/node-swc/e2e/fixtures/plugin_transform_schema_v1/rust-toolchain b/node-swc/e2e/fixtures/plugin_transform_schema_v1/rust-toolchain index 4f93cb25623e..f1104daa0f34 100644 --- a/node-swc/e2e/fixtures/plugin_transform_schema_v1/rust-toolchain +++ b/node-swc/e2e/fixtures/plugin_transform_schema_v1/rust-toolchain @@ -1 +1 @@ -nightly-2022-09-23 \ No newline at end of file +nightly-2024-04-03 \ No newline at end of file diff --git a/node-swc/e2e/fixtures/plugin_transform_schema_vtest/rust-toolchain b/node-swc/e2e/fixtures/plugin_transform_schema_vtest/rust-toolchain index 4f93cb25623e..f1104daa0f34 100644 --- a/node-swc/e2e/fixtures/plugin_transform_schema_vtest/rust-toolchain +++ b/node-swc/e2e/fixtures/plugin_transform_schema_vtest/rust-toolchain @@ -1 +1 @@ -nightly-2022-09-23 \ No newline at end of file +nightly-2024-04-03 \ No newline at end of file diff --git a/rust-toolchain b/rust-toolchain index 473a92993b58..f1104daa0f34 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2024-02-06 \ No newline at end of file +nightly-2024-04-03 \ No newline at end of file From 0af201043ad50557eb2af1e9646ee34e669a8816 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 16 Apr 2024 02:24:47 +0000 Subject: [PATCH 128/172] chore: Bump crates --- CHANGELOG.md | 12 ++-- Cargo.lock | 72 +++++++++---------- crates/ast_node/Cargo.toml | 2 +- crates/string_enum/Cargo.toml | 2 +- crates/swc/Cargo.toml | 2 +- crates/swc_bundler/Cargo.toml | 2 +- crates/swc_cli_impl/Cargo.toml | 2 +- crates/swc_common/Cargo.toml | 2 +- crates/swc_css_codegen/Cargo.toml | 2 +- crates/swc_css_compat/Cargo.toml | 2 +- crates/swc_css_parser/Cargo.toml | 2 +- crates/swc_ecma_ast/Cargo.toml | 2 +- crates/swc_ecma_codegen/Cargo.toml | 2 +- crates/swc_ecma_codegen_macros/Cargo.toml | 2 +- crates/swc_ecma_compat_es2015/Cargo.toml | 2 +- crates/swc_ecma_compat_es2022/Cargo.toml | 2 +- crates/swc_ecma_lints/Cargo.toml | 2 +- crates/swc_ecma_loader/Cargo.toml | 2 +- crates/swc_ecma_minifier/Cargo.toml | 2 +- crates/swc_ecma_parser/Cargo.toml | 2 +- crates/swc_ecma_transforms_base/Cargo.toml | 2 +- .../Cargo.toml | 2 +- crates/swc_ecma_transforms_react/Cargo.toml | 2 +- .../swc_ecma_transforms_typescript/Cargo.toml | 2 +- crates/swc_ecma_usage_analyzer/Cargo.toml | 2 +- crates/swc_ecma_utils/Cargo.toml | 2 +- crates/swc_estree_ast/Cargo.toml | 2 +- crates/swc_fast_graph/Cargo.toml | 2 +- crates/swc_html_codegen/Cargo.toml | 2 +- crates/swc_html_minifier/Cargo.toml | 2 +- crates/swc_html_parser/Cargo.toml | 2 +- crates/swc_macros_common/Cargo.toml | 2 +- crates/swc_node_bundler/Cargo.toml | 2 +- crates/swc_plugin_proxy/Cargo.toml | 2 +- crates/swc_plugin_runner/Cargo.toml | 2 +- crates/swc_xml_codegen/Cargo.toml | 2 +- crates/swc_xml_parser/Cargo.toml | 2 +- crates/testing/Cargo.toml | 2 +- 38 files changed, 78 insertions(+), 78 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f94de998e0f4..d8a7a3e56412 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,12 @@ - **(es/proposal)** Update explicit resource management to match spec ([#8860](https://github.com/swc-project/swc/issues/8860)) ([6d24076](https://github.com/swc-project/swc/commit/6d240768b11cd6cabd347a54c135cb8937df2240)) +### Build + + + +- **(cargo)** Update rustc to `nightly-2024-04-03` ([#8821](https://github.com/swc-project/swc/issues/8821)) ([ca9c76b](https://github.com/swc-project/swc/commit/ca9c76b46f26f0aaf6b7f18cb7b4c6fdb7ebd512)) + ## [1.4.14] - 2024-04-15 ### Bug Fixes @@ -1362,10 +1368,4 @@ - **(es/config)** Accept `jsc.experimental.keepImportAssertions` ([#7995](https://github.com/swc-project/swc/issues/7995)) ([4d777ee](https://github.com/swc-project/swc/commit/4d777ee270183ba375b68c003e61692af6d571c3)) -### Refactor - - - -- **(bindingins)** Create `@swc/counter` ([#7991](https://github.com/swc-project/swc/issues/7991)) ([0acbb5f](https://github.com/swc-project/swc/commit/0acbb5f78daa52cf505e077993a694eb966368af)) - diff --git a/Cargo.lock b/Cargo.lock index 05f989e49e00..a5e1836017a3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -205,7 +205,7 @@ dependencies = [ [[package]] name = "ast_node" -version = "0.9.6" +version = "0.9.7" dependencies = [ "proc-macro2", "quote", @@ -3661,7 +3661,7 @@ dependencies = [ [[package]] name = "string_enum" -version = "0.4.2" +version = "0.4.3" dependencies = [ "proc-macro2", "quote", @@ -3706,7 +3706,7 @@ dependencies = [ [[package]] name = "swc" -version = "0.273.25" +version = "0.273.26" dependencies = [ "ansi_term", "anyhow", @@ -3776,7 +3776,7 @@ dependencies = [ [[package]] name = "swc_bundler" -version = "0.225.18" +version = "0.225.19" dependencies = [ "anyhow", "crc", @@ -3831,7 +3831,7 @@ dependencies = [ [[package]] name = "swc_cli_impl" -version = "0.8.24" +version = "0.8.25" dependencies = [ "anyhow", "assert_cmd", @@ -3855,7 +3855,7 @@ dependencies = [ [[package]] name = "swc_common" -version = "0.33.23" +version = "0.33.24" dependencies = [ "ahash 0.8.8", "anyhow", @@ -4015,7 +4015,7 @@ dependencies = [ [[package]] name = "swc_css_codegen" -version = "0.151.32" +version = "0.151.33" dependencies = [ "auto_impl", "bitflags 2.5.0", @@ -4043,7 +4043,7 @@ dependencies = [ [[package]] name = "swc_css_compat" -version = "0.27.33" +version = "0.27.34" dependencies = [ "bitflags 2.5.0", "once_cell", @@ -4114,7 +4114,7 @@ dependencies = [ [[package]] name = "swc_css_parser" -version = "0.150.31" +version = "0.150.32" dependencies = [ "criterion", "lexical", @@ -4172,7 +4172,7 @@ dependencies = [ [[package]] name = "swc_ecma_ast" -version = "0.112.7" +version = "0.112.8" dependencies = [ "arbitrary", "bitflags 2.5.0", @@ -4192,7 +4192,7 @@ dependencies = [ [[package]] name = "swc_ecma_codegen" -version = "0.148.15" +version = "0.148.16" dependencies = [ "base64", "criterion", @@ -4216,7 +4216,7 @@ dependencies = [ [[package]] name = "swc_ecma_codegen_macros" -version = "0.7.4" +version = "0.7.5" dependencies = [ "proc-macro2", "quote", @@ -4254,7 +4254,7 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2015" -version = "0.4.18" +version = "0.4.19" dependencies = [ "arrayvec", "indexmap 2.1.0", @@ -4382,7 +4382,7 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2022" -version = "0.4.16" +version = "0.4.17" dependencies = [ "swc_atoms", "swc_common", @@ -4426,7 +4426,7 @@ dependencies = [ [[package]] name = "swc_ecma_lints" -version = "0.92.20" +version = "0.92.21" dependencies = [ "auto_impl", "dashmap", @@ -4448,7 +4448,7 @@ dependencies = [ [[package]] name = "swc_ecma_loader" -version = "0.45.25" +version = "0.45.26" dependencies = [ "anyhow", "dashmap", @@ -4469,7 +4469,7 @@ dependencies = [ [[package]] name = "swc_ecma_minifier" -version = "0.192.22" +version = "0.192.23" dependencies = [ "ansi_term", "anyhow", @@ -4510,7 +4510,7 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "0.143.14" +version = "0.143.15" dependencies = [ "criterion", "either", @@ -4627,7 +4627,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_base" -version = "0.137.19" +version = "0.137.20" dependencies = [ "better_scoped_tls", "bitflags 2.5.0", @@ -4744,7 +4744,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_optimization" -version = "0.198.20" +version = "0.198.21" dependencies = [ "dashmap", "indexmap 2.1.0", @@ -4798,7 +4798,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_react" -version = "0.183.18" +version = "0.183.19" dependencies = [ "base64", "dashmap", @@ -4850,7 +4850,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_typescript" -version = "0.188.18" +version = "0.188.19" dependencies = [ "criterion", "ryu-js", @@ -4872,7 +4872,7 @@ dependencies = [ [[package]] name = "swc_ecma_usage_analyzer" -version = "0.23.13" +version = "0.23.14" dependencies = [ "indexmap 2.1.0", "rustc-hash", @@ -4887,7 +4887,7 @@ dependencies = [ [[package]] name = "swc_ecma_utils" -version = "0.127.18" +version = "0.127.19" dependencies = [ "indexmap 2.1.0", "num_cpus", @@ -4954,7 +4954,7 @@ dependencies = [ [[package]] name = "swc_estree_ast" -version = "0.23.19" +version = "0.23.20" dependencies = [ "better_scoped_tls", "serde", @@ -4991,7 +4991,7 @@ dependencies = [ [[package]] name = "swc_fast_graph" -version = "0.21.20" +version = "0.21.21" dependencies = [ "indexmap 2.1.0", "petgraph", @@ -5036,7 +5036,7 @@ dependencies = [ [[package]] name = "swc_html_codegen" -version = "0.42.24" +version = "0.42.25" dependencies = [ "auto_impl", "bitflags 2.5.0", @@ -5063,7 +5063,7 @@ dependencies = [ [[package]] name = "swc_html_minifier" -version = "0.134.18" +version = "0.134.19" dependencies = [ "criterion", "once_cell", @@ -5093,7 +5093,7 @@ dependencies = [ [[package]] name = "swc_html_parser" -version = "0.39.25" +version = "0.39.26" dependencies = [ "criterion", "serde", @@ -5131,7 +5131,7 @@ dependencies = [ [[package]] name = "swc_macros_common" -version = "0.3.9" +version = "0.3.10" dependencies = [ "proc-macro2", "quote", @@ -5148,7 +5148,7 @@ dependencies = [ [[package]] name = "swc_node_bundler" -version = "0.62.23" +version = "0.62.24" dependencies = [ "anyhow", "dashmap", @@ -5214,7 +5214,7 @@ dependencies = [ [[package]] name = "swc_plugin_proxy" -version = "0.41.6" +version = "0.41.7" dependencies = [ "better_scoped_tls", "rkyv", @@ -5226,7 +5226,7 @@ dependencies = [ [[package]] name = "swc_plugin_runner" -version = "0.106.15" +version = "0.106.16" dependencies = [ "anyhow", "criterion", @@ -5319,7 +5319,7 @@ dependencies = [ [[package]] name = "swc_xml_codegen" -version = "0.13.21" +version = "0.13.22" dependencies = [ "auto_impl", "bitflags 2.5.0", @@ -5345,7 +5345,7 @@ dependencies = [ [[package]] name = "swc_xml_parser" -version = "0.13.22" +version = "0.13.23" dependencies = [ "serde", "serde_json", @@ -5508,7 +5508,7 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "testing" -version = "0.35.22" +version = "0.35.23" dependencies = [ "ansi_term", "cargo_metadata 0.15.4", diff --git a/crates/ast_node/Cargo.toml b/crates/ast_node/Cargo.toml index 8262bb066025..5f0852d71773 100644 --- a/crates/ast_node/Cargo.toml +++ b/crates/ast_node/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "ast_node" repository = "https://github.com/swc-project/swc.git" -version = "0.9.6" +version = "0.9.7" [lib] bench = false diff --git a/crates/string_enum/Cargo.toml b/crates/string_enum/Cargo.toml index 2817bd097319..0fe8cc7e85e7 100644 --- a/crates/string_enum/Cargo.toml +++ b/crates/string_enum/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "string_enum" repository = "https://github.com/swc-project/swc.git" -version = "0.4.2" +version = "0.4.3" [lib] bench = false diff --git a/crates/swc/Cargo.toml b/crates/swc/Cargo.toml index aa72935b344f..7febe75165ff 100644 --- a/crates/swc/Cargo.toml +++ b/crates/swc/Cargo.toml @@ -9,7 +9,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc" repository = "https://github.com/swc-project/swc.git" -version = "0.273.25" +version = "0.273.26" [lib] bench = false diff --git a/crates/swc_bundler/Cargo.toml b/crates/swc_bundler/Cargo.toml index 1ca5e292776f..38b6a1dc8430 100644 --- a/crates/swc_bundler/Cargo.toml +++ b/crates/swc_bundler/Cargo.toml @@ -9,7 +9,7 @@ include = ["Cargo.toml", "build.rs", "src/**/*.rs", "src/**/*.js"] license = "Apache-2.0" name = "swc_bundler" repository = "https://github.com/swc-project/swc.git" -version = "0.225.18" +version = "0.225.19" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_cli_impl/Cargo.toml b/crates/swc_cli_impl/Cargo.toml index fdc6d92f2959..3e71d7ca030a 100644 --- a/crates/swc_cli_impl/Cargo.toml +++ b/crates/swc_cli_impl/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli_impl" repository = "https://github.com/swc-project/swc.git" -version = "0.8.24" +version = "0.8.25" [[bin]] name = "swc" diff --git a/crates/swc_common/Cargo.toml b/crates/swc_common/Cargo.toml index 44e865cbeadc..072c63b217f8 100644 --- a/crates/swc_common/Cargo.toml +++ b/crates/swc_common/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_common" repository = "https://github.com/swc-project/swc.git" -version = "0.33.23" +version = "0.33.24" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_css_codegen/Cargo.toml b/crates/swc_css_codegen/Cargo.toml index a5ecc28de68d..ce584f3c9976 100644 --- a/crates/swc_css_codegen/Cargo.toml +++ b/crates/swc_css_codegen/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_css_codegen" repository = "https://github.com/swc-project/swc.git" -version = "0.151.32" +version = "0.151.33" [lib] bench = false diff --git a/crates/swc_css_compat/Cargo.toml b/crates/swc_css_compat/Cargo.toml index eeec71b154b6..68fe4ef0b0fb 100644 --- a/crates/swc_css_compat/Cargo.toml +++ b/crates/swc_css_compat/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/**/*.json", "data/**/*.json"] license = "Apache-2.0" name = "swc_css_compat" repository = "https://github.com/swc-project/swc.git" -version = "0.27.33" +version = "0.27.34" [lib] bench = false diff --git a/crates/swc_css_parser/Cargo.toml b/crates/swc_css_parser/Cargo.toml index 8e09f2a04aa0..aab9915891ad 100644 --- a/crates/swc_css_parser/Cargo.toml +++ b/crates/swc_css_parser/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_css_parser" repository = "https://github.com/swc-project/swc.git" -version = "0.150.31" +version = "0.150.32" [lib] bench = false diff --git a/crates/swc_ecma_ast/Cargo.toml b/crates/swc_ecma_ast/Cargo.toml index 5a6c27ffe574..2e6f5894cded 100644 --- a/crates/swc_ecma_ast/Cargo.toml +++ b/crates/swc_ecma_ast/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_ast" repository = "https://github.com/swc-project/swc.git" -version = "0.112.7" +version = "0.112.8" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_ecma_codegen/Cargo.toml b/crates/swc_ecma_codegen/Cargo.toml index 44da712ff44d..f60f31cc18aa 100644 --- a/crates/swc_ecma_codegen/Cargo.toml +++ b/crates/swc_ecma_codegen/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_codegen" repository = "https://github.com/swc-project/swc.git" -version = "0.148.15" +version = "0.148.16" [features] # This does not enable serde for ast nodes. diff --git a/crates/swc_ecma_codegen_macros/Cargo.toml b/crates/swc_ecma_codegen_macros/Cargo.toml index 51b293717a7e..1b4c59b50a4c 100644 --- a/crates/swc_ecma_codegen_macros/Cargo.toml +++ b/crates/swc_ecma_codegen_macros/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_codegen_macros" repository = "https://github.com/swc-project/swc.git" -version = "0.7.4" +version = "0.7.5" [lib] bench = false diff --git a/crates/swc_ecma_compat_es2015/Cargo.toml b/crates/swc_ecma_compat_es2015/Cargo.toml index d7a791a4c2e4..f5a7f092d923 100644 --- a/crates/swc_ecma_compat_es2015/Cargo.toml +++ b/crates/swc_ecma_compat_es2015/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_compat_es2015" repository = "https://github.com/swc-project/swc.git" -version = "0.4.18" +version = "0.4.19" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/swc_ecma_compat_es2022/Cargo.toml b/crates/swc_ecma_compat_es2022/Cargo.toml index 91197c14b010..f605b8b86d51 100644 --- a/crates/swc_ecma_compat_es2022/Cargo.toml +++ b/crates/swc_ecma_compat_es2022/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_compat_es2022" repository = "https://github.com/swc-project/swc.git" -version = "0.4.16" +version = "0.4.17" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/swc_ecma_lints/Cargo.toml b/crates/swc_ecma_lints/Cargo.toml index 54931d850850..d4a84d9c72ef 100644 --- a/crates/swc_ecma_lints/Cargo.toml +++ b/crates/swc_ecma_lints/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_lints" repository = "https://github.com/swc-project/swc.git" -version = "0.92.20" +version = "0.92.21" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] diff --git a/crates/swc_ecma_loader/Cargo.toml b/crates/swc_ecma_loader/Cargo.toml index b8932567921a..0c464900c8c1 100644 --- a/crates/swc_ecma_loader/Cargo.toml +++ b/crates/swc_ecma_loader/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_loader" repository = "https://github.com/swc-project/swc.git" -version = "0.45.25" +version = "0.45.26" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_ecma_minifier/Cargo.toml b/crates/swc_ecma_minifier/Cargo.toml index a7e3c6e9dc98..754720987458 100644 --- a/crates/swc_ecma_minifier/Cargo.toml +++ b/crates/swc_ecma_minifier/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/lists/*.json"] license = "Apache-2.0" name = "swc_ecma_minifier" repository = "https://github.com/swc-project/swc.git" -version = "0.192.22" +version = "0.192.23" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_ecma_parser/Cargo.toml b/crates/swc_ecma_parser/Cargo.toml index 1dc24a53c868..9efa7e3cade2 100644 --- a/crates/swc_ecma_parser/Cargo.toml +++ b/crates/swc_ecma_parser/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "examples/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_parser" repository = "https://github.com/swc-project/swc.git" -version = "0.143.14" +version = "0.143.15" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_ecma_transforms_base/Cargo.toml b/crates/swc_ecma_transforms_base/Cargo.toml index 93083e42c6da..1b0df31d53af 100644 --- a/crates/swc_ecma_transforms_base/Cargo.toml +++ b/crates/swc_ecma_transforms_base/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/**/*.js"] license = "Apache-2.0" name = "swc_ecma_transforms_base" repository = "https://github.com/swc-project/swc.git" -version = "0.137.19" +version = "0.137.20" [lib] bench = false diff --git a/crates/swc_ecma_transforms_optimization/Cargo.toml b/crates/swc_ecma_transforms_optimization/Cargo.toml index 5408c67840ad..2a134dbb5cf0 100644 --- a/crates/swc_ecma_transforms_optimization/Cargo.toml +++ b/crates/swc_ecma_transforms_optimization/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_optimization" repository = "https://github.com/swc-project/swc.git" -version = "0.198.20" +version = "0.198.21" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] diff --git a/crates/swc_ecma_transforms_react/Cargo.toml b/crates/swc_ecma_transforms_react/Cargo.toml index 3327692aa1d3..09b5a3c94a4c 100644 --- a/crates/swc_ecma_transforms_react/Cargo.toml +++ b/crates/swc_ecma_transforms_react/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_react" repository = "https://github.com/swc-project/swc.git" -version = "0.183.18" +version = "0.183.19" [lib] bench = false diff --git a/crates/swc_ecma_transforms_typescript/Cargo.toml b/crates/swc_ecma_transforms_typescript/Cargo.toml index 9ae4bc63a42e..2be0131b6908 100644 --- a/crates/swc_ecma_transforms_typescript/Cargo.toml +++ b/crates/swc_ecma_transforms_typescript/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_typescript" repository = "https://github.com/swc-project/swc.git" -version = "0.188.18" +version = "0.188.19" [lib] bench = false diff --git a/crates/swc_ecma_usage_analyzer/Cargo.toml b/crates/swc_ecma_usage_analyzer/Cargo.toml index 52a694da0f15..6e16750f2886 100644 --- a/crates/swc_ecma_usage_analyzer/Cargo.toml +++ b/crates/swc_ecma_usage_analyzer/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_usage_analyzer" repository = "https://github.com/swc-project/swc.git" -version = "0.23.13" +version = "0.23.14" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_ecma_utils/Cargo.toml b/crates/swc_ecma_utils/Cargo.toml index dd50f469316d..cc3c09df1e8b 100644 --- a/crates/swc_ecma_utils/Cargo.toml +++ b/crates/swc_ecma_utils/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_utils" repository = "https://github.com/swc-project/swc.git" -version = "0.127.18" +version = "0.127.19" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_estree_ast/Cargo.toml b/crates/swc_estree_ast/Cargo.toml index 21c900b28a3d..451bbfb1778f 100644 --- a/crates/swc_estree_ast/Cargo.toml +++ b/crates/swc_estree_ast/Cargo.toml @@ -9,7 +9,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_estree_ast" repository = "https://github.com/swc-project/swc.git" -version = "0.23.19" +version = "0.23.20" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_fast_graph/Cargo.toml b/crates/swc_fast_graph/Cargo.toml index 4d13f0caba7a..aa2779989754 100644 --- a/crates/swc_fast_graph/Cargo.toml +++ b/crates/swc_fast_graph/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_fast_graph" repository = "https://github.com/swc-project/swc.git" -version = "0.21.20" +version = "0.21.21" [lib] bench = false diff --git a/crates/swc_html_codegen/Cargo.toml b/crates/swc_html_codegen/Cargo.toml index 50362ac99c59..ecdc1d34561d 100644 --- a/crates/swc_html_codegen/Cargo.toml +++ b/crates/swc_html_codegen/Cargo.toml @@ -10,7 +10,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_html_codegen" repository = "https://github.com/swc-project/swc.git" -version = "0.42.24" +version = "0.42.25" [lib] bench = false diff --git a/crates/swc_html_minifier/Cargo.toml b/crates/swc_html_minifier/Cargo.toml index cc1f8289e891..b0e45651b276 100644 --- a/crates/swc_html_minifier/Cargo.toml +++ b/crates/swc_html_minifier/Cargo.toml @@ -10,7 +10,7 @@ include = ["Cargo.toml", "src/**/*.rs", "data/**/*.json"] license = "Apache-2.0" name = "swc_html_minifier" repository = "https://github.com/swc-project/swc.git" -version = "0.134.18" +version = "0.134.19" [lib] bench = false diff --git a/crates/swc_html_parser/Cargo.toml b/crates/swc_html_parser/Cargo.toml index 9cfe52c7c07b..993be377b13e 100644 --- a/crates/swc_html_parser/Cargo.toml +++ b/crates/swc_html_parser/Cargo.toml @@ -10,7 +10,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/**/*.json"] license = "Apache-2.0" name = "swc_html_parser" repository = "https://github.com/swc-project/swc.git" -version = "0.39.25" +version = "0.39.26" [lib] bench = false diff --git a/crates/swc_macros_common/Cargo.toml b/crates/swc_macros_common/Cargo.toml index 546162be69bc..5b792182cbef 100644 --- a/crates/swc_macros_common/Cargo.toml +++ b/crates/swc_macros_common/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_macros_common" repository = "https://github.com/swc-project/swc.git" -version = "0.3.9" +version = "0.3.10" [lib] bench = false diff --git a/crates/swc_node_bundler/Cargo.toml b/crates/swc_node_bundler/Cargo.toml index eada2ced258f..1a719787591d 100644 --- a/crates/swc_node_bundler/Cargo.toml +++ b/crates/swc_node_bundler/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_node_bundler" repository = "https://github.com/swc-project/swc.git" -version = "0.62.23" +version = "0.62.24" [lib] bench = false diff --git a/crates/swc_plugin_proxy/Cargo.toml b/crates/swc_plugin_proxy/Cargo.toml index 8010e315a685..5a17e22669b4 100644 --- a/crates/swc_plugin_proxy/Cargo.toml +++ b/crates/swc_plugin_proxy/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_plugin_proxy" repository = "https://github.com/swc-project/swc.git" -version = "0.41.6" +version = "0.41.7" [lib] bench = false diff --git a/crates/swc_plugin_runner/Cargo.toml b/crates/swc_plugin_runner/Cargo.toml index 6b6168874be5..fc6cd21f92d6 100644 --- a/crates/swc_plugin_runner/Cargo.toml +++ b/crates/swc_plugin_runner/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_plugin_runner" repository = "https://github.com/swc-project/swc.git" -version = "0.106.15" +version = "0.106.16" [lib] bench = false diff --git a/crates/swc_xml_codegen/Cargo.toml b/crates/swc_xml_codegen/Cargo.toml index e7fa302dbf6b..b23392c86cbe 100644 --- a/crates/swc_xml_codegen/Cargo.toml +++ b/crates/swc_xml_codegen/Cargo.toml @@ -10,7 +10,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_xml_codegen" repository = "https://github.com/swc-project/swc.git" -version = "0.13.21" +version = "0.13.22" [lib] bench = false diff --git a/crates/swc_xml_parser/Cargo.toml b/crates/swc_xml_parser/Cargo.toml index bb2f9ec3995a..d47a3080c1c7 100644 --- a/crates/swc_xml_parser/Cargo.toml +++ b/crates/swc_xml_parser/Cargo.toml @@ -10,7 +10,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/**/*.json"] license = "Apache-2.0" name = "swc_xml_parser" repository = "https://github.com/swc-project/swc.git" -version = "0.13.22" +version = "0.13.23" [lib] bench = false diff --git a/crates/testing/Cargo.toml b/crates/testing/Cargo.toml index 2147dafc7a9e..bd5be474cd44 100644 --- a/crates/testing/Cargo.toml +++ b/crates/testing/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "testing" repository = "https://github.com/swc-project/swc.git" -version = "0.35.22" +version = "0.35.23" [lib] bench = false From df2e056f299c84d309bcc0d26e1da55a561614af Mon Sep 17 00:00:00 2001 From: David E Disch Date: Tue, 16 Apr 2024 13:05:43 +1000 Subject: [PATCH 129/172] refactor(es/minifier): Remove `mangle.safari10` (#8857) **Related issue:** - Closes #8837 --- crates/swc_ecma_minifier/benches/full.rs | 1 - crates/swc_ecma_minifier/src/option/mod.rs | 1 + .../src/pass/mangle_names/mod.rs | 2 +- .../broken_safari_catch_scope/output.js | 4 +- .../output.js | 4 +- .../src/hygiene/mod.rs | 1 + .../src/rename/analyzer/mod.rs | 47 +++++-------------- .../src/rename/mod.rs | 1 - 8 files changed, 18 insertions(+), 43 deletions(-) diff --git a/crates/swc_ecma_minifier/benches/full.rs b/crates/swc_ecma_minifier/benches/full.rs index aa2c8028d9d6..213a6eb9b370 100644 --- a/crates/swc_ecma_minifier/benches/full.rs +++ b/crates/swc_ecma_minifier/benches/full.rs @@ -83,7 +83,6 @@ fn run(src: &str) { keep_fn_names: false, keep_private_props: false, ie8: false, - safari10: false, ..Default::default() }), wrap: false, diff --git a/crates/swc_ecma_minifier/src/option/mod.rs b/crates/swc_ecma_minifier/src/option/mod.rs index 227a83317fce..d74fb6a43f30 100644 --- a/crates/swc_ecma_minifier/src/option/mod.rs +++ b/crates/swc_ecma_minifier/src/option/mod.rs @@ -75,6 +75,7 @@ pub struct MangleOptions { #[serde(default, alias = "ie8")] pub ie8: bool, + #[deprecated = "This field is no longer required to work around bugs in Safari 10."] #[serde(default, alias = "safari10")] pub safari10: bool, diff --git a/crates/swc_ecma_minifier/src/pass/mangle_names/mod.rs b/crates/swc_ecma_minifier/src/pass/mangle_names/mod.rs index 3d9057e7aa65..31bc4aa7e38e 100644 --- a/crates/swc_ecma_minifier/src/pass/mangle_names/mod.rs +++ b/crates/swc_ecma_minifier/src/pass/mangle_names/mod.rs @@ -27,9 +27,9 @@ pub(crate) fn name_mangler( renamer( swc_ecma_transforms_base::hygiene::Config { keep_class_names: options.keep_class_names, - safari_10: options.safari10, top_level_mark, ignore_eval: options.eval, + ..Default::default() }, ManglingRenamer { chars, preserved } ) diff --git a/crates/swc_ecma_minifier/tests/terser/compress/try_catch/broken_safari_catch_scope/output.js b/crates/swc_ecma_minifier/tests/terser/compress/try_catch/broken_safari_catch_scope/output.js index 4c9339ae1606..6300388b6047 100644 --- a/crates/swc_ecma_minifier/tests/terser/compress/try_catch/broken_safari_catch_scope/output.js +++ b/crates/swc_ecma_minifier/tests/terser/compress/try_catch/broken_safari_catch_scope/output.js @@ -6,8 +6,8 @@ new class { throw { m: "PASS" }; - } catch ({ m: B }) { - console.log(B); + } catch ({ m: A }) { + console.log(A); } } }().f(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/try_catch/broken_safari_catch_scope_caveat/output.js b/crates/swc_ecma_minifier/tests/terser/compress/try_catch/broken_safari_catch_scope_caveat/output.js index 4c9339ae1606..66d44b0d3f97 100644 --- a/crates/swc_ecma_minifier/tests/terser/compress/try_catch/broken_safari_catch_scope_caveat/output.js +++ b/crates/swc_ecma_minifier/tests/terser/compress/try_catch/broken_safari_catch_scope_caveat/output.js @@ -6,8 +6,8 @@ new class { throw { m: "PASS" }; - } catch ({ m: B }) { - console.log(B); + } catch ({ m: A }) { + console.log(A); } } }().f(); diff --git a/crates/swc_ecma_transforms_base/src/hygiene/mod.rs b/crates/swc_ecma_transforms_base/src/hygiene/mod.rs index 971bcf5be3d1..d2d4df57dc9c 100644 --- a/crates/swc_ecma_transforms_base/src/hygiene/mod.rs +++ b/crates/swc_ecma_transforms_base/src/hygiene/mod.rs @@ -14,6 +14,7 @@ pub struct Config { pub keep_class_names: bool, /// If true, the bug of safari 10 is avoided. + #[deprecated = "This field is no longer required to work around bugs in Safari 10."] pub safari_10: bool, /// The marks derived from this marks will treated as `specified by user` diff --git a/crates/swc_ecma_transforms_base/src/rename/analyzer/mod.rs b/crates/swc_ecma_transforms_base/src/rename/analyzer/mod.rs index acd2076b8937..22d92b4ae139 100644 --- a/crates/swc_ecma_transforms_base/src/rename/analyzer/mod.rs +++ b/crates/swc_ecma_transforms_base/src/rename/analyzer/mod.rs @@ -9,7 +9,6 @@ pub(super) mod scope; #[derive(Debug, Default)] pub(super) struct Analyzer { - pub safari_10: bool, /// If `eval` exists for the current scope, we only rename synthesized /// identifiers. pub has_eval: bool, @@ -50,7 +49,6 @@ impl Analyzer { { { let mut v = Analyzer { - safari_10: self.safari_10, has_eval: self.has_eval, top_level_mark: self.top_level_mark, @@ -153,43 +151,20 @@ impl Visit for Analyzer { } fn visit_catch_clause(&mut self, n: &CatchClause) { - if self.safari_10 { - let old_is_pat_decl = self.is_pat_decl; - let old_in_catch_params = self.in_catch_params; - - self.is_pat_decl = true; - self.in_catch_params = true; - n.param.visit_with(self); - - self.in_catch_params = old_in_catch_params; - self.is_pat_decl = old_is_pat_decl; - - self.with_scope(ScopeKind::Block, |v| { - let old = v.is_pat_decl; - let old_in_catch_params = v.in_catch_params; - - v.is_pat_decl = false; - n.body.visit_children_with(v); - - v.is_pat_decl = old; - v.in_catch_params = old_in_catch_params; - }) - } else { - self.with_scope(ScopeKind::Block, |v| { - let old = v.is_pat_decl; - let old_in_catch_params = v.in_catch_params; + self.with_scope(ScopeKind::Block, |v| { + let old = v.is_pat_decl; + let old_in_catch_params = v.in_catch_params; - v.is_pat_decl = false; - n.body.visit_children_with(v); + v.is_pat_decl = false; + n.body.visit_children_with(v); - v.is_pat_decl = true; - v.in_catch_params = true; - n.param.visit_with(v); + v.is_pat_decl = true; + v.in_catch_params = true; + n.param.visit_with(v); - v.is_pat_decl = old; - v.in_catch_params = old_in_catch_params; - }) - } + v.is_pat_decl = old; + v.in_catch_params = old_in_catch_params; + }) } fn visit_class_decl(&mut self, c: &ClassDecl) { diff --git a/crates/swc_ecma_transforms_base/src/rename/mod.rs b/crates/swc_ecma_transforms_base/src/rename/mod.rs index 858397584314..2ff6f8542cf8 100644 --- a/crates/swc_ecma_transforms_base/src/rename/mod.rs +++ b/crates/swc_ecma_transforms_base/src/rename/mod.rs @@ -132,7 +132,6 @@ where { let mut scope = { let mut v = Analyzer { - safari_10: self.config.safari_10, has_eval, top_level_mark: self.config.top_level_mark, From af19385097e78303ef95f805c3967091c7a6d5fa Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 16 Apr 2024 03:07:23 +0000 Subject: [PATCH 130/172] chore: Bump crates --- CHANGELOG.md | 14 ++++++-------- Cargo.lock | 2 +- crates/swc_core/Cargo.toml | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d8a7a3e56412..ed9bb3f275c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,12 @@ - **(es/proposal)** Update explicit resource management to match spec ([#8860](https://github.com/swc-project/swc/issues/8860)) ([6d24076](https://github.com/swc-project/swc/commit/6d240768b11cd6cabd347a54c135cb8937df2240)) +### Refactor + + + +- **(es/minifier)** Remove `mangle.safari10` ([#8857](https://github.com/swc-project/swc/issues/8857)) ([df2e056](https://github.com/swc-project/swc/commit/df2e056f299c84d309bcc0d26e1da55a561614af)) + ### Build @@ -1360,12 +1366,4 @@ - **(es/typescript)** Reimplement TypeScript pass ([#7202](https://github.com/swc-project/swc/issues/7202)) ([9c9a538](https://github.com/swc-project/swc/commit/9c9a538f23cb2bcd2f46e156babf64c7a81db245)) -## [1.3.88] - 2023-09-24 - -### Features - - - -- **(es/config)** Accept `jsc.experimental.keepImportAssertions` ([#7995](https://github.com/swc-project/swc/issues/7995)) ([4d777ee](https://github.com/swc-project/swc/commit/4d777ee270183ba375b68c003e61692af6d571c3)) - diff --git a/Cargo.lock b/Cargo.lock index a5e1836017a3..243339df9bd3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3936,7 +3936,7 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.90.32" +version = "0.90.33" dependencies = [ "anyhow", "binding_macros", diff --git a/crates/swc_core/Cargo.toml b/crates/swc_core/Cargo.toml index bbf1a1434df6..5b56081e0495 100644 --- a/crates/swc_core/Cargo.toml +++ b/crates/swc_core/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_core" repository = "https://github.com/swc-project/swc.git" -version = "0.90.32" +version = "0.90.33" [package.metadata.docs.rs] features = [ "allocator_node", From 740c0bb00a0bb9e0f4d808c9dc71e8087d416f72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Tue, 16 Apr 2024 13:39:54 +0900 Subject: [PATCH 131/172] fix(es/minifier): Remove `raw` of strings after modification (#8865) **Related issue:** - Closes #8864 --- .../src/compress/pure/evaluate.rs | 3 ++- crates/swc_ecma_minifier/tests/exec.rs | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/crates/swc_ecma_minifier/src/compress/pure/evaluate.rs b/crates/swc_ecma_minifier/src/compress/pure/evaluate.rs index 1c29a585a298..ee3e60ba70e3 100644 --- a/crates/swc_ecma_minifier/src/compress/pure/evaluate.rs +++ b/crates/swc_ecma_minifier/src/compress/pure/evaluate.rs @@ -742,9 +742,10 @@ impl Pure<'_> { }; self.changed = true; - report_change!("evaluate: Evaluated `{}` of a string literal", method); + report_change!("evaluate: Evaluated `{method}` of a string literal"); *e = Expr::Lit(Lit::Str(Str { value: new_val.into(), + raw: None, ..s })); } diff --git a/crates/swc_ecma_minifier/tests/exec.rs b/crates/swc_ecma_minifier/tests/exec.rs index 59374233bafc..c7d625194b94 100644 --- a/crates/swc_ecma_minifier/tests/exec.rs +++ b/crates/swc_ecma_minifier/tests/exec.rs @@ -11193,3 +11193,22 @@ fn issue_8246_1() { false, ); } + +#[test] +fn issue_8864_1() { + run_default_exec_test( + " + class Renderer { + renderStaticFrame(string1, string2) { + const line1Text = `${string1} and ${string2}`.toUpperCase(); + const line2Text = 'line 2 text'.toUpperCase(); + + const text = `${line1Text}\n${line2Text}`; + return text; + } + } + + console.log(new Renderer().renderStaticFrame('a', 'b')); + ", + ) +} From 4d73326c0d78be4368e260ef16dbc32685904fdf Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 16 Apr 2024 04:41:34 +0000 Subject: [PATCH 132/172] chore: Bump crates --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed9bb3f275c1..105e44068b27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ +- **(es/minifier)** Remove `raw` of strings after modification ([#8865](https://github.com/swc-project/swc/issues/8865)) ([740c0bb](https://github.com/swc-project/swc/commit/740c0bb00a0bb9e0f4d808c9dc71e8087d416f72)) + + - **(es/parser)** Fix span of `BindingIdent` ([#8859](https://github.com/swc-project/swc/issues/8859)) ([fbd32fb](https://github.com/swc-project/swc/commit/fbd32fbff323ff4116e82d2dd1d763f7f3844de2)) From 2075a23373eac575240ab33778079174505cdcb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Tue, 16 Apr 2024 14:21:45 +0900 Subject: [PATCH 133/172] fix(es/codegen): Fix `ascii_only` for identifiers (#8866) **Related issue:** - Closes #8852 --- .../fixture/issues-8xxx/8260/output/1.js | 2 +- .../fixture/issues-8xxx/8852/input/.swcrc | 21 +++++++++++++++ .../tests/fixture/issues-8xxx/8852/input/1.js | 2 ++ .../tests/fixture/issues-8xxx/8852/input/2.js | 2 ++ .../fixture/issues-8xxx/8852/output/1.js | 2 ++ .../fixture/issues-8xxx/8852/output/2.js | 2 ++ crates/swc_ecma_codegen/src/lib.rs | 26 +++++++++++++++---- 7 files changed, 51 insertions(+), 6 deletions(-) create mode 100644 crates/swc/tests/fixture/issues-8xxx/8852/input/.swcrc create mode 100644 crates/swc/tests/fixture/issues-8xxx/8852/input/1.js create mode 100644 crates/swc/tests/fixture/issues-8xxx/8852/input/2.js create mode 100644 crates/swc/tests/fixture/issues-8xxx/8852/output/1.js create mode 100644 crates/swc/tests/fixture/issues-8xxx/8852/output/2.js diff --git a/crates/swc/tests/fixture/issues-8xxx/8260/output/1.js b/crates/swc/tests/fixture/issues-8xxx/8260/output/1.js index ec1e52900f89..f445e9fe77ed 100644 --- a/crates/swc/tests/fixture/issues-8xxx/8260/output/1.js +++ b/crates/swc/tests/fixture/issues-8xxx/8260/output/1.js @@ -1,2 +1,2 @@ -function p(\xb5, \u03C3) {} +function p(\u00b5, \u03C3) {} console.log(p); diff --git a/crates/swc/tests/fixture/issues-8xxx/8852/input/.swcrc b/crates/swc/tests/fixture/issues-8xxx/8852/input/.swcrc new file mode 100644 index 000000000000..7d24715868e1 --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8852/input/.swcrc @@ -0,0 +1,21 @@ +{ + "jsc": { + "parser": { + "syntax": "ecmascript", + "jsx": false + }, + "target": "es3", + "loose": false, + "minify": { + "compress": false, + "format": { + "asciiOnly": true + } + } + }, + "module": { + "type": "es6" + }, + "minify": false, + "isModule": true +} \ No newline at end of file diff --git a/crates/swc/tests/fixture/issues-8xxx/8852/input/1.js b/crates/swc/tests/fixture/issues-8xxx/8852/input/1.js new file mode 100644 index 000000000000..8b5ab0df9e4a --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8852/input/1.js @@ -0,0 +1,2 @@ +const módulo = 123; +console.log(módulo); \ No newline at end of file diff --git a/crates/swc/tests/fixture/issues-8xxx/8852/input/2.js b/crates/swc/tests/fixture/issues-8xxx/8852/input/2.js new file mode 100644 index 000000000000..bec72a0f757c --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8852/input/2.js @@ -0,0 +1,2 @@ +const m\u00f3dulo = 123; +console.log(m\u00f3dulo); \ No newline at end of file diff --git a/crates/swc/tests/fixture/issues-8xxx/8852/output/1.js b/crates/swc/tests/fixture/issues-8xxx/8852/output/1.js new file mode 100644 index 000000000000..531fbe78d9f2 --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8852/output/1.js @@ -0,0 +1,2 @@ +var m\u00f3dulo = 123; +console.log(m\u00f3dulo); diff --git a/crates/swc/tests/fixture/issues-8xxx/8852/output/2.js b/crates/swc/tests/fixture/issues-8xxx/8852/output/2.js new file mode 100644 index 000000000000..531fbe78d9f2 --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8852/output/2.js @@ -0,0 +1,2 @@ +var m\u00f3dulo = 123; +console.log(m\u00f3dulo); diff --git a/crates/swc_ecma_codegen/src/lib.rs b/crates/swc_ecma_codegen/src/lib.rs index f2260dc2d73f..d5bd57cbea21 100644 --- a/crates/swc_ecma_codegen/src/lib.rs +++ b/crates/swc_ecma_codegen/src/lib.rs @@ -3871,7 +3871,12 @@ fn get_ascii_only_ident(sym: &str, may_need_quote: bool, target: EsVersion) -> C while let Some(c) = iter.next() { match c { '\x00' => { - buf.push_str("\\x00"); + if may_need_quote { + need_quote = true; + let _ = write!(buf, "\\x00"); + } else { + let _ = write!(buf, "\\u0000"); + } } '\u{0008}' => buf.push_str("\\b"), '\u{000c}' => buf.push_str("\\f"), @@ -3959,10 +3964,20 @@ fn get_ascii_only_ident(sym: &str, may_need_quote: bool, target: EsVersion) -> C buf.push('"'); } '\x01'..='\x0f' if !first => { - let _ = write!(buf, "\\x0{:x}", c as u8); + if may_need_quote { + need_quote = true; + let _ = write!(buf, "\\x{:x}", c as u8); + } else { + let _ = write!(buf, "\\u00{:x}", c as u8); + } } '\x10'..='\x1f' if !first => { - let _ = write!(buf, "\\x{:x}", c as u8); + if may_need_quote { + need_quote = true; + let _ = write!(buf, "\\x{:x}", c as u8); + } else { + let _ = write!(buf, "\\u00{:x}", c as u8); + } } '\x20'..='\x7e' => { buf.push(c); @@ -3970,9 +3985,10 @@ fn get_ascii_only_ident(sym: &str, may_need_quote: bool, target: EsVersion) -> C '\u{7f}'..='\u{ff}' => { if may_need_quote { need_quote = true; + let _ = write!(buf, "\\x{:x}", c as u8); + } else { + let _ = write!(buf, "\\u00{:x}", c as u8); } - - let _ = write!(buf, "\\x{:x}", c as u8); } '\u{2028}' => { buf.push_str("\\u2028"); From 81a57fdcd6c761fc9c2f08f36dbb4e5e1aa1861f Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 16 Apr 2024 05:23:25 +0000 Subject: [PATCH 134/172] chore: Bump crates --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 105e44068b27..60d19fcfc2ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ +- **(es/codegen)** Fix `ascii_only` for identifiers ([#8866](https://github.com/swc-project/swc/issues/8866)) ([2075a23](https://github.com/swc-project/swc/commit/2075a23373eac575240ab33778079174505cdcb4)) + + - **(es/minifier)** Remove `raw` of strings after modification ([#8865](https://github.com/swc-project/swc/issues/8865)) ([740c0bb](https://github.com/swc-project/swc/commit/740c0bb00a0bb9e0f4d808c9dc71e8087d416f72)) @@ -1358,9 +1361,6 @@ -- **(es)** Enable resolver if `jsc.baseUrl` is specified ([#7998](https://github.com/swc-project/swc/issues/7998)) ([f374ad9](https://github.com/swc-project/swc/commit/f374ad903a066ebf3a7e54a3656cb3fc44b37445)) - - - **(es/compat)** Skip function scope in `block-scoped-fns` pass ([#7975](https://github.com/swc-project/swc/issues/7975)) ([d91a554](https://github.com/swc-project/swc/commit/d91a554033c8ce0ea2b2538b0e86abf5a81eac76)) ### Refactor From a1c5415b3b84fdb8f780685e5eec4a121d442e28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Tue, 16 Apr 2024 19:43:58 +0900 Subject: [PATCH 135/172] feat(es/transforms): Allocate stacks dynamically (#8867) **Description:** - This PR introduces an in-tree testing system for Deno. - This PR adds `stacker` cargo-feature to `swc_ecma_utils`. **Related issue:** - #1627 - Closes #8840 --- .github/workflows/CI.yml | 7 +- Cargo.lock | 1 + crates/swc_core/Cargo.toml | 3 + crates/swc_ecma_minifier/src/util/mod.rs | 6 +- crates/swc_ecma_transforms/tests/deno.rs | 55 + .../deno/stack-overflow/add-1/input.ts | 5028 +++++++++++++++++ .../deno/stack-overflow/add-1/output.js | 1 + .../deno/stack-overflow/which/input.ts | 180 + .../deno/stack-overflow/which/output.js | 118 + crates/swc_ecma_transforms_base/src/fixer.rs | 3 +- .../src/hygiene/mod.rs | 7 +- .../src/rename/analyzer/mod.rs | 3 +- .../src/rename/collector.rs | 8 +- .../src/rename/eval.rs | 17 +- .../src/rename/mod.rs | 5 + .../src/rename/ops.rs | 168 +- .../src/resolver/mod.rs | 4 +- .../src/decorator_2022_03.rs | 4 +- .../src/explicit_resource_management.rs | 9 +- .../src/strip_import_export.rs | 5 + .../src/strip_type.rs | 3 +- .../src/transform.rs | 5 +- crates/swc_ecma_utils/Cargo.toml | 3 + crates/swc_ecma_utils/src/lib.rs | 1 + crates/swc_ecma_utils/src/stack_size.rs | 29 + 25 files changed, 5569 insertions(+), 104 deletions(-) create mode 100644 crates/swc_ecma_transforms/tests/deno.rs create mode 100644 crates/swc_ecma_transforms/tests/fixture/deno/stack-overflow/add-1/input.ts create mode 100644 crates/swc_ecma_transforms/tests/fixture/deno/stack-overflow/add-1/output.js create mode 100644 crates/swc_ecma_transforms/tests/fixture/deno/stack-overflow/which/input.ts create mode 100644 crates/swc_ecma_transforms/tests/fixture/deno/stack-overflow/which/output.js create mode 100644 crates/swc_ecma_utils/src/stack_size.rs diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 319abd2c12e6..d96f29cf2aed 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -683,10 +683,15 @@ jobs: cargo test -p swc_ecma_minifier --features concurrent - name: Run cargo test (all features) - if: matrix.settings.crate == 'swc_ecma_parser' || matrix.settings.crate == 'swc_ecma_loader' || matrix.settings.crate == 'swc_ecma_transforms' + if: matrix.settings.crate == 'swc_ecma_parser' || matrix.settings.crate == 'swc_ecma_loader' run: | cargo test -p ${{ matrix.settings.crate }} --all-features + - name: Run cargo test (transforms with stacker) + if: matrix.settings.crate == 'swc_ecma_transforms' + run: | + cargo test -p ${{ matrix.settings.crate }} --all-features --features swc_ecma_utils/stacker + - name: Run cargo test (concurrent) if: runner.os == 'Linux' && matrix.settings.crate != 'swc_ecma_minifier' shell: bash diff --git a/Cargo.lock b/Cargo.lock index 243339df9bd3..d3362e9dd2b1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4894,6 +4894,7 @@ dependencies = [ "once_cell", "rayon", "rustc-hash", + "stacker", "swc_atoms", "swc_common", "swc_ecma_ast", diff --git a/crates/swc_core/Cargo.toml b/crates/swc_core/Cargo.toml index 5b56081e0495..6da260b327c3 100644 --- a/crates/swc_core/Cargo.toml +++ b/crates/swc_core/Cargo.toml @@ -186,6 +186,9 @@ common_plugin_transform = [ css_plugin_transform = ["common_plugin_transform", "__css_plugin_transform"] ecma_plugin_transform = ["common_plugin_transform", "__ecma_plugin_transform"] +# Use `stacker` to avoid stack overflow. +stacker = ["swc_ecma_parser/stacker", "swc_ecma_utils/stacker"] + # Host features to enable plugin `runner` runtime. # native feature is for the host environment does not have, or cannot access # to the wasm runtime (i.e cli, or @swc/core node bindings). diff --git a/crates/swc_ecma_minifier/src/util/mod.rs b/crates/swc_ecma_minifier/src/util/mod.rs index 96702000c4b8..d54cc73d5e53 100644 --- a/crates/swc_ecma_minifier/src/util/mod.rs +++ b/crates/swc_ecma_minifier/src/util/mod.rs @@ -5,7 +5,7 @@ use std::time::Instant; use rustc_hash::FxHashSet; use swc_common::{util::take::Take, Mark, Span, Spanned, DUMMY_SP}; use swc_ecma_ast::*; -use swc_ecma_utils::{ModuleItemLike, StmtLike, Value}; +use swc_ecma_utils::{stack_size::maybe_grow_default, ModuleItemLike, StmtLike, Value}; use swc_ecma_visit::{noop_visit_type, visit_obj_and_computed, Visit, VisitWith}; pub(crate) mod base54; @@ -510,6 +510,10 @@ impl Visit for EvalFinder { visit_obj_and_computed!(); + fn visit_expr(&mut self, n: &Expr) { + maybe_grow_default(|| n.visit_children_with(self)); + } + fn visit_ident(&mut self, i: &Ident) { if i.sym == "eval" { self.found = true; diff --git a/crates/swc_ecma_transforms/tests/deno.rs b/crates/swc_ecma_transforms/tests/deno.rs new file mode 100644 index 000000000000..fe9ecb12a27a --- /dev/null +++ b/crates/swc_ecma_transforms/tests/deno.rs @@ -0,0 +1,55 @@ +#![cfg(all( + feature = "swc_ecma_transforms_proposal", + feature = "swc_ecma_transforms_typescript", +))] +use std::path::PathBuf; + +use swc_common::{chain, Mark}; +use swc_ecma_parser::Syntax; +use swc_ecma_transforms::{fixer, helpers::inject_helpers, hygiene, resolver}; +use swc_ecma_transforms_proposal::{ + decorator_2022_03::decorator_2022_03, + explicit_resource_management::explicit_resource_management, +}; +use swc_ecma_transforms_testing::test_fixture; +use swc_ecma_transforms_typescript::typescript; + +#[testing::fixture("tests/fixture/deno/**/input.ts")] +fn stack_overflow(input: PathBuf) { + run_test(input); +} + +fn run_test(input: PathBuf) { + let output = input.with_file_name("output.js"); + + test_fixture( + Syntax::Typescript(Default::default()), + &|_tester| { + let unresolved_mark = Mark::new(); + let top_level_mark = Mark::new(); + + chain!( + resolver(unresolved_mark, top_level_mark, true), + decorator_2022_03(), + explicit_resource_management(), + inject_helpers(top_level_mark), + typescript( + typescript::Config { + verbatim_module_syntax: false, + import_not_used_as_values: typescript::ImportsNotUsedAsValues::Remove, + no_empty_export: true, + import_export_assign_config: + typescript::TsImportExportAssignConfig::Preserve, + ts_enum_is_mutable: true, + }, + top_level_mark + ), + fixer(None), + hygiene(), + ) + }, + &input, + &output, + Default::default(), + ) +} diff --git a/crates/swc_ecma_transforms/tests/fixture/deno/stack-overflow/add-1/input.ts b/crates/swc_ecma_transforms/tests/fixture/deno/stack-overflow/add-1/input.ts new file mode 100644 index 000000000000..77bd3499815f --- /dev/null +++ b/crates/swc_ecma_transforms/tests/fixture/deno/stack-overflow/add-1/input.ts @@ -0,0 +1,5028 @@ +console.log( + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1+ 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1+ 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1+ 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1+ 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1+ 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1+ 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 + + 1 +); \ No newline at end of file diff --git a/crates/swc_ecma_transforms/tests/fixture/deno/stack-overflow/add-1/output.js b/crates/swc_ecma_transforms/tests/fixture/deno/stack-overflow/add-1/output.js new file mode 100644 index 000000000000..0cc4bd3fc1ec --- /dev/null +++ b/crates/swc_ecma_transforms/tests/fixture/deno/stack-overflow/add-1/output.js @@ -0,0 +1 @@ +console.log(1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1); diff --git a/crates/swc_ecma_transforms/tests/fixture/deno/stack-overflow/which/input.ts b/crates/swc_ecma_transforms/tests/fixture/deno/stack-overflow/which/input.ts new file mode 100644 index 000000000000..0b7ff36f9a08 --- /dev/null +++ b/crates/swc_ecma_transforms/tests/fixture/deno/stack-overflow/which/input.ts @@ -0,0 +1,180 @@ +export interface Environment { + /** Gets an environment variable. */ + env(key: string): string | undefined; + /** Resolves the `Deno.FileInfo` for the specified + * path following symlinks. + */ + stat(filePath: string): Promise>; + /** Synchronously resolves the `Deno.FileInfo` for + * the specified path following symlinks. + */ + statSync(filePath: string): Pick; + /** Gets the current operating system. */ + os: typeof Deno.build.os; +} + +export class RealEnvironment implements Environment { + env(key: string): string | undefined { + return Deno.env.get(key); + } + + stat(path: string): Promise { + return Deno.stat(path); + } + + statSync(path: string): Deno.FileInfo { + return Deno.statSync(path); + } + + get os() { + return Deno.build.os; + } +} + +/** Finds the path to the specified command asynchronously. */ +export async function which( + command: string, + environment: Omit = new RealEnvironment(), +) { + const systemInfo = getSystemInfo(command, environment); + if (systemInfo == null) { + return undefined; + } + + for (const pathItem of systemInfo.pathItems) { + const filePath = pathItem + command; + if (systemInfo.pathExts) { + for (const pathExt of systemInfo.pathExts) { + const filePath = pathItem + command + pathExt; + if (await pathMatches(environment, filePath)) { + return filePath; + } + } + } else { + if (await pathMatches(environment, filePath)) { + return filePath; + } + } + } + + return undefined; +} + +async function pathMatches( + environment: Omit, + path: string, +): Promise { + try { + const result = await environment.stat(path); + return result.isFile; + } catch (err) { + if (err instanceof Deno.errors.PermissionDenied) { + throw err; + } + return false; + } +} + +/** Finds the path to the specified command synchronously. */ +export function whichSync( + command: string, + environment: Omit = new RealEnvironment(), +) { + const systemInfo = getSystemInfo(command, environment); + if (systemInfo == null) { + return undefined; + } + + for (const pathItem of systemInfo.pathItems) { + const filePath = pathItem + command; + if (pathMatchesSync(environment, filePath)) { + return filePath; + } + if (systemInfo.pathExts) { + for (const pathExt of systemInfo.pathExts) { + const filePath = pathItem + command + pathExt; + if (pathMatchesSync(environment, filePath)) { + return filePath; + } + } + } + } + + return undefined; +} + +function pathMatchesSync( + environment: Omit, + path: string, +): boolean { + try { + const result = environment.statSync(path); + return result.isFile; + } catch (err) { + if (err instanceof Deno.errors.PermissionDenied) { + throw err; + } + return false; + } +} + +interface SystemInfo { + pathItems: string[]; + pathExts: string[] | undefined; + isNameMatch: (a: string, b: string) => boolean; +} + +function getSystemInfo( + command: string, + environment: Omit, +): SystemInfo | undefined { + const isWindows = environment.os === "windows"; + const envValueSeparator = isWindows ? ";" : ":"; + const path = environment.env("PATH"); + const pathSeparator = isWindows ? "\\" : "/"; + if (path == null) { + return undefined; + } + + return { + pathItems: splitEnvValue(path).map((item) => normalizeDir(item)), + pathExts: getPathExts(), + isNameMatch: isWindows + ? (a, b) => a.toLowerCase() === b.toLowerCase() + : (a, b) => a === b, + }; + + function getPathExts() { + if (!isWindows) { + return undefined; + } + + const pathExtText = environment.env("PATHEXT") ?? ".EXE;.CMD;.BAT;.COM"; + const pathExts = splitEnvValue(pathExtText); + const lowerCaseCommand = command.toLowerCase(); + + for (const pathExt of pathExts) { + // Do not use the pathExts if someone has provided a command + // that ends with the extenion of an executable extension + if (lowerCaseCommand.endsWith(pathExt.toLowerCase())) { + return undefined; + } + } + + return pathExts; + } + + function splitEnvValue(value: string) { + return value + .split(envValueSeparator) + .map((item) => item.trim()) + .filter((item) => item.length > 0); + } + + function normalizeDir(dirPath: string) { + if (!dirPath.endsWith(pathSeparator)) { + dirPath += pathSeparator; + } + return dirPath; + } +} diff --git a/crates/swc_ecma_transforms/tests/fixture/deno/stack-overflow/which/output.js b/crates/swc_ecma_transforms/tests/fixture/deno/stack-overflow/which/output.js new file mode 100644 index 000000000000..5aa8485b37d8 --- /dev/null +++ b/crates/swc_ecma_transforms/tests/fixture/deno/stack-overflow/which/output.js @@ -0,0 +1,118 @@ +export class RealEnvironment { + env(key) { + return Deno.env.get(key); + } + stat(path) { + return Deno.stat(path); + } + statSync(path) { + return Deno.statSync(path); + } + get os() { + return Deno.build.os; + } +} +/** Finds the path to the specified command asynchronously. */ export async function which(command, environment = new RealEnvironment()) { + const systemInfo = getSystemInfo(command, environment); + if (systemInfo == null) { + return undefined; + } + for (const pathItem of systemInfo.pathItems){ + const filePath = pathItem + command; + if (systemInfo.pathExts) { + for (const pathExt of systemInfo.pathExts){ + const filePath = pathItem + command + pathExt; + if (await pathMatches(environment, filePath)) { + return filePath; + } + } + } else { + if (await pathMatches(environment, filePath)) { + return filePath; + } + } + } + return undefined; +} +async function pathMatches(environment, path) { + try { + const result = await environment.stat(path); + return result.isFile; + } catch (err) { + if (err instanceof Deno.errors.PermissionDenied) { + throw err; + } + return false; + } +} +/** Finds the path to the specified command synchronously. */ export function whichSync(command, environment = new RealEnvironment()) { + const systemInfo = getSystemInfo(command, environment); + if (systemInfo == null) { + return undefined; + } + for (const pathItem of systemInfo.pathItems){ + const filePath = pathItem + command; + if (pathMatchesSync(environment, filePath)) { + return filePath; + } + if (systemInfo.pathExts) { + for (const pathExt of systemInfo.pathExts){ + const filePath = pathItem + command + pathExt; + if (pathMatchesSync(environment, filePath)) { + return filePath; + } + } + } + } + return undefined; +} +function pathMatchesSync(environment, path) { + try { + const result = environment.statSync(path); + return result.isFile; + } catch (err) { + if (err instanceof Deno.errors.PermissionDenied) { + throw err; + } + return false; + } +} +function getSystemInfo(command, environment) { + const isWindows = environment.os === "windows"; + const envValueSeparator = isWindows ? ";" : ":"; + const path = environment.env("PATH"); + const pathSeparator = isWindows ? "\\" : "/"; + if (path == null) { + return undefined; + } + return { + pathItems: splitEnvValue(path).map((item)=>normalizeDir(item)), + pathExts: getPathExts(), + isNameMatch: isWindows ? (a, b)=>a.toLowerCase() === b.toLowerCase() : (a, b)=>a === b + }; + function getPathExts() { + if (!isWindows) { + return undefined; + } + const pathExtText = environment.env("PATHEXT") ?? ".EXE;.CMD;.BAT;.COM"; + const pathExts = splitEnvValue(pathExtText); + const lowerCaseCommand = command.toLowerCase(); + for (const pathExt of pathExts){ + // Do not use the pathExts if someone has provided a command + // that ends with the extenion of an executable extension + if (lowerCaseCommand.endsWith(pathExt.toLowerCase())) { + return undefined; + } + } + return pathExts; + } + function splitEnvValue(value) { + return value.split(envValueSeparator).map((item)=>item.trim()).filter((item)=>item.length > 0); + } + function normalizeDir(dirPath) { + if (!dirPath.endsWith(pathSeparator)) { + dirPath += pathSeparator; + } + return dirPath; + } +} diff --git a/crates/swc_ecma_transforms_base/src/fixer.rs b/crates/swc_ecma_transforms_base/src/fixer.rs index bbdd662a8c88..91175d5cbc1c 100644 --- a/crates/swc_ecma_transforms_base/src/fixer.rs +++ b/crates/swc_ecma_transforms_base/src/fixer.rs @@ -4,6 +4,7 @@ use indexmap::IndexMap; use rustc_hash::FxHasher; use swc_common::{comments::Comments, util::take::Take, Span, Spanned, DUMMY_SP}; use swc_ecma_ast::*; +use swc_ecma_utils::stack_size::maybe_grow_default; use swc_ecma_visit::{as_folder, noop_visit_mut_type, Fold, VisitMut, VisitMutWith}; /// Fixes ast nodes before printing so semantics are preserved. @@ -445,7 +446,7 @@ impl VisitMut for Fixer<'_> { } self.unwrap_expr(e); - e.visit_mut_children_with(self); + maybe_grow_default(|| e.visit_mut_children_with(self)); self.ctx = ctx; self.wrap_with_paren_if_required(e) diff --git a/crates/swc_ecma_transforms_base/src/hygiene/mod.rs b/crates/swc_ecma_transforms_base/src/hygiene/mod.rs index d2d4df57dc9c..ee2b457f1278 100644 --- a/crates/swc_ecma_transforms_base/src/hygiene/mod.rs +++ b/crates/swc_ecma_transforms_base/src/hygiene/mod.rs @@ -1,6 +1,7 @@ use swc_common::{chain, Mark}; use swc_ecma_ast::*; -use swc_ecma_visit::{as_folder, noop_visit_mut_type, Fold, VisitMut}; +use swc_ecma_utils::stack_size::maybe_grow_default; +use swc_ecma_visit::{as_folder, noop_visit_mut_type, Fold, VisitMut, VisitMutWith}; pub use crate::rename::rename; use crate::rename::{renamer, Renamer}; @@ -83,6 +84,10 @@ struct HygieneRemover; impl VisitMut for HygieneRemover { noop_visit_mut_type!(); + fn visit_mut_expr(&mut self, n: &mut Expr) { + maybe_grow_default(|| n.visit_mut_children_with(self)); + } + fn visit_mut_ident(&mut self, i: &mut Ident) { i.span.ctxt = Default::default(); } diff --git a/crates/swc_ecma_transforms_base/src/rename/analyzer/mod.rs b/crates/swc_ecma_transforms_base/src/rename/analyzer/mod.rs index 22d92b4ae139..9c26d5cc4c25 100644 --- a/crates/swc_ecma_transforms_base/src/rename/analyzer/mod.rs +++ b/crates/swc_ecma_transforms_base/src/rename/analyzer/mod.rs @@ -1,5 +1,6 @@ use swc_common::Mark; use swc_ecma_ast::*; +use swc_ecma_utils::stack_size::maybe_grow_default; use swc_ecma_visit::{noop_visit_type, Visit, VisitWith}; use self::scope::{Scope, ScopeKind}; @@ -236,7 +237,7 @@ impl Visit for Analyzer { let old_is_pat_decl = self.is_pat_decl; self.is_pat_decl = false; - e.visit_children_with(self); + maybe_grow_default(|| e.visit_children_with(self)); if let Expr::Ident(i) = e { self.add_usage(i.to_id()) diff --git a/crates/swc_ecma_transforms_base/src/rename/collector.rs b/crates/swc_ecma_transforms_base/src/rename/collector.rs index 87cb4453a75d..26334b53cbfe 100644 --- a/crates/swc_ecma_transforms_base/src/rename/collector.rs +++ b/crates/swc_ecma_transforms_base/src/rename/collector.rs @@ -3,7 +3,7 @@ use std::hash::Hash; use rustc_hash::FxHashSet; use swc_common::{Mark, SyntaxContext}; use swc_ecma_ast::*; -use swc_ecma_utils::ident::IdentLike; +use swc_ecma_utils::{ident::IdentLike, stack_size::maybe_grow_default}; use swc_ecma_visit::{noop_visit_type, visit_obj_and_computed, Visit, VisitWith}; pub(super) struct IdCollector { @@ -21,6 +21,10 @@ impl Visit for IdCollector { fn visit_export_namespace_specifier(&mut self, _: &ExportNamespaceSpecifier) {} + fn visit_expr(&mut self, n: &Expr) { + maybe_grow_default(|| n.visit_children_with(self)); + } + fn visit_ident(&mut self, id: &Ident) { if id.span.ctxt != SyntaxContext::empty() { self.ids.insert(id.to_id()); @@ -131,7 +135,7 @@ where fn visit_expr(&mut self, node: &Expr) { let old = self.is_pat_decl; self.is_pat_decl = false; - node.visit_children_with(self); + maybe_grow_default(|| node.visit_children_with(self)); self.is_pat_decl = old; } diff --git a/crates/swc_ecma_transforms_base/src/rename/eval.rs b/crates/swc_ecma_transforms_base/src/rename/eval.rs index 0a7b908f0164..2d86c6447fbd 100644 --- a/crates/swc_ecma_transforms_base/src/rename/eval.rs +++ b/crates/swc_ecma_transforms_base/src/rename/eval.rs @@ -1,4 +1,5 @@ use swc_ecma_ast::*; +use swc_ecma_utils::stack_size::maybe_grow_default; use swc_ecma_visit::{noop_visit_type, visit_obj_and_computed, Visit, VisitWith}; pub(crate) fn contains_eval(node: &N, include_with: bool) -> bool @@ -24,12 +25,6 @@ impl Visit for EvalFinder { visit_obj_and_computed!(); - fn visit_export_default_specifier(&mut self, _: &ExportDefaultSpecifier) {} - - fn visit_export_named_specifier(&mut self, _: &ExportNamedSpecifier) {} - - fn visit_export_namespace_specifier(&mut self, _: &ExportNamespaceSpecifier) {} - fn visit_callee(&mut self, c: &Callee) { c.visit_children_with(self); @@ -40,6 +35,16 @@ impl Visit for EvalFinder { } } + fn visit_export_default_specifier(&mut self, _: &ExportDefaultSpecifier) {} + + fn visit_export_named_specifier(&mut self, _: &ExportNamedSpecifier) {} + + fn visit_export_namespace_specifier(&mut self, _: &ExportNamespaceSpecifier) {} + + fn visit_expr(&mut self, n: &Expr) { + maybe_grow_default(|| n.visit_children_with(self)); + } + fn visit_named_export(&mut self, e: &NamedExport) { if e.src.is_some() { return; diff --git a/crates/swc_ecma_transforms_base/src/rename/mod.rs b/crates/swc_ecma_transforms_base/src/rename/mod.rs index 2ff6f8542cf8..de42107ca532 100644 --- a/crates/swc_ecma_transforms_base/src/rename/mod.rs +++ b/crates/swc_ecma_transforms_base/src/rename/mod.rs @@ -6,6 +6,7 @@ use rustc_hash::FxHashSet; use swc_atoms::JsWord; use swc_common::collections::AHashMap; use swc_ecma_ast::*; +use swc_ecma_utils::stack_size::maybe_grow_default; use swc_ecma_visit::{as_folder, noop_visit_mut_type, Fold, VisitMut, VisitMutWith, VisitWith}; #[cfg(feature = "concurrent-renamer")] @@ -245,6 +246,10 @@ where unit!(visit_mut_class_decl, ClassDecl, true); + fn visit_mut_expr(&mut self, n: &mut Expr) { + maybe_grow_default(|| n.visit_mut_children_with(self)); + } + fn visit_mut_module(&mut self, m: &mut Module) { self.preserved = self.renamer.preserved_ids_for_module(m); diff --git a/crates/swc_ecma_transforms_base/src/rename/ops.rs b/crates/swc_ecma_transforms_base/src/rename/ops.rs index 1971d91aa889..3af5191e8a4a 100644 --- a/crates/swc_ecma_transforms_base/src/rename/ops.rs +++ b/crates/swc_ecma_transforms_base/src/rename/ops.rs @@ -4,7 +4,7 @@ use swc_common::{ Spanned, SyntaxContext, DUMMY_SP, }; use swc_ecma_ast::*; -use swc_ecma_utils::ident::IdentLike; +use swc_ecma_utils::{ident::IdentLike, stack_size::maybe_grow_default}; use swc_ecma_visit::{noop_visit_mut_type, VisitMut, VisitMutWith}; use crate::{ @@ -177,6 +177,22 @@ where } } + fn visit_mut_expr(&mut self, n: &mut Expr) { + maybe_grow_default(|| n.visit_mut_children_with(self)) + } + + fn visit_mut_expr_or_spreads(&mut self, n: &mut Vec) { + self.maybe_par(cpu_count() * 8, n, |v, n| { + n.visit_mut_with(v); + }) + } + + fn visit_mut_exprs(&mut self, n: &mut Vec>) { + self.maybe_par(cpu_count() * 8, n, |v, n| { + n.visit_mut_with(v); + }) + } + fn visit_mut_ident(&mut self, ident: &mut Ident) { match self.rename_ident(ident) { Ok(i) | Err(i) => i, @@ -429,67 +445,6 @@ where *nodes = buf; } - fn visit_mut_stmts(&mut self, nodes: &mut Vec) { - use std::mem::take; - - #[cfg(feature = "concurrent")] - if nodes.len() >= 8 * cpu_count() { - ::swc_common::GLOBALS.with(|globals| { - use rayon::prelude::*; - - let (visitor, new_nodes) = take(nodes) - .into_par_iter() - .map(|mut node| { - ::swc_common::GLOBALS.set(globals, || { - let mut visitor = Parallel::create(&*self); - node.visit_mut_with(&mut visitor); - - let mut nodes = Vec::with_capacity(4); - - ParExplode::after_one_stmt(&mut visitor, &mut nodes); - - nodes.push(node); - - (visitor, nodes) - }) - }) - .reduce( - || (Parallel::create(&*self), vec![]), - |mut a, b| { - Parallel::merge(&mut a.0, b.0); - - a.1.extend(b.1); - - a - }, - ); - - Parallel::merge(self, visitor); - - { - self.after_stmts(nodes); - } - - *nodes = new_nodes; - }); - - return; - } - - let mut buf = Vec::with_capacity(nodes.len()); - - for mut node in take(nodes) { - let mut visitor = Parallel::create(&*self); - node.visit_mut_with(&mut visitor); - buf.push(node); - visitor.after_one_stmt(&mut buf); - } - - self.after_stmts(&mut buf); - - *nodes = buf; - } - fn visit_mut_named_export(&mut self, e: &mut NamedExport) { if e.src.is_some() { return; @@ -524,6 +479,12 @@ where } } + fn visit_mut_opt_vec_expr_or_spreads(&mut self, n: &mut Vec>) { + self.maybe_par(cpu_count() * 8, n, |v, n| { + n.visit_mut_with(v); + }) + } + fn visit_mut_prop(&mut self, prop: &mut Prop) { match prop { Prop::Shorthand(i) => { @@ -553,35 +514,78 @@ where } } - fn visit_mut_super_prop_expr(&mut self, expr: &mut SuperPropExpr) { - expr.span.visit_mut_with(self); - if let SuperProp::Computed(c) = &mut expr.prop { - c.visit_mut_with(self); - } - } - fn visit_mut_prop_or_spreads(&mut self, n: &mut Vec) { self.maybe_par(cpu_count() * 8, n, |v, n| { n.visit_mut_with(v); }) } - fn visit_mut_expr_or_spreads(&mut self, n: &mut Vec) { - self.maybe_par(cpu_count() * 8, n, |v, n| { - n.visit_mut_with(v); - }) - } + fn visit_mut_stmts(&mut self, nodes: &mut Vec) { + use std::mem::take; - fn visit_mut_opt_vec_expr_or_spreads(&mut self, n: &mut Vec>) { - self.maybe_par(cpu_count() * 8, n, |v, n| { - n.visit_mut_with(v); - }) + #[cfg(feature = "concurrent")] + if nodes.len() >= 8 * cpu_count() { + ::swc_common::GLOBALS.with(|globals| { + use rayon::prelude::*; + + let (visitor, new_nodes) = take(nodes) + .into_par_iter() + .map(|mut node| { + ::swc_common::GLOBALS.set(globals, || { + let mut visitor = Parallel::create(&*self); + node.visit_mut_with(&mut visitor); + + let mut nodes = Vec::with_capacity(4); + + ParExplode::after_one_stmt(&mut visitor, &mut nodes); + + nodes.push(node); + + (visitor, nodes) + }) + }) + .reduce( + || (Parallel::create(&*self), vec![]), + |mut a, b| { + Parallel::merge(&mut a.0, b.0); + + a.1.extend(b.1); + + a + }, + ); + + Parallel::merge(self, visitor); + + { + self.after_stmts(nodes); + } + + *nodes = new_nodes; + }); + + return; + } + + let mut buf = Vec::with_capacity(nodes.len()); + + for mut node in take(nodes) { + let mut visitor = Parallel::create(&*self); + node.visit_mut_with(&mut visitor); + buf.push(node); + visitor.after_one_stmt(&mut buf); + } + + self.after_stmts(&mut buf); + + *nodes = buf; } - fn visit_mut_exprs(&mut self, n: &mut Vec>) { - self.maybe_par(cpu_count() * 8, n, |v, n| { - n.visit_mut_with(v); - }) + fn visit_mut_super_prop_expr(&mut self, expr: &mut SuperPropExpr) { + expr.span.visit_mut_with(self); + if let SuperProp::Computed(c) = &mut expr.prop { + c.visit_mut_with(self); + } } fn visit_mut_var_declarators(&mut self, n: &mut Vec) { diff --git a/crates/swc_ecma_transforms_base/src/resolver/mod.rs b/crates/swc_ecma_transforms_base/src/resolver/mod.rs index 5b3ae1cd178f..f2e4e438e72c 100644 --- a/crates/swc_ecma_transforms_base/src/resolver/mod.rs +++ b/crates/swc_ecma_transforms_base/src/resolver/mod.rs @@ -5,7 +5,7 @@ use swc_common::{ Mark, Span, SyntaxContext, }; use swc_ecma_ast::*; -use swc_ecma_utils::find_pat_ids; +use swc_ecma_utils::{find_pat_ids, stack_size::maybe_grow_default}; use swc_ecma_visit::{ as_folder, noop_visit_mut_type, visit_mut_obj_and_computed, Fold, VisitMut, VisitMutWith, }; @@ -816,7 +816,7 @@ impl<'a> VisitMut for Resolver<'a> { let old = self.ident_type; self.ident_type = IdentType::Ref; - expr.visit_mut_children_with(self); + maybe_grow_default(|| expr.visit_mut_children_with(self)); self.ident_type = old; } diff --git a/crates/swc_ecma_transforms_proposal/src/decorator_2022_03.rs b/crates/swc_ecma_transforms_proposal/src/decorator_2022_03.rs index e6897ecbbb98..327f6f0e1349 100644 --- a/crates/swc_ecma_transforms_proposal/src/decorator_2022_03.rs +++ b/crates/swc_ecma_transforms_proposal/src/decorator_2022_03.rs @@ -8,7 +8,7 @@ use swc_ecma_transforms_base::{helper, helper_expr}; use swc_ecma_utils::{ alias_ident_for, constructor::inject_after_super, default_constructor, is_maybe_branch_directive, private_ident, prop_name_to_expr_value, quote_ident, replace_ident, - ExprFactory, IdentExt, IdentRenamer, + stack_size::maybe_grow_default, ExprFactory, IdentExt, IdentRenamer, }; use swc_ecma_visit::{as_folder, noop_visit_mut_type, Fold, VisitMut, VisitMutWith}; @@ -1451,7 +1451,7 @@ impl VisitMut for Decorator202203 { } } - e.visit_mut_children_with(self); + maybe_grow_default(|| e.visit_mut_children_with(self)); } fn visit_mut_module_item(&mut self, s: &mut ModuleItem) { diff --git a/crates/swc_ecma_transforms_proposal/src/explicit_resource_management.rs b/crates/swc_ecma_transforms_proposal/src/explicit_resource_management.rs index 5dbc11d28f70..fd51c2aa1e82 100644 --- a/crates/swc_ecma_transforms_proposal/src/explicit_resource_management.rs +++ b/crates/swc_ecma_transforms_proposal/src/explicit_resource_management.rs @@ -2,7 +2,8 @@ use swc_common::{util::take::Take, DUMMY_SP}; use swc_ecma_ast::*; use swc_ecma_transforms_base::helper; use swc_ecma_utils::{ - find_pat_ids, private_ident, quote_ident, ExprFactory, ModuleItemLike, StmtLike, + find_pat_ids, private_ident, quote_ident, stack_size::maybe_grow_default, ExprFactory, + ModuleItemLike, StmtLike, }; use swc_ecma_visit::{as_folder, noop_visit_mut_type, Fold, VisitMut, VisitMutWith}; @@ -372,6 +373,10 @@ impl ExplicitResourceManagement { impl VisitMut for ExplicitResourceManagement { noop_visit_mut_type!(); + fn visit_mut_expr(&mut self, n: &mut Expr) { + maybe_grow_default(|| n.visit_mut_children_with(self)); + } + fn visit_mut_for_of_stmt(&mut self, n: &mut ForOfStmt) { n.visit_mut_children_with(self); @@ -399,7 +404,7 @@ impl VisitMut for ExplicitResourceManagement { } fn visit_mut_stmt(&mut self, s: &mut Stmt) { - s.visit_mut_children_with(self); + maybe_grow_default(|| s.visit_mut_children_with(self)); if let Stmt::Decl(Decl::Using(decl)) = s { let state = self.state.get_or_insert_with(Default::default); diff --git a/crates/swc_ecma_transforms_typescript/src/strip_import_export.rs b/crates/swc_ecma_transforms_typescript/src/strip_import_export.rs index 83958e7c18b7..f3952f07f18f 100644 --- a/crates/swc_ecma_transforms_typescript/src/strip_import_export.rs +++ b/crates/swc_ecma_transforms_typescript/src/strip_import_export.rs @@ -2,6 +2,7 @@ use std::mem; use swc_common::collections::AHashSet; use swc_ecma_ast::*; +use swc_ecma_utils::stack_size::maybe_grow_default; use swc_ecma_visit::{noop_visit_type, Visit, VisitMut, VisitMutWith, VisitWith}; use crate::{strip_type::IsConcrete, ImportsNotUsedAsValues}; @@ -24,6 +25,10 @@ impl Visit for UsageCollect { self.id_usage.insert(n.to_id()); } + fn visit_expr(&mut self, n: &Expr) { + maybe_grow_default(|| n.visit_children_with(self)) + } + fn visit_binding_ident(&mut self, _: &BindingIdent) { // skip } diff --git a/crates/swc_ecma_transforms_typescript/src/strip_type.rs b/crates/swc_ecma_transforms_typescript/src/strip_type.rs index 2cc2db1cafce..a8b502b67f01 100644 --- a/crates/swc_ecma_transforms_typescript/src/strip_type.rs +++ b/crates/swc_ecma_transforms_typescript/src/strip_type.rs @@ -1,5 +1,6 @@ use swc_common::util::take::Take; use swc_ecma_ast::*; +use swc_ecma_utils::stack_size::maybe_grow_default; use swc_ecma_visit::{VisitMut, VisitMutWith}; use crate::{type_to_none, unreachable_visit_mut_type}; @@ -122,7 +123,7 @@ impl VisitMut for StripType { *n = *expr.take(); } - n.visit_mut_children_with(self); + maybe_grow_default(|| n.visit_mut_children_with(self)); } // https://github.com/tc39/proposal-type-annotations#parameter-optionality diff --git a/crates/swc_ecma_transforms_typescript/src/transform.rs b/crates/swc_ecma_transforms_typescript/src/transform.rs index 5d6264865662..8015e30295f1 100644 --- a/crates/swc_ecma_transforms_typescript/src/transform.rs +++ b/crates/swc_ecma_transforms_typescript/src/transform.rs @@ -8,7 +8,8 @@ use swc_common::{ use swc_ecma_ast::*; use swc_ecma_utils::{ alias_ident_for, constructor::inject_after_super, find_pat_ids, is_literal, member_expr, - private_ident, quote_ident, quote_str, ExprFactory, QueryRef, RefRewriter, + private_ident, quote_ident, quote_str, stack_size::maybe_grow_default, ExprFactory, QueryRef, + RefRewriter, }; use swc_ecma_visit::{as_folder, noop_visit_mut_type, Fold, VisitMut, VisitMutWith}; @@ -218,7 +219,7 @@ impl VisitMut for Transform { fn visit_mut_expr(&mut self, n: &mut Expr) { if !n.is_class() { - n.visit_mut_children_with(self); + maybe_grow_default(|| n.visit_mut_children_with(self)); return; } diff --git a/crates/swc_ecma_utils/Cargo.toml b/crates/swc_ecma_utils/Cargo.toml index cc3c09df1e8b..32ce2956ab6b 100644 --- a/crates/swc_ecma_utils/Cargo.toml +++ b/crates/swc_ecma_utils/Cargo.toml @@ -33,6 +33,9 @@ swc_common = { version = "0.33.20", path = "../swc_common" } swc_ecma_ast = { version = "0.112.6", path = "../swc_ecma_ast" } swc_ecma_visit = { version = "0.98.7", path = "../swc_ecma_visit" } +[target.'cfg(not(any(target_arch = "wasm32", target_arch = "arm")))'.dependencies] +stacker = { version = "0.1.15", optional = true } + [dev-dependencies] swc_ecma_parser = { version = "0.143.10", path = "../swc_ecma_parser" } testing = { version = "0.35.21", path = "../testing" } diff --git a/crates/swc_ecma_utils/src/lib.rs b/crates/swc_ecma_utils/src/lib.rs index 83890a4c09c3..63593363812d 100644 --- a/crates/swc_ecma_utils/src/lib.rs +++ b/crates/swc_ecma_utils/src/lib.rs @@ -56,6 +56,7 @@ mod value; pub mod var; mod node_ignore_span; +pub mod stack_size; pub use node_ignore_span::NodeIgnoringSpan; // TODO: remove diff --git a/crates/swc_ecma_utils/src/stack_size.rs b/crates/swc_ecma_utils/src/stack_size.rs new file mode 100644 index 000000000000..d05d03cdaa9e --- /dev/null +++ b/crates/swc_ecma_utils/src/stack_size.rs @@ -0,0 +1,29 @@ +/// Calls `callback` with a larger stack size. +#[inline(always)] +#[cfg(any( + target_arch = "wasm32", + target_arch = "arm", + not(feature = "stacker"), + // miri does not work with stacker + miri +))] +pub fn maybe_grow R>(_red_zone: usize, _stack_size: usize, callback: F) -> R { + callback() +} + +/// Calls `callback` with a larger stack size. +#[inline(always)] +#[cfg(all( + not(any(target_arch = "wasm32", target_arch = "arm", miri)), + feature = "stacker" +))] +pub fn maybe_grow R>(red_zone: usize, stack_size: usize, callback: F) -> R { + stacker::maybe_grow(red_zone, stack_size, callback) +} + +/// Calls `callback` with a larger stack size. +/// +/// `maybe_grow` with default values. +pub fn maybe_grow_default R>(callback: F) -> R { + maybe_grow(4 * 1024, 16 * 1024, callback) +} From 81c3c5ca9ed413bc7936332049b13e03a0f37cb4 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 16 Apr 2024 10:46:02 +0000 Subject: [PATCH 136/172] chore: Bump crates --- CHANGELOG.md | 12 ++++++------ Cargo.lock | 2 +- crates/swc_ecma_transforms_proposal/Cargo.toml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60d19fcfc2ea..0ae6c7c542bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,12 @@ - **(es/proposal)** Update explicit resource management to match spec ([#8860](https://github.com/swc-project/swc/issues/8860)) ([6d24076](https://github.com/swc-project/swc/commit/6d240768b11cd6cabd347a54c135cb8937df2240)) +### Features + + + +- **(es/transforms)** Allocate stacks dynamically ([#8867](https://github.com/swc-project/swc/issues/8867)) ([a1c5415](https://github.com/swc-project/swc/commit/a1c5415b3b84fdb8f780685e5eec4a121d442e28)) + ### Refactor @@ -1363,10 +1369,4 @@ - **(es/compat)** Skip function scope in `block-scoped-fns` pass ([#7975](https://github.com/swc-project/swc/issues/7975)) ([d91a554](https://github.com/swc-project/swc/commit/d91a554033c8ce0ea2b2538b0e86abf5a81eac76)) -### Refactor - - - -- **(es/typescript)** Reimplement TypeScript pass ([#7202](https://github.com/swc-project/swc/issues/7202)) ([9c9a538](https://github.com/swc-project/swc/commit/9c9a538f23cb2bcd2f46e156babf64c7a81db245)) - diff --git a/Cargo.lock b/Cargo.lock index d3362e9dd2b1..e84cefba3030 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4774,7 +4774,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_proposal" -version = "0.171.22" +version = "0.171.23" dependencies = [ "either", "rustc-hash", diff --git a/crates/swc_ecma_transforms_proposal/Cargo.toml b/crates/swc_ecma_transforms_proposal/Cargo.toml index 2895e40b4cae..3b9e21073b19 100644 --- a/crates/swc_ecma_transforms_proposal/Cargo.toml +++ b/crates/swc_ecma_transforms_proposal/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_proposal" repository = "https://github.com/swc-project/swc.git" -version = "0.171.22" +version = "0.171.23" [lib] bench = false From 0f07acbc572a8cbe668ba10406f1358ec04318a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 16 Apr 2024 20:02:16 +0900 Subject: [PATCH 137/172] chore: Publish crates --- CHANGELOG.md | 8 -------- Cargo.lock | 2 +- crates/swc_atoms/Cargo.toml | 2 +- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ae6c7c542bf..920308c43fd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1361,12 +1361,4 @@ - **(es/typescript)** Handle qualified access in assign pat ([#8012](https://github.com/swc-project/swc/issues/8012)) ([2f01aba](https://github.com/swc-project/swc/commit/2f01aba978415add87994f9b20e3e2db83fc48b6)) -## [1.3.89] - 2023-09-25 - -### Bug Fixes - - - -- **(es/compat)** Skip function scope in `block-scoped-fns` pass ([#7975](https://github.com/swc-project/swc/issues/7975)) ([d91a554](https://github.com/swc-project/swc/commit/d91a554033c8ce0ea2b2538b0e86abf5a81eac76)) - diff --git a/Cargo.lock b/Cargo.lock index e84cefba3030..26b5e38f66b6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3764,7 +3764,7 @@ dependencies = [ [[package]] name = "swc_atoms" -version = "0.6.6" +version = "0.6.7" dependencies = [ "bytecheck", "hstr", diff --git a/crates/swc_atoms/Cargo.toml b/crates/swc_atoms/Cargo.toml index afc6077a2e47..d10913c4390c 100644 --- a/crates/swc_atoms/Cargo.toml +++ b/crates/swc_atoms/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_atoms" repository = "https://github.com/swc-project/swc.git" -version = "0.6.6" +version = "0.6.7" [lib] bench = false From 8bf1360f19b62fa18075c4f34abefc9eb43f4acb Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 16 Apr 2024 11:09:03 +0000 Subject: [PATCH 138/172] chore: Publish 1.4.15-nightly-20240416.2 --- bindings/Cargo.lock | 14 +++++++------- bindings/binding_core_node/Cargo.toml | 2 +- bindings/binding_core_wasm/Cargo.toml | 4 ++-- bindings/binding_minifier_node/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 4 ++-- bindings/swc_cli/Cargo.toml | 4 ++-- package.json | 2 +- packages/minifier/package.json | 2 +- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 51baea534c05..f46bfade4f4b 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -231,7 +231,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.4.15-nightly-20240416.1" +version = "1.4.15-nightly-20240416.2" dependencies = [ "anyhow", "getrandom", @@ -291,7 +291,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.4.15-nightly-20240416.1" +version = "1.4.15-nightly-20240416.2" dependencies = [ "anyhow", "getrandom", @@ -3074,7 +3074,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.217" +version = "0.91.218" dependencies = [ "anyhow", "swc_cli_impl", @@ -3082,9 +3082,9 @@ dependencies = [ [[package]] name = "swc_cli_impl" -version = "0.8.24" +version = "0.8.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36c43755da9950dda43d534ddfdc710c9f7f4a01228dc9599bb0fe6dffdd6865" +checksum = "387b9f58b7da6fc3ec4b3a012d9cc9b6b1216d992df1f4b02dd200694418801d" dependencies = [ "anyhow", "atty", @@ -3189,9 +3189,9 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.90.32" +version = "0.90.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd37cd7a50ba4e5303e41be8e640f3983f88629ffcac166ed4b996825a383717" +checksum = "b671d6b61601035da37d2734797321644821152f87db4502405eed6574de728b" dependencies = [ "binding_macros", "swc", diff --git a/bindings/binding_core_node/Cargo.toml b/bindings/binding_core_node/Cargo.toml index 2a5a47196478..7e1d629fa1da 100644 --- a/bindings/binding_core_node/Cargo.toml +++ b/bindings/binding_core_node/Cargo.toml @@ -51,7 +51,7 @@ tracing-chrome = "0.5.0" tracing-futures = "0.2.5" tracing-subscriber = { version = "0.3.9", features = ["env-filter"] } -swc_core = { version = "0.90.32", features = [ +swc_core = { version = "0.90.33", features = [ "allocator_node", "ecma_ast", "ecma_codegen", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 775e7d03832e..c1594bb830b5 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.15-nightly-20240416.1" +version = "1.4.15-nightly-20240416.2" [lib] bench = false @@ -35,7 +35,7 @@ anyhow = "1.0.66" getrandom = { version = "0.2.10", features = ["js"] } serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" -swc_core = { version = "0.90.32", features = [ +swc_core = { version = "0.90.33", features = [ "ecma_ast_serde", "ecma_codegen", "binding_macro_wasm", diff --git a/bindings/binding_minifier_node/Cargo.toml b/bindings/binding_minifier_node/Cargo.toml index f73ef0fc2c6d..c0750fdfe3d0 100644 --- a/bindings/binding_minifier_node/Cargo.toml +++ b/bindings/binding_minifier_node/Cargo.toml @@ -37,7 +37,7 @@ tracing-subscriber = { version = "0.3.9", features = ["env-filter"] } swc_compiler_base = { version = "0.7.20", features = ["node"] } swc_config = "0.1.12" -swc_core = { version = "0.90.32", features = [ +swc_core = { version = "0.90.33", features = [ "allocator_node", "common_concurrent", "common_sourcemap", diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 206641f77bd0..85b588773795 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.15-nightly-20240416.1" +version = "1.4.15-nightly-20240416.2" [lib] bench = false @@ -35,7 +35,7 @@ anyhow = "1.0.66" getrandom = { version = "0.2.10", features = ["js"] } serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" -swc_core = { version = "0.90.32", features = [ +swc_core = { version = "0.90.33", features = [ "ecma_ast_serde", "ecma_codegen", "binding_macro_wasm", diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index b5f651078569..59e4bb167f5b 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.217" +version = "0.91.218" [[bin]] bench = false @@ -19,4 +19,4 @@ plugin = ["swc_cli_impl/plugin"] [dependencies] anyhow = "1.0.66" -swc_cli_impl = "0.8.24" +swc_cli_impl = "0.8.25" diff --git a/package.json b/package.json index f86715f2458b..093b6b2b803f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.4.15-nightly-20240416.1", + "version": "1.4.15-nightly-20240416.2", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 697b191e1d2f..eb340abd29a5 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.4.15-nightly-20240416.1", + "version": "1.4.15-nightly-20240416.2", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", From 13f7ef70d9d4dd597c0995024a5dfa6ba40380fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 16 Apr 2024 20:18:36 +0900 Subject: [PATCH 139/172] chore: Pin version of `proc-macro2` --- bindings/Cargo.lock | 6 ++++-- bindings/binding_core_node/Cargo.toml | 3 ++- bindings/binding_core_wasm/Cargo.toml | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index f46bfade4f4b..a236ae853f20 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -219,6 +219,7 @@ dependencies = [ "napi-derive", "node_macro_deps", "path-clean 0.1.0", + "proc-macro2", "serde", "serde_json", "swc_core", @@ -235,6 +236,7 @@ version = "1.4.15-nightly-20240416.2" dependencies = [ "anyhow", "getrandom", + "proc-macro2", "serde", "serde-wasm-bindgen", "swc_core", @@ -2219,9 +2221,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ "unicode-ident", ] diff --git a/bindings/binding_core_node/Cargo.toml b/bindings/binding_core_node/Cargo.toml index 7e1d629fa1da..e4365e31c786 100644 --- a/bindings/binding_core_node/Cargo.toml +++ b/bindings/binding_core_node/Cargo.toml @@ -44,6 +44,7 @@ napi-derive = { version = "2", default-features = false, features = [ ] } node_macro_deps = { path = "../node_macro_deps" } path-clean = "0.1" +proc-macro2 = "=1.0.79" serde = { version = "1", features = ["derive"] } serde_json = { version = "1", features = ["unbounded_depth"] } tracing = { version = "0.1.37", features = ["release_max_level_info"] } @@ -63,5 +64,5 @@ swc_core = { version = "0.90.33", features = [ "ecma_visit", "base_node", "base_concurrent", -]} +] } swc_malloc = "0.5.10" diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index c1594bb830b5..e35365452581 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -33,6 +33,7 @@ plugin = [] [dependencies] anyhow = "1.0.66" getrandom = { version = "0.2.10", features = ["js"] } +proc-macro2 = "=1.0.79" serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" swc_core = { version = "0.90.33", features = [ From 36e49e456f318fb08873ecdd1d1b28061e6af754 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 16 Apr 2024 11:21:39 +0000 Subject: [PATCH 140/172] chore: Publish 1.4.15-nightly-20240416.3 --- bindings/Cargo.lock | 6 +++--- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- package.json | 2 +- packages/minifier/package.json | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index a236ae853f20..bb9dcccc79d6 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -232,7 +232,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.4.15-nightly-20240416.2" +version = "1.4.15-nightly-20240416.3" dependencies = [ "anyhow", "getrandom", @@ -293,7 +293,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.4.15-nightly-20240416.2" +version = "1.4.15-nightly-20240416.3" dependencies = [ "anyhow", "getrandom", @@ -3076,7 +3076,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.218" +version = "0.91.219" dependencies = [ "anyhow", "swc_cli_impl", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index e35365452581..e137c97a3bde 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.15-nightly-20240416.2" +version = "1.4.15-nightly-20240416.3" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 85b588773795..d855fffbd6ab 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.15-nightly-20240416.2" +version = "1.4.15-nightly-20240416.3" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 59e4bb167f5b..ee94a2c07c34 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.218" +version = "0.91.219" [[bin]] bench = false diff --git a/package.json b/package.json index 093b6b2b803f..71d9f44cd7d5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.4.15-nightly-20240416.2", + "version": "1.4.15-nightly-20240416.3", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/package.json b/packages/minifier/package.json index eb340abd29a5..3ef0818cde67 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.4.15-nightly-20240416.2", + "version": "1.4.15-nightly-20240416.3", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", From 2ec3282722e44c60433d5cdd6a081cac81090885 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Wed, 17 Apr 2024 08:35:45 +0900 Subject: [PATCH 141/172] chore: Pin version of `proc-macro2` to `v1.0.79` --- bindings/Cargo.lock | 3 +++ bindings/binding_minifier_node/Cargo.toml | 2 ++ bindings/binding_minifier_wasm/Cargo.toml | 1 + bindings/node_macro_deps/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 1 + 5 files changed, 8 insertions(+), 1 deletion(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index bb9dcccc79d6..e43d21078e0b 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -276,6 +276,7 @@ dependencies = [ "napi-derive", "node_macro_deps", "path-clean 0.1.0", + "proc-macro2", "serde", "serde_json", "sourcemap", @@ -297,6 +298,7 @@ version = "1.4.15-nightly-20240416.3" dependencies = [ "anyhow", "getrandom", + "proc-macro2", "serde", "serde-wasm-bindgen", "swc_core", @@ -3079,6 +3081,7 @@ name = "swc_cli" version = "0.91.219" dependencies = [ "anyhow", + "proc-macro2", "swc_cli_impl", ] diff --git a/bindings/binding_minifier_node/Cargo.toml b/bindings/binding_minifier_node/Cargo.toml index c0750fdfe3d0..65489acb8c66 100644 --- a/bindings/binding_minifier_node/Cargo.toml +++ b/bindings/binding_minifier_node/Cargo.toml @@ -27,6 +27,7 @@ napi-derive = { version = "2", default-features = false, features = [ ] } node_macro_deps = { path = "../node_macro_deps" } path-clean = "0.1" +proc-macro2 = "=1.0.79" serde = { version = "1", features = ["derive"] } serde_json = { version = "1", features = ["unbounded_depth"] } sourcemap = "8.0.0" @@ -35,6 +36,7 @@ tracing-chrome = "0.5.0" tracing-futures = "0.2.5" tracing-subscriber = { version = "0.3.9", features = ["env-filter"] } + swc_compiler_base = { version = "0.7.20", features = ["node"] } swc_config = "0.1.12" swc_core = { version = "0.90.33", features = [ diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index d855fffbd6ab..949935f29c44 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -33,6 +33,7 @@ plugin = [] [dependencies] anyhow = "1.0.66" getrandom = { version = "0.2.10", features = ["js"] } +proc-macro2 = "=1.0.79" serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" swc_core = { version = "0.90.33", features = [ diff --git a/bindings/node_macro_deps/Cargo.toml b/bindings/node_macro_deps/Cargo.toml index f0418afbc148..6e41c37afae9 100644 --- a/bindings/node_macro_deps/Cargo.toml +++ b/bindings/node_macro_deps/Cargo.toml @@ -12,5 +12,5 @@ bench = false proc-macro = true [dependencies] -proc-macro2 = "1" +proc-macro2 = "=1.0.79" quote = "1" diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index ee94a2c07c34..c71c5643b015 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -19,4 +19,5 @@ plugin = ["swc_cli_impl/plugin"] [dependencies] anyhow = "1.0.66" +proc-macro2 = "=1.0.79" swc_cli_impl = "0.8.25" From 036414af1223ff9e84df0f936c477fa93287d42e Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 16 Apr 2024 23:39:01 +0000 Subject: [PATCH 142/172] chore: Publish 1.4.15-nightly-20240416.4 --- bindings/Cargo.lock | 6 +++--- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- package.json | 2 +- packages/minifier/package.json | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index e43d21078e0b..bbbb27ef461e 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -232,7 +232,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.4.15-nightly-20240416.3" +version = "1.4.15-nightly-20240416.4" dependencies = [ "anyhow", "getrandom", @@ -294,7 +294,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.4.15-nightly-20240416.3" +version = "1.4.15-nightly-20240416.4" dependencies = [ "anyhow", "getrandom", @@ -3078,7 +3078,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.219" +version = "0.91.220" dependencies = [ "anyhow", "proc-macro2", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index e137c97a3bde..6cfc4ea1072e 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.15-nightly-20240416.3" +version = "1.4.15-nightly-20240416.4" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 949935f29c44..203aa0ab66e0 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.15-nightly-20240416.3" +version = "1.4.15-nightly-20240416.4" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index c71c5643b015..b7ad2a0530ca 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.219" +version = "0.91.220" [[bin]] bench = false diff --git a/package.json b/package.json index 71d9f44cd7d5..dfbb6a998a23 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.4.15-nightly-20240416.3", + "version": "1.4.15-nightly-20240416.4", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 3ef0818cde67..4d4174823ee1 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.4.15-nightly-20240416.3", + "version": "1.4.15-nightly-20240416.4", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", From f9459a8adf28de02d44dfe1da243a1d66a6ec41e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Wed, 17 Apr 2024 14:42:11 +0900 Subject: [PATCH 143/172] build(cargo): Update `rustc` to `nightly-2024-04-16` (#8870) --- Cargo.lock | 4 +-- bindings/Cargo.lock | 10 ++----- bindings/binding_core_node/Cargo.toml | 1 - bindings/binding_core_wasm/Cargo.toml | 1 - bindings/binding_minifier_node/Cargo.toml | 1 - bindings/binding_minifier_wasm/Cargo.toml | 1 - bindings/node_macro_deps/Cargo.toml | 3 +-- bindings/swc_cli/Cargo.toml | 1 - crates/swc/src/config/mod.rs | 1 - crates/swc_common/src/source_map.rs | 4 +-- .../tests/fixture/stub_napi/Cargo.toml | 1 - .../tests/fixture/stub_wasm/Cargo.toml | 1 - crates/swc_css_codegen/src/lib.rs | 1 + crates/swc_css_utils/src/lib.rs | 4 +-- crates/swc_ecma_codegen/src/lib.rs | 1 + .../src/destructuring.rs | 4 +-- crates/swc_ecma_parser/src/lexer/number.rs | 6 ++--- .../src/json_parse.rs | 2 -- crates/swc_ecma_utils/src/lib.rs | 26 +++++++------------ crates/swc_html_codegen/src/lib.rs | 1 + .../css-plugins/swc_noop_plugin/Cargo.toml | 1 - .../tests/fixture/issue_6404/Cargo.toml | 1 - .../fixture/swc_internal_plugin/Cargo.toml | 1 - .../tests/fixture/swc_noop_plugin/Cargo.toml | 1 - crates/swc_xml_codegen/src/lib.rs | 1 + rust-toolchain | 2 +- 26 files changed, 28 insertions(+), 53 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 26b5e38f66b6..dcdf40456648 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2852,9 +2852,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.79" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" dependencies = [ "unicode-ident", ] diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index bbbb27ef461e..f915ee11d61f 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -219,7 +219,6 @@ dependencies = [ "napi-derive", "node_macro_deps", "path-clean 0.1.0", - "proc-macro2", "serde", "serde_json", "swc_core", @@ -236,7 +235,6 @@ version = "1.4.15-nightly-20240416.4" dependencies = [ "anyhow", "getrandom", - "proc-macro2", "serde", "serde-wasm-bindgen", "swc_core", @@ -276,7 +274,6 @@ dependencies = [ "napi-derive", "node_macro_deps", "path-clean 0.1.0", - "proc-macro2", "serde", "serde_json", "sourcemap", @@ -298,7 +295,6 @@ version = "1.4.15-nightly-20240416.4" dependencies = [ "anyhow", "getrandom", - "proc-macro2", "serde", "serde-wasm-bindgen", "swc_core", @@ -1832,7 +1828,6 @@ checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" name = "node_macro_deps" version = "0.1.0" dependencies = [ - "proc-macro2", "quote", ] @@ -2223,9 +2218,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.79" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" dependencies = [ "unicode-ident", ] @@ -3081,7 +3076,6 @@ name = "swc_cli" version = "0.91.220" dependencies = [ "anyhow", - "proc-macro2", "swc_cli_impl", ] diff --git a/bindings/binding_core_node/Cargo.toml b/bindings/binding_core_node/Cargo.toml index e4365e31c786..0cba94d0ec67 100644 --- a/bindings/binding_core_node/Cargo.toml +++ b/bindings/binding_core_node/Cargo.toml @@ -44,7 +44,6 @@ napi-derive = { version = "2", default-features = false, features = [ ] } node_macro_deps = { path = "../node_macro_deps" } path-clean = "0.1" -proc-macro2 = "=1.0.79" serde = { version = "1", features = ["derive"] } serde_json = { version = "1", features = ["unbounded_depth"] } tracing = { version = "0.1.37", features = ["release_max_level_info"] } diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 6cfc4ea1072e..008c1046a6df 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -33,7 +33,6 @@ plugin = [] [dependencies] anyhow = "1.0.66" getrandom = { version = "0.2.10", features = ["js"] } -proc-macro2 = "=1.0.79" serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" swc_core = { version = "0.90.33", features = [ diff --git a/bindings/binding_minifier_node/Cargo.toml b/bindings/binding_minifier_node/Cargo.toml index 65489acb8c66..5330ec0dd560 100644 --- a/bindings/binding_minifier_node/Cargo.toml +++ b/bindings/binding_minifier_node/Cargo.toml @@ -27,7 +27,6 @@ napi-derive = { version = "2", default-features = false, features = [ ] } node_macro_deps = { path = "../node_macro_deps" } path-clean = "0.1" -proc-macro2 = "=1.0.79" serde = { version = "1", features = ["derive"] } serde_json = { version = "1", features = ["unbounded_depth"] } sourcemap = "8.0.0" diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 203aa0ab66e0..ddf018c0d751 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -33,7 +33,6 @@ plugin = [] [dependencies] anyhow = "1.0.66" getrandom = { version = "0.2.10", features = ["js"] } -proc-macro2 = "=1.0.79" serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" swc_core = { version = "0.90.33", features = [ diff --git a/bindings/node_macro_deps/Cargo.toml b/bindings/node_macro_deps/Cargo.toml index 6e41c37afae9..41a655dfe1b5 100644 --- a/bindings/node_macro_deps/Cargo.toml +++ b/bindings/node_macro_deps/Cargo.toml @@ -12,5 +12,4 @@ bench = false proc-macro = true [dependencies] -proc-macro2 = "=1.0.79" -quote = "1" +quote = "1" diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index b7ad2a0530ca..fe20382b9272 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -19,5 +19,4 @@ plugin = ["swc_cli_impl/plugin"] [dependencies] anyhow = "1.0.66" -proc-macro2 = "=1.0.79" swc_cli_impl = "0.8.25" diff --git a/crates/swc/src/config/mod.rs b/crates/swc/src/config/mod.rs index 3364eec44459..3fc62d6ee82b 100644 --- a/crates/swc/src/config/mod.rs +++ b/crates/swc/src/config/mod.rs @@ -3,7 +3,6 @@ use std::{ env, path::{Path, PathBuf}, sync::Arc, - usize, }; use anyhow::{bail, Context, Error}; diff --git a/crates/swc_common/src/source_map.rs b/crates/swc_common/src/source_map.rs index 5fc8967975ff..8832e92fbede 100644 --- a/crates/swc_common/src/source_map.rs +++ b/crates/swc_common/src/source_map.rs @@ -874,9 +874,7 @@ impl SourceMap { // Disregard indexes that are at the start or end of their spans, they can't fit // bigger characters. - if (!forwards && end_index == usize::min_value()) - || (forwards && start_index == usize::max_value()) - { + if (!forwards && end_index == usize::MIN) || (forwards && start_index == usize::MAX) { debug!("find_width_of_character_at_span: start or end of span, cannot be multibyte"); return 1; } diff --git a/crates/swc_core/tests/fixture/stub_napi/Cargo.toml b/crates/swc_core/tests/fixture/stub_napi/Cargo.toml index 841394d5ad67..044a070f42d9 100644 --- a/crates/swc_core/tests/fixture/stub_napi/Cargo.toml +++ b/crates/swc_core/tests/fixture/stub_napi/Cargo.toml @@ -39,7 +39,6 @@ napi-derive = { version = "2", default-features = false, features = [ "type-def", ] } path-clean = "0.1" -proc-macro2 = "=1.0.79" serde = { version = "1", features = ["derive"] } serde_json = { version = "1", features = ["unbounded_depth"] } tracing = { version = "0.1.37", features = ["release_max_level_info"] } diff --git a/crates/swc_core/tests/fixture/stub_wasm/Cargo.toml b/crates/swc_core/tests/fixture/stub_wasm/Cargo.toml index e8b40c293bd7..d12d3403e245 100644 --- a/crates/swc_core/tests/fixture/stub_wasm/Cargo.toml +++ b/crates/swc_core/tests/fixture/stub_wasm/Cargo.toml @@ -17,7 +17,6 @@ swc_v1 = [] [dependencies] anyhow = "1.0.66" browserslist-rs = { version = "0.13.0", features = ["wasm_bindgen"] } -proc-macro2 = "=1.0.79" serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" swc_core = { path = "../../../../swc_core", features = [ diff --git a/crates/swc_css_codegen/src/lib.rs b/crates/swc_css_codegen/src/lib.rs index 1ccd1ec895ff..d36316421ea4 100644 --- a/crates/swc_css_codegen/src/lib.rs +++ b/crates/swc_css_codegen/src/lib.rs @@ -1,5 +1,6 @@ #![deny(clippy::all)] #![allow(clippy::needless_update)] +#![allow(non_local_definitions)] pub use std::fmt::Result; use std::{borrow::Cow, str, str::from_utf8}; diff --git a/crates/swc_css_utils/src/lib.rs b/crates/swc_css_utils/src/lib.rs index 1fd3f5da9b86..6fbe461405ad 100644 --- a/crates/swc_css_utils/src/lib.rs +++ b/crates/swc_css_utils/src/lib.rs @@ -317,7 +317,7 @@ pub fn hsl_to_rgb(hsl: [f64; 3]) -> [f64; 3] { let k = (n + h / 30.0) % 12.0; let a = s * f64::min(l, 1.0 - l); - l - a * f64::max(-1.0, f64::min(f64::min(k - 3.0, 9.0 - k), 1.0)) + l - a * f64::min(k - 3.0, 9.0 - k).clamp(-1.0, 1.0) }; r = f(0.0); @@ -339,7 +339,7 @@ pub fn to_rgb255(abc: [f64; 3]) -> [f64; 3] { } pub fn clamp_unit_f64(val: f64) -> u8 { - (val * 255.).round().max(0.).min(255.) as u8 + (val * 255.).round().clamp(0., 255.) as u8 } pub fn round_alpha(alpha: f64) -> f64 { diff --git a/crates/swc_ecma_codegen/src/lib.rs b/crates/swc_ecma_codegen/src/lib.rs index d5bd57cbea21..d365aee75538 100644 --- a/crates/swc_ecma_codegen/src/lib.rs +++ b/crates/swc_ecma_codegen/src/lib.rs @@ -3,6 +3,7 @@ #![deny(unused)] #![allow(clippy::match_like_matches_macro)] #![allow(clippy::nonminimal_bool)] +#![allow(non_local_definitions)] use std::{borrow::Cow, fmt::Write, io}; diff --git a/crates/swc_ecma_compat_es2015/src/destructuring.rs b/crates/swc_ecma_compat_es2015/src/destructuring.rs index 7a14ba5c6384..4796b4c2c112 100644 --- a/crates/swc_ecma_compat_es2015/src/destructuring.rs +++ b/crates/swc_ecma_compat_es2015/src/destructuring.rs @@ -228,7 +228,7 @@ impl AssignFolder { }, Some(init), Some(if has_rest_pat(&elems) { - std::usize::MAX + usize::MAX } else { elems.len() }), @@ -721,7 +721,7 @@ impl VisitMut for AssignFolder { &mut self.vars, None, Some(if has_rest_pat(elems) { - std::usize::MAX + usize::MAX } else { elems.len() }), diff --git a/crates/swc_ecma_parser/src/lexer/number.rs b/crates/swc_ecma_parser/src/lexer/number.rs index bd77f22e22ff..c093345a702a 100644 --- a/crates/swc_ecma_parser/src/lexer/number.rs +++ b/crates/swc_ecma_parser/src/lexer/number.rs @@ -536,7 +536,7 @@ impl<'a> Lexer<'a> { #[cfg(test)] mod tests { - use std::{f64::INFINITY, panic}; + use std::panic; use super::*; @@ -576,7 +576,7 @@ mod tests { 0000000000000000000000000000000000000000000000000000"; #[test] fn num_inf() { - assert_eq!(num(LONG), (INFINITY, LONG.into())); + assert_eq!(num(LONG), (f64::INFINITY, LONG.into())); } /// Number >= 2^53 @@ -625,7 +625,7 @@ mod tests { assert_eq!( num(LARGE_POSITIVE_EXP), - (INFINITY, LARGE_POSITIVE_EXP.into()) + (f64::INFINITY, LARGE_POSITIVE_EXP.into()) ); assert_eq!(num(LARGE_NEGATIVE_EXP), (0.0, LARGE_NEGATIVE_EXP.into())); assert_eq!( diff --git a/crates/swc_ecma_transforms_optimization/src/json_parse.rs b/crates/swc_ecma_transforms_optimization/src/json_parse.rs index ae5b621e920d..e873f59e9704 100644 --- a/crates/swc_ecma_transforms_optimization/src/json_parse.rs +++ b/crates/swc_ecma_transforms_optimization/src/json_parse.rs @@ -1,5 +1,3 @@ -use std::usize; - use serde_json::Value; use swc_common::{util::take::Take, Spanned, DUMMY_SP}; use swc_ecma_ast::*; diff --git a/crates/swc_ecma_utils/src/lib.rs b/crates/swc_ecma_utils/src/lib.rs index 63593363812d..f2937ba7eef7 100644 --- a/crates/swc_ecma_utils/src/lib.rs +++ b/crates/swc_ecma_utils/src/lib.rs @@ -11,13 +11,7 @@ pub extern crate swc_ecma_ast; #[doc(hidden)] pub extern crate swc_common; -use std::{ - borrow::Cow, - f64::{INFINITY, NAN}, - hash::Hash, - num::FpCategory, - ops::Add, -}; +use std::{borrow::Cow, hash::Hash, num::FpCategory, ops::Add}; use rustc_hash::FxHashMap; use swc_atoms::JsWord; @@ -891,8 +885,8 @@ pub trait ExprExt { _ => return (Pure, Unknown), }, Expr::Ident(Ident { sym, span, .. }) => match &**sym { - "undefined" | "NaN" if span.ctxt == ctx.unresolved_ctxt => NAN, - "Infinity" if span.ctxt == ctx.unresolved_ctxt => INFINITY, + "undefined" | "NaN" if span.ctxt == ctx.unresolved_ctxt => f64::NAN, + "Infinity" if span.ctxt == ctx.unresolved_ctxt => f64::INFINITY, _ => return (Pure, Unknown), }, Expr::Unary(UnaryExpr { @@ -908,7 +902,7 @@ pub trait ExprExt { }) if &**sym == "Infinity" && span.ctxt == ctx.unresolved_ctxt ) => { - -INFINITY + -f64::INFINITY } Expr::Unary(UnaryExpr { op: op!("!"), @@ -930,9 +924,9 @@ pub trait ExprExt { .. }) => { if arg.may_have_side_effects(ctx) { - return (MayBeImpure, Known(NAN)); + return (MayBeImpure, Known(f64::NAN)); } else { - NAN + f64::NAN } } @@ -1578,19 +1572,19 @@ pub fn num_from_str(s: &str) -> Value { b"0x" | b"0X" => { return match u64::from_str_radix(&s[2..], 16) { Ok(n) => Known(n as f64), - Err(_) => Known(NAN), + Err(_) => Known(f64::NAN), } } b"0o" | b"0O" => { return match u64::from_str_radix(&s[2..], 8) { Ok(n) => Known(n as f64), - Err(_) => Known(NAN), + Err(_) => Known(f64::NAN), }; } b"0b" | b"0B" => { return match u64::from_str_radix(&s[2..], 2) { Ok(n) => Known(n as f64), - Err(_) => Known(NAN), + Err(_) => Known(f64::NAN), }; } _ => {} @@ -1611,7 +1605,7 @@ pub fn num_from_str(s: &str) -> Value { _ => {} } - Known(s.parse().ok().unwrap_or(NAN)) + Known(s.parse().ok().unwrap_or(f64::NAN)) } impl ExprExt for Box { diff --git a/crates/swc_html_codegen/src/lib.rs b/crates/swc_html_codegen/src/lib.rs index fd055b427520..aecbad102a30 100644 --- a/crates/swc_html_codegen/src/lib.rs +++ b/crates/swc_html_codegen/src/lib.rs @@ -1,6 +1,7 @@ #![deny(clippy::all)] #![allow(clippy::needless_update)] #![allow(clippy::match_like_matches_macro)] +#![allow(non_local_definitions)] pub use std::fmt::Result; use std::{borrow::Cow, iter::Peekable, str::Chars}; diff --git a/crates/swc_plugin_runner/tests/css-plugins/swc_noop_plugin/Cargo.toml b/crates/swc_plugin_runner/tests/css-plugins/swc_noop_plugin/Cargo.toml index d46c7c433282..d03b359d9058 100644 --- a/crates/swc_plugin_runner/tests/css-plugins/swc_noop_plugin/Cargo.toml +++ b/crates/swc_plugin_runner/tests/css-plugins/swc_noop_plugin/Cargo.toml @@ -10,7 +10,6 @@ version = "0.1.0" crate-type = ["cdylib"] [dependencies] -proc-macro2 = "=1.0.79" serde = "1" swc_core = { path = "../../../../swc_core", features = [ "css_ast", diff --git a/crates/swc_plugin_runner/tests/fixture/issue_6404/Cargo.toml b/crates/swc_plugin_runner/tests/fixture/issue_6404/Cargo.toml index ed9627fd027b..77690a680939 100644 --- a/crates/swc_plugin_runner/tests/fixture/issue_6404/Cargo.toml +++ b/crates/swc_plugin_runner/tests/fixture/issue_6404/Cargo.toml @@ -10,7 +10,6 @@ version = "0.1.0" crate-type = ["cdylib"] [dependencies] -proc-macro2 = "=1.0.79" serde = "1" swc_core = { path = "../../../../swc_core", features = [ "ecma_plugin_transform", diff --git a/crates/swc_plugin_runner/tests/fixture/swc_internal_plugin/Cargo.toml b/crates/swc_plugin_runner/tests/fixture/swc_internal_plugin/Cargo.toml index 51922415f44f..4909641da2d6 100644 --- a/crates/swc_plugin_runner/tests/fixture/swc_internal_plugin/Cargo.toml +++ b/crates/swc_plugin_runner/tests/fixture/swc_internal_plugin/Cargo.toml @@ -10,7 +10,6 @@ version = "0.1.0" crate-type = ["cdylib"] [dependencies] -proc-macro2 = "=1.0.79" serde = "1" swc_core = { path = "../../../../swc_core", features = [ "ecma_plugin_transform", diff --git a/crates/swc_plugin_runner/tests/fixture/swc_noop_plugin/Cargo.toml b/crates/swc_plugin_runner/tests/fixture/swc_noop_plugin/Cargo.toml index a878b20674aa..123d8ee93798 100644 --- a/crates/swc_plugin_runner/tests/fixture/swc_noop_plugin/Cargo.toml +++ b/crates/swc_plugin_runner/tests/fixture/swc_noop_plugin/Cargo.toml @@ -10,7 +10,6 @@ version = "0.1.0" crate-type = ["cdylib"] [dependencies] -proc-macro2 = "=1.0.79" serde = "1" swc_core = { path = "../../../../swc_core", features = [ "ecma_plugin_transform", diff --git a/crates/swc_xml_codegen/src/lib.rs b/crates/swc_xml_codegen/src/lib.rs index 84a49095f1b1..f2659c08b853 100644 --- a/crates/swc_xml_codegen/src/lib.rs +++ b/crates/swc_xml_codegen/src/lib.rs @@ -1,5 +1,6 @@ #![deny(clippy::all)] #![allow(clippy::needless_update)] +#![allow(non_local_definitions)] pub use std::fmt::Result; use std::{iter::Peekable, str::Chars}; diff --git a/rust-toolchain b/rust-toolchain index f1104daa0f34..c8dce96fac4a 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2024-04-03 \ No newline at end of file +nightly-2024-04-16 \ No newline at end of file From 4410d623177f15266a25eea88897a5856d005eea Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Wed, 17 Apr 2024 05:44:33 +0000 Subject: [PATCH 144/172] chore: Bump crates --- CHANGELOG.md | 9 +++----- Cargo.lock | 22 +++++++++---------- crates/swc/Cargo.toml | 2 +- crates/swc_common/Cargo.toml | 2 +- crates/swc_core/Cargo.toml | 2 +- crates/swc_css_codegen/Cargo.toml | 2 +- crates/swc_ecma_codegen/Cargo.toml | 2 +- crates/swc_ecma_compat_es2015/Cargo.toml | 2 +- crates/swc_ecma_parser/Cargo.toml | 2 +- .../Cargo.toml | 2 +- crates/swc_ecma_utils/Cargo.toml | 2 +- crates/swc_html_codegen/Cargo.toml | 2 +- crates/swc_xml_codegen/Cargo.toml | 2 +- 13 files changed, 25 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 920308c43fd5..74973d71feb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,9 @@ - **(cargo)** Update rustc to `nightly-2024-04-03` ([#8821](https://github.com/swc-project/swc/issues/8821)) ([ca9c76b](https://github.com/swc-project/swc/commit/ca9c76b46f26f0aaf6b7f18cb7b4c6fdb7ebd512)) + +- **(cargo)** Update `rustc` to `nightly-2024-04-16` ([#8870](https://github.com/swc-project/swc/issues/8870)) ([f9459a8](https://github.com/swc-project/swc/commit/f9459a8adf28de02d44dfe1da243a1d66a6ec41e)) + ## [1.4.14] - 2024-04-15 ### Bug Fixes @@ -1350,12 +1353,6 @@ -- **(es/codegen)** Fix codegen of unicode surrogates ([#7985](https://github.com/swc-project/swc/issues/7985)) ([39c680d](https://github.com/swc-project/swc/commit/39c680d814644fbde50b0f73a29aebe791812eb2)) - - -- **(es/codegen)** Fix codegen of optional chaining expr with a comment ([#8005](https://github.com/swc-project/swc/issues/8005)) ([f07bb48](https://github.com/swc-project/swc/commit/f07bb482e694a422591085621a38aff747294502)) - - - **(es/typescript)** Handle `DeclareCollect` correctly ([#8008](https://github.com/swc-project/swc/issues/8008)) ([9d08b8a](https://github.com/swc-project/swc/commit/9d08b8a6145d486e570a22563c62a69722cf8759)) diff --git a/Cargo.lock b/Cargo.lock index dcdf40456648..601e7a647270 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3706,7 +3706,7 @@ dependencies = [ [[package]] name = "swc" -version = "0.273.26" +version = "0.273.27" dependencies = [ "ansi_term", "anyhow", @@ -3855,7 +3855,7 @@ dependencies = [ [[package]] name = "swc_common" -version = "0.33.24" +version = "0.33.25" dependencies = [ "ahash 0.8.8", "anyhow", @@ -3936,7 +3936,7 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.90.33" +version = "0.90.34" dependencies = [ "anyhow", "binding_macros", @@ -4015,7 +4015,7 @@ dependencies = [ [[package]] name = "swc_css_codegen" -version = "0.151.33" +version = "0.151.34" dependencies = [ "auto_impl", "bitflags 2.5.0", @@ -4192,7 +4192,7 @@ dependencies = [ [[package]] name = "swc_ecma_codegen" -version = "0.148.16" +version = "0.148.17" dependencies = [ "base64", "criterion", @@ -4254,7 +4254,7 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2015" -version = "0.4.19" +version = "0.4.20" dependencies = [ "arrayvec", "indexmap 2.1.0", @@ -4510,7 +4510,7 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "0.143.15" +version = "0.143.16" dependencies = [ "criterion", "either", @@ -4744,7 +4744,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_optimization" -version = "0.198.21" +version = "0.198.22" dependencies = [ "dashmap", "indexmap 2.1.0", @@ -4887,7 +4887,7 @@ dependencies = [ [[package]] name = "swc_ecma_utils" -version = "0.127.19" +version = "0.127.20" dependencies = [ "indexmap 2.1.0", "num_cpus", @@ -5037,7 +5037,7 @@ dependencies = [ [[package]] name = "swc_html_codegen" -version = "0.42.25" +version = "0.42.26" dependencies = [ "auto_impl", "bitflags 2.5.0", @@ -5320,7 +5320,7 @@ dependencies = [ [[package]] name = "swc_xml_codegen" -version = "0.13.22" +version = "0.13.23" dependencies = [ "auto_impl", "bitflags 2.5.0", diff --git a/crates/swc/Cargo.toml b/crates/swc/Cargo.toml index 7febe75165ff..7d267e6054c2 100644 --- a/crates/swc/Cargo.toml +++ b/crates/swc/Cargo.toml @@ -9,7 +9,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc" repository = "https://github.com/swc-project/swc.git" -version = "0.273.26" +version = "0.273.27" [lib] bench = false diff --git a/crates/swc_common/Cargo.toml b/crates/swc_common/Cargo.toml index 072c63b217f8..fb87b64dd248 100644 --- a/crates/swc_common/Cargo.toml +++ b/crates/swc_common/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_common" repository = "https://github.com/swc-project/swc.git" -version = "0.33.24" +version = "0.33.25" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_core/Cargo.toml b/crates/swc_core/Cargo.toml index 6da260b327c3..56f39345eeb4 100644 --- a/crates/swc_core/Cargo.toml +++ b/crates/swc_core/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_core" repository = "https://github.com/swc-project/swc.git" -version = "0.90.33" +version = "0.90.34" [package.metadata.docs.rs] features = [ "allocator_node", diff --git a/crates/swc_css_codegen/Cargo.toml b/crates/swc_css_codegen/Cargo.toml index ce584f3c9976..a99171cc87df 100644 --- a/crates/swc_css_codegen/Cargo.toml +++ b/crates/swc_css_codegen/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_css_codegen" repository = "https://github.com/swc-project/swc.git" -version = "0.151.33" +version = "0.151.34" [lib] bench = false diff --git a/crates/swc_ecma_codegen/Cargo.toml b/crates/swc_ecma_codegen/Cargo.toml index f60f31cc18aa..82d70853e5aa 100644 --- a/crates/swc_ecma_codegen/Cargo.toml +++ b/crates/swc_ecma_codegen/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_codegen" repository = "https://github.com/swc-project/swc.git" -version = "0.148.16" +version = "0.148.17" [features] # This does not enable serde for ast nodes. diff --git a/crates/swc_ecma_compat_es2015/Cargo.toml b/crates/swc_ecma_compat_es2015/Cargo.toml index f5a7f092d923..e5cb889f659d 100644 --- a/crates/swc_ecma_compat_es2015/Cargo.toml +++ b/crates/swc_ecma_compat_es2015/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_compat_es2015" repository = "https://github.com/swc-project/swc.git" -version = "0.4.19" +version = "0.4.20" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/swc_ecma_parser/Cargo.toml b/crates/swc_ecma_parser/Cargo.toml index 9efa7e3cade2..cdd5d679b92e 100644 --- a/crates/swc_ecma_parser/Cargo.toml +++ b/crates/swc_ecma_parser/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "examples/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_parser" repository = "https://github.com/swc-project/swc.git" -version = "0.143.15" +version = "0.143.16" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_ecma_transforms_optimization/Cargo.toml b/crates/swc_ecma_transforms_optimization/Cargo.toml index 2a134dbb5cf0..910c50ee6045 100644 --- a/crates/swc_ecma_transforms_optimization/Cargo.toml +++ b/crates/swc_ecma_transforms_optimization/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_optimization" repository = "https://github.com/swc-project/swc.git" -version = "0.198.21" +version = "0.198.22" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] diff --git a/crates/swc_ecma_utils/Cargo.toml b/crates/swc_ecma_utils/Cargo.toml index 32ce2956ab6b..881fbd0cce28 100644 --- a/crates/swc_ecma_utils/Cargo.toml +++ b/crates/swc_ecma_utils/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_utils" repository = "https://github.com/swc-project/swc.git" -version = "0.127.19" +version = "0.127.20" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_html_codegen/Cargo.toml b/crates/swc_html_codegen/Cargo.toml index ecdc1d34561d..ed6db0710989 100644 --- a/crates/swc_html_codegen/Cargo.toml +++ b/crates/swc_html_codegen/Cargo.toml @@ -10,7 +10,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_html_codegen" repository = "https://github.com/swc-project/swc.git" -version = "0.42.25" +version = "0.42.26" [lib] bench = false diff --git a/crates/swc_xml_codegen/Cargo.toml b/crates/swc_xml_codegen/Cargo.toml index b23392c86cbe..64307517bbea 100644 --- a/crates/swc_xml_codegen/Cargo.toml +++ b/crates/swc_xml_codegen/Cargo.toml @@ -10,7 +10,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_xml_codegen" repository = "https://github.com/swc-project/swc.git" -version = "0.13.22" +version = "0.13.23" [lib] bench = false From 0594398aab32de2429a7cf5e563270b5c7e6547b Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Wed, 17 Apr 2024 07:09:51 +0000 Subject: [PATCH 145/172] chore: Publish 1.4.15-nightly-20240417.1 --- bindings/Cargo.lock | 10 +++++----- bindings/binding_core_node/Cargo.toml | 2 +- bindings/binding_core_wasm/Cargo.toml | 4 ++-- bindings/binding_minifier_node/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 4 ++-- bindings/swc_cli/Cargo.toml | 2 +- package.json | 2 +- packages/minifier/package.json | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index f915ee11d61f..fa297156ce44 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -231,7 +231,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.4.15-nightly-20240416.4" +version = "1.4.15-nightly-20240417.1" dependencies = [ "anyhow", "getrandom", @@ -291,7 +291,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.4.15-nightly-20240416.4" +version = "1.4.15-nightly-20240417.1" dependencies = [ "anyhow", "getrandom", @@ -3073,7 +3073,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.220" +version = "0.91.221" dependencies = [ "anyhow", "swc_cli_impl", @@ -3188,9 +3188,9 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.90.33" +version = "0.90.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b671d6b61601035da37d2734797321644821152f87db4502405eed6574de728b" +checksum = "3212d2884b1b6f68fd08d5224cf20d22972fc55ccda1c13020281f93041aed0e" dependencies = [ "binding_macros", "swc", diff --git a/bindings/binding_core_node/Cargo.toml b/bindings/binding_core_node/Cargo.toml index 0cba94d0ec67..2c45600381dc 100644 --- a/bindings/binding_core_node/Cargo.toml +++ b/bindings/binding_core_node/Cargo.toml @@ -51,7 +51,7 @@ tracing-chrome = "0.5.0" tracing-futures = "0.2.5" tracing-subscriber = { version = "0.3.9", features = ["env-filter"] } -swc_core = { version = "0.90.33", features = [ +swc_core = { version = "0.90.34", features = [ "allocator_node", "ecma_ast", "ecma_codegen", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 008c1046a6df..928af0a68986 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.15-nightly-20240416.4" +version = "1.4.15-nightly-20240417.1" [lib] bench = false @@ -35,7 +35,7 @@ anyhow = "1.0.66" getrandom = { version = "0.2.10", features = ["js"] } serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" -swc_core = { version = "0.90.33", features = [ +swc_core = { version = "0.90.34", features = [ "ecma_ast_serde", "ecma_codegen", "binding_macro_wasm", diff --git a/bindings/binding_minifier_node/Cargo.toml b/bindings/binding_minifier_node/Cargo.toml index 5330ec0dd560..9d95ac4a26fe 100644 --- a/bindings/binding_minifier_node/Cargo.toml +++ b/bindings/binding_minifier_node/Cargo.toml @@ -38,7 +38,7 @@ tracing-subscriber = { version = "0.3.9", features = ["env-filter"] } swc_compiler_base = { version = "0.7.20", features = ["node"] } swc_config = "0.1.12" -swc_core = { version = "0.90.33", features = [ +swc_core = { version = "0.90.34", features = [ "allocator_node", "common_concurrent", "common_sourcemap", diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index ddf018c0d751..879c6f143e38 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.15-nightly-20240416.4" +version = "1.4.15-nightly-20240417.1" [lib] bench = false @@ -35,7 +35,7 @@ anyhow = "1.0.66" getrandom = { version = "0.2.10", features = ["js"] } serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" -swc_core = { version = "0.90.33", features = [ +swc_core = { version = "0.90.34", features = [ "ecma_ast_serde", "ecma_codegen", "binding_macro_wasm", diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index fe20382b9272..4c93c048d8e6 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.220" +version = "0.91.221" [[bin]] bench = false diff --git a/package.json b/package.json index dfbb6a998a23..50b8d82f6082 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.4.15-nightly-20240416.4", + "version": "1.4.15-nightly-20240417.1", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 4d4174823ee1..720e55250403 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.4.15-nightly-20240416.4", + "version": "1.4.15-nightly-20240417.1", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", From ba9f33bb788de9c5d2e4af4c2a7d8cf6ea926b1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Wed, 17 Apr 2024 17:41:20 +0900 Subject: [PATCH 146/172] chore: Publish `1.4.15` with `swc_core` `v0.90.34` --- bindings/Cargo.lock | 123 +++++++++--------- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- package.json | 2 +- packages/minifier/package.json | 2 +- .../scripts/npm/darwin-arm64/package.json | 2 +- .../scripts/npm/darwin-x64/package.json | 2 +- .../npm/linux-arm-gnueabihf/package.json | 2 +- .../scripts/npm/linux-arm64-gnu/package.json | 2 +- .../scripts/npm/linux-arm64-musl/package.json | 2 +- .../scripts/npm/linux-x64-gnu/package.json | 2 +- .../scripts/npm/linux-x64-musl/package.json | 2 +- .../scripts/npm/win32-arm64-msvc/package.json | 2 +- .../scripts/npm/win32-ia32-msvc/package.json | 2 +- .../scripts/npm/win32-x64-msvc/package.json | 2 +- 16 files changed, 77 insertions(+), 76 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index fa297156ce44..a5b0596e5192 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -102,9 +102,9 @@ checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "ast_node" -version = "0.9.6" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3e3e06ec6ac7d893a0db7127d91063ad7d9da8988f8a1a256f03729e6eec026" +checksum = "2e521452c6bce47ee5a5461c5e5d707212907826de14124962c58fcaf463115e" dependencies = [ "proc-macro2", "quote", @@ -231,7 +231,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.4.15-nightly-20240417.1" +version = "1.4.15" dependencies = [ "anyhow", "getrandom", @@ -291,7 +291,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.4.15-nightly-20240417.1" +version = "1.4.15" dependencies = [ "anyhow", "getrandom", @@ -2444,12 +2444,13 @@ checksum = "e3a8614ee435691de62bcffcf4a66d91b3594bf1428a5722e79103249a095690" [[package]] name = "rkyv" -version = "0.7.42" +version = "0.7.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0200c8230b013893c0b2d6213d6ec64ed2b9be2e0e016682b7224ff82cff5c58" +checksum = "5cba464629b3394fc4dbc6f940ff8f5b4ff5c7aef40f29166fd4ad12acbc99c0" dependencies = [ "bitvec", "bytecheck", + "bytes", "hashbrown 0.12.3", "indexmap 1.9.3", "ptr_meta", @@ -2462,9 +2463,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.41" +version = "0.7.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1c672430eb41556291981f45ca900a0239ad007242d1cb4b4167af842db666" +checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65" dependencies = [ "proc-macro2", "quote", @@ -2908,9 +2909,9 @@ dependencies = [ [[package]] name = "string_enum" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b650ea2087d32854a0f20b837fc56ec987a1cb4f758c9757e1171ee9812da63" +checksum = "6960defec35d15d58331ffb8a315d551634f757fe139c7b3d6063cae88ec90f6" dependencies = [ "proc-macro2", "quote", @@ -2960,9 +2961,9 @@ dependencies = [ [[package]] name = "swc" -version = "0.273.25" +version = "0.273.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28571cc2607038238dcfc8dc0fe43af34fa4464124b677fa752d44515bde65bd" +checksum = "d43a65f2a717aed8b30ec0a9a2488eebb4393046ffb8121786b66f2727268b5e" dependencies = [ "anyhow", "base64", @@ -3013,9 +3014,9 @@ dependencies = [ [[package]] name = "swc_atoms" -version = "0.6.6" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04d9d1941a7d24fc503efa29c53f88dd61e6a15cc371947a75cca3b48d564b5b" +checksum = "bb6567e4e67485b3e7662b486f1565bdae54bd5b9d6b16b2ba1a9babb1e42125" dependencies = [ "bytecheck", "hstr", @@ -3027,9 +3028,9 @@ dependencies = [ [[package]] name = "swc_bundler" -version = "0.225.18" +version = "0.225.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f158dd00ce1431cdc7a39f01c5e35bd5a10f1455768c97b59c314c43feecf76" +checksum = "8dda466636577e45b76ff019d040ba5f7973228cb821734460c636350ff4f3ae" dependencies = [ "anyhow", "crc", @@ -3073,7 +3074,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.221" +version = "0.91.222" dependencies = [ "anyhow", "swc_cli_impl", @@ -3105,9 +3106,9 @@ dependencies = [ [[package]] name = "swc_common" -version = "0.33.23" +version = "0.33.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0523b2acc3b9938c51dd454956493d887cc40f0050206287f8599840010442d0" +checksum = "a529796c240cd87da18d26d63f9de4c7ad3680cf0a04b95f0c37f4c4f0a0da63" dependencies = [ "ahash 0.8.8", "anyhow", @@ -3215,9 +3216,9 @@ dependencies = [ [[package]] name = "swc_ecma_ast" -version = "0.112.7" +version = "0.112.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bcd97ee367b48444f90416ea56e71d761600f816bcae9df4f99293d1fa36bd5" +checksum = "d1d5c33c22ad50e8e34b3080a6fb133316d2eaa7d00400fc5018151f5ca44c5a" dependencies = [ "bitflags 2.5.0", "bytecheck", @@ -3235,9 +3236,9 @@ dependencies = [ [[package]] name = "swc_ecma_codegen" -version = "0.148.15" +version = "0.148.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5206067d7c5034e4e19e71ebce270081594eb726c108d0a0a026f7ecbb6f8abd" +checksum = "7188b2848402ce983f6c618a829b4ceb18d21eed7986782a7b7028cc234ede6b" dependencies = [ "memchr", "num-bigint", @@ -3254,9 +3255,9 @@ dependencies = [ [[package]] name = "swc_ecma_codegen_macros" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "394b8239424b339a12012ceb18726ed0244fce6bf6345053cb9320b2791dcaa5" +checksum = "17ab87ba81ae05efd394ab4a8cbdba595ac3554a5e393c76699449d47c43582e" dependencies = [ "proc-macro2", "quote", @@ -3296,9 +3297,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2015" -version = "0.4.18" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e836affd437de66b1f20ed857308bb3c25d4e20631d05595790a963076a9c0a" +checksum = "c4f406983b4800c4326370bbb52e66e4981cefc348f2d9233cf76aac352b4831" dependencies = [ "arrayvec", "indexmap 2.1.0", @@ -3426,9 +3427,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2022" -version = "0.4.16" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62fcfa41b83014ee338c219c446e4ac7f66620706d871b1234d68f990a26225b" +checksum = "75a3b535284aa37b89b608544508a12ac9770193eec5b2a3c015e94d32f32cfd" dependencies = [ "swc_atoms", "swc_common", @@ -3474,9 +3475,9 @@ dependencies = [ [[package]] name = "swc_ecma_lints" -version = "0.92.20" +version = "0.92.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d38a464421a91150511530b93321fa3f888cade9ad05080bf228fd72421c747" +checksum = "23c5c0dc62f29e6aafa3714b585a67280f2102a6925f1ed280ac1826a352ff26" dependencies = [ "auto_impl", "dashmap", @@ -3494,9 +3495,9 @@ dependencies = [ [[package]] name = "swc_ecma_loader" -version = "0.45.25" +version = "0.45.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea397a556585ffd78cda6ef420f6fd0ad54320778930eeb876f02041f58bb017" +checksum = "46ed3847b7c2a70af9a422b24430f7386d70bf3d0408a54991be383f1c3aa954" dependencies = [ "anyhow", "dashmap", @@ -3516,9 +3517,9 @@ dependencies = [ [[package]] name = "swc_ecma_minifier" -version = "0.192.22" +version = "0.192.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1b038d6effbed5103d38460e6b9f5006fd6ffa91e827efdf78953b0e97d3895" +checksum = "1feab97d24c9931c5e88dca7730e6a6d4c7689ced9ba05814d9092651b3534db" dependencies = [ "arrayvec", "indexmap 2.1.0", @@ -3550,9 +3551,9 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "0.143.13" +version = "0.143.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5354a20ab66c2ec5001982271b6e7c750b7fca3409888ab9703ae3d3c845fed4" +checksum = "40b7faa481ac015b330f1c4bc8df2c9947242020e23ccdb10bc7a8ef84342509" dependencies = [ "either", "new_debug_unreachable", @@ -3617,9 +3618,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_base" -version = "0.137.18" +version = "0.137.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a9b97f6c01ade8fde4a6088f1f0150e85345fac2c48ee12aef753510efacd3c" +checksum = "3b59fad924fb4fbd7a67e3992751a3f8d205f1f548ce73b9e5abdf5bd83af370" dependencies = [ "better_scoped_tls", "bitflags 2.5.0", @@ -3731,9 +3732,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_optimization" -version = "0.198.20" +version = "0.198.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b991f548f08dc81ee51100f213439883a926d25320493ea28c8043642fea928" +checksum = "73e8de92a02fbd61965c723669f9d425dc1544831507abd78d9fca24c3974324" dependencies = [ "dashmap", "indexmap 2.1.0", @@ -3756,9 +3757,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_proposal" -version = "0.171.21" +version = "0.171.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "406b777bb37f3a102c65a103610ecaab5da96cd2ba96b5b0a93af150a2aee73f" +checksum = "a00e0cc7d9cfb3935354a43455116636b001d34d103304883b90837cd87f048c" dependencies = [ "either", "rustc-hash", @@ -3776,9 +3777,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_react" -version = "0.183.18" +version = "0.183.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b7b7de90ff41560bf021acda3fb16fb0f4f5885aeb44b6b7e638b563124d087" +checksum = "2570aa788b03d38404558d4822c7b88a35a930a47cf2417cc7732a032015e43d" dependencies = [ "base64", "dashmap", @@ -3801,9 +3802,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_typescript" -version = "0.188.18" +version = "0.188.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "845c3ad4949c2317076e929e42c78dd43868f6c6f820911353731a5bb859e78c" +checksum = "af4aa805d31f534cf230ea43282c1d58e580da2c470e3a95cb9f06f5039e5377" dependencies = [ "ryu-js", "serde", @@ -3818,9 +3819,9 @@ dependencies = [ [[package]] name = "swc_ecma_usage_analyzer" -version = "0.23.13" +version = "0.23.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21ccc0ff427471b70e48f265854a2e0843ef8429c729009898bea993f300fa77" +checksum = "b82af8ae5c6e5c1c1bdef70d5fb3ef16917985031f8688a7342c10a2123cfa6b" dependencies = [ "indexmap 2.1.0", "rustc-hash", @@ -3835,9 +3836,9 @@ dependencies = [ [[package]] name = "swc_ecma_utils" -version = "0.127.18" +version = "0.127.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c498dbedc2b6f3d31d2e2378a049e0e2bb11e46d828be960ce5f4169cded264b" +checksum = "15d40abfc4f3a7bfdf54d11ac705cc9dd0836c48bf085b359143b4d40b50cb31" dependencies = [ "indexmap 2.1.0", "num_cpus", @@ -3893,9 +3894,9 @@ dependencies = [ [[package]] name = "swc_fast_graph" -version = "0.21.20" +version = "0.21.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa43c68166a88e233f241976dc3291c30471385fd1019d1fa5660ac503520110" +checksum = "54db83cdbd924cc8b5082ab54ff2a1b4f53ecde8f53c87b9f9c877c9daef4569" dependencies = [ "indexmap 2.1.0", "petgraph", @@ -3918,9 +3919,9 @@ dependencies = [ [[package]] name = "swc_macros_common" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50176cfc1cbc8bb22f41c6fe9d1ec53fbe057001219b5954961b8ad0f336fce9" +checksum = "5a5be7766a95a2840ded618baeaab63809b71230ef19094b34f76c8af4d85aa2" dependencies = [ "proc-macro2", "quote", @@ -3939,9 +3940,9 @@ dependencies = [ [[package]] name = "swc_node_bundler" -version = "0.62.23" +version = "0.62.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9965af26b4a60d9d138a91375abd4e6692de6a74a1ca150f568503ca34db022a" +checksum = "6085d8dfbc6e77c72a0d22413bcd26c8bfb3274799a04dcc9cae85c1173cd8d3" dependencies = [ "anyhow", "dashmap", @@ -3993,9 +3994,9 @@ dependencies = [ [[package]] name = "swc_plugin_proxy" -version = "0.41.6" +version = "0.41.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "012e5996e3fe64805342b6e31a79d826402bbe4eed35be6a9366e54e41f5d75d" +checksum = "7e09ebf5da9eb13f431ebfb916cd3378a87ffae927ba896261ebc9dc094457ae" dependencies = [ "better_scoped_tls", "rkyv", @@ -4007,9 +4008,9 @@ dependencies = [ [[package]] name = "swc_plugin_runner" -version = "0.106.15" +version = "0.106.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a62d1390c524b5afc151b7e7c5e3d76fcd4051d9aa1c4a3b5afcc8322083c28" +checksum = "41c4b6d5c4ea05c3ddd68702736cf524661cde1200185ee8c27f10c4a5811a3d" dependencies = [ "anyhow", "enumset", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 928af0a68986..2d2bfb834f2d 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.15-nightly-20240417.1" +version = "1.4.15" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 879c6f143e38..a823ce988917 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.15-nightly-20240417.1" +version = "1.4.15" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 4c93c048d8e6..88b629d2ed34 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.221" +version = "0.91.222" [[bin]] bench = false diff --git a/package.json b/package.json index 50b8d82f6082..1889f89f91fe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.4.15-nightly-20240417.1", + "version": "1.4.15", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 720e55250403..d6d1c70c6d8d 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.4.15-nightly-20240417.1", + "version": "1.4.15", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index 95e936b01d12..64a47cd43a45 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.4.14", + "version": "1.4.15", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index d83f6b6fbdba..dcd28dd29f8b 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.4.14", + "version": "1.4.15", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index 29f5187914d3..6b9a68f7320f 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.4.14", + "version": "1.4.15", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index d93720156b15..b597ada219f8 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.4.14", + "version": "1.4.15", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index 8bb4a72914ad..fa7d4b4ea961 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.4.14", + "version": "1.4.15", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index 1ea9e7079966..2168f11805eb 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.4.14", + "version": "1.4.15", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index 474b6d8f25c5..fc682176a6f4 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.4.14", + "version": "1.4.15", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index ee025b2cbfe5..16f8c9b69dbe 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.4.14", + "version": "1.4.15", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index ebaef2d610b7..221f151047cc 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.4.14", + "version": "1.4.15", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index bc119396e631..837da7830d26 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.4.14", + "version": "1.4.15", "os": [ "win32" ], From 10bb67a7f56811bbf5a51f93cbe22c2d10e09eba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Wed, 17 Apr 2024 17:41:21 +0900 Subject: [PATCH 147/172] chore: Update changelog --- CHANGELOG.md | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74973d71feb2..8da870a99993 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ # Changelog -## [unreleased] +## [1.4.15] - 2024-04-17 ### Bug Fixes @@ -1347,15 +1347,4 @@ - **(es/minifier)** Move JS options to `swc_ecma_minifier` ([#8028](https://github.com/swc-project/swc/issues/8028)) ([725f7f5](https://github.com/swc-project/swc/commit/725f7f5bda0881bdaac1bf1254f58e5341633d4e)) -## [1.3.90] - 2023-09-27 - -### Bug Fixes - - - -- **(es/typescript)** Handle `DeclareCollect` correctly ([#8008](https://github.com/swc-project/swc/issues/8008)) ([9d08b8a](https://github.com/swc-project/swc/commit/9d08b8a6145d486e570a22563c62a69722cf8759)) - - -- **(es/typescript)** Handle qualified access in assign pat ([#8012](https://github.com/swc-project/swc/issues/8012)) ([2f01aba](https://github.com/swc-project/swc/commit/2f01aba978415add87994f9b20e3e2db83fc48b6)) - From 6e9d1a4ebfa705d58b576f5de32d4a17393d4e81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Thu, 18 Apr 2024 13:58:21 +0900 Subject: [PATCH 148/172] fix(es/helpers): Fix resolving of `usingCtx` helper (#8874) **Related issue:** - Closes #8872 --- .../src/helpers/mod.rs | 83 ++++++++++++++++++- 1 file changed, 82 insertions(+), 1 deletion(-) diff --git a/crates/swc_ecma_transforms_base/src/helpers/mod.rs b/crates/swc_ecma_transforms_base/src/helpers/mod.rs index c313faa912f3..640d4347a0df 100644 --- a/crates/swc_ecma_transforms_base/src/helpers/mod.rs +++ b/crates/swc_ecma_transforms_base/src/helpers/mod.rs @@ -585,7 +585,7 @@ impl VisitMut for Marker { fn visit_mut_var_declarator(&mut self, v: &mut VarDeclarator) { if let Pat::Ident(i) = &mut v.name { - if &*i.id.sym == "id" { + if &*i.id.sym == "id" || &*i.id.sym == "resource" { i.id.span.ctxt = self.base; self.decls.insert(i.id.sym.clone(), self.base); return; @@ -690,6 +690,7 @@ let _throw1 = null; Default::default, ) } + #[test] fn use_strict_abort() { crate::tests::test_transform( @@ -705,4 +706,84 @@ let x = 4;", Default::default, ); } + + #[test] + fn issue_8871() { + crate::tests::test_transform( + Default::default(), + |_| { + enable_helper!(using_ctx); + as_folder(inject_helpers(Mark::new())) + }, + "let _throw = null", + r#" + function _using_ctx() { + var _disposeSuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed) { + var err = new Error(); + err.name = "SuppressedError"; + err.suppressed = suppressed; + err.error = error; + return err; + }, empty = {}, stack = []; + function using(isAwait, value) { + if (value != null) { + if (Object(value) !== value) { + throw new TypeError("using declarations can only be used with objects, functions, null, or undefined."); + } + if (isAwait) { + var dispose = value[Symbol.asyncDispose || Symbol.for("Symbol.asyncDispose")]; + } + if (dispose == null) { + dispose = value[Symbol.dispose || Symbol.for("Symbol.dispose")]; + } + if (typeof dispose !== "function") { + throw new TypeError(`Property [Symbol.dispose] is not a function.`); + } + stack.push({ + v: value, + d: dispose, + a: isAwait + }); + } else if (isAwait) { + stack.push({ + d: value, + a: isAwait + }); + } + return value; + } + return { + e: empty, + u: using.bind(null, false), + a: using.bind(null, true), + d: function() { + var error = this.e; + function next() { + while(resource = stack.pop()){ + try { + var resource, disposalResult = resource.d && resource.d.call(resource.v); + if (resource.a) { + return Promise.resolve(disposalResult).then(next, err); + } + } catch (e) { + return err(e); + } + } + if (error !== empty) throw error; + } + function err(e) { + error = error !== empty ? new _disposeSuppressedError(error, e) : e; + return next(); + } + return next(); + } + }; + } + +let _throw = null; +"#, + false, + Default::default, + ) + } } From 0036f74205abcd31d35eb68fdb46b17518440389 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Thu, 18 Apr 2024 05:00:08 +0000 Subject: [PATCH 149/172] chore: Bump crates --- CHANGELOG.md | 8 ++++++++ Cargo.lock | 4 ++-- crates/swc_core/Cargo.toml | 2 +- crates/swc_ecma_transforms_base/Cargo.toml | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8da870a99993..5a3bdac4bd78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,12 @@ # Changelog +## [unreleased] + +### Bug Fixes + + + +- **(es/helpers)** Fix resolving of `usingCtx` helper ([#8874](https://github.com/swc-project/swc/issues/8874)) ([6e9d1a4](https://github.com/swc-project/swc/commit/6e9d1a4ebfa705d58b576f5de32d4a17393d4e81)) + ## [1.4.15] - 2024-04-17 ### Bug Fixes diff --git a/Cargo.lock b/Cargo.lock index 601e7a647270..12f8407343c3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3936,7 +3936,7 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.90.34" +version = "0.90.35" dependencies = [ "anyhow", "binding_macros", @@ -4627,7 +4627,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_base" -version = "0.137.20" +version = "0.137.21" dependencies = [ "better_scoped_tls", "bitflags 2.5.0", diff --git a/crates/swc_core/Cargo.toml b/crates/swc_core/Cargo.toml index 56f39345eeb4..a70ff14678f6 100644 --- a/crates/swc_core/Cargo.toml +++ b/crates/swc_core/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_core" repository = "https://github.com/swc-project/swc.git" -version = "0.90.34" +version = "0.90.35" [package.metadata.docs.rs] features = [ "allocator_node", diff --git a/crates/swc_ecma_transforms_base/Cargo.toml b/crates/swc_ecma_transforms_base/Cargo.toml index 1b0df31d53af..c3dde9bc7359 100644 --- a/crates/swc_ecma_transforms_base/Cargo.toml +++ b/crates/swc_ecma_transforms_base/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/**/*.js"] license = "Apache-2.0" name = "swc_ecma_transforms_base" repository = "https://github.com/swc-project/swc.git" -version = "0.137.20" +version = "0.137.21" [lib] bench = false From f58b95a3d7eae816713122bd85ac19156be9fb3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Thu, 18 Apr 2024 16:57:31 +0900 Subject: [PATCH 150/172] chore: Publish `1.4.16` with `swc_core` `v0.90.35` --- bindings/Cargo.lock | 14 +++++++------- bindings/binding_core_node/Cargo.toml | 2 +- bindings/binding_core_wasm/Cargo.toml | 4 ++-- bindings/binding_minifier_node/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 4 ++-- bindings/swc_cli/Cargo.toml | 2 +- package.json | 2 +- packages/minifier/package.json | 2 +- .../minifier/scripts/npm/darwin-arm64/package.json | 2 +- .../minifier/scripts/npm/darwin-x64/package.json | 2 +- .../scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../scripts/npm/linux-arm64-gnu/package.json | 2 +- .../scripts/npm/linux-arm64-musl/package.json | 2 +- .../scripts/npm/linux-x64-gnu/package.json | 2 +- .../scripts/npm/linux-x64-musl/package.json | 2 +- .../scripts/npm/win32-arm64-msvc/package.json | 2 +- .../scripts/npm/win32-ia32-msvc/package.json | 2 +- .../scripts/npm/win32-x64-msvc/package.json | 2 +- 18 files changed, 26 insertions(+), 26 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index a5b0596e5192..600e902616ec 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -231,7 +231,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.4.15" +version = "1.4.16" dependencies = [ "anyhow", "getrandom", @@ -291,7 +291,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.4.15" +version = "1.4.16" dependencies = [ "anyhow", "getrandom", @@ -3074,7 +3074,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.222" +version = "0.91.223" dependencies = [ "anyhow", "swc_cli_impl", @@ -3189,9 +3189,9 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.90.34" +version = "0.90.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3212d2884b1b6f68fd08d5224cf20d22972fc55ccda1c13020281f93041aed0e" +checksum = "2b9e641c348c1e8b0e01430b4706b777ecb0873323b423a8e8e5515093583e43" dependencies = [ "binding_macros", "swc", @@ -3618,9 +3618,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_base" -version = "0.137.20" +version = "0.137.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b59fad924fb4fbd7a67e3992751a3f8d205f1f548ce73b9e5abdf5bd83af370" +checksum = "660badfe2eed8b6213ec9dcd71aa0786f8fb46ffa012e0313bcba1fe4a9a5c73" dependencies = [ "better_scoped_tls", "bitflags 2.5.0", diff --git a/bindings/binding_core_node/Cargo.toml b/bindings/binding_core_node/Cargo.toml index 2c45600381dc..75a56711b389 100644 --- a/bindings/binding_core_node/Cargo.toml +++ b/bindings/binding_core_node/Cargo.toml @@ -51,7 +51,7 @@ tracing-chrome = "0.5.0" tracing-futures = "0.2.5" tracing-subscriber = { version = "0.3.9", features = ["env-filter"] } -swc_core = { version = "0.90.34", features = [ +swc_core = { version = "0.90.35", features = [ "allocator_node", "ecma_ast", "ecma_codegen", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 2d2bfb834f2d..53397a62e395 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.15" +version = "1.4.16" [lib] bench = false @@ -35,7 +35,7 @@ anyhow = "1.0.66" getrandom = { version = "0.2.10", features = ["js"] } serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" -swc_core = { version = "0.90.34", features = [ +swc_core = { version = "0.90.35", features = [ "ecma_ast_serde", "ecma_codegen", "binding_macro_wasm", diff --git a/bindings/binding_minifier_node/Cargo.toml b/bindings/binding_minifier_node/Cargo.toml index 9d95ac4a26fe..81c28b46c233 100644 --- a/bindings/binding_minifier_node/Cargo.toml +++ b/bindings/binding_minifier_node/Cargo.toml @@ -38,7 +38,7 @@ tracing-subscriber = { version = "0.3.9", features = ["env-filter"] } swc_compiler_base = { version = "0.7.20", features = ["node"] } swc_config = "0.1.12" -swc_core = { version = "0.90.34", features = [ +swc_core = { version = "0.90.35", features = [ "allocator_node", "common_concurrent", "common_sourcemap", diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index a823ce988917..bdf01a1a3962 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.4.15" +version = "1.4.16" [lib] bench = false @@ -35,7 +35,7 @@ anyhow = "1.0.66" getrandom = { version = "0.2.10", features = ["js"] } serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" -swc_core = { version = "0.90.34", features = [ +swc_core = { version = "0.90.35", features = [ "ecma_ast_serde", "ecma_codegen", "binding_macro_wasm", diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 88b629d2ed34..6c3483256dcc 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.222" +version = "0.91.223" [[bin]] bench = false diff --git a/package.json b/package.json index 1889f89f91fe..801f36d8f88e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.4.15", + "version": "1.4.16", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/package.json b/packages/minifier/package.json index d6d1c70c6d8d..b580425e4de1 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.4.15", + "version": "1.4.16", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index 64a47cd43a45..38f32991c6c8 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.4.15", + "version": "1.4.16", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index dcd28dd29f8b..7d747e8ff396 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.4.15", + "version": "1.4.16", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index 6b9a68f7320f..e033b95160c2 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.4.15", + "version": "1.4.16", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index b597ada219f8..ff50e9f2195c 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.4.15", + "version": "1.4.16", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index fa7d4b4ea961..6f7f62e39436 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.4.15", + "version": "1.4.16", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index 2168f11805eb..2d249cf755f0 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.4.15", + "version": "1.4.16", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index fc682176a6f4..91a8e78c388c 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.4.15", + "version": "1.4.16", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index 16f8c9b69dbe..6e394509c15e 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.4.15", + "version": "1.4.16", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index 221f151047cc..9423b055b02b 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.4.15", + "version": "1.4.16", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index 837da7830d26..c5355c2ac297 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.4.15", + "version": "1.4.16", "os": [ "win32" ], From a4d3b262177abf863955008f6ba1c5a79a29af13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Thu, 18 Apr 2024 16:57:33 +0900 Subject: [PATCH 151/172] chore: Update changelog --- CHANGELOG.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a3bdac4bd78..b64832d78998 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ # Changelog -## [unreleased] +## [1.4.16] - 2024-04-18 ### Bug Fixes @@ -1329,9 +1329,6 @@ - **(es/module)** Sort the exported ESM bindings ([#8024](https://github.com/swc-project/swc/issues/8024)) ([990ca06](https://github.com/swc-project/swc/commit/990ca06aca3242a789e165f4318c95d0bb64b02e)) -- **(es/typescript)** Rename wrong `unresolved_mark` ([#8018](https://github.com/swc-project/swc/issues/8018)) ([5817268](https://github.com/swc-project/swc/commit/58172689ce7f8dd2f0a79d8771c52fe309880b44)) - - - **(es/typescript)** Preserve default value of an exported binding in a namespace ([#8029](https://github.com/swc-project/swc/issues/8029)) ([cf96171](https://github.com/swc-project/swc/commit/cf96171a53589118a0103495169e02fed10a675f)) ### Documentation From 5419a9477fa54297ed5e02b3769374e07e0921f3 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Fri, 19 Apr 2024 05:52:16 -0700 Subject: [PATCH 152/172] =?UTF-8?q?fix(html/codegen):=20Expand=20elements?= =?UTF-8?q?=20before=20which=20body=20isn=E2=80=99t=20elided=20(#8877)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description:** For example, transforming `