Intermediate TypeScript
Q54 / 100

What is the purpose of "declare" in a .d.ts file?

Correct! Well done.

Incorrect.

The correct answer is B) To describe the shape of existing JavaScript code without providing an implementation

B

Correct Answer

To describe the shape of existing JavaScript code without providing an implementation

Explanation

declare is used in ambient declaration files to describe types for code that exists elsewhere (e.g. a JS library) without generating output.

Progress
54/100