The following breaking changes occurred between the release of TypeScript 3.9 and the release of TypeScript 4.7:
- Attempts to override a parent class's accessor with a property declaration now yield an error (4.0).
- If you enable the
--strictNullChecks
compiler flag, you have to provide optional arguments fordelete
operators (4.0)
- Users cannot mark
abstract
members asasync
(4.1). - The
resolve()
function in aPromise
must return avalue
(4.1). - When you enable the
--strictNullChecks
compiler flag,&&
expressions that containany
orunknown
type variables becomefalsy
(4.1). - Conditional object spreads create optional properties (4.1).
- TypeScript outputs a
noImplicitAny
error when it encounters ayield
expression that isn't contextually typed (4.2). - New parsing approach for illegal
Type
arguments in JavaScript code (4.2). - Placing a primitive type on the right side of an
in
expression yields an error (4.2).
- TypeScript does not allow the comparison of union
enum
objects to Numbers (4.3).
- The TypeScript compiler discards the
this
value of functions on import (4.4). unknown
type variables incatch
clauses yield errors with the--strict
compilation flag (4.4).- The detection of missing
await
calls has been improved (4.4). - TypeScript no longer allows you to initialize
abstract
properties (4.4).
- Minor changes to
lib.d.ts
declarations may affect the compilation process (4.4 and 4.5). - The introduction of the
Awaited
type changed the handling of explicittype
arguments for asynchronous functions (4.5). - TypeScript concatenates Template Strings regardless of the build target (4.5).
- The compiler yields an error when it discovers a valid compiler option at the root of
tsconfig.json
(4.5). - New assignability restrictions for conditional types (4.5).