Typescript not happy with the advice from README
Trying to take this advice in the README: https://github.com/mourner/flatqueue#using-typed-arrays
But Typescript is not happy:

I am using flatqueue v2.0.3.
What am I doing wrong here?
You'll probably have to // @ts-ignore it, because those 2 fields are implementation details which don't show in the TypeScript typings.
They are initialized here:
https://github.com/mourner/flatqueue/blob/a3738479a4f0462e4c075734b369bba749783b3c/index.js#L4-L8
But they don't exist in the typings:
https://github.com/mourner/flatqueue/blob/a3738479a4f0462e4c075734b369bba749783b3c/index.d.ts#L1-L7
I think flatqueue should potentially have a constructor where you can optionally pass those arrays (with documented requirements for the implementation), or it should expose these fields in the typings (however, that violates the black-box principle and might lead to stupid bugs).
There might be other good design alternatives too.
Until that works, it's probably easiest to use ts-ignore and / or wrap the flatqueue constructor/class in a utility function/class.
Thank you for the reply, this makes a lot of sense.