What is the purpose of a
.d.ts file in a TypeScript project?- aIt contains executable JavaScript that runs at build time
- bIt describes a module's API shape/types, with no implementation code✓
- cIt is a config file that replaces
tsconfig.json - dIt stores the compiled output of a
.tsfile
Explanation:A declaration file (
.d.ts) contains only type information — interfaces, function signatures, variable declarations — with no runtime code. It tells the compiler what the shape of a module or library is, so TypeScript can type-check code that uses it even if the implementation was written in plain JavaScript or is compiled separately.