-
-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
full support for minItems & maxItems #477
Conversation
Thank you for your contribution! 👍 I think the |
Thanks! The thing is this feature can complicate consumer's code a bit, because in strict mode a tuple will be incompatible with an array. |
Tell me what you choose and i'll remove the option and the test infra change if necessary. |
I don't want to add too many options either, so please remove the options. The complexity of the type is not a problem for me. |
…nc_tuple_no_min` to `inc_tuple_with_max`
…tArraySize` option w/ default false
…it back array tests to conform w/ default behavior
…learToDefault` from config
… add support for optional `strict` array size test variant through `_expected_strict.d.ts` & `_config_strict.json` files
a8838ca
to
37f3e10
Compare
strictArraySize
option…unction, add support for optional `strict` array size test variant through `_expected_strict.d.ts` & `_config_strict.json` files" This reverts commit 4ac320e.
it's ready! |
@medfreeman Thank you for awesome work! 👍 |
The one negative I can see of the tuples is that for types defined as: results in: resulting in a rather large type. |
@crizo23 Thank you for your information. That's a problem. One idea would be to simply revert to an unlimited number of types as before if |
@horiuchi I don't think a "threshold" is the answer, as that would be different for anyone using the library. I more meant, is there a better/fancier way to do this in Typescript". The answer is probably "no", in that case I think there's no way around having |
closes #476