-
Notifications
You must be signed in to change notification settings - Fork 129
Description
I've been exploring using RBS with RubyMine, and found an oddity with how the persisted? type is defined for ActiveModel:
Here it is defined as returning a bool, which is what I'd expect:
| def persisted?: () -> bool |
However here it is typed as returning false:
| def persisted?: () -> false |
It seems that the latter definition "wins" in the eyes of RubyMine causing it flag anything that isn't false:
I personally come from a TypeScript background and have been involved in their version of RBS (DefinitelyTyped), so I'm happy to be involved in improving the types here but since this is the first time I'm really digging into RBS I want to make sure I understand how the types are managed especially these Rails ones that are suffixed with -generated.
Would it be correct to just remove the definition from the -generated file, or is there something else that would need adjusting?