2 ms·
One approach you could use is to - run your code through a preprocessor (like tsc or babel) and have it set to generate 'es2016' code. This will transpile out
by TimTheTinker 2y ago
One approach you could use is to
- run your code through a preprocessor (like tsc or babel) and have it set to generate 'es2016' code. This will transpile out async/await to equivalent code without those keywords.
- Then edit the generated code and/or the runtime library it attaches to use Bluebird promises instead of native promises.
Are you on an old version of nodejs? Past a certain version (I don't know which one), native promises are actually faster.