-
-
Notifications
You must be signed in to change notification settings - Fork 535
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
Support for node's --unhandled-rejections=strict #1076
Comments
To answer other Googlers more directly this seems to do it:
test
Related: https://stackoverflow.com/questions/54041199/how-to-pass-parameters-to-a-script-processed-by-ts-node |
This is also mentioned in the docs: https://typestrong.org/ts-node/docs/configuration#node-flags |
Per the docs, an alternative syntax for the lazy:
|
Desired Behavior
When an unhandled promise rejection occurs I'd like the process to exit. Node even explains in a warning that this is their intended future behavior, if you want that behavior now, you can pass the
--unhandled-rejections=strict
flag. ts-node does not appear to support it. Or maybe I misunderstand how to pass it, in which case this issue can be read as a suggestion to change the docs.Alternatives you've considered
Compiling with tsc and running with node. Sadly stack-traces get worse and it's a bit cumbersome in development when running with docker-compose for example.
The text was updated successfully, but these errors were encountered: