TypeScript · Senior · Question 16 of 75

What does the verbatimModuleSyntax flag require?

Explanation

The rule is simple: everything without the type modifier stays in the output JS, everything with type is erased. This makes the result predictable for any transpiler and replaces the deprecated importsNotUsedAsValues and preserveValueImports.

Further reading

Problem with a question

TypeScript · Senior · question 16

Test yourself

Take the TypeScript · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz