2

I've noticed that TypeScript converts this type of code:

import { _, defaultLocale } from '../locale';
const test = _('testing');

To this:

const locale_1 = require("../locale");
const test = (0, locale_1._)('testing');

In particular it wraps the function call in (0, module.fn)(). Any idea what it means or why it's doing this?

laurent
  • 88,262
  • 77
  • 290
  • 428

0 Answers0