Revision 3#

  • Fixes the updateLimit() function to return void - thanks Sushanth R.!

Revision 2#

This patch fixes several issues in Chapter 1:

  • Under the Install TypeScript section, the command to install TypeScript was npm install --save-dev TypeScript, which is incorrect as TypeScript should be all lowercase.

  • The latest stable version of TypeScript has been updated to 3.7.5

  • Added section Initialize tsconfig.json to ensure that a tsconfig.json file is created to avoid an error with using the Date() constructor in the updateDate() method of the Expense class.

  • Added return type of void to the updateLabel() method of the Expense class

  • Fixed the wrong file name for getUniqueId.ts

  • Fixed a bug with the truncate() function where it was always adding a suffix even to strings that were shorter than the given limit.

  • Fixed the file path to Expense.ts

  • Fixed the import path in the code snippets that referenced the utils folder (previously it was going up one extra folder)

  • Fixed a bug where we were using the Category enum in all caps (i.e Category.FOOD) as opposed to camelcase (i.e Category.Food).

  • Fixed function signature of the getCategory() method in the Budget class so that it does not take any parameters and returns a Category type.

  • Fixed typo where getIsOverLimit() was misspelled as getIsOverBudget()

  • Fixed broken path to app.ts which was preventing the file from being rendered on the page.


This page is a preview of Beginners Guide to TypeScript

Start a new discussion. All notification go to the author.