From 577f07ad100bc65d846b94f91da5b74da659e6cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=9F=E9=87=8E=E6=A2=A6=E6=9C=88?= <147403913+Hoshino-Yumetsuki@users.noreply.github.com> Date: Thu, 27 Feb 2025 11:54:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20abstract=20?= =?UTF-8?q?=E5=89=8D=E6=B2=A1=E6=9C=89=20export=20=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20(#4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: support exporting abstract classes in bundle * fix: improve abstract class export regex matching --- src/bundle.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bundle.ts b/src/bundle.ts index 472af4b..561b8a2 100644 --- a/src/bundle.ts +++ b/src/bundle.ts @@ -113,7 +113,7 @@ export async function bundle(options: BundleOptions) { return identifier ? identifier = '' : '}' } else { if (identifier) line = line.slice(4) - return line.replace(/^((class|namespace|interface) .+ \{)$/, (_) => `export ${_}`) + return line.replace(/^((abstract|class|namespace|interface) .+ \{)$/, (_) => `export ${_}`) } }).filter(line => line).join(EOL)