The .d.ts file exports a default class, which makes TypeScript look for a .default property on the exports object in CommonJS. However, in CommonJS environments, the exports object is set to the class itself. This makes it unusable in Node.js/TypeScript projects.
The
.d.tsfile exports a default class, which makes TypeScript look for a.defaultproperty on theexportsobject in CommonJS. However, in CommonJS environments, theexportsobject is set to the class itself. This makes it unusable in Node.js/TypeScript projects.