-
Notifications
You must be signed in to change notification settings - Fork 441
@types/audioworklet + DOM API #1574
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
Comments
What's the use case here? Are you creating a script that works as a normal script and also as a worklet script? |
I'm writing a web app (that's what I need the DOM for) which uses webAudio including the AudioWorkletProcessor class. The types of that class are unknown by default (I wonder why?) so I have to use a JS file to make use of the class. I would like to use TS for that class as well. |
That doesn't answer the question. Can you move your worklet script to a subdirectory and add another tsconfig.json to apply another set of |
Ok, that would be a solution. |
So I guess it is only possible with "project references". Coming back to the original issue, I just tried to add Could somebody give an example of how a "clashing with the DOM APIs" could happen? |
"lib": ["DOM", "ESNext"],
"compilerOptions": {
"types": [ "audioworklet"]
}, |
Sorry for asking very basic questions, but why do I need |
Hello @h-a-n-n-e-s The If everything works fine without it, it's likely because:
In short, you only need |
That looks like a plain ChatGPT answer that doesn't really help... 😅 This was a question and hasn't been active for years, so closing. Feel free to reopen or open a new issue for any remaining questions. Thanks! @github-actions close |
Closing because @saschanaz is one of the code-owners of this repository. |
Is there a proper way to use @types/audioworklet while keeping
"lib": ["DOM",...]
?(In the installation notes it says: Update your tsconfig.json to avoid clashing with the DOM APIs... You should remove "dom")
For doing front-end development while using
AudioWorkletProcessor
that would be really helpful.The text was updated successfully, but these errors were encountered: