hash-bang / async-chainable Goto Github PK
View Code? Open in Web Editor NEWAn extension to Async adding better handling of mixed Series / Parallel tasks via object chaining
License: MIT License
An extension to Async adding better handling of mixed Series / Parallel tasks via object chaining
License: MIT License
Hey @hash-bang I think you should keep using next
as a parameter and not use the context to expose it.
If you use a binded function as callback, you can't set the context, so the next
method will be missing in that context, and your "promise" will never be resolved.
Anyway, great job! It's very good lib.
I got this code:
import asyncChainable from 'async-chainable'
asyncChainable()
.then((next) => {
console.log('first')
next()
})
.then((next) => {
console.log('second')
next()
})
.start()
But when I compile it I get error:
11:33:13 [vite] hmr update /src/views/HomeView.vue
X [ERROR] Cannot use "await" as an identifier here:
node_modules/.pnpm/[email protected]/node_modules/async-chainable/index.js:372:9:
372 │ function await() {
╵ ~~~~~
11:33:16 [vite] error while updating dependencies:
Error: Build failed with 1 error:
node_modules/.pnpm/[email protected]/node_modules/async-chainable/index.js:372:9: ERROR: Cannot use "await" as an identifier here:
at failureErrorWithLog (C:\Users\username\Documents\GitHub\project\node_modules\.pnpm\[email protected]\node_modules\esbuild\lib\main.js:1604:15)
at C:\Users\username\Documents\GitHub\project\node_modules\.pnpm\[email protected]\node_modules\esbuild\lib\main.js:1056:28
at runOnEndCallbacks (C:\Users\username\Documents\GitHub\project\node_modules\.pnpm\[email protected]\node_modules\esbuild\lib\main.js:1476:61)
at buildResponseToResult (C:\Users\username\Documents\GitHub\project\node_modules\.pnpm\[email protected]\node_modules\esbuild\lib\main.js:1054:7)
at C:\Users\username\Documents\GitHub\project\node_modules\.pnpm\[email protected]\node_modules\esbuild\lib\main.js:1166:14
at responseCallbacks.<computed> (C:\Users\username\Documents\GitHub\project\node_modules\.pnpm\[email protected]\node_modules\esbuild\lib\main.js:701:9)
at handleIncomingPacket (C:\Users\username\Documents\GitHub\project\node_modules\.pnpm\[email protected]\node_modules\esbuild\lib\main.js:756:9)
at Socket.readFromStdout (C:\Users\username\Documents\GitHub\project\node_modules\.pnpm\[email protected]\node_modules\esbuild\lib\main.js:677:7)
at Socket.emit (node:events:512:28)
at addChunk (node:internal/streams/readable:324:12)
I use:
Node: v19.6.0
Vite: 4.0.0 win32-x64
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.