How to bundle “types” field in package.json when using “export” rather than “main”
When using the “main” field of package.json for a Typescript NPM package, this documentation explains how to ship your types (as .d.ts files) alongside the payload exported JS file.