matheus-rodrigues00 / utils

✨ Library to commonly used cross-projects utilities methods ✨
17 stars 11 forks source link

Create sequential Method #39

Open matheus-rodrigues00 opened 1 year ago

matheus-rodrigues00 commented 1 year ago

Implement a method that executes an array of promise-returning functions sequentially, waiting for each to complete before starting the next. Method signature:

async function sequence<T>(
  promiseFunctions: (() => Promise<T>)[]
): Promise<T[]> {
  // Implementation goes here
}