Below is the client.ts how it is left at the end of the lesson.
Note
If using @three/types@0.150.0 or higher, you now need to add the option "allowSyntheticDefaultImports": true to your TSConfig.json for the Stats import to work. See Add the initial Scripts
The official course boilerplate contains a branch including the Stats panel if you need.
You can clone the boilerplate into a new folder somewhere and checkout the stats branch.
git clone https://github.com/Sean-Bradley/Three.js-TypeScript-Boilerplate.git
cd Three.js-TypeScript-Boilerplate
git checkout stats
npm install
npm run dev
And we also now need to instantiate using the syntax,
conststats=newStats()
In previous versions of @types/three, we could use the syntax,
conststats=Stats()
'new' expression, whose target lacks a construct signature, implicitly has an 'any' type
If using @types/three@0.148.0 or earlier with stats.module, instantiating a new Stats() (using the new keyword) would cause the error new' expression, whose target lacks a construct signature, implicitly has an 'any' type since stats is exported as a function and not a class.
In @types/three@0.148.0 and earlier, you could use the syntax,
conststats=Stats()
In @types/three@0.149.0 and later, you now need to add "allowSyntheticDefaultImports": true to your tsconfig.json, instantiate stats using the syntax,