TypeScript · Middle · Question 60 of 75
How do target and lib differ in tsconfig.json?
- ✓Correct answer:
targetsets which JS syntax is emitted;libsets which built-in APIs (e.g. DOM, ES2023) are declared as available - 2They're synonyms
- 3
libchooses the bundler
Explanation
lib doesn't add polyfills: declaring ES2023 lets you call findLast, but old browsers still need a polyfill.