Skip to content

Wording of changeDelay(…) is confusing #3494

@parzhitsky

Description

@parzhitsky

Is your feature request related to a problem? Please describe.
The purpose of changeDelay(delay: number) is confusing: the method name implies "replace old delay with the new one", while the JSDoc says "milliseconds to be added to current time".

Describe the solution you'd like
An argument named delta or difference or something similar (instead of delay) would be helpful. delay implies "new delay".

Describe alternatives you've considered
Introduce a method that takes in a new timestamp (i.e., "add five seconds" = resetDelay(Date.now() + 5000)).

Additional context
n/a

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions