You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I therefore can't use any EventEmitter functions on the WebRenderer object without typescript complaining.
My project uses "type": "module" in package.json, and "moduleResolution": "Node16" in tsconfig.json (because of some other typescript errors from other libraries).
Thanks @trival, and sorry for the delay. This is good to know; I'll be revisiting much of the js frontend libraries shortly and will loop this change in with that effort!
After upgrading to latest version of elementary and typescript, I am getting the error in the title from typescript.
The error occurs in line 76 of
node_modules/@elemaudio/core/dist/index.d.ts
that says:I therefore can't use any EventEmitter functions on the WebRenderer object without typescript complaining.
My project uses
"type": "module"
in package.json, and"moduleResolution": "Node16"
in tsconfig.json (because of some other typescript errors from other libraries).After looking at similar issues on Github, like geckosio/geckos.io#22 or axios/axios#6225, it seems that changing
import EventEmitter from 'eventemitter3';
to
import { EventEmitter } from 'eventemitter3';
should fix this error. It at least fixed the error when I changed that code in the published
node_modules/@elemaudio/core/dist/index.d.ts
.If that would work for you and cause no other troubles, maybe it is worth to use the direct import syntax of EventEmitter.
Actually running the code using vite works by the way, it is only typescript complaining.
The text was updated successfully, but these errors were encountered: