jaredpalmer / tsdx

Zero-config CLI for TypeScript package development
https://tsdx.io
MIT License
11.29k stars 507 forks source link

Update typescript from 3 to 4 #1147

Open johann1301s opened 2 years ago

johann1301s commented 2 years ago

TSDX uses typescript version 3.

Many new features are available in version 4. Please update to the latest version.

tim-phillips commented 2 years ago

The latest code in this repo uses typescript v4, but the latest published version of TSDX is still referencing v3, however the build step in the published version is using rollup-plugin-typescript2@0.27.3, which is using typescript@4.0.3.

johann1301s commented 2 years ago

If you for example use Template Literal Types, for instance;

type World = "world";

type Greeting = `hello ${World}`;

Compilation fails since it is a TS 4.1 feature.

OrkhanAlikhanov commented 2 years ago

@tim-phillips That's not correct. At least with yarn. Rollup gets to use ts 3.9. I have a script that removes that typescript from local node_modules of tsdx. That makes it use ts 4 installed. Something like this:

"prebuild": "rm -rf node_modules/tsdx/node_modules/typescript"
karlhorky commented 2 years ago

There are a number of other issues in this repository about the super-old TypeScript 3.9.9 inside tsdx@0.14.1 causing problems for people, where this is documented:

TheMikeyRoss commented 10 months ago

I think this repo is abandoned by @jaredpalmer

Vovan-VE commented 10 months ago

Using a fork weiran-zsd/dts-cli.