These are chat archives for dry-rb/chat

22nd
May 2018
ojab
@ojab
May 22 2018 17:33
Oh hai! Is there any way to create recursive type definitions with dry-types? I want to use Hash with value that is the Hash itself, so something like
hash = Dry::Types['hash'].schema({})
hash = hash.schema(hash: hash)
but in this case value is the initial hash without any members
ojab
@ojab
May 22 2018 17:39
…and actually more general case of circular dependencies is also can't be described
so

something like

first = Dry::Types['hash'].schema({})
second = Dry::Types['hash'].schema(first: first)
first = first.schema(second: second)

cannot be described either