TypeScript · Middle · Question 70 of 75

What do the types/typesVersions and the exports "types" condition in package.json do?

Explanation

With exports, put the types condition first in each entry, otherwise TypeScript may resolve the JS file and find no types.

Further reading

Problem with a question

TypeScript · Middle · question 70

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