Closed benasher44 closed 9 months ago
Actually I see you commented on that issue. I have some follow up questions. I'll follow up on that ticket.
The source of the issue there, as far as declaration file correctness goes, is that the TS contains some direct module.exports
manipulation, which the type system / TS module system doesn’t track.
ajv is an example of a package that uses TypeScript, but the generated .d.ts by TypeScript suffers from the missing
export =
issue (extra .default is needed when imported with NodeNext).As a workaround, I'm opening a PR to their library to explicitly export the Ajv class, but I wasn't able to figure out the settings needed to get TypeScript to generate a better .d.ts. It would be great to update the docs to cover that case.