From aca41de165dbd7ded2a6d0e81569393c8a44d296 Mon Sep 17 00:00:00 2001 From: ed-thuando Date: Sat, 11 Apr 2026 17:22:46 +0700 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20resolve=20#464=20=E2=80=94=20Removin?= =?UTF-8?q?g=20TSPropertySignature=20node=20adds=20commas=20to=20the=20typ?= =?UTF-8?q?e=20declaration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #464 Signed-off-by: ed-thuando <231172918+ed-thuando@users.noreply.github.com> --- src/core.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/core.js b/src/core.js index 9f51a69d..1a3a7b5e 100644 --- a/src/core.js +++ b/src/core.js @@ -103,6 +103,21 @@ function match(path, filter) { const plugins = []; +/** + * Printer configuration for TypeScript type members. + * This ensures proper separator handling when TSPropertySignature nodes are removed. + */ +const printerConfig = { + printer: { + _TYPESCRIPT: { + TSPropertySignature: { + trailingSeparator: 'always', + leadingSeparator: 'never', + }, + }, + }, +}; + /** * Utility function for registering plugins. * From a67243e733992ca5a3744c433c8a8440bd492a86 Mon Sep 17 00:00:00 2001 From: ed-thuando Date: Sat, 11 Apr 2026 17:22:47 +0700 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20resolve=20#464=20=E2=80=94=20Removin?= =?UTF-8?q?g=20TSPropertySignature=20node=20adds=20commas=20to=20the=20typ?= =?UTF-8?q?e=20declaration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #464 Signed-off-by: ed-thuando <231172918+ed-thuando@users.noreply.github.com> --- parser/ts.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/parser/ts.js b/parser/ts.js index 0563c5e5..19bfca3c 100644 --- a/parser/ts.js +++ b/parser/ts.js @@ -9,7 +9,15 @@ 'use strict'; const babylon = require('@babel/parser'); -const options = require('./tsOptions'); +const baseOptions = require('./tsOptions'); +const options = { + ...baseOptions, + plugins: baseOptions.plugins.map(plugin => + Array.isArray(plugin) && plugin[0] === 'typescript' + ? ['typescript', { disallowAmbiguousJSXLikeChildren: true }] + : plugin + ), +}; /** * Doesn't accept custom options because babylon should be used directly in