Esbuild: [Feature] TypeScript 4.0 support

Created on 10 Jul 2020  路  2Comments  路  Source: evanw/esbuild

Nothing stands still for long: https://devblogs.microsoft.com/typescript/announcing-typescript-4-0-beta/

TS4 features keep landing in VSCode with every version, so I'd say we're getting closer and closer to release now.

Will esbuild work with TS4 as is? Or will you need to implement support for the new features (such as variadic tuples, &&=, etc)

Equally, with a few breaking changes between 4.0 and 3.x, how will you handle backward compatibility?

Most helpful comment

I believe esbuild should fully support TypeScript 4. If you run into any issues, please report them.

I have already implemented these TypeScript 4 features:

  • [x] Variadic Tuple Types (this has always been supported)
  • [x] Short-Circuiting Assignment Operators (supported since esbuild version 0.5.5)
  • [x] Labeled Tuple Elements (supported since esbuild version 0.5.13)
  • [x] Custom JSX Factories (supported since esbuild version 0.5.15)

See the release notes for more details.

These TypeScript 4 features are part of the type system, which is irrelevant for esbuild since esbuild doesn't do type checking (you still need to run the TypeScript compiler for type checking when using esbuild):

  • [ ] Class Property Inference from Constructors
  • [ ] unknown on catch Clause Bindings
  • [ ] lib.d.ts Changes
  • [ ] Properties Overridding Accessors (and vice versa) is an Error
  • [ ] Operands for delete must be optional.

As far as I'm aware all breaking changes are type system changes, so there are no backwards compatibility concerns with esbuild and TypeScript.

All 2 comments

I believe esbuild should fully support TypeScript 4. If you run into any issues, please report them.

I have already implemented these TypeScript 4 features:

  • [x] Variadic Tuple Types (this has always been supported)
  • [x] Short-Circuiting Assignment Operators (supported since esbuild version 0.5.5)
  • [x] Labeled Tuple Elements (supported since esbuild version 0.5.13)
  • [x] Custom JSX Factories (supported since esbuild version 0.5.15)

See the release notes for more details.

These TypeScript 4 features are part of the type system, which is irrelevant for esbuild since esbuild doesn't do type checking (you still need to run the TypeScript compiler for type checking when using esbuild):

  • [ ] Class Property Inference from Constructors
  • [ ] unknown on catch Clause Bindings
  • [ ] lib.d.ts Changes
  • [ ] Properties Overridding Accessors (and vice versa) is an Error
  • [ ] Operands for delete must be optional.

As far as I'm aware all breaking changes are type system changes, so there are no backwards compatibility concerns with esbuild and TypeScript.

Perfect, thanks. I'll swap to the latest beta and open any issues if I find them.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sarsamurmu picture sarsamurmu  路  3Comments

a7ul picture a7ul  路  3Comments

vforsh picture vforsh  路  3Comments

mohsen1 picture mohsen1  路  3Comments

lolychee picture lolychee  路  4Comments