Intermediate TypeScript
Q76 / 100

When using "import type { Foo } from './module'", what is the effect?

Correct! Well done.

Incorrect.

The correct answer is B) It imports Foo only for type-checking purposes; it is erased from the compiled JavaScript output

B

Correct Answer

It imports Foo only for type-checking purposes; it is erased from the compiled JavaScript output

Explanation

"import type" ensures the import is purely for types and is completely removed during compilation, avoiding unnecessary runtime imports.

Progress
76/100