Skip to content
Discussion options

You must be logged in to vote

Hello @theogiraudet,

thanks for your interest in Typir!

With the current state of Typir, is it possible to define typed arrays?

Officially not yet, but we are working on types we are calling FixedParameterType at the moment. They are designed to represent types like Set<A>, Collection<B> or Map<K, V>, or in your case Array<Integer>. First implementations are already on main and here is a sketch how to use them. But there are no test cases for them, support for cyclic type definitions is missing and so on. We plan to support this feature for v0.2 (#44)

Check if the value is an array of integer

Yes, type inference will be supported for this case

Check if the size of the array is betwee…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@theogiraudet
Comment options

Answer selected by theogiraudet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants