wikibase-sdk
wikibase-sdk copied to clipboard
Improve tsconfig
Enable verbatimModuleSyntax and erasableSyntaxOnly
TLDR:
-
verbatimModuleSyntaxremoves type only imports from the output resulting in less superfluous imports at runtime. -
erasableSyntaxOnlyensures that no TypeScript specific syntax is used and only JavaScript compatible syntax with types is used. This ensures that simple type stripping works which allows Node.js 23.6 to run the typescript files directly. So in the future tsx can be replaced by native node calls. While this is a stricter check than before, the code is already compatible so no need for a code change. It mainly prevents future code from using TypeScript only syntax so it stays compatible with type stripping.