invertase / denque

The fastest javascript implementation of a double-ended queue. Used by the official Redis, MongoDB, MariaDB & MySQL libraries for Node.js and many other libraries.
https://docs.page/invertase/denque
Apache License 2.0
353 stars 33 forks source link

Typings improvement. #40

Open MadProbe opened 2 years ago

MadProbe commented 2 years ago

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)
Salakar commented 2 years ago

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

MadProbe commented 2 years ago

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