TypeScript · Middle · Question 70 of 75
What do the types/typesVersions and the exports "types" condition in package.json do?
- ✓Correct answer: Tell TypeScript where to find the declaration files for a package (or for each entry point)
- 2Install
@typespackages - 3Enable strict mode for consumers
Explanation
With exports, put the types condition first in each entry, otherwise TypeScript may resolve the JS file and find no types.