utility-types icon indicating copy to clipboard operation
utility-types copied to clipboard

Add NonEmptyArray

Open davidtjones02 opened this issue 1 year ago • 0 comments

Description

Added NonEmptyArray to type utilities. Existed as an outstanding issue for a while that from what I can tell hasn't had a PR yet. Useful for ensuring your arrays are not empty if the expectation is to provide at least one item of a varying type.

Please let me know if any additional work is needed, hoping I've added where necessary!

Cheers.

Related issues:

  • Resolved #181

Checklist

  • [X] I have read CONTRIBUTING.md
  • [X] I have linked all related issues above
  • [X] I have rebased my branch

For bugfixes:

  • [ ] I have added at least one unit test to confirm the bug have been fixed
  • [ ] I have checked and updated TOC and API Docs when necessary

For new features:

  • [X] I have added entry in TOC and API Docs
  • [X] I have added a short example in API Docs to demonstrate new usage
  • [X] I have added type unit tests with dts-jest

davidtjones02 avatar Jul 10 '24 23:07 davidtjones02