# \[dry-type\] Params namespace

**URL:** <https://discourse.dry-rb.org/t/dry-type-params-namespace/1261>\
**Category:** dry-types\
**Created:** [May 6, 2021, 9:20am UTC](https://discourse.dry-rb.org/t/dry-type-params-namespace/1261 "2021-05-06T09:20:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sdalu](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.dry-rb.org/sdalu/32/645_2.png) [@sdalu](https://discourse.dry-rb.org/u/sdalu)\
**Post date:** [May 6, 2021, 9:20am UTC](https://discourse.dry-rb.org/t/dry-type-params-namespace/1261/1 "2021-05-06T09:20:21Z")

</div>

I’m trying to define new types and some of them are specific to Params so I would like to create the in the Params namespace/module:

```auto
module Types
  include Dry.Types()
  
  module Params
    PageSize = Types::Params::Integer
  end
end

```

But I got “(irb):39:in `module:Params’: uninitialized constant Types::Params::Integer (NameError)”

If I don’t use a module for the namespace it’s working

```auto
module Types
  include Dry.Types()
  
  PageSize = Types::Params::Integer
end

```

What am I supposed to do ?

---

<div class="post-metadata">

**Author:** ![solnic](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.dry-rb.org/solnic/32/779_2.png) [@solnic](https://discourse.dry-rb.org/u/solnic)\
**Post date:** [May 7, 2021, 8:21am UTC](https://discourse.dry-rb.org/t/dry-type-params-namespace/1261/2 "2021-05-07T08:21:38Z")

</div>

So, this is unfortunate. I’d say this should be reported as a bug. For now, you can do this:

```ruby
module Types
  include Dry.Types()

  Params::PageSize = Types::Params::Integer
end

```

---

<div class="post-metadata">

**Author:** ![solnic](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.dry-rb.org/solnic/32/779_2.png) [@solnic](https://discourse.dry-rb.org/u/solnic)\
**Post date:** [May 10, 2021, 7:49am UTC](https://discourse.dry-rb.org/t/dry-type-params-namespace/1261/3 "2021-05-10T07:49:30Z")

</div>

For the record, Nikita provided an explanation why it works the way it works [here](https://github.com/dry-rb/dry-types/issues/422#issuecomment-834350849).
