Upgrade to typescript 3.9
Issue #861
resolved
As per discussion… should be trying to get more assistance from strongly typed code; and upgrading will get the codebase closer to Angular 9.
Also keen to get the “optional chaining” feature of 3.7 which will make a lot of code look cleaner.
First step is to ascertain how much will break.
Comments (5)
-
reporter -
reporter In Visual Studio Package Manager console:
-
reporter A small number of compile errors were found going from 3.4.1 => 3.7.5. All ultimately related to lodash
_.find
No other compile errors going from 3.7.5 => 3.9.3
-
reporter Added two small examples of “optional chaining” available from typescript 3.7 ff. Good to be aware of this , can save a bit of awkward code.
public $onChanges(changes) { // isFirstChange() returns true when the bindings are first initialised PRIOR to onInit // better to ignore those if (changes.dashboard?.isFirstChange()) { return; }
-
reporter - changed status to resolved
- Log in to comment
Two things steps are required to update typescript - and this is becuase of the non-stndard ( ie old) structure of our project which gets compiled from grunt:
go to the VS Package Manager console, and install typescript from there:
npm install -g typescript@3.7.5