typescript Overriding getter/setter in TypeScript In contrast to the convention in Java, in TypeScript, we generally don't use getters or setters. We access and set variables directly. However, sometimes it is useful to perform some