Skip to content

Commit

Permalink
fix: 修复 abstract 前没有 export 的问题 (#4)
Browse files Browse the repository at this point in the history
* fix: support exporting abstract classes in bundle

* fix: improve abstract class export regex matching
  • Loading branch information
Hoshino-Yumetsuki authored Feb 27, 2025
1 parent a3609ff commit 577f07a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 577f07a

Please sign in to comment.