ircam-ismm / node-web-audio-api

Web Audio API implementation for Node.js
https://www.npmjs.com/package/node-web-audio-api
BSD 3-Clause "New" or "Revised" License
106 stars 14 forks source link

Fix missing type export declaration in `"exports"` in package.json #138

Closed parzhitsky closed 1 month ago

parzhitsky commented 1 month ago

An error appears when importing this package in a TypeScript project. Basically, it says that the types are there, but "exports" field doesn't mention them, so they can't be imported:

Could not find a declaration file for module 'node-web-audio-api'. 'path/to/node_modules/node-web-audio-api/index.mjs' implicitly has an 'any' type.
  There are types at 'path/to/node_modules/node-web-audio-api/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'node-web-audio-api' library may need to update its package.json or typings.ts(7016)
372068580-588cd423-7da7-4b1e-af3b-94843b8b23ac

This PR fixes that.

b-ma commented 1 month ago

Thanks!