tsdx icon indicating copy to clipboard operation
tsdx copied to clipboard

Update typescript from 3 to 4

Open johann1301s opened this issue 2 years ago • 6 comments

TSDX uses typescript version 3.

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

johann1301s avatar Jul 22 '22 15:07 johann1301s

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 [email protected], which is using [email protected].

tim-phillips avatar Jul 25 '22 18:07 tim-phillips

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.

johann1301s avatar Jul 27 '22 04:07 johann1301s

@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"

OrkhanAlikhanov avatar Oct 06 '22 04:10 OrkhanAlikhanov

There are a number of other issues in this repository about the super-old TypeScript 3.9.9 inside [email protected] causing problems for people, where this is documented:

  • Yarn Resolutions or npm Overrides: https://github.com/jaredpalmer/tsdx/issues/1149#issuecomment-1272043961
  • pnpm Overrides: https://github.com/jaredpalmer/tsdx/issues/926#issuecomment-882102507

karlhorky avatar Oct 08 '22 12:10 karlhorky

I think this repo is abandoned by @jaredpalmer

TheMikeyRoss avatar Jan 13 '24 04:01 TheMikeyRoss

Using a fork weiran-zsd/dts-cli.

Vovan-VE avatar Jan 13 '24 05:01 Vovan-VE