Skip to content

Make array arg check a runtime check

Choose a tag to compare

@voodoocreation voodoocreation released this 19 Jul 00:39
· 25 commits to master since this release

Previously we were safeguarding against this using TypeScript by using length: never in IObject - this caused issues with legitimate object primitives that had a length property. This version removes that in favour of a runtime check for Array.isArray. Unfortunately it means that the TS compile-time check is lost, but at least it's not creating issues for users when providing a legitimate object.