Strapi 4.2.0-beta.3 Release
Fourth beta for TypeScript support
Hello everyone, we’re releasing the fourth iteration of Strapi TypeScript support. It’s available now under the tag 4.2.0-beta.3
.
You can find the Github release here.
What’s New
TL;DR:
-
Fix some light typings issues
-
Fix a bug showing JS-related instructions when generating a plugin in TypeScript
-
Use incremental build by default in the generated
tsconfig.json
files -
Handle custom
outDir
configuration -
Added root-level typings for the strapi class (StrapiInterface)
-
Added TS support for all CLI commands
-
Force incremental build for some CLI commands
Changes in Details
Fix some light typings issues
Some typings issues for the factories and the entity-service have been fixed.
Fix a bug showing JS-related instructions when generating a plugin in TypeScript
Related PR: #13133
In the last release, when generating a TypeScript plugin, the instructions logged in the console were using JavaScript filenames and syntax.
Use incremental build by default in the generated tsconfig.json
files
Related PR: #13378
Based on some feedback concerning compilation time in development mode, we’ve decided to enable by default incremental builds for the server code.
It should boost performance when working with a large codebase.
Handle custom outDir
configuration
Related PR: #13309
It’s now possible to set the outDir
property of the tsconfig.json
file to something else than dist
. Users can now choose their preferred wording for it.
Added root-level typings for the Strapi class (StrapiInteface)
Related PR: #13281
While still really basic, those new typings should better match the actual shape of the Strapi class and thus prevent incorrect type errors.
They’ll also provide a solid basis on which we’ll iterate in order to provide better typings in the future.
Added TS support for all CLI commands
Related PR: #13187
In the previous beta releases, some Strapi CLI commands were missing support for TypeScript as they weren’t able to detect the outDir
directory. It’s now automatically detected and used if necessary.
Force incremental build for some CLI commands
Related PR: #13245
Optimization of the build time by forcing the incremental build option on CLI commands. It should boost performances on CI environments.
What’s coming?
In the next TS releases we would like to:
-
Polish and finalize working on the TypeScript support documentation to offer better support
-
Add typings for some core entities of Strapi (schemas, etc…)
-
Automatic types generation based on application code and configuration
-
JS to TS project conversion
As always, thanks for your support, your criticism, your feedback and your ideas. You rock!