markjprice / cs7dotnetcore

Repository for the Packt Publishing book titled "C# 7 and .NET Core" by Mark J. Price
http://cs7dotnetcore.azurewebsites.net/
28 stars 21 forks source link

ExploreAngular - Ch16 - Page635 - TS2.7 - strictPropertyInitialization #4

Closed NJFfromFrance closed 6 years ago

NJFfromFrance commented 6 years ago

TypeScript 2.7 introduced strictPropertyInitialization which breaks 'home.component.ts' in the ExporeAngular example in Ch16, page 635, as 'customers' generates this error: [ts] Property 'customers' has no initializer and is not definitely assigned in the constructor.

Fix: add: "strictPropertyInitialization": false, to tsconfig.json and restart VSCode.

markjprice commented 6 years ago

Thanks for spotting this. I've updated the tsconfig.json files in the correct repository: cs7dotnetcore2

NJFfromFrance commented 6 years ago

Hi Mark,

You are welcome.

Thank you for writing this book. I’ve learned a lot from it.

I have used it to learn myself how to program against dotnetcore in C# using VSCode (on Windows).

C# I already knew quite well, though not the latest features.

I have noticed quite a few errors, mistakes, typos in the text of the book.

Consulting the apparently frequently updated source code on GitHub, has saved me.

Thank you for that. PacktPub has alerted me to these updates.

BTW, I think that VSCode/C#/dotnetcore is a great environment with not to many books/resources.

I could think of a book on unit testing in this environment or maybe even about writing a db backend for your website using SQL Server or MongoDB.

Just my thoughts.

Cheers, Niek Jan Ferwerda (niekjan.ferwerda@gmail.com)

(from the Netherlands, now in France, also lived in the UK).

Van: Mark J Price [mailto:notifications@github.com] Verzonden: zaterdag 24 februari 2018 10:21 Aan: markjprice/cs7dotnetcore cs7dotnetcore@noreply.github.com CC: Niek Jan Ferwerda niekjan.ferwerda@gmail.com; Author author@noreply.github.com Onderwerp: Re: [markjprice/cs7dotnetcore] ExploreAngular - Ch16 - Page635 - TS2.7 - strictPropertyInitialization (#4)

Thanks for spotting this. I've updated the tsconfig.json files in the correct repository: cs7dotnetcore2

— You are receiving this because you authored the thread. Reply to this email directly, https://github.com/markjprice/cs7dotnetcore/issues/4#issuecomment-368214397 view it on GitHub, or https://github.com/notifications/unsubscribe-auth/Aflcovd9uDPFL829q2tFgyw05NhiFOmIks5tX9RlgaJpZM4SIx9- mute the thread. https://github.com/notifications/beacon/Aflcom4y3bug1MBSxzfN7cvoT52CcQK_ks5tX9RlgaJpZM4SIx9-.gif