I've stumbled over something seemingly simple that I don't know how to fix. I want to use a simple constructor function (not a class):
const Person = function() {
this.name = 'John'
}
The TS compiler says:
'this' implicitly has type 'any' because it does not have a type annotation.
But I'm not sure how I can set the type for this
explicitly in this case?