DEV Community

loading...

Discussion on: Do you unit test private methods?

Collapse
yashwanth2714 profile image
Yashwanth Kumar

Why it works?

Collapse
jefftian profile image
Jeff

It's JavaScript feature that you can access properties by using [property]. And in the end the TypeScript will be transpiled to pure javascript which has no public, private differences.

Thread Thread
yashwanth2714 profile image
Yashwanth Kumar

Agree! However, I didn't expect that TS allow this because of it's strict Type Checking.