How to make class fields or methods accessible only to its class in TypeScript?
Originally Published Here ๐!
To make class fields or methods accessible only to its class, we have to use the keyword private before writing the class field and methods in TypeScript.
TL;DR
// a simple class
class Person {
name: string;
private ...
melvingeorge-me.hashnode.dev4 min read