elemaudio / elementary

Elementary is a JavaScript library for digital audio signal processing.
https://www.elementary.audio/
MIT License
331 stars 29 forks source link

Typescript type definition for initialize method is incorrect #53

Open txbrown opened 2 months ago

txbrown commented 2 months ago

When working with elementary-audio in a typescript repo, the compiler expects void returned from core.initialise() but the actual implementation and docs returns a Promise<AudioWorkletNode> type.

Source: https://github.com/elemaudio/elementary/blob/2703f05f38f950279743e8526bf538cdbf47c94f/js/packages/web-renderer/index.ts#L21

Typescript code: image

nick-thompson commented 2 months ago

The picture you shared has a totally different signature altogether. Second argument options: any? What version of web-renderer are you using?