Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

Add type signatures for attributes created with alias_attribute #267

Open
frewsxcv opened this issue Feb 14, 2020 · 2 comments
Open

Add type signatures for attributes created with alias_attribute #267

frewsxcv opened this issue Feb 14, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@frewsxcv
Copy link
Contributor

Describe the bug:

It's possible to create aliases for ActiveModel attributes via alias_attribute. Unfortunately, sorbet-rails doesn't generate types for the aliases, so they're T.untyped.

Steps to reproduce:

Screen Shot 2020-02-14 at 12 50 52 PM


Screen Shot 2020-02-14 at 12 51 01 PM


Screen Shot 2020-02-14 at 12 51 13 PM

Expected behavior:

In the example above, line1 should also be typed.

@frewsxcv frewsxcv added the bug Something isn't working label Feb 14, 2020
@joshuay03
Copy link

@frewsxcv @ColinBohn I took a crack at this here.
Would either of you know where I could request a review on this PR?

@frewsxcv
Copy link
Contributor Author

I haven't worked with Ruby or Sorbet since 2020 so I may not be the best for reviewing it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants