Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript type definition for initialize method is incorrect #53

Open
txbrown opened this issue Aug 15, 2024 · 1 comment
Open

Typescript type definition for initialize method is incorrect #53

txbrown opened this issue Aug 15, 2024 · 1 comment

Comments

@txbrown
Copy link

txbrown commented Aug 15, 2024

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:

async initialize(audioContext: AudioContext, workletOptions: AudioWorkletNodeOptions = {}, eventInterval: number = 16): Promise<AudioWorkletNode> {

Typescript code:
image

@nick-thompson
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants