dry-types icon indicating copy to clipboard operation
dry-types copied to clipboard

Flexible type system for Ruby with coercions and constraints

Results 27 dry-types issues
Sort by recently updated
recently updated
newest added

## Describe the bug 👋 Hey guys, I've been playing around dry-types and found an error raised from _sum types_ unexpected. ## To Reproduce ```rb require 'dry-types' # => 1.5.1...

bug
help wanted

As agreed, this is our recommendation to resolve the issue raised in #422. Most of our code examples depend on a `::Types` module having been already created, so to make...

I benchmarked `dry-types` and `activemodel` and noticed that `dry-types` has low perfomance, and I dip inside code rails https://github.com/rails/rails/blob/main/activemodel/lib/active_model/type/helpers/time_value.rb#L72 https://github.com/rails/rails/blob/main/activemodel/lib/active_model/type/date.rb#L30 rails use regexp for frequent case

## Describe the bug This is a design issue I'm not sure how to tackle. It seems as though there will invariably be situations where there are `Types::Instance` or `Types::Constructor`...

bug
help wanted

## Describe the bug When viewing the documentation at https://dry-rb.org/gems/dry-types/, it only shows version 1.2 and below. ## To Reproduce - Navigate to the documentation at https://dry-rb.org/gems/dry-types/ - Look at...

bug
help wanted

## Describe the bug It is not possible to add new type definition in the Params namespace of included Types() using the following construction, (it is certainly the same for...

bug
help wanted

## To Reproduce ```ruby Types::Params::Integer.optional[''] # => raise invalid value for Integer(): "" Types::Optional::Params::Integer[''] # => nil Types::Params::Date.optional[''] # => raise invalid date Dry::Types["optional.params.date"] # => Nothing registered with the...

bug
help wanted

Is there a plan to support [Set](https://ruby-doc.org/stdlib-2.6.5/libdoc/set/rdoc/Set.html)? I am trying to use dry-types in place of Virtus in [Grape](https://github.com/ruby-grape/grape/issues/1347). Currently, Set is supported because Virtus supports it. I am think...

feature
discussion

This conversation got me thinking there is a need for more explanation of using `dry-types` as objects:

help wanted
docsite