Make usages of "this" safe in class methods

Share this video with your friends

Send Tweet

this is determined by how you call a function. To write class methods that can always safely use this you can use the TypeScript property initializer syntax along with arrow functions.