typescript

  • Typescript Getter and Setter Mar 07 2018
    This is something that you probably don’t ever think about, but getters and setters are implicit on every javascript object. For example, if we take the following: person = {}; person.name = 'Dave' //uses the implicit setter on the object console.log(person.name) //uses the implicit getter The above code is something that you have probably have seen very often in javascript. However, this doesn’t give you much control over how properties are accessed or defined.