Advertisement
Guest User

Untitled

a guest
Aug 24th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. if abc is true
  2. call async func1, func2
  3. else
  4. call async func1
  5.  
  6. if(abc)
  7. Q.all([func1,func2])
  8. else
  9. Q.all([func1])
  10.  
  11. function test(): Q.Promise<boolean> {
  12. if(abc)
  13. Q.all([func1,func2])
  14. else
  15. Q.all([func1])
  16. //if failed throw reject reason all the way in the chain
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement