TypeScript · Middle · Question 61 of 75

What does esModuleInterop fix?

import express from 'express'; // a CommonJS module

Explanation

Without it you'd need import * as express from 'express', which breaks when the module is callable.

Further reading

Problem with a question

TypeScript · Middle · question 61

Test yourself

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

Take this quiz