I am learning access modifiers in typescript, I have the following class .
export class Person {
private get fullName() {
return this.firstName + '' + this.lastname;
}
constructor(public firstName, public lastname) {
}
}
const name = new Person('jim', 'jonson');
alert(name.fullName);
When I hover on full name Intellisense gives me the following error
Property 'fullName' is private and only accessible within class 'Person'.
Can somebody explain me why full name is displayed on my browser?