TypeScript · Middle · Question 12 of 75

What is an abstract class for?

Explanation

abstract class Repo { abstract find(id): T; log() {...} } - subclasses must implement find and get log ready-made. Unlike an interface, an abstract class exists at runtime and can contain code and state.

Further reading

Problem with a question

TypeScript · Middle · question 12

Test yourself

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

Take this quiz