# Annoying YARD problem with dry-struct ‘new’

**URL:** <https://discourse.dry-rb.org/t/annoying-yard-problem-with-dry-struct-new/1479>\
**Category:** Uncategorized\
**Created:** [June 12, 2022, 10:16pm UTC](https://discourse.dry-rb.org/t/annoying-yard-problem-with-dry-struct-new/1479 "2022-06-12T22:16:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nuzz](https://avatars.discourse-cdn.com/v4/letter/n/77aa72/32.png) [@nuzz](https://discourse.dry-rb.org/u/nuzz)\
**Post date:** [June 12, 2022, 10:16pm UTC](https://discourse.dry-rb.org/t/annoying-yard-problem-with-dry-struct-new/1479/1 "2022-06-12T22:16:08Z")

</div>

Foo.new(…) returns type Foo but RubyMine thinks that it is of type Hash{Symbol-\>Object}. Is there a better workaround than adding multiple lines of boilerplate for each and every class?

We’re only able to use Ruby 3.0 at this time. Using the new Rubymine EAP is fine. Even a new plugin dependency wouldn’t hurt at this point.

Can only upload one image per post, screenshots are here: [Imgur: The magic of the Internet](https://imgur.com/a/IbQXaNJ)
