How to statically type 'this' for a regular function in TypeScript
dev.to