replicate-javascript
replicate-javascript copied to clipboard
Fix or explain use of modules with TypeScript
In https://github.com/replicate/replicate-javascript/issues/161#issuecomment-1816333059, a user reported the following error:
TypeError: replicate_1.default is not a constructor
A solution was to add "esModuleInterop": true
to the project's tsconfig.json
file.
We should either make this step unnecessary, or barring that, document this workaround.