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

EmitterError: Declaration generation failed #130

Open
prashanth2692 opened this issue Jul 20, 2020 · 0 comments
Open

EmitterError: Declaration generation failed #130

prashanth2692 opened this issue Jul 20, 2020 · 0 comments

Comments

@prashanth2692
Copy link

Digging into the code found out that the error originates because of below code
const emitOutput = program.emit(sourceFile, writeFile); if (emitOutput.emitSkipped || emitOutput.diagnostics.length > 0)

when changed if statement in the above code as below, ts file generation is successful.
if (emitOutput.emitSkipped && emitOutput.diagnostics.length > 0)

In my case emitOutput.emitSkipped is true in case of a .js file.

Please let me know if this could be an issue with my config. Below is the command I am using
dts-generator --name myProjectname --main /src/index --project . --out myProjectname.d.ts --exclude __tests__/**/*.d.ts --exclude __mocks__/**/*.ts --exclude node_modules/**/*.ts --prefix ''

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

1 participant