Problem
The task-level JSDoc and type definitions mark delay as deprecated in favour of postDelay, but enqueue() only reads delay (and start) on a task. Following the documented API by passing postDelay on a task gives no delay at all. Priority- and coalescing-level config do use postDelay/startDelay, so the task level is the odd one out.
Found while rewriting the README examples (#50), which now tells users that delay/start are the current task-level names.
Fix
Make enqueue() accept postDelay / startDelay on tasks, keep delay / start as deprecated aliases with the same deprecation warning the other levels emit, and make the JSDoc, types and README agree. Add tests for both names.
Problem
The task-level JSDoc and type definitions mark
delayas deprecated in favour ofpostDelay, butenqueue()only readsdelay(andstart) on a task. Following the documented API by passingpostDelayon a task gives no delay at all. Priority- and coalescing-level config do usepostDelay/startDelay, so the task level is the odd one out.Found while rewriting the README examples (#50), which now tells users that
delay/startare the current task-level names.Fix
Make
enqueue()acceptpostDelay/startDelayon tasks, keepdelay/startas deprecated aliases with the same deprecation warning the other levels emit, and make the JSDoc, types and README agree. Add tests for both names.