#circular type reference nonsense

5 messages · Page 1 of 1 (latest)

hearty slate
#
#

to be more clear about the type definition I'm looking for here, it should accept:

  • [1, [1, 'test']]
  • [[1, [1, 'test']], [1, 'test']]
  • [[1, [1, 'test']], [[[1, [1, 'test']], [1, 'test']], 'test']]
  • [1, [[1, [[[1, [1, 'test']], [[1, [1, 'test']], 'test']], 'test']], 'test']]

and so on

#

basically it starts off with a base [...number[], [...number[], string]]

#

but any of the ...number[]s can be replaced with the entire expression

#

recursively