utility-types
utility-types copied to clipboard
add TupleOf type
Description
added TupleOf type using logarithmic method
had to update TS to 4.1.x as it uses recursive conditional types
Related issues:
- Resolved #161
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
i think the failing tests are caused by changes to type alias resolution in newer typescript versions. i don't think testing types that way is very reliable since there are more changes like that coming in 4.2.
is there a way to structurally test types? none of the libraries i've tried seem to be able to do it properly, which is odd considering typescript is structurally typed...