boesing / typed-arrays

Library which provides interfaces to work with arrays containing an ordered list of values or to work with hashmaps (arrays with string/non-integerish keys)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing examples

simPod opened this issue · comments

Hi there!

I've stumbled upon this library but what does it do? Would you mind showing some examples? 🙃

Thanks!

Sure, will do together with the initial version 1.0.0.

If you are using psalm, this will give you a better type-inference when working with list while not having to use array_* functions. 👍🏼

Hey @simPod,

I've added a README section regarding the idea behind this library.
However, I also added some interface method definitions to provide more insights of the purpose of the methods.


The major benefit of this library comes if you are using vimeo/psalm for better type inferences due to the extensive usage of generics.

To learn more about psalm and generics, you might want to dive into the psalm documentation:
https://psalm.dev/docs/

If you have absolutely no idea how this library could provide benefits to your development, you probably don't need it and thus I'd suggest not using it to keep the dependency graph as low as possible.

If you have any other questions, please let me know.