denque icon indicating copy to clipboard operation
denque copied to clipboard

Typings improvement.

Open MadProbe opened this issue 3 years ago • 2 comments

I want to suggest some improvement on typings:

  1. Mark the length property as readonly since only getter is defined for this property.
  2. I would use optional arguments syntax, e.g. function foo(argument?: whatever) {} instead on consequencial overloads since it's considered as a best practice. (https://github.com/invertase/denque/blob/master/index.d.ts#L4-L8)

MadProbe avatar Feb 20 '22 19:02 MadProbe

We're willing to accept a PR to improve the types if you're interested?

Salakar avatar Feb 21 '22 10:02 Salakar

Sure, i'll open a PR in a couple of days.

MadProbe avatar Feb 21 '22 15:02 MadProbe