google-api-typings-generator
google-api-typings-generator copied to clipboard
Better way to fail for unhandled rejections
Currently we have
process.on('unhandledRejection', reason => {
throw reason;
});
in order to quit node process with error code on unhandled rejected promises. Which might not be the best way to do it. First of all, we have many scripts where we need this and code duplication is not a good thing, at least we should make it includable.
Also, we might want to use --unhandled-rejections=strict
option for node instead. But first we have to verify that ts-node
supports it, and then add it to package.json
scripts
, probably.