TypeScript · Senior · Question 70 of 75

How do you prevent consumers from depending on internal types of your library?

Explanation

Every exported type becomes part of the semver contract; a smaller surface makes changes safer.

Further reading

Problem with a question

TypeScript · Senior · question 70

Test yourself

Take the TypeScript · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz