Course lesson

Create Private Class Fields Using TypeScript's private Modifier

In this lesson, we're going over how to create private class fields using TypeScript's private modifier. However, as we're going to see, the private modifier doesn't give us any actual protection at runtime; it only exists in TypeScript's type system and is...

Duration
3 min
Access
Pro
Transcript
Available

In this lesson, we're going over how to create private class fields using TypeScript's private modifier. However, as we're going to see, the private modifier doesn't give us any actual protection at runtime; it only exists in TypeScript's type system and is completely compiled away when emitting JavaScript code.