No, that is not possible. See Algebraic constraints for type parameters.
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Parametric type with a constrained NamedTuple | 2 | 620 | February 12, 2020 | |
| Function signature with tuple argument of a given length | 5 | 789 | October 23, 2017 | |
| Correct way to constrain the length of tuples in type definitions? | 2 | 549 | December 18, 2018 | |
| Declare tuple type of arbitrary length | 0 | 216 | June 4, 2024 | |
| Get tuple length from type? | 19 | 7154 | February 28, 2022 |