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
The runtime error was coming from tests, which have a project reference to the code in question. The tests did not have esModuleInterop set, whereas the project that was referenced did. Adding esModuleInterop to tests solved the issue for us. Not sure if there is a better way to address this though.
Ahh, I was about to ask you for a repo because I am using esModuleInterop all the time without problems. Guess I can close this then as the problem is solved.
We are using TypeScript with
"esModuleInterop": true
.Importing polly using the default export like so:
throws
TypeError: polly_js_1.default is not a function
at runtime.If we try to use a namespace import:
Then we get
TS2349: This expression is not callable. Type 'typeof polly' has no call signatures
during compilation.Help? :)
Thanks!
The text was updated successfully, but these errors were encountered: